/* GENERATED by build-css.sh from design-system/td-site.css. Edit that, not this file. */
/* Top Dog Web: additions for the free pages (assessment, tools, games).
   Source of truth. build-css.sh copies this file to the site root next to td.css.
   Load order on a page: fonts/stylesheet.css, td.css, td-site.css.
   Every class is prefixed td- like td.css. Each block is written up in components/*.md. */

/* ---- Stolzl weight map (README, Type) ----
   The free pages self host Stolzl at 400, 500 and 700. td.css asks for 600 on body copy and 800
   on headings. 800 rounds down to 700 on its own; 600 would round UP to 700 and make body copy
   bold, so everything td.css sets at 600 is set to 500 here. Never write font-weight: 600. */
.td-page{font-weight:500;margin:0}
body.td-page{min-height:100vh}
.td-ticks li,.td-opt small,.td-consent,.td-plan__per,.td-step p,.td-review p,.td-review cite span,.td-footer{font-weight:500}

/* ---- Focus (README, States): dark blue ring with a 2px gap, visible on every ground ---- */
.td-page :focus-visible{outline:3px solid var(--dark-blue);outline-offset:2px}
.td-dark :focus-visible,.td-mail :focus-visible,body.playing :focus-visible{outline-color:var(--yellow)}

/* ---- Page frame ---- */
.td-main{padding-block:var(--stack) var(--section-end)}
.td-stack>:not(:first-child){margin-top:var(--stack)}
.td-flow>:not(:first-child){margin-top:12px}
.td-center{text-align:center}
.td-hero a{display:inline-block}
.td-hero__logo{height:auto}
.td-hero--slim h1,.td-hero--slim .td-squiggle{display:none}

/* ---- Type helpers: the README scale as classes ---- */
.td-h1{font-size:24px;font-weight:800;line-height:1.22;text-wrap:balance;margin:0;color:var(--dark-blue)}
.td-h2{font-size:22px;font-weight:800;line-height:1.24;text-wrap:balance;margin:0;color:var(--dark-blue)}
.td-h3{font-size:19px;font-weight:800;line-height:1.2;text-wrap:balance;margin:0;color:var(--dark-blue)}
.td-h4{font-size:17px;font-weight:800;line-height:1.3;margin:0;color:var(--dark-blue)}
.td-p{font-size:16px;font-weight:500;line-height:1.5;margin:0;color:var(--dark-blue)}
.td-hint{font-size:15px;font-weight:500;line-height:1.45;margin:0;color:var(--muted)}
.td-caption{font-size:14px;font-weight:700;line-height:1.4;margin:0;color:var(--muted)}
.td-h1+.td-hint,.td-h2+.td-hint,.td-h3+.td-hint,.td-h1+.td-p,.td-h2+.td-p{margin-top:6px}
.td-link{color:var(--dark-blue);font-weight:700}

