/* ==========================================================================
   Northstar
   A patient-first way to find clinical studies.
   Calm spruce ink on soft paper, sea-glass and mist tints, a terracotta accent, light display type.
   Timeless edition: Timeless Serif headlines, Timeless Sans Grotesk text (timeless.co,
   Timeless Free Font License, see fonts/LICENSE.pdf).
   ========================================================================== */

@font-face { font-family: "Timeless Serif"; src: url("fonts/TimelessSerif-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Serif"; src: url("fonts/TimelessSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Sans Grotesk"; src: url("fonts/TimelessSans-GroteskRegular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Sans Grotesk"; src: url("fonts/TimelessSans-GroteskMedium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Sans Grotesk"; src: url("fonts/TimelessSans-GroteskSemibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Sans Grotesk"; src: url("fonts/TimelessSans-GroteskBold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --light:     #FDFCF9;
  --cream:     #F6F4EF;
  --cream-2:   #EEEBE4;
  --border:    #E9E5DD;
  --border-2:  #DAD5CB;

  --forest:    #173F43; /* spruce ink */
  --forest-2:  #20535A;
  --forest-70: rgba(23, 63, 67, .78);
  --forest-50: rgba(23, 63, 67, .70); /* still 4.6:1 on paper */
  --forest-30: rgba(23, 63, 67, .30);
  --forest-hover: #102F33;

  --mint:    #D3E8E5; /* sea glass */
  --sage:    #AFD5CF;
  --keylime: #E6F2EF; /* mist */
  --slate:   #BCCDDC;
  --slate-2: #E1E9F0;
  --blush:   #F4E8E1; /* pale clay */
  --mauve:   #B78A72;
  --mulberry:#7A3E26; /* terracotta accent */
  --link:    #146F6A;

  --go:      #1D6A4E;
  --go-bg:   #E2F1EA;
  --soon:    #2E5873;
  --soon-bg: #E1E9F0;
  --idle:    #5C605C;
  --idle-bg: #EEECE7;
  --stop:    #8A3A22;
  --stop-bg: #F6E7E0;

  --display: "Timeless Serif", ui-serif, Georgia, serif;
  --sans:    "Timeless Sans Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-xs: .5rem;
  --r-sm: .75rem;
  --r:    1rem;
  --r-lg: 1.5rem;

  --shadow-card: 0 1px 2px rgba(23, 63, 67, .04), 0 12px 32px -20px rgba(23, 63, 67, .28);
  --shadow-pop:  0 2px 6px rgba(23, 63, 67, .06), 0 24px 48px -18px rgba(23, 63, 67, .30);

  --ease: cubic-bezier(.215, .61, .355, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--light);
  color: var(--forest);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--sage); color: var(--forest); }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
.display {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -.035em;
}
.mono  { font-family: var(--mono); }
.muted { color: var(--forest-70); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 252, 249, .88);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 40px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--forest); color: var(--sage);
  display: grid; place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-word { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -.03em; line-height: 1; }
.site-nav { display: flex; gap: 28px; font-size: 16px; }
.site-nav a { text-decoration: none; color: var(--forest-70); transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--forest); }
.header-note { margin-left: auto; font-size: 14px; color: var(--forest-70); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--link); box-shadow: 0 0 0 3px rgba(20, 111, 106, .15); }
@media (max-width: 760px) { .site-nav, .header-note { display: none; } }

/* Phone menu: a two-line button that opens an opaque panel under the header */
.menu-btn { display: none; }
.site-menu { display: none; }
@media (max-width: 760px) {
  .menu-btn {
    all: unset; cursor: pointer; margin-left: auto;
    width: 40px; height: 40px; border-radius: var(--r-xs);
    display: grid; place-content: center; gap: 6px;
  }
  .menu-btn:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
  .menu-btn i { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--forest); transition: transform .2s var(--ease); }
  .menu-open .menu-btn i:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-btn i:last-child { transform: translateY(-4px) rotate(-45deg); }
  .site-menu:not([hidden]) {
    display: grid; padding: 8px 24px 16px;
    background: var(--light); border-top: 1px solid var(--border);
  }
  .site-menu a { padding: 12px 0; font-size: 18px; color: var(--forest-70); text-decoration: none; }
  .site-menu a + a { border-top: 1px solid var(--border); }
  .site-menu a[aria-current="page"] { color: var(--forest); font-weight: 500; }
  .menu-open { background: var(--light); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 1rem 1.5rem;
  border-radius: var(--r);
  border: 1px solid var(--forest);
  background: var(--forest); color: #fff;
  font-size: 16px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn:hover { background: var(--forest-hover); border-color: var(--forest-hover); }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }
.btn-secondary { background: transparent; color: var(--forest); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--cream); border-color: var(--forest-30); }
.btn-mint { background: var(--mint); border-color: var(--mint); color: var(--forest); }
.btn-mint:hover { background: var(--sage); border-color: var(--sage); }
.btn-sm { padding: 12px 1rem; font-size: 14px; border-radius: var(--r-sm); }
.btn-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-weight: 500; font-size: 16px; color: var(--link);
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-link svg { width: 14px; height: 14px; }

/* ---------- Tags (Ease-style soft fills) ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-xs);
  font-size: 14px; font-weight: 500; line-height: 1.1;
  white-space: nowrap;
  background: var(--cream-2); color: var(--forest);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-go    { background: var(--go-bg);   color: var(--go); }
.tag-soon  { background: var(--soon-bg); color: var(--soon); }
.tag-idle  { background: var(--idle-bg); color: var(--idle); }
.tag-stop  { background: var(--stop-bg); color: var(--stop); }
.tag-slate { background: var(--slate-2); }
.tag-mint  { background: var(--mint); }
.tag-line  { background: transparent; box-shadow: inset 0 0 0 1px var(--border-2); }
.tag-go .dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(29, 106, 78, .35); } 50% { box-shadow: 0 0 0 4px rgba(29, 106, 78, 0); } }

/* ---------- Glossary terms ---------- */
.term {
  all: unset; cursor: help;
  background-image: linear-gradient(var(--sage), var(--sage));
  background-size: 100% 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .2s var(--ease);
}
.term:hover, .term:focus-visible { background-size: 100% 100%; border-radius: 2px; }
.tip {
  position: fixed; z-index: 1000; max-width: 300px;
  padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--forest); color: #fff;
  font-size: 14px; line-height: 1.5;
  box-shadow: var(--shadow-pop);
  pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s var(--ease);
}
.tip.show { opacity: 1; transform: none; }
.tip b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: -.02em; color: var(--sage); margin-bottom: 2px; }

