/* Model Citizens Passport: the buyer's home for every product, and each product's interactive app.
   Phone-first app layout. Each product sets its accent colours (--accent, --accent-2) on :root. */
:root {
  --bg: #F6F4EE; --card: #FFFFFF; --ink: #1D2230; --muted: #5E6576; --line: #E3E0D6; --soft: #EEEADF;
  --accent: #4E5B31; --accent-2: #C9B79C; --on-accent: #FFFFFF; --coral: #FF5A3C; --pop: #D23C1D; --pop-ink: #C73A22; --on-pop: #FFFFFF; --cover: #0B2C6B; --cover-2: #133B85; --on-cover: #F3F6FF; --gold: #E9C77B; --good: #2E7D46; --warn: #8A5A00;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif; --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 18px; --tab-h: 64px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #14161B; --card: #1E2129; --ink: #ECEDF0; --muted: #A4A9B6; --line: #2F333D; --soft: #262A33; --on-accent: #12140F; --pop: #FF6A4D; --pop-ink: #FF8E75; --on-pop: #1A0D09; color-scheme: dark } }
:root[data-theme="dark"] { --bg: #14161B; --card: #1E2129; --ink: #ECEDF0; --muted: #A4A9B6; --line: #2F333D; --soft: #262A33; --on-accent: #12140F; --pop: #FF6A4D; --pop-ink: #FF8E75; --on-pop: #1A0D09; color-scheme: dark }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
a.btn { text-decoration: none; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-stretch: 72%; font-weight: 850; text-transform: uppercase; line-height: .95; margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom, 0px)); }
.app.no-tabs { padding-bottom: 32px; }

/* top */
.top { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 12px; }
.top img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.top .t { display: grid; line-height: 1.2; min-width: 0; }
.top .t strong { font-family: var(--display); font-stretch: 72%; font-weight: 850; text-transform: uppercase; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .t span { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.top .chev { margin-left: auto; color: var(--coral); font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.preview-flag { background: var(--coral); color: #fff; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; text-align: center; padding: 4px 8px; border-radius: 0 0 10px 10px; margin: 0 auto; width: fit-content; }

/* cards */
.stack { display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.card.hero { background: var(--accent); color: var(--on-accent); border: 0; }
.card.hero .eyebrow { color: inherit; opacity: .85; }
.eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--pop-ink); }
.voice { font-size: 1.02rem; line-height: 1.6; }
.voice::before { content: "\201C"; }
.voice::after { content: "\201D"; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: 0 1.3em; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 1rem; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary.big { background: var(--pop); color: var(--on-pop); border-color: var(--pop); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--pop) 70%, transparent); }
.btn.primary.big:disabled { background: var(--soft); color: var(--muted); border-color: var(--line); box-shadow: none; }
.btn.big { min-height: 60px; font-size: 1.1rem; font-family: var(--display); font-stretch: 80%; font-weight: 850; text-transform: uppercase; letter-spacing: .02em; width: 100%; }
.btn.ghost { background: transparent; }
.btn.link { border: 0; background: none; min-height: 44px; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: .45; cursor: default; }

/* today */
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.daybar { height: 8px; background: color-mix(in srgb, var(--on-accent) 25%, transparent); border-radius: 4px; overflow: hidden; }
.daybar i { display: block; height: 100%; background: var(--coral); border-radius: 4px; transition: width .6s ease; }
.target { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.target div { background: var(--soft); border-radius: 12px; padding: 10px; text-align: center; display: grid; }
.target strong { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 2rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.target span { font-size: .78rem; color: var(--muted); }
.focus { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.focus b { color: var(--pop-ink); white-space: nowrap; }
.toggle { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: .95rem; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.rulecard { border: 2px solid var(--accent); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.rulecard strong { font-family: var(--display); font-stretch: 78%; font-weight: 850; text-transform: uppercase; color: var(--accent); }
.tip { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; background: var(--soft); border-radius: 14px; padding: 14px; }
.tip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-2); }
.tip div { display: grid; gap: 3px; min-width: 0; }
.tip strong { font-family: var(--display); font-stretch: 78%; font-weight: 850; text-transform: uppercase; font-size: 1.05rem; line-height: 1.05; color: var(--pop-ink); }
.tip span { font-size: .93rem; line-height: 1.45; }
.tip.has-say { grid-template-columns: 40px 1fr 44px; }
.tip.compact.has-say { grid-template-columns: 32px 1fr 40px; }
.say { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--pop); color: var(--on-pop); display: grid; place-items: center; align-self: center; cursor: pointer; }
.say svg { width: 18px; height: 18px; }
.tip.compact .say { width: 40px; height: 40px; }
.say.playing { background: var(--accent); color: var(--on-accent); animation: say-pulse 1.4s ease-in-out infinite; }
@keyframes say-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); } }
.bar .eyebrow { white-space: nowrap; }
.voice-toggle { margin-left: auto; white-space: nowrap; gap: 6px; padding: 0 12px; font-size: .85rem; }
.voice-toggle svg { width: 20px; height: 20px; }
.voice-toggle[aria-pressed="true"] { color: var(--pop-ink); border-color: var(--pop); }
.tip.compact { grid-template-columns: 32px 1fr; padding: 10px 12px; gap: 10px; }
.tip.compact img { width: 32px; height: 32px; }
.tip.compact span { font-size: .86rem; }

/* bottom tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--tab-h); }
.tabs button { border: 0; background: none; display: grid; place-items: center; align-content: center; gap: 2px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--pop-ink); }

/* progress */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 2px; }
.tile strong { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: .8rem; color: var(--muted); }
.tile.up strong { color: var(--good); }
.chart svg { width: 100%; height: auto; display: block; }
.grid30 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.grid30 button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; position: relative; }
.grid30 button.done { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.grid30 button.test { box-shadow: inset 0 0 0 2px var(--coral); }
.grid30 button.now { border: 2px dashed var(--pop); color: var(--pop-ink); font-weight: 800; }
.grid30 button.done::after { content: ""; position: absolute; right: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--on-accent); opacity: .8; }

/* guide */
.list { display: grid; }
.list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font-weight: 700; text-align: left; }
.list button:last-child { border-bottom: 0; }
.list button span:last-child { color: var(--muted); }
.page-body { display: grid; gap: 10px; font-size: 1rem; }
.page-body ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 6px 12px; border-radius: 12px; background: var(--soft); }
.check input { width: 24px; height: 24px; accent-color: var(--accent); flex: 0 0 auto; }
.check.ticked span { text-decoration: line-through; color: var(--muted); }

/* overlay (session, pages, onboarding) */
.overlay { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; }
.overlay .app { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 0 8px; }
.bar .btn { min-height: 44px; }
.steps-dots { display: flex; gap: 6px; }
.steps-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.steps-dots i.on { background: var(--pop); }

