:root {
  --ink: #102f3b;
  --ink-soft: #48636d;
  --navy: #0b3142;
  --teal: #0b8f8a;
  --teal-dark: #08736f;
  --mint: #dff7f1;
  --aqua: #a8e6dc;
  --cream: #f7f8f4;
  --white: #fff;
  --line: #dce8e7;
  --danger: #bd4b55;
  --danger-bg: #fff0f1;
  --success: #177563;
  --success-bg: #e9f8f2;
  --shadow-sm: 0 8px 24px rgba(11, 49, 66, .07);
  --shadow-lg: 0 28px 70px rgba(11, 49, 66, .14);
  --radius: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); color: var(--ink); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(#0b8f8a 0.55px, transparent 0.55px); background-size: 24px 24px; mask-image: linear-gradient(to bottom, #000, transparent 55%); z-index: -1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(11, 143, 138, .35); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; color: var(--white); background: var(--navy); padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 248, 244, .86); border-bottom: 1px solid rgba(220, 232, 231, .7); backdrop-filter: blur(18px); }
.header-inner, .footer-inner { width: min(1180px, calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.header-inner { min-height: 76px; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 800; letter-spacing: -.04em; color: var(--navy); }
.brand > span:last-child > span { color: var(--teal); }
.brand-mark { position: relative; width: 38px; height: 38px; border-radius: 13px; background: linear-gradient(145deg, var(--teal), #41b9ae); box-shadow: 0 8px 20px rgba(11, 143, 138, .25); transform: rotate(-5deg); }
.brand-mark::before, .brand-mark::after, .brand-mark span::before, .brand-mark span::after { content: ""; position: absolute; background: #fff; border-radius: 99px; }
.brand-mark::before { width: 17px; height: 5px; left: 10px; top: 16px; }
.brand-mark::after { width: 5px; height: 17px; left: 16px; top: 10px; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { position: relative; padding: 11px 15px; border-radius: 12px; color: #55717a; font-size: 14px; font-weight: 650; transition: color .2s, background .2s, transform .2s; }
.main-nav a:hover { color: var(--navy); background: rgba(255,255,255,.75); transform: translateY(-1px); }
.main-nav a.active { color: var(--teal-dark); background: var(--white); box-shadow: var(--shadow-sm); }
main { min-height: calc(100vh - 220px); }


.reveal { animation: reveal .62s cubic-bezier(.2,.75,.25,1) both; }
.reveal-delay { animation-delay: .12s; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.kicker { display: inline-flex; align-items: center; gap: 9px; text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; color: var(--teal-dark); }
.kicker i { width: 25px; height: 1px; background: currentColor; }
.kicker.light { color: var(--aqua); }

/* Certificate check */
.check-page { background: linear-gradient(145deg, #edf8f4 0%, var(--cream) 45%, #f2f0e9 100%); }
.check-page main { overflow: hidden; }
.check-hero { position: relative; width: min(1180px, calc(100% - 48px)); min-height: 710px; margin: 0 auto; padding: 88px 0 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .75fr); gap: 90px; align-items: center; }
.check-hero::before { content: ""; position: absolute; width: 540px; height: 540px; right: -340px; top: 40px; border: 1px solid rgba(11,143,138,.16); border-radius: 50%; box-shadow: 0 0 0 80px rgba(11,143,138,.035), 0 0 0 160px rgba(11,143,138,.025); }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { margin: 24px 0; font-size: clamp(48px, 6vw, 78px); line-height: .98; letter-spacing: -.065em; color: var(--navy); }
.hero-copy h1 em { color: var(--teal); font-style: normal; font-weight: 500; }
.hero-lead { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: 19px; line-height: 1.65; }
.trust-list { display: flex; flex-wrap: wrap; gap: 18px 25px; margin-top: 38px; color: #45636d; font-size: 13px; font-weight: 650; }
.trust-list span { display: inline-flex; gap: 8px; align-items: center; }
.trust-list b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--teal-dark); background: var(--mint); }
.trust-list b svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.check-card { position: relative; z-index: 2; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.9); border-radius: 30px; padding: 38px; box-shadow: var(--shadow-lg); }
.check-card::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(11,143,138,.06); border-radius: 21px; pointer-events: none; }
.check-card-icon { position: absolute; right: 34px; top: 34px; display: grid; place-items: center; width: 45px; height: 45px; color: var(--teal); background: var(--mint); border-radius: 14px; }
.check-card-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.overline { color: var(--teal-dark); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.check-card-head h2 { margin: 10px 58px 8px 0; font-size: 29px; letter-spacing: -.035em; }
.check-card-head p { color: var(--ink-soft); margin: 0 0 28px; font-size: 14px; }
.certificate-form label { display: block; margin: 0 0 8px; color: #36545f; font-size: 13px; font-weight: 750; }
.input-wrap { position: relative; }
.input-wrap svg, .search svg { position: absolute; width: 20px; fill: none; stroke: #789098; stroke-width: 1.7; stroke-linecap: round; }
.input-wrap svg { left: 16px; top: 50%; transform: translateY(-50%); }
.input-wrap input, .search input { width: 100%; border: 1px solid var(--line); background: #f9fbfa; color: var(--ink); transition: border .2s, box-shadow .2s, background .2s; }
.input-wrap input { height: 56px; padding: 0 16px 0 48px; border-radius: 14px; font-size: 15px; }
.input-wrap input:focus, .search input:focus { outline: 0; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px rgba(11,143,138,.1); }
.primary-button { width: 100%; min-height: 54px; margin-top: 14px; border: 0; border-radius: 14px; padding: 0 19px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: linear-gradient(135deg, var(--teal), #087a80); box-shadow: 0 12px 25px rgba(11,143,138,.2); font-weight: 750; transition: transform .2s, box-shadow .2s; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(11,143,138,.28); }
.primary-button span:last-child { font-size: 20px; }
.success-button { margin-top: 14px; }
.status-message { display: flex; gap: 13px; align-items: center; margin-top: 20px; border-radius: 14px; padding: 14px 15px; animation: pop .35s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.status-message strong, .status-message p { display: block; margin: 0; }
.status-message strong { font-size: 14px; }
.status-message p { margin-top: 2px; font-size: 12px; opacity: .75; }
.status-icon { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 900; }
.status-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.status-success { color: var(--success); background: var(--success-bg); }.status-success .status-icon { background: #c9eedf; }
.status-error { color: var(--danger); background: var(--danger-bg); }.status-error .status-icon { background: #ffdadd; }
.certificate-data { margin: 15px 0 0; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; }
.certificate-data div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e8eeee; }
.certificate-data div:last-child { border: 0; }.certificate-data dt { color: var(--ink-soft); font-size: 12px; }.certificate-data dd { margin: 0; text-align: right; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.privacy-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 18px 0 0; color: #61777f; font-size: 11px; }
.privacy-note svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }


/* Library */
.library-hero {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
}

/* With a valid certificate the "hero" is only a layout wrapper.
   The visual emphasis belongs to the certificate card itself. */
.library-page .library-hero {
  min-height: 0;

  overflow: visible;
  color: inherit;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.library-access {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  padding: 18px 22px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: linear-gradient(135deg, #155868 0%, #247879 56%, #318c88 100%);
  box-shadow: 0 18px 45px rgba(11,49,66,.16), inset 0 1px 0 rgba(255,255,255,.08);
}

.library-access__status {
  display: flex;
  align-items: center;


  border-bottom: 1px solid rgba(255,255,255,.15);
}
.library-access__status > i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #76e5bd;
  box-shadow: 0 0 0 5px rgba(118,229,189,.13), 0 0 18px rgba(118,229,189,.25);
}
.library-access__status > span { display: flex; flex-direction: column; }
.library-access__status small {
  color: #b7eee4;

  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.library-access__status strong {    }

.library-access dl {

  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 20px;
  margin: 12px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.library-access dl > div {  }
.library-access dt {
  color: rgba(255,255,255,.65);

  font-weight: 700;
  letter-spacing: .04em;

}
.library-access dd {
  margin: 4px 0 0;
  overflow: hidden;

  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-access__product-description {
  margin: 12px 0 0;


  color: rgba(255,255,255,.9);


}


.library-access__program-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  padding: 12px 15px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  border: 1px solid rgba(139,239,215,.3);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(139,239,215,.16), rgba(255,255,255,.06));
  box-shadow: 0 10px 24px rgba(4,29,36,.12), inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer;
  transition: transform .18s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.library-access__program-button:hover {

  border-color: rgba(139,239,215,.52);
  background: linear-gradient(135deg, rgba(139,239,215,.24), rgba(255,255,255,.09));
  box-shadow: 0 14px 30px rgba(4,29,36,.18), inset 0 1px 0 rgba(255,255,255,.08);
}
.library-access__program-button:focus-visible {
  outline: 2px solid rgba(139,239,215,.85);
  outline-offset: 3px;
}
/* Product program modal */
.product-dialog {
  width: min(880px, calc(100% - 40px));
  max-height: min(84vh, 860px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(220,232,231,.95);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(8,44,56,.28);
}
.product-dialog[open] { animation: productDialogIn .22s cubic-bezier(.2,.75,.25,1) both; }
.product-dialog::backdrop {
  background: rgba(4,30,39,.58);
  backdrop-filter: blur(5px);
  animation: productBackdropIn .18s ease both;
}
@keyframes productDialogIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes productBackdropIn { from { opacity: 0; } to { opacity: 1; } }

.product-dialog__shell {
  display: flex;
  flex-direction: column;
  max-height: min(84vh, 860px);
}
.product-dialog__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.product-dialog__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.product-dialog__header h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(25px,3vw,34px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.product-dialog__close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #4e6972;
  font-size: 25px;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f5f8f7;
  transition: transform .18s ease, color .18s ease, background .18s ease;
}
.product-dialog__close:hover {
  color: var(--navy);
  background: var(--mint);
  transform: rotate(5deg);
}
.product-dialog__body {
  overflow: auto;
  padding: 24px 26px 30px;
  color: #294750;
  font-size: 16px;
  line-height: 1.68;
  overscroll-behavior: contain;
}
.product-dialog__body br + br {
  display: block;
  content: "";
  margin-top: 7px;
}

/* The no-certificate state remains a compact standalone hero. */
.library-hero__empty {
  width: min(760px, 100%);
  padding: 38px 42px;
  color: #fff;
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(120deg, #0a3444, #0b5960 70%, #0a7773);
  box-shadow: var(--shadow-lg);
}
.library-hero__empty h1 {
  margin: 10px 0 7px;
  font-size: clamp(28px,3.5vw,38px);
  line-height: 1.08;
  letter-spacing: -.04em;
}
.library-hero__empty p { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; }
.library-hero__empty .kicker { font-size: 10px; }

/* Library browser */
.library-content {
  width: min(1180px, calc(100% - 48px));
  margin: 28px auto 0;
  position: relative;
  transition: opacity .18s ease;
}
.library-content.is-loading { opacity: .48; pointer-events: none; }
.library-content.is-loading::after {
  content: "";
  position: absolute;
  top: 130px;
  left: 50%;
  z-index: 10;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(8,127,121,.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.library-content__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.library-content__heading span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.library-content__heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px,3vw,32px);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.library-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(11,49,66,.055);
}

.tabs, .chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tabs { gap: 5px; padding: 4px; border-radius: 13px; background: #eef4f2; }
.tabs a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  color: #5a737b;
  font-size: 13px;
  font-weight: 750;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: .2s;
}
.tabs a:hover { color: var(--teal-dark); background: #fff; }
.tabs a.active {
  color: #fff;
  background: linear-gradient(120deg,var(--navy),#0b6867);
  box-shadow: 0 6px 16px rgba(11,49,66,.18);
}
.tabs span {
  min-width: 20px;
  margin-left: 5px;
  padding: 2px 6px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  border-radius: 99px;
  background: rgba(255,255,255,.7);
}
.tabs a.active span { color: #fff; background: rgba(255,255,255,.15); opacity: 1; }

.search {
  position: relative;
  display: flex;
  flex: 0 1 340px;
  align-self: center;
  margin-right: 1px;
}
.search svg { left: 14px; top: 50%; transform: translateY(-50%); }
.search input { height: 46px; padding: 0 12px 0 42px; border-radius: 13px 0 0 13px; }
.search button {
  padding: 0 17px;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  border: 0;
  border-radius: 0 13px 13px 0;
  background: var(--teal);
}

.chips { padding: 7px 3px 5px; border-top: 0; }
.chips a {
  padding: 7px 11px;
  color: #526b73;
  font-size: 11px;
  font-weight: 650;
  border-radius: 99px;
  background: #edf2f0;
  transition: .2s;
}
.chips a:hover, .chips a.active { color: var(--teal-dark); background: var(--mint); }
.chips__more { display: none; }

#library-results:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 12px;
}

.mobile-type-chips { display: none; }

.results-head { display: flex; justify-content: space-between; align-items: end; margin: 23px 0 16px; }
.results-head p { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.results-head span { color: #667b82; font-size: 12px; }

.material-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.material-card {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(220,232,231,.8);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2,.75,.25,1), box-shadow .3s;
  animation: cardIn .5s cubic-bezier(.2,.75,.25,1) both;
  animation-delay: min(calc(var(--delay) * 45ms),450ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(15px); } }
.material-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(11,49,66,.13); }

.material-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg,#d7f0eb,#eef5f2);
}
.material-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.material-card:hover .material-image img { transform: scale(1.045); }
.image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--teal); font-size: 25px; }
.image-placeholder b { color: var(--navy); }
.image-arrow {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--navy);
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(11,49,66,.12);
  transform: translateY(-5px);
  opacity: 0;
  transition: .25s;
}
.image-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.material-card:hover .image-arrow { transform: translateY(0); opacity: 1; }

.material-card-body { padding: 21px 21px 22px; }
.card-type {
  display: inline-block;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.material-card h2 { margin: 8px 0 9px; font-size: 19px; line-height: 1.28; letter-spacing: -.025em; }
.material-card h2 a { transition: color .2s; }
.material-card h2 a:hover { color: var(--teal-dark); }
.recipe-meta {
  align-items: center;
  color: #7b8d95;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  gap: 7px 14px;
  line-height: 1.25;
}
.recipe-meta--card { margin: 0 0 14px; }
.recipe-meta__item { align-items: center; display: inline-flex; gap: 5px; white-space: nowrap; }
.recipe-meta__icon {
  flex: 0 0 auto;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 15px;
}
.recipe-meta__icon--energy { stroke-width: 1.55; }
.material-card-body > p {
  min-height: 42px;
  margin: 0 0 15px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}
.topic-line { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-line span {
  padding: 5px 8px;
  color: #536b72;
  font-size: 10px;
  font-weight: 650;
  border-radius: 99px;
  background: #f0f4f3;
}

.empty-state {
  grid-column: 1/-1;
  padding: 65px 30px;
  text-align: center;
  border: 1px dashed #cbdad8;
  border-radius: var(--radius);
  background: rgba(255,255,255,.6);
}
.empty-state__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; color: var(--teal); }
.empty-state__icon svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h2 { margin: 10px 0 7px; }
.empty-state p { color: var(--ink-soft); }
.empty-state a { display: inline-block; margin-top: 10px; color: var(--teal-dark); font-weight: 750; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
  padding-top: 22px;
  color: var(--ink-soft);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.pagination__pages { display: flex; align-items: center; gap: 5px; }
.pagination a, .pagination__current, .pagination__ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pagination a {
  color: var(--ink-soft);
  background: #fff;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.pagination a:hover {
  color: var(--teal-dark);
  background: var(--mint);
  border-color: #acd9d2;
  transform: translateY(-1px);
}
.pagination__current {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 7px 17px rgba(11,49,66,.18);
}
.pagination__ellipsis { min-width: 24px; padding: 0; color: var(--ink-soft); border-color: transparent; }
.pagination__arrow { font-size: 16px !important; }

@media (max-width: 920px) {
  .library-hero { width: min(100% - 36px,1180px); margin-top: 18px; }
  .library-access { width: 100%; padding: 18px 20px; }
  .library-toolbar { flex-direction: column; }
  .search { align-self: stretch; flex-basis: auto; max-width: none; width: 100%; }
  .material-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .library-hero { width: calc(100% - 30px); margin-top: 12px; }
  .library-access { width: 100%; padding: 15px 14px; border-radius: 18px; }
  .library-access__status {  }
  .library-access__status strong { font-size: 12px; }

  .library-access dl { gap: 8px; margin-top: 10px; padding-bottom: 11px; }
  .library-access dt {  }
  .library-access dd { font-size: 10px; }

  .library-access__product-description { margin-top: 10px;   }
  .library-access__program-button { min-height: 50px; margin-top: 11px; padding: 10px 12px;  border-radius: 14px; }

  .product-dialog {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
  }
  .product-dialog[open] { animation: productSheetIn .24s cubic-bezier(.2,.75,.25,1) both; }
  @keyframes productSheetIn {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .product-dialog__shell { max-height: 92dvh; }
  .product-dialog__header { padding: 20px 18px 16px; }
  .product-dialog__header h2 { font-size: 24px; }
  .product-dialog__close { flex-basis: 38px; width: 38px; height: 38px; }
  .product-dialog__body { padding: 19px 18px 28px; font-size: 14px; line-height: 1.6; }

  .library-hero__empty { padding: 26px 20px; border-radius: 20px; }
  .library-hero__empty h1 { font-size: 23px; }
  .library-hero__empty p { font-size: 11px; line-height: 1.35; }
  .library-hero__empty .kicker { display: none; }

  .library-content { width: min(100% - 30px,1180px); margin-top: 19px; }
  .library-content__heading { margin-bottom: 16px; }
  .library-content__heading h2 { font-size: 23px; }

  .library-toolbar { padding: 8px; border-radius: 15px; }
  .tabs { display: none; }
  .mobile-type-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; width: 100%; }
  .mobile-type-chips a {
    padding: 8px 11px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    border: 1px solid transparent;
    border-radius: 99px;
    background: #edf2f0;
  }
  .mobile-type-chips a.active { color: var(--teal-dark); background: var(--mint); border-color: #bfe5de; }
  .mobile-type-chips span {
    margin-left: 3px;
    padding: 2px 5px;
    font-size: 10px;
    border-radius: 99px;
    background: rgba(255,255,255,.8);
  }
  .chips { flex-wrap: wrap; overflow: visible; }
  .chips a { flex: 0 0 auto; }
  .chips[data-mobile-collapsible-topics].is-collapsible:not(.is-mobile-expanded) a.is-mobile-extra {
    display: none;
  }
  .chips[data-mobile-collapsible-topics].is-collapsible .chips__more {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 11px;
    color: var(--teal-dark);
    font: 700 11px/1.25 inherit;
    border: 1px solid #bfe5de;
    border-radius: 99px;
    background: #fff;
    cursor: pointer;
  }
  .chips__more[hidden] { display: none !important; }
  .chips__more:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
  }

  .material-grid { grid-template-columns: 1fr; gap: 17px; }
  .results-head { margin-top: 23px; }
  .material-card-body > p { min-height: 0; }
  .image-arrow { opacity: 1; transform: none; }

  .pagination { gap: 5px; }
  .pagination a, .pagination__current, .pagination__ellipsis { min-width: 34px; height: 34px; padding: 0 7px; }
}

@media (max-width: 390px) {
  .library-hero { width: calc(100% - 22px); }
  .library-access { padding: 13px 12px; }
  .library-access dl { grid-template-columns: 1fr 1fr; }
  .library-access dl > div:last-child { grid-column: 1/-1; }
}

/* Article */
.article-shell { width: min(900px, calc(100% - 48px)); margin: 54px auto 0; }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 36px; color: var(--ink-soft); font-size: 13px; font-weight: 700; transition: color .2s, transform .2s; }.back-link:hover { color: var(--teal-dark); transform: translateX(-3px); }
.article-frame { padding: 36px 40px 42px; border: 1px solid rgba(205,220,222,.9); border-radius: 30px; background: rgba(255,255,255,.94); box-shadow: 0 24px 65px rgba(11,49,66,.10), 0 3px 10px rgba(11,49,66,.04); }
.article-header { max-width: 790px; margin-bottom: 32px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }.article-header h1 { margin: 17px 0 17px; font-size: clamp(38px, 6vw, 62px); line-height: 1.03; letter-spacing: -.055em; color: var(--navy); }.article-header > p { margin: 0; max-width: 700px; color: var(--ink-soft); font-size: 18px; line-height: 1.6; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }.article-meta span { display: inline-flex; align-items: center; min-height: 27px; padding: 6px 11px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1; }.article-meta__type { color: #087a69; background: #dcf8e9; }.article-meta__type::before { content: "↔"; margin-right: 6px; font-size: 11px; }.article-meta__topic { color: #536b77; background: #f0f4f6; }
.recipe-meta--article {
  color: #60767e;
  font-size: 13px;
  gap: 8px 16px;
  margin: -5px 0 17px;
}
.recipe-meta--article .recipe-meta__icon { height: 16px; width: 16px; }
.article-cover { overflow: hidden; margin: 0 0 40px; border-radius: 28px; background: var(--mint); box-shadow: var(--shadow-lg); }.article-cover img { display: block; width: 100%; max-height: 620px; object-fit: cover; }
.article-body { padding: 0 8px; color: #294750; font-size: 17px; line-height: 1.78; }.article-body > *:first-child { margin-top: 0; }.article-body h2, .article-body h3 { margin: 1.7em 0 .65em; color: var(--navy); line-height: 1.2; letter-spacing: -.025em; }.article-body h2 { font-size: 30px; }.article-body h3 { font-size: 23px; }.article-body a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }.article-body img { height: auto; border-radius: 18px; }.article-body iframe { display: block; width: 100%; max-width: 900px; aspect-ratio: 16/9; height: auto; margin: 32px 0; border: 0; border-radius: 20px; box-shadow: var(--shadow-sm); }.article-body blockquote { margin: 30px 0; padding: 22px 25px; border-left: 4px solid var(--teal); border-radius: 0 16px 16px 0; background: var(--mint); }.article-body ul, .article-body ol { padding-left: 24px; }.article-body li { margin: 7px 0; }.article-body table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 12px; }.article-body th, .article-body td { border: 1px solid var(--line); padding: 11px; text-align: left; }
.related-materials { margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--line); }
.related-materials__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.related-materials__head h2 { margin: 0; color: var(--navy); font-size: 24px; letter-spacing: -.035em; }.related-materials__head > a { color: var(--teal-dark); font-size: 12px; font-weight: 800; }.related-materials__head > a span { margin-left: 5px; transition: transform .2s; }.related-materials__head > a:hover span { display: inline-block; transform: translateX(3px); }
.related-materials__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.related-card { min-width: 0; overflow: hidden; border: 1px solid rgba(220,232,231,.9); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }.related-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(11,49,66,.12); }
.related-card__image { display: block; overflow: hidden; aspect-ratio: 16/9; background: linear-gradient(135deg, #d7f0eb, #eef5f2); }.related-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }.related-card:hover .related-card__image img { transform: scale(1.04); }
.related-card__body { padding: 15px 16px 17px; }.related-card__topics { margin-top: 7px; overflow: hidden; color: var(--teal-dark); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }.related-card h3 { margin: 7px 0 0; color: var(--navy); font-size: 16px; line-height: 1.3; letter-spacing: -.025em; }.related-card h3 a:hover { color: var(--teal-dark); }
.article-footer { margin: 55px 0 0; padding: 27px 30px; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; gap: 25px; color: #fff; background: linear-gradient(115deg, var(--navy), #075b62); }.article-footer span, .article-footer strong { display: block; }.article-footer div > span { color: var(--aqua); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }.article-footer strong { margin-top: 6px; font-size: 15px; }.article-footer > a { white-space: nowrap; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 750; }.article-footer > a span { display: inline; margin-left: 8px; }
.preview-banner { align-items:center; background:#102f3c; color:#fff; display:flex; gap:14px; justify-content:center; padding:12px 24px; position:sticky; top:73px; z-index:40; }.preview-banner strong { color:var(--aqua); }.preview-banner span { color:rgba(255,255,255,.72); font-size:13px; }.preview-banner button { background:rgba(255,255,255,.12); border:0; border-radius:9px; color:#fff; cursor:pointer; padding:7px 12px; }

@media (max-width: 920px) {
  .check-hero { grid-template-columns: 1fr; gap: 45px; padding-top: 60px; }
  .hero-copy { max-width: 720px; }
  .check-card { width: min(100%, 560px); }
  .check-hero::before { display: none; }
}

@media (max-width: 640px) {
  .header-inner, .footer-inner, .check-hero, .article-shell { width: min(100% - 30px, 1180px); }
  .header-inner { min-height: 68px; gap: 12px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark::before { left: 9px; top: 14px; }
  .brand-mark::after { left: 15px; top: 9px; }
  .main-nav { gap: 2px; }
  .main-nav a { padding: 9px 9px; font-size: 11px; }

  .check-hero { min-height: auto; padding: 46px 0 35px; gap: 34px; }
  .hero-copy h1 { margin: 19px 0; font-size: 46px; }
  .hero-lead { font-size: 16px; }
  .trust-list { gap: 12px 18px; margin-top: 25px; }
  .check-card { padding: 27px 21px; border-radius: 24px; }
  .check-card-icon { right: 22px; top: 24px; }
  .check-card-head h2 { font-size: 24px; }
  .privacy-note { align-items: flex-start; text-align: center; }

  .article-shell { margin-top: 32px; }
  .back-link { margin-bottom: 20px; }
  .article-frame { padding: 23px 18px 27px; border-radius: 23px; box-shadow: 0 16px 38px rgba(11,49,66,.09); }
  .article-header { margin-bottom: 24px; padding-bottom: 21px; }
  .article-header h1 { margin-top: 14px; font-size: 39px; }
  .article-header > p { font-size: 16px; }
  .article-meta { gap: 6px; }
  .article-meta span { min-height: 25px; padding: 6px 9px; font-size: 10px; }
  .article-cover { margin-bottom: 28px; border-radius: 20px; }
  .article-body { padding: 0; font-size: 16px; }
  .article-body iframe { margin: 24px 0; border-radius: 14px; }
  .related-materials { margin-top: 38px; padding-top: 22px; }
  .related-materials__head h2 { font-size: 21px; }
  .related-materials__grid { grid-template-columns: 1fr; gap: 14px; }
  .related-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
  .related-card__image { height: 100%; min-height: 112px; aspect-ratio: auto; }
  .related-card__body { align-self: center; padding: 14px; }
  .related-card h3 { font-size: 15px; }
  .article-footer { align-items: stretch; flex-direction: column; padding: 23px; }
  .article-footer > a { text-align: center; }

  .footer-inner { min-height: 155px; align-items: flex-start; justify-content: center; flex-direction: column; }
  .footer-note { align-self: flex-start; }
}

@media (max-width: 390px) {
  .brand-mark { display: none; }
  .main-nav a { padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Rich material blocks */
.article-body .qm-format.qm-text-sm{font-size:.82em}.article-body .qm-format.qm-text-lg{font-size:1.24em;line-height:1.45}.article-body .qm-format.qm-text-xl{font-size:1.55em;font-weight:750;line-height:1.25}.article-body .qm-color-teal{color:#087f79}.article-body .qm-color-navy{color:var(--navy)}.article-body .qm-color-coral{color:#c9544c}.article-body .qm-color-muted{color:#708285}.article-body [class*="qm-highlight-"]{border-radius:.3em;padding:.08em .25em}.article-body .qm-highlight-mint{background:#dff6ef}.article-body .qm-highlight-sand{background:#fff0cf}.article-body .qm-highlight-rose{background:#ffe4e3}
.article-body .qm-callout,.article-body .qm-content-card{border-radius:18px;margin:28px 0;padding:23px 25px}.article-body .qm-callout>:first-child,.article-body .qm-content-card>:first-child{margin-top:0}.article-body .qm-callout>:last-child,.article-body .qm-content-card>:last-child{margin-bottom:0}.article-body .qm-callout{border-left:4px solid var(--teal)}.article-body .qm-callout--mint{background:#e8f7f2}.article-body .qm-callout--blue{background:#e8f2f7;border-color:#3e829c}.article-body .qm-callout--sand{background:#fff5dc;border-color:#d6a143}.article-body .qm-callout--rose{background:#ffebea;border-color:#d26761}.article-body .qm-shadow-soft{box-shadow:0 12px 28px rgba(17,58,61,.08)}
.article-body .qm-content-card{background:#fff;border:1px solid #d9e5e3;box-shadow:0 15px 38px rgba(17,58,61,.08)}.article-body .qm-card--soft{background:#f1f7f5}.article-body .qm-card--dark{background:#113b45;color:#eef8f7}.article-body .qm-card--dark h1,.article-body .qm-card--dark h2,.article-body .qm-card--dark h3{color:#fff}
.article-body .qm-columns{display:grid;gap:20px;grid-template-columns:1fr 1fr;margin:30px 0}.article-body .qm-columns--wide-left{grid-template-columns:2fr 1fr}.article-body .qm-columns--wide-right{grid-template-columns:1fr 2fr}.article-body .qm-column{background:#fbfdfc;border:1px solid #dce8e6;border-radius:16px;min-width:0;padding:19px}.article-body .qm-column>:first-child{margin-top:0}.article-body .qm-column>:last-child{margin-bottom:0}
.article-body .qm-action-button{background:linear-gradient(120deg,#087f79,#0b6768);border-radius:12px;box-shadow:0 10px 22px rgba(8,127,121,.2);color:#fff;display:inline-flex;font-size:14px;font-weight:800;margin:18px 0;padding:12px 19px;text-decoration:none;transition:transform .2s,box-shadow .2s}.article-body .qm-action-button:hover{color:#fff;transform:translateY(-2px);box-shadow:0 14px 28px rgba(8,127,121,.25)}.article-body .qm-button--outline{background:#fff;border:1px solid #0b8880;box-shadow:none;color:#087f79}.article-body .qm-button--outline:hover{color:#087f79}.article-body .qm-button--light{background:#e5f5f0;box-shadow:none;color:#087f79}.article-body .qm-button--light:hover{color:#087f79}
@media(max-width:640px){.article-body .qm-columns,.article-body .qm-columns--wide-left,.article-body .qm-columns--wide-right{grid-template-columns:1fr;gap:12px;margin:22px 0}.article-body .qm-callout,.article-body .qm-content-card{border-radius:15px;margin:22px 0;padding:18px}.article-body .qm-column{padding:16px}.article-body .qm-format.qm-text-xl{font-size:1.35em}}

/* Structured material blocks — 0.16.3 */
.article-body .qm-quote,.article-body .qm-checklist,.article-body .qm-steps,.article-body .qm-banner{border-radius:18px;margin:28px 0;padding:24px 27px}.article-body .qm-quote>:first-child,.article-body .qm-checklist>:first-child,.article-body .qm-steps>:first-child,.article-body .qm-banner>:first-child{margin-top:0}.article-body .qm-quote>:last-child,.article-body .qm-checklist>:last-child,.article-body .qm-steps>:last-child,.article-body .qm-banner>:last-child{margin-bottom:0}
.article-body .qm-quote{background:#f7faf9;border-left:4px solid var(--teal);font-size:1.08em}.article-body .qm-quote--mint{background:#e8f7f2}.article-body .qm-quote--dark{background:#123d45;border-color:#56c7ba;color:#fff}.article-body .qm-quote--dark p{color:#fff}
.article-body .qm-checklist,.article-body .qm-steps{background:#fff;border:1px solid #d9e5e3}.article-body .qm-checklist ul,.article-body .qm-steps ol{list-style:none;padding-left:0}.article-body .qm-checklist li,.article-body .qm-steps li{margin:.65em 0;position:relative}.article-body .qm-checklist li{padding-left:31px}.article-body .qm-checklist li::before{align-items:center;background:#daf4ed;border-radius:50%;color:#087f79;content:"✓";display:flex;font-size:12px;font-weight:900;height:21px;justify-content:center;left:0;position:absolute;top:.16em;width:21px}.article-body .qm-steps{counter-reset:qm-step}.article-body .qm-steps li{counter-increment:qm-step;padding-left:42px}.article-body .qm-steps li::before{align-items:center;background:#0b8079;border-radius:10px;color:#fff;content:counter(qm-step);display:flex;font-size:12px;font-weight:900;height:30px;justify-content:center;left:0;position:absolute;top:.02em;width:30px}
.article-body .qm-banner{background:linear-gradient(125deg,#0d4e56,#087f79);color:#fff}.article-body .qm-banner h1,.article-body .qm-banner h2,.article-body .qm-banner h3,.article-body .qm-banner p{color:#fff}.article-body .qm-banner>p:first-child{font-size:11px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}.article-body .qm-banner--light{background:#edf7f4;color:#123d45}.article-body .qm-banner--light h1,.article-body .qm-banner--light h2,.article-body .qm-banner--light h3,.article-body .qm-banner--light p{color:#123d45}.article-body .qm-banner--sand{background:#fff1d5;color:#493c25}.article-body .qm-banner--sand h1,.article-body .qm-banner--sand h2,.article-body .qm-banner--sand h3,.article-body .qm-banner--sand p{color:#493c25}
@media(max-width:640px){.article-body .qm-quote,.article-body .qm-checklist,.article-body .qm-steps,.article-body .qm-banner{border-radius:15px;margin:22px 0;padding:18px}}
.article-body .qm-shadow-none{box-shadow:none!important}.article-body .qm-shadow-soft{box-shadow:0 12px 28px rgba(17,58,61,.09)!important}.article-body .qm-shadow-strong{box-shadow:0 20px 48px rgba(17,58,61,.18)!important}.article-body .qm-radius-small{border-radius:7px!important}.article-body .qm-radius-medium{border-radius:18px!important}.article-body .qm-radius-large{border-radius:30px!important}

/* Base editor containers — 0.17.0 */
.article-body .qm-container{display:flex;gap:20px;margin:28px 0;padding:24px}.article-body .qm-container--column{flex-direction:column}.article-body .qm-container--row{align-items:stretch;flex-direction:row}.article-body .qm-container--row>*{flex:1;min-width:0}.article-body .qm-container>:first-child{margin-top:0}.article-body .qm-container>:last-child{margin-bottom:0}
@media(max-width:640px){.article-body .qm-container{gap:12px;margin:22px 0;padding:18px}.article-body .qm-container--row{flex-direction:column}}

/* Compact certificate entry — 0.15.5 */
.check-hero{grid-template-columns:minmax(0,.78fr) minmax(430px,1fr);gap:60px;min-height:590px;padding:52px 0 48px}.hero-copy h1{font-size:clamp(42px,5vw,62px);margin:17px 0}.hero-lead{font-size:16px;line-height:1.5}.trust-list{margin-top:26px}.check-card{border-color:rgba(11,143,138,.16);box-shadow:0 24px 58px rgba(11,73,76,.17);padding:40px}.check-card-head h2{font-size:31px}.input-wrap input{border-width:2px}.primary-button{min-height:58px}
@media(max-width:920px){.check-hero{display:flex;flex-direction:column;gap:24px;min-height:auto;padding:30px 0 38px}.check-card{max-width:620px;order:-1;width:100%}.hero-copy{max-width:620px}.hero-copy h1{font-size:38px;line-height:1.02;margin:12px 0}.hero-lead{font-size:14px}.trust-list{margin-top:18px}}
@media(max-width:640px){.check-hero{gap:18px;padding:18px 0 28px}.check-card{border-radius:22px;padding:24px 20px}.check-card-icon{height:38px;right:20px;top:20px;width:38px}.check-card-head h2{font-size:25px;margin-top:7px}.check-card-head p{font-size:12px;margin-bottom:20px}.input-wrap input{height:54px}.primary-button{min-height:55px}.hero-copy .kicker{font-size:10px}.hero-copy h1{font-size:29px;margin:9px 0}.hero-lead{font-size:13px;line-height:1.45}.trust-list{gap:8px 14px;margin-top:14px}.trust-list span{font-size:11px}.trust-list b{height:18px;width:18px}}

/* Product program modal typography */

.product-dialog__rich-text {
  max-width: 780px;
  margin: 0 auto;
  padding: 2px 4px 24px;
  font-size: 16px;
  line-height: 1.68;
  color: #294750;
}

.product-dialog__rich-text h2 {
  margin: 34px 0 18px;
  color: var(--navy);
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.product-dialog__rich-text h2:first-child {
  margin-top: 4px;
}

.product-dialog__rich-text h3 {
  margin: 26px 0 12px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.product-dialog__rich-text p {
  margin: 0 0 15px;
}

.product-dialog__rich-text ul,
.product-dialog__rich-text ol {
  margin: 14px 0 22px;
  padding-left: 25px;
}

.product-dialog__rich-text li {
  margin: 8px 0;
}

.product-dialog__rich-text a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-dialog__rich-text strong {
  color: var(--navy);
}

@media (max-width: 640px) {
  .product-dialog__rich-text {
    padding: 0 2px 20px;
    font-size: 15px;
    line-height: 1.62;
  }

  .product-dialog__rich-text h2 {
    margin-top: 28px;
    font-size: 23px;
  }

  .product-dialog__rich-text h3 {
    margin-top: 22px;
    font-size: 18px;
  }
}

/* ===== Certificate card — final refinement ===== */

/* Карточка выровнена по ширине с библиотекой, но остаётся компактной по высоте. */
.library-page .library-hero {
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 0;
  padding: 0;
}

.library-page .library-access {
  width: 100%;
  max-width: none;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(153,238,220,.15), transparent 26%),
    linear-gradient(135deg, #145969 0%, #25777c 56%, #318c87 100%);
  box-shadow: 0 16px 36px rgba(8,44,58,.15), inset 0 1px 0 rgba(255,255,255,.07);
}

/* Статус */
.library-access__status {
  gap: 11px;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom-color: rgba(255,255,255,.14);
}

.library-access__status small {
  color: rgba(215,255,247,.83);
  font-size: 10px;
}

.library-access__status strong {
  margin-top: 2px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

/* Номер / продукт / срок — отдельные компактные акцентные блоки */
.library-access dl {
  display: grid;
  grid-template-columns: .9fr 1.35fr .9fr;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.library-access dl > div {
  min-width: 0;
  padding: 11px 13px 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(255,255,255,.085);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

/* Продукт — основной смысловой акцент */
.library-access dl > div:nth-child(2) {
  border-color: rgba(170,242,225,.24);
  background: rgba(169,237,222,.12);
}

.library-access dt {
  margin: 0 0 5px;
  color: rgba(225,255,248,.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.library-access dd {
  margin: 0;
  overflow: visible;
  color: #fff;
  font-size: 21px;
  font-weight: 820;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
}

.library-access dl > div:nth-child(1) dd {
  font-size: 23px;
  letter-spacing: -.03em;
}

.library-access dl > div:nth-child(2) dd {
  color: #f2fffb;
  font-size: 20px;
}

.library-access dl > div:nth-child(3) dd {
  color: #e5fff7;
  font-size: 22px;
}

/* Краткое описание */
.library-access__product-description {
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  color: rgba(246,255,252,.94);
  font-size: 14px;
  line-height: 1.5;
}

/* Кнопка "Подробнее" */
.library-access__program-button {
  min-height: 52px;
  margin-top: 8px;
  padding: 10px 12px 10px 15px;
  border-color: rgba(145,237,216,.30);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,239,215,.14), rgba(255,255,255,.055));
  box-shadow: 0 8px 20px rgba(4,29,36,.10), inset 0 1px 0 rgba(255,255,255,.05);
}

.library-access__program-button:hover {
  transform: translateY(-1px);
  border-color: rgba(151,242,220,.50);
  background: linear-gradient(135deg, rgba(139,239,215,.21), rgba(255,255,255,.085));
  box-shadow: 0 12px 25px rgba(4,29,36,.15), inset 0 1px 0 rgba(255,255,255,.07);
}

/* Стрелка вместо "+" — явный переход к подробностям */
.library-access__program-button-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.library-access__program-button-arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.library-access__program-button:hover .library-access__program-button-arrow {
  transform: translateX(2px);
  border-color: rgba(175,246,230,.25);
  background: rgba(169,239,223,.20);
}

/* Планшет */
@media (max-width: 900px) {
  .library-page .library-hero {
    width: calc(100% - 32px);
  }

  .library-page .library-access {
    padding: 18px 17px 16px;
  }

  .library-access dl {
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
  }

  .library-access dd,
  .library-access dl > div:nth-child(1) dd,
  .library-access dl > div:nth-child(2) dd,
  .library-access dl > div:nth-child(3) dd {
    font-size: 18px;
  }
}

/* Телефон: 2 компактных блока сверху + срок на всю ширину */
@media (max-width: 640px) {
  .library-page .library-hero {
    width: calc(100% - 24px);
    margin-top: 14px;
  }

  .library-page .library-access {
    padding: 15px 13px 13px;
    border-radius: 18px;
  }

  .library-access__status {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .library-access__status strong {
    font-size: 13px;
  }

  .library-access dl {
    grid-template-columns: 1fr 1.35fr;
    gap: 7px;
    margin-bottom: 11px;
  }

  .library-access dl > div {
    padding: 9px 10px 10px;
    border-radius: 12px;
  }

  .library-access dl > div:last-child {
    grid-column: 1 / -1;
  }

  .library-access dt {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .library-access dd,
  .library-access dl > div:nth-child(1) dd,
  .library-access dl > div:nth-child(2) dd,
  .library-access dl > div:nth-child(3) dd {
    font-size: 16px;
    line-height: 1.15;
  }

  .library-access dl > div:nth-child(1) dd {
    font-size: 18px;
  }

  .library-access__product-description {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.45;
  }

  .library-access__program-button {
    min-height: 48px;
    margin-top: 7px;
    padding: 9px 10px 9px 12px;
    font-size: 13px;
    border-radius: 13px;
  }

  .library-access__program-button-arrow {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .library-access__program-button-arrow svg {
    width: 15px;
    height: 15px;
  }
}

/* Audio player */
.article-body .qmedic-audio-player { margin:28px 0; padding:18px 20px 20px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(135deg,#f1faf7,#fbfdfc); box-shadow:var(--shadow-sm); }
.article-body .qmedic-audio-player__title { display:flex; align-items:center; gap:10px; margin:0 0 12px; color:var(--navy); font-size:14px; font-weight:800; line-height:1.35; }
.article-body .qmedic-audio-player__icon { display:inline-flex; align-items:center; justify-content:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; background:var(--teal); color:#fff; font-size:17px; }
.article-body .qmedic-audio-player audio { display:block; width:100%; max-width:100%; }
@media (max-width:640px) { .article-body .qmedic-audio-player { margin:22px 0; padding:15px 14px 16px; border-radius:15px; } .article-body .qmedic-audio-player__title { font-size:13px; } }
/* Rich article tables — 0.23.32 */
.article-body{
  min-width:0;
}
.article-body table.qm-table{
  max-width:100%;
}
.article-body table.qm-table th,
.article-body table.qm-table td{
  min-width:92px;
}
.article-body table.qm-table-border-none th,
.article-body table.qm-table-border-none td{
  border:0;
}
.article-body table.qm-table-border-thin th,
.article-body table.qm-table-border-thin td{
  border-style:solid;
  border-width:1px;
}
.article-body table.qm-table-border-medium th,
.article-body table.qm-table-border-medium td{
  border-style:solid;
  border-width:2px;
}
.article-body table.qm-table-border-color-line th,
.article-body table.qm-table-border-color-line td{
  border-color:var(--line);
}
.article-body table.qm-table-border-color-teal th,
.article-body table.qm-table-border-color-teal td{
  border-color:#74bdb5;
}
.article-body table.qm-table-border-color-dark th,
.article-body table.qm-table-border-color-dark td{
  border-color:#647578;
}
.article-body table.qm-table-density-compact th,
.article-body table.qm-table-density-compact td{
  padding:7px 8px;
}
.article-body table.qm-table-density-normal th,
.article-body table.qm-table-density-normal td{
  padding:11px;
}
.article-body table.qm-table-density-spacious th,
.article-body table.qm-table-density-spacious td{
  padding:15px 16px;
}
.article-body table.qm-table-width-full{
  width:100%;
}
.article-body table.qm-table-width-content{
  width:max-content;
}
.article-body td.qm-cell-va-top,
.article-body th.qm-cell-va-top{
  vertical-align:top;
}
.article-body td.qm-cell-va-middle,
.article-body th.qm-cell-va-middle{
  vertical-align:middle;
}
.article-body td.qm-cell-va-bottom,
.article-body th.qm-cell-va-bottom{
  vertical-align:bottom;
}
@media(max-width:700px){
  .article-body{
    -webkit-overflow-scrolling:touch;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
  }
}
/* Persisted column widths — 0.23.32 */
.article-body table:has(th[style*="width"],td[style*="width"]){
  table-layout:fixed;
}
/* MAX bot shortcut — 0.23.34 */
.smed-max-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(11, 49, 66, .10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(11, 49, 66, .16);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.smed-max-button img {
  display: block;
  width: 36px;
  height: 36px;
}
.smed-max-button:hover {
  border-color: rgba(11, 143, 138, .28);
  box-shadow: 0 16px 38px rgba(11, 49, 66, .20);
  transform: translateY(-2px);
}
.smed-max-button:focus-visible {
  outline: 3px solid rgba(11, 143, 138, .28);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .smed-max-button {
    right: 14px;
    bottom: 14px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }
  .smed-max-button img {
    width: 32px;
    height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .smed-max-button {
    transition: none;
  }
  .smed-max-button:hover {
    transform: none;
  }
}