/* ---------- Combobox (autocomplete + custom dropdown, always opens below) ---------- */
.combo { position: relative; display: inline-block; }
.combo-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 100%; max-height: 320px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--light);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  z-index: 60;
  font-family: var(--sans); font-size: 16px; font-weight: 400; letter-spacing: 0; line-height: 1.3;
  color: var(--forest);
  display: none;
}
.combo.open .combo-menu { display: block; animation: drop .16s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.combo-menu li {
  padding: 10px 12px; border-radius: var(--r-xs); cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.combo-menu li small { color: var(--forest-50); font-size: 12px; }
.combo-menu li[aria-selected="true"], .combo-menu li:hover { background: var(--cream); }
.combo-menu li.check::after {
  content: ""; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.combo-menu .combo-note { cursor: default; color: var(--forest-50); font-size: 14px; }
.combo-menu .combo-note:hover { background: none; }

/* ==========================================================================
   Landing
   ========================================================================== */
.hero { padding: 88px 0 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--forest-70);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--sage); }
.hero h1 {
  margin: 22px 0 0; max-width: 1000px;
  font-size: clamp(52px, 7.6vw, 108px);
  line-height: 1.0;
}
.hero h1 .soft { color: var(--forest-30); margin-left: -.028em; } /* optical: the serif "i" starts .028em in from the T's crossbar; retune if the headline changes */
.hero-lede { max-width: 560px; margin: 40px 0 0; font-size: 20px; line-height: 1.5; color: var(--forest-70); }
/* Phones: a shorter hero so the search box starts on the first screen */
@media (max-width: 640px) {
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 44px; line-height: 1.04; }
  .hero h1 br { display: none; }
  .hero h1 .soft { margin-left: 0; }
  .hero h1 .soft::before { content: " "; }
  .hero-lede { margin-top: 20px; font-size: 16px; }
  .sentence { margin-top: 32px; padding-top: 24px; }
}

/* The sentence search */
.sentence {
  /* The box hangs into the margin by its own padding, so the words inside start on the same
     left edge as the headline. It shrinks on narrow screens to stay 8px clear of the window. */
  --hang: clamp(16px, (100vw - 1240px) / 2 - 8px, 40px);
  margin: 72px calc(-1 * var(--hang)) 0; padding: 36px var(--hang) 28px;
  /* The corner glow is a background, not a clipped pseudo-element, so the card never needs
     overflow: hidden and the autocomplete menu can hang below it. */
  background: radial-gradient(circle 140px at calc(100% - 60px) 60px, var(--keylime), transparent 70%), var(--cream);
  border-radius: var(--r-lg);
  position: relative; z-index: 3;
}
.sentence-line {
  position: relative; z-index: 2; margin: 0; /* above .sentence-foot so open menus cover the hint row */
  font-family: var(--display); font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.55; letter-spacing: -.03em;
  color: var(--forest-50);
}
/* Keeps the period attached to the city when the sentence wraps. */
.nobr { white-space: nowrap; }
.slot { display: inline-block; vertical-align: baseline; position: relative; max-width: 100%; }
.sentence-line .slot input { max-width: 100%; }
.slot input, .slot .slot-btn {
  font: inherit; letter-spacing: inherit; color: var(--forest);
  background: transparent; border: 0;
  border-bottom: 2px solid var(--forest-30);
  padding: 0 2px 2px; outline: none; font-weight: 400;
  transition: border-color .2s;
}
.slot input::placeholder { color: var(--forest-30); }
.slot input:focus, .slot .slot-btn:focus-visible, .combo.open .slot-btn { border-bottom-color: var(--forest); outline: none; border-radius: 0; }
.slot .slot-btn { cursor: pointer; display: inline-flex; align-items: baseline; gap: 10px; }
.slot .slot-btn svg { width: .36em; height: .36em; align-self: center; color: var(--forest-50); }
.slot-cond input { width: 11ch; }
.slot-loc input { width: 9ch; }
.sentence-foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border-2);
}
.sentence-foot .hint { font-size: 14px; color: var(--forest-70); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.locate {
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--link);
}
.locate:hover { text-decoration: underline; text-underline-offset: 4px; }
.locate svg { width: 16px; height: 16px; }

/* Marquee of live topics */
.marquee {
  overflow: hidden; padding: 22px 0;
  border-block: 1px solid var(--border);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 12px; width: max-content; will-change: transform; } /* moved by drift() in index.html */
.marquee .tag { font-size: 16px; padding: 12px 14px; text-decoration: none; transition: background .2s; }
.marquee .tag b { font-weight: 600; font-variant-numeric: tabular-nums; }
.marquee .tag:nth-child(4n+1) { background: var(--keylime); }
.marquee .tag:nth-child(4n+2) { background: var(--slate-2); }
.marquee .tag:nth-child(4n+3) { background: var(--cream-2); }
.marquee .tag:nth-child(4n+4) { background: var(--blush); }
.marquee .tag:hover { background: var(--sage); }

