/* =====================================================================
   Careless Mistakes · GC Notes shop
   Same palette and type as the main site: charcoal, two blues, sage,
   cream sticky notes. Inter for headings and labels, Computer Modern
   (KaTeX_Main) for body text.
   ===================================================================== */

@font-face { font-family: "CM Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/KaTeX_Main-Regular.woff2") format("woff2"); }
@font-face { font-family: "CM Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/KaTeX_Main-Italic.woff2") format("woff2"); }
@font-face { font-family: "CM Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/KaTeX_Main-Bold.woff2") format("woff2"); }
@font-face { font-family: "CM Serif"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/KaTeX_Main-BoldItalic.woff2") format("woff2"); }

:root {
  --ink: #424242;
  --ink-2: #575757;
  --muted: #767676;
  --blue: #8EB3D2;
  --blue-ink: #4E7BA3;
  --light: #C9D9E6;
  --sage: #BCC7B7;
  --sage-tint: #EEF1EC;
  --cream: #FFFBF1;
  --cream-edge: #E9E0C9;
  --tint: #EEF4F9;
  --rule: #DDE6EF;
  --grid: #E4ECF4;
  --bezel: #232323;
  --paper: #FFFFFF;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Latin Modern Roman", "LM Roman 10", "CM Serif", "Computer Modern Serif", Georgia, serif;

  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 40px);
  --r: 10px;
  --shadow-1: 0 1px 2px rgba(66, 66, 66, .06), 0 8px 22px -12px rgba(66, 66, 66, .24);
  --shadow-2: 0 2px 4px rgba(66, 66, 66, .05), 0 28px 56px -28px rgba(66, 66, 66, .42);
  --page-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 18px 40px -18px rgba(40, 40, 40, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); margin: 0; text-wrap: balance; }
