/* ============================================================
   Suga.health — shared design system
   Concept: "The Annotated Chart" — clinical paper, ink type,
   one pen accent, red dotted proof-marks, handwritten notes.
   ============================================================ */

@import url('fonts.css'); /* self-hosted Archivo + Public Sans + Caveat */

/* ---------- tokens ---------- */
:root {
  --paper: #FBFAF6;
  --paper-2: #F4F1E9;
  --card: #FFFFFE;
  --ink: #191813;
  --ink-soft: #57544A;
  --ink-faint: #8A867A;
  --pen: #C2410C;
  --pen-deep: #9A3409;
  --proof: #DF2E2A;
  --vital: #2E6B44;
  --vital-bg: #EAF2EC;
  --ink-bg: #171610;
  --ink-bg-2: #211F17;
  --rule: #E3DFD2;
  --rule-dark: #37342A;
  --shadow: 0 1px 2px rgba(25, 24, 19, .05), 0 8px 24px -12px rgba(25, 24, 19, .18);
  --radius: 10px;
  --font-display: 'Archivo', 'Arial Black', sans-serif;
  --font-body: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --font-pen: 'Caveat', 'Segoe Script', cursive;
  --container: 1160px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--pen); text-underline-offset: 3px; }
a:hover { color: var(--pen-deep); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.08; font-family: var(--font-display); font-weight: 800; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2.5px solid var(--pen); outline-offset: 2px; border-radius: 3px; }
::selection { background: #F5D8C8; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- typography helpers ---------- */
.display { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; }
h1.display { font-size: clamp(2.9rem, 6.4vw, 5.4rem); line-height: 1.02; }
h2.display { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 46ch; }
.small { font-size: .875rem; color: var(--ink-faint); }

/* red dotted proof-mark — ONE word per big headline (::after dots so it can draw in) */
.u-proof {
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.u-proof::after {
  content: '';
  position: absolute;
  left: 1%;
  bottom: .02em;
  height: .09em;
  width: 97%;
  background-image: radial-gradient(circle, var(--proof) 38%, transparent 44%);
  background-size: .18em .09em;
  background-repeat: repeat-x;
  background-position: left center;
}

/* handwritten pen annotation */
.pen-note {
  font-family: var(--font-pen);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--pen);
  line-height: 1.25;
  transform: rotate(-2deg);
  display: inline-block;
}
.pen-note--flat { transform: none; }

/* chart field label */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-body);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .17em; text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
}
.eyebrow::after { content: ''; flex: 0 0 44px; height: 1px; background: var(--rule); }
.eyebrow--pen { color: var(--pen); }

/* ink stamp */
.stamp {
  display: inline-block;
  font-family: var(--font-body); font-weight: 700;
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--vital); border: 2.5px solid var(--vital);
  padding: 7px 16px; border-radius: 6px;
  transform: rotate(-4deg);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Crect width='120' height='40' fill='white'/%3E%3C/svg%3E");
  opacity: .92;
}
.stamp--pen { color: var(--pen); border-color: var(--pen); }