/* Stats */
.stats { padding: 72px 0 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .stats-grid { grid-template-columns: 1fr; } }
.stat { padding: 28px; border-radius: var(--r-lg); background: var(--cream); }
.stat .n { font-family: var(--display); font-weight: 300; font-size: clamp(48px, 5.4vw, 76px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: 14px; font-size: 16px; color: var(--forest-70); max-width: 260px; }
.stat:nth-child(2) { background: var(--keylime); }
.stat:nth-child(3) { background: var(--slate-2); }

/* Problem / solution */
.pairs { padding: 96px 0 40px; }
.section-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--forest-70); }
.section-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--sage); }
.section-title { margin: 16px 0 0; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.08; max-width: 900px; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }
@media (max-width: 820px) { .pair-grid { grid-template-columns: 1fr; } }
.pair { padding: 32px; border-radius: var(--r-lg); border: 1px solid var(--border); display: flex; flex-direction: column; }
.pair.after { background: var(--forest); color: #fff; border-color: var(--forest); }
.pair .lbl { font-size: 14px; font-weight: 500; color: var(--forest-50); }
.pair.after .lbl { color: var(--sage); }
.pair h3 { margin: 12px 0 20px; font-family: var(--display); font-weight: 300; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -.03em; }
.pair ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; font-size: 16px; }
.pair li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.pair li svg { width: 18px; height: 18px; margin-top: 2px; }
.pair.before li { color: var(--forest-70); }
.pair.before li svg { color: var(--mauve); }
.pair.after li svg { color: var(--sage); }
.pair .mono-ex {
  margin-top: auto; padding: 14px 16px; border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  background: var(--cream); color: var(--forest-70);
}
.pair.after .mono-ex { background: rgba(255, 255, 255, .08); color: #fff; font-family: var(--sans); font-size: 16px; }

/* Phases */
.phases { padding: 96px 0; }
.phase-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
@media (max-width: 900px) { .phase-track { grid-template-columns: 1fr 1fr; } }
.phase { padding: 26px 24px 24px; border-radius: var(--r-lg); background: var(--cream); display: flex; flex-direction: column; min-height: 280px; }
.phase:nth-child(1) { background: var(--keylime); }
.phase:nth-child(2) { background: var(--mint); }
.phase:nth-child(3) { background: var(--sage); }
.phase:nth-child(4) { background: var(--slate); }
.phase-num { font-family: var(--mono); font-size: 12px; color: var(--forest-70); }
.phase h3 { margin: 12px 0 8px; font-family: var(--display); font-weight: 300; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }
.phase p { margin: 0; font-size: 16px; color: var(--forest-70); }
.phase-people { display: flex; gap: 4px; margin-top: auto; padding-top: 22px; flex-wrap: wrap; }
.phase-people i { width: 6px; height: 6px; border-radius: 50%; background: var(--forest); opacity: .75; }
.phase-size { margin-top: 10px; font-size: 14px; color: var(--forest-70); font-variant-numeric: tabular-nums; }

/* Closing CTA */
.closing { padding: 24px 0 96px; }
.closing-card {
  padding: 72px 48px; border-radius: var(--r-lg);
  background: var(--forest); color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.closing-card::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%;
  background: radial-gradient(ellipse at 50% 100%, rgba(175, 213, 207, .28), transparent 60%);
}
.closing-card h2 { position: relative; margin: 0 auto; max-width: 760px; font-size: clamp(38px, 5vw, 68px); line-height: 1.05; }
.closing-card p { position: relative; margin: 18px auto 30px; max-width: 480px; color: rgba(255, 255, 255, .7); font-size: 16px; }
.closing-card .btn { position: relative; }
@media (max-width: 560px) { .closing-card { padding: 56px 24px; } .closing-card h2 { font-size: 32px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; font-size: 14px; color: var(--forest-70); background: var(--light); }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.site-footer p { margin: 10px 0 0; max-width: 640px; }
.site-footer a { color: var(--forest); }
.foot-meta { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } .foot-meta { text-align: left; } }

.rise { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) forwards; animation-delay: var(--at, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
  .marquee-track, .tag-go .dot { animation: none; }
}

/* ==========================================================================
   Results
   ========================================================================== */
.query-bar { border-bottom: 1px solid var(--border); background: var(--light); }
.query-bar .wrap { padding: 32px 0 20px; }
.query-sentence {
  position: relative; z-index: 2;
  margin: 0; font-family: var(--display); font-weight: 300;
  font-size: clamp(26px, 2.8vw, 38px); line-height: 1.45; letter-spacing: -.03em;
  color: var(--forest-50);
}
.query-sentence .slot input, .query-sentence .slot .slot-btn { border-bottom-width: 1.5px; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  border: 0; background: var(--cream-2);
  font-size: 14px; font-weight: 500; color: var(--forest); line-height: 1.1;
  cursor: pointer; transition: background .15s, color .15s;
  white-space: nowrap;
}
.chip:hover { background: var(--mint); }
.chip[aria-pressed="true"] { background: var(--forest); color: #fff; }
.chip svg { width: 12px; height: 12px; }
.chip-group-label { font-size: 14px; color: var(--forest-50); margin: 0 2px 0 10px; }
.chip-group-label:first-child { margin-left: 0; }
.age-field {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 12px; border-radius: var(--r-xs);
  background: var(--cream-2); font-size: 14px; font-weight: 500;
}
.age-field:focus-within { box-shadow: inset 0 0 0 1.5px var(--forest); }
.age-field input {
  width: 40px; border: 0; background: var(--light); border-radius: 6px;
  padding: 4px 6px; text-align: center; font: inherit; font-weight: 600; color: var(--forest); outline: none;
}
.age-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.divider-v { width: 1px; height: 20px; background: var(--border-2); margin: 0 4px; }
.filters-more { display: contents; } /* desktop: its chips sit in the main row */
.filters-toggle, .map-toggle { display: none; }
.filters-toggle .n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: inline-grid; place-items: center; background: var(--forest); color: #fff; font-size: 12px;
}
.filters-toggle .n[hidden] { display: none; }
.filters-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.combo-menu li small { margin-left: 4px; }
.combo-menu .combo-clear { color: var(--link); border-top: 1px solid var(--border); border-radius: 0 0 var(--r-xs) var(--r-xs); margin-top: 4px; }
.count-tools { display: flex; gap: 8px; flex-shrink: 0; }
.map-toggle svg { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .query-bar .wrap { padding: 20px 0 16px; }
  .filters { margin-top: 12px; }
  .filters-toggle { display: inline-flex; }
  .filters-more { display: none; }
  .filters.open .filters-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding-top: 8px; }
  .filters-more .divider-v { display: none; }
  .filters-more .chip-group-label { flex-basis: 100%; margin: 4px 0 0; }
  .map-toggle { display: inline-flex; }
  .count-line { flex-wrap: wrap; align-items: center; }
  .count-line h1 { font-size: 26px; flex-basis: 100%; }
  .study-card { padding: 20px; }
  .study-card h2 { font-size: 22px; }
}

.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 28px; padding: 28px 0 80px; }
@media (max-width: 1000px) {
  .results-layout { grid-template-columns: 1fr; padding-top: 20px; }
  .map-col { order: -1; }
  .map-sticky { position: relative !important; top: 0 !important; height: 320px !important; }
}
@media (max-width: 760px) {
  .map-col { display: none; order: 0; }
  .show-map .map-col { display: block; order: -1; }
}
.count-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.count-line h1 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 32px; letter-spacing: -.035em; line-height: 1.2; }
.count-line h1 .num { font-variant-numeric: proportional-nums; } /* tabular figures leave a gap after the serif's narrow 1 */
.count-line .muted { font-size: 14px; }

