/* Secret Agent Training! sales page (Kid Who Did). The page is a case file spread on a desk: every section is a
   different spy document (a clipped note, index cards, a rule sheet, level folders, pinned pages, a memo), all paper
   with hard shadows on manila. One loud thing: the hero's code wheel cracking a note. Faces come from the book:
   Saira Stencil One heads, Big Shoulders Stencil for level names, Nunito reading, Patrick Hand for the kid's pencil,
   Special Elite only where a typewriter would be (the memo, file tabs). */
:root {
  --manila: #E7D3A1; --kraft: #CDB07A; --shade: #B99A5C; --paper: #FFFDF7; --ink: #151515; --muted: #4c453c;
  --red: #C62B2B; --yellow: #FFE45C; --rule: #cbbfa5;
  --stencil: 'Saira Stencil One', Impact, sans-serif; --cond: 'Big Shoulders Stencil Display', Impact, sans-serif;
  --body: 'Nunito', system-ui, sans-serif; --hand: 'Patrick Hand', 'Comic Sans MS', cursive; --type: 'Special Elite', 'Courier New', monospace;
  --code: 'Courier Prime', 'Courier New', monospace;
  --line: 3px; --shadow: 8px 10px 0 var(--shade);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 1.125rem/1.6 var(--body); overflow-x: hidden;
  background-color: var(--manila);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .18 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }      /* the player's other page images; .page-img's display:block would win otherwise */
a { color: inherit; }
b, strong { font-weight: 800; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
section { padding: clamp(2rem, 4.5vw, 3rem) 0; }   /* about 96 px between sections on desktop, 64 px on phones (Vince, 2026-11-11: "too much space") */
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 { font: 400 clamp(2rem, 6.6vw, 3.2rem)/1.06 var(--stencil); margin-bottom: .7rem; text-wrap: balance; max-width: 22ch; }
.sub { font-size: 1.1rem; color: var(--muted); max-width: 42rem; margin: 0 0 1.8rem; }

/* ---------- Hero ---------- */
.hero { padding: 1.4rem 0 1.6rem; }
.hero-grid { display: grid; gap: 2.6rem; align-items: center; }
@media (min-width: 940px) { .hero { padding: 3rem 0 2rem; } .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.2rem; } }
.presents { margin: 0 0 .5rem; font: 800 1rem/1.2 var(--body); }
.wordmark { font: 400 clamp(2.9rem, 12.6vw, 5.4rem)/.94 var(--stencil); letter-spacing: .005em; }
.wordmark span { display: block; font-size: 1.2em; }
.swipe { margin: 1rem 0 1.1rem; font: 800 clamp(1.1rem, 4.3vw, 1.4rem)/1.35 var(--body); }
.swipe span { background: linear-gradient(97deg, transparent .25em, var(--yellow) .25em, var(--yellow) calc(100% - .2em), transparent calc(100% - .2em)); padding: .1em .45em .12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-line { margin: 0 0 .9rem; font: 800 clamp(1.3rem, 4.6vw, 1.7rem)/1.28 var(--body); max-width: 31ch; }
.lede { margin: 0 0 .9rem; max-width: 37rem; font-size: 1.12rem; }
.buy { display: inline-block; padding: 1.05rem 1.5rem 1.1rem; background: var(--red); color: #fff; text-decoration: none; font: 800 1.2rem/1 var(--body);
  border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: 5px 6px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.buy:hover { transform: translate(-2px, -2px); box-shadow: 7px 8px 0 var(--ink); }
.buy:active { transform: translate(2px, 3px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- The cartoon stage (hero and player) ---------- */
.stage-card { position: relative; margin: 0; padding: 10px; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); }
.stage-card .stage { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 8px; background: #E7D3A1; }
.stage-card .clip { position: absolute; top: -30px; right: 38px; width: 20px; height: 58px; z-index: 2; }
.cap-bar { display: flex; align-items: center; gap: .8rem; min-height: 3.6rem; padding: .7rem .3rem .2rem; }
.cap { flex: 1; font: 800 1.08rem/1.3 var(--body); }
.play { flex: none; min-width: 5rem; min-height: 44px; padding: .5rem .9rem; background: var(--paper); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 999px;
  font: 800 .95rem/1 var(--body); cursor: pointer; }
.play:hover { background: var(--yellow); }

/* ---------- Mission player ---------- */
.tabs { display: flex; gap: .45rem; position: relative; z-index: 1; margin-bottom: -3px; }
.tabs button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: .55rem .75rem .65rem; text-align: left; color: var(--ink); background: var(--kraft);
  border: var(--line) solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; font: 800 1rem/1.15 var(--body); cursor: pointer; }
.tabs button small { display: block; margin-bottom: .15rem; font: 400 .82rem/1.2 var(--type); color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--paper); }
.player-body { display: grid; gap: 1.8rem; }
@media (min-width: 900px) { .player-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 2.6rem; } }
.player .stage-card { border-top-left-radius: 0; }
.file-card { position: relative; padding: 1.3rem 1.4rem 1.2rem; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 6px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .file-card { margin-top: 3.4rem; transform: rotate(1deg); } }
.file-tab { margin: 0 0 .35rem; font: 400 1rem/1.3 var(--type); color: var(--muted); }
.file-card h3 { margin: 0 0 .5rem; font: 400 clamp(1.6rem, 5vw, 2.15rem)/1.05 var(--stencil); }
.file-card p { margin: .5rem 0 0; }
.file-pages { margin-top: 1.2rem; }
.file-pages .page-img { width: min(62%, 15rem); transform: rotate(-2deg); }
.file-pages-cap { font: 1.15rem/1.3 var(--hand); color: var(--muted); }

/* ---------- Imagine: index cards ---------- */
.cards { display: grid; gap: 2rem; margin-top: .6rem; }
@media (min-width: 820px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; } }
.index-card { position: relative; padding: 2.1rem 1.2rem 1.3rem 2.6rem; font-size: 1.1rem; line-height: 32px; border: 2px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow);
  background-color: var(--paper); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #bcd3ea 31px, #bcd3ea 32px); background-position: 0 25px; }