/* ---- SiteNav: the bar between the three free sites, above the hero ---- */
.td-nav{background:var(--dark-blue)}
.td-nav__in{display:flex;gap:6px;padding-block:8px}
.td-nav a{flex:1 1 0;min-height:44px;display:grid;place-items:center;border-radius:var(--r-sm);color:#fff;font-weight:700;font-size:15px;line-height:1.2;text-align:center;text-decoration:none;box-shadow:inset 0 0 0 2px rgba(255,255,255,.4);transition:background .12s ease}
.td-nav a:hover{background:rgba(255,255,255,.14)}
.td-nav a[aria-current="page"]{background:#fff;color:var(--dark-blue);box-shadow:none}

/* ---- Hub link: the quiet "All games" or "All tools" way back, on every screen ---- */
.td-hublink{padding-top:var(--stack)}
.td-hublink a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:var(--r-md);background:var(--pale-blue);color:var(--dark-blue);font-weight:700;font-size:15px;text-decoration:none}
.td-hublink a:hover{background:var(--pale-blue-pressed)}
body.playing .td-hublink{display:none}
.td-playlink{margin:8px 0 0;text-align:center;flex-shrink:0}

/* ---- Photo (assets/Photography.md) ---- */
.td-photo{display:block;width:100%;height:auto;border-radius:var(--r-lg)}
.td-photo+.td-caption{margin-top:8px;text-align:center}

/* ---- Founders: a small nod to Dylan and Hayden (components/Founders.md) ---- */
.td-founders{display:flex;align-items:center;gap:14px;padding:2px 4px}
.td-founders__photo{display:block;width:104px;height:78px;object-fit:cover;border-radius:var(--r-md);flex:0 0 auto}
.td-founders__t{margin:0;font-size:18px;font-weight:800;color:var(--dark-blue);line-height:1.3;text-wrap:balance}

/* ---- Game icons (components/GameIcons.md): one line icon per game, drawn in the code square ---- */
.td-gicon{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.td-gotd__row .td-gicon{width:28px;height:28px}

/* ---- ListRow: a link row for the hubs and favourites ---- */
.td-rows{display:grid;gap:var(--gap-tight)}
.td-row{display:flex;align-items:center;gap:12px;min-height:60px;background:var(--paper);border:2px solid var(--line);border-radius:var(--r-md);padding:12px 14px;text-decoration:none;color:var(--dark-blue);font-weight:700;font-size:17px;line-height:1.3;transition:border-color .12s ease,background .12s ease}
.td-row:hover{border-color:var(--mid-blue);background:var(--hover-tint)}
.td-row__code{flex:0 0 auto;width:34px;height:34px;border-radius:var(--r-icon);display:grid;place-items:center;color:#fff;font-size:12px;font-weight:800;letter-spacing:.02em}
.td-row__t{flex:1;min-width:0}
.td-row small{display:block;font-size:14px;font-weight:500;color:var(--muted);margin-top:2px}
.td-row__go{flex:0 0 auto;width:24px;height:24px}
.td-vs{background:var(--dark-blue)}
.td-free{background:var(--light-blue);color:var(--dark-blue)!important}

/* ---- GameOfTheDay: the games hub's opening block, a DarkHero built around one game (components/GameOfTheDay.md) ---- */
.td-gotd{padding:22px 20px 24px}
.td-gotd__label{font-size:13px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--yellow);margin:0 0 10px}
.td-gotd__row{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 8px}
.td-gotd__row h2{font-size:clamp(24px,7vw,30px);font-weight:800;line-height:1.1;margin:0;color:#fff;text-wrap:balance}
.td-gotd__row .td-code-sq{width:44px;height:44px;font-size:14px;border-radius:var(--r-md)}
.td-gotd .td-dark__sub{margin:0 0 20px}
.td-gotd .td-btn--hero{box-shadow:0 6px 0 var(--navy-shadow),0 10px 20px rgba(0,0,0,.25)}

/* ---- Carousel: one next step at a time on tool and game end screens (components/Carousel.md) ---- */
.td-carousel{position:relative;border-radius:var(--r-xl);overflow:hidden;box-shadow:var(--shadow-card);background:var(--paper)}
.td-carousel__track{display:flex;transition:transform .5s ease}
.td-carousel .td-carousel__slide{flex:0 0 100%;min-width:0;border-radius:0;padding:26px 20px 24px;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center}
.td-carousel__slide h2,.td-carousel__slide p,.td-carousel__slide .td-btn{align-self:stretch}
.td-carousel__slide h2{font-size:22px;font-weight:800;line-height:1.22;margin:10px 0 8px;text-wrap:balance;color:inherit}
.td-carousel__slide p{font-size:16px;font-weight:500;line-height:1.5;margin:0 0 16px}
.td-carousel__slide.td-light{color:var(--dark-blue)}
.td-carousel__slide.td-dark{color:#fff}
.td-carousel__slide.td-band{color:#fff}
.td-carousel__slide.td-band h2{text-shadow:0 2px 0 rgba(32,55,131,.35)}
.td-carousel__slide.td-band p{font-weight:700;text-shadow:0 1px 0 rgba(32,55,131,.3)}
.td-carousel__slide--purple{background:var(--purple);color:#fff}
.td-carousel__bar{height:3px;background:transparent}
.td-carousel__bar i{display:block;height:100%;width:0;background:var(--dark-blue);opacity:.18}
.td-carousel__nav{display:flex;align-items:center;justify-content:space-between;padding:8px 10px}
.td-carousel__arrow{width:44px;height:44px;border-radius:var(--r-icon);border:0;background:var(--pale-blue);color:var(--dark-blue);cursor:pointer;display:grid;place-items:center;transition:background .12s ease}
.td-carousel__arrow:hover{background:var(--pale-blue-pressed)}
.td-carousel__dots{display:flex;gap:4px}
.td-carousel__dot{width:24px;height:44px;border:0;background:transparent;padding:0;cursor:pointer;display:grid;place-items:center}
.td-carousel__dot::before{content:'';width:10px;height:10px;border-radius:3px;background:var(--line)}
.td-carousel__dot[aria-current="true"]::before{background:var(--dark-blue)}

/* ---- Collapsible: a subject section on a hub that opens and closes (components/Collapsible.md) ---- */
.td-fold{padding:0;overflow:hidden}
.td-fold__sum{display:flex;align-items:center;gap:14px;min-height:76px;padding:16px 20px;cursor:pointer;list-style:none;color:var(--dark-blue)}
.td-fold__sum::-webkit-details-marker{display:none}
.td-fold__code{width:44px;height:44px;font-size:14px}
.td-fold__t{flex:1;min-width:0}
.td-fold__name{display:block;font-size:clamp(17px,5vw,21px);font-weight:800;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.td-fold__n{display:block;font-size:14px;font-weight:700;color:var(--muted);margin-top:2px}
.td-fold__chev{flex:0 0 auto;width:40px;height:40px;border-radius:var(--r-icon);background:var(--pale-blue);color:var(--dark-blue);display:grid;place-items:center}
.td-fold__chev svg{transition:transform .2s ease}
.td-fold[open] .td-fold__chev svg{transform:rotate(180deg)}
.td-fold__body{padding:0 20px 20px}
.td-fold__hint{padding:0 20px 14px;margin:-4px 0 0}
.td-fold--dark,.td-fold--dark .td-fold__sum,.td-fold--dark .td-fold__hint{color:#fff}
.td-fold--dark .td-fold__code,.td-fold--dark .td-fold__chev{background:var(--yellow);color:var(--dark-blue)}
.td-fold--dark .td-fold__n{color:var(--light-blue)}

/* ---- StatRow: two or three figures on a pale blue panel ---- */
.td-stats{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:var(--gap-tight);background:var(--pale-blue);border-radius:var(--r-lg);padding:16px 10px;text-align:center;color:var(--dark-blue)}
.td-stat b{display:block;font-size:28px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.td-stat span{display:block;font-size:14px;font-weight:700;line-height:1.25;margin-top:4px}

/* ---- TimerStrip: timers, scores, lives and streaks ---- */
.td-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--yellow-tint);color:var(--dark-blue);border-radius:var(--r-md);padding:8px 14px;font-weight:800;font-size:19px;line-height:1.2;font-variant-numeric:tabular-nums;min-height:44px}
.td-strip span{white-space:nowrap}
.td-strip small{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-right:4px}
.td-strip--low{background:var(--red);color:#fff}
.td-strip--time::before{content:"Time";font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-right:auto}

/* ---- ExplainerPanel: the "why this matters" note under a start card ---- */
.td-note{background:var(--pale-blue);border-radius:var(--r-lg);padding:8px 20px;color:var(--dark-blue)}
.td-note[open]{padding-bottom:16px}
.td-note summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;font-size:17px;font-weight:800;line-height:1.3}
.td-note summary::-webkit-details-marker{display:none}
.td-note summary::after{content:"";flex:0 0 auto;width:10px;height:10px;margin:0 6px 4px 0;border-right:3px solid var(--dark-blue);border-bottom:3px solid var(--dark-blue);transform:rotate(45deg);transition:transform .12s ease}
.td-note[open] summary::after{transform:rotate(-135deg);margin:4px 6px 0 0}
.td-note p,.td-note ul,.td-note table{font-size:16px;font-weight:500;line-height:1.5;margin:10px 0 0}
.td-note ul{padding-left:20px}
.td-note li+li{margin-top:4px}
.td-note strong{font-weight:800}
.td-note table{border-collapse:collapse;width:100%}
.td-note th,.td-note td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line)}
.td-note th{font-weight:800;font-size:14px}

/* A card whose only content is an empty line (a score callout before anything was played) hides itself. */
.td-card:has(> .td-p:empty:only-child){display:none}

/* ---- Panel: a quiet pale blue block inside a card ---- */
.td-panel{background:var(--pale-blue);border-radius:var(--r-lg);padding:16px 18px;color:var(--dark-blue)}
.td-panel>*+*{margin-top:10px}

/* ---- MailingCard: the free mailing list as a dark block ---- */
.td-mail h3{font-size:22px;font-weight:800;line-height:1.2;margin:12px 0 6px;color:#fff}
.td-mail p{font-size:16px;font-weight:500;margin:0 0 14px;color:#fff}
.td-mail .td-label{color:#fff;text-align:left;margin-top:0}
.td-mail .td-input{margin-bottom:10px}
.td-mail [role="status"]{min-height:20px;font-size:15px;font-weight:700;margin:10px 0 0;color:#fff}
.td-mail [role="status"].ok{color:var(--light-blue)}
.td-mail [role="status"].err{color:var(--yellow)}
.td-mail__fine{font-size:13px;font-weight:500;line-height:1.5;margin:12px 0 0;color:rgba(255,255,255,.85)}
.td-mail__fine a{color:#fff}

/* ---- Fields: the assessment's hidden native controls behind option tiles ---- */
.td-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.td-opts--row{grid-template-columns:1fr 1fr}
.td-opts--3{grid-template-columns:repeat(3,1fr)}
.td-opts--row .td-opt,.td-opts--3 .td-opt{text-align:center}
.td-opt[disabled]{cursor:default}
.td-opt__word{display:block;font-size:14px;font-weight:800;margin-top:4px}
.td-opt--wrong .td-opt__word{color:var(--red)}
.td-gap{display:inline-block;width:3.4em;height:.9em;margin:0 .15em;vertical-align:baseline;border-bottom:3px solid var(--dark-blue)}
.td-err[hidden]{display:none}
.td-field+.td-field{margin-top:4px}

/* ---- Keypad: typed number answers ---- */
.td-bigq{font-size:clamp(36px,11vw,56px);font-weight:800;line-height:1.1;text-align:center;color:var(--dark-blue);font-variant-numeric:tabular-nums;letter-spacing:-.01em;margin:0}
.td-bigq .td-blank{display:inline-block;min-width:.8em;border:3px dashed var(--mid-blue);border-radius:var(--r-sm);line-height:1;padding:0 .1em}
.td-display{min-height:58px;border:2px solid var(--line);border-radius:var(--r-md);background:var(--paper);color:var(--dark-blue);font-size:32px;font-weight:800;text-align:center;line-height:54px;font-variant-numeric:tabular-nums;letter-spacing:.04em}
.td-display .td-ph,.td-display.empty{color:var(--placeholder)}
.td-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap-tight)}
.td-key{min-height:56px;font-family:inherit;font-size:24px;font-weight:700;color:var(--dark-blue);background:var(--paper);border:2px solid var(--line);border-radius:var(--r-md);cursor:pointer;transition:border-color .12s ease,background .12s ease}
.td-key:hover{border-color:var(--mid-blue);background:var(--hover-tint)}
.td-key:active{background:var(--pale-blue)}
.td-key--del{background:var(--pale-blue);border-color:var(--pale-blue);font-size:20px}
.td-key--enter{background:var(--dark-blue);border-color:var(--dark-blue);color:#fff;font-size:18px}
.td-key--enter:hover{background:var(--dark-blue);border-color:var(--dark-blue);filter:brightness(1.12)}
.td-key--wide{grid-column:1/-1}
.td-feedback{min-height:26px;text-align:center;font-weight:800;font-size:17px;margin-top:8px;color:var(--dark-blue)}
.td-feedback--wrong{color:var(--red)}
.td-dim{opacity:.35;pointer-events:none}

/* ---- GameBoard: full bleed play on a dark blue ground ---- */
body.playing{background:var(--dark-blue);color:#fff}
body.playing .td-nav,body.playing .td-hero,body.playing .td-footer{display:none}
body.playing .td-main{max-width:none;padding:12px 14px 14px;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;position:relative;z-index:1}
body.playing::before{content:'';position:fixed;left:-60px;bottom:-60px;width:160px;height:160px;background:var(--mid-blue);opacity:.35;transform:rotate(25deg);border-radius:24px;z-index:0}
body.playing::after{content:'';position:fixed;right:24px;top:20px;border-left:28px solid transparent;border-right:28px solid transparent;border-bottom:50px solid var(--mid-blue);opacity:.6;transform:rotate(18deg);z-index:0}
.td-board{flex:1;display:flex;flex-direction:column;min-height:0;gap:10px}
.td-hud{display:flex;align-items:center;gap:8px;flex-shrink:0}
.td-hud .td-strip{flex:1;min-width:0;padding-inline:10px;gap:8px;font-size:clamp(14px,4.2vw,19px);overflow:hidden}
.td-hud .td-strip small{margin-right:3px}
.td-quit{flex:0 0 auto;min-height:44px;padding:0 16px;display:inline-grid;place-items:center;border-radius:var(--r-md);background:transparent;color:#fff;font-family:inherit;font-size:15px;font-weight:800;text-decoration:none;box-shadow:inset 0 0 0 2px rgba(255,255,255,.6);cursor:pointer;border:0;white-space:nowrap}
.td-quit:hover{background:rgba(255,255,255,.12)}
.td-prompt{background:var(--yellow);color:var(--dark-blue);border-radius:var(--r-md);padding:6px 16px;font-weight:800;font-size:clamp(34px,9vw,72px);line-height:1.15;text-align:center;font-variant-numeric:tabular-nums;flex-shrink:0}
.td-prompt--sm{font-size:clamp(22px,6vw,40px)}
.td-sentence{color:#fff;font-size:clamp(22px,6vw,40px);font-weight:800;line-height:1.3;text-align:center;text-wrap:balance;flex-shrink:0;margin:0}
.td-sentence mark{background:var(--yellow);color:var(--dark-blue);border-radius:var(--r-sm);padding:0 .2em}
.td-pads{display:grid;gap:var(--gap-tight)}
.td-pads--2{grid-template-columns:1fr 1fr}
.td-pads--3{grid-template-columns:repeat(3,1fr)}
.td-pads--4{grid-template-columns:repeat(4,1fr)}
.td-pad--sm{font-size:clamp(16px,4.2vw,34px)}
.td-pad.selected{background:var(--pale-blue);border-color:var(--mid-blue)}
.td-pad.used{visibility:hidden}
.td-ghost{min-height:44px;padding:0 16px;display:inline-grid;place-items:center;border-radius:var(--r-md);background:transparent;color:#fff;font-family:inherit;font-size:15px;font-weight:800;text-decoration:none;box-shadow:inset 0 0 0 2px rgba(255,255,255,.6);cursor:pointer;border:0;white-space:nowrap}
.td-ghost:hover{background:rgba(255,255,255,.12)}
.td-ghost[disabled]{opacity:.5;cursor:default}
.td-side .td-flash--wrong{color:var(--red)}
.td-slots.wrong .td-slot.filled{background:var(--yellow-tint);border-color:var(--red);color:var(--dark-blue)}
.td-slots.solved .td-slot.filled{background:var(--pale-blue);border-color:var(--mid-blue);color:var(--dark-blue)}
.td-cardb.matched.p0{background:var(--pale-blue);border-color:var(--dark-blue);color:var(--dark-blue)}
.td-cardb.matched.p1{background:var(--yellow-tint);border-color:var(--yellow);color:var(--dark-blue)}
.td-turn.p0{background:var(--pale-blue)}
.td-turn.p1{background:var(--yellow)}
.td-progress i.low{background:var(--red)}
.td-display.shake,.td-pad.shake{animation:td-shake .3s}
.pop{animation:td-pop .18s ease-out}
@keyframes td-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
@keyframes td-pop{from{transform:scale(.82)}to{transform:scale(1)}}
.td-pad{font-family:inherit;background:var(--paper);color:var(--dark-blue);border:2px solid var(--paper);border-radius:var(--r-md);font-weight:800;font-size:clamp(24px,6vw,48px);line-height:1.1;padding:10px 6px;cursor:pointer;font-variant-numeric:tabular-nums;transition:transform .1s ease,background .12s ease,border-color .12s ease}
.td-pad:hover{background:var(--hover-tint);border-color:var(--light-blue)}
.td-pad:active{transform:translateY(2px)}
.td-pad--right{background:var(--pale-blue);border-color:var(--mid-blue)}
.td-pad--wrong{background:var(--yellow-tint);border-color:var(--red)}
.td-pad[disabled]{opacity:.5;cursor:default}
.td-pad--text{font-size:15px;line-height:1.25;padding:12px 6px}
.td-pad--letter{font-size:24px;padding:0;min-width:40px;min-height:50px}
.td-lane{min-height:110px;font-size:clamp(15px,4.3vw,26px);text-transform:uppercase;letter-spacing:.02em}
.td-lane small{display:block;font-size:13px;font-weight:700;text-transform:none;letter-spacing:0;margin-top:2px}
.td-flash{min-height:1.4em;text-align:center;font-weight:800;font-size:19px;color:var(--yellow);margin:0;flex-shrink:0}
.td-flash--wrong{color:#fff}
.td-slots{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.td-slot{width:40px;height:48px;border:2px dashed rgba(255,255,255,.6);border-radius:var(--r-sm);display:grid;place-items:center;font-size:24px;font-weight:800;color:#fff;background:transparent;font-family:inherit;padding:0;text-transform:uppercase}
.td-slot.filled{background:#fff;color:var(--dark-blue);border:2px solid #fff}
.td-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.td-cardb{font-family:inherit;aspect-ratio:3/4;background:var(--mid-blue);border:2px solid var(--light-blue);border-radius:var(--r-md);color:#fff;font-size:28px;font-weight:800;display:grid;place-items:center;cursor:pointer;padding:4px;line-height:1.15;text-align:center;overflow-wrap:anywhere}
.td-cardb.revealed{background:#fff;color:var(--dark-blue);border-color:#fff;font-size:15px}
.td-cardb.matched{background:var(--pale-blue);border-color:var(--mid-blue);color:var(--dark-blue);font-size:15px;cursor:default}
.td-sky{background:var(--pale-blue);border-radius:var(--r-lg);position:relative;overflow:hidden;min-height:150px;flex:1}
.td-board .td-input{border-color:var(--paper)}
.td-board .td-key--enter{background:var(--yellow);border-color:var(--yellow);color:var(--dark-blue)}
.td-board .td-key--enter:hover{background:var(--yellow);border-color:var(--yellow)}
.td-board .td-panel{color:var(--dark-blue)}

/* Versus boards: Blue team (dark blue) against Yellow team */
.td-vsbar{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;flex-shrink:0}
.td-score{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px;padding:4px 12px;border-radius:var(--r-md);font-weight:800;font-size:16px;line-height:1.2;min-width:0}
.td-score--blue{background:#fff;color:var(--dark-blue);box-shadow:inset 0 0 0 3px var(--dark-blue)}
.td-score--yellow{background:var(--yellow);color:var(--dark-blue);flex-direction:row-reverse}
.td-score b{font-size:24px;font-variant-numeric:tabular-nums}
.td-score .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.td-vsbar .td-strip{padding-inline:12px;font-size:16px}
.td-sides{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex:1;min-height:0}
.td-side{border-radius:var(--r-lg);padding:12px 10px;display:flex;flex-direction:column;gap:10px;min-width:0;color:var(--dark-blue)}
.td-side--blue{background:var(--pale-blue)}
.td-side--yellow{background:var(--yellow-tint)}
.td-side__name{align-self:center;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;padding:6px 12px;border-radius:var(--r-sm)}
.td-side--blue .td-side__name{background:var(--dark-blue);color:#fff}
.td-side--yellow .td-side__name{background:var(--yellow);color:var(--dark-blue)}
.td-side .td-bigq{font-size:clamp(26px,7vw,48px)}
.td-side .td-pads{grid-template-columns:1fr 1fr}
.td-side .td-pad{font-size:clamp(20px,4.5vw,40px);border-color:var(--line)}
.td-side .td-lane{font-size:clamp(13px,3.6vw,22px);min-height:70px}
.td-side .td-flash{color:var(--dark-blue);font-size:16px}
.td-side.locked{opacity:.55}
.td-pitch{background:var(--pale-blue);border-radius:var(--r-lg);height:64px;position:relative;overflow:hidden;flex-shrink:0}
.td-pitch__goal{position:absolute;top:14px;width:12px;height:36px;background:var(--dark-blue);border-radius:3px}
.td-pitch__goal--l{left:8px}.td-pitch__goal--r{right:8px}
.td-pitch__mid{position:absolute;left:50%;top:0;bottom:0;border-left:2px dashed var(--mid-blue)}
.td-pitch__ball{position:absolute;top:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border-radius:50%;background:#fff;border:4px solid var(--dark-blue);transition:left .3s ease}

/* ---- Question screens: subject tag, counter row, selected tiles (label and radio pattern) ---- */
.td-qhead{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.td-qhead .td-qnum{margin:0}
.td-subjtag{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--dark-blue)}
.td-subjhead{display:flex;align-items:center;gap:10px}
.td-code-sq{flex:0 0 auto;width:34px;height:34px;border-radius:var(--r-icon);display:grid;place-items:center;color:#fff;font-size:12px;font-weight:800;letter-spacing:.02em;text-transform:none}
/* The Maths code "+−" reads better with a little air between the two signs. */
.td-code-sq.td-ma,.td-subj__t span.td-ma,.td-row__code.td-ma{letter-spacing:.18em;text-indent:.18em}
/* VR and NVR code squares carry a symbol (components/CodeBox.md) */
.td-sym{display:block;width:24px;height:24px}
.td-fold__code .td-sym,.td-gotd__row .td-sym{width:30px;height:30px}
.td-flow>.td-btn--hero+:not(:first-child){margin-top:22px}
.td-opt.is-selected,.td-opt.selected{border-color:var(--mid-blue);background:var(--pale-blue)}
button.td-row{width:100%;text-align:left;font-family:inherit;cursor:pointer}
.td-opt.is-focused{outline:3px solid var(--dark-blue);outline-offset:2px}
.td-opt input[type="radio"]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.td-opt{position:relative}
.td-opts--letters{display:flex;flex-wrap:wrap;justify-content:center}
.td-opts--letters .td-opt{flex:0 0 88px;width:88px;text-align:center}
.td-back{display:flex;align-items:center;justify-content:center;width:max-content;max-width:100%;min-height:44px}
.td-back[disabled]{opacity:.45;cursor:not-allowed}
.td-back--left{margin:0}
.td-dark__alt{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 8px}
.td-meter__r span{min-width:0}
.td-meter__r small{display:block;font-weight:700;font-size:12px;color:var(--muted);margin-top:2px}
/* The report's meter: bigger labels and bars, and the overall line with room around it */
.td-meter--lg{padding:20px 18px;gap:16px}
.td-meter--lg .td-meter__r{grid-template-columns:128px 1fr;gap:12px;font-size:16px;line-height:1.25}
.td-meter--lg .td-meter__r i,.td-meter--lg .td-meter__r b{height:18px;border-radius:9px}
.td-overall{font-size:19px;font-weight:800;color:var(--dark-blue);margin:18px 0 4px;line-height:1.3}
/* Right answers are green (tokens: green, green-tint); wrong stays red */
.td-opt--right,.td-pad--right{border-color:var(--green);background:var(--green-tint)}
.td-feedback{color:var(--green)}
.td-slots.solved .td-slot.filled{background:var(--green-tint);border-color:var(--green)}
/* The report's tappable offer strip: a label and the offer on the left, a dark blue arrow square on the right */
.td-nudge--link{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;border:0;cursor:pointer;font-family:inherit;padding:10px 10px 10px 16px;min-height:60px;line-height:1.25}
.td-nudge--link small{display:block;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:3px}
.td-nudge--link strong{font-size:16px;font-weight:800}
.td-nudge__go{flex:0 0 auto;width:40px;height:40px;border-radius:var(--r-icon);background:var(--dark-blue);color:var(--yellow);display:grid;place-items:center}
.td-nudge--link:hover .td-nudge__go{filter:brightness(1.15)}
[hidden],.hidden{display:none!important}
.td-brow{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line);font-size:15px;font-weight:500;color:var(--dark-blue)}
.td-brow:last-child{border-bottom:0}
.td-brow .score{font-weight:800;font-variant-numeric:tabular-nums}
button.td-dark__alt{background:none;border:0;font-family:inherit;cursor:pointer;text-decoration:underline;padding:4px 8px;min-height:44px}
.td-dark .td-btn+.td-btn{margin-top:10px}

/* ---- Pattern (README, Shape and devices): every block in a shade of blue carries the tile; small tiles stay plain ---- */
.td-note,.td-panel,.td-step{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='520' viewBox='0 0 640 520'%3E%3Cg fill='%23CDEBF8'%3E%3Cpath d='M54 62 L108 78 L70 122 Z'/%3E%3Crect x='468' y='34' width='40' height='40' rx='10' transform='rotate(21 488 54)'/%3E%3Crect x='118' y='338' width='26' height='26' rx='7' transform='rotate(-13 131 351)'/%3E%3Cpath d='M548 292 L596 312 L556 352 Z'/%3E%3Cpath d='M372 236 L402 246 L380 274 Z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23CDEBF8' stroke-width='6' stroke-linecap='round'%3E%3Cpath d='M236 118 q11 -12 22 0 t22 0 t22 0'/%3E%3Cpath d='M318 434 q10 -11 20 0 t20 0'/%3E%3C/g%3E%3C/svg%3E");background-size:640px 520px;background-repeat:repeat;background-position:center}
.td-fold--dark{background:var(--dark-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='520' viewBox='0 0 640 520'%3E%3Cg fill='%234BA4E0' fill-opacity='0.4'%3E%3Cpath d='M54 62 L108 78 L70 122 Z'/%3E%3Crect x='468' y='34' width='40' height='40' rx='10' transform='rotate(21 488 54)'/%3E%3Crect x='118' y='338' width='26' height='26' rx='7' transform='rotate(-13 131 351)'/%3E%3Cpath d='M548 292 L596 312 L556 352 Z'/%3E%3Cpath d='M372 236 L402 246 L380 274 Z'/%3E%3C/g%3E%3Cg fill='none' stroke='%234BA4E0' stroke-opacity='0.4' stroke-width='6' stroke-linecap='round'%3E%3Cpath d='M236 118 q11 -12 22 0 t22 0 t22 0'/%3E%3Cpath d='M318 434 q10 -11 20 0 t20 0'/%3E%3C/g%3E%3C/svg%3E") center/640px 520px repeat}

/* ---- Motion that marks moments (README, Motion): tiles settle in, meter bars fill, score numbers count up (script), the photo wiggles and bursts ---- */
@keyframes td-settle{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.td-opts>.td-opt,.td-pads>.td-pad{animation:td-settle .32s ease backwards}
.td-opts>.td-opt:nth-child(2),.td-pads>.td-pad:nth-child(2){animation-delay:.04s}
.td-opts>.td-opt:nth-child(3),.td-pads>.td-pad:nth-child(3){animation-delay:.08s}
.td-opts>.td-opt:nth-child(4),.td-pads>.td-pad:nth-child(4){animation-delay:.12s}
.td-opts>.td-opt:nth-child(5),.td-pads>.td-pad:nth-child(5){animation-delay:.16s}
.td-opts>.td-opt:nth-child(n+6),.td-pads>.td-pad:nth-child(n+6){animation-delay:.2s}
.td-pads--live>.td-pad{animation:none}
.td-meter__r b{transition:width .9s ease}
@keyframes td-wiggle{0%,100%{transform:rotate(0)}20%{transform:rotate(-3deg)}40%{transform:rotate(3deg)}60%{transform:rotate(-2deg)}80%{transform:rotate(2deg)}}
.td-wiggle{animation:td-wiggle .5s ease}
.td-photo{cursor:pointer}
.td-confetti{position:fixed;width:10px;height:14px;border-radius:2px;pointer-events:none;z-index:999;animation:td-burst .9s ease-out forwards}
@keyframes td-burst{0%{transform:translate(-50%,-50%) rotate(0);opacity:1}100%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy) + 120px)) rotate(var(--rot));opacity:0}}

/* ---- Motion: every animation and transition stops under reduced motion ---- */
@media (prefers-reduced-motion:reduce){
  .td-page *,.td-page *::before,.td-page *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