.study-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.study-card {
  position: relative; display: block;
  padding: 24px 26px 22px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color .25s, box-shadow .3s var(--ease), transform .3s var(--ease), background .25s;
  animation: rise .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.study-card:hover, .study-card.hot { border-color: var(--border-2); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.study-card.hot { background: #FAFCFB; box-shadow: var(--shadow-card), inset 0 0 0 1.5px var(--sage); }
.study-card.seen { animation: none; }
.study-card { scroll-margin-top: 88px; }
.tier-divider { padding: 28px 4px 8px; }
.tier-divider h2 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.tier-divider p { margin: 6px 0 0; max-width: 600px; font-size: 14px; color: var(--forest-70); }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.card-top .nct { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--forest-50); }
.study-card h2 {
  margin: 14px 0 6px; font-family: var(--display); font-weight: 300;
  font-size: 24px; line-height: 1.2; letter-spacing: -.03em; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sponsor { font-size: 14px; color: var(--forest-70); margin: 0; }
.card-summary {
  margin: 10px 0 0; font-size: 16px; color: var(--forest-70);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-facts {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--forest-70);
}
.card-facts > span { display: inline-flex; align-items: center; gap: 8px; }
.card-facts svg { width: 16px; height: 16px; color: var(--forest-50); flex-shrink: 0; }
.card-facts b { font-weight: 500; color: var(--forest); }

.map-sticky {
  position: sticky; top: 88px; height: calc(100vh - 112px);
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--cream);
}
#map { width: 100%; height: 100%; }
.map-legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 500;
  display: flex; gap: 14px; align-items: center;
  padding: 8px 12px; border-radius: var(--r-xs);
  background: rgba(253, 252, 249, .96); border: 1px solid var(--border);
  font-size: 12px; color: var(--forest-70);
}
.map-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* Leaflet overrides */
.leaflet-container { font-family: var(--sans); background: #EFEEE8; }
.leaflet-control-attribution { font-size: 10px; background: rgba(253, 252, 249, .85) !important; }
.leaflet-control-zoom { border: 1px solid var(--border-2) !important; border-radius: var(--r-sm) !important; overflow: hidden; }
.leaflet-control-zoom a { color: var(--forest) !important; }
.leaflet-popup-content-wrapper { border-radius: var(--r-sm); box-shadow: var(--shadow-pop); color: var(--forest); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.45; }
.leaflet-popup-content b { font-family: var(--display); font-weight: 400; font-size: 16px; letter-spacing: -.02em; display: block; margin-bottom: 2px; }
.leaflet-popup-content a { color: var(--link); }
.pin {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--forest); border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(23, 63, 67, .35);
  transition: transform .2s var(--ease), background .2s;
}
.pin.hot { background: var(--link); transform: scale(1.55); box-shadow: 0 0 0 6px rgba(175, 213, 207, .6); }
.pin.site { width: 12px; height: 12px; background: var(--go); }
.pin.site.off { background: #A7ABA2; }
.you-pin { width: 20px; height: 20px; border-radius: 50%; background: var(--mulberry); border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(122, 62, 38, .18); }

.load-more { display: flex; justify-content: center; margin-top: 22px; }

.state { padding: 56px 32px; text-align: center; background: var(--cream); border-radius: var(--r-lg); }
.state h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 300; font-size: 32px; letter-spacing: -.03em; }
.state p { margin: 0 auto; max-width: 440px; color: var(--forest-70); }
.state .btn { margin-top: 22px; }
.skeleton {
  height: 180px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--cream) 0%, #F9F8F4 50%, var(--cream) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   Study detail
   ========================================================================== */
.crumbs { padding: 24px 0 0; font-size: 14px; }
.crumbs a { color: var(--forest-70); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--forest); }
.crumbs svg { width: 14px; height: 14px; }

.study-hero { padding: 28px 0 48px; border-bottom: 1px solid var(--border); }
.study-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
@media (max-width: 980px) { .study-hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.study-hero h1 { margin: 16px 0 0; font-size: clamp(38px, 4.6vw, 62px); line-height: 1.04; text-wrap: balance; }
.study-hero h1.t-mid  { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; }
.study-hero h1.t-long { font-size: clamp(28px, 2.8vw, 38px); line-height: 1.12; }
.official { margin: 16px 0 0; font-size: 14px; color: var(--forest-70); max-width: 720px; }
.official summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--link); }
.official summary::-webkit-details-marker { display: none; }
.official summary svg { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.official[open] summary svg { transform: rotate(180deg); }
.official p { margin: 8px 0 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 14px; color: var(--forest-70); }
.hero-meta span b { font-weight: 500; color: var(--forest); }
.hero-meta .btn-link { font-size: inherit; }
.cond-list { margin: 12px 0 0; max-width: 720px; font-size: 14px; color: var(--forest-70); }
.cond-list b { font-weight: 500; color: var(--forest); }
.hero-meta .mono { font-size: 14px; }

.contact-card { padding: 26px; background: var(--forest); color: #fff; border-radius: var(--r-lg); }
.contact-card h2 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }
.contact-card > p { margin: 8px 0 18px; font-size: 14px; color: rgba(255, 255, 255, .7); }
.contact-person { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.contact-person strong { display: block; font-weight: 500; margin-bottom: 4px; }
.contact-person a { color: var(--sage); text-decoration: none; display: flex; align-items: center; gap: 8px; margin-top: 4px; word-break: break-all; }
.contact-person a:hover { text-decoration: underline; }
.contact-person svg { width: 12px; height: 12px; flex-shrink: 0; }
.contact-card .btn { width: 100%; margin-top: 16px; }
.contact-card .official-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, .7); text-decoration: none; }
.contact-card .official-link:hover { color: #fff; }
.contact-card .official-link svg { width: 12px; height: 12px; }

.study-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; padding: 48px 0 96px; }
@media (max-width: 980px) {
  /* The side TOC becomes a scrolling section bar pinned under the header */
  .study-body { grid-template-columns: 1fr; gap: 24px; padding-top: 0; }
  .study-body .toc {
    top: 68px; z-index: 40; margin: 0 calc(50% - 50vw); padding: 8px max(16px, calc(50vw - 50%));
    background: var(--light); border-bottom: 1px solid var(--border);
    overflow-x: auto; scrollbar-width: none;
  }
  .study-body .toc::-webkit-scrollbar { display: none; }
  .study-body .toc ol { display: flex; gap: 4px; width: max-content; }
  .study-body .toc a { white-space: nowrap; padding: 8px 12px; }
  .study-hero h1.t-mid, .study-hero h1.t-long { font-size: 30px; }
  .study-body .sec { scroll-margin-top: 136px; }
}
.toc { position: sticky; top: 100px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 8px 12px; border-radius: var(--r-xs);
  font-size: 14px; color: var(--forest-70); text-decoration: none;
  transition: color .2s, background .2s;
}
.toc a:hover { color: var(--forest); background: var(--cream); }
.toc a.on { color: var(--forest); background: var(--keylime); font-weight: 500; }

.sec { padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--border); scroll-margin-top: 96px; }
.sec:last-child { border-bottom: 0; margin-bottom: 0; }
.sec h2 { margin: 0 0 24px; font-family: var(--display); font-weight: 300; font-size: clamp(30px, 3vw, 40px); line-height: 1.08; letter-spacing: -.035em; }
.sec h3 { margin: 0 0 10px; font-family: var(--display); font-weight: 300; font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.prose { font-size: 16px; line-height: 1.7; color: var(--forest-70); max-width: 740px; }
.prose p { margin: 0 0 14px; }
.prose p:first-child { font-size: 20px; line-height: 1.55; color: var(--forest); }

.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 36px; }
/* One neutral fill: on study pages, color is saved for status */
.glance-tile { min-width: 0; padding: 20px 20px 20px; border-radius: var(--r-lg); background: var(--cream); }
.glance-tile .k { font-size: 14px; color: var(--forest-70); display: flex; align-items: center; gap: 8px; }
.glance-tile .k svg { width: 14px; height: 14px; }
.glance-tile .v {
  margin-top: 10px; font-family: var(--display); font-weight: 300; font-size: 28px; line-height: 1.12; letter-spacing: -.03em;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.glance-tile .v.long { font-size: 20px; line-height: 1.2; }
@media (max-width: 640px) { .glance-tile .v { font-size: 24px; } .glance-tile .v.long { font-size: 18px; } }
.glance-tile .s { margin-top: 6px; font-size: 14px; color: var(--forest-70); }

/* Eligibility */
.basics { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.basic { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; background: var(--cream); border-radius: var(--r); font-size: 16px; }
.basic .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--light); }
.basic .ic svg { width: 16px; height: 16px; }
.basic small { display: block; font-size: 12px; color: var(--forest-50); line-height: 1.2; }
.basic b { font-weight: 500; line-height: 1.25; }