.index-card::before { content: ''; position: absolute; top: 0; bottom: 0; left: 1.7rem; width: 2px; background: #e9a0a0; }
.index-card::after { content: ''; position: absolute; top: -13px; left: 50%; width: 92px; height: 26px; margin-left: -46px; background: rgb(255 255 255 / .6); border: 1px solid rgb(0 0 0 / .08); transform: rotate(-3deg); }
.index-card p { margin: 0; }
.index-card:nth-child(1) { transform: rotate(-1.1deg); }
.index-card:nth-child(2) { transform: rotate(.9deg); }
.index-card:nth-child(3) { transform: rotate(-.5deg); }
.code { font: 700 1em/1 var(--code); letter-spacing: .03em; }
.hand { font: 1.32em/1 var(--hand); }

/* ---------- Agent Rules ---------- */
.rules-grid { display: grid; gap: 1.6rem; align-items: start; }
@media (min-width: 900px) { .rules-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 3.4rem; } }
.rules-grid p { margin: 0; max-width: 34rem; font-size: 1.12rem; }
.rule-sheet { counter-reset: rule; list-style: none; margin: 0; padding: 1.1rem 1.4rem .8rem; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 6px; box-shadow: var(--shadow); }
.rule-sheet li { counter-increment: rule; display: grid; grid-template-columns: 2.4rem 1fr; gap: .7rem; align-items: baseline; padding: .75rem 0; border-bottom: 2px dashed var(--rule); font-weight: 700; font-size: 1.12rem; line-height: 1.4; }
.rule-sheet li:last-child { border-bottom: 0; }
.rule-sheet li::before { content: counter(rule); font: 400 2rem/1 var(--stencil); color: var(--red); }

