/* StockPlay: practice notebook design system */

@font-face {
  font-family: "Bitter";
  src: url("../fonts/bitter.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans.woff") format("woff");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #142C3E;
  --ink-soft: #4B5F6E;
  --ink-faint: #7A8C99;
  --pen: #2346C4;
  --pen-dark: #1A3699;
  --pen-tint: #E9EEFC;
  --highlight: #FFE15A;
  --highlight-soft: #FFF3B0;
  --paper: #F3F7FA;
  --grid: #DCE7EF;
  --grid-major: #C7D7E3;
  --white: #FFFFFF;
  --line: #D3DEE6;
  --gain: #1B8657;
  --gain-tint: #E6F4EC;
  --loss: #C4473A;
  --loss-tint: #FBEAE7;

  --serif: "Bitter", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1140px;
  --measure: 66ch;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  font-optical-sizing: auto;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--pen); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pen-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--highlight); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.35rem, 5.2vw, 3.7rem); line-height: 1.06; font-weight: 750; }
h2 { font-size: clamp(1.75rem, 3.3vw, 2.45rem); line-height: 1.14; }
h3 { font-size: 1.28rem; line-height: 1.3; font-weight: 650; }
h4 { font-size: 1.05rem; line-height: 1.35; font-weight: 650; }
p { margin: 0 0 1em; }
.lead { font-size: 1.22rem; line-height: 1.55; color: var(--ink-soft); max-width: 40ch; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.num { font-variant-numeric: tabular-nums lining-nums; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--white); padding: 0.5rem 0.9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: var(--measure); }

/* Graph paper: the signature surface */
.graph {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px, 28px 28px, 28px 28px;
  background-position: -1px -1px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 750; font-size: 1.3rem; letter-spacing: -0.01em; }
.logo:hover { color: var(--ink); }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 4px; text-underline-offset: 0.3em; }
.nav .btn { color: var(--white); text-decoration: none; }
.nav .btn:hover { color: var(--white); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 0.45rem 0.7rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.25rem 1.25rem; }
  .nav.open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 0.9rem; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 0.85rem 1.25rem; border-radius: var(--r-sm);
  background: var(--pen); color: var(--white); border: 1.5px solid var(--pen);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--pen-dark); border-color: var(--pen-dark); color: var(--white); text-decoration: none; }
.btn-quiet { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-small { padding: 0.6rem 0.95rem; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tight { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section + .section.ruled { border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--grid-major); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero-copy { padding-top: clamp(0rem, 3vw, 2.2rem); }
.hero h1 { max-width: 14ch; }
.hero .lead { margin: 1.25rem 0 1.75rem; max-width: 36ch; }
.promises { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-weight: 600; font-size: 0.97rem; }
.promises li { display: inline-flex; align-items: center; gap: 0.45rem; }
.promises svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { max-width: 16ch; } }

/* Practice ticket (the signature card) */
.ticket {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 40px -24px rgba(20, 44, 62, 0.45);
}
.ticket-stub {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem 1rem;
}
.ticket-stub .label { font-size: 0.86rem; color: var(--ink-soft); font-weight: 500; }
.ticket-stub .balance { font-family: var(--serif); font-weight: 700; font-size: 1.65rem; line-height: 1.1; }
.ticket-perf {
  position: relative; height: 0; border-top: 2px dashed var(--line); margin: 0 1.1rem;
}
.ticket-perf::before, .ticket-perf::after {
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink);
}
.ticket-perf::before { left: calc(-1.1rem - 12px); clip-path: inset(0 0 0 50%); }
.ticket-perf::after { right: calc(-1.1rem - 12px); clip-path: inset(0 50% 0 0); }
.ticket-body { padding: 1.3rem 1.4rem 1.5rem; }

.xp {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--highlight); color: var(--ink);
  font-weight: 750; font-size: 0.9rem; line-height: 1;
  padding: 0.42rem 0.65rem; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.xp.muted-xp { background: var(--highlight-soft); }

/* Game components */
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; font-size: 0.9rem; color: var(--ink-soft); font-weight: 500; }
.game-skill { font-weight: 600; color: var(--ink); }
.game-title { font-size: 1.45rem; margin-bottom: 0.4rem; }
.game-setup { color: var(--ink-soft); margin-bottom: 1.1rem; }
.options { display: grid; gap: 0.65rem; }
.opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  transition: border-color .15s ease, background-color .15s ease;
}
.opt:hover:not([disabled]) { border-color: var(--pen); background: var(--pen-tint); }
.opt strong { display: block; font-weight: 650; }
.opt span { display: block; font-size: 0.93rem; color: var(--ink-soft); }
.opt[disabled] { cursor: default; }
.opt.is-right { border-color: var(--gain); background: var(--gain-tint); }
.opt.is-wrong { border-color: var(--loss); background: var(--loss-tint); }
.opt.is-dim { opacity: 0.55; }