/* Raw criteria fallback, when the record can't be split into a checklist */
.elig-col { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--light); }
.elig-raw { white-space: pre-wrap; padding: 24px; font-size: 16px; color: var(--forest-70); }

/* Checklist: one column, requirements first, then what rules you out */
.crit-group header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-2);
}
.crit-group h3 { margin: 0; font-size: 24px; }
.crit-group header p { margin: 4px 0 0; font-size: 14px; color: var(--forest-50); max-width: 560px; }
.crit-count { flex-shrink: 0; font-size: 14px; color: var(--forest-50); font-variant-numeric: tabular-nums; white-space: nowrap; }
.crit-none { margin: 16px 0 0; }

.crit { list-style: none; margin: 0; padding: 0; }
.crit li {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; column-gap: 16px; align-items: start;
  padding: 16px 0; font-size: 16px; line-height: 1.5; color: var(--forest-70);
}
.crit li + li { border-top: 1px solid var(--border); }
.crit li .txt { max-width: 68ch; }
.crit li.sub { padding-left: 32px; font-size: 14px; }
.crit li.head { color: var(--forest); font-weight: 500; padding: 24px 0 0; }
.crit li.head + li { border-top: 0; padding-top: 8px; }
.crit li.head + li.head { padding-top: 4px; }
.crit li:first-child.head { padding-top: 16px; }

/* Status dot: an empty ring until answered, then the answer's color */
.crit li .dot { width: 8px; height: 8px; margin: 8px 0 0 4px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--forest-30); transition: background .15s, box-shadow .15s; }
.crit li.head .dot { visibility: hidden; }
.crit li.is-fit    .dot { background: var(--go);   box-shadow: none; }
.crit li.is-block  .dot { background: var(--stop); box-shadow: none; }
.crit li.is-unsure .dot { background: var(--soon); box-shadow: none; }
.crit li.is-block .txt { color: var(--forest); }

/* Answer control: one segmented track per row */
.ans { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--cream); margin-top: -4px; }
.ans button {
  all: unset; cursor: pointer; text-align: center; min-width: 44px;
  padding: 6px 12px; border-radius: 8px; /* 32px tall with the track */
  font-size: 14px; font-weight: 500; line-height: 16px; color: var(--forest-50);
  transition: background .15s, color .15s, box-shadow .15s;
}
.ans button:hover { color: var(--forest); }
.ans button:focus-visible { outline: 2px solid var(--forest); outline-offset: 0; }
.ans [aria-pressed="true"] { background: var(--light); color: var(--forest); box-shadow: 0 1px 2px rgba(23, 63, 67, .12); }
.crit li.is-fit    .ans [aria-pressed="true"] { color: var(--go); }
.crit li.is-block  .ans [aria-pressed="true"] { color: var(--stop); }
.crit li.is-unsure .ans [aria-pressed="true"] { color: var(--soon); }
@media (max-width: 720px) {
  .crit li { grid-template-columns: 16px minmax(0, 1fr); row-gap: 12px; }
  .ans { grid-column: 2; justify-self: start; margin-top: 0; }
}

/* Summary card on the study page */
.check-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center;
  padding: 24px; border-radius: var(--r-lg); background: var(--cream);
}
.check-card h3 { margin: 0; font-size: 26px; }
.check-card[data-tone="block"] h3 { color: var(--stop); }
.check-card-main p { margin: 6px 0 0; max-width: 560px; font-size: 16px; color: var(--forest-70); }
.check-card .fit-bar { margin-top: 16px; max-width: 420px; }
.check-card[data-state="new"] .fit-bar { display: none; }
.check-card .check-meta { margin-top: 12px; font-size: 14px; color: var(--forest-50); }
.check-card-actions { display: grid; gap: 8px; justify-items: stretch; min-width: 240px; }
.check-card-actions .btn-link { justify-self: center; margin-top: 4px; }
.check-card-actions [hidden] { display: none; }
@media (max-width: 720px) { .check-card { grid-template-columns: 1fr; } .check-card-actions { min-width: 0; } }

/* The check itself: a drawer from the right, a full sheet on phones */
.drawer-root { position: fixed; inset: 0; z-index: 800; }
.drawer-root[hidden] { display: none; }
html.drawer-open { overflow: hidden; }
/* Scrim, matching ChatKit's modal scrim: neutral dark gray with a slight blur. Shared by the drawer and the doctor modal. */
.drawer-backdrop, .brief-backdrop { position: absolute; inset: 0; background: rgba(28, 28, 30, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .24s var(--ease); }
/* With the doctor modal on top, one scrim is enough */
html:has(.brief-root:not([hidden])) .drawer-backdrop { opacity: 0; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 100vw);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--light); box-shadow: var(--shadow-pop); outline: none;
  transform: translateX(100%); transition: transform .28s var(--ease);
}
.drawer-root.in .drawer-backdrop { opacity: 1; }
.drawer-root.in .drawer { transform: none; }
.drawer-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: grid; gap: 16px; }
.drawer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.drawer-head h2 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 28px; letter-spacing: -.03em; }
.drawer-close { all: unset; cursor: pointer; width: 36px; height: 36px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--forest-70); }
.drawer-close:hover { background: var(--cream); color: var(--forest); }
.drawer-close:focus-visible { outline: 2px solid var(--forest); }
.drawer-close svg { width: 16px; height: 16px; }
.drawer-count { font-size: 14px; color: var(--forest-50); font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer-body { overflow-y: auto; overscroll-behavior: contain; padding: 32px 24px; }
.drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }
.drawer-foot .btn:disabled { opacity: .4; cursor: default; }

