/* lemma.day: paper by day, chalkboard by night. Tokens match the app's Palette.
   Green marks only proven things; red marks only a number that clashes on a board. */
@font-face { font-family: "Lexend"; src: url("/fonts/Lexend-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --ground: #F7F8F5; --sheet: #FFFFFF; --ink: #22262B; --entry: #4A525B; --rule: #DDE2DB;
  --hl: #EEF1EC; --g1: #F0F8F3; --g2: #E1F2E9; --g3: #CDE9DA; --green: #0F7B57; --green-ink: #0B6B4B;
  --muted: #5D646C; --faint: #646B63; --given: #EEF0EC; --chip: #E9ECE8; --line2: #CBD1CA;
  --btn-bg: #22262B; --btn-fg: #FFFFFF; --red: #B3261E; --bezel: #14191A;
  --proof: 15,123,87;
  --sh1: 0 1px 2px rgba(20,30,25,.05), 0 6px 16px rgba(20,30,25,.05);
  --sh2: 0 2px 4px rgba(20,30,25,.05), 0 12px 28px rgba(20,30,25,.08), 0 32px 64px rgba(20,30,25,.08);
  --display: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1A2320; --sheet: #25312D; --ink: #ECF1EC; --entry: #C9D5CF; --rule: #2F3D38;
    --hl: #2C3935; --g1: rgba(142,223,183,.08); --g2: rgba(142,223,183,.16); --g3: rgba(142,223,183,.28); --green: #8EDFB7; --green-ink: #8EDFB7;
    --muted: #9DB0A8; --faint: #8DA199; --given: #2C3935; --chip: #2F3D38; --line2: #3A4842;
    --btn-bg: #ECF1EC; --btn-fg: #1A2320; --proof: 142,223,183; --red: #F2A59D; --bezel: #0B100E;
    --sh1: 0 1px 2px rgba(0,0,0,.25), 0 6px 16px rgba(0,0,0,.2);
    --sh2: 0 2px 4px rgba(0,0,0,.25), 0 12px 28px rgba(0,0,0,.3), 0 32px 64px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.5 var(--display); min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
main { flex: 1 0 auto; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
button { font-family: inherit; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hl { color: var(--green-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 999px; z-index: 40; text-decoration: none; }
.skip:focus { top: 12px; }
a:focus-visible, summary:focus-visible, .btn:focus-visible, .btn2:focus-visible, button:focus-visible, .gallery:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.shell { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 680px; margin: 0 auto; padding-inline: 20px; }

/* Brand pieces */
.sq { display: inline-block; width: .42em; height: .42em; background: var(--green); border-radius: .05em; flex: none; }
.wordmark { font: 500 28px/1 var(--display); letter-spacing: -.035em; display: inline-flex; align-items: baseline; gap: .04em; color: var(--ink); text-decoration: none; }
.wordmark.big { font-size: 56px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 999px; border: 0; font: 500 16px var(--display); background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; width: 100%; cursor: pointer; }
.btn2 { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink); font: 500 15px var(--display); text-decoration: none; width: 100%; cursor: pointer; }
.btn2.compact { height: 40px; font-size: 14px; }
a.btn, a.btn:visited, a.btn:hover, a.btn:focus, a.btn-sm, a.btn-sm:visited, a.btn-sm:hover, a.btn-sm:focus, .prose a.btn, .prose a.btn:visited, .prose a.btn:hover, .prose a.btn:focus { color: var(--btn-fg); text-decoration: none; }
a.btn2, a.btn2:visited, a.btn2:hover, a.btn2:focus, .prose a.btn2, .prose a.btn2:visited, .prose a.btn2:hover { color: var(--ink); text-decoration: none; }
.btn-sm { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font: 500 14px var(--display); text-decoration: none; white-space: nowrap; }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 20px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* App Store button: Apple's badge when present, a drawn stand-in until then */
.appstore { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border-radius: 14px; background: #000000; color: #FFFFFF; text-decoration: none; border: 1px solid #A6A6A6; }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore span { display: flex; flex-direction: column; font: 500 21px/1 -apple-system, "SF Pro Display", system-ui, sans-serif; letter-spacing: -.01em; }
.appstore small { font: 400 11px/1.2 -apple-system, system-ui, sans-serif; letter-spacing: .01em; }
.appstore.wide { justify-content: center; width: 100%; }
.appstore-badge { display: inline-block; line-height: 0; }
.appstore-badge img { height: 56px; width: auto; display: block; }
.appstore-badge .on-dark { display: none; }
@media (prefers-color-scheme: dark) { .appstore-badge .on-dark { display: block; } .appstore-badge .on-light { display: none; } }
.appstore-badge.wide { display: block; text-align: center; }
.appstore-badge.wide img { margin: 0 auto; }

/* Header: sticky, glass only after scrolling */
.topnav { position: sticky; top: 0; z-index: 30; background: var(--ground); border-bottom: 1px solid transparent; transition: border-color .25s ease-out, background-color .25s ease-out; }
.topnav-in { display: flex; align-items: center; gap: 24px; height: 66px; }
.nav-links { display: flex; gap: 24px; margin-left: 8px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--muted); padding: 6px 0; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topnav.scrolled { border-bottom-color: var(--rule); }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .topnav.scrolled { background: color-mix(in srgb, var(--ground) 76%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
}
.drop { display: inline-flex; align-items: center; gap: 8px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.drop b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .04em; min-width: 8ch; display: inline-block; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }

/* Footer */
.foot { margin-top: clamp(56px, 9vw, 112px); border-top: 1px solid var(--rule); }
.foot .shell { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px 28px; font-size: 13px; color: var(--muted); }
.foot .foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 40px 48px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.foot-col .mono { color: var(--ink); margin-bottom: 4px; }
.foot-col span { color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* The board: each 2x3 box its own card */
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; container-type: inline-size; }
.box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; font-size: 7.4cqw; color: var(--entry); font-weight: 300; }
.cell.given { color: var(--ink); font-weight: 500; }
.cell.t1 { background: var(--g1); } .cell.t2 { background: var(--g2); } .cell.t3 { background: var(--g3); color: var(--green-ink); }
.board-wrap { max-width: 380px; width: 100%; justify-self: center; }
.proofline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.proofline .mono { color: var(--faint); }
.clock { font: 500 17px var(--display); font-variant-numeric: tabular-nums; }
.stamp { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--green-ink); background: var(--g2); padding: 4px 10px; border-radius: 999px; }
.stamp .sq { width: 8px; height: 8px; }
.board.running + .proofline .stamp { opacity: .25; transform: scale(.92); }
.cell.fresh { animation: fill .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fill { from { transform: scale(.6); opacity: .3; background: var(--g3); } to { transform: scale(1); opacity: 1; } }
.board.anim.done .box { animation: wave .7s ease both; animation-delay: calc(var(--i) * 60ms); }
@keyframes wave { 40% { transform: translateY(-3px); border-color: var(--green); } 100% { transform: none; } }

/* Small boards: diagrams, worked examples, the 404 page */
.board.mini { gap: 4px; max-width: 220px; margin-inline: auto; }
.mini .box { border-radius: 8px; }
.mini .cell { box-shadow: inset 0 0 0 .5px var(--rule); font-weight: 500; color: var(--ink); }
.mini .cell.see { background: var(--chip); }
.mini .cell.mark { background: var(--ink); color: var(--btn-fg); }
.mini .cell.ring { box-shadow: inset 0 0 0 2px var(--ink); }
.mini .cell.void { outline: 2px dashed var(--ink); outline-offset: -5px; background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line2) 5px 6px); }

/* Patterns (Plus levels) */
.pattern { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pattern i { aspect-ratio: 1; border-radius: 3px; display: block; background: var(--given); }

/* Phone frame */
.phone { width: min(300px, 80vw); margin-inline: auto; padding: 9px; border-radius: 52px; background: var(--bezel); box-shadow: 0 0 0 1px var(--line2), var(--sh2); }
.phone-screen { position: relative; border-radius: 43px; background: var(--ground); overflow: hidden; padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 82px; height: 24px; border-radius: 14px; background: #000000; }
.ps-status { height: 24px; padding: 4px 10px 0; font: 500 13px var(--display); color: var(--ink); }
.ps-head { display: grid; grid-template-columns: 24px 1fr 24px; align-items: center; margin-top: 4px; }
.ps-x { font-size: 20px; color: var(--ink); line-height: 1; }
.ps-title { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.ps-title b { font-weight: 500; font-size: 14px; }
.ps-title .mono { font-size: 9.5px; }
.phone .board { gap: 6px; }
.phone .proofline { margin-top: 10px; }
.ps-pills { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.ps-pills span { border: 1px solid var(--rule); border-radius: 999px; padding: 6px 16px; font: 500 12px var(--display); background: var(--sheet); display: inline-flex; gap: 6px; align-items: baseline; }
.ps-pills small { font-size: 9px; }
.ps-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ps-keys i { font-style: normal; aspect-ratio: 1 / 1.15; display: flex; align-items: center; justify-content: center; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; font-size: 16px; }

/* Home: hero */
.hero-wrap { position: relative; isolation: isolate; }
.hero-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(var(--line2) 1px, transparent 1.2px); background-size: 24px 24px; opacity: .7; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%); }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; padding-block: clamp(32px, 5vw, 64px) clamp(40px, 6vw, 72px); }
.hero .copy { display: flex; flex-direction: column; gap: 22px; max-width: 35rem; }
.hero h1 { font: 500 clamp(40px, 4.7vw, 60px)/1.04 var(--display); letter-spacing: -.035em; }
.lede { font-size: clamp(16px, 1.6vw, 18px); color: var(--entry); max-width: 48ch; }
.ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.launch { padding-block: 0 8px; }
.launch-in { display: block; text-align: center; width: fit-content; max-width: 100%; margin: 0 auto; padding: 12px 22px; border: 1px solid var(--rule); border-radius: 24px; background: var(--sheet); font-size: 15px; line-height: 1.45; box-shadow: var(--sh1); }
.launch-in .live { display: inline-block; margin-right: 10px; vertical-align: middle; position: relative; top: -1px; }
.launch-in b { font-weight: 500; }
.launch-in [data-launch-count] { display: inline-block; margin-left: 10px; }
.launch-in [data-launch-count]:empty { display: none; }
.chips { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips li { border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--entry); }

.section { padding-top: clamp(56px, 9vw, 112px); }
.sec-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; max-width: 24em; }
.sec-head h2, .try-head h2, .final h2, .plus h2 { font: 500 clamp(28px, 4vw, 44px)/1.08 var(--display); letter-spacing: -.03em; }

/* Home: try a lemma */
.try { padding-top: clamp(56px, 9vw, 112px); }
.try-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; max-width: 34em; }
.try-stage { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; background: var(--sheet); border: 1px solid var(--rule); border-radius: 28px; padding: clamp(18px, 3.5vw, 36px); box-shadow: var(--sh1); }
.try-board .box { background: var(--ground); }
.try-board .cell { box-shadow: inset 0 0 0 .5px var(--rule); }
button.cell { border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.cell:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; border-radius: 0; }
.cell.open { background: var(--sheet); }
.cell.unit { background: var(--hl); }
.cell.sel { background: var(--hl); box-shadow: inset 0 0 0 2px var(--ink); }
.cell.clash { color: var(--red); font-weight: 500; }
.cell.hint { outline: 2px dashed var(--ink); outline-offset: -4px; background: var(--chip); }
.try-board.solved .cell { animation: prove .5s ease-out both; animation-delay: calc(var(--r, 0) * 110ms); }
@keyframes prove { from { background: transparent; } to { background: var(--g3); color: var(--green-ink); } }
.try-board.solved .cell { background: var(--g3); color: var(--green-ink); }
.try-board.solved .cell.given { color: var(--green-ink); }
.try-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.try-ui { display: none; flex-direction: column; gap: 14px; }
.try.is-live .try-ui { display: flex; }
.try.is-live .try-nojs { display: none; }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 320px; }
.key { height: 52px; border-radius: 14px; border: 1px solid var(--rule); background: var(--ground); color: var(--ink); font: 400 22px var(--display); cursor: pointer; transition: transform .12s ease-out, background-color .12s; }
.key:disabled, .btn2:disabled { opacity: .45; cursor: default; }
.key:active { transform: scale(.96); background: var(--hl); }
.try-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 320px; }
.try-msg { font-size: 14px; color: var(--entry); min-height: 3.2em; max-width: 36em; }
.proven-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 18px; background: var(--g1); border: 1px solid var(--g3); }
.proven-card .mono { color: var(--green-ink); }
.time-field { font: 500 20px var(--display); font-variant-numeric: tabular-nums; padding: 4px 12px; border-radius: 12px; background: var(--chip); }
.time-field.un { background: var(--g2); color: var(--green-ink); }