.reveal { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1.5px dashed var(--line); }
.reveal[hidden] { display: none; }
.outcome { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.8rem; margin-bottom: 0.6rem; }
.outcome .verdict { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.verdict.good { color: var(--gain); }
.verdict.bad { color: var(--loss); }
.money { font-family: var(--serif); font-weight: 700; font-variant-numeric: tabular-nums; }
.money.up { color: var(--gain); }
.money.down { color: var(--loss); }
.reveal p { margin-bottom: 0.7rem; }
.reveal .caveat { font-size: 0.9rem; color: var(--ink-soft); }
.reveal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }

.progress { display: flex; gap: 6px; margin-bottom: 1.1rem; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--grid); }
.progress span.done { background: var(--ink); }
.progress span.now { background: var(--pen); }

/* Comparison table inside games */
.compare { width: 100%; border-collapse: collapse; margin: 0 0 1.1rem; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; padding: 0.55rem 0.6rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th, .compare tr:first-child th { font-family: var(--serif); font-weight: 700; color: var(--ink); }
.compare th[scope="row"] { color: var(--ink-soft); font-weight: 500; width: 28%; }
.game .q { margin: 0.2rem 0 0.8rem; }

/* Mini chart inside games */
.chart { width: 100%; height: auto; margin: 0.2rem 0 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }

/* Pain points */
.pains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; }
.pain { border-top: 2px solid var(--ink); padding: 1.3rem 0 2rem; }
.pain h3 { font-size: 1.4rem; }
.pain p { color: var(--ink-soft); max-width: 42ch; }
@media (max-width: 760px) { .pains { grid-template-columns: 1fr; } }

/* Analogy */
.analogy { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.analogy h2 { font-size: clamp(2rem, 4vw, 3rem); }
.analogy-copy p { font-size: 1.12rem; max-width: 52ch; }
@media (max-width: 820px) { .analogy { grid-template-columns: 1fr; } }

/* Loop */
.loop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; counter-reset: step; position: relative; }
.loop::before { content: ""; position: absolute; top: 19px; left: 20px; right: calc((100% - 5rem) / 6 - 20px); height: 2px; background: var(--ink); }
.loop li { position: relative; counter-increment: step; padding-top: 3.2rem; }
.loop li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700;
}
.loop li:nth-child(5)::before { background: var(--highlight); }
.loop h3 { font-size: 1.08rem; margin-bottom: 0.3rem; }
.loop p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) {
  .loop { grid-template-columns: 1fr; gap: 1.2rem; }
  .loop::before { top: 20px; bottom: 20px; left: 19px; right: auto; width: 2px; height: auto; }
  .loop li { padding: 0.35rem 0 0 3.6rem; min-height: 40px; }
}