button { font: inherit; color: inherit; }
::selection { background: var(--light); }
:focus-visible { outline: 2.5px solid var(--blue-ink); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; font-family: var(--sans); z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- type ---------- */
.label {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin: 0 0 14px;
}
h1 { font-weight: 800; font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.03; letter-spacing: -.035em; }
h2 { font-weight: 700; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.1; letter-spacing: -.024em; }
h3 { font-weight: 700; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.012em; }
h4 { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.lead { font-style: italic; font-size: clamp(1.13rem, 1.6vw, 1.32rem); color: var(--ink-2); line-height: 1.5; max-width: 36em; }
.sup { font-size: .72em; vertical-align: .45em; line-height: 0; }

kbd {
  font-family: var(--sans); font-size: .74em; font-weight: 600; line-height: 1;
  display: inline-block; padding: 4px 7px 3px; border-radius: 5px;
  background: #fff; color: var(--ink);
  border: 1px solid #b4c0cc; border-bottom-width: 2px;
  white-space: nowrap; vertical-align: .08em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 16px; line-height: 1;
  padding: 15px 22px; border-radius: 8px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap; background: none;
  transition: transform .18s var(--ease), background-color .18s, box-shadow .18s, border-color .18s, color .18s;
}
.btn .arr { transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn:hover .arr.down { transform: translateY(3px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2f2f2f; transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .55); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--tint); }
.btn-blue { background: var(--blue); color: var(--ink); }
.btn-blue:hover { background: #9fc0db; transform: translateY(-1px); }
.btn-ghost-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }
.btn-sm { padding: 11px 16px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.wa-icon { width: 18px; height: 18px; flex: none; }

/* ---------- header ---------- */
.mark { width: 38px; height: auto; flex: none; }
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-head.scrolled { border-bottom-color: var(--rule); }
.head-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--ink); }
.brand .tag { font-size: 11px; letter-spacing: .14em; color: var(--blue-ink); border: 1.5px solid var(--light); border-radius: 5px; padding: 4px 7px 3px; margin-left: 2px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-family: var(--sans); font-size: 15px; font-weight: 500; }
.nav > a:not(.btn) { text-decoration: none; padding: 9px 12px; border-radius: 7px; color: var(--ink-2); }
.nav > a:not(.btn):hover { background: var(--tint); color: var(--ink); }
.nav .btn { margin-left: 8px; }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--blue); color: var(--ink); font-size: 12.5px; font-weight: 700;
}
.count[data-n="0"] { background: rgba(255, 255, 255, .22); color: #fff; }
.nav-toggle { display: none; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section.tight { padding: clamp(48px, 6vw, 72px) 0; }
.band-tint { background: var(--tint); }
.band-sage { background: var(--sage-tint); }
.band-ink { background: var(--ink); color: #f1f1f1; }
.band-ink h2, .band-ink h3, .band-ink h4 { color: #fff; }
.band-ink .label { color: var(--blue); }
.band-ink .lead { color: #d6d6d6; }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2 { margin-bottom: 16px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .lead { margin-left: auto; margin-right: auto; }

/* reveal on scroll */
.rv { transform: translateY(14px); transition: transform .7s var(--ease); }  /* visible at rest; only slides up a little as it arrives */
.rv.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0s !important; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(40px, 6vw, 76px) 0 0; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 18%; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 22px; }
.uline { position: relative; white-space: nowrap; }
.uline svg { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; }
.uline path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.stack { position: relative; aspect-ratio: 1 / 1.02; max-width: 560px; margin-left: auto; width: 100%; }
.stack .pg {
  position: absolute; width: 60%; background: #fff; border-radius: 3px;
  box-shadow: var(--page-shadow); overflow: hidden;
  transition: transform .5s var(--ease);
}
.stack .pg img { width: 100%; }
.stack .pg.back { right: 0; top: 4%; transform: rotate(6deg); }
.stack .pg.mid { left: 2%; top: 9%; transform: rotate(-6deg); }
.stack .pg.front { left: 22%; top: 0; transform: rotate(1.5deg); z-index: 2; }
.stack:hover .pg.back { transform: rotate(8deg) translate(10px, 4px); }
.stack:hover .pg.mid { transform: rotate(-8deg) translate(-10px, 6px); }
.tape { position: absolute; z-index: 3; width: 96px; height: 26px; background: rgba(142, 179, 210, .58); top: -11px; left: 48%; transform: rotate(-4deg); }

.gc-card {
  position: absolute; z-index: 4; left: -4%; bottom: 3%; width: 47%;
  background: #fff; border-radius: 14px; padding: 13px 13px 12px;
  box-shadow: var(--shadow-2); border: 1px solid var(--rule);
}
.gc-card .label { font-size: 11px; margin-bottom: 9px; }
.bezel { background: var(--bezel); border-radius: 10px; padding: 7px; }
.bezel img { width: 100%; border-radius: 3px; }
.gc-card p { font-family: var(--sans); font-size: 12.5px; line-height: 1.4; margin: 10px 2px 0; color: var(--ink-2); }
.scrawl {
  position: absolute; z-index: 5; right: 1%; bottom: 7%; margin: 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--blue-ink);
  background: var(--cream); border: 1px solid var(--cream-edge); padding: 10px 14px 9px; border-radius: 4px;
  box-shadow: var(--shadow-1); transform: rotate(-3deg); max-width: 44%; line-height: 1.3;
}

.facts { list-style: none; margin: clamp(48px, 6vw, 72px) 0 0; padding: 26px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1.5px solid var(--ink); }
.facts li { display: flex; flex-direction: column; gap: 4px; }
.facts .v { font-family: var(--sans); font-weight: 800; font-size: clamp(1.9rem, 3vw, 2.5rem); letter-spacing: -.03em; line-height: 1; }
.facts .v em { font-style: normal; color: var(--blue); }
.facts .t { font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }

/* ---------- anatomy of a page ---------- */
.anat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.anat-col { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; }
.a-note {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start;
  background: #fff; border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 16px 15px;
  box-shadow: var(--shadow-1); cursor: default; transition: border-color .2s, transform .2s var(--ease);
  text-align: left; width: 100%;
}
.a-note.on { border-color: var(--blue-ink); transform: translateY(-2px); }
.a-note h3 { font-size: 1.02rem; margin: 3px 0 6px; }
.a-note p { font-size: 16.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.pin {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 13.5px; flex: none;
}
.a-note.plain { background: var(--cream); border-color: var(--cream-edge); box-shadow: none; }
.a-note.plain .pin { background: var(--blue); color: var(--ink); }

.anat-fig { margin: 0; position: relative; }
.anat-page { position: relative; background: #fff; border-radius: 4px; box-shadow: var(--page-shadow); }
.anat-page img { width: 100%; border-radius: 4px; }
.anat-page svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.anat-page .hl { fill: rgba(142, 179, 210, 0); stroke: var(--blue-ink); stroke-width: 3; stroke-dasharray: 7 6; opacity: .0; transition: opacity .25s, fill .25s; }
.anat-page g.on .hl { opacity: 1; fill: rgba(142, 179, 210, .16); stroke-dasharray: none; }
.anat-page .pinb circle { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.anat-page .pinb text { fill: #fff; font: 700 21px var(--sans); }
.anat-page g.on .pinb circle { fill: var(--blue-ink); }
.anat-fig figcaption { font-family: var(--sans); font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 14px; }

/* ---------- GC wall ---------- */
.gcwall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; list-style: none; margin: 0; padding: 0; }
.gcwall li { margin: 0; }
.gcwall .bezel { padding: 8px; border-radius: 12px; background: #1b1b1b; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.gcwall .t { display: block; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin: 12px 0 3px; }
.gcwall p { font-family: var(--sans); font-size: 14px; line-height: 1.4; color: #dadada; margin: 0; }
.tools { margin-top: clamp(40px, 5vw, 56px); padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .16); display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.tools h3 { font-size: 1.02rem; color: #fff; }
.tools ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tools li { font-family: var(--sans); font-size: 14px; color: #e9e9e9; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px; padding: 8px 12px; }
.tools li b { color: #fff; }
.stat-line { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 30px; font-family: var(--sans); color: #d6d6d6; font-size: 15px; }
.stat-line strong { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; color: var(--blue); letter-spacing: -.03em; line-height: 1; }

/* ---------- topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.t-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1);
  transition: border-color .2s, box-shadow .2s, transform .25s var(--ease);
}
.t-card { scroll-margin-top: 92px; }
.t-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.t-card.picked { border-color: var(--blue-ink); box-shadow: 0 0 0 1.5px var(--blue-ink), var(--shadow-1); }
.t-cover {
  position: relative; display: block; width: 100%; padding: 18px 18px 0; border: 0; cursor: zoom-in;
  background: var(--tint); aspect-ratio: 1.42 / 1; overflow: hidden;
}
.t-cover img { width: 100%; box-shadow: var(--page-shadow); border-radius: 3px 3px 0 0; transition: transform .45s var(--ease); }
.t-card:hover .t-cover img { transform: translateY(-4px); }
.t-cover .peek {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  font-family: var(--sans); font-size: 13px; font-weight: 600; background: var(--ink); color: #fff;
  padding: 8px 12px; border-radius: 7px; display: inline-flex; gap: 7px; align-items: center;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease);
}
.t-card:hover .peek, .t-cover:focus-visible .peek { opacity: 1; transform: none; }
.t-body { padding: 20px 20px 4px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.t-num { font-family: var(--sans); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; color: var(--blue-ink); }
.t-body h3 { font-size: 1.32rem; letter-spacing: -.02em; }
.t-tag { font-style: italic; font-size: 16.5px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 2px 0 0; }
.t-meta li { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--tint); border-radius: 5px; padding: 5px 8px; }
.t-meta li.pre { background: var(--cream); border: 1px solid var(--cream-edge); padding: 4px 7px; }
.t-meta li.nogc { background: var(--sage-tint); color: var(--ink-2); }
.t-types { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.t-types li { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: 14px; line-height: 1.35; }
.t-types .ty { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--blue-ink); padding-top: 2px; }
.t-sec summary { font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.t-sec summary::-webkit-details-marker { display: none; }
.t-sec summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--light); font-weight: 700; line-height: 1; }
.t-sec[open] summary::before { content: "\2212"; }
.t-sec ol { margin: 4px 0 6px; padding-left: 26px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.t-sec .syl { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin: 6px 0 4px; }
.t-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 20px; margin-top: auto; }
.price { font-family: var(--sans); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.price small { font-weight: 500; font-size: 13px; color: var(--muted); letter-spacing: 0; margin-left: 4px; }

.add {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; line-height: 1;
  padding: 11px 15px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink);
  transition: background-color .18s, color .18s, border-color .18s;
}
.add:hover { background: var(--tint); }
.add .bx { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid currentColor; display: inline-grid; place-items: center; }
.add .bx svg { width: 11px; height: 11px; opacity: 0; }
.add[aria-pressed="true"] { background: var(--ink); color: #fff; }
.add[aria-pressed="true"] .bx { background: var(--blue); border-color: var(--blue); }
.add[aria-pressed="true"] .bx svg { opacity: 1; }

/* ---------- free sample ---------- */
.free { display: grid; grid-template-columns: 260px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.free-cover { position: relative; transform: rotate(-3deg); }
.free-cover img { box-shadow: var(--page-shadow); border-radius: 3px; }
.free-cover .tape { left: 34%; top: -12px; }
.free h2 { margin-bottom: 14px; }
.free ul { margin: 16px 0 0; padding-left: 20px; font-size: 17px; color: var(--ink-2); }
.free li { margin-bottom: 4px; }
.free .fine { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin-top: 14px; }

/* ---------- order ---------- */
.order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 5vw, 64px); align-items: start; }
.steps { list-style: none; margin: 0 0 36px; padding: 0; counter-reset: s; display: grid; gap: 22px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--ink); font-family: var(--sans); font-weight: 800; font-size: 17px;
}
.steps h3 { margin: 9px 0 4px; font-size: 1.1rem; }
.steps p { font-size: 17px; color: var(--ink-2); }

.bundle {
  position: relative; background: var(--cream); border: 1px solid var(--cream-edge); border-radius: 12px;
  padding: 26px 24px 24px; box-shadow: var(--shadow-1);
}
.bundle::before { content: ""; position: absolute; top: -10px; left: 26px; width: 92px; height: 24px; background: rgba(142, 179, 210, .58); transform: rotate(-3deg); }
.bundle .label { color: var(--ink); }
.bundle h3 { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 8px; }
.bundle p { font-size: 17px; color: var(--ink-2); }
.bundle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.bundle .price { font-size: 2rem; }
.bundle .was { font-family: var(--sans); font-size: 15px; color: var(--muted); text-decoration: line-through; margin-left: 8px; font-weight: 500; }
.bundle .save { display: inline-block; font-family: var(--sans); font-size: 12.5px; font-weight: 700; background: var(--sage); border-radius: 5px; padding: 4px 8px; margin-left: 8px; vertical-align: .3em; }

.panel {
  position: sticky; top: 92px; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px;
  padding: 24px; box-shadow: var(--shadow-2);
}
.panel h3 { display: flex; align-items: center; justify-content: space-between; font-size: 1.15rem; margin-bottom: 14px; }
.panel h3 button { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.o-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.o-list li { display: grid; grid-template-columns: 1fr auto 28px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: 15px; }
.o-list li .n { color: var(--blue-ink); font-weight: 700; margin-right: 6px; font-size: 13px; }
.o-list li .p { font-weight: 600; }
.o-list li button { width: 28px; height: 28px; border-radius: 6px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.o-list li button:hover { background: var(--tint); color: var(--ink); }
.o-empty { font-style: italic; color: var(--muted); font-size: 17px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0; }
.o-nudge { font-family: var(--sans); font-size: 14px; line-height: 1.45; background: var(--sage-tint); border-radius: 8px; padding: 12px 14px; margin: 14px 0 0; }
.o-nudge button { font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.o-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 18px; font-family: var(--sans); }
.o-total span { font-size: 15px; color: var(--ink-2); }
.o-total strong { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.o-fine { font-family: var(--sans); font-size: 13px; line-height: 1.45; color: var(--muted); margin: 12px 0 0; }

/* sticky order bar */
.orderbar {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 140%); transition: transform .35s var(--ease);
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 20px;
  background: var(--ink); color: #fff; border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .55);
  font-family: var(--sans); font-size: 15px; white-space: nowrap; max-width: calc(100vw - 32px);
}
.orderbar.show { transform: translate(-50%, 0); }
.orderbar .sum b { font-weight: 800; }
.orderbar a.rev { color: #cfd9e3; font-size: 14px; }
.orderbar .btn { padding: 12px 16px; font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-family: var(--sans); font-weight: 700; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-weight: 600; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 50px 22px 0; color: var(--ink-2); font-size: 18px; }

/* ---------- CTA + footer ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--ink); color: #eee; padding: clamp(72px, 9vw, 112px) 0; }
.cta-band h2 { color: #fff; max-width: 15em; }
.cta-band p { color: #d0d0d0; font-style: italic; font-size: 1.2rem; margin-top: 14px; max-width: 34em; }
.cta-band .big-mark { position: absolute; right: -6%; top: 50%; width: min(52vw, 560px); transform: translateY(-50%); opacity: .5; pointer-events: none; }
.site-foot { padding: 52px 0 40px; font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-in p { margin-top: 14px; max-width: 28em; font-family: var(--serif); font-size: 16.5px; }
.foot-in h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 12px; }
.foot-in ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-in a { text-decoration: none; }
.foot-in a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13.5px; }

/* ---------- viewer dialog ---------- */
.viewer {
  width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px;
  background: var(--tint); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); overflow: hidden;
}
.viewer::backdrop { background: rgba(40, 40, 40, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.viewer[open] { display: flex; flex-direction: column; animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.v-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px 14px 24px; background: #fff; border-bottom: 1px solid var(--rule); }
.v-head .t-num { margin: 0; }
.v-head h3 { font-size: 1.15rem; margin-right: auto; }
.v-nav { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 9px; border: 1.5px solid var(--rule); background: #fff; display: grid; place-items: center; cursor: pointer; font-family: var(--sans); font-size: 18px; line-height: 1; color: var(--ink); }
.icon-btn:hover { background: var(--tint); border-color: var(--light); }
.v-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; overflow: auto; min-height: 0; }
.v-pages figure { margin: 0; }
.v-pages img { width: 100%; background: #fff; border-radius: 3px; box-shadow: var(--page-shadow); }
.v-pages figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
.v-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 24px 16px; background: #fff; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
.v-foot .price { color: var(--ink); }
.v-foot .right { display: flex; align-items: center; gap: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .anat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .anat-fig { grid-column: 1 / -1; grid-row: 1; max-width: 560px; margin: 0 auto 8px; width: 100%; }
  .anat-col { padding-top: 0; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gcwall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .stack { margin: 8px auto 0; max-width: 500px; }
  .order { grid-template-columns: 1fr; }
  .panel { position: static; }
  .tools { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
    font-family: var(--sans); font-weight: 600; font-size: 15px; background: none; border: 1.5px solid var(--rule); border-radius: 8px; padding: 9px 13px; cursor: pointer;
  }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
  .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle .bars::before { top: -5px; }
  .nav-toggle .bars::after { top: 5px; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gut) 18px; background: #fff; border-bottom: 1px solid var(--rule); box-shadow: 0 20px 30px -24px rgba(0, 0, 0, .3); display: none; }
  .nav.open { display: flex; }
  .nav > a:not(.btn) { padding: 12px 10px; }
  .nav .btn { margin: 8px 0 0; }
  .brand .tag { display: none; }
  .site-head .brand { white-space: nowrap; font-size: 13px; letter-spacing: .16em; gap: 10px; }
  .site-head .mark { width: 32px; }
  .facts { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .free { grid-template-columns: 1fr; }
  .free-cover { max-width: 230px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-in > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .anat { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .gcwall { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 8px; scrollbar-width: none; }
  .gcwall::-webkit-scrollbar { display: none; }
  .gcwall li { flex: 0 0 72%; scroll-snap-align: start; }
  .gc-card { width: 52%; left: -1%; }
  .scrawl { max-width: 48%; font-size: 1rem; }
  .v-pages { grid-template-columns: 82% 82%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 16px; }
  .v-pages figure { scroll-snap-align: center; }
  .v-head { padding: 12px 12px 10px 16px; }
  .v-head h3 { font-size: 1rem; }
  .v-foot { padding: 12px 16px 14px; }
  .orderbar { left: 16px; right: 16px; transform: translateY(140%); justify-content: space-between; padding-left: 16px; }
  .orderbar.show { transform: none; }
  .orderbar a.rev { display: none; }
  .faq details > div { padding-right: 0; }
  .cta-band .big-mark { display: none; }
}

/* =====================================================================
   Multi-page pieces: page heroes, home teasers, topic tiles
   ===================================================================== */
.nav > a[aria-current="page"]:not(.btn) { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); border-radius: 7px 7px 0 0; }

.page-hero { position: relative; isolation: isolate; padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: 18px; max-width: 16em; }
.page-hero .lead { max-width: 40em; }
.crumb { font-family: var(--sans); font-size: 14px; margin-bottom: 18px; color: var(--muted); }
.crumb a { color: var(--blue-ink); text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

.price-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; list-style: none; padding: 0; }
.price-pills li { font-family: var(--sans); font-size: 15px; background: #fff; border: 1.5px solid var(--rule); border-radius: 999px; padding: 9px 16px; }
.price-pills b { font-weight: 800; }
.price-pills s, .was-inline { color: var(--muted); margin-left: 4px; }
.price-pills a { color: inherit; }

.more { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--blue); padding-bottom: 3px; }
.more:hover .arr { transform: translateX(3px); }
.more .arr { transition: transform .2s var(--ease); }
.band-ink .more { color: #fff; }
.sec-foot { margin-top: clamp(32px, 4vw, 44px); display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }

/* topic tiles on the home page */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile a { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; text-decoration: none; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px 12px 12px; box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .2s, border-color .2s; height: 100%; }
.tile a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--light); }
.tile-cover { display: block; aspect-ratio: 1.15 / 1; overflow: hidden; border-radius: 6px; background: var(--tint); padding: 8px 8px 0; }
.tile-cover img { box-shadow: var(--page-shadow); border-radius: 2px 2px 0 0; }
.tile-body { display: flex; flex-direction: column; gap: 3px; }
.tile .t-num { font-size: 11.5px; }
.tile-title { font-family: var(--sans); font-weight: 700; font-size: 1.04rem; line-height: 1.25; letter-spacing: -.01em; }
.tile-meta { font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* "inside a note" teaser */
.teaser { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.teaser-page { position: relative; max-width: 440px; justify-self: center; transform: rotate(-2.5deg); }
.teaser-page img { box-shadow: var(--page-shadow); border-radius: 3px; }
.teaser-page .tape { left: 40%; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 17.5px; color: var(--ink-2); line-height: 1.45; }
.ticks .pin { width: 26px; height: 26px; font-size: 12.5px; }
.ticks b { color: var(--ink); font-family: var(--sans); font-size: 15.5px; }

/* GC teaser: 4 screens */
.gcwall.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* steps in a row */
.steps.row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; }

/* bundle on the notes page */
.bundle.wide { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.bundle.wide .bundle-row { margin-top: 0; justify-content: flex-end; }
.bundle-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

@media (max-width: 1080px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gcwall.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .teaser { grid-template-columns: 1fr; }
  .teaser-page { max-width: 340px; }
  .steps.row { grid-template-columns: 1fr; gap: 20px; }
  .bundle.wide { grid-template-columns: 1fr; }
  .bundle.wide .bundle-row { justify-content: space-between; }
}
@media (max-width: 640px) {
  .strip { grid-template-columns: 1fr; gap: 12px; }
  .tile a { grid-template-columns: 92px 1fr; }
  .gcwall.four { display: flex; }
}
