/* Spec by Spec — site styles
   Brand: navy + magenta, Lexend (display) + Source Sans 3 (body).
   Topic colours match the 4PH1 resources. */

:root {
  --navy: #152033;
  --navy-2: #2B3E63;
  --magenta: #A21CAF;
  --magenta-dark: #86198F;
  --magenta-light: #F0ABFC;
  --magenta-tint: #F5E6F7;
  --blue: #1D5FBF;
  --ink: #1E2633;
  --text-2: #3B4658;
  --muted: #566173;
  --line: #DCE2E9;
  --mist: #F2F5F8;
  --white: #FFFFFF;

  --t1: #1D5FBF; --t2: #C2570C; --t3: #0E7C73; --t4: #BE1E2D;
  --t5: #2E7D32; --t6: #7B3FC4; --t7: #9A6700; --t8: #3B3FB0;

  --font-display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(21, 32, 51, .05), 0 10px 28px rgba(21, 32, 51, .07);
  --shadow-lg: 0 2px 6px rgba(21, 32, 51, .06), 0 28px 56px rgba(21, 32, 51, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--magenta); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.lead { font-size: 20px; color: var(--text-2); max-width: 560px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0;
  font: 600 16px/1 var(--font-display); text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-ink { color: var(--white); background: linear-gradient(180deg, var(--navy-2), var(--navy)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 16px rgba(21,32,51,.28); }
.btn-ink:hover { color: var(--white); background: linear-gradient(180deg, #34497A, #1B2A44); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 24px rgba(21,32,51,.32); }
.btn-mag { color: var(--white); background: linear-gradient(180deg, #BC34C9, #8E1A99); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 18px rgba(162,28,175,.35); }
.btn-mag:hover { color: var(--white); background: linear-gradient(180deg, #C744D3, var(--magenta-dark)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 12px 26px rgba(162,28,175,.42); }
.btn-line { color: var(--navy); background: var(--white); border: 1.5px solid var(--navy); box-shadow: 0 2px 8px rgba(21,32,51,.08); }
.btn-line:hover { color: var(--white); background: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(255,255,255,.9); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255,255,255,.66);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid rgba(220,226,233,.8);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 12px; }
.logo img { height: 64px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; font: 500 16px var(--font-display); }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--magenta); }
.site-nav .btn { min-height: 44px; padding: 0 18px; }

/* ---------- Hero ---------- */
.hero {
  background-color: var(--mist);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(162,28,175,.13), transparent 38%),
    radial-gradient(circle at 88% 72%, rgba(29,95,191,.16), transparent 42%),
    radial-gradient(circle at 60% 0%, rgba(14,124,115,.08), transparent 35%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 80px 96px; }
.hero-copy { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-weight: 700; font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -.03em; }
.hero h1 span { color: var(--magenta); }
.topic-strip { display: flex; gap: 6px; margin-top: 12px; }
.topic-strip span { flex: 1; height: 6px; border-radius: 3px; }
.hero-art { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }

.fan { position: relative; width: 420px; max-width: 100%; aspect-ratio: 420 / 430; }
.fan img { position: absolute; height: auto; border-radius: 6px; transition: transform .4s var(--ease); }
.fan .f1 { left: 0; top: 9%; width: 52%; transform: rotate(-7deg); box-shadow: 0 18px 38px rgba(21,32,51,.22); }
.fan .f2 { right: 0; top: 9%; width: 52%; transform: rotate(7deg); box-shadow: 0 18px 38px rgba(21,32,51,.22); }
.fan .f3 { left: 21%; top: 0; width: 58%; box-shadow: 0 4px 10px rgba(21,32,51,.12), 0 34px 64px rgba(21,32,51,.32); }
.fan:hover .f1 { transform: rotate(-11deg) translate(-14px, 6px); }
.fan:hover .f2 { transform: rotate(11deg) translate(14px, 6px); }
.fan:hover .f3 { transform: translateY(-10px) scale(1.03); }

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 2; margin-top: -44px; }
.stats .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 30px rgba(21,32,51,.08);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.stat:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 20px 40px rgba(21,32,51,.14); }
.stat strong { font: 700 32px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 16px; line-height: 1.3; }

/* ---------- Sections ---------- */
.section { padding-block: 80px 40px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.section-head h2 { font-weight: 700; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.02em; line-height: 1.1; }
.sub-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.sub-head h3 { font-weight: 700; font-size: 30px; letter-spacing: -.02em; }
.sub-head p { font-size: 16px; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); border-color: #C9D2DE; box-shadow: var(--shadow-lg); }
.page {
  width: 100%; border-radius: 6px; border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(21,32,51,.10);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.page:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 22px 40px rgba(21,32,51,.22); }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.tab {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--navy);
  font: 600 16px var(--font-display); cursor: pointer;
  box-shadow: 0 2px 8px rgba(21,32,51,.06); transition: transform .2s, box-shadow .2s;
}
.tab:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(21,32,51,.12); }
.tab[aria-selected="true"] { color: var(--white); border-color: var(--navy); background: linear-gradient(180deg, var(--navy-2), var(--navy)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(21,32,51,.3); }
.tab .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--white); }
.tab .code { font-weight: 400; opacity: .85; }
.soon { font: 600 12px var(--font-display); background: var(--magenta-tint); color: var(--magenta-dark); padding: 2px 9px; border-radius: 999px; }
.panel { display: flex; flex-direction: column; gap: 56px; }
[hidden], .panel[hidden] { display: none !important; }

/* Topics */
.topics { padding: 28px 32px; }
.topics ol { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 28px; font-size: 17px; }
.topics li { display: flex; gap: 12px; align-items: center; }
.topics .bar { width: 6px; height: 26px; border-radius: 3px; flex: none; }
.topics .num { font: 700 17px var(--font-display); min-width: 14px; }

/* Books */
.stack { display: flex; flex-direction: column; gap: 24px; }
.book { padding: 32px; display: flex; flex-wrap: wrap; gap: 36px; }
.book-cover { flex: 0 1 260px; min-width: 200px; }
.book-cover .page { box-shadow: 0 16px 34px rgba(21,32,51,.18); }
.book-body { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.kicker { font: 600 13px var(--font-display); letter-spacing: .16em; text-transform: uppercase; }
.book h4 { font-weight: 700; font-size: 28px; line-height: 1.15; }
.book-body > p { color: var(--text-2); }
.samples-label { font: 600 14px var(--font-display); letter-spacing: .08em; color: var(--muted); margin-top: 6px; }
.samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.buy-options { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.buy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: #F8FAFC;
  transition: border-color .2s, background .2s;
}
.buy:hover { border-color: #B9C4D2; background: var(--white); }
.buy-label { display: flex; flex-direction: column; min-width: 150px; }
.buy-label b { font: 600 17px var(--font-display); color: var(--navy); }
.buy-label span { font-size: 14px; color: var(--muted); }
.price { font: 700 24px var(--font-display); color: var(--navy); font-variant-numeric: tabular-nums; margin-left: auto; }
.sample-link { font-weight: 600; margin-top: 4px; }

/* Paperback-coming-soon row */
.buy-soon { background: var(--white); border-style: dashed; }
.buy-soon:hover { background: var(--white); border-color: var(--line); }
.buy-soon .soon { margin-left: auto; }

/* Placeholder cover tile (used until a subject's cover images are added) */
.cover-tile {
  aspect-ratio: 600 / 849; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: 10% 9%; color: var(--white); overflow: hidden; position: relative;
  background-color: var(--tile, var(--navy));
  background-image:
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.28), transparent 42%),
    linear-gradient(160deg, rgba(255,255,255,.14), transparent 55%);
  font-family: var(--font-display);
}
.cover-tile img { position: absolute; top: 9%; left: 9%; width: 22%; height: auto; border-radius: 6px; background: var(--white); padding: 3px; }
.cover-tile .tile-subject { font-weight: 700; font-size: clamp(16px, 2.2vw, 30px); line-height: 1; letter-spacing: -.02em; }
.cover-tile .tile-product { font-weight: 500; font-size: clamp(11px, 1.2vw, 15px); line-height: 1.2; opacity: .95; }
.cover-tile .tile-code { margin-top: 6px; width: fit-content; font-weight: 600; font-size: 11px; letter-spacing: .08em; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 999px; }
.bundle-art .cover-tile { position: absolute; padding: 8%; }
.bundle-art .cover-tile .tile-subject { font-size: 14px; }
.bundle-art .cover-tile .tile-product, .bundle-art .cover-tile .tile-code { font-size: 9px; }
.printable .pair.single { grid-template-columns: minmax(0, 1fr); max-width: 220px; }

/* Free-pack picker */
.free-packs { display: flex; flex-direction: column; gap: 10px; }
.free-pack {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px;
  border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--navy);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.free-pack:hover { transform: translateY(-2px); border-color: var(--magenta); color: var(--navy); box-shadow: 0 10px 22px rgba(162,28,175,.16); }
.free-pack .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.free-pack > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.free-pack b { font: 600 17px var(--font-display); }
.free-pack small { font-size: 14px; color: var(--muted); }
.free-pack svg { width: 18px; height: 18px; color: var(--magenta); flex: none; }

/* Bundle */
.bundle {
  position: relative; overflow: hidden; border-radius: 22px; padding: 36px;
  display: flex; flex-wrap: wrap; gap: 36px; align-items: center; color: var(--white);
  background-color: var(--navy);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(188,52,201,.5), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(29,95,191,.55), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,.07), transparent 35%);
  border: 1px solid rgba(255,255,255,.12);
}
.bundle h4 { color: var(--white); font-weight: 700; font-size: 30px; line-height: 1.12; }
.bundle-art { flex: 0 1 360px; min-width: 240px; position: relative; aspect-ratio: 360 / 270; }
.bundle-art > img, .bundle-art > .cover-tile { position: absolute; height: auto; border-radius: 5px; transition: transform .4s var(--ease); }
.bundle-art .b1 { left: 0; top: 12%; width: 38%; transform: rotate(-9deg); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.bundle-art .b2 { right: 0; top: 12%; width: 38%; transform: rotate(9deg); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.bundle-art .b3 { left: 16%; top: 4%; width: 40%; transform: rotate(-3deg); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.bundle-art .b4 { left: 40%; top: 0; width: 42%; box-shadow: 0 22px 44px rgba(0,0,0,.45); }
.bundle:hover .b1 { transform: rotate(-13deg) translate(-10px, 4px); }
.bundle:hover .b2 { transform: rotate(13deg) translate(10px, 4px); }
.bundle:hover .b4 { transform: translateY(-8px) scale(1.03); }
.bundle-body { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.bundle-body p { color: #D5DBE6; }
.badge { width: fit-content; font: 600 13px var(--font-display); letter-spacing: .14em; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 999px; }
.bundle-price { display: flex; flex-direction: column; }
.bundle-price strong { font: 700 34px/1.05 var(--font-display); }
.bundle-price span, .bundle .fine { font-size: 14px; color: #C9D2E0; }
.bundle .fine a { color: var(--magenta-light); }

/* Printables */
.printables { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.printable { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.printable .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.printable h4 { font-weight: 700; font-size: 23px; }
.printable > p { color: var(--text-2); }
.printable .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: auto; }
.printable .foot .price { margin-left: 0; }
.free { font: 700 26px var(--font-display); color: var(--magenta); }

/* Coming soon */
.coming {
  border-radius: var(--radius); background: var(--mist); padding: 48px 36px;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center; border-top: 6px solid var(--line);
}
.coming h3 { font-weight: 700; font-size: 34px; line-height: 1.1; margin: 14px 0 12px; }
.coming p { color: var(--text-2); }
.coming-copy { flex: 1 1 420px; min-width: 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 600 15px var(--font-display); color: var(--navy); }
input[type="email"], input[type="text"] {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #C5CDD8;
  font: 400 17px var(--font-body); color: var(--navy); background: var(--white);
}
.notify { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.form-status { font-size: 15px; color: var(--muted); min-height: 1.4em; }
.form-status.ok { color: #1E7F4F; font-weight: 600; }

/* Sign-up band */
.signup { padding-block: 56px 88px; }
.signup-band {
  border-radius: 24px; padding: 48px 44px; color: var(--white);
  display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
  background-color: var(--navy);
  background-image:
    radial-gradient(circle at 8% 10%, rgba(188,52,201,.45), transparent 40%),
    radial-gradient(circle at 95% 95%, rgba(29,95,191,.5), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 30%);
  box-shadow: 0 30px 70px rgba(21,32,51,.3), inset 0 1px 0 rgba(255,255,255,.12);
}
.signup-copy { flex: 1 1 440px; min-width: 0; }
.signup-copy .eyebrow { color: var(--magenta-light); }
.signup-copy h2 { color: var(--white); font-weight: 700; font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -.02em; margin: 12px 0 14px; }
.signup-copy > p { font-size: 19px; color: #D5DBE6; margin-bottom: 20px; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.ticks li { display: flex; gap: 10px; align-items: center; }
.ticks svg { width: 20px; height: 20px; flex: none; }
.signup-card {
  flex: 1 1 360px; min-width: 0; background: var(--white); color: var(--navy); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px rgba(0,0,0,.35);
}
.signup-card h3 { font-size: 22px; }
.signup-card ol { margin: 0; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.signup-card .small { font-size: 14px; color: var(--muted); }

/* Why + author */
.why-section { background: var(--mist); border-top: 1px solid var(--line); }
.why-section .wrap { padding-block: 80px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.why { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.why h3 { font-weight: 600; font-size: 21px; }
.why p { color: var(--text-2); }
.pill { width: fit-content; font: 600 14px var(--font-display); letter-spacing: .08em; background: var(--navy); color: var(--white); padding: 5px 12px; border-radius: 6px; }
.pill.mag { background: var(--magenta); }
.author { margin-top: 32px; padding: 36px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; border-radius: 20px; }
.author-photo { flex: none; padding: 5px; border-radius: 50%; background: linear-gradient(145deg, #BC34C9, var(--blue)); box-shadow: 0 16px 34px rgba(21,32,51,.25); }
.author-photo img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; object-position: center top; border: 3px solid var(--white); }
.author-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.author-copy .eyebrow { color: var(--magenta); }
.author-copy h3 { font-weight: 700; font-size: 28px; line-height: 1.15; }
.author-copy h3 small { font-weight: 500; font-size: 17px; color: var(--muted); }
.author-copy p { color: var(--text-2); }
.author-copy .sign { color: var(--navy); font-weight: 600; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); font-size: 16px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding-block: 44px; }
.footer-brand { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-brand img { height: 52px; width: auto; }
.footer-brand .legal-note { font-size: 14px; color: var(--muted); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 44px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col b { font: 600 16px var(--font-display); color: var(--navy); }
.footer-col .email { color: var(--magenta); font-weight: 600; }

/* Legal pages */
.legal-hero {
  background-color: var(--mist);
  background-image: radial-gradient(circle at 10% 20%, rgba(162,28,175,.10), transparent 40%), radial-gradient(circle at 90% 80%, rgba(29,95,191,.12), transparent 45%);
  border-bottom: 1px solid var(--line);
}
.legal-hero .inner { max-width: 780px; margin: 0 auto; padding-block: 64px 56px; display: flex; flex-direction: column; gap: 14px; }
.legal-hero .eyebrow { color: var(--magenta); }
.legal-hero h1 { font-weight: 700; font-size: clamp(34px, 5vw, 50px); line-height: 1.08; letter-spacing: -.02em; }
.legal-hero p { font-size: 19px; color: var(--text-2); }
.legal { max-width: 780px; margin: 0 auto; padding-block: 16px 80px; line-height: 1.6; }
.legal h2 { font-weight: 600; font-size: 24px; margin: 44px 0 12px; letter-spacing: -.01em; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 0 0 8px; }
.legal b { color: var(--navy); }
.legal a { color: var(--magenta); }
.table-scroll { overflow-x: auto; margin: 0 0 14px; }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; }
.legal th { text-align: left; font: 600 14px var(--font-display); color: var(--navy); background: var(--mist); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini-footer { border-top: 1px solid var(--line); background: var(--mist); font-size: 15px; color: var(--muted); }
.mini-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-block: 28px; }
.mini-footer nav { display: flex; gap: 20px; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .site-header { position: static; }
  .logo img { height: 52px; }
  .hero .wrap { padding-block: 48px 80px; gap: 40px; }
  .book, .printable, .bundle, .author, .topics { padding: 22px; }
  .coming, .signup-band { padding: 32px 22px; }
  .book h4 { font-size: 24px; }
  .price { margin-left: 0; }
  .buy .btn { width: 100%; }
  .author-photo img { width: 140px; height: 140px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; }
  .stat strong { font-size: 28px; }
  .book-cover { flex-basis: 100%; max-width: 220px; margin: 0 auto; }
  .hero-art .fan { width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .card:hover, .page:hover, .stat:hover, .btn:hover, .tab:hover { transform: none; }
}