.skills-table { width: 100%; border-collapse: collapse; margin-top: 3rem; font-size: 0.98rem; }
.skills-table th, .skills-table td { text-align: left; padding: 0.8rem 0.6rem 0.8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.skills-table th { font-weight: 600; color: var(--ink-soft); font-size: 0.9rem; }
.skills-table td:first-child { font-weight: 650; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 1.6rem 1.5rem; border-radius: var(--r-lg); background: var(--white); border: 1.5px solid var(--line); }
.plan.featured { border: 2px solid var(--ink); }
.plan.planned { border: 2px dashed var(--grid-major); background: var(--paper); }
.plan h3 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.plan .price { font-family: var(--serif); font-weight: 750; font-size: 2rem; line-height: 1.1; margin: 0.9rem 0 0.2rem; }
.plan .price small { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.plan .status { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1rem; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1.4rem; }
.plan li { margin-bottom: 0.4rem; }
.plan .btn, .plan form { margin-top: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* Course */
.course { display: grid; grid-template-columns: 1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.days { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: day; }
.days li { counter-increment: day; display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.days li::before { content: "Day " counter(day); font-weight: 650; color: var(--ink-soft); font-size: 0.95rem; padding-top: 0.05rem; }
.days strong { display: block; font-weight: 650; }
.days span { font-size: 0.93rem; color: var(--ink-soft); }
.course > .form-card { position: sticky; top: 92px; }
@media (max-width: 860px) { .course { grid-template-columns: 1fr; } .course > .form-card { position: static; } }

/* Forms */
.form-card { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-lg); padding: 1.6rem 1.5rem; }
.form-card h3 { margin-bottom: 0.4rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input[type="email"], .field input[type="text"], .field select {
  font: inherit; color: var(--ink); width: 100%;
  padding: 0.78rem 0.9rem; border: 1.5px solid var(--grid-major); border-radius: var(--r-sm); background: var(--white);
}
.field input:focus, .field select:focus { outline: 3px solid var(--pen-tint); border-color: var(--pen); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.93rem; margin-bottom: 0.75rem; }
.check input { margin-top: 0.25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--pen); flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0.8rem 0 0; }
.form-status { margin-top: 0.9rem; font-weight: 600; }
.form-status.ok { color: var(--gain); }
.form-status.err { color: var(--loss); }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inline-form input[type="email"] { flex: 1 1 14rem; font: inherit; padding: 0.72rem 0.85rem; border: 1.5px solid var(--grid-major); border-radius: var(--r-sm); }

/* Lessons list */
.lesson-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.lesson-list li { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1.5rem; align-items: baseline; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.lesson-list a { font-family: var(--serif); font-weight: 650; font-size: 1.3rem; text-decoration: none; color: var(--ink); }
.lesson-list a:hover { color: var(--pen); text-decoration: underline; }
.lesson-list .from { grid-column: 1; font-size: 0.93rem; color: var(--ink-soft); }
.lesson-list .time { grid-row: 1; grid-column: 2; font-size: 0.93rem; color: var(--ink-soft); white-space: nowrap; }

/* Team & principles */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.team { list-style: none; padding: 0; margin: 1.2rem 0; }
.team li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.nots { list-style: none; padding: 0; margin: 0; }
.nots li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.4rem; padding: 0.55rem 0; }
.nots svg { width: 20px; height: 20px; margin-top: 0.2rem; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; font-family: var(--serif); font-weight: 650; font-size: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.9rem; font-family: var(--sans); font-weight: 500; font-size: 1.5rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 1.2rem; color: var(--ink-soft); max-width: var(--measure); }

/* Closing band */
.closing { padding: clamp(3.5rem, 8vw, 5.5rem) 0; border-top: 1px solid var(--grid-major); }
.closing h2 { max-width: 26ch; }
.closing p { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }

/* Footer */
.site-footer { background: var(--ink); color: #D4DEE6; padding: 3.5rem 0 2rem; font-size: 0.95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.16); }
.site-footer .logo rect { fill: #2A4A62; }
.foot-grid h4 { color: var(--white); font-family: var(--sans); font-size: 0.95rem; font-weight: 650; margin-bottom: 0.8rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 0.45rem; }
.site-footer .logo { color: var(--white); }
.site-footer .tagline { margin-top: 0.6rem; color: #AFC0CD; }
.disclaimer { margin-top: 1.5rem; color: #AFC0CD; font-size: 0.88rem; max-width: 80ch; }
.copyright { margin-top: 1rem; color: #8FA3B2; font-size: 0.85rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Page intro (inner pages) */
.page-intro { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2.2rem, 5vw, 3.2rem); border-bottom: 1px solid var(--grid-major); }
.page-intro h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); max-width: 20ch; }
.page-intro .lead { max-width: 52ch; margin-top: 0.9rem; }
.crumb { font-size: 0.92rem; margin-bottom: 1rem; color: var(--ink-soft); }
.crumb a { color: var(--ink-soft); }

/* Play page */
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.play-main .ticket-perf::before, .play-main .ticket-perf::after { background: var(--white); }
.tracker { position: sticky; top: 88px; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.3rem 1.4rem; }
.tracker h2 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.tracker .big { font-family: var(--serif); font-weight: 750; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tracker dl { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; margin: 1rem 0; font-size: 0.95rem; }
.tracker dt { color: var(--ink-soft); }
.tracker dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.skill-list { list-style: none; padding: 0; margin: 0.4rem 0 1rem; font-size: 0.93rem; }
.skill-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.skill-list li.earned { color: var(--ink); font-weight: 600; }
.skill-list .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--grid-major); flex: none; }
.skill-list li.earned .dot { background: var(--gain); border-color: var(--gain); }
.skill-list li.missed .dot { background: var(--highlight); border-color: #E3C23A; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--pen); text-decoration: underline; cursor: pointer; font-size: 0.9rem; }
@media (max-width: 980px) { .play-layout { grid-template-columns: 1fr; } .tracker { position: static; } }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0 1.4rem; }
.summary-grid > div { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 0.9rem 1rem; }
.summary-grid .k { font-size: 0.88rem; color: var(--ink-soft); }
.summary-grid .v { font-family: var(--serif); font-weight: 750; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .summary-grid { grid-template-columns: 1fr; } }
.recommend { background: var(--paper); border-left: 4px solid var(--pen); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 1.1rem 1.2rem; margin: 1rem 0 1.4rem; }
.recommend h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.recommend p:last-child { margin-bottom: 0; }

/* Ebooks */
.books { display: grid; gap: 2.5rem; }
.book { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.5rem, 4vw, 3rem); padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.book:last-child { border-bottom: 0; }
@media (max-width: 720px) { .book { grid-template-columns: 1fr; } .cover { max-width: 220px; } }
.cover {
  aspect-ratio: 3 / 4; border-radius: 4px 12px 12px 4px; color: var(--white);
  padding: 1.1rem 1rem; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 6px 0 0 rgba(0,0,0,0.18), 0 16px 30px -18px rgba(20,44,62,0.6);
  position: relative; overflow: hidden;
}
.cover .c-series { font-size: 0.78rem; font-weight: 600; opacity: 0.85; }
.cover .c-title { font-family: var(--serif); font-weight: 750; font-size: 1.42rem; line-height: 1.12; }
.cover .c-sub { font-size: 0.8rem; opacity: 0.88; }
.cover svg { width: 82%; margin: 0.5rem 0; opacity: 0.92; }
.cover-1 { background: var(--pen); }
.cover-2 { background: #14705A; }
.cover-3 { background: var(--ink); }
.cover-4 { background: #5E45A8; }
.cover-5 { background: var(--highlight); color: var(--ink); }
.book-info h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 0.3rem; }
.book-info .skill { color: var(--ink-soft); font-weight: 500; margin-bottom: 1rem; }
.book-info > p { max-width: 62ch; }
.chapters { columns: 2; column-gap: 2rem; padding-left: 1.3rem; margin: 0.6rem 0 1.2rem; font-size: 0.97rem; }
.chapters li { margin-bottom: 0.35rem; break-inside: avoid; }
@media (max-width: 720px) { .chapters { columns: 1; } }
.book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.book-price { font-family: var(--serif); font-weight: 750; font-size: 1.35rem; }
.tag { display: inline-block; font-size: 0.85rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 6px; background: var(--paper); border: 1px solid var(--grid-major); }

/* Article (lessons) */
.article { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }
.article .wrap > * { max-width: var(--measure); }
.article h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 2.4rem; }
.article p, .article li { font-size: 1.08rem; line-height: 1.7; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-bottom: 0.4rem; }
.article figure { margin: 1.8rem 0; }
.article figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.5rem; }
.article table { border-collapse: collapse; width: 100%; margin: 1.2rem 0 1.6rem; font-size: 1rem; }
.article th, .article td { text-align: left; padding: 0.65rem 0.7rem 0.65rem 0; border-bottom: 1px solid var(--line); }
.article th { color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; }
.article td { font-variant-numeric: tabular-nums; }
.article .meta { color: var(--ink-soft); font-size: 0.95rem; }
.callout { border: 1.5px solid var(--ink); border-radius: var(--r-md); padding: 1.1rem 1.25rem; margin: 1.8rem 0; background: var(--white); }
.callout h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.callout p:last-child { margin-bottom: 0; }
.sample-note { background: var(--paper); border-radius: var(--r-md); padding: 1.2rem 1.3rem; margin: 2.4rem 0 0; }
.sample-note h3 { font-size: 1.15rem; }

.quiz { margin: 2rem 0; padding: 1.3rem 1.3rem 1.4rem; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.quiz h3 { font-size: 1.15rem; }
.quiz .q { font-weight: 600; margin-bottom: 0.8rem; }
.quiz .feedback { margin-top: 0.9rem; }
.quiz .feedback[hidden] { display: none; }

/* Test page */
.test-card { max-width: 46rem; }
.result-level { font-family: var(--serif); font-weight: 750; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.1; margin-bottom: 0.6rem; }

/* Prose pages */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
}
#test-stage, #game-stage, #waitlist, .book { scroll-margin-top: 96px; }

/* Ebook product page */
.product { display: grid; grid-template-columns: 1fr 260px; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.product h1 { max-width: 16ch; }
.cover-hero { width: 260px; }
.cover-hero svg { width: 100%; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } .cover-hero { width: 200px; } }
.facts { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin: 1.4rem 0 1.6rem; }
.facts div { min-width: 7rem; }
.facts dt { font-size: 0.85rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 650; }
.learn-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; max-width: 60rem; }
.learn-grid li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.5rem; font-size: 1.05rem; }
.learn-grid svg { width: 20px; height: 20px; margin-top: 0.25rem; }
@media (max-width: 760px) { .learn-grid { grid-template-columns: 1fr; } }
.parts { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.part { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0.5rem 3rem; padding: 1.5rem 0; border-bottom: 1px solid var(--grid-major); }
.part h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.part-head p { margin: 0; }
.part-chapters { margin: 0; padding-left: 1.1rem; font-size: 0.98rem; }
.part-chapters li { margin-bottom: 0.25rem; }
.part-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0.6rem 0 0; font-size: 0.95rem; }
@media (max-width: 760px) { .part { grid-template-columns: 1fr; } }

/* Game feedback */
.feedback-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-top: 1.1rem; font-size: 0.93rem; color: var(--ink-soft); }
.chip { font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--grid-major); border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }
.chip:hover { border-color: var(--pen); background: var(--pen-tint); }
.fb-form { margin-top: 0.8rem; }
.fb-form[hidden] { display: none; }
.field textarea { font: inherit; color: var(--ink); width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid var(--grid-major); border-radius: var(--r-sm); background: var(--white); resize: vertical; }
.field textarea:focus { outline: 3px solid var(--pen-tint); border-color: var(--pen); }

/* Share card */
.share-wrap { display: grid; grid-template-columns: 1fr 220px; gap: 1.5rem; align-items: center; margin: 0 0 1.4rem; padding: 1.2rem; border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.share-wrap h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.share-img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); }
@media (max-width: 600px) { .share-wrap { grid-template-columns: 1fr; } .share-img { max-width: 260px; } }