/* ---------- Levels: a folder per level ---------- */
.key { width: 1.2rem; height: 1.2rem; vertical-align: -.22rem; }
.folders { display: grid; gap: 3rem 1.4rem; margin-top: 2.8rem; }
@media (min-width: 640px) { .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .folders { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lvl { position: relative; padding: 1.1rem 1.15rem .9rem; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 0 10px 10px 10px; box-shadow: var(--shadow); }
.lvl-tab { position: absolute; top: calc(-2.1rem + 1px); left: -3px; height: 2.1rem; padding: .32rem .95rem 0; background: var(--kraft); border: var(--line) solid var(--ink); border-bottom: 0;
  border-radius: 10px 10px 0 0; font: 400 1rem/1.3 var(--type); }
.lvl h3 { margin: 0 0 .15rem; font: 900 1.75rem/1 var(--cond); letter-spacing: .02em; }
.lvl .line { margin: 0 0 .7rem; color: var(--muted); font-style: italic; font-size: 1.02rem; line-height: 1.35; }
.lvl ol { list-style: none; margin: 0; padding: 0; }
.lvl li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .55rem; align-items: center; padding: .3rem 0; border-top: 1px solid #ece3cf; font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.lvl li .n { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 2.5px solid var(--ink); border-radius: 50%; font: 800 .82rem/1 'Rubik', var(--body); }

/* ---------- Pages ---------- */
.page-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1rem; }
@media (min-width: 760px) { .page-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem 1.5rem; } }
.page-row figure { margin: 0; }
.page-img { display: block; width: 100%; height: auto; background: #fff; border: 2px solid var(--ink); border-radius: 3px; box-shadow: 6px 7px 0 var(--shade); cursor: zoom-in; }
.page-row figure:nth-child(4n + 1) .page-img { transform: rotate(-.9deg); }
.page-row figure:nth-child(4n + 2) .page-img { transform: rotate(.7deg); }
.page-row figure:nth-child(4n + 3) .page-img { transform: rotate(-.4deg); }
.page-row figure:nth-child(4n) .page-img { transform: rotate(1deg); }
.page-row figcaption { margin-top: .6rem; font: 700 .98rem/1.3 var(--body); }

/* ---------- The paper does part of the work ---------- */
.tools-grid { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 860px) { .tools-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3.6rem; } }
.tool-page { margin: 0 auto; width: 100%; max-width: 400px; transform: rotate(-2deg); }
.tools-grid p { max-width: 38rem; }
.hand-note { font: 1.5rem/1.3 var(--hand); color: var(--muted); }

/* ---------- For grown-ups: the memo, declassified on request ---------- */
.memo { position: relative; max-width: 54rem; margin: 0 auto; padding: clamp(1.3rem, 4vw, 2.6rem); background: var(--paper); border: var(--line) solid var(--ink); border-radius: 4px; box-shadow: var(--shadow); }
.memo-line { margin: 0; font: 400 1.05rem/1.6 var(--type); }
.memo-line span, .memo-re span { display: inline-block; width: 4.4rem; color: var(--muted); }
.memo-re { max-width: none; margin: .1rem 0 1.2rem; padding-bottom: .9rem; border-bottom: 3px double var(--ink); font: 400 clamp(1.2rem, 4.2vw, 1.65rem)/1.35 var(--type); }
.stamp-red { position: absolute; top: 1.1rem; right: 1rem; margin: 0; padding: .32rem .6rem .2rem; color: var(--red); border: 4px double var(--red); border-radius: 8px;
  font: 900 clamp(1.25rem, 5vw, 2rem)/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; transform: rotate(9deg); opacity: .9; }