/* timer */
.timer { display: grid; place-items: center; padding: 8px 0; }
.ring { position: relative; width: min(78vw, 300px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--soft); stroke-width: 14; }
.ring .fill { fill: none; stroke: var(--pop); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.ring.rest .fill { stroke: var(--accent-2); }
.ring.hit .fill { stroke: var(--good); }
.ring .read { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.ring .read strong { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: clamp(4rem, 22vw, 6rem); line-height: .9; font-variant-numeric: tabular-nums; }
.ring .read span { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.setdots { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.setdots i { min-width: 34px; height: 34px; border-radius: 17px; border: 1.5px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 6px; }
.setdots i.done { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.setdots i.now { border: 2px solid var(--pop); color: var(--pop-ink); }
.cue { text-align: center; font-weight: 700; min-height: 1.6em; }

/* forms */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .95rem; }
.field input[type=text], .field textarea { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; }
.slider { display: grid; gap: 6px; }
.slider input { width: 100%; accent-color: var(--accent); height: 32px; }
.slider .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.slider output { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 1.6rem; color: var(--accent); }
.err { color: #B3261E; font-weight: 700; font-size: .92rem; }

/* report */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.vs div { background: var(--soft); border-radius: 14px; padding: 14px 8px; display: grid; }
.vs strong { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.vs .arrow { font-family: var(--display); font-weight: 900; color: var(--coral); font-size: 1.6rem; transform: scaleX(-1); }
.next { border: 2px solid var(--coral); }

/* celebration */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.donemark { width: 88px; height: 88px; border-radius: 50%; background: var(--pop); color: var(--on-pop); display: grid; place-items: center; margin: 0 auto; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.donemark svg { width: 46px; height: 46px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fade-in { animation: fadein .35s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Passport: back link, cover and stamps ---------- */
.pp-back { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.pp-back span { color: var(--coral); font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: 0; }
.stack > .pp-back { margin-left: 0; justify-self: start; }
.pp-home { padding-top: 12px; }
/* the way back to the main site, at the top of every screen */
.site-bar { display: flex; padding-top: env(safe-area-inset-top, 0px); }
.site-bar a { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.site-bar a span { color: var(--coral); font-family: var(--display); font-weight: 900; font-size: .95rem; letter-spacing: 0; }
.site-bar a:hover { color: var(--ink); }
.site-bar + .top { padding-top: 14px; }
.site-bar + .pp-cover { margin-top: 14px; }
.pp-cover { position: relative; overflow: hidden; margin-top: calc(8px + env(safe-area-inset-top, 0px)); border-radius: 22px; padding: 22px 20px 16px; color: var(--on-cover);
  background: radial-gradient(120% 90% at 100% 0%, var(--cover-2), transparent 60%), var(--cover); display: grid; gap: 10px; box-shadow: 0 18px 40px -24px rgba(11, 44, 107, .8); }
.pp-cover::after { content: "MC"; position: absolute; right: -18px; bottom: 34px; font-family: var(--display); font-weight: 900; font-size: 9rem; line-height: 1; color: var(--coral); opacity: .14; letter-spacing: -.08em; pointer-events: none; }
.pp-brand { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.pp-brand { justify-content: flex-start; gap: 10px; font-family: Gloock, Georgia, serif; font-size: 1.25rem; letter-spacing: 0; text-transform: none; color: var(--on-cover); }
.pp-brand .logo-mark { width: 36px; height: 36px; flex: none; color: var(--gold); }
.pp-cover h1 { font-size: clamp(3.2rem, 17vw, 4.6rem); letter-spacing: .01em; color: var(--on-cover); }
.pp-cover p { margin: 0; opacity: .85; }
.pp-holder { display: grid; gap: 2px; margin-top: 6px; position: relative; z-index: 1; }
.pp-holder label { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pp-holder input { border: 0; border-bottom: 1px dashed color-mix(in srgb, var(--on-cover) 45%, transparent); background: transparent; color: var(--on-cover); font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 1.3rem; text-transform: uppercase; padding: 4px 0; border-radius: 0; }
.pp-holder input::placeholder { color: color-mix(in srgb, var(--on-cover) 55%, transparent); }
.pp-holder input:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }
.pp-mrz { font-family: var(--mono); font-size: .6rem; line-height: 1.5; letter-spacing: .12em; color: color-mix(in srgb, var(--on-cover) 60%, transparent); white-space: nowrap; overflow: hidden; margin-top: 6px; }
.stamp-card { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: inherit; text-decoration: none; transition: transform .15s ease; }
.stamp-card:active { transform: scale(.985); }
.stamp-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--stamp); }
.sc-t { display: grid; gap: 4px; min-width: 0; }
.sc-t strong { font-family: var(--display); font-stretch: 78%; font-weight: 850; text-transform: uppercase; font-size: 1.15rem; line-height: 1.05; }
.sc-t span { font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sc-t em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--pop-ink); }
.sc-bar { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.sc-bar i { display: block; height: 100%; background: var(--coral); border-radius: 3px; }
.stamp { width: 80px; height: 80px; border-radius: 50%; border: 2px solid var(--coral); outline: 1px dashed var(--coral); outline-offset: -7px; color: var(--pop-ink); display: grid; place-content: center; text-align: center; transform: rotate(var(--tilt, -8deg)); font-family: var(--mono); line-height: 1.15; opacity: .9; }
.stamp b { font-size: .55rem; letter-spacing: .14em; text-transform: uppercase; }
.stamp span { font-size: .56rem; letter-spacing: .02em; font-weight: 600; }
.stamp i { font-style: normal; font-family: var(--display); font-weight: 900; font-size: .8rem; }
.stamp-slot { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; color: inherit; text-decoration: none; }
.ss-t { display: grid; gap: 4px; justify-items: start; }
.ss-t strong { font-family: var(--display); font-stretch: 78%; font-weight: 850; text-transform: uppercase; font-size: 1.15rem; line-height: 1.05; }
.ss-t > span { font-size: .85rem; color: var(--muted); }
.ss-t .btn { margin-top: 8px; min-height: 44px; border-color: var(--pop); color: var(--pop-ink); background: transparent; font-size: .9rem; }
.stamp-slot:hover .btn, .stamp-slot:focus-visible .btn { background: var(--pop); color: var(--on-pop); }
.stamp.empty { border-color: var(--line); outline-color: var(--line); color: var(--line); transform: rotate(-6deg); }
.stamp.empty i { font-size: 1.4rem; }
@media (max-width: 360px) { .stamp { width: 60px; height: 60px; } .stamp-card { grid-template-columns: 48px 1fr auto; } .stamp-card img { width: 48px; height: 48px; } }

/* ---------- building blocks ---------- */
.blocks { display: grid; gap: 14px; }
.b-text p { margin: 0 0 .7em; } .b-text p:last-child { margin: 0; } .b-text ul, .b-text ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 4px; }
.b-label { margin: 0; font-weight: 700; }
.b-steps { margin: 0; padding-left: 1.4rem; display: grid; gap: 8px; } .b-steps li::marker { color: var(--pop-ink); font-weight: 800; }
.b-number .row { gap: 8px; } .b-number input { width: 9rem; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.b-number .unit { color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .9rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.b-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.b-list, .b-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.b-list th, .b-table th { text-align: left; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.b-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.b-list td { padding: 4px 3px; } .b-list input { width: 100%; min-width: 7rem; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 8px; font-size: 16px; }
.vs-table td.up { color: var(--good); font-weight: 800; } .vs-table td.down { color: var(--muted); }
.b-template { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--soft); display: grid; gap: 8px; }
.b-template .btn { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.b-template pre { margin: 0; white-space: pre-wrap; font-family: var(--body); font-size: .92rem; line-height: 1.5; }
.b-say { display: grid; gap: 10px; } .b-say > div { border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--good) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line)); }
.b-say > div.skip { background: color-mix(in srgb, var(--coral) 8%, var(--card)); border-color: color-mix(in srgb, var(--coral) 30%, var(--line)); }
.b-say b { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; } .b-say ul { margin: 6px 0 0; padding-left: 1.1rem; display: grid; gap: 4px; }
.b-timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.b-timer > div:first-child { display: grid; } .b-timer .bt-num { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.b-timer span { font-size: .8rem; color: var(--muted); } .b-timer .btn { min-height: 44px; padding: 0 14px; }
.b-timer.running { border-color: var(--pop); } .b-timer.running .bt-num { color: var(--pop-ink); } .b-timer.finished { border-color: var(--good); }
.b-photo { margin: 0; } .b-photo img { width: 100%; border-radius: 14px; display: block; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.b-photo figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.b-diagram { border: 2px dashed var(--accent-2); border-radius: 14px; padding: 12px 14px; }
.b-diagram ul { margin: 6px 0 0; padding-left: 1.1rem; display: grid; gap: 4px; font-size: .9rem; } .b-diagram li::marker { content: "▲  "; color: var(--coral); font-size: .7em; }
.b-callout { border-radius: 14px; padding: 12px 14px; background: var(--soft); display: grid; gap: 6px; } .b-callout p { margin: 0; } .b-callout summary { font-weight: 700; cursor: pointer; }
/* workbook */
.steplist button { gap: 10px; } .steplist small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.steplist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; }
.steplist .done .tick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); } .steplist .tick svg { width: 14px; height: 14px; }
.steplist .done .grow { color: var(--muted); }
.pbar { display: grid; gap: 4px; padding: 6px 0; }
/* cards */
.cardlist { display: grid; gap: 8px; }
.card-row { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: inherit; cursor: pointer; }
.card-row .grow { display: grid; gap: 2px; min-width: 0; } .card-row strong { font-size: 1rem; } .card-row span { color: var(--muted); font-size: .85rem; }
.card-row em { font-style: normal; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--pop-ink); }
.star { color: var(--coral); font-size: 1.1rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; } .meta span { background: var(--soft); border-radius: 10px; padding: 6px 10px; font-size: .85rem; display: grid; } .meta b { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.star-btn[aria-pressed="true"] { color: var(--pop-ink); border-color: var(--pop); }
.loglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; } .loglist b { font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; margin-right: 6px; color: var(--muted); font-weight: 500; }
input[type=search] { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
/* program */
.exlist { display: grid; gap: 6px; } .exlist div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 6px 0; } .exlist span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.cues { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; }
.sets { display: grid; gap: 8px; }
.setrow { display: grid; grid-template-columns: 52px 1fr 1fr 64px; gap: 8px; align-items: center; }
.setrow .sn { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.setrow input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px; font-size: 16px; }
.setbtn { min-height: 44px; border-radius: 10px; border: 2px solid var(--pop); background: transparent; color: var(--pop-ink); font-weight: 700; display: grid; place-items: center; cursor: pointer; }
.setbtn[aria-pressed="true"] { background: var(--pop); color: var(--on-pop); } .setbtn svg { width: 18px; height: 18px; }
.setrow.done input { opacity: .7; }
.restcard { display: grid; gap: 10px; justify-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.restcard .timer, .restcard .tip { width: 100%; } .restcard .ring { width: min(56vw, 220px); }
.weekgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.weekgrid .wk { display: grid; gap: 4px; justify-items: center; } .weekgrid .wk span { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.weekgrid i { width: 100%; height: 10px; border-radius: 4px; background: var(--soft); border: 1px solid var(--line); } .weekgrid i.done { background: var(--accent); border-color: var(--accent); }
/* challenge with moves */
.movelist { display: grid; gap: 8px; } .mv { display: flex; gap: 12px; align-items: center; }
.mv img { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--soft); } .mv div { display: grid; } .mv span { color: var(--muted); font-size: .85rem; }
.hero-photo img { aspect-ratio: 4 / 3; }
.repcount { display: grid; justify-items: center; padding: 8px 0; } .repcount strong { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 5rem; line-height: 1; color: var(--pop-ink); } .repcount span { color: var(--muted); }

.b-video video { width: 100%; height: auto; max-height: 52vh; display: block; border-radius: 14px; object-fit: cover; background: var(--soft); }

/* ---------- each citizen's world (set by data-pack on the page) ----------
   Wes: the garage. Theo: the trail. Margot: the atelier. Nik: the kitchen. Rory: the sideline.
   Screens and buttons stay the same everywhere; headings, textures, progress, timer marks and tip cards change. */
:root { --ink-wes: #55642B; --ink-theo: #B4561F; --ink-margot: #7A2430; --ink-nik: #A87400; --ink-rory: #1F6FB2; --ink-remy: #5B3A8C; --ink-del: #B5651D; --ink-marcus: #1F3B66; --spice: #9A5A00; --head: var(--display); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink-wes: #B4C287; --ink-theo: #F0A06A; --ink-margot: #E58A95; --ink-nik: #F0C060; --ink-rory: #7DB8EE; --ink-remy: #C3A8EE; --ink-del: #F0B072; --ink-marcus: #8FB0E6; --spice: #F0C060; } }
:root[data-theme="dark"] { --ink-wes: #B4C287; --ink-theo: #F0A06A; --ink-margot: #E58A95; --ink-nik: #F0C060; --ink-rory: #7DB8EE; --ink-remy: #C3A8EE; --ink-del: #F0B072; --ink-marcus: #8FB0E6; --spice: #F0C060; }

/* stamps on the Passport home */
.stamp.pk { width: 84px; height: 84px; border: 0; outline: 0; border-radius: 0; opacity: 1; display: block; }
.stamp.pk svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pk-wes { color: var(--ink-wes); } .pk-theo { color: var(--ink-theo); } .pk-margot { color: var(--ink-margot); } .pk-nik { color: var(--ink-nik); } .pk-rory { color: var(--ink-rory); } .pk-remy { color: var(--ink-remy); } .pk-del { color: var(--ink-del); } .pk-marcus { color: var(--ink-marcus); }
@media (max-width: 360px) { .stamp.pk { width: 64px; height: 64px; } }

/* headings */
:root[data-pack="wes"] { --head: "Big Shoulders Stencil Display", var(--display); }
:root[data-pack="theo"] { --head: "Zilla Slab", Rockwell, Georgia, serif; }
:root[data-pack="margot"] { --head: "Bodoni Moda", Didot, Georgia, serif; }
:root[data-pack="nik"] { --head: "Rozha One", Georgia, serif; }
:root[data-pack="rory"] { --head: "Barlow Condensed", "Arial Narrow", sans-serif; }
:root[data-pack] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-family: var(--head); font-stretch: normal; }
:root[data-pack="wes"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-weight: 900; letter-spacing: .02em; }
:root[data-pack="theo"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-weight: 700; text-transform: none; line-height: 1.05; }
:root[data-pack="margot"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-style: italic; font-weight: 700; text-transform: none; line-height: 1.08; }
:root[data-pack="nik"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-weight: 400; text-transform: none; line-height: 1.1; }
:root[data-pack="rory"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-style: italic; font-weight: 800; letter-spacing: .01em; }

/* header textures on the Today card */
:root[data-pack="wes"] .card.hero { background-image: radial-gradient(color-mix(in srgb, var(--on-accent) 9%, transparent) 1px, transparent 1.5px), radial-gradient(rgba(0, 0, 0, .12) 1px, transparent 1.6px); background-size: 7px 7px, 11px 11px; }
:root[data-pack="theo"] .card.hero { background-image: repeating-radial-gradient(circle at 85% 125%, transparent 0 11px, color-mix(in srgb, var(--on-accent) 13%, transparent) 11px 12px); }
:root[data-pack="margot"] .card.hero { outline: 1.5px dashed color-mix(in srgb, var(--on-accent) 55%, transparent); outline-offset: -8px; }
:root[data-pack="nik"] .card.hero { background-image: radial-gradient(circle, rgba(227, 167, 47, .22) 1.6px, transparent 2.2px), radial-gradient(circle, transparent 7px, color-mix(in srgb, var(--on-accent) 7%, transparent) 7px 8px, transparent 8.2px); background-size: 34px 34px; background-position: 0 0, 17px 17px; }
:root[data-pack="rory"] .card.hero { background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--on-accent) 7%, transparent) 0 24px, transparent 24px 48px); }
/* Margot works on pattern-cutting paper, with stitched dividers */
:root[data-pack="margot"] :is(body, .overlay) { background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.4px); background-size: 14px 14px; }
:root[data-pack="margot"] :is(.list button, .exlist div, .b-table td, .b-table th) { border-bottom-style: dashed; }

/* progress on the Today card */
.trk { display: block; width: 100%; height: auto; }
.trk-plates { display: flex; align-items: center; gap: 3px; height: 34px; }
.trk-plates b { width: 26px; height: 5px; border-radius: 2px; background: color-mix(in srgb, var(--on-accent) 55%, transparent); }
.trk-plates i { width: 9px; border-radius: 2px; background: color-mix(in srgb, var(--on-accent) 22%, transparent); }
.trk-plates i.on { background: var(--on-accent); }
.trk-trail polyline { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: .5 7; }
.trk-trail .t-all { stroke: color-mix(in srgb, var(--on-accent) 35%, transparent); }
.trk-trail .t-done { stroke: var(--accent-2); }
.trk-trail .paw { fill: var(--on-accent); }
.trk-tape .tp { fill: #F2C94C; } .trk-tape .tp-done { fill: #E2A92A; }
.trk-tape .tk line { stroke: #1E2A4A; stroke-width: 1; } .trk-tape .tk text { font: 600 7px var(--mono); fill: #1E2A4A; text-anchor: middle; }
.trk-tape .tp-at { stroke: #7A2430; stroke-width: 2.4; }
.trk-thali circle { fill: color-mix(in srgb, var(--on-accent) 16%, transparent); stroke: color-mix(in srgb, var(--on-accent) 50%, transparent); stroke-width: 1.4; }
.trk-thali .in { fill: none; stroke-width: 1; }
.trk-thali .on circle { fill: #E3A72F; stroke: #FFE6A8; } .trk-thali .on .in { fill: none; stroke: #B87A12; }
.trk-cones .line { stroke: color-mix(in srgb, var(--on-accent) 55%, transparent); stroke-width: 2; }
.trk-cones g { fill: color-mix(in srgb, var(--on-accent) 22%, transparent); } .trk-cones g.on { fill: #F28C28; }

/* timer ring marks */
.ring .deco { fill: var(--muted); stroke: none; }
.ring .deco .dl { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; }
.ring .deco .ln { fill: none; stroke: var(--line); stroke-width: 2; }
:root[data-pack="wes"] .ring .fill { stroke-linecap: butt; }
:root[data-pack="rory"] .ring .deco rect { fill: var(--accent); }

/* tip cards */
:root[data-pack] .tip { position: relative; }
:root[data-pack="wes"] .tip { background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: inset 0 -4px 0 var(--accent-2); }
:root[data-pack="theo"] .tip { background-color: #8A5A34; color: #FBEBD3; border-radius: 8px; background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 10px); }
:root[data-pack="theo"] .tip strong { color: #FFD9A8; }
:root[data-pack="theo"] .tip img { border-color: #FBEBD3; }
:root[data-pack="margot"] .tip { background: var(--card); border: 1px solid var(--accent-2); border-radius: 4px 18px 18px 4px; padding-left: 30px; }
:root[data-pack="margot"] .tip::before { content: ""; position: absolute; left: 10px; top: 18px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent-2); }
:root[data-pack="margot"] .tip strong { color: var(--ink-margot); }
:root[data-pack="nik"] .tip { background: var(--card); border: 2px solid #E3A72F; border-radius: 14px; }
:root[data-pack="nik"] .tip::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(227, 167, 47, .45); border-radius: 10px; pointer-events: none; }
:root[data-pack="nik"] .tip strong { color: var(--spice); }
:root[data-pack="rory"] .tip { background-color: #FFFFFF; color: #18291C; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .14); background-image: linear-gradient(transparent 37px, rgba(230, 88, 74, .55) 37px 38px, transparent 38px), repeating-linear-gradient(transparent 0 19px, #D3E2F1 19px 20px); background-position: 0 0, 0 38px; }
:root[data-pack="rory"] .tip strong { color: #1B5E32; }

/* ---------- visuals: photos first, short screens, drawn diagrams ---------- */
.hero-photo img { aspect-ratio: 4 / 3; animation: photo-in .6s ease both; }
.today-photo img { aspect-ratio: 16 / 9; }
@keyframes photo-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
details.more { border-top: 1px dashed var(--line); padding-top: 4px; }
details.more > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 44px; padding: 10px 0; font-weight: 700; color: var(--accent); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary span::after { content: " +"; }
details.more[open] > summary span::after { content: " −"; }
details.more > summary small { font-weight: 500; color: var(--muted); font-size: .82rem; }
details.more > .blocks { padding-bottom: 6px; animation: fadein .3s ease both; }
.b-cue { border-radius: 16px; padding: 14px 16px; background: var(--accent); color: var(--on-accent); display: grid; gap: 4px; }
.b-cue .eyebrow { color: inherit; opacity: .8; }
.b-cue strong { font-family: var(--head, var(--display)); font-size: 1.45rem; line-height: 1.1; }
.b-cue .small p { margin: 0; }

/* pitch diagrams */
.b-pitch { margin: 0; display: grid; gap: 8px; }
.b-pitch .pitch-svg { width: 100%; height: auto; max-height: 52vh; display: block; border-radius: 14px; }
.pitch-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.pitch-key span { display: inline-flex; align-items: center; gap: 6px; }
.pitch-key i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.pitch-key i.cn { border-radius: 0; width: 0; height: 0; border: 6px solid transparent; border-bottom: 11px solid #F28C28; border-top: 0; box-shadow: none; }

/* right and wrong photo pairs */
.b-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.cmp { margin: 0; border-radius: 14px; overflow: hidden; background: var(--card); border: 2px solid var(--line); animation: fadein .45s ease both; animation-delay: var(--d); }
.cmp img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.cmp figcaption { padding: 8px 10px 10px; display: grid; gap: 2px; font-size: .85rem; }
.cmp b { display: inline-flex; align-items: center; gap: 6px; }
.cmp b svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: #fff; }
.cmp.good { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); } .cmp.good b svg { background: var(--good); }
.cmp.bad { border-color: color-mix(in srgb, #B3261E 45%, var(--line)); } .cmp.bad b svg { background: #B3261E; }
.cmp span { color: var(--muted); }

/* body condition from above */
.b-bcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.b-bcs figure { margin: 0; display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); animation: fadein .4s ease both; animation-delay: var(--d); }
.b-bcs svg { width: 100%; max-width: 70px; fill: color-mix(in srgb, var(--accent-2) 70%, var(--ink) 10%); stroke: color-mix(in srgb, var(--accent-2) 70%, var(--ink) 10%); }
.b-bcs figcaption { font-size: .72rem; text-align: center; font-weight: 700; line-height: 1.2; }
.b-bcs figure.on { border: 2px solid var(--good); } .b-bcs figure.on figcaption { color: var(--good); }

/* traffic light */
.b-traffic { display: grid; gap: 10px; }
.tl { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.tl .lamp { width: 30px; height: 30px; border-radius: 50%; margin-top: 2px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); animation: lamp 2.4s ease-in-out infinite; animation-delay: var(--d); }
.tl-amber .lamp { background: #F2C94C; } .tl-orange .lamp { background: #F28C28; } .tl-red .lamp { background: #E5484D; }
.tl-red { border-color: color-mix(in srgb, #E5484D 45%, var(--line)); }
.tl strong { display: block; margin-bottom: 2px; } .tl p { margin: 0 0 4px; font-size: .92rem; }
@keyframes lamp { 0%, 100% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 0 0 0 transparent; } 50% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 0 0 7px color-mix(in srgb, currentColor 0%, rgba(242, 140, 40, .25)); } }

/* garment with the tailor's zone */
.b-garment { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.b-garment svg { width: 100%; }
.b-garment .g-out { fill: var(--soft); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.b-garment .g-zone { fill: none; stroke-width: 3; stroke-dasharray: 5 4; animation: zone 1.6s ease-in-out infinite; }
.v-easy .g-zone { stroke: var(--good); fill: color-mix(in srgb, var(--good) 18%, transparent); } .v-maybe .g-zone { stroke: #D9A520; fill: rgba(217, 165, 32, .18); } .v-skip .g-zone { stroke: #E5484D; fill: rgba(229, 72, 77, .16); }
.b-garment figcaption { display: grid; gap: 4px; } .b-garment b { font-size: 1.05rem; } .b-garment span { color: var(--muted); font-size: .9rem; }
.v-easy b { color: var(--good); } .v-skip b { color: #C2393E; } .v-maybe b { color: var(--warn); }
@keyframes zone { 50% { stroke-dashoffset: 9; opacity: .55; } }

/* score bars */
.b-bars { display: grid; gap: 10px; }
.sb { display: grid; grid-template-columns: 5.5rem 1fr 2rem; gap: 10px; align-items: center; font-size: .9rem; }
.sb b { font-family: var(--display); font-stretch: 72%; font-size: 1.4rem; font-variant-numeric: tabular-nums; text-align: right; }
.sb-track { position: relative; height: 14px; border-radius: 7px; background: var(--soft); overflow: hidden; }
.sb-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; }
.sb-was { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.sb-fill { width: 0; background: var(--accent); transition: width 1s cubic-bezier(.2, .8, .2, 1); }

/* seven-day rings */
.checks.rings { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.check.ring-day { position: relative; display: grid; place-items: center; min-height: 0; padding: 0; background: none; aspect-ratio: 1; cursor: pointer; }
.check.ring-day input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check.ring-day svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rd-track { fill: none; stroke: var(--soft); stroke-width: 5; }
.rd-fill { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 101; stroke-dashoffset: 101; transition: stroke-dashoffset .5s ease; }
.check.ring-day.ticked .rd-fill { stroke-dashoffset: 0; }
.check.ring-day span { position: absolute; font-weight: 800; font-variant-numeric: tabular-nums; text-decoration: none !important; color: var(--ink) !important; }
.check.ring-day.ticked span { color: var(--accent) !important; }
.check.ring-day input:focus-visible + svg { outline: 3px solid var(--accent); border-radius: 50%; }

/* colour swatches on choice chips */
.chip.sw { display: inline-flex; align-items: center; gap: 8px; padding-left: 8px; }
.chip.sw i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); flex: none; }
.chip.sw[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--on-accent); }

/* tape measure that unrolls */
.b-tape .trk-tape { max-width: 100%; }
.tape-run .tp-done, .tape-run .tp-at { animation: unroll 2.4s cubic-bezier(.3, .7, .2, 1) both; transform-origin: left; }
@keyframes unroll { from { transform: scaleX(0); } to { transform: none; } }

/* video reel (how to hang) */
.b-reel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 78%); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.b-reel figure { margin: 0; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.b-reel video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--soft); }
.b-reel figcaption { padding: 8px 10px 10px; display: grid; gap: 2px; font-size: .85rem; } .b-reel figcaption span { color: var(--muted); }

/* recipe quick view and cook mode */
.quick { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.quick > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; align-content: center; }
.quick b { font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.quick span { font-size: .78rem; color: var(--muted); }
.quick .q-big { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.quick .q-big b { font-size: 2.6rem; } .quick .q-big span { color: inherit; opacity: .85; }
.cook-dots { display: flex; gap: 6px; } .cook-dots i { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); } .cook-dots i.done { background: var(--accent); } .cook-dots i.now { background: var(--pop); }
.cook-step { font-size: 1.35rem; line-height: 1.45; font-weight: 500; animation: fadein .3s ease both; }
.cook-nav { flex-wrap: nowrap; } .cook-nav .btn { min-height: 56px; }
.weekstrip { display: grid; gap: 8px; }
.ws-day { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 8px; align-items: center; animation: fadein .35s ease both; animation-delay: var(--d); }
.ws-day > b { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.ws-day > em { font-style: normal; font-weight: 800; font-size: .8rem; color: var(--accent); white-space: nowrap; }
.ws-meals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ws-dish { position: relative; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--soft); aspect-ratio: 1; display: block; cursor: pointer; }
.ws-dish img { width: 100%; height: 100%; object-fit: cover; }
.ws-dish span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 3px; font-size: .62rem; line-height: 1.15; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.ws-dish.none { display: grid; place-items: center; cursor: default; } .ws-dish.none span { position: static; background: none; color: var(--muted); padding: 4px; text-align: center; }

/* card thumbnails, part segments, season timeline, program thumbnails */
.cr-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--soft); }
.segs { display: flex; gap: 6px; } .segs > div { flex: 1; display: flex; gap: 2px; } .segs i { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); }
.segs i.done { background: var(--accent); } .segs i.now { background: var(--pop); animation: say-pulse 1.6s ease-in-out infinite; }
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: 8.5rem; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.tl-wk { scroll-snap-align: start; text-align: left; display: grid; gap: 2px; align-content: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: inherit; cursor: pointer; min-height: 86px; }
.tl-wk b { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } .tl-wk span { font-size: .85rem; font-weight: 700; line-height: 1.25; }
.tl-wk.done { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: var(--accent); } .tl-wk.now { border: 2px solid var(--pop); } .tl-wk.now b { color: var(--pop-ink); }
.exlist div { align-items: center; } .exlist img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--soft); }
@media (max-width: 360px) { .quick { grid-template-columns: 1fr 1fr; } .quick .q-big { grid-column: 1 / -1; } .sb { grid-template-columns: 4.6rem 1fr 1.6rem; } }
.quick .q-long b { font-size: 1.05rem; line-height: 1.15; }

/* the citizen's welcome video */
.welcome-vid { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: #000; display: grid; }
.welcome-vid video { width: 100%; max-height: 62vh; aspect-ratio: 9 / 16; object-fit: cover; display: block; }
.wv-sound { white-space: nowrap; position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--pop); color: var(--on-pop); font-weight: 700; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6); animation: say-pulse 1.8s ease-in-out infinite; }
.wv-sound svg { width: 20px; height: 20px; }
.welcome-vid figcaption { position: absolute; left: 12px; top: 10px; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, .45); padding: 4px 8px; border-radius: 999px; }

/* start again: at the bottom of Today and Progress */
.reset-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.reset-card > div { display: grid; gap: 2px; min-width: 0; }
.reset-card strong { font-size: .95rem; }
.reset-card span { font-size: .82rem; color: var(--muted); }
.reset-card .btn { min-height: 44px; flex: none; }
.btn.primary.big.danger { background: #B3261E; border-color: #B3261E; color: #fff; box-shadow: none; }

/* Remy: the studio. Vinyl grooves, a waveform, sticky-note tips */
:root[data-pack="remy"] { --head: "Bricolage Grotesque", var(--display); }
:root[data-pack="remy"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-weight: 800; letter-spacing: -.01em; text-transform: none; line-height: 1.02; }
:root[data-pack="remy"] .card.hero { background-image: repeating-radial-gradient(circle at 105% 50%, transparent 0 5px, color-mix(in srgb, var(--on-accent) 9%, transparent) 5px 6px); }
:root[data-pack="remy"] .tip { background: #FFE58A; color: #2A2311; border-radius: 3px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .35); transform: rotate(-.6deg); }
:root[data-pack="remy"] .tip strong { color: #5B3A8C; }
.trk-wave rect { fill: color-mix(in srgb, var(--on-accent) 25%, transparent); }
.trk-wave rect.on { fill: #E8833A; }
.countdown-chip { display: inline-flex; align-self: start; justify-self: start; padding: 8px 12px; border-radius: 999px; background: var(--soft); font-weight: 700; font-size: .88rem; color: var(--accent); }
.step-when { font-size: .9rem; color: var(--muted); } .step-when b { color: var(--accent); }
.b-date input[type=date] { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px; min-height: 52px; }

/* Each citizen's page texture: Wes's tread plate, Theo's trail map, Margot's pattern paper, Nik's block print, Rory's mown pitch, Remy's staves */
:root[data-pack="wes"] { --bg: #F0EFE8; }
:root[data-pack="theo"] { --bg: #F2F1E7; }
:root[data-pack="nik"] { --bg: #FAF3E5; }
:root[data-pack="rory"] { --bg: #EEF4EC; }
:root[data-pack="remy"] { --bg: #F4F0F8; }
:root[data-pack="wes"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='%231D2230' fill-opacity='0.085'%3E%3Crect x='2.5' y='5.3' width='9' height='2.6' rx='1.3' transform='rotate%2845 7 6.6%29'/%3E%3Crect x='15.5' y='18.3' width='9' height='2.6' rx='1.3' transform='rotate%28-45 20 19.6%29'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-pack="theo"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='176'%3E%3Cg fill='none' stroke='%231D2230' stroke-opacity='0.12' stroke-width='1'%3E%3Cpath d='M0 14 C 40 7%2C 80 7%2C 120 14 S 200 21%2C 240 14' /%3E%3Cpath d='M0 34 C 40 24%2C 80 24%2C 120 34 S 200 44%2C 240 34' /%3E%3Cpath d='M0 52 C 40 46%2C 80 46%2C 120 52 S 200 58%2C 240 52' /%3E%3Cpath d='M0 74 C 40 62%2C 80 62%2C 120 74 S 200 86%2C 240 74' /%3E%3Cpath d='M0 96 C 40 88%2C 80 88%2C 120 96 S 200 104%2C 240 96' /%3E%3Cpath d='M0 116 C 40 105%2C 80 105%2C 120 116 S 200 127%2C 240 116' /%3E%3Cpath d='M0 138 C 40 132%2C 80 132%2C 120 138 S 200 144%2C 240 138' /%3E%3Cpath d='M0 158 C 40 149%2C 80 149%2C 120 158 S 200 167%2C 240 158' /%3E%3C/g%3E%3C/svg%3E"); }
:root[data-pack="nik"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%231D2230' stroke-opacity='0.09' stroke-width='1'%3E%3Ccircle cx='23' cy='16.5' r='6.5'/%3E%3Ccircle cx='23' cy='29.5' r='6.5'/%3E%3Ccircle cx='16.5' cy='23' r='6.5'/%3E%3Ccircle cx='29.5' cy='23' r='6.5'/%3E%3C/g%3E%3Cg fill='%23E3A72F' fill-opacity='0.55'%3E%3Ccircle cx='23' cy='23' r='1.8'/%3E%3Ccircle cx='0' cy='0' r='1.8'/%3E%3Ccircle cx='46' cy='0' r='1.8'/%3E%3Ccircle cx='0' cy='46' r='1.8'/%3E%3Ccircle cx='46' cy='46' r='1.8'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-pack="remy"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='132'%3E%3Cg stroke='%231D2230' stroke-opacity='0.1' stroke-width='1'%3E%3Cline x1='0' x2='40' y1='52.5' y2='52.5'/%3E%3Cline x1='0' x2='40' y1='60.5' y2='60.5'/%3E%3Cline x1='0' x2='40' y1='68.5' y2='68.5'/%3E%3Cline x1='0' x2='40' y1='76.5' y2='76.5'/%3E%3Cline x1='0' x2='40' y1='84.5' y2='84.5'/%3E%3C/g%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-pack="wes"] { --bg: #14150F; } :root:not([data-theme="light"])[data-pack="theo"] { --bg: #121610; } :root:not([data-theme="light"])[data-pack="nik"] { --bg: #17140E; } :root:not([data-theme="light"])[data-pack="rory"] { --bg: #101610; } :root:not([data-theme="light"])[data-pack="remy"] { --bg: #15121B; } :root:not([data-theme="light"])[data-pack="wes"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='%23ECEDF0' fill-opacity='0.07'%3E%3Crect x='2.5' y='5.3' width='9' height='2.6' rx='1.3' transform='rotate%2845 7 6.6%29'/%3E%3Crect x='15.5' y='18.3' width='9' height='2.6' rx='1.3' transform='rotate%28-45 20 19.6%29'/%3E%3C/g%3E%3C/svg%3E"); } :root:not([data-theme="light"])[data-pack="theo"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='176'%3E%3Cg fill='none' stroke='%23ECEDF0' stroke-opacity='0.1' stroke-width='1'%3E%3Cpath d='M0 14 C 40 7%2C 80 7%2C 120 14 S 200 21%2C 240 14' /%3E%3Cpath d='M0 34 C 40 24%2C 80 24%2C 120 34 S 200 44%2C 240 34' /%3E%3Cpath d='M0 52 C 40 46%2C 80 46%2C 120 52 S 200 58%2C 240 52' /%3E%3Cpath d='M0 74 C 40 62%2C 80 62%2C 120 74 S 200 86%2C 240 74' /%3E%3Cpath d='M0 96 C 40 88%2C 80 88%2C 120 96 S 200 104%2C 240 96' /%3E%3Cpath d='M0 116 C 40 105%2C 80 105%2C 120 116 S 200 127%2C 240 116' /%3E%3Cpath d='M0 138 C 40 132%2C 80 132%2C 120 138 S 200 144%2C 240 138' /%3E%3Cpath d='M0 158 C 40 149%2C 80 149%2C 120 158 S 200 167%2C 240 158' /%3E%3C/g%3E%3C/svg%3E"); } :root:not([data-theme="light"])[data-pack="nik"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23ECEDF0' stroke-opacity='0.07' stroke-width='1'%3E%3Ccircle cx='23' cy='16.5' r='6.5'/%3E%3Ccircle cx='23' cy='29.5' r='6.5'/%3E%3Ccircle cx='16.5' cy='23' r='6.5'/%3E%3Ccircle cx='29.5' cy='23' r='6.5'/%3E%3C/g%3E%3Cg fill='%23E3A72F' fill-opacity='0.3'%3E%3Ccircle cx='23' cy='23' r='1.8'/%3E%3Ccircle cx='0' cy='0' r='1.8'/%3E%3Ccircle cx='46' cy='0' r='1.8'/%3E%3Ccircle cx='0' cy='46' r='1.8'/%3E%3Ccircle cx='46' cy='46' r='1.8'/%3E%3C/g%3E%3C/svg%3E"); } :root:not([data-theme="light"])[data-pack="remy"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='132'%3E%3Cg stroke='%23ECEDF0' stroke-opacity='0.08' stroke-width='1'%3E%3Cline x1='0' x2='40' y1='52.5' y2='52.5'/%3E%3Cline x1='0' x2='40' y1='60.5' y2='60.5'/%3E%3Cline x1='0' x2='40' y1='68.5' y2='68.5'/%3E%3Cline x1='0' x2='40' y1='76.5' y2='76.5'/%3E%3Cline x1='0' x2='40' y1='84.5' y2='84.5'/%3E%3C/g%3E%3C/svg%3E"); } }
:root[data-theme="dark"][data-pack="wes"] { --bg: #14150F; }
:root[data-theme="dark"][data-pack="theo"] { --bg: #121610; }
:root[data-theme="dark"][data-pack="nik"] { --bg: #17140E; }
:root[data-theme="dark"][data-pack="rory"] { --bg: #101610; }
:root[data-theme="dark"][data-pack="remy"] { --bg: #15121B; }
:root[data-theme="dark"][data-pack="wes"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='%23ECEDF0' fill-opacity='0.07'%3E%3Crect x='2.5' y='5.3' width='9' height='2.6' rx='1.3' transform='rotate%2845 7 6.6%29'/%3E%3Crect x='15.5' y='18.3' width='9' height='2.6' rx='1.3' transform='rotate%28-45 20 19.6%29'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-pack="theo"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='176'%3E%3Cg fill='none' stroke='%23ECEDF0' stroke-opacity='0.1' stroke-width='1'%3E%3Cpath d='M0 14 C 40 7%2C 80 7%2C 120 14 S 200 21%2C 240 14' /%3E%3Cpath d='M0 34 C 40 24%2C 80 24%2C 120 34 S 200 44%2C 240 34' /%3E%3Cpath d='M0 52 C 40 46%2C 80 46%2C 120 52 S 200 58%2C 240 52' /%3E%3Cpath d='M0 74 C 40 62%2C 80 62%2C 120 74 S 200 86%2C 240 74' /%3E%3Cpath d='M0 96 C 40 88%2C 80 88%2C 120 96 S 200 104%2C 240 96' /%3E%3Cpath d='M0 116 C 40 105%2C 80 105%2C 120 116 S 200 127%2C 240 116' /%3E%3Cpath d='M0 138 C 40 132%2C 80 132%2C 120 138 S 200 144%2C 240 138' /%3E%3Cpath d='M0 158 C 40 149%2C 80 149%2C 120 158 S 200 167%2C 240 158' /%3E%3C/g%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-pack="nik"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23ECEDF0' stroke-opacity='0.07' stroke-width='1'%3E%3Ccircle cx='23' cy='16.5' r='6.5'/%3E%3Ccircle cx='23' cy='29.5' r='6.5'/%3E%3Ccircle cx='16.5' cy='23' r='6.5'/%3E%3Ccircle cx='29.5' cy='23' r='6.5'/%3E%3C/g%3E%3Cg fill='%23E3A72F' fill-opacity='0.3'%3E%3Ccircle cx='23' cy='23' r='1.8'/%3E%3Ccircle cx='0' cy='0' r='1.8'/%3E%3Ccircle cx='46' cy='0' r='1.8'/%3E%3Ccircle cx='0' cy='46' r='1.8'/%3E%3Ccircle cx='46' cy='46' r='1.8'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-pack="remy"] { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='132'%3E%3Cg stroke='%23ECEDF0' stroke-opacity='0.08' stroke-width='1'%3E%3Cline x1='0' x2='40' y1='52.5' y2='52.5'/%3E%3Cline x1='0' x2='40' y1='60.5' y2='60.5'/%3E%3Cline x1='0' x2='40' y1='68.5' y2='68.5'/%3E%3Cline x1='0' x2='40' y1='76.5' y2='76.5'/%3E%3Cline x1='0' x2='40' y1='84.5' y2='84.5'/%3E%3C/g%3E%3C/svg%3E"); }
:root:is([data-pack="wes"], [data-pack="theo"], [data-pack="nik"], [data-pack="remy"]) :is(body, .overlay) { background-image: var(--tex); }
:root[data-pack="theo"] :is(body, .overlay) { background-size: 240px 176px; }
:root[data-pack="rory"] :is(body, .overlay) { background-image: repeating-linear-gradient(180deg, color-mix(in srgb, var(--ink) 4%, transparent) 0 72px, transparent 72px 144px); }
/* card shapes */
:root[data-pack="wes"] { --radius: 6px; }
:root[data-pack="wes"] .card:not(.hero) { border-top: 3px solid var(--accent); }
:root[data-pack="theo"] { --radius: 24px; }
:root[data-pack="margot"] { --radius: 4px; }
:root[data-pack="margot"] .card:not(.hero) { outline: 1px dashed color-mix(in srgb, var(--accent-2) 70%, transparent); outline-offset: -6px; }
:root[data-pack="nik"] { --radius: 16px; }
:root[data-pack="nik"] .card:not(.hero) { border-color: color-mix(in srgb, #E3A72F 45%, var(--line)); }
:root[data-pack="rory"] { --radius: 8px; }
:root[data-pack="rory"] .card:not(.hero) { border-left: 4px solid var(--accent); }
:root[data-pack="remy"] { --radius: 14px; }
:root[data-pack="remy"] .card:not(.hero) { box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--ink-remy) 80%, transparent); }

/* free guides in the Passport */
.b-tracker { width: 100%; table-layout: fixed; }
.b-tracker thead th:first-child { width: 40%; }
.b-tracker thead th:last-child { width: 17%; }
.b-tracker th[scope=row] { text-align: left; font: 600 .86rem/1.25 var(--body); text-transform: none; letter-spacing: 0; white-space: normal; padding: 6px 8px 6px 0; }
.b-tracker th[scope=row] small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.b-tracker input { width: 100%; min-width: 0; text-align: center; padding-left: 4px; padding-right: 4px; }
.b-tracker td.delta { font-family: var(--mono); font-weight: 600; text-align: center; color: var(--muted); }
.b-tracker td.delta.up { color: var(--accent); }
.retest-due { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: .92rem; }
.b-search input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px; min-height: 52px; }
.free-note { text-align: center; margin: 4px 0 0; }
.free-small { border-top: 1px solid var(--line); padding-top: 12px; }

/* Del: the home office. Space Grotesk, graph paper, tick-box progress, label-tape tips */
:root[data-pack="del"] { --head: "Space Grotesk", var(--display); --bg: #F7F3EC; --radius: 12px; --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M28 0H0V28' fill='none' stroke='%231D2230' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E"); }
:root[data-pack="marcus"] { --head: "Graduate", Georgia, serif; --bg: #EEF2F7; --radius: 10px; --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='120'%3E%3Cg stroke='%231D2230' stroke-opacity='0.09' stroke-width='1.2'%3E%3Cline x1='0' x2='96' y1='0.6' y2='0.6'/%3E%3Cline x1='14' x2='14' y1='58' y2='64'/%3E%3Cline x1='38' x2='38' y1='58' y2='64'/%3E%3Cline x1='62' x2='62' y1='58' y2='64'/%3E%3Cline x1='86' x2='86' y1='58' y2='64'/%3E%3C/g%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-pack="del"] { --bg: #17140F; --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M28 0H0V28' fill='none' stroke='%23ECEDF0' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E"); } :root:not([data-theme="light"])[data-pack="marcus"] { --bg: #10141C; --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='120'%3E%3Cg stroke='%23ECEDF0' stroke-opacity='0.07' stroke-width='1.2'%3E%3Cline x1='0' x2='96' y1='0.6' y2='0.6'/%3E%3Cline x1='14' x2='14' y1='58' y2='64'/%3E%3Cline x1='38' x2='38' y1='58' y2='64'/%3E%3Cline x1='62' x2='62' y1='58' y2='64'/%3E%3Cline x1='86' x2='86' y1='58' y2='64'/%3E%3C/g%3E%3C/svg%3E"); } }
:root[data-theme="dark"][data-pack="del"] { --bg: #17140F; --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M28 0H0V28' fill='none' stroke='%23ECEDF0' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-pack="marcus"] { --bg: #10141C; --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='120'%3E%3Cg stroke='%23ECEDF0' stroke-opacity='0.07' stroke-width='1.2'%3E%3Cline x1='0' x2='96' y1='0.6' y2='0.6'/%3E%3Cline x1='14' x2='14' y1='58' y2='64'/%3E%3Cline x1='38' x2='38' y1='58' y2='64'/%3E%3Cline x1='62' x2='62' y1='58' y2='64'/%3E%3Cline x1='86' x2='86' y1='58' y2='64'/%3E%3C/g%3E%3C/svg%3E"); }
:root:is([data-pack="del"], [data-pack="marcus"]) :is(body, .overlay) { background-image: var(--tex); }
:root[data-pack="del"] :is(h1, h2, h3, .top .t strong, .tip strong, .rulecard strong) { font-weight: 700; letter-spacing: -.02em; text-transform: none; line-height: 1.05; }
:root[data-pack="del"] .card.hero { background-image: linear-gradient(color-mix(in srgb, var(--on-accent) 8%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--on-accent) 8%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
:root[data-pack="del"] .tip { background: var(--card); border: 1px solid var(--line); border-left: 6px solid #B5651D; border-radius: 4px 12px 12px 4px; }
:root[data-pack="del"] .tip strong { display: inline-block; width: fit-content; margin-bottom: 3px; background: #1D2230; color: #F7F3EC; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; }
:root[data-pack="del"] .card:not(.hero) { border-top: 3px solid color-mix(in srgb, #B5651D 70%, transparent); }
.trk-ticks rect { fill: none; stroke: color-mix(in srgb, var(--on-accent) 45%, transparent); stroke-width: 1.6; }
.trk-ticks .on rect { fill: var(--on-accent); stroke: var(--on-accent); }
.trk-ticks path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Marcus: the practice field. Varsity lettering, yard lines, clipboard tips, a flag carried up the field */
:root[data-pack="marcus"] :is(h1, h2, h3, .top .t strong, .rulecard strong) { font-weight: 400; letter-spacing: .01em; text-transform: uppercase; line-height: 1.05; }
:root[data-pack="marcus"] .tip strong { font-family: var(--head); font-weight: 400; text-transform: uppercase; color: #1F3B66; }
:root[data-pack="marcus"] .card.hero { background-image: repeating-linear-gradient(90deg, transparent 0 38px, color-mix(in srgb, var(--on-accent) 10%, transparent) 38px 40px); }
:root[data-pack="marcus"] .tip { background: #FFFFFF; color: #1D2230; border-radius: 6px; padding-top: 22px; box-shadow: 0 2px 6px rgba(0,0,0,.12); background-image: linear-gradient(#B9BEC8, #B9BEC8); background-size: 64px 10px; background-position: 50% 6px; background-repeat: no-repeat; }
:root[data-pack="marcus"] .card:not(.hero) { border-bottom: 3px solid #D9A43A; }
.trk-field .yd { stroke: color-mix(in srgb, var(--on-accent) 45%, transparent); stroke-width: 1.4; }
.trk-field .run { fill: color-mix(in srgb, var(--on-accent) 70%, transparent); }
.trk-field .flag { fill: #E03C31; stroke: #E03C31; stroke-width: 2; stroke-linejoin: round; }

/* Halfway note, the finish line (review, share), the home-screen tip and the free guides on the Passport home */
.mid-card { border-left: 4px solid var(--accent); }
.review-card .stars { display: flex; gap: 4px; }
.review-card .stars button { font-size: 2rem; line-height: 1; padding: 2px 4px; background: none; border: 0; color: var(--line); cursor: pointer; transition: color .15s ease, transform .15s ease; }
.review-card .stars button.on { color: var(--gold); }
.review-card .stars button:active { transform: scale(.9); }
.review-card .toggle span { font-size: .9rem; }
.share-card, .install-tip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.share-card > div, .install-tip > div:first-child { display: grid; gap: 2px; flex: 1 1 200px; }
.install-tip { background: var(--soft); border-style: dashed; }
.free-list { gap: 4px; }
.free-list > div:first-child { margin-bottom: 8px; display: grid; gap: 4px; }
.fl-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.fl-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--stamp); }
.fl-row > span { display: grid; gap: 1px; min-width: 0; }
.fl-row b { color: var(--muted); font-size: 1.3rem; }
.fl-row:hover strong { text-decoration: underline; }

/* ---------- readable on every texture: step, card, day and guide screens sit on a solid panel ---------- */
.overlay .app > .stack { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 22px; box-shadow: 0 6px 24px rgba(0, 0, 0, .06); }
.overlay .bar .eyebrow { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.rulecard, .reset-card { background: var(--card); }
.chip:not([aria-pressed="true"]) { background: var(--card); }
header.top .t { background: color-mix(in srgb, var(--card) 90%, transparent); border-radius: 12px; padding: 4px 10px; }
nav.site-bar a { background: color-mix(in srgb, var(--card) 90%, transparent); border-radius: 999px; padding: 2px 10px; font-size: .64rem; }
main.stack > .b-label, .cardlist > .b-label { display: inline-block; justify-self: start; background: color-mix(in srgb, var(--card) 90%, transparent); border-radius: 999px; padding: 3px 12px; }
.overlay .bar .btn.ghost { background: var(--card); }

/* ---------- quick quiz ---------- */
.b-quiz { background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; }
.b-quiz .qz-head h3 { font-size: 1.35rem; margin: 2px 0 4px; }
.qz-q { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.qz-n { font: 600 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.qz-text { font-weight: 700; font-size: 1.05rem; margin: 0; }
.qz-opts { display: grid; gap: 8px; }
.qz-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .2s ease; }
.qz-opt:hover:not([disabled]) { border-color: var(--accent); transform: translateY(-1px); }
.qz-opt[disabled] { cursor: default; }
.qz-mark { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem/1 var(--mono); background: var(--soft); color: var(--ink); }
.qz-mark svg { width: 16px; height: 16px; }
.qz-opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--card)); animation: qz-pop .35s ease; }
.qz-opt.right .qz-mark { background: var(--good); color: #fff; }
.qz-opt.wrong { border-color: var(--pop); background: color-mix(in srgb, var(--pop) 10%, var(--card)); animation: qz-shake .35s ease; }
.qz-opt.wrong .qz-mark { background: var(--pop); color: #fff; }
.qz-opt.dim { opacity: .55; }
.qz-why { font-size: .95rem; background: var(--soft); border-radius: 12px; padding: 10px 12px; animation: qz-in .3s ease; }
.qz-score { text-align: center; display: grid; gap: 6px; justify-items: center; padding-top: 12px; border-top: 1px dashed var(--line); animation: qz-in .3s ease; }
.qz-big { font: 900 1.6rem/1.1 var(--display); margin: 0; } .qz-big b { color: var(--accent); font-size: 2.4rem; }
.qz-progress { margin: 0; }
.qz-img img { aspect-ratio: 16 / 10; }
@keyframes qz-pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes qz-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes qz-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qz-opt.right, .qz-opt.wrong, .qz-why, .qz-score { animation: none; } }
/* more spots that sat straight on the texture: the Passport home, onboarding and free guides */
.stamp-slot { background: var(--card); }
main.stack > .row:has(> h2), main.stack > .row:has(> .btn.link), .app > .row:has(> .btn.link) { background: color-mix(in srgb, var(--card) 92%, transparent); border-radius: 14px; padding: 6px 12px; }
.free-note, .free-small { background: color-mix(in srgb, var(--card) 92%, transparent); border-radius: 12px; padding: 10px 12px; }

/* =====================================================================
   Responsive: phones keep the single column; tablets get a wider page
   and two-column lists; computers get a sidebar and a roomy layout.
   ===================================================================== */
.hero-photo img, .today-photo img { max-height: 70vh; object-fit: cover; width: 100%; }

@media (min-width: 720px) {
  .app { max-width: 760px; padding-left: 28px; padding-right: 28px; }
  .tabs .in { max-width: 760px; }
  .cardlist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .cardlist > :not(.card-row) { grid-column: 1 / -1; }
  .card-row { height: 100%; }
  .qz-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qz-opts:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-traffic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .b-compare { gap: 16px; }
  .overlay .app { max-width: 820px; }
  .overlay .app > .stack { padding: 26px 28px 30px; }
  .hero-photo img, .today-photo img { max-height: 440px; }
  .b-photo img { max-height: 480px; object-fit: cover; }
}

@media (min-width: 1100px) {
  html, body { font-size: 17px; }
  /* the tab bar becomes a sidebar */
  .tabs { top: 0; bottom: 0; right: auto; width: 220px; border-top: 0; border-right: 1px solid var(--line); padding: 0; }
  .tabs .in { max-width: none; height: auto; grid-template-columns: 1fr; grid-auto-rows: 64px; padding-top: 140px; }
  .tabs button { grid-auto-flow: column; justify-content: start; gap: 12px; padding: 0 28px; font-size: .95rem; border-radius: 0; }
  .tabs button[aria-current="page"] { background: color-mix(in srgb, var(--accent) 10%, var(--card)); box-shadow: inset 4px 0 0 var(--pop-ink); }
  .app:has(> .tabs) { padding-left: calc(220px + 48px); padding-right: 48px; max-width: none; padding-bottom: 48px; }
  .app:has(> .tabs) > * { max-width: 1060px; margin-left: auto; margin-right: auto; }
  .app:has(> .tabs) > .tabs { max-width: none; margin: 0; }
  /* main screens use two columns where cards sit side by side */
  main.stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; align-items: start; }
  main.stack > * { grid-column: 1 / -1; }
  main.stack > .card:not(.hero):not(.next), main.stack > .rulecard, main.stack > .reset-card { grid-column: auto; }
  main.stack > .today-photo { grid-column: 1; grid-row: span 3; align-self: stretch; }
  main.stack > .today-photo img { height: 100%; max-height: 520px; }
  main.stack > .today-photo ~ .card.hero, main.stack > .today-photo ~ .segs, main.stack > .today-photo ~ .btn.primary.big { grid-column: 2; }
  .cardlist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* step, card and day screens: a comfortable reading width */
  .overlay .app { max-width: 920px; padding-left: 32px; padding-right: 32px; }
  .overlay .app > .stack { padding: 34px 44px 40px; }
  .hero-photo img { max-height: 480px; }
}
@media (min-width: 1100px) {
  main.stack > .card:has(.b-traffic, .b-quiz, .b-compare, .b-reel, .b-pitch, .b-table, .b-list, table), main.stack > .unit-extras { grid-column: 1 / -1 !important; }
}
@media (min-width: 1100px) {
  main.stack > .card:has(> .voice):not(.card.hero + .card) { grid-column: 1 / -1; }
}

/* ---------- greeting, text size, reminders, certificate ---------- */
.hello { margin: 0; justify-self: start; font-family: var(--display); font-weight: 800; font-size: 1.15rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; grid-column: 1 / -1; }
.hello-done { margin: 0; font-weight: 700; color: var(--pop-ink); }
.text-size { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.text-size > div:first-child { display: grid; }
.ts-btns { display: flex; gap: 6px; }
.ts-btns button { min-width: 48px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; cursor: pointer; }
.ts-btns button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.remind .remind-row { gap: 12px; flex-wrap: wrap; align-items: end; }
.remind .remind-row .field { flex: 1 1 140px; margin: 0; }
.remind select, .remind input[type="time"] { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; font: inherit; background: var(--card); color: var(--ink); }
.remind .remind-btns { gap: 8px; flex-wrap: wrap; }
.remind.done { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.remind.done > div { display: grid; }
.cert-card canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #FBFAF7; }
.cert-card .row { gap: 8px; flex-wrap: wrap; }
@media (min-width: 1100px) { main.stack > .remind, main.stack > .hello { grid-column: 1 / -1; } }

/* ---------- rewards: badges, codes, Passport level, gold stamps ---------- */
.badges .badge-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 12px 6px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); opacity: .6; }
.badge svg { width: 30px; height: 30px; }
.badge strong { font-size: .82rem; line-height: 1.15; color: inherit; }
.badge span { font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.badge.got { opacity: 1; border-style: solid; border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.badge.got svg { color: var(--accent); }
.rewards { display: grid; gap: 14px; }
.code-box { display: grid; gap: 6px; }
.code-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code-line .code { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; letter-spacing: .12em; padding: 8px 14px; border: 2px dashed var(--accent); border-radius: 10px; background: var(--card); }
.code-line .btn { min-height: 40px; }
.badge-toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: flex; gap: 12px; align-items: center; width: min(92vw, 420px); padding: 14px 16px; border-radius: 16px; background: var(--ink); color: var(--card); box-shadow: 0 12px 40px rgba(0,0,0,.25); animation: toast-in .35s ease; }
.badge-toast svg { width: 34px; height: 34px; flex: none; color: var(--accent-2, var(--gold)); }
.badge-toast div { display: grid; gap: 2px; }
.badge-toast strong { font-size: .98rem; }
.badge-toast span { font-size: .84rem; opacity: .85; }
.badge-toast.out { opacity: 0; transform: translate(-50%, 10px); transition: .35s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 1100px) { .badge-toast { bottom: 32px; } .card.badges, .card.rewards { grid-column: 1 / -1; } }
.level { display: grid; gap: 10px; }
.lv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lv-head strong { font-family: var(--display); font-stretch: 78%; font-weight: 900; text-transform: uppercase; font-size: 1.6rem; color: var(--pop-ink); }
.lv-pips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lv-pips i { height: 8px; border-radius: 4px; background: var(--soft); position: relative; }
.lv-pips i.on { background: var(--coral); }
.lv-pips i.mark::after { content: ""; position: absolute; right: -4px; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--line); }
.lv-pips i.mark.on::after { background: var(--pop-ink); }
.stamp-card.gold { border-color: #C9A227; box-shadow: inset 0 0 0 1px #C9A227; }
.stamp-card.gold .stamp { color: #9A7A12; border-color: #C9A227; outline-color: #C9A227; background: radial-gradient(circle, rgba(242,201,76,.22), transparent 70%); }
.stamp-card.gold em { color: #9A7A12; }
@media (prefers-color-scheme: dark) { .stamp-card.gold .stamp, .stamp-card.gold em { color: #E5C35A; } }
.stamp-card.gold .stamp.pk { color: #A67C00 !important; background: none; filter: drop-shadow(0 0 5px rgba(242,201,76,.7)); }
.stamp-card.gold .sc-bar i { background: #C9A227; }

/* ---------- the opening: the seal draws itself in foil, then the cover swings open (about 2.8 s, once a visit) ---------- */
.pp-open { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; perspective: 1400px; background: radial-gradient(120% 80% at 50% 30%, #1C1E26, #0A0B0F); cursor: pointer; }
.pp-open .book { position: relative; width: min(62vw, 250px); aspect-ratio: 210 / 296; transform-style: preserve-3d; }
.pp-open .page, .pp-open .cover { position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; }
.pp-open .page { overflow: hidden; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.pp-open .cover { transform-origin: left center; transform-style: preserve-3d; }
.pp-open .front, .pp-open .back { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pp-open .front { background: radial-gradient(120% 90% at 100% 0%, #262A36, transparent 60%), #0A0B0F; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 6px 0 10px -6px rgba(0,0,0,.6), 0 24px 40px -18px rgba(0,0,0,.7); display: grid; justify-items: center; align-content: center; gap: 5%; padding: 8% 10% 22%; color: #E9C77B; overflow: hidden; }
.pp-open .back { transform: rotateY(180deg); background: repeating-radial-gradient(circle at 30% 40%, #16171D 0 2px, #0A0B0F 2px 6px); }
.pp-open .mark { width: 50%; height: auto; overflow: visible; }
.pp-open .mc { filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }
.pp-open .word { font-family: Gloock, Georgia, serif; font-size: clamp(1.1rem, 5.6vw, 1.55rem); letter-spacing: .02em; white-space: nowrap; }
.pp-open .kind { font-family: var(--mono); font-weight: 600; font-size: clamp(.62rem, 3vw, .8rem); letter-spacing: .5em; padding-left: .5em; }
.pp-open .sub { font-family: var(--mono); font-weight: 500; font-size: clamp(.42rem, 2vw, .54rem); letter-spacing: .3em; padding-left: .3em; color: #C9A45C; opacity: .8; white-space: nowrap; }
.pp-open .chip { position: absolute; bottom: 6%; width: 26px; height: 18px; border: 1.4px solid #E9C77B; border-radius: 4px; opacity: .8; }
.pp-open .chip::before { content: ""; position: absolute; inset: 4px 9px; border: 1.2px solid #E9C77B; border-radius: 50%; }
.pp-open .data { position: absolute; inset: 0; padding: 8% 7%; display: grid; align-content: start; gap: 8px; color: #13213F;
  background: repeating-linear-gradient(115deg, rgba(11,44,107,.05) 0 1px, transparent 1px 7px), repeating-linear-gradient(65deg, rgba(255,90,60,.05) 0 1px, transparent 1px 9px), #F6F1E6; }
.pp-open .hd { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .5rem; letter-spacing: .14em; color: #16151B; }
.pp-open .row { display: grid; grid-template-columns: 30% 1fr; gap: 10px; }
.pp-open .photo { aspect-ratio: 4 / 5; border-radius: 6px; background: linear-gradient(160deg, #F7F2E9, #E6DCCB); display: grid; place-items: center; }
.pp-open .photo svg { width: 64%; }
.pp-open dl { margin: 0; display: grid; gap: 3px; }
.pp-open dt { font-family: var(--mono); font-size: .42rem; letter-spacing: .14em; color: #5A6785; text-transform: uppercase; }
.pp-open dd { margin: 0 0 2px; font-family: Gloock, Georgia, serif; font-weight: 400; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-open .stampx { position: absolute; right: 9%; top: 52%; width: 31%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #FF5A3C; outline: 1px dashed #FF5A3C; outline-offset: -6px; color: #FF5A3C; display: grid; place-content: center; text-align: center; font-family: var(--mono); font-size: .44rem; letter-spacing: .12em; transform: rotate(-12deg) scale(1.8); opacity: 0; }
.pp-open .stampx b { font-family: Gloock, Georgia, serif; font-weight: 400; font-size: 1rem; }
.pp-open .mrzx { position: absolute; left: 6%; right: 6%; bottom: 5%; font-family: var(--mono); font-size: .5rem; line-height: 1.55; letter-spacing: .06em; white-space: nowrap; overflow: hidden; }
.pp-open .mc { opacity: 0; transform-origin: 50px 50px; animation: ppo-pop .45s .35s cubic-bezier(.3,1.6,.5,1) forwards; }
.pp-open .ros ellipse { stroke-dasharray: 260; stroke-dashoffset: 260; animation: ppo-draw .75s cubic-bezier(.5,0,.2,1) forwards; animation-delay: calc(var(--i) * 28ms); }
.pp-open .disc { opacity: 0; transform-origin: 60px 60px; animation: ppo-pop .3s .68s cubic-bezier(.3,1.6,.5,1) forwards; }
.pp-open .chev { opacity: 0; animation: ppo-slide .32s .82s cubic-bezier(.3,1.5,.5,1) forwards; }
.pp-open .word { opacity: 0; animation: ppo-up .4s .92s ease forwards; }
.pp-open .kind { opacity: 0; animation: ppo-up .4s 1.02s ease forwards; }
.pp-open .sub, .pp-open .chip { opacity: 0; animation: ppo-up .4s 1.1s ease forwards; }
.pp-open .mark { animation: ppo-turn 1.4s cubic-bezier(.4,0,.2,1) forwards; }
.pp-open .cover { animation: ppo-swing .7s 1.45s cubic-bezier(.6,.05,.3,1) forwards; }
.pp-open .book { animation: ppo-shift .7s 1.45s cubic-bezier(.6,.05,.3,1) forwards, ppo-grow .5s 2.25s cubic-bezier(.5,0,.2,1) forwards; }
.pp-open .stampx { animation: ppo-thump .3s 2.0s cubic-bezier(.3,1.6,.5,1) forwards; }
.pp-open.out { animation: ppo-fade .35s ease forwards; pointer-events: none; }
@keyframes ppo-draw { to { stroke-dashoffset: 0; } }
@keyframes ppo-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes ppo-slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes ppo-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ppo-turn { from { transform: rotate(-30deg); } to { transform: none; } }
@keyframes ppo-swing { to { transform: rotateY(-180deg); } }
@keyframes ppo-shift { to { transform: translateX(6%); } }
@keyframes ppo-grow { from { transform: translateX(6%); } to { transform: translateX(6%) scale(1.9); opacity: 0; } }
@keyframes ppo-thump { to { opacity: .9; transform: rotate(-12deg) scale(1); } }
@keyframes ppo-fade { to { opacity: 0; visibility: hidden; } }

/* ---------- Your downloads (Passport home) ---------- */
.dl-card { display: grid; gap: 10px; }
.dl-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.dl-row strong { font-size: .95rem; line-height: 1.25; }
.dl-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--pop-ink); font-family: var(--mono); font-size: .62rem; font-weight: 600; letter-spacing: .08em; }
.dl-row .btn { min-height: 40px; padding: 0 14px; }

/* ---------- the Passport home (30 Oct 2026): slim header, "Pick up where you left off", then "Yours" beside the side column ----------
   One column on phones and tablets (header, pick up, Yours, add, free, keep it safe, home-screen tip); two from 1024px, up to 1200px wide. */
.app.pp-home { max-width: calc(1200px + 2 * var(--mc-gutter, 16px)); padding-left: var(--mc-gutter, 16px); padding-right: var(--mc-gutter, 16px); padding-bottom: 48px; }
.pp-home > * + * { margin-top: 18px; }
.pp-head.pp-cover { gap: 10px 28px; padding: 20px 22px 0; grid-template-columns: minmax(0, 1fr); align-items: end; }
.pp-head.pp-cover::after { font-size: 6.5rem; bottom: auto; top: -10px; right: -10px; opacity: .06; }
.pp-head-t { display: grid; gap: 4px; position: relative; z-index: 1; min-width: 0; }
.pp-head.pp-cover h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
.pp-head.pp-cover p { font-size: .95rem; }
.pp-head .pp-holder { margin-top: 0; }
.pp-sum { position: relative; z-index: 1; font-family: var(--mono); font-size: .72rem !important; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); opacity: 1 !important; }
.pp-head .pp-mrz { grid-column: 1 / -1; margin: 4px -22px 0; padding: 8px 22px 10px; border-top: 1px dashed color-mix(in srgb, var(--on-cover) 22%, transparent); font-size: .56rem; line-height: 1.45; }
@media (min-width: 720px) {
  .pp-head.pp-cover { grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); padding: 24px 28px 0; }
  .pp-head .pp-mrz { margin: 6px -28px 0; padding: 8px 28px 10px; }
  .pp-sum { grid-column: 1 / -1; }
}
/* pick up where you left off */
.pp-pick { grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px 16px; }
.pp-pick > img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--stamp); }
.pp-pick-t { display: grid; gap: 5px; min-width: 0; }
.pp-pick-t strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.pp-pick-t em { font-style: normal; font-size: .85rem; font-weight: 700; color: var(--pop-ink); }
.pp-pick .sc-bar { max-width: 420px; }
.pp-pick > .btn { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .pp-pick { grid-template-columns: 80px minmax(0, 1fr) auto; padding: 20px 24px; gap: 20px; }
  .pp-pick > img { width: 80px; height: 80px; }
  .pp-pick-t strong { font-size: 1.6rem; }
  .pp-pick > .btn { grid-column: auto; width: auto; min-width: 200px; padding: 0 2em; }
}
/* the two columns */
.pp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.pp-cols > .stack { min-width: 0; align-content: start; }
@media (min-width: 1024px) { .pp-cols { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; } }
/* Yours: tabs and a grid of cards */
.pp-yours { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.pp-yours-hd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pp-yours-hd h2 { font-size: 1.7rem; }
.pp-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tabs button { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.pp-tabs button:hover { color: var(--ink); }
.pp-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
.pp-grid > * { min-width: 0; }
.pp-grid > .pp-wide { grid-column: 1 / -1; }
.pp-grid > .stamp-card { align-content: center; }
.pp-grid > .stamp-card .sc-t strong { font-size: 1.05rem; }
.pp-grid > .stamp-card .stamp { width: 68px; height: 68px; }
.pp-grid > .stamp-slot .stamp.empty { width: 68px; height: 68px; }
.pp-note { margin: 0; padding: 0 4px; }
.pp-note a { color: var(--accent); font-weight: 600; }
.pp-made-card { align-content: start; padding: 12px; }
.pp-made-card .made-row { border: 0; padding: 0; }
.pp-made-card .club-past { padding: 0; }
/* side column */
.free-list .fl-more { min-height: 44px; margin-top: 8px; width: 100%; }
.pp-safe .row { gap: 8px; }
.install-tip.compact { padding: 14px 16px; gap: 8px; }
.install-tip.compact strong { font-size: .95rem; }
.install-tip.compact .btn.primary { min-height: 40px; padding: 0 14px; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .pp-home .fade-in { animation: none; } }
.dl-lib { color: inherit; text-decoration: none; } .dl-lib .btn { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; }

/* "See a full Passport": an example before the first key (28 Oct 2026) */
.pp-demo { display: grid; gap: 12px; }
.pp-demo summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pp-demo summary::-webkit-details-marker { display: none; }
.pp-demo summary > span { display: grid; gap: 2px; }
.pp-demo summary strong { font-size: 1.15rem; }
.pp-demo summary b { font-size: 1.5rem; line-height: 1; color: var(--accent); }
.pp-demo[open] summary b { transform: rotate(45deg); }
.pp-demo-tag { margin: 0; }
.pp-demo .stamp-card { cursor: default; }

/* Made for you: portraits and storybooks (28 Oct 2026) */
.made { display: grid; gap: 10px; }
.made-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.made-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: block; }
.made-row > span { display: grid; gap: 2px; min-width: 0; }
.made-links { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .86rem; }
.made-links a { color: var(--accent); font-weight: 600; }
.made-ask .field { margin: 10px 0; }
.club-ic { width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; border: 1px dashed var(--line); font: 600 .8rem var(--mono, monospace); color: var(--muted, #888); }
.club-past { display: grid; gap: 6px; padding: 0 8px 4px; }
.club-drops { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.club-drops a { flex: 0 0 auto; width: 84px; display: grid; gap: 4px; color: inherit; text-decoration: none; font-size: .74rem; line-height: 1.25; }
.club-drops img { width: 84px; height: 105px; object-fit: cover; border-radius: 10px; display: block; }

/* Passport home, one flow (30 Oct 2026): no side column. Rows that fill the width at any amount of content. */
.pp-flow { display: grid; gap: 22px; max-width: 1200px; margin: 18px auto 0; min-width: 0; }
.pp-flow > * { min-width: 0; }
.pp-tools { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.pp-tools > * { margin: 0; min-width: 0; }
.pp-tools > #pp-made:empty { display: none; }
.pp-tools > #pp-made > * { height: 100%; margin: 0; }
.pp-pair2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.pp-flow .free-list { display: grid; gap: 10px; }
@media (min-width: 760px) {
  .pp-flow .free-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pp-flow .free-list > div:first-child, .pp-flow .free-list > .fl-more { grid-column: 1 / -1; }
  .pp-flow .free-list > .fl-more { justify-self: center; min-width: 200px; }
}
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.pick { display: grid; grid-template-rows: auto 1fr; padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.pick:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -22px rgba(0,0,0,.45); }
.pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line, #e8e1d4); }
.pick span { display: grid; gap: 4px; padding: 12px 14px 14px; }
.pick small { font: 500 .66rem/1 var(--mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pick strong { font-size: 1rem; line-height: 1.25; }
.pick em { font-style: normal; font-size: .86rem; color: var(--muted, #6b6559); }

/* A little colour so the home isn't all one tone (owner, 30 Oct 2026). Tints of the brand colours, in both themes. */
.pp-flow .card.level { --card: #16151B; --ink: #F4EFE6; --muted: #B9B2A5; --line: #34313B; --soft: #24222A; background: #16151B; color: #F4EFE6; border-color: #16151B; }
.pp-flow .card.level .eyebrow, .pp-flow .card.level .lv-head small { color: var(--gold); }
.pp-flow #add.card { background: color-mix(in srgb, var(--coral) 9%, var(--card)); border-color: color-mix(in srgb, var(--coral) 28%, var(--line)); }
.pp-flow .made-ask.card, .pp-flow #pp-made > .card { background: color-mix(in srgb, #4E7A5A 11%, var(--card)); border-color: color-mix(in srgb, #4E7A5A 26%, var(--line)); }
.pp-flow .pp-safe.card { background: color-mix(in srgb, var(--cover) 9%, var(--card)); border-color: color-mix(in srgb, var(--cover) 22%, var(--line)); }
.pp-flow .free-list.card { background: color-mix(in srgb, var(--gold) 20%, var(--card)); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.pp-flow .free-list .fl-row { background: var(--card); border-radius: 14px; }
.pp-flow .card.level .lv-head strong { color: var(--gold); }
