/* Plain Logic — "printed answer sheet": paper, ink, one red pencil. */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #f4f0e6;
  --paper-2: #ebe5d6;
  --card: #fbf9f3;
  --ink: #16182a;
  --ink-2: #4a4c5e;
  --rule: #c9c2b0;
  --red: #b8321c;
  --red-ink: #8f2412;
  --mark: #f3d85a;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(1.15rem, 4.5vw, 3rem);
  --gap: clamp(3.5rem, 9vw, 7.5rem);
  --w: 76rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  background-image: linear-gradient(var(--paper-2) 1px, transparent 1px);
  background-size: 100% 2.5rem; background-position: 0 -1px;
  background-attachment: local;
}
body::before { content: ""; position: fixed; inset: 0; background: var(--paper); opacity: .78; pointer-events: none; z-index: -1; }
h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

/* ------------------------------------------------ header */
.top { max-width: var(--w); margin: 0 auto; padding: .9rem var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1.5px solid var(--ink); }
.mark { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 600 1.2rem/1 var(--serif); letter-spacing: -.01em; min-height: 44px; white-space: nowrap; }
.mark svg { width: 1.35rem; height: 1.35rem; }
.top-note { font: 400 .72rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); text-align: right; max-width: 11.5rem; }
@media (min-width: 30rem) { .top-note { max-width: none; } }

/* ------------------------------------------------ shared */
.view { max-width: var(--w); margin: 0 auto; padding: 0 var(--pad); }
.over { font: 500 .74rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.lead { font-size: clamp(1.08rem, .98rem + .5vw, 1.3rem); line-height: 1.45; max-width: 34em; text-wrap: pretty; }
.lead strong { font-weight: 600; background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); }
.fine { font-size: .875rem; line-height: 1.45; color: var(--ink-2); max-width: 40em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .7rem 1.25rem; border: 1.5px solid var(--ink); border-radius: 3px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s;
}
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--red); }
.btn-ink:hover { color: var(--paper); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--red); }
.btn-red { background: var(--red); color: #fff; border-color: var(--red-ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-red:hover { color: #fff; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .38; cursor: not-allowed; box-shadow: none; transform: none; }

/* ------------------------------------------------ hero */
.hero { display: grid; gap: 2.25rem; padding: clamp(1.4rem, 4vw, 4rem) 0 var(--gap); }
.hero h1 { font: 500 clamp(2.55rem, 1.1rem + 6.6vw, 6.1rem)/.96 var(--serif); letter-spacing: -.035em; margin: .7rem 0 1.1rem; text-wrap: balance; font-optical-sizing: auto; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--red); }
.cta-row { display: flex; flex-direction: column; gap: .8rem; margin: 1.4rem 0 1rem; }