.declass { list-style: none; margin: 1.3rem 0 0; padding: 0; }
.declass li { padding: .75rem 0; border-top: 1px dashed var(--rule); }
.declass b { display: block; }
.declass .lesson { padding: 0 .1em; }
html.js .declass .lesson { color: transparent; background-image: linear-gradient(var(--ink), var(--ink)); background-repeat: no-repeat; background-size: 100% 100%; background-position: right center;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .5s ease calc(var(--i, 0) * 90ms), color .25s ease calc(var(--i, 0) * 90ms + .3s); }
html.js .declass.open .lesson { color: var(--ink); background-size: 0% 100%; }
.declassify { margin-top: .4rem; min-height: 48px; padding: .8rem 1.3rem; background: var(--ink); color: #fff; border: var(--line) solid var(--ink); border-radius: 10px; font: 800 1.08rem/1 var(--body); cursor: pointer; box-shadow: 4px 5px 0 var(--shade); }
.declassify:hover { background: #333; }
html:not(.js) .declassify { display: none; }

/* ---------- Offer ---------- */
.offer { padding: clamp(2.4rem, 5.5vw, 3.6rem) 0; background: var(--kraft); border-top: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); }   /* a colored band keeps a little more room inside */
.offer-grid { display: grid; gap: 2.2rem; align-items: start; }
@media (min-width: 900px) { .offer-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3.4rem; } }
.get { list-style: none; margin: 0; padding: 0; }
.get li { position: relative; padding: .55rem 0 .55rem 2.5rem; font-size: 1.12rem; }
.get li::before { content: ''; position: absolute; left: 0; top: .78rem; width: 1.45rem; height: 1.45rem; border: 2.5px solid var(--ink); border-radius: 4px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23C62B2B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 82% no-repeat; }
.price-card { padding: 1.6rem 1.5rem 1.4rem; text-align: center; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: 8px 10px 0 var(--ink); }
.price { margin: 0; font: 400 clamp(4rem, 15vw, 5.6rem)/1 var(--stencil); }
.price .dollar { font-size: .5em; vertical-align: .72em; margin-right: .04em; }
.price-sub { margin: .25rem 0 1.2rem; color: var(--muted); }
.guarantee { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 2px dashed var(--shade); text-align: left; }
.guarantee h3 { margin: 0 0 .35rem; font: 900 1.5rem/1.1 var(--cond); letter-spacing: .02em; }
.guarantee p { margin: 0; }

/* ---------- FAQ ---------- */
.faq details { max-width: 52rem; margin: 0 0 .9rem; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 10px; box-shadow: 5px 6px 0 var(--shade); }
.faq summary { position: relative; padding: 1rem 3.2rem 1rem 1.2rem; font-weight: 800; font-size: 1.12rem; line-height: 1.35; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ''; position: absolute; right: 1.25rem; top: 50%; width: 16px; height: 3px; margin-top: -1.5px; background: var(--ink); border-radius: 2px; }
.faq summary::after { transform: rotate(90deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { margin: 0; padding: 0 1.2rem 1.1rem; max-width: 62ch; }

/* ---------- Closing and footer ---------- */
.closing { text-align: center; }
.closing h2 { margin-left: auto; margin-right: auto; }
.closing p { max-width: 34rem; margin: 0 auto 1.5rem; font-size: 1.15rem; }
.footer { padding: 2rem 0 2.4rem; border-top: var(--line) solid var(--ink); font-size: .95rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; }
.footer-links a { margin-left: 1rem; }

/* ---------- Dialogs: page zoom, Terms and Privacy (the Show-Off Math! dialogs) ---------- */
.zoom { width: min(96vw, 900px); max-height: 92vh; padding: 0; border: var(--line) solid var(--ink); border-radius: 12px; background: var(--paper); box-shadow: 8px 8px 0 var(--ink); overflow: auto; }
.zoom::backdrop { background: rgb(21 21 21 / .78); }
.zoom img { display: block; width: 100%; height: auto; }
.zoom-close, .legal-close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--yellow); color: var(--ink);
  font: 900 1.5rem/1 var(--body); text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.zoom-close { position: sticky; top: .6rem; float: right; margin: .6rem .6rem -3rem 0; z-index: 2; }
.legal { width: min(94vw, 46rem); max-width: none; max-height: 88vh; padding: 0; border: var(--line) solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); overflow: auto; }
.legal::backdrop { background: rgb(21 21 21 / .72); }
html:not(.legal-js) .legal:target:not([open]) { display: block; position: fixed; inset: 0; margin: auto; z-index: 30; }
.legal-bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: .75rem .75rem 0; }
.legal-body { padding: 0 clamp(1.2rem, 4vw, 2.4rem) 2.2rem; margin-top: -1.4rem; }
.legal h2 { font-size: clamp(1.8rem, 5vw, 2.3rem); }
.legal-date { margin: .45rem 0 1.4rem; color: var(--muted); font-size: .95rem; }
.legal h3 { margin: 1.6rem 0 .45rem; font: 800 1.15rem/1.25 var(--body); }
.legal p, .legal li { max-width: 62ch; font-size: 1.02rem; line-height: 1.6; }
.legal ul { list-style: disc; margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin: .35rem 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .buy, .faq summary::after { transition: none; }
  html.js .declass .lesson { transition: none; }
}