/* For My Doctor: a large modal holding the printable brief */
.brief-root { position: fixed; inset: 0; z-index: 850; display: grid; place-items: center; padding: 24px; }
.brief-root[hidden] { display: none; }
.brief-modal {
  position: relative; width: min(960px, 100%); height: min(100%, 1200px);
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--light); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; outline: none;
  opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .2s var(--ease), transform .24s var(--ease);
}
.brief-root.in .brief-backdrop { opacity: 1; }
.brief-root.in .brief-modal { opacity: 1; transform: none; }
.brief-modal-head { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding: 20px 72px 20px 24px; border-bottom: 1px solid var(--border); }
.brief-close { position: absolute; top: 16px; right: 16px; }
.brief-modal-title h2 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 28px; letter-spacing: -.03em; }
.brief-modal-title p { margin: 4px 0 0; font-size: 14px; color: var(--forest-50); }
.brief-modal-tools { display: flex; align-items: center; gap: 8px; }
.brief-modal-body { overflow-y: auto; overscroll-behavior: contain; background: var(--cream); }
.brief-modal-body .sheet { margin: 24px auto; }
@media (max-width: 640px) {
  .brief-root { padding: 0; }
  .brief-modal { height: 100%; border-radius: 0; }
  .brief-modal-tools { flex-wrap: wrap; width: 100%; }
  .brief-modal-head { padding-right: 24px; }
  .brief-modal-title { padding-right: 48px; }
}
@media print {
  html.print-brief body > *:not(.brief-root) { display: none !important; }
  html.print-brief .brief-root { position: static; display: block !important; padding: 0; }
  html.print-brief .brief-backdrop, html.print-brief .brief-modal-head { display: none; }
  html.print-brief .brief-modal { position: static; width: auto; height: auto; overflow: visible; box-shadow: none; border-radius: 0; opacity: 1; transform: none; display: block; }
  html.print-brief .brief-modal-body { overflow: visible; background: #fff; }
}

/* Elevated pill: white segment on a gray track, for peer views */
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--cream-2); }
.seg button { all: unset; cursor: pointer; white-space: nowrap; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--forest-70); }
.seg button[aria-selected="true"] { background: var(--light); color: var(--forest); box-shadow: 0 1px 2px rgba(23, 63, 67, .12); }
.seg button:focus-visible { outline: 2px solid var(--forest); }

/* By Page */
.page-view[hidden] { display: none; }
.page-kicker { margin: 0; font-size: 14px; font-weight: 500; color: var(--go); }
.page-kicker.out { color: var(--stop); }
.page-ask { margin: 4px 0 8px; font-size: 14px; color: var(--forest-50); }
.page-view .crit li { grid-template-columns: 16px minmax(0, 1fr); row-gap: 12px; }
.page-view .crit li .ans { grid-column: 2; justify-self: start; margin-top: 0; }
.results h3 { margin: 8px 0 0; font-family: var(--display); font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
.results[data-tone="block"] h3 { color: var(--stop); }
.results-body { margin: 8px 0 0; font-size: 16px; color: var(--forest-70); }
.results-skip { margin-top: 12px; }
.results h4 { margin: 28px 0 8px; font-size: 14px; font-weight: 600; color: var(--forest); }
.results ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--forest-70); }

/* Drawer footer: status and next steps, or page controls */
.foot-status { font-size: 14px; font-weight: 500; color: var(--forest-70); }
.foot-status.tone-go { color: var(--go); }
.foot-status.tone-block { color: var(--stop); }
.foot-page { font-size: 14px; color: var(--forest-50); font-variant-numeric: tabular-nums; }
.foot-actions { display: flex; gap: 8px; }
@media (max-width: 480px) { .foot-status { display: none; } .foot-actions { width: 100%; } .foot-actions > * { flex: 1; } }

/* All questions: the full list, nothing hidden */
.all-view { display: grid; gap: 40px; }
.all-view[hidden], .step-view[hidden] { display: none; }
.all-view .crit li { grid-template-columns: 16px minmax(0, 1fr); row-gap: 12px; }
.all-view .crit li .ans { grid-column: 2; justify-self: start; margin-top: 0; }
.all-view .crit-group h3 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }

/* Progress bar, shared by the summary card and the drawer */
.fit-bar { display: flex; height: 6px; border-radius: 6px; background: var(--cream-2); overflow: hidden; }
.fit-bar i { display: block; width: 0; height: 100%; transition: width .4s var(--ease); }
.fit-bar .f { background: var(--sage); }
.fit-bar .b { background: var(--mauve); }
.fit-bar .u { background: var(--slate); }

.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 0 0 28px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--keylime); }
.doc-cta p { margin: 0; max-width: 520px; font-size: 16px; color: var(--forest-70); }
.doc-cta .btn { background: var(--light); border-color: var(--light); }
.doc-cta .btn:hover { background: var(--forest); border-color: var(--forest); color: #fff; }

/* Reach out */
.reach-lede { margin: -8px 0 28px; font-size: 16px; color: var(--forest-70); max-width: 640px; }
.steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1080px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--r-lg); background: var(--cream); }
.steps li.now { background: var(--forest); color: #fff; }
.steps .n { width: 28px; height: 28px; margin-bottom: 8px; border-radius: 8px; display: grid; place-items: center; background: var(--light); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps li.now .n { background: var(--sage); color: var(--forest); }
.steps b { font-family: var(--display); font-weight: 300; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; }
.steps span:not(.n) { font-size: 14px; color: var(--forest-70); }
.steps li.now span:not(.n) { color: rgba(255, 255, 255, .75); }
.steps small { margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--forest-50); }
.steps li.now small { color: var(--sage); }

.composer { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .composer { grid-template-columns: 1fr; } }
.composer-form { display: grid; gap: 18px; padding: 22px; border-radius: var(--r-lg); background: var(--cream); }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span, .field-label { font-size: 14px; font-weight: 500; color: var(--forest-70); }
.field input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--light);
  font: inherit; font-size: 16px; color: var(--forest); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--forest-30); }
.field input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23, 63, 67, .08); }
.field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
.recips { display: grid; gap: 6px; }
.recip {
  all: unset; cursor: pointer; display: block;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--light); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.recip:hover { border-color: var(--forest-30); }
.recip[aria-checked="true"] { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.recip:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.recip b { display: block; font-size: 14px; font-weight: 500; }
.recip span { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; font-size: 14px; color: var(--forest-70); }
.recip em { font-style: normal; white-space: nowrap; font-variant-numeric: tabular-nums; }
.composer .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.composer-form .chip { background: var(--light); }
.composer-form .chip:hover { background: var(--mint); }
.composer-form .chip[aria-pressed="true"] { background: var(--forest); color: #fff; }
.composer-hint { margin: 0; font-size: 14px; color: var(--forest-50); }

.letter { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--light); overflow: hidden; }
.letter-head { display: flex; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.letter-meta { margin: 0; padding: 14px 26px; border-bottom: 1px solid var(--border); display: grid; gap: 6px; font-size: 14px; }
.letter-meta div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
.letter-meta dt { color: var(--forest-50); }
.letter-meta dd { margin: 0; overflow-wrap: anywhere; }
.letter-body { padding: 24px 26px 10px; font-size: 16px; line-height: 1.65; }
.letter-body p { margin: 0 0 14px; white-space: pre-line; }
.letter-body ul, .letter-body ol { margin: 0 0 14px; padding-left: 20px; }
.letter-body li + li { margin-top: 4px; }
.letter-body h5 { margin: 22px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--forest-50); }
.letter-body h5:first-child { margin-top: 0; }
.letter-body mark { padding: 1px 4px; border-radius: 4px; background: var(--keylime); color: var(--go); }
.letter-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 26px 22px; border-top: 1px solid var(--border); }
.letter-actions [hidden] { display: none; }