/* Home: how it works */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.how-step { display: flex; flex-direction: column; gap: 20px; height: 540px; overflow: hidden; background: var(--sheet); border: 1px solid var(--rule); border-radius: 26px; padding: 24px 24px 0; box-shadow: var(--sh1); }
.how-text { display: flex; flex-direction: column; gap: 6px; }
.how-text b { font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.how-text span:last-child { font-size: 14px; color: var(--muted); }
.n { width: 26px; height: 26px; border-radius: 8px; background: var(--chip); color: var(--ink); font: 500 13px var(--mono); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.shot { display: block; width: 100%; height: auto; border-radius: 11.5% / 5.3%; box-shadow: 0 0 0 1px var(--rule), var(--sh1); background: var(--ground); }
.how-step .shot { width: 74%; margin-inline: auto; flex: none; margin-top: auto; }

/* Home: bento */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 250px 250px 270px; gap: 16px; grid-template-areas: "circles seq theorem" "circles hint theorem" "rank night night"; }
.t-circles { grid-area: circles; } .t-seq { grid-area: seq; } .t-hint { grid-area: hint; } .t-theorem { grid-area: theorem; } .t-rank { grid-area: rank; } .t-night { grid-area: night; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 26px; padding: 22px 22px 0; box-shadow: var(--sh1); }
.tile h3 { font: 500 18px/1.2 var(--display); letter-spacing: -.01em; }
.tile p { font-size: 14px; color: var(--muted); }
.tile-text { display: flex; flex-direction: column; gap: 6px; }
.t-night { flex-direction: row; gap: 24px; }
.t-night .tile-text { flex: 1 1 0; padding-bottom: 22px; }
.tile-shot { width: 68%; margin-inline: auto; flex: none; margin-top: auto; }
.t-night .tile-shot { width: 170px; margin: 0 24px 0 0; flex: none; }
.days { display: flex; gap: 8px; justify-content: space-between; padding-bottom: 20px; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; }
.day::before { content: ""; width: 100%; max-width: 34px; aspect-ratio: 1; border-radius: 9px; background: var(--chip); }
.day.on::before { background: var(--green); }
.day.frozen::before { background: var(--sheet); border: 1.5px solid var(--line2); }
.day.today::before { background: transparent; border: 1.5px dashed var(--line2); }
.day svg { position: absolute; top: 0; left: 50%; width: 34px; height: 34px; padding: 6px; transform: translateX(-50%); color: var(--green-ink); }
.day i { font-style: normal; font-size: 9px; color: var(--muted); }
.hint-card { margin-bottom: 20px; padding: 14px; border-radius: 16px; background: var(--ground); border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.hint-card .mono { color: var(--muted); }
.hint-card p { color: var(--ink); font-size: 13px; }
.rank { padding-bottom: 18px; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.hist { display: flex; align-items: flex-end; gap: 4px; height: 76px; border-bottom: 1px solid var(--line2); }
.hist i { flex: 1 1 0; height: var(--h); background: var(--line2); border-radius: 3px 3px 0 0; position: relative; }
.hist i.me { background: var(--green); }
.hist i.me::after { content: "You"; position: absolute; left: 0; bottom: calc(100% + 4px); font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--green-ink); }
.hist-axis { display: flex; justify-content: space-between; color: var(--muted); }
.rank p { color: var(--ink); }
.rank b { font-weight: 500; }

/* Home: gallery */
.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 28px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: thin; scroll-padding-inline: var(--gutter); }
.gallery figure { margin: 0; flex: 0 0 clamp(210px, 24vw, 252px); scroll-snap-align: start; }
.gallery figcaption { margin-top: 14px; font-size: 14px; color: var(--entry); max-width: 20ch; }

/* Home: Plus and pricing */
.plus { background: var(--sheet); border: 1px solid var(--rule); border-radius: 28px; padding: clamp(22px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; box-shadow: var(--sh1); }
.plus-copy { display: flex; flex-direction: column; gap: 12px; }
.plus p { color: var(--entry); font-size: 15px; max-width: 34em; }
.levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.level { background: var(--ground); border: 1px solid var(--rule); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.lv-head b { font-weight: 500; font-size: 14px; }
.lv-head .mono { color: var(--faint); font-variant-numeric: tabular-nums; }
.level .pattern { gap: 3px; }
.level .pattern i { border-radius: 2px; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.price-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 26px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.price-card h3 { font: 500 22px/1.2 var(--display); letter-spacing: -.02em; }
.plus-card { border: 1.5px solid var(--ink); box-shadow: var(--sh2); }
.price-line { font-size: 15px; }
.price-line b { font: 500 36px/1 var(--display); letter-spacing: -.03em; margin-right: 6px; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ticks li { display: flex; align-items: baseline; gap: 12px; }
.ticks li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); flex: none; transform: translateY(-1px); }
.plans { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.plans li { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 2px 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.plans li > span { color: var(--muted); }
.plans li b { font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.plans li small { color: var(--muted); }
.plans li em { grid-column: 2 / -1; font-style: normal; font-size: 13px; color: var(--muted); }

/* Home: FAQ and final call */
.faq-list { max-width: 760px; }
details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { list-style: none; cursor: pointer; padding: 15px 0; font-size: 16px; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 300; font-size: 20px; line-height: 1; transition: transform .2s ease-out; }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 0 16px; font-size: 15px; color: var(--entry); max-width: 60ch; }
details a { color: var(--green-ink); }
.final { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-bottom: 8px; }
.final h2 { font-size: clamp(32px, 5vw, 56px); }
.final .launch-in { margin: 0; }

/* Pages: share, invite, legal, support, 404 */
.page { padding-block: 28px 8px; display: flex; flex-direction: column; gap: 18px; }
.page h1 { font: 500 34px/1.1 var(--display); letter-spacing: -.025em; }
.share-board { max-width: 380px; align-self: center; }
.invite-mark { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.invite-mark i { width: 34px; height: 34px; border-radius: 10px; background: var(--g2); display: flex; align-items: center; justify-content: center; font: 500 14px var(--display); color: var(--green-ink); font-style: normal; }
.invite-mark i.me { background: var(--green); color: var(--btn-fg); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.stack-tight { display: flex; flex-direction: column; gap: 6px; }
.code { font: 500 15px var(--mono); letter-spacing: .14em; color: var(--ink); }
[hidden] { display: none !important; }

.mail { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; flex-wrap: wrap; }
.mail .mono { color: var(--muted); }
.mail b { font-weight: 500; font-size: 15px; }

.prose { display: flex; flex-direction: column; gap: 14px; padding-block: 40px 8px; }
.prose h1 { font-size: clamp(30px, 4.4vw, 44px); }
.prose h2 { font: 500 20px/1.3 var(--display); margin-top: 18px; }
.prose h3 { font: 500 16px/1.3 var(--display); margin-top: 6px; }
.prose p, .prose li, .prose dd { font-size: 15px; color: var(--entry); }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose a { color: var(--green-ink); }
.prose .lead { font-size: 17px; color: var(--ink); }
.wide-prose { max-width: 760px; }
.toc { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 44px; font-size: 14px; }
.toc li { break-inside: avoid; padding-block: 2px; }
.toc a { text-decoration: none; color: var(--entry); }
.toc a:hover { text-decoration: underline; color: var(--ink); }
.prose h2[id] { scroll-margin-top: 84px; }
.keep { width: 100%; border-collapse: collapse; font-size: 13px; }
.keep th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--rule); }
.keep td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--entry); }
.keep td:first-child { color: var(--ink); font-weight: 500; }
.scroll-x { overflow-x: auto; }

.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 6px 0; }
.rules figure, .worked { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rules figcaption, .worked figcaption { font-size: 14px; color: var(--entry); }
.rules .board.mini, .worked .board.mini { width: 100%; }
.worked { max-width: 420px; padding: 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 22px; }
.worked .board.mini { max-width: 260px; }
.glossary { margin: 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.glossary dt, .glossary dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.glossary dt { font: 500 15px var(--display); color: var(--ink); padding-right: 12px; }
.facts-list { margin: 0; display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.facts-list dt, .facts-list dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.facts-list dt { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 14px; }
.copy-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.prose .press-shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.press-shots li { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.brand-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.brand-row figure { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); }
.icon-img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px var(--rule); }
.mark-img { background: var(--sheet); padding: 24px; }
.beta-cta { max-width: 340px; }
.nf { align-items: center; text-align: center; padding-block: 48px 24px; }
.nf-board { width: min(220px, 70vw); }
.nf .btn2 { max-width: 260px; }

/* Company page: quieter */
.company h1 { font: 500 40px/1.1 var(--display); letter-spacing: -.03em; }
.company dl { margin: 0; display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 12px 20px; padding-block: 20px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.company dt { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.company dd { margin: 0; }

/* Reveal on scroll: script marks what is below the fold, so nothing is hidden without it */
.reveal { transition: opacity .6s ease-out, transform .6s ease-out; transition-delay: calc(var(--k, 0) * 90ms); }
.reveal.pre { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
  @keyframes rise { from { opacity: .2; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .live { animation: ping 2.4s ease-out infinite; }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--proof), .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(var(--proof), 0); } }
  .btn, .btn-sm { transition: transform .2s ease-out; }
  .btn:hover, .btn-sm:hover { transform: translateY(-1px); }
  .stamp { transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1.3); }
  .pattern i { transition: background .5s ease; }
  .tile, .how-step { transition: transform .3s ease-out, box-shadow .3s ease-out; }
  .tile:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
}
@media (prefers-reduced-motion: reduce) {
  .cell.fresh, .board.anim.done .box, .rise, .live, .try-board.solved .cell { animation: none; }
  .reveal, .reveal.pre { opacity: 1; transform: none; transition: none; }
  .topnav, .key, .tile, .how-step, .btn, .btn-sm, .stamp, .pattern i { transition: none; }
  .tile:hover { transform: none; }
}

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, 250px) 270px; grid-template-areas: "circles seq" "circles hint" "theorem night" "theorem night" "rank rank"; }
  .t-night { flex-direction: column; gap: 14px; }
  .t-night .tile-text { padding-bottom: 0; flex: none; }
  .t-night .tile-shot { width: 68%; margin: auto auto 0; }
  .how-steps { grid-template-columns: minmax(0, 1fr); }
  .how-step { height: auto; flex-direction: row; align-items: flex-start; padding: 24px 24px 0; max-height: 330px; gap: 24px; }
  .how-step .how-text { flex: 1 1 0; padding-bottom: 24px; }
  .how-step .shot { width: 38%; max-width: 190px; margin: 0; flex: none; }
  .prose .press-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 24px 40px; }
  .hero .copy { max-width: none; }
  .try-stage { grid-template-columns: minmax(0, 1fr); }
  .try-board-wrap { max-width: 380px; margin-inline: auto; }
  .plus, .pricing { grid-template-columns: minmax(0, 1fr); }
  .company dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .company dd { margin-bottom: 12px; }
  .foot .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-co { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .topnav-in { gap: 12px; height: 60px; }
  .wordmark { font-size: 24px; }
  .drop-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-right { gap: 10px; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; grid-template-areas: none; }
  .tile { grid-area: auto; }
  .t-circles, .t-theorem, .t-night { height: 470px; }
  .t-seq, .t-hint, .t-rank { height: auto; min-height: 250px; }
  .how-step { flex-direction: column; max-height: none; height: 470px; }
  .how-step .shot { width: 66%; max-width: none; margin: auto auto 0; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rules figure { flex-direction: row; align-items: center; gap: 16px; }
  .rules .board.mini { max-width: 140px; flex: none; }
  .glossary { grid-template-columns: minmax(0, 1fr); }
  .glossary dt { border-bottom: 0; padding-bottom: 0; }
  .glossary dd { padding-top: 2px; }
  .facts-list { grid-template-columns: minmax(0, 1fr); }
  .facts-list dt { border-bottom: 0; padding-bottom: 0; }
  .facts-list dd { padding-top: 2px; }
  .prose .press-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-row { grid-template-columns: minmax(0, 1fr); }
  .toc ol { columns: 1; }
  .plans li { grid-template-columns: 4rem 1fr auto; }
  .price-card { padding: 22px; }
  .try-stage { border-radius: 22px; }
}
