/* =====================================================================
   HEB design system — shared by StepStash and BoardStash.
   The HemeOncBuddy look: light stone page, deep-navy bar with section tabs,
   rose accent, Georgia for reading, system sans for UI chrome.
   ===================================================================== */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --ink-faint: #6b655f;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --hover: #f5f5f4;
  --accent: #be123c;
  --accent-dark: #9f1239;
  --accent-soft: #fecdd3;
  --accent-tint: #fdecef;
  --bar: #0d1f4d;
  --bar-border: #081237;
  --bar-hover: #1c3268;
  --bar-active: #2a4288;
  --bar-text: #cbd5e1;
  --highlight: #fef3c7;
  --highlight-line: #b45309;
  --teal: #0f766e;
  --blue: #2563eb;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-h: 82px;
  --shadow-sm: 0 12px 26px -20px rgba(13, 31, 77, .55);
  --shadow: 0 14px 34px -28px rgba(13, 31, 77, .6);
  /* aliases used by the player scripts' inline styles */
  --ink-dim: var(--ink-soft);
  --red: var(--accent);
  --font: var(--sans);
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { overflow-y: scroll; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--serif); background: var(--bg); color: var(--ink); line-height: 1.55;
  -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); }
svg { flex-shrink: 0; }
mark { background: var(--highlight); color: inherit; padding: 0 1px; border-radius: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.heb-skip { position: absolute; left: -9999px; top: .5rem; z-index: 1000; background: var(--bar); color: #fff; padding: .6rem 1rem; border-radius: .5rem; font: 700 .9rem var(--sans); }
.heb-skip:focus { left: .5rem; }
[hidden] { display: none !important; }

/* ---------- header stack: nav + disclaimer, pinned together ---------- */
.heb-header-stack { position: sticky; top: 0; z-index: 50; }
.heb-nav {
  position: relative; background: var(--bar); color: #fafaf9; padding: .7rem 1.25rem; min-height: 3.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--bar-border);
}
.heb-nav :focus-visible, .heb-menu :focus-visible, .heb-footer-bar :focus-visible { outline-color: #93c5fd; }
.heb-brand { display: flex; align-items: center; gap: .6rem; color: #fff; z-index: 1; min-width: 0; }
.heb-logo { width: 38px; height: 38px; flex: none; display: block; border-radius: 50%; }
/* the round badge carries the wordmark, so the name is only shown in print (as on HemeOncBuddy.org) */
.heb-brand-t { display: none; font: 700 1.02rem/1.05 var(--sans); letter-spacing: -.01em; }
.heb-nav-links { display: flex; gap: .25rem; font-family: var(--sans); font-size: .875rem; }
.heb-nav-link { color: var(--bar-text); padding: .4rem .85rem; border-radius: .375rem; transition: background .12s, color .12s; white-space: nowrap; }
.heb-nav-link:hover { background: var(--bar-hover); color: #fafaf9; }
.heb-nav-link.active { background: var(--bar-active); color: #fafaf9; }
.heb-nav-link.soon { cursor: default; color: #94a3b8; }
.heb-nav-link.soon:hover { background: none; color: #94a3b8; }
.heb-nav-link .sb, .heb-menu .sb { font-size: .58rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #fda4af; margin-left: .35rem; vertical-align: 1px; }
.heb-nav-right { display: flex; align-items: center; gap: .5rem; z-index: 1; }
.heb-search-pill {
  display: inline-flex; align-items: center; gap: .5rem; font: 500 .84rem/1 var(--sans); color: #e2e8f0;
  border: 1px solid rgba(203, 213, 225, .35); border-radius: 999px; padding: .42rem .5rem .42rem .8rem; transition: background .12s, border-color .12s;
}
.heb-search-pill:hover { background: var(--bar-hover); border-color: rgba(203, 213, 225, .6); }
.heb-search-pill.active { background: var(--bar-active); border-color: transparent; color: #fff; }
.heb-search-pill svg { width: 15px; height: 15px; }
.heb-search-pill kbd { font: 600 .68rem/1 var(--sans); color: #cbd5e1; border: 1px solid rgba(203, 213, 225, .45); border-radius: .3rem; padding: .16rem .38rem; }
.heb-burger, .heb-msearch { display: none; width: 42px; height: 42px; border-radius: .5rem; color: #e2e8f0; align-items: center; justify-content: center; }
.heb-burger:hover, .heb-msearch:hover { background: var(--bar-hover); }
.heb-burger svg, .heb-msearch svg { width: 22px; height: 22px; }
.heb-menu { background: var(--bar); border-bottom: 1px solid var(--bar-border); padding: .25rem .75rem .75rem; font-family: var(--sans); }
.heb-menu a, .heb-menu span { display: flex; align-items: center; min-height: 44px; padding: 0 .85rem; border-radius: .5rem; color: var(--bar-text); font-size: .95rem; }
.heb-menu a:hover { background: var(--bar-hover); color: #fff; }
.heb-menu a.active { background: var(--bar-active); color: #fff; }
.heb-menu span { color: #94a3b8; }
.heb-disclaimer-bar {
  background: #081237; color: #fef3c7; border-bottom: 1px solid #04081f; padding: .22rem 1rem;
  font: .7rem/1.25 var(--sans); letter-spacing: .01em; text-align: center;
}
.heb-disclaimer-bar strong { color: #fde68a; font-weight: 600; }
@media (min-width: 761px) {
  .heb-nav-links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
@media (max-width: 760px) {
  .heb-nav { padding: .35rem .5rem; min-height: 3.5rem; }
  .heb-nav-links, .heb-search-pill { display: none; }
  .heb-burger, .heb-msearch { display: inline-flex; }
  .heb-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .heb-logo { width: 46px; height: 46px; }
  .heb-disclaimer-bar { font-size: .65rem; padding: .2rem .6rem; }
}

/* ---------- footer ---------- */
.heb-footer-bar {
  background: var(--bar); color: var(--bar-text); border-top: 1px solid var(--bar-border); padding: .55rem 1rem;
  font: .74rem/1.45 var(--sans); text-align: center; margin-top: auto; flex-shrink: 0;
}
.heb-footer-bar p { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .15rem .5rem; }
.heb-footer-bar a { color: #fda4af; }
.heb-footer-bar a:hover { text-decoration: underline; }
.heb-footer-bar .sep { color: #475569; }

/* ---------- page container + header ---------- */
.heb-page { width: 100%; max-width: 1300px; margin: 0 auto; padding: 2rem 1.25rem 4rem; flex: 1 0 auto; }
.heb-page.narrow { max-width: 860px; }
.heb-page-header h1 { font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.15; margin: 0 0 .3rem; letter-spacing: -.015em; color: var(--bar); }
.heb-page-header p { color: var(--ink-soft); margin: 0 0 1.5rem; font-size: 1.02rem; }
.heb-total { color: var(--ink-faint); font-weight: 400; white-space: nowrap; }
.heb-total:not(:empty)::before { content: "· "; color: var(--line-strong); }
.is-reading .heb-page-header { display: none; }

/* ---------- toolbar (search + Saved) ---------- */
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar .search {
  flex: 1; min-width: 220px; min-height: 3.1rem; font: 1rem var(--sans); padding: .7rem .95rem .7rem 2.7rem; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 26px -22px rgba(13, 31, 77, .6);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat .95rem 50% / 18px;
}
.toolbar .search::placeholder { color: #8a837d; }
.toolbar .search:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.toolbar .search::-webkit-search-cancel-button { cursor: pointer; }
.tool-btn {
  display: inline-flex; align-items: center; gap: .4rem; font: .88rem var(--serif); padding: .62rem .85rem; white-space: nowrap;
  border-radius: .55rem; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); transition: border-color .12s, background .12s;
}
.tool-btn:hover { border-color: var(--accent); }
.tool-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool-btn svg { width: 16px; height: 16px; }
.tool-btn .n { font: 600 .74rem var(--sans); color: var(--ink-faint); }
.tool-btn.active .n { color: #ffe4e6; }
.tool-btn.navy { background: var(--bar); border-color: var(--bar); color: #fff; font-family: var(--sans); font-weight: 600; font-size: .84rem; }
.tool-btn.navy:hover { background: var(--bar-active); border-color: var(--bar-active); }
.tool-btn.navy .n { color: #c7d2ea; font-weight: 500; }
.tool-btn.navy .n:empty { display: none; }

/* ---------- two-column layout: sidebar + panel ---------- */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2rem; align-items: start; align-content: start; min-height: 60vh; }
.sidebar {
  position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: .5rem; font: .875rem/1.35 var(--sans);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.sb-toggle { display: none; }
.sb-seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 3px; padding: 3px; margin: 0 0 .45rem; background: var(--hover); border: 1px solid var(--line); border-radius: .55rem; }
.sb-seg button { padding: .42rem .3rem; border-radius: .4rem; font: 600 .8rem/1.15 var(--sans); color: var(--ink-soft); text-align: center; }
.sb-seg button small { display: block; font-weight: 500; font-size: .66rem; color: var(--ink-faint); margin-top: 2px; }
.sb-seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.sb-seg button.on { background: var(--bar); color: #fff; box-shadow: 0 2px 6px -2px rgba(13, 31, 77, .5); }
.sb-seg button.on small { color: #c7d2ea; }
.sb-seg-sm button { font-size: .74rem; padding: .32rem .3rem; }
.sb-reset { display: inline-flex; align-items: center; gap: .3rem; color: var(--accent); font: .78rem var(--sans); padding: .3rem .6rem .5rem; }
.sb-reset svg { width: 13px; height: 13px; }
.sb-reset:hover span { text-decoration: underline; }
.sidebar details > summary {
  list-style: none; cursor: pointer; padding: .4rem .6rem; border-radius: .375rem; user-select: none;
  display: flex; align-items: center; gap: .4rem; font-weight: 600;
}
.sidebar details > summary::-webkit-details-marker { display: none; }
.sidebar details > summary::before { content: "▸"; font-size: .7rem; color: var(--ink-faint); transition: transform .15s; flex: none; }
.sidebar details[open] > summary::before { transform: rotate(90deg); }
.sidebar details > summary:hover { background: rgba(255, 255, 255, .7); }
.sidebar .sm-t { flex: 1; min-width: 0; }
.sidebar .cat-block { background: var(--cc-tint, var(--hover)); border-radius: .5rem; padding: .2rem .3rem; margin-bottom: .4rem; }
.sidebar .cat-block > summary { color: var(--cc-ink, var(--ink)); font-size: .9rem; padding: .55rem .6rem; }
.sidebar .area > summary { font-weight: 500; color: var(--ink-soft); padding-left: .6rem; }
.sidebar .count { margin-left: auto; font-size: .7rem; font-weight: 600; color: var(--ink-soft); padding-left: .5rem; font-variant-numeric: tabular-nums; }
.sidebar .note-link {
  display: flex; align-items: baseline; gap: .4rem; padding: .4rem .6rem .4rem 1.6rem; color: var(--ink-soft);
  border-radius: .3rem; line-height: 1.3; overflow-wrap: anywhere;
}
.sidebar .note-link.lvl3 { padding-left: 2.2rem; }
.sidebar .note-link:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.sidebar .note-link.active { background: var(--blue); color: #fff; }
.sidebar .nl-t { flex: 1; min-width: 0; }
.sidebar .nl-b { flex: none; font-size: .68rem; font-weight: 700; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.sidebar .nl-b.done { color: var(--teal); }
.sidebar .nl-b.prog { color: var(--accent); }
.sidebar .note-link.active .nl-b { color: rgba(255, 255, 255, .85); }
.sidebar .note-link.active mark { background: rgba(255, 255, 255, .28); }
.sb-empty { padding: .9rem .6rem; margin: 0; color: var(--ink-faint); font: italic .95rem/1.45 var(--serif); }
.sb-jump { margin-top: .5rem; color: var(--accent); font: 600 .8rem var(--sans); }
.sb-jump:hover { text-decoration: underline; }

/* ---------- main panel ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 2rem 2.25rem;
  min-height: 300px; min-width: 0; overflow-wrap: break-word;
}
.panel.is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5rem 2rem; text-align: center; }
.empty-note { color: var(--ink-faint); font-style: italic; text-align: center; margin: 0; font-size: 1.02rem; }
.empty-cont { margin: 1rem 0 0; font: .88rem/1.5 var(--sans); color: var(--ink-soft); }
.empty-cont a { color: var(--accent); font-weight: 600; }
.empty-cont a:hover { text-decoration: underline; }
.empty-sub { display: inline-flex; align-items: center; gap: .35rem; margin: .7rem 0 0; font: 600 .78rem var(--sans); color: #b45309; }
.empty-sub svg { width: 15px; height: 15px; }
.loading { color: var(--ink-faint); font-style: italic; margin: 0; }
.loading::after {
  content: ""; display: inline-block; width: 1rem; height: 1rem; margin-left: .55rem; vertical-align: -3px;
  border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: heb-spin .7s linear infinite;
}
@keyframes heb-spin { to { transform: rotate(360deg); } }
.panel-head h1 { font-size: 1.55rem; margin: 0 0 .3rem; }
.panel-head p { margin: 0 0 1.25rem; color: var(--ink-soft); }

/* ---------- icon buttons (save / copy link / share / print) ---------- */
.heb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.heb-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--accent-soft); background: #fff; color: var(--accent); border-radius: 50%; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.heb-iconbtn svg { width: 16px; height: 16px; display: block; }
.heb-iconbtn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.heb-iconbtn:active { transform: scale(.92); }
.heb-iconbtn.copied { background: var(--teal); color: #fff; border-color: var(--teal); }
.heb-iconbtn.is-saved { background: #fff7ed; border-color: #f5c98b; color: #f5a623; }
.heb-iconbtn.is-saved svg { fill: #f5a623; }

/* ---------- pills ---------- */
.pill-btn {
  display: inline-flex; align-items: center; gap: .35rem; font: 600 .76rem/1 var(--sans); padding: .46rem .7rem; white-space: nowrap;
  border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--surface); transition: border-color .12s, color .12s, background .12s;
}
.pill-btn:hover { border-color: var(--accent); color: var(--accent); }
.pill-btn svg { width: 13px; height: 13px; }
.pill-btn.pri { background: var(--bar); border-color: var(--bar); color: #fff; }
.pill-btn.pri:hover { background: var(--bar-active); border-color: var(--bar-active); color: #fff; }

/* ---------- note reader ---------- */
.reader { min-width: 0; }
.nr-hero {
  position: relative; overflow: hidden; border-radius: 14px; color: #fff; padding: 2.4rem 2.4rem 2rem; min-height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(100deg, #0d1f4d 0%, #1c3268 100%);
}
.nr-hero::before {
  content: ""; position: absolute; right: -70px; top: -90px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(190, 18, 60, .5), transparent); pointer-events: none;
}
.nr-hero::after {
  content: ""; position: absolute; left: -60px; bottom: -120px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cc, #2563eb) 45%, transparent), transparent); pointer-events: none; opacity: .55;
}
.nr-ic { position: absolute; right: 2.2rem; top: 50%; transform: translateY(-50%); width: 132px; height: 132px; color: rgba(255, 255, 255, .13); }
.nr-ic svg { width: 100%; height: 100%; stroke-width: 1.3; }
.nr-hero > *:not(.nr-ic) { position: relative; z-index: 1; }
.nr-kick { font: 700 .68rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #fda4af; margin-bottom: .65rem; }
.nr-title { font: 700 2.05rem/1.14 var(--serif); color: #fff; margin: 0 0 .55rem; letter-spacing: -.01em; max-width: 26ch; text-wrap: balance; }
.nr-sub { font: italic 1.06rem/1.45 var(--serif); color: #dbe3f3; margin: 0 0 .9rem; max-width: 50ch; }
.nr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font: 500 .8rem/1.35 var(--sans); color: #c7d2ea; }
.nr-meta a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 2px; }
.nr-meta a:hover { text-decoration-color: #fff; }
.nr-meta .dot { color: rgba(199, 210, 234, .55); }
.nr-bar { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; padding: .85rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.nr-mat {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; align-items: stretch;
  border: 1px solid var(--line); border-radius: 14px; padding: .6rem; margin: 0 0 1.75rem; box-shadow: 0 12px 30px -26px rgba(13, 31, 77, .5);
}
.nr-mat-l { display: flex; align-items: center; gap: .65rem; padding: 0 .7rem 0 .55rem; font-family: var(--sans); }
.nr-mat-l > svg { color: var(--accent); width: 20px; height: 20px; }
.nr-mat-l b { display: block; font-size: .93rem; font-weight: 700; color: var(--bar); }
.nr-mat-l span { display: block; font-size: .74rem; color: var(--ink-faint); margin-top: .1rem; }
.mat-tile {
  display: flex; align-items: center; gap: .75rem; padding: .78rem .95rem; text-align: left; font-family: var(--sans);
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); transition: border-color .12s, transform .12s, background .12s;
}
.mat-tile:hover { border-color: var(--bar); transform: translateY(-1px); }
.mat-tile .mi { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--bar); color: #fff; }
.mat-tile .mi svg { width: 18px; height: 18px; }
.mat-tile .mt { min-width: 0; flex: 1; }
.mat-tile b { display: block; font-size: .92rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.mat-tile .mt span { display: block; font-size: .74rem; color: var(--ink-faint); margin-top: .15rem; line-height: 1.3; }
.mat-tile .go { flex: none; display: flex; }
.mat-tile .go svg { width: 18px; height: 18px; }
.mat-tile.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.mat-tile.teal:hover { background: #0d6b63; border-color: #0d6b63; }
.mat-tile.teal .mi { background: rgba(255, 255, 255, .16); }
.mat-tile.teal b { color: #fff; }
.mat-tile.teal .mt span { color: #ccfbf1; }
.nr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 2.25rem; align-items: start; }
.nr-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.nr-main { min-width: 0; }
.nr-toc {
  position: sticky; top: calc(var(--header-h) + 1rem); padding: .85rem 1rem; max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: .4rem; font: .8125rem/1.35 var(--sans);
}
.nr-toc-title { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; margin-bottom: .45rem; }
.nr-toc ol { list-style: none; margin: 0; padding: 0; }
.nr-toc li { margin: .05rem 0; }
.nr-toc a { display: block; color: var(--accent); padding: .28rem 0 .28rem .55rem; border-left: 2px solid transparent; margin-left: -.55rem; }
.nr-toc a:hover { color: var(--accent-dark); background: var(--hover); border-left-color: var(--accent); }
.nr-toc a.on { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.nr-hy { background: #fffbeb; border: 1px solid #f6e3b4; border-left: 4px solid var(--highlight-line); border-radius: .6rem; padding: 1rem 1.25rem 1.05rem; margin: 0 0 1.75rem; }
.nr-hy-t { display: flex; align-items: center; gap: .4rem; font: 700 .68rem/1 var(--sans); letter-spacing: .11em; text-transform: uppercase; color: var(--highlight-line); margin-bottom: .55rem; }
.nr-hy-t svg { width: 15px; height: 15px; }
.nr-hy ul { list-style: none; margin: 0; padding: 0; }
.nr-hy li { position: relative; padding-left: 1.15rem; margin: .42rem 0; font: 1rem/1.55 var(--serif); color: var(--ink); }
.nr-hy li::before { content: ""; position: absolute; left: .12rem; top: .6em; width: 6px; height: 6px; border-radius: 1px; background: var(--highlight-line); transform: rotate(45deg); }
.nr-next { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.nr-next a { display: block; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; transition: border-color .12s, box-shadow .12s; }
.nr-next a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.nr-next small { display: block; font: 700 .66rem var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); }
.nr-next b { display: block; font: 700 1rem/1.3 var(--serif); color: var(--ink); margin-top: .25rem; }
.nr-next a.next { text-align: right; }

/* ---------- note body (prose; comparison tables come from note-tables.css) ---------- */
.note-content { min-width: 0; }
.note-body { font: 1.0625rem/1.72 var(--serif); color: var(--ink); font-variant-numeric: normal; font-feature-settings: "frac" 0, "afrc" 0; }
.note-body > h2 {
  font: 700 1.42rem/1.3 var(--serif); color: var(--ink); margin: 2.2rem 0 .7rem; letter-spacing: -.005em;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.note-body > h2:first-child { margin-top: .2rem; }
.note-body h3 { font: 700 1.13rem/1.35 var(--serif); margin: 1.5rem 0 .45rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.note-body > p { margin: .8rem 0; }
.note-body strong, .note-body b { font-weight: 700; color: var(--ink); }
.note-body em, .note-body i { font-style: italic; }
.note-body > ul, .note-body > ol { margin: .6rem 0 1rem; padding-left: 1.45rem; }
.note-body > ul li, .note-body > ol li { margin: .35rem 0; }
.note-body sup, .note-body sub { line-height: 0; }
.note-body > p.pearl {
  position: relative; margin: 1.1rem 0; padding: .75rem 1rem .8rem; border-radius: 0 .55rem .55rem 0;
  background: #fff8e6; border-left: 3px solid var(--highlight-line); font-size: 1rem; line-height: 1.6;
}
.note-body > p.pearl::before { content: "Pearl"; display: inline-block; font: 800 .64rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--highlight-line); margin-right: .55rem; vertical-align: 2px; }
.note-body > p.pearl.warn { background: #fff1f2; border-left-color: var(--accent); }
.note-body > p.pearl.warn::before { content: "Caution"; color: var(--accent); }
.note-body .note-seq { margin: 1.1rem 0 1.25rem; }
.note-body .note-seq ol { counter-reset: q; list-style: none; margin: 0; padding: 0; }
.note-body .note-seq ol > li { counter-increment: q; position: relative; padding-left: 2.35rem; margin: 0 0 .8rem; }
.note-body .note-seq ol > li::before {
  content: counter(q); position: absolute; left: 0; top: .1rem; width: 1.55rem; height: 1.55rem; border-radius: 50%;
  background: var(--bar); color: #fff; font: 700 .76rem/1.55rem var(--sans); text-align: center;
}
.note-body .note-seq ol > li:not(:last-child)::after { content: ""; position: absolute; left: .74rem; top: 1.85rem; bottom: -.7rem; width: 2px; background: var(--line); }
.note-body .note-seq.plain ul { list-style: none; margin: 0; padding: 0; }
.note-body .note-seq.plain ul > li { position: relative; padding-left: 1.25rem; margin: 0 0 .6rem; }
.note-body .note-seq.plain ul > li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); }
.note-body .note-seq li b { font-weight: 700; }
.note-body .note-seq li i { display: block; font: .9rem/1.5 var(--sans); font-style: normal; color: var(--ink-faint); margin-top: .15rem; }
.note-body .seq-cap { font: italic .86rem/1.45 var(--serif); color: var(--ink-faint); margin-top: .5rem; }
.note-body .note-stats { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1.1rem 0 1.25rem; align-items: stretch; }
.note-body .note-stat { flex: 1 1 160px; padding: .85rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-top: 3px solid var(--accent); }
.note-body .note-stat b { display: block; font: 700 1.38rem/1.15 var(--serif); color: var(--bar); font-variant-numeric: lining-nums; }
.note-body .note-stat span { display: block; font: .82rem/1.4 var(--sans); color: var(--ink-faint); margin-top: .35rem; }
.note-body .note-stats .seq-cap { flex-basis: 100%; }
.note-body .hx-wrap { font-family: var(--sans); }

/* ---------- category overview (in the panel) ---------- */
.cat-hero { display: flex; gap: 1.1rem; align-items: flex-start; padding-bottom: 1.35rem; border-bottom: 1px solid var(--line); margin-bottom: .5rem; }
.cat-ic { flex: none; width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; background: var(--cc-tint); color: var(--cc-ink); }
.cat-ic svg { width: 28px; height: 28px; }
.cat-hero-b { min-width: 0; }
.cat-kick { font: 700 .68rem/1.3 var(--sans); letter-spacing: .11em; text-transform: uppercase; color: var(--cc-ink); }
.cat-hero h1 { font-size: 1.7rem; margin: .2rem 0 .25rem; line-height: 1.2; }
.cat-hero p { margin: 0; color: var(--ink-soft); }
.cat-stats { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin-top: .65rem; font: 500 .8rem var(--sans); color: var(--ink-faint); }
.cat-stats b { color: var(--ink); font-weight: 700; }
.area-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; font: 700 .72rem/1.3 var(--sans); letter-spacing: .1em;
  text-transform: uppercase; color: var(--cc-ink, var(--ink)); margin: 1.7rem 0 .25rem; padding-bottom: .5rem; border-bottom: 2px solid var(--cc-tint, var(--line));
}
.area-h span { color: var(--ink-faint); font-weight: 600; letter-spacing: .04em; text-transform: none; font-size: .76rem; }
.topic-row { display: flex; align-items: center; gap: 1rem; padding: .7rem .55rem; border-bottom: 1px solid #f0efee; border-radius: .35rem; }
.topic-row:hover { background: var(--bg); }
.tr-main { flex: 1; min-width: 0; }
.tr-t { display: block; font: 700 1.02rem/1.3 var(--serif); color: var(--ink); }
a.tr-t:hover { color: var(--accent); }
.tr-s { display: block; font: .82rem/1.4 var(--sans); color: var(--ink-faint); margin-top: .15rem; }
.tr-acts { display: flex; align-items: center; gap: .6rem; flex: none; }
.tr-m { font: 600 .74rem var(--sans); color: var(--ink-faint); white-space: nowrap; }
.tr-done { display: inline-flex; align-items: center; gap: .2rem; font: 700 .74rem var(--sans); color: var(--teal); }
.tr-done svg { width: 13px; height: 13px; }
.tr-prog { font: 700 .74rem var(--sans); color: var(--accent); }

/* ---------- cards: deck header around the player ---------- */
.deck-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; padding-bottom: 1rem; margin-bottom: .25rem; border-bottom: 1px solid var(--line); }
.deck-head-b { min-width: 0; flex: 1 1 320px; }
.deck-kick { font: 700 .68rem/1.35 var(--sans); letter-spacing: .11em; text-transform: uppercase; color: var(--accent); }
.deck-title { font: 700 1.6rem/1.2 var(--serif); margin: .3rem 0 .2rem; letter-spacing: -.01em; }
.deck-meta { font: 500 .8rem var(--sans); color: var(--ink-faint); }
.deck-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.player-wrap { max-width: 760px; margin: 0 auto; }
.stash-row { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.stash-t { flex: 1; font: 1rem/1.55 var(--serif); }
.stash-src { display: block; margin-top: .35rem; font: 600 .7rem var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.stash-src:hover { color: var(--accent); }

/* ---------- search page ---------- */
.srch-box { position: relative; max-width: 46rem; margin: 0 0 1rem; }
.srch-seg { display: inline-flex; gap: 3px; padding: 3px; margin: 0 0 1rem; background: var(--hover); border: 1px solid var(--line); border-radius: 999px; font-family: var(--sans); }
.srch-seg button { padding: .38rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.srch-seg button span { font-weight: 500; color: var(--ink-faint); margin-left: .15rem; }
.srch-seg button.on { background: var(--bar); color: #fff; }
.srch-seg button.on span { color: #c7d2ea; }
.srch-meta { font: .86rem var(--sans); color: var(--ink-faint); margin: 0 0 .75rem; min-height: 1.2em; }
.srch-meta b { color: var(--ink); }
.srch-results { max-width: 52rem; }
.sr-item { padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cc, var(--line-strong)); border-radius: .6rem; margin-bottom: .75rem; }
.sr-item:hover { box-shadow: var(--shadow-sm); }
.sr-kick { font: 700 .66rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--cc-ink, var(--ink-faint)); }
.sr-t { font: 700 1.18rem/1.3 var(--serif); margin: .25rem 0 .2rem; }
.sr-t a:hover { color: var(--accent); }
.sr-s { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.sr-ctx { margin: .45rem 0 0; font: .84rem/1.45 var(--sans); color: var(--ink-soft); }
.sr-ctx span { font-weight: 700; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-right: .45rem; }
.sr-acts { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.srch-more { display: block; margin: 1rem auto 0; font: 600 .86rem var(--sans); padding: .7rem 1.2rem; border-radius: .5rem; border: 1px solid var(--line-strong); background: var(--surface); }
.srch-more:hover { border-color: var(--bar); }
.srch-empty { padding: 2.5rem 0 1rem; text-align: center; }
.srch-empty .home-chips { justify-content: center; margin-top: 1rem; }

/* ---------- review page wrapper ---------- */
.review-panel { padding: 1.6rem 1.75rem 1.9rem; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; font-family: var(--sans); }
.rv-top .rv-label { font: 700 .68rem var(--sans); letter-spacing: .11em; text-transform: uppercase; color: var(--accent); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200; pointer-events: none;
  background: var(--bar); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font: 600 .84rem var(--sans);
  opacity: 0; transition: opacity .25s ease, transform .25s ease; box-shadow: 0 16px 40px -16px rgba(13, 31, 77, .7); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
   HOME — full-screen panels with cream cover art, as on HemeOncBuddy.org
   ===================================================================== */
.snap-home { width: 100%; flex: 1 0 auto; }
.snap { position: relative; }
.snap .heb-page { flex: none; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.25rem, 3.5vw, 2.6rem) 0 1.6rem; }
.home-h1 { font-size: clamp(2.05rem, 4.6vw, 3.35rem); line-height: 1.06; letter-spacing: -.022em; margin: 0 0 1rem; color: var(--bar); font-weight: 700; text-wrap: balance; }
.home-h1 span { color: var(--accent); }
.home-lede { font-size: clamp(1rem, 1.6vw, 1.12rem); color: var(--ink-soft); max-width: 36rem; margin: 0 0 1.5rem; line-height: 1.6; }
.home-search { position: relative; max-width: 38rem; }
.home-search > svg { position: absolute; left: 1.05rem; top: 1.62rem; transform: translateY(-50%); width: 21px; height: 21px; color: var(--ink-faint); pointer-events: none; }
.home-search input {
  width: 100%; font: 500 1.05rem/1.2 var(--sans); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: 14px; padding: 1rem 7.4rem 1rem 3.05rem; outline: none; box-shadow: 0 12px 30px -20px rgba(13, 31, 77, .55); transition: border-color .15s, box-shadow .15s;
}
.home-search input:focus { border-color: var(--bar); box-shadow: 0 0 0 4px rgba(13, 31, 77, .12), 0 12px 30px -20px rgba(13, 31, 77, .55); }
.home-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.home-search button[type=submit] {
  position: absolute; right: .45rem; top: 1.62rem; transform: translateY(-50%); font: 600 .9rem/1 var(--sans); color: #fff; background: var(--bar);
  border: 0; border-radius: 10px; padding: .74rem 1.05rem; cursor: pointer;
}
.home-search button[type=submit]:hover { background: var(--bar-active); }
.hsugg {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: 0 22px 44px -22px rgba(13, 31, 77, .55); overflow: hidden; font-family: var(--sans);
}
.hsugg a { display: flex; flex-direction: column; gap: .12rem; padding: .62rem 1rem; border-bottom: 1px solid #f0efee; }
.hsugg a:hover, .hsugg a.hi { background: var(--hover); }
.hsugg .hs-t { font: 600 .92rem/1.3 var(--sans); color: var(--ink); }
.hsugg .hs-c { font-size: .74rem; color: var(--ink-faint); }
.hsugg .hs-none { padding: .75rem 1rem; font-size: .84rem; color: var(--ink-faint); border-bottom: 1px solid #f0efee; }
.hsugg a.hs-all { flex-direction: row; align-items: center; gap: .5rem; color: var(--accent); font-weight: 600; font-size: .84rem; border-bottom: 0; }
.hsugg a.hs-all svg { width: 15px; height: 15px; }
.home-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 0; font: 500 .8rem/1 var(--sans); color: var(--ink-faint); align-items: center; }
.home-chips a { color: var(--ink-soft); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .42rem .72rem; }
.home-chips a:hover { border-color: var(--accent); color: var(--accent); }
.home-ctas { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.home-btn {
  display: inline-flex; align-items: center; gap: .45rem; font: 600 .92rem/1 var(--sans); border-radius: 10px; padding: .85rem 1.2rem;
  border: 1.5px solid var(--line-strong); color: var(--ink); background: var(--surface); transition: border-color .15s, background .15s, transform .15s;
}
.home-btn:hover { border-color: var(--bar); transform: translateY(-1px); }
.home-btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.home-btn.pri:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.home-art { position: relative; display: grid; place-items: center; }
.home-art::before {
  content: ""; position: absolute; width: 112%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(190, 18, 60, .12), rgba(13, 31, 77, .10) 55%, transparent 72%);
}
.home-art img { position: relative; width: min(100%, 360px); height: auto; aspect-ratio: 1; border-radius: 50%; filter: drop-shadow(0 18px 36px rgba(13, 31, 77, .28)); }

/* stats band */
.home-stats {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); margin: 0; overflow: hidden;
}
.home-stat { display: flex; gap: .75rem; align-items: center; padding: 1.05rem; color: inherit; border-right: 1px solid var(--line); transition: background .15s; min-width: 0; }
.home-stat:last-child { border-right: 0; }
.home-stat:hover { background: var(--bg); }
.home-stat .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--icbg); color: var(--ic); }
.home-stat .ic svg { width: 20px; height: 20px; }
.home-stat b { display: block; font: 700 1.45rem/1.05 var(--serif); color: var(--bar); font-variant-numeric: lining-nums tabular-nums; }
.home-stat .lb { display: block; font: 500 .76rem/1.25 var(--sans); color: var(--ink-faint); margin-top: .15rem; }
.c-T { --ic: #0d1f4d; --icbg: #e8ecf6; } .c-N { --ic: #be123c; --icbg: #fdecef; } .c-Q { --ic: #0f766e; --icbg: #e3f3f0; }
.c-F { --ic: #b45309; --icbg: #fbf0e2; } .c-A { --ic: #6d28d9; --icbg: #efe9fb; } .c-C { --ic: #15803d; --icbg: #e5f4ea; }

/* the cream cover frame shared by every panel */
.snap-cue { display: none; }
.hc-cover {
  position: relative; display: block; margin: 0 auto; aspect-ratio: 16 / 8.4; width: 100%; border-radius: 22px; overflow: hidden; color: var(--bar);
  background: #faf7f2; box-shadow: 0 30px 60px -40px rgba(13, 31, 77, .65), inset 0 0 0 1px rgba(13, 31, 77, .08); transition: transform .35s ease, box-shadow .35s ease;
}
a.hc-cover:hover { transform: translateY(-3px); box-shadow: 0 38px 70px -40px rgba(13, 31, 77, .7), inset 0 0 0 1px rgba(13, 31, 77, .1); }
.hc-cover::after { content: ""; position: absolute; inset: 18px; z-index: 1; border: 1px solid rgba(13, 31, 77, .16); border-radius: 12px; pointer-events: none; }
.hc-art { position: absolute; inset: 0; background: #faf7f2 var(--img) center right / cover no-repeat; }
.hc-txt { position: absolute; z-index: 2; left: clamp(52px, 7%, 92px); top: 50%; transform: translateY(-50%); max-width: 42%; display: flex; flex-direction: column; gap: .8rem; }
.hc-k { display: flex; align-items: center; gap: .7rem; font: 700 .74rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #57534e; }
.hc-k::after { content: ""; width: 44px; height: 2px; border-radius: 2px; background: var(--accent); }
.hc-t { font: 700 clamp(2.1rem, 4.2vw, 3.6rem)/1.04 var(--serif); letter-spacing: -.02em; color: var(--bar); text-wrap: balance; }
.hc-s { font: italic 400 clamp(1rem, 1.4vw, 1.22rem)/1.4 var(--serif); color: var(--ink-soft); }
.hc-d { font: 400 .98rem/1.6 var(--sans); color: #57534e; max-width: 30rem; }
.hc-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.hc-pills > span { display: inline-flex; align-items: center; gap: .35rem; font: 600 .74rem/1 var(--sans); color: var(--accent); background: #fff; border: 1px solid rgba(190, 18, 60, .2); border-radius: 999px; padding: .4rem .65rem; }
.hc-pills svg { width: 13px; height: 13px; }
.hc-go {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; margin-top: .4rem; font: 600 .95rem/1 var(--sans); color: #fff;
  background: var(--bar); border-radius: 12px; padding: .9rem 1.25rem; transition: background .2s, gap .2s;
}
.hc-go svg { width: 18px; height: 18px; }
a.hc-cover:hover .hc-go, a.hc-go:hover { background: var(--accent); gap: .75rem; }
.hc-go.is-soon { background: #fff; color: var(--ink-faint); border: 1.5px dashed var(--line-strong); }

/* "Today" box: topic of the day, continue strip, browse by system */
.hc-box { aspect-ratio: auto; padding: clamp(1.6rem, 3.4vw, 2.8rem); }
.hc-box > * { position: relative; z-index: 2; }
.hc-box .home-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.35rem; margin: 0; }
.home-row:not(:has(> :not([hidden]))) { display: none; }
.home-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin: 0 0 .9rem; flex-wrap: wrap; }
.home-sec-h h2, .tb-head h2 { margin: 0; font: 700 1.45rem/1.2 var(--serif); letter-spacing: -.01em; color: var(--bar); }
.home-sec-h p, .tb-head p { margin: 0; font: 500 .85rem/1.3 var(--sans); color: var(--ink-faint); }
.heb-tod {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 1.2rem; border: 1px solid var(--line);
  border-radius: 16px; padding: 1.05rem 1.2rem; background: linear-gradient(100deg, #0d1f4d 0%, #1c3268 100%); color: #fff; overflow: hidden;
}
.heb-tod::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(190, 18, 60, .45), transparent); pointer-events: none; }
.heb-tod .tod-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fda4af; }
.heb-tod .tod-ic svg { width: 24px; height: 24px; }
.heb-tod .tod-b { min-width: 0; }
.heb-tod .k { font: 700 .66rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: #fda4af; margin-bottom: .4rem; display: block; }
.heb-tod .nm { font: 700 1.18rem/1.3 var(--serif); color: #fff; }
.heb-tod .mt { font: 500 .78rem/1.3 var(--sans); color: #c7d2ea; margin-top: .2rem; }
.heb-tod .lx { position: relative; z-index: 1; display: flex; gap: .5rem; flex-wrap: wrap; }
.heb-tod .lx a { font: 600 .82rem/1 var(--sans); color: var(--bar); background: #fff; border-radius: 9px; padding: .68rem .9rem; white-space: nowrap; }
.heb-tod .lx a + a { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.heb-tod .lx a:hover { filter: brightness(.95); }
.heb-new-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.heb-new-card { display: block; border: 1px solid rgba(13, 31, 77, .1); border-radius: 12px; padding: .72rem .9rem; background: #fffdf9; transition: border-color .15s, transform .15s, box-shadow .15s; }
.heb-new-card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.heb-new-badge { display: inline-block; font: 700 .62rem/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--bar); background: rgba(13, 31, 77, .07); border-radius: 999px; padding: .22rem .48rem; margin-bottom: .4rem; }
.heb-new-card.is-note .heb-new-badge { color: var(--accent); background: var(--accent-tint); }
.heb-new-name { font: 700 .9rem/1.3 var(--sans); color: var(--ink); }
.heb-new-meta { font: 500 .74rem/1.25 var(--sans); color: var(--ink-faint); margin-top: .25rem; }
.tb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin: 0 0 .9rem; }
.tb-head p { margin-top: .2rem; }
.exam-seg { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; background: #f3efe8; border: 1px solid rgba(13, 31, 77, .1); border-radius: .7rem; font-family: var(--sans); }
.exam-seg button { padding: .5rem 1.1rem; border-radius: .5rem; font-weight: 700; font-size: .88rem; color: var(--ink-soft); text-align: left; }
.exam-seg button small { display: block; font-weight: 500; font-size: .7rem; color: var(--ink-faint); margin-top: 1px; }
.exam-seg button:hover { color: var(--ink); }
.exam-seg button.on { background: var(--bar); color: #fff; box-shadow: 0 4px 12px -6px rgba(13, 31, 77, .6); }
.exam-seg button.on small { color: #c7d2ea; }
.sys-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.sys-tile {
  position: relative; overflow: hidden; display: flex; gap: .65rem; align-items: center; padding: .52rem .75rem; background: #fffdf9;
  border: 1px solid rgba(13, 31, 77, .1); border-radius: 12px; transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0;
}
.sys-tile:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -20px rgba(13, 31, 77, .55); border-color: var(--line-strong); }
.sys-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--cc-tint); color: var(--cc-ink); }
.sys-ic svg { width: 18px; height: 18px; }
.sys-b { display: flex; flex-direction: column; min-width: 0; }
.sys-n { font: 700 .88rem/1.25 var(--sans); color: var(--ink); hyphens: auto; overflow-wrap: anywhere; }
.sys-m { font: 500 .72rem/1.3 var(--sans); color: var(--ink-faint); margin-top: .1rem; }
.sys-p { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--cc-ink); }

/* HemeOncBuddy family panel */
.fam-box { padding: clamp(1.6rem, 3.4vw, 2.8rem); }
.fam-head { display: flex; flex-direction: column; gap: .7rem; max-width: 46rem; margin: 0 0 1.5rem; }
.fam-t { margin: 0; font: 700 clamp(1.8rem, 3.2vw, 2.7rem)/1.06 var(--serif); letter-spacing: -.018em; color: var(--bar); text-wrap: balance; }
.fam-s { margin: 0; font: italic 400 clamp(1rem, 1.35vw, 1.18rem)/1.5 var(--serif); color: var(--ink-soft); }
.fam-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.fam-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: 1.2rem 1.25rem 1.15rem; background: #fffdf9;
  border: 1px solid rgba(13, 31, 77, .1); border-radius: 16px; transition: transform .2s, box-shadow .2s, border-color .2s; min-width: 0;
}
a.fam-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -24px rgba(13, 31, 77, .55); border-color: rgba(13, 31, 77, .22); }
.fam-card img { width: 72px; height: 72px; border-radius: 50%; margin-bottom: .5rem; box-shadow: 0 12px 24px -14px rgba(13, 31, 77, .7); }
.fam-n { font: 700 1.22rem/1.2 var(--serif); color: var(--bar); }
.fam-a { font: 700 .66rem/1.35 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.fam-b { flex: 1; margin-top: .2rem; font: .88rem/1.5 var(--sans); color: var(--ink-soft); }
.fam-go { display: inline-flex; align-items: center; gap: .35rem; margin-top: .65rem; font: 600 .84rem/1 var(--sans); color: var(--bar); }
.fam-go svg { width: 15px; height: 15px; transition: transform .2s; }
a.fam-card:hover .fam-go { color: var(--accent); }
a.fam-card:hover .fam-go svg { transform: translateX(3px); }
.fam-card.is-here { border-color: rgba(190, 18, 60, .3); box-shadow: inset 0 0 0 1px rgba(190, 18, 60, .18); }
.fam-card.is-here .fam-go { color: var(--accent); }
.fam-card.is-here .fam-go::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.fam-cta { margin-top: 1.5rem; }
.fam-grid.small .fam-card { padding: 1rem 1.05rem; background: var(--surface); }
.fam-grid.small .fam-card img { width: 56px; height: 56px; }
.fam-grid.small .fam-n { font-size: 1.08rem; }

/* Desktop: each panel fills the screen and the page settles on it as you scroll */
@media (min-width: 900px) and (min-height: 620px) {
  html.snap-on { scroll-snap-type: y proximity; scroll-padding-top: var(--header-h); }
  html.snap-on .snap { min-height: calc(100vh - var(--header-h)); scroll-snap-align: start; display: flex; flex-direction: column; justify-content: center; padding: 1.25rem 0; }
  html.snap-on .snap-cover .hc-cover { width: min(100%, calc((100vh - var(--header-h) - 6rem) * 16 / 8.4)); }
  html.snap-on .snap-cue {
    position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .2rem;
    font: 600 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
  }
  html.snap-on .snap-cue svg { width: 22px; height: 22px; animation: snapcue 2s ease-in-out infinite; }
  @keyframes snapcue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
  .snap-dots { position: fixed; right: 7px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 10px; }
  .snap-dots a { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; background: rgba(13, 31, 77, .18); transition: background .2s, transform .2s; }
  .snap-dots a:hover { background: rgba(13, 31, 77, .45); }
  .snap-dots a.on { background: var(--accent); transform: scale(1.3); }
  .snap-dots a span { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 600 .74rem/1 var(--sans); color: #fff; background: var(--bar); border-radius: 6px; padding: .35rem .5rem; opacity: 0; pointer-events: none; transition: opacity .15s; }
  .snap-dots a:hover span, .snap-dots a:focus-visible span { opacity: 1; }
}
@media (min-width: 1400px) { .snap-dots { right: 18px; } }

/* Reveal: content rises and fades in as each panel arrives */
html.snap-js .snap .rv, html.snap-js .snap-today .home-row > * {
  opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
}
html.snap-js .snap .hc-art { transform: scale(1.24) translateY(-34px); transition: transform 2.1s cubic-bezier(.16, .8, .2, 1); }
html.snap-js .snap-cover .hc-cover, html.snap-js .snap-today .hc-cover, html.snap-js .snap-box .hc-cover {
  opacity: 0; transform: translateY(130px) scale(.88) rotateX(8deg); transform-origin: 50% 100%;
  box-shadow: 0 120px 140px -50px rgba(13, 31, 77, .6), inset 0 0 0 1px rgba(13, 31, 77, .08);
  transition: opacity 1s ease, transform 1.45s cubic-bezier(.16, .8, .2, 1), box-shadow 1.8s cubic-bezier(.16, .8, .2, 1);
}
.snap-cover .heb-page, .snap-today .heb-page, .snap-box .heb-page { perspective: 1400px; }
html.snap-js .snap-cover.in .hc-cover, html.snap-js .snap-today.in .hc-cover, html.snap-js .snap-box.in .hc-cover {
  opacity: 1; transform: none; box-shadow: 0 30px 60px -40px rgba(13, 31, 77, .65), inset 0 0 0 1px rgba(13, 31, 77, .08);
}
html.snap-js .snap-cover.in a.hc-cover:hover { transform: translateY(-3px); box-shadow: 0 38px 70px -40px rgba(13, 31, 77, .7), inset 0 0 0 1px rgba(13, 31, 77, .1); }
html.snap-js .snap-cover .rv { transform: translateY(56px); }
html.snap-js .snap-cover .hc-txt > .rv { transition-delay: calc(.35s + var(--i, 0) * .1s); }
html.snap-js .snap-box .fam-box > .rv:nth-child(2) { transition-delay: .3s; }
html.snap-js .snap-box .fam-box > .rv:nth-child(3) { transition-delay: .45s; }
html.snap-js .snap.in .rv, html.snap-js .snap-today.in .home-row > * { opacity: 1; transform: none; }
html.snap-js .snap.in .hc-art { transform: none; }
.snap-today .home-row > :nth-child(2) { transition-delay: .12s; }
.snap-today .home-row > :nth-child(3) { transition-delay: .22s; }

/* Hero intro: plays on first load and again whenever you scroll back to the top */
@keyframes heroUp { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
@keyframes heroLogo { from { opacity: 0; transform: scale(1.35); } to { opacity: 1; transform: none; } }
@keyframes heroGlow { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
html.snap-js .snap-hero .home-h1, html.snap-js .snap-hero .home-lede, html.snap-js .snap-hero .home-search, html.snap-js .snap-hero .home-chips,
html.snap-js .snap-hero .home-ctas, html.snap-js .snap-hero .home-stat { animation: heroUp 1.1s cubic-bezier(.16, .8, .2, 1) both; }
html.snap-js .snap-hero .home-h1 { animation-delay: .1s; }
html.snap-js .snap-hero .home-lede { animation-delay: .25s; }
html.snap-js .snap-hero .home-search { animation-delay: .4s; }
html.snap-js .snap-hero .home-chips { animation-delay: .52s; }
html.snap-js .snap-hero .home-ctas { animation-delay: .62s; }
html.snap-js .snap-hero .home-stats { animation: heroUp 1.1s cubic-bezier(.16, .8, .2, 1) .72s both; }
html.snap-js .snap-hero .home-stat { animation-delay: calc(.8s + var(--s, 0) * .09s); }
html.snap-js .snap-hero .home-art img { animation: heroLogo 2s cubic-bezier(.16, .8, .2, 1) .15s both; }
html.snap-js .snap-hero .home-art::before { animation: heroGlow 1.8s cubic-bezier(.16, .8, .2, 1) .1s both; }
html.snap-js .snap-hero .snap-cue { animation: heroUp 1s ease 1.6s both; }
html.snap-js .snap-hero.off .home-h1, html.snap-js .snap-hero.off .home-lede, html.snap-js .snap-hero.off .home-search, html.snap-js .snap-hero.off .home-chips,
html.snap-js .snap-hero.off .home-ctas, html.snap-js .snap-hero.off .home-stat, html.snap-js .snap-hero.off .home-stats,
html.snap-js .snap-hero.off .home-art img, html.snap-js .snap-hero.off .home-art::before { animation: none; opacity: 0; }

/* Tablet and phone: regular scroll, picture on top and text below */
@media (max-width: 899px) {
  .snap-cover, .snap-today, .snap-box { padding: .55rem 0; }
  .snap-cover .heb-page, .snap-today .heb-page, .snap-box .heb-page { padding-top: 0; padding-bottom: 0; }
  .hc-cover { aspect-ratio: auto; border-radius: 18px; }
  .hc-cover::after { inset: 10px; }
  .hc-art { position: relative; display: block; height: auto; aspect-ratio: 1 / .9; max-height: 420px; margin-inline: auto; background-image: var(--img-m); background-position: center; background-size: cover; }
  .hc-txt { position: relative; left: auto; top: auto; transform: none; max-width: none; padding: 1.1rem 1.4rem 1.5rem; gap: .55rem; }
  .hc-t { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .hc-box, .fam-box { padding: 1.4rem 1.25rem; }
  .snap-dots { display: none; }
  .snap-hero .heb-page { padding-bottom: .75rem; }
  .snap-home { padding-bottom: 2.25rem; }
}
@media (min-width: 560px) and (max-width: 899px) {
  /* the art is narrower than the card here: feather its sides into the cream */
  .hc-art { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
}
@media (prefers-reduced-motion: reduce) {
  html.snap-js .snap-hero *, html.snap-js .snap-hero .home-art::before { animation: none !important; opacity: 1 !important; }
  html.snap-js .snap .rv, html.snap-js .snap-hero .home-hero > *, html.snap-js .snap-hero .home-stats, html.snap-js .snap-today .home-row > *,
  html.snap-js .snap .hc-art, html.snap-js .snap-cover .hc-cover, html.snap-js .snap-today .hc-cover, html.snap-js .snap-box .hc-cover { opacity: 1; transform: none; transition: none; }
  .hc-cover, .hc-go { transition: none; }
  a.hc-cover:hover { transform: none; }
}

/* =====================================================================
   SECTION LANDINGS — cream cover in the empty panel (Notes, Cards, Search)
   ===================================================================== */
.panel.has-cover { display: block; padding: 1.4rem; text-align: left; }
.panel.has-cover > .empty-note { display: none; }
.panel.has-cover > .empty-cont, .panel.has-cover > .empty-sub { margin: 1.1rem .4rem 0; }
.heb-ld { perspective: 1400px; }
.heb-cover {
  position: relative; margin: 0; aspect-ratio: 16 / 8.4; border-radius: 18px; overflow: hidden; background: #faf7f2;
  box-shadow: 0 24px 44px -30px rgba(13, 31, 77, .7), inset 0 0 0 1px rgba(13, 31, 77, .08);
}
.heb-cover::after { content: ""; position: absolute; inset: 16px; z-index: 1; border: 1px solid rgba(13, 31, 77, .18); border-radius: 10px; pointer-events: none; }
.heb-cover-art { position: absolute; inset: 0; background: #faf7f2 center right / cover no-repeat; }
.heb-cover figcaption { position: absolute; z-index: 2; left: clamp(44px, 7%, 76px); top: 50%; transform: translateY(-50%); max-width: 44%; display: flex; flex-direction: column; gap: .7rem; color: var(--bar); }
.heb-cover .k { display: flex; align-items: center; gap: .7rem; font: 700 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #57534e; }
.heb-cover .k::after { content: ""; width: 42px; height: 2px; border-radius: 2px; background: var(--accent); }
.heb-cover .t { font: 700 clamp(1.8rem, 3.2vw, 2.8rem)/1.06 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.heb-cover .s { font: italic 400 clamp(.95rem, 1.25vw, 1.12rem)/1.4 var(--serif); color: var(--ink-soft); }
.heb-cover-go { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; font: 500 .9rem/1.35 var(--sans); color: #57534e; }
.heb-cover-go b { color: var(--bar); font-weight: 700; }
.heb-cover-go .ar {
  flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--accent);
  border: 1px solid rgba(190, 18, 60, .25); box-shadow: 0 6px 14px -10px rgba(190, 18, 60, .6); transform: scaleX(-1); animation: hebnudge 2.4s ease-in-out infinite;
}
.heb-cover-go .ar svg { width: 16px; height: 16px; }
.heb-cover-go.up .ar { transform: rotate(-90deg); animation-name: hebnudgeUp; }
@keyframes hebnudge { 0%, 100% { translate: 0; } 50% { translate: -4px; } }
@keyframes hebnudgeUp { 0%, 100% { translate: 0; } 50% { translate: 0 -4px; } }
@keyframes hebCoverIn { from { opacity: 0; transform: translateY(130px) scale(.88) rotateX(8deg); box-shadow: 0 120px 140px -50px rgba(13, 31, 77, .6); } to { opacity: 1; transform: none; box-shadow: 0 24px 44px -30px rgba(13, 31, 77, .7); } }
@keyframes hebArtIn { from { transform: scale(1.24) translateY(-34px); } to { transform: none; } }
@keyframes hebTxtIn { from { opacity: 0; transform: translateY(56px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .heb-cover { transform-origin: 50% 100%; animation: hebCoverIn 1.45s cubic-bezier(.16, .8, .2, 1) both; }
  .heb-cover-art { animation: hebArtIn 2.1s cubic-bezier(.16, .8, .2, 1) both; }
  .heb-cover figcaption > * { animation: hebTxtIn .9s cubic-bezier(.2, .7, .2, 1) both; }
  .heb-cover figcaption > :nth-child(1) { animation-delay: .35s; }
  .heb-cover figcaption > :nth-child(2) { animation-delay: .45s; }
  .heb-cover figcaption > :nth-child(3) { animation-delay: .55s; }
  .heb-cover figcaption > :nth-child(4) { animation-delay: .68s; }
}
@media (prefers-reduced-motion: reduce) { .heb-cover-go .ar { animation: none; } }
.srch-empty .heb-ld { margin: .25rem 0 1.25rem; text-align: left; }
.srch-empty:has(.heb-ld) { padding-top: .5rem; }
.srch-empty:has(.heb-ld) > .empty-note { display: none; }
.srch-empty:has(.heb-ld) .home-chips { justify-content: flex-start; }
.review-cover { margin: 0 0 1.25rem; }
@media (max-width: 640px) {
  .panel.has-cover { padding: 3rem 1.25rem; text-align: center; }
  .panel.has-cover .heb-ld, .srch-empty .heb-ld, .review-cover { display: none; }
  .panel.has-cover > .empty-note, .srch-empty:has(.heb-ld) > .empty-note { display: block; }
  .panel.has-cover > .empty-cont, .panel.has-cover > .empty-sub { margin: 1rem 0 0; }
  .srch-empty:has(.heb-ld) .home-chips { justify-content: center; }
}

/* =====================================================================
   ABOUT — same layout as the HemeOncBuddy.org About page
   ===================================================================== */
.about-layout { max-width: 860px; }
.about-section { margin-bottom: 3rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.about-section h2 { font-size: 1.5rem; margin: 0 0 1rem; letter-spacing: -.01em; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.about-section h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; color: var(--ink); }
.about-section p { color: var(--ink-soft); margin: .75rem 0; }
.about-section p a, .about-section .contact-block a { color: var(--accent); font-weight: 600; }
.about-section p a:hover { text-decoration: underline; }
.about-section strong { color: var(--ink); }
.about-section .pullquote { border-left: 3px solid var(--accent); padding: .25rem 0 .25rem 1rem; margin: 1rem 0; color: var(--ink); font-style: italic; }
.person { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; align-items: start; margin: 1.5rem 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; }
.person-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: center 30%; border: 2px solid var(--line); }
.person-info h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.person-info .role { font-family: var(--sans); font-size: .8125rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.person-info .affiliation { font-size: .95rem; color: var(--ink-soft); margin: .25rem 0 .75rem; }
.person-info p { margin: .5rem 0; }
.contact-block { padding: .5rem 0; font-size: 1rem; color: var(--ink-soft); }
.contact-block a:hover { text-decoration: underline; }
.fam-about { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-bottom: .5rem; }
.fam-about img { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 14px 28px -16px rgba(13, 31, 77, .65); }
.fam-about p:first-child { margin-top: 0; }
@media (max-width: 540px) {
  .person { grid-template-columns: 1fr; text-align: center; }
  .person .person-photo { margin: 0 auto; }
  .person-info p, .person-info .pullquote { text-align: left; }
  .fam-about { grid-template-columns: 1fr; }
  .fam-about img { width: 72px; height: 72px; }
}

/* ---------- note figures (original teaching infographics; StepStash Step 1) ---------- */
.nfig { margin: 1.1rem 0 1.6rem; }
.nfig-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; }
.nfig-open img { display: block; width: 100%; height: auto; border-radius: 14px; background: #fff; box-shadow: 0 16px 34px -26px rgba(13, 31, 77, .6); transition: box-shadow .15s, transform .15s; }
.nfig-open:hover img { box-shadow: 0 20px 40px -24px rgba(13, 31, 77, .6); }
.nfig figcaption { margin: .55rem .2rem 0; font: .84rem/1.5 var(--sans); color: var(--ink-faint); }
.nfig-hint { display: none; }
@media (hover: none) { .nfig-hint { display: inline; margin-left: .45rem; color: var(--accent); font-weight: 600; white-space: nowrap; } }
html.nfig-lock, html.nfig-lock body { overflow: hidden; }
.nfig-lb { position: fixed; inset: 0; z-index: 300; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: rgba(8, 18, 55, .86); padding: 4rem 1.25rem 2rem; }
.nfig-lb-in { width: min(1100px, 100%); margin: 0 auto; }
.nfig-lb img { display: block; width: 100%; height: auto; border-radius: 14px; background: #fff; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.nfig-lb p { margin: .8rem .2rem 0; font: .92rem/1.5 var(--sans); color: #e2e8f0; max-width: 70ch; }
.nfig-x { position: fixed; top: .85rem; right: .85rem; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--bar); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5); }
.nfig-x svg { width: 20px; height: 20px; }
.nfig-x:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
@media (max-width: 640px) {
  .nfig-lb { padding: 4rem .5rem 1.5rem; }
  .nfig-lb-in { width: 800px; max-width: none; }   /* phones: native size, swipe sideways; pinch zoom still works */
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1180px) {
  .nr-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .nr-toc { position: static; order: -1; max-height: none; margin: 0 0 1.5rem; }
  .nr-toc ol { columns: 2; column-gap: 1.5rem; }
  .nr-toc li { break-inside: avoid; }
}
@media (max-width: 1100px) {
  .home-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-stat:nth-child(3) { border-right: 0; }
  .home-stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .heb-new-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nr-mat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nr-mat-l { grid-column: 1 / -1; padding: .3rem .4rem .2rem; }
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; gap: 1rem; }
  .sidebar { position: static; max-height: none; overflow: visible; }
  .sb-toggle {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .7rem .75rem; border-radius: .5rem;
    font: 600 .92rem var(--sans); color: var(--bar); text-align: left;
  }
  .sb-toggle:hover { background: var(--hover); }
  .sb-toggle-t { flex: 1; }
  .sb-toggle-n { font: 600 .74rem var(--sans); color: var(--ink-faint); }
  .sb-toggle-c { display: flex; color: var(--ink-faint); transition: transform .15s; transform: rotate(90deg); }
  .sb-toggle-c svg { width: 16px; height: 16px; }
  .sidebar.sb-collapsed .sb-toggle-c { transform: none; }
  .sidebar .sb-body { padding-top: .35rem; }
  .sidebar.sb-collapsed .sb-body { display: none; }
  .sidebar:not(.sb-collapsed) .sb-toggle { margin-bottom: .2rem; border-bottom: 1px solid var(--line); border-radius: .5rem .5rem 0 0; }
}
@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-art { order: -1; justify-self: center; }
  .home-art img { width: 132px; }
  .home-art::before { width: 150%; }
}
@media (max-width: 760px) {
  .heb-tod { grid-template-columns: auto 1fr; }
  .heb-tod .lx { grid-column: 1 / -1; }
  .heb-tod .lx a { flex: 1 1 auto; text-align: center; }
  .sys-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fam-grid { grid-template-columns: 1fr; gap: .6rem; }
  .fam-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: .95rem; row-gap: .15rem; align-items: start; padding: 1rem 1.05rem; }
  .fam-card img, .fam-grid.small .fam-card img { grid-row: 1 / span 4; width: 56px; height: 56px; margin: 0; }
  .fam-b { margin-top: .1rem; }
  .fam-go { margin-top: .4rem; }
}
@media (max-width: 640px) {
  .heb-page { padding: 1.25rem 1rem 3rem; }
  .heb-page-header h1 { font-size: 1.6rem; }
  .heb-page-header p { font-size: .96rem; margin-bottom: 1rem; }
  .toolbar { gap: .4rem; }
  .toolbar .search { min-width: 0; flex-basis: 100%; }
  .tool-btn { flex: 1 1 auto; justify-content: center; }
  .panel { padding: 1.25rem 1.1rem; border-radius: .65rem; }
  .panel.is-empty { padding: 3rem 1.25rem; min-height: 200px; }
  .nr-hero { padding: 1.6rem 1.35rem 1.4rem; min-height: 0; border-radius: 12px; }
  .nr-ic { width: 84px; height: 84px; right: .9rem; top: 1.1rem; transform: none; }
  .nr-title { font-size: 1.55rem; }
  .nr-sub { font-size: .98rem; }
  .nr-mat { grid-template-columns: 1fr; }
  .nr-toc ol { columns: 1; }
  .nr-next { grid-template-columns: 1fr; }
  .nr-next a.next { text-align: left; }
  .note-body { font-size: 1.02rem; line-height: 1.68; }
  .note-body > h2 { font-size: 1.26rem; }
  .cat-hero { gap: .85rem; }
  .cat-ic { width: 46px; height: 46px; border-radius: 12px; }
  .cat-hero h1 { font-size: 1.4rem; }
  .topic-row { flex-wrap: wrap; gap: .45rem .75rem; padding: .7rem .2rem; }
  .tr-acts { width: 100%; justify-content: flex-start; }
  .deck-title { font-size: 1.35rem; }
  .review-panel { padding: 1.1rem 1rem 1.3rem; }
}
@media (max-width: 560px) {
  .home-search input { font-size: 1rem; padding: .95rem 5.6rem .95rem 2.8rem; }
  .home-search > svg { left: .9rem; width: 19px; height: 19px; top: 1.55rem; }
  .home-search button[type=submit] { padding: .68rem .8rem; top: 1.55rem; }
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-stat { padding: .85rem .8rem; gap: .6rem; }
  .home-stat:nth-child(3) { border-right: 1px solid var(--line); }
  .home-stat:nth-child(2n) { border-right: 0; }
  .home-stat:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .home-stat .ic { width: 34px; height: 34px; border-radius: 10px; }
  .home-stat b { font-size: 1.2rem; }
  .heb-new-row { grid-template-columns: 1fr; }
  .sys-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .sys-tile { padding: .55rem .6rem; gap: .5rem; }
  .sys-ic { width: 30px; height: 30px; border-radius: 9px; }
  .sys-ic svg { width: 16px; height: 16px; }
  .sys-n { font-size: .82rem; }
  .home-ctas .home-btn { flex: 1 1 auto; justify-content: center; }
  .exam-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   PRINT — clean handout of the open note (Cmd/Ctrl+P → Save as PDF)
   ===================================================================== */
@media print {
  @page { margin: .7in .6in .75in; }
  html, body { background: #fff !important; color: #1c1917 !important; font-size: 10.5pt; display: block; min-height: 0; }
  html { overflow: visible; }
  .heb-header-stack { position: static; }
  .heb-nav { background: #fff !important; color: #1c1917 !important; border-bottom: 2px solid #be123c; padding: 0 0 .4rem; min-height: 0; justify-content: flex-start; }
  .heb-brand { position: static; transform: none; color: #1c1917 !important; }
  .heb-brand-t { display: block !important; color: #1c1917 !important; }
  .snap-dots, .snap-cue, .heb-ld { display: none !important; }
  .heb-nav-links, .heb-nav-right, .heb-msearch, .heb-burger, .heb-menu, .heb-disclaimer-bar, .heb-footer-bar,
  .heb-page-header, .toolbar, .sidebar, .nr-bar, .nr-mat, .nr-next, .heb-skip, .toast { display: none !important; }
  .heb-page { max-width: none; padding: .3rem 0 0; }
  .layout { display: block; }
  .panel { border: 0; padding: 0; box-shadow: none; }
  .nr-hero { background: #fff !important; color: #1c1917 !important; padding: .6rem 0 .5rem; min-height: 0; border-bottom: 1px solid #d6d3d1; border-radius: 0; }
  .nr-hero::before, .nr-hero::after, .nr-ic { display: none; }
  .nr-kick { color: #be123c !important; }
  .nr-title { color: #1c1917 !important; font-size: 20pt; max-width: none; }
  .nr-sub, .nr-meta, .nr-meta a { color: #44403c !important; }
  .nr-grid { display: block; }
  .nr-toc { display: none !important; }
  .nr-hy { break-inside: avoid; margin-top: .6rem; }
  .nr-hy, .note-body, .heb-logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .note-body { font-size: 10.5pt; line-height: 1.5; }
  .note-body > h2 { font-size: 13.5pt; margin-top: 1rem; break-after: avoid; }
  .note-body p, .note-body li, .note-body .hx-wrap, .note-body .note-stat { break-inside: avoid; }
  .nfig { break-inside: avoid; margin: .6rem 0 1rem; }
  .nfig-open img { box-shadow: none; border: 1px solid #e7e5e4; }
  .nfig-hint, .nfig-lb { display: none !important; }
  a { color: inherit !important; }
}