.receipt {
  background: var(--card); border: 1.5px solid var(--ink); padding: 1.15rem 1.15rem 1.6rem;
  font: 400 .86rem/1.5 var(--mono); position: relative; max-width: 25rem; justify-self: start; width: 100%;
  box-shadow: 6px 6px 0 var(--paper-2);
  --tooth: 10px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
}
.r-head { display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; padding-bottom: .6rem; border-bottom: 1.5px dashed var(--ink); margin-bottom: .6rem; }
.r-line { display: flex; align-items: baseline; gap: .5rem; margin-top: .25rem; }
.r-line dt { flex: none; }
.r-line dd { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; }
.r-line::after { content: ""; order: 1; flex: 1; border-bottom: 1.5px dotted var(--rule); transform: translateY(-.25em); }
.r-line dd { order: 2; }
.r-main { font-weight: 500; font-size: 1rem; margin-top: .7rem; }
.r-sub { color: var(--ink-2); padding-left: 1rem; position: relative; }
.r-sub::before { content: "+"; position: absolute; left: 0; }
.r-total { border-top: 1.5px dashed var(--ink); margin-top: .7rem; padding-top: .6rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.r-total dd { color: var(--red); }
.r-foot { margin-top: .8rem; color: var(--ink-2); font-size: .8rem; }

/* ------------------------------------------------ bands */
.band { display: grid; gap: 1.4rem; padding: 0 0 var(--gap); }
.band-label { border-top: 1.5px solid var(--ink); padding-top: .8rem; display: flex; gap: 1rem; align-items: baseline; }
.band-label .num { font: 500 .8rem/1 var(--mono); letter-spacing: .08em; color: var(--red); }
.band h2 { font: 500 clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem)/1.04 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
.band h3 { font: 600 1.05rem/1.25 var(--sans); }
.intro { max-width: 36em; margin-bottom: 1.4rem; }

.sheet { background: var(--card); border: 1.5px solid var(--ink); padding: clamp(1rem, 3.5vw, 2rem); }
.q-area { font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: .7rem; }
.q-prompt { font: 500 clamp(1.12rem, 1rem + .7vw, 1.45rem)/1.3 var(--serif); letter-spacing: -.01em; max-width: 32em; text-wrap: pretty; }

.ex-tabs { display: flex; gap: 0; margin-bottom: -1.5px; position: relative; z-index: 1; }
.ex-tab { font: 500 .8rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; min-height: 44px; padding: 0 1rem; border: 1.5px solid var(--ink); border-right-width: 0; background: var(--paper-2); color: var(--ink-2); cursor: pointer; }
.ex-tab:last-child { border-right-width: 1.5px; }
.ex-tab[aria-selected="true"] { background: var(--card); color: var(--ink); border-bottom-color: var(--card); }
.ex-explain { margin-top: 1.1rem; padding: .9rem 1rem; border-left: 4px solid var(--red); background: var(--paper); }
.ex-explain strong { font-weight: 600; }

/* figures */
.pl-stim { margin: 1.1rem 0 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.25rem, 1.2vw, .7rem); color: var(--ink); }
.pl-tok { width: clamp(2.6rem, 12.5vw, 4.6rem); height: auto; aspect-ratio: 1; flex: none; }
.pl-q { color: var(--red); }
.pl-q text { font-family: var(--serif); }
.pl-grid { width: clamp(4rem, 19vw, 6.6rem); height: auto; aspect-ratio: 1; flex: none; }
.pl-one .pl-grid { width: clamp(6.5rem, 34vw, 9rem); }
.pl-gseq .pl-tok { width: clamp(3.4rem, 17vw, 5.6rem); }
.pl-nums { gap: clamp(.7rem, 3.4vw, 1.6rem); }
.pl-num { font: 500 clamp(1.7rem, 7.6vw, 3rem)/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pl-qn { color: var(--red); }
.pl-gpair { gap: clamp(1rem, 6vw, 2.5rem); }
.pl-gpair .pl-grid { width: clamp(5.6rem, 28vw, 8rem); display: block; }
.pl-gpair figcaption { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: .5rem; }
.pl-rules { flex-direction: column; align-items: flex-start; gap: .5rem; }
.pl-rule { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pl-side { display: inline-flex; flex-wrap: wrap; }
.pl-rules .pl-tok { width: clamp(2.1rem, 9.5vw, 3.4rem); }
.pl-to { width: 2rem; flex: none; color: var(--ink-2); margin: 0 .2rem; }

/* answers: OMR-style bubbles */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1.1rem; }
.opts.text { grid-template-columns: 1fr; }
.opt {
  display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; padding: .55rem .8rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 3px; cursor: pointer;
  font: 400 1.02rem/1.3 var(--sans); color: var(--ink); text-align: left; width: 100%;
  transition: background-color .15s, transform .15s var(--ease), box-shadow .15s var(--ease);
}
.opt:hover { background: var(--paper-2); }
.opt .bub { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font: 500 .82rem/1 var(--mono); transition: background-color .15s, color .15s; }
.opt[aria-checked="true"] { background: var(--card); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.opt[aria-checked="true"] .bub { background: var(--ink); color: var(--paper); }
.opt .pl-tok { width: clamp(2.5rem, 11vw, 3.6rem); }
.opt .pl-grid { width: clamp(3.3rem, 15vw, 4.6rem); }
.opt .pl-orow { display: inline-flex; flex-wrap: wrap; }
.opt .pl-orow .pl-tok { width: clamp(1.45rem, 6.2vw, 2.3rem); }
.opt.right { border-color: var(--ink); background: var(--card); }
.opt.right .bub { background: var(--ink); color: var(--paper); }
.opt.wrong .bub { background: var(--red); border-color: var(--red-ink); color: #fff; }
.opt.wrong { text-decoration: line-through; text-decoration-color: var(--red); }

/* offer */
.two { display: grid; gap: 1.6rem; }
.col { border: 1.5px solid var(--ink); padding: 1.3rem; background: var(--card); display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.col h3 { font: 500 1.6rem/1.1 var(--serif); letter-spacing: -.02em; display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.tag { font: 500 .78rem/1 var(--mono); letter-spacing: .06em; padding: .35rem .5rem; border: 1.5px solid var(--ink); text-transform: uppercase; }
.tag-red { background: var(--red); border-color: var(--red-ink); color: #fff; }
.ticks li { padding-left: 1.6rem; position: relative; margin-bottom: .5rem; max-width: 34em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .42em; width: .85rem; height: .45rem; border-left: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg); }
.col .btn { align-self: stretch; }

/* method */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--ink); background: var(--card); margin-bottom: 1.8rem; }
.areas > div { padding: 1rem; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.areas > div:nth-child(2n) { border-right: 0; }
.areas > div:nth-last-child(-n+2) { border-bottom: 0; }
.areas h3 { font: 500 1.25rem/1.1 var(--serif); margin-bottom: .35rem; }
.areas p { font-size: .95rem; color: var(--ink-2); line-height: 1.4; }
.plain li { padding: .95rem 0; border-top: 1px solid var(--rule); max-width: 44em; text-wrap: pretty; }
.plain li:last-child { border-bottom: 1px solid var(--rule); }
.plain strong { font-weight: 600; }

.terms > div { display: grid; gap: .2rem; padding: .95rem 0; border-top: 1px solid var(--rule); }
.terms > div:last-child { border-bottom: 1px solid var(--rule); }
.terms dt { font: 500 .76rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.terms dd { max-width: 40em; text-wrap: pretty; }

/* ------------------------------------------------ demo runner */
.runner, .result, .wait { padding: clamp(1.2rem, 4vw, 3rem) 0 var(--gap); max-width: 46rem; margin: 0 auto; }
.run-top { display: grid; gap: .7rem; margin-bottom: 1rem; }
.ticks-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.ticks-bar i { height: 8px; border: 1.5px solid var(--ink); background: transparent; }
.ticks-bar i.t-done { background: var(--ink); }
.ticks-bar i.t-now { background: var(--red); border-color: var(--red-ink); }
.run-nav { display: flex; justify-content: space-between; gap: .8rem; margin: 1.1rem 0 1rem; }
.run-nav .btn-ink { flex: 1; max-width: 16rem; }

/* ------------------------------------------------ result */
.score { font: 500 clamp(6rem, 3rem + 22vw, 13rem)/.86 var(--serif); letter-spacing: -.05em; margin: .5rem 0 1.2rem; font-variant-numeric: lining-nums; }
.score .of { color: var(--red); font-style: italic; font-weight: 400; font-size: .5em; letter-spacing: -.03em; margin-left: .06em; }
.result .lead { margin-bottom: .6rem; }
.upsell { margin: 2.2rem 0; border: 1.5px solid var(--ink); background: var(--card); padding: 1.3rem; display: grid; gap: .9rem; box-shadow: 6px 6px 0 var(--paper-2); }
.upsell h2 { font: 500 clamp(1.45rem, 1.2rem + 1.4vw, 2rem)/1.1 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.why { margin: 1.6rem 0; }
.why-q { font: 500 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { min-height: 44px; padding: .5rem .9rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font: 400 .95rem/1.2 var(--sans); color: var(--ink); cursor: pointer; transition: background-color .15s, color .15s; }
.chip:hover { background: var(--paper-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.why-thanks { font-size: .875rem; color: var(--ink-2); min-height: 1.4em; margin-top: .5rem; }
.links { font-size: .95rem; margin-top: 1.4rem; }

/* ------------------------------------------------ waiting list */
.wait h1 { font: 500 clamp(2.3rem, 1.4rem + 5vw, 4.6rem)/.98 var(--serif); letter-spacing: -.035em; margin: .7rem 0 1rem; text-wrap: balance; }
.wait > p { max-width: 38em; margin-bottom: 1rem; }
form { display: grid; gap: .5rem; margin-top: 1.6rem; max-width: 30rem; }
label { font: 500 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
input[type="email"], input[type="text"] { min-height: 3.25rem; padding: .6rem .8rem; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--card); font: 400 1.05rem/1.2 var(--sans); color: var(--ink); width: 100%; }
input::placeholder { color: #666776; }
input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 2px var(--red) inset; }
.err { color: var(--red-ink); font-weight: 500; font-size: .92rem; min-height: 1.3em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { margin-top: 1.6rem; border: 1.5px solid var(--ink); background: var(--card); padding: 1.3rem; max-width: 34rem; }
.done h2 { font: 500 2rem/1 var(--serif); letter-spacing: -.02em; margin-bottom: .6rem; }

/* ------------------------------------------------ footer */
.foot { border-top: 1.5px solid var(--ink); max-width: var(--w); margin: 0 auto; padding: 1.4rem var(--pad) 2.6rem; font-size: .9rem; color: var(--ink-2); display: grid; gap: .5rem; }
.foot strong { color: var(--ink); font-family: var(--serif); font-weight: 600; }
.noscript { max-width: var(--w); margin: 0 auto; padding: 1rem var(--pad); font-weight: 600; }

/* ------------------------------------------------ larger screens */
@media (min-width: 30rem) {
  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .opts.fig4 { grid-template-columns: repeat(4, 1fr); }
  .opts.fig3, .opts.text.three { grid-template-columns: repeat(3, 1fr); }
  .opts.fig4 .opt { flex-direction: column; padding: .8rem .5rem; gap: .5rem; }
}
@media (min-width: 46rem) {
  .opts.text { grid-template-columns: 1fr 1fr; }
  .opts.text.short { grid-template-columns: repeat(4, 1fr); }
  .opts.text.three { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 5fr 7fr; align-items: start; }
  .areas { grid-template-columns: repeat(4, 1fr); }
  .areas > div { border-bottom: 0; }
  .areas > div:nth-child(2n) { border-right: 1.5px solid var(--ink); }
  .areas > div:last-child { border-right: 0; }
  .terms > div { grid-template-columns: 11rem 1fr; gap: 1.5rem; }
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: 7fr 5fr; align-items: end; gap: 3rem; }
  .receipt { justify-self: end; transform: rotate(1.6deg); margin-bottom: 1.2rem; }
  .band { grid-template-columns: 3fr 9fr; gap: 3rem; }
  .band-label { flex-direction: column; gap: .8rem; position: sticky; top: 1rem; align-self: start; }
  .band-body { border-top: 1.5px solid var(--ink); padding-top: .9rem; }
}

/* ------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  .receipt { animation: print .9s var(--ease) .15s both; }
  @keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
  .sheet.swap { animation: swap .28s var(--ease); }
  @keyframes swap { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
  .score.pop { animation: pop .7s var(--ease) both; }
  @keyframes pop { from { opacity: 0; transform: translateY(.12em); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
/* used by the video capture script: freeze everything */
html.still * { transition: none !important; animation: none !important; }