/* What happens */
.design-lines { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 12px; max-width: 780px; }
.design-lines li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; font-size: 16px; color: var(--forest-70); }
.design-lines li .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--keylime); display: grid; place-items: center; }
.design-lines li .ic svg { width: 16px; height: 16px; }
.design-lines li > span:last-child { padding-top: 6px; }

.arms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.arm { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--border); }
.arm-kind { font-size: 14px; font-weight: 500; color: var(--forest-50); }
.arm h4 { margin: 8px 0 8px; font-family: var(--display); font-weight: 300; font-size: 24px; line-height: 1.18; letter-spacing: -.03em; }
.arm p { margin: 0; font-size: 16px; color: var(--forest-70); }
.arm .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.outcomes { margin-top: 40px; }
.outcome { padding: 16px 0; border-top: 1px solid var(--border); max-width: 780px; }
.outcome .what { font-size: 16px; color: var(--forest); }
.outcome .when { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--forest-50); }
.outcome .when svg { width: 14px; height: 14px; flex-shrink: 0; }
.outcome small { display: block; margin-top: 8px; font-size: 14px; color: var(--forest-70); }
.arms .arm.extra { display: none; }
.arms.open .arm.extra { display: block; }
.arms-more { margin-top: 16px; }
.arms-more svg, .site-more svg { transition: transform .2s var(--ease); }
.arms-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Where */
.where-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .where-grid { grid-template-columns: 1fr; } }
.site-map { height: 460px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.site-map #siteMap { width: 100%; height: 100%; }
.site-list { list-style: none; margin: 0; padding: 6px; max-height: 460px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.site-list li { padding: 14px 16px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s; }
.site-list li + li { margin-top: 2px; }
.site-list li:hover, .site-list li.hot { background: var(--cream); }
.site-list li.closed { display: none; }
.site-list.show-closed li.closed { display: block; }
.site-list li.site-more { cursor: default; padding: 12px 16px; }
.site-list li.site-more:hover { background: none; }
.site-list .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.site-list .fac { font-weight: 500; font-size: 16px; }
.site-list .dist { font-size: 14px; color: var(--forest-70); font-variant-numeric: tabular-nums; white-space: nowrap; }
.site-list .place { font-size: 14px; color: var(--forest-70); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-list .site-contact { margin-top: 6px; font-size: 14px; }
.site-list .site-contact a { color: var(--link); text-decoration: none; }
.where-note { margin: 0 0 18px; color: var(--forest-70); font-size: 16px; }

/* Who's running it */
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.who-card { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--border); }
.who-card.who-sponsor { background: var(--cream); border-color: transparent; }
.who-role { font-size: 14px; font-weight: 500; color: var(--forest-50); }
.who-card h4 { margin: 8px 0 8px; font-family: var(--display); font-weight: 300; font-size: 24px; line-height: 1.18; letter-spacing: -.03em; }
.who-card p { margin: 0; font-size: 16px; color: var(--forest-70); }
.who-card small { display: block; margin-top: 12px; font-size: 14px; color: var(--forest-50); }
.who-more { margin: 16px 0 0; font-size: 14px; color: var(--forest-70); }
.who-more a { color: var(--link); }
.who-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 14px; }
.who-links a { color: var(--link); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.who-links a:hover { text-decoration: underline; }
.who-links svg { width: 12px; height: 12px; }
.ask-box { margin-top: 32px; padding: 28px; border-radius: var(--r-lg); background: var(--keylime); }
.ask-box h3 { margin: 0 0 12px; }
.ask-box ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; max-width: 680px; }
.who-fine { margin: 16px 0 0; font-size: 14px; color: var(--forest-50); max-width: 680px; }
.site-list .site-docs { margin-top: 8px; display: grid; gap: 2px; font-size: 14px; color: var(--forest-70); }
.site-list .site-docs b { font-weight: 500; color: var(--forest); }
.site-list .site-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.site-list .who-name { color: var(--forest-70); }
.site-list .site-links { margin-top: 8px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-list .site-links a { color: var(--link); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.site-list .site-links svg { width: 12px; height: 12px; }

/* Timeline */
.timeline { position: relative; margin: 20px 0 8px; padding: 64px 0 70px; }
.tl-bar { position: relative; height: 8px; border-radius: 8px; background: var(--cream-2); }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--sage); }
.tl-mark { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.tl-mark .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--light); border: 3px solid var(--forest); }
.tl-mark .lbl { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; text-align: center; font-size: 14px; color: var(--forest-70); }
.tl-mark .lbl b { display: block; font-family: var(--display); font-weight: 300; font-size: 20px; letter-spacing: -.03em; color: var(--forest); }
.tl-mark.below .lbl { top: 24px; }
.tl-mark.above .lbl { bottom: 24px; }
.tl-mark.first .lbl { left: 0; transform: none; text-align: left; }
.tl-mark.last .lbl { left: auto; right: 0; transform: none; text-align: right; }
.tl-today .dot { background: var(--mulberry); border-color: var(--light); box-shadow: 0 0 0 4px rgba(122, 62, 38, .18); }
.tl-today .lbl b { color: var(--mulberry); }

.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; }
.details-grid dl { margin: 0; }
.dl-row { padding: 12px 0; border-top: 1px solid var(--border); }
.dl-row dt { font-size: 14px; color: var(--forest-50); }
.dl-row dd { margin: 4px 0 0; font-size: 16px; color: var(--forest); }

.loading-page { padding: 140px 0; text-align: center; color: var(--forest-70); }
.loading-page .brand-mark { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 18px; animation: breathe 1.6s ease-in-out infinite; }
.loading-page .brand-mark svg { width: 30px; height: 30px; }
@keyframes breathe { 50% { transform: scale(.9); opacity: .7; } }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 900;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: var(--r-sm);
  background: var(--forest); color: #fff; font-size: 14px;
  box-shadow: var(--shadow-pop);
  transition: opacity .2s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media print {
  .site-header, .toc, .contact-card .btn, .check-card, .drawer-root, .brief-root, .composer-form, .letter-head, .letter-actions, .site-footer, .crumbs { display: none !important; }
  .study-body { display: block; }
}

/* ==========================================================================
   Doctor summary (doctor.html)
   A clinician-facing sheet: registry wording, dense type, prints on US Letter.
   ========================================================================== */