/* ---------- layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--ink-bg); color: #F2EFE6; }
.section--dark h2, .section--dark h3 { color: #F7F4EB; }
.section--dark .lede { color: #B9B4A4; }
.section--tight { padding: 64px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-left: auto; margin-right: auto; }
.center .eyebrow { justify-content: center; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 250, 246, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; gap: 3px; }
.brand-word {
  font-family: var(--font-display); font-weight: 800; font-stretch: 110%;
  font-size: 1.45rem; color: var(--ink); letter-spacing: -.02em;
  text-decoration: underline dotted var(--proof);
  text-decoration-thickness: .08em; text-underline-offset: .16em;
}
.brand-tag { font-family: var(--font-pen); font-weight: 600; font-size: .95rem; color: var(--pen); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--proof); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); border-radius: 8px;
  padding: 9px 11px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--pen); color: #FFF9F4; border: 1.5px solid var(--pen);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { background: var(--pen-deep); border-color: var(--pen-deep); color: #FFF9F4; transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(194, 65, 12, .55); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 17px 36px; font-size: 1.08rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.28rem; }

/* patient-chart card */
.chart-card {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: 4px 4px 0 rgba(25, 24, 19, .1);
  overflow: hidden;
}
.chart-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.chart-card__head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--proof); flex: 0 0 auto; }
.chart-card__body { padding: 24px 22px; }
.chart-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 2px; border-bottom: 1px dashed var(--rule);
}
.chart-row:last-child { border-bottom: none; }
.chart-row .k { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.chart-row .v { font-weight: 600; text-align: right; }
.chart-row .v--pen { font-family: var(--font-pen); font-weight: 600; font-size: 1.35rem; color: var(--pen); }

/* numbered process step (only for true sequences) */
.step { position: relative; padding: 28px 24px 24px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.step__num {
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%;
  font-size: .95rem; color: var(--pen);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.step__num::after { content: ''; width: 34px; height: 1px; background: var(--rule); }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* stat */
.stat { padding: 8px 0; }
.stat .n { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; }
.stat .l { color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
.section--dark .stat .l { color: #B9B4A4; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px;
  padding: 7px 15px; font-size: .9rem; font-weight: 500; color: var(--ink-soft);
}
.chip--on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 22px 4px; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--pen); transition: transform .25s ease; flex: 0 0 auto; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 4px 24px; color: var(--ink-soft); max-width: 68ch; }

/* ---------- forms ---------- */
.field { margin-bottom: 22px; }
.label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.label .req { color: var(--proof); }
.hint { font-size: .85rem; color: var(--ink-faint); margin-top: 6px; }
.input, .select, textarea.input {
  width: 100%; font-family: var(--font-body); font-size: 1.02rem; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--rule); border-radius: 8px;
  padding: 13px 15px; transition: border-color .15s ease;
}
.input:hover, .select:hover { border-color: var(--ink-faint); }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--pen); box-shadow: 0 0 0 3px rgba(194, 65, 12, .12); }
.input::placeholder { color: var(--ink-faint); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
.input--err { border-color: var(--proof); }
.err-msg { color: var(--proof); font-size: .85rem; font-weight: 500; margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* segmented control (sex, units, goal) */
.seg { display: flex; gap: 0; border: 1.5px solid var(--rule); border-radius: 999px; padding: 4px; background: var(--card); width: fit-content; }
.seg button {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; color: var(--ink-soft);
  padding: 9px 20px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* selectable option cards */
.opt-card {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 18px 18px; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.opt-card:hover { border-color: var(--ink-faint); }
.opt-card[aria-pressed="true"] { border-color: var(--pen); box-shadow: 0 0 0 1.5px var(--pen), var(--shadow); }
.opt-card .t { font-weight: 700; }
.opt-card .d { color: var(--ink-soft); font-size: .9rem; }

/* autocomplete + tag picker */
.tagbox { position: relative; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); border-radius: 999px;
  padding: 7px 8px 7px 14px; font-size: .9rem; font-weight: 500;
}
.tag .code { font-size: .72rem; opacity: .65; font-weight: 600; letter-spacing: .04em; }
.tag button {
  border: none; background: rgba(251, 250, 246, .18); color: var(--paper); cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; line-height: 1; font-size: .8rem; display: grid; place-items: center;
}
.tag button:hover { background: var(--proof); }
.ac-panel {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 260px; overflow: auto; padding: 6px;
}
.ac-item {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 7px; font-family: var(--font-body); font-size: .97rem; color: var(--ink);
}
.ac-item:hover, .ac-item.is-hl { background: var(--paper-2); }
.ac-item .code { font-size: .74rem; color: var(--ink-faint); font-weight: 600; letter-spacing: .05em; white-space: nowrap; }

/* consent row */
.consent {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; cursor: pointer;
}
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--pen); flex: 0 0 auto; cursor: pointer; }
.consent .t { font-weight: 600; }
.consent .d { font-size: .9rem; color: var(--ink-soft); }

/* ---------- wizard chrome ---------- */
.wizard-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.wizard-progress .bar { flex: 1; height: 4px; background: var(--rule); border-radius: 999px; overflow: hidden; }
.wizard-progress .bar i { display: block; height: 100%; background: var(--pen); border-radius: 999px; transition: width .4s ease; }
.wizard-progress .txt { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; }
.btn-back { background: none; border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: .98rem; color: var(--ink-soft); padding: 10px 6px; }
.btn-back:hover { color: var(--ink); }

/* live result callout (BMI / potential loss) */
.callout {
  border: 1.5px dashed var(--pen); border-radius: var(--radius);
  background: #FDF3EC; padding: 20px 22px;
}
.callout .pen-note { font-size: 1.5rem; }
.callout--vital { border-color: var(--vital); background: var(--vital-bg); }

/* ---------- footer ---------- */
.footer { background: var(--ink-bg); color: #B9B4A4; padding: 72px 0 40px; font-size: .93rem; }
.footer a { color: #DAD5C6; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer .brand-word { color: #F7F4EB; }
.footer h4 { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8A867A; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-legal { border-top: 1px solid var(--rule-dark); padding-top: 28px; display: grid; gap: 10px; font-size: .82rem; color: #8A867A; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 72px 0; }
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; }
  .nav-toggle { display: inline-flex; }
  .nav-cta-desktop { display: none; }
  .field-row { grid-template-columns: 1fr; }
}

/* ============================================================
   MOTION PACK — "the doctor annotates the page"
   Every effect gated behind html.m-on (added by JS only when
   prefers-reduced-motion is NOT set). No JS / reduced motion
   → everything is simply visible. Transform + opacity only.
   ============================================================ */

/* paper grain — tactile print feel */
.m-on body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* cross-fade page navigations (Chromium progressive enhancement) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .16s; }
::view-transition-new(root) { animation-duration: .26s; }

/* ---------- hero load sequence (.seq marked in markup, .is-seq added by JS) ---------- */
.m-on .is-seq .seq-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(.38em);
  animation: seqWord .6s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes seqWord { to { opacity: 1; transform: none; } }

/* the proof-mark draws itself left → right */
.m-on .is-seq h1 .u-proof::after {
  width: 0;
  animation: proofDraw .55s ease-out forwards;
  animation-delay: var(--proof-d, 1050ms);
}
@keyframes proofDraw { to { width: 97%; } }

/* supporting hero elements rise in after the headline */
.m-on .is-seq .eyebrow,
.m-on .is-seq .lede,
.m-on .is-seq .seq-late {
  opacity: 0;
  transform: translateY(14px);
  animation: seqRise .6s ease forwards;
}
.m-on .is-seq .eyebrow  { animation-delay: .05s; }
.m-on .is-seq .lede     { animation-delay: .55s; }
.m-on .is-seq .seq-late { animation-delay: .75s; }
@keyframes seqRise { to { opacity: 1; transform: none; } }

/* pen-note writes itself in */
.m-on .is-seq .pen-note {
  opacity: 0;
  clip-path: inset(-20% 100% -20% -4%);
  animation: penWrite .8s cubic-bezier(.4, 0, .3, 1) forwards;
  animation-delay: 1.35s;
}
@keyframes penWrite {
  0%   { opacity: 1; clip-path: inset(-20% 100% -20% -4%); }
  100% { opacity: 1; clip-path: inset(-20% -4% -20% -4%); }
}

/* the chart card lands, rows fill in, stamp thumps down */
.m-on .is-seq .chart-card {
  opacity: 0;
  transform: translateY(18px);
  animation: seqRise .65s ease forwards;
  animation-delay: .5s;
}
.m-on .is-seq .chart-row {
  opacity: 0;
  transform: translateY(7px);
  animation: seqRise .5s ease forwards;
  animation-delay: calc(.9s + var(--i, 0) * .12s);
}
.m-on .is-seq .stamp {
  opacity: 0;
  animation: stampThump .5s cubic-bezier(.2, 1.5, .35, 1) forwards;
  animation-delay: 1.7s;
}
@keyframes stampThump {
  0%   { opacity: 0; transform: rotate(-11deg) scale(1.8); }
  70%  { opacity: 1; }
  100% { opacity: .92; transform: rotate(-4deg) scale(1); }
}

/* ---------- ekg pulse divider ---------- */
.ekg { height: 56px; overflow: hidden; }
.ekg svg { width: 100%; height: 100%; display: block; }
.ekg path {
  fill: none;
  stroke: var(--pen);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}
.section--dark .ekg path { stroke: #C98E62; }
.m-on .ekg path {
  stroke-dasharray: 120 1400;
  stroke-dashoffset: 1520;
  animation: ekgTravel 4.2s linear infinite;
}
@keyframes ekgTravel { to { stroke-dashoffset: 0; } }

/* ---------- hover micro-interactions (pointer devices only) ---------- */
@media (hover: hover) {
  .card, .step {
    transition: transform .25s ease, box-shadow .25s ease;
  }
  .card:hover, .step:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 3px rgba(25, 24, 19, .05), 0 20px 44px -20px rgba(25, 24, 19, .28);
  }
  .chart-card { transition: transform .25s ease, box-shadow .25s ease; }
  .chart-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 rgba(25, 24, 19, .12);
  }
  .nav-links a { position: relative; }
  .nav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background-image: radial-gradient(circle, var(--ink-faint) 38%, transparent 44%);
    background-size: 7px 3px;
    background-repeat: repeat-x;
    background-position: left center;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  .nav-links a:hover::after { transform: scaleX(1); }
  .nav-links a[aria-current="page"]::after { display: none; }
}

/* ---------- smooth FAQ expand (Chromium progressive enhancement) ---------- */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content {
    height: 0;
    overflow: clip;
    transition: height .32s ease, content-visibility .32s allow-discrete;
  }
  .faq details[open]::details-content { height: auto; }
}