.brief-page { background: var(--cream); }
.brief-bar { position: sticky; top: 0; z-index: 50; background: var(--light); border-bottom: 1px solid var(--border); }
.brief-bar-in { width: min(816px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 16px; height: 64px; }
.brief-bar-mid { display: flex; gap: 6px; margin-left: auto; }
.brief-bar-note { width: min(816px, 100% - 32px); margin: -6px auto 0; padding-bottom: 12px; font-size: 12px; color: var(--forest-50); }
.crumb-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--forest-70); text-decoration: none; }
.crumb-link:hover { color: var(--forest); }
.crumb-link svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .brief-bar-in { flex-wrap: wrap; height: auto; padding: 12px 0; } .brief-bar-mid { margin-left: 0; order: 3; } }

.sheet {
  width: min(816px, 100% - 32px); min-height: 1056px; margin: 32px auto 80px;
  padding: 52px 56px 44px;
  background: #fff; border-radius: 6px; box-shadow: var(--shadow-card);
  font-size: 12px; line-height: 1.5; color: var(--forest);
}
.sheet h2 { margin: 0 0 8px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--forest-50); }
.sheet h3 { margin: 14px 0 4px; font-size: 12px; font-weight: 600; }
.sheet .tag { padding: 4px 8px; font-size: 10px; border-radius: 4px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet .tag-go .dot { animation: none; }

.sh-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 2px solid var(--forest); }
.sh-brand { display: flex; align-items: center; gap: 12px; }
.sh-brand .brand-mark { width: 30px; height: 30px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sh-brand b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: -.02em; line-height: 1.1; }
.sh-brand div span { font-size: 12px; color: var(--forest-70); }
.sh-patient { margin: 0; display: grid; grid-template-columns: auto auto; gap: 2px 14px; font-size: 12px; align-content: start; }
.sh-patient div { display: contents; }
.sh-patient dt { color: var(--forest-50); }
.sh-patient dd { margin: 0; font-weight: 500; min-width: 150px; }
.blank { display: inline-block; width: 150px; height: 1em; border-bottom: 1px solid var(--forest-30); vertical-align: -2px; }

.sh-study { padding: 20px 0 18px; border-bottom: 1px solid var(--border-2); }
.sh-ids { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sh-ids .mono { font-weight: 500; margin-right: 4px; }
.sh-study h1 { margin: 10px 0 0; font-size: 26px; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.sh-official { margin: 6px 0 0; font-size: 12px; color: var(--forest-70); }
.sh-facts { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.sh-facts div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 4px 0; border-top: 1px solid var(--border); }
.sh-facts dt { color: var(--forest-50); }
.sh-facts dd { margin: 0; }

.sh-flag { margin: 18px 0 0; padding: 14px 16px; border-radius: 8px; background: var(--blush); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sh-flag.is-empty { background: var(--cream); }
.sh-flag h2 { color: var(--stop); }
.sh-flag.is-empty h2 { color: var(--forest-50); }
.sh-flag p { margin: 0; }
.sh-flag ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.sh-flag li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; }
.sh-flag li .tag { justify-self: start; background: #fff; }
.sh-flag small { display: block; font-size: 10px; color: var(--forest-50); }

.sh-sec { padding-top: 18px; }
.sh-note { margin: 0 0 6px; font-size: 12px; color: var(--forest-70); }
.sh-table { width: 100%; border-collapse: collapse; }
.sh-table th { text-align: left; font-size: 10px; font-weight: 500; color: var(--forest-50); padding: 0 10px 4px 0; }
.sh-table td { padding: 4px 10px 4px 0; border-top: 1px solid var(--border); vertical-align: top; }
.sh-table tr { break-inside: avoid; }
.sh-crit td:last-child { width: 108px; padding-right: 0; text-align: right; }
.sh-crit tr.sub td:first-child { padding-left: 16px; color: var(--forest-70); }
.sh-crit tr.head td { font-weight: 500; }
.ans-none { font-size: 10px; color: var(--forest-30); }
.answered-only .sh-crit tr.no-a:not(.head) { display: none; }
.sh-raw { white-space: pre-wrap; font-size: 12px; color: var(--forest-70); }
.sh-outcomes { list-style: none; margin: 0; padding: 0; }
.sh-outcomes li { padding: 4px 0; border-top: 1px solid var(--border); }
.sh-outcomes small { display: block; font-size: 10px; color: var(--forest-50); }

.sh-bottom { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 24px; margin-top: 22px; padding-top: 16px; border-top: 2px solid var(--forest); break-inside: avoid; }
.sh-contact + .sh-contact { margin-top: 10px; }
.sh-contact small { display: block; font-size: 10px; color: var(--forest-50); }
.sh-contact b { display: block; font-weight: 500; }
.sh-lookup span { display: block; color: var(--forest-70); }
.sh-lookup .mono { font-size: 16px; font-weight: 500; color: var(--forest); letter-spacing: -.01em; }
.sh-lookup small { display: block; margin-top: 4px; font-size: 10px; color: var(--forest-50); }
.sh-notes .lines { display: grid; gap: 20px; padding-top: 14px; }
.sh-notes .lines i { display: block; border-bottom: 1px solid var(--border-2); }
.sh-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 10px; line-height: 1.5; color: var(--forest-50); }
@media (max-width: 700px) { .sheet { padding: 28px 22px; } .sh-head, .sh-bottom { display: grid; grid-template-columns: 1fr; } .sh-facts { grid-template-columns: 1fr; } }

@media print {
  @page { size: letter; margin: .5in; }
  .brief-page { background: #fff; }
  .brief-bar { display: none !important; }
  .sheet { width: auto; min-height: 0; margin: 0; padding: 0; border-radius: 0; box-shadow: none; font-size: 10px; line-height: 1.4; }
  /* Denser on paper so most studies fit on one or two sheets */
  .sh-head { padding-bottom: 12px; }
  .sh-study { padding: 12px 0; }
  .sh-study h1 { font-size: 20px; }
  .sh-official, .sh-note, .sh-raw { font-size: 10px; }
  .sh-facts { margin-top: 10px; }
  .sh-facts div { padding: 4px 0; }
  .sh-flag { margin-top: 12px; padding: 10px 12px; }
  .sh-flag ul { gap: 4px; }
  .sh-sec { padding-top: 12px; }
  .sh-table td { padding: 4px 8px 4px 0; }
  .sh-crit td:last-child { width: 92px; }
  .sheet .tag { font-size: 10px; padding: 2px 6px; }
  .ans-none { font-size: 10px; }
  .sh-bottom { margin-top: 14px; padding-top: 10px; }
  .sh-foot { margin-top: 14px; font-size: 10px; }
}

.record-link { color: var(--link); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.record-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.record-link svg { width: 12px; height: 12px; }
