/* DOOF Stories: one house with DOOF. Tokens copied from getdoof.app (src/styles.css) so both apps match.
   Layout: one phone-width column; the story player is a full-screen colour field above it. */
:root {
  --bg: #FFF9F3; --surface: #FFFFFF; --ink: #282920; --muted: #716A60; --brand: #BE452F; --brand-bright: #E55D3F;
  --line: #E8DFD3; --soft: #F5EBDD; --green: #365C46; --sage: #EAF0E5; --focus: #3069A6; --shadow: rgba(40, 41, 32, .12); --on-brand: #FFF9F3;
  --radius: 22px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #1D1F19; --surface: #272A22; --ink: #FFF6E9; --muted: #C4BDAD; --brand: #FFA48B; --brand-bright: #F38866; --line: #494B3F; --soft: #39342A; --green: #B6D5B4; --sage: #2D392D; --focus: #95BFFD; --shadow: rgba(0, 0, 0, .4); --on-brand: #1D1F19; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #1D1F19; --surface: #272A22; --ink: #FFF6E9; --muted: #C4BDAD; --brand: #FFA48B; --brand-bright: #F38866; --line: #494B3F; --soft: #39342A; --green: #B6D5B4; --sage: #2D392D; --focus: #95BFFD; --shadow: rgba(0, 0, 0, .4); --on-brand: #1D1F19; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }

.app { max-width: 440px; margin: 0 auto; padding-block: 12px 120px; min-height: 100%; }
.dot { color: var(--brand-bright); }
.wm { font-weight: 800; font-size: 24px; letter-spacing: -1px; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 1.7px; text-transform: uppercase; color: var(--brand); }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -1px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.preview-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding: 6px 0 2px; }
.preview-bar b { color: var(--brand); font-weight: 750; letter-spacing: 1px; font-size: 10px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 14px; }
.lock { display: flex; align-items: baseline; gap: 8px; }
.lock .sub { font-size: 10px; font-weight: 750; letter-spacing: 2px; color: var(--brand); }
.seg { display: inline-flex; background: var(--soft); border-radius: 100px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 11px; border-radius: 100px; font-size: 12px; font-weight: 700; color: var(--muted); min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); }

.hello { padding: 6px 0 18px; display: grid; gap: 6px; }
.hello h1 { font: 400 clamp(36px, 10vw, 46px)/1.02 var(--serif); letter-spacing: -1.5px; }
.hello p { color: var(--muted); }

/* story tiles */
.tile { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 20px 18px; display: grid; gap: 10px; text-align: left; width: 100%; color: #FFF9F3; min-height: 210px; isolation: isolate; }
.tile.week { background: #191917; }
.tile.month { background: #365C46; min-height: 150px; }
.tile .art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tile .art i { position: absolute; border-radius: 50%; filter: blur(.5px); opacity: .9; animation: drift 9s ease-in-out infinite alternate; }
.tile h2 { font: 400 40px/1 var(--serif); letter-spacing: -1.5px; }
.tile .meta { font-size: 12.5px; opacity: .85; }
.tile .eb { font-size: 10px; font-weight: 750; letter-spacing: 1.7px; opacity: .8; }
.tile .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.tile .play { width: 54px; height: 54px; border-radius: 50%; background: #FFF9F3; color: #282920; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tile.month .play { background: #FFF9F3; }
.tile .play svg { width: 20px; height: 20px; margin-left: 3px; }
.strip { display: flex; gap: 4px; }
.strip span { height: 5px; flex: 1; border-radius: 3px; }
.tile.fresh .play { animation: pulse 2.4s ease-in-out infinite; }
.stack { display: grid; gap: 12px; }

.sofar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; }
.sofar b { font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: var(--on-brand); border-radius: 100px; padding: 11px 16px; font-weight: 750; font-size: 13.5px; min-height: 44px; }
.pill.ghost { background: var(--soft); color: var(--ink); }
.pill svg { width: 16px; height: 16px; }

.shelf-h { display: flex; justify-content: space-between; align-items: baseline; padding: 26px 0 10px; }
.shelf-h h3 { font: 400 22px var(--serif); letter-spacing: -.5px; }
.shelf { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; margin-inline: -4px; padding-inline: 4px; }
.mini { flex: 0 0 136px; aspect-ratio: 3 / 4; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; scroll-snap-align: start; color: #FFF9F3; background: #191917; position: relative; overflow: hidden; max-width: 100%; }
.mini.month { background: #365C46; }
.tile.week .strip { max-width: 56%; }
.mini .ml { font: 750 15px/1.15 var(--sans); letter-spacing: -.2px; flex: 1; }
.mini .strip span { height: 4px; }
.fanstack { position: absolute; right: 18px; top: 22px; width: 96px; height: 132px; pointer-events: none; z-index: -1; }
.fanstack i { position: absolute; inset: 0; border-radius: 14px; transform-origin: 50% 115%; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: fanin .8s cubic-bezier(.2,.8,.2,1) both; }
.fanstack.month { width: 70px; height: 96px; right: 22px; top: 18px; }
.tile .meta, .tile h2, .tile .eb { position: relative; }
.mini .eb { font-size: 9px; font-weight: 750; letter-spacing: 1.4px; opacity: .85; }
.mini b { font: 400 21px/1.05 var(--serif); letter-spacing: -.5px; }
.mini small { font-size: 11px; opacity: .85; }
.foot-note { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 0 0; }

/* tab bar */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 472px); z-index: 20; padding: 8px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.tabs nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 6px; box-shadow: 0 10px 30px var(--shadow); }
.tabs button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0; min-height: 48px; border-radius: 100px; }
.tabs button[aria-current="page"] { color: var(--ink); }
.tabs button svg { width: 22px; height: 22px; }
.tabs .add { width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; margin: -22px 10px 0; box-shadow: 0 10px 24px rgba(190, 69, 47, .35); }
.tabs .add svg { width: 26px; height: 26px; }

/* sheets and toasts */
.scrim { position: fixed; inset: 0; background: rgba(25, 25, 23, .45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { width: min(100%, 472px); max-height: 88%; overflow: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 22px max(20px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)); animation: up .28s cubic-bezier(.2, .8, .2, 1); display: grid; gap: 14px; }
.sheet h2 { font: 400 32px/1.05 var(--serif); letter-spacing: -1px; }
.sheet .close { justify-self: end; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; margin-bottom: -48px; position: relative; z-index: 2; }
.sheet details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.sheet summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.sheet summary::after { content: "+"; color: var(--brand); font-weight: 700; }
.sheet details[open] summary::after { content: "–"; }
.sheet details p { color: var(--muted); padding-top: 8px; font-size: 14px; }
.info { background: var(--soft); border-radius: 18px; padding: 14px 16px; font-size: 14px; }
.copyrow { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; }
.copyrow code { font: 13px var(--mono); flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; }
.copyrow button { background: var(--soft); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; background: #282920; color: #FFF9F3; padding: 12px 16px; border-radius: 16px; font-size: 13.5px; width: max-content; max-width: min(92vw, 420px); box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: up .25s ease; }

/* add + receipts */
.page-h { padding: 6px 0 16px; display: grid; gap: 6px; }
.page-h h1 { font: 400 40px/1.02 var(--serif); letter-spacing: -1.5px; }
.bigadd { display: grid; place-items: center; gap: 12px; background: var(--brand); color: var(--on-brand); border-radius: 28px; padding: 34px 20px; width: 100%; position: relative; overflow: hidden; }
.bigadd .ring { width: 92px; height: 92px; border-radius: 50%; border: 3px solid rgba(255, 249, 243, .5); display: grid; place-items: center; animation: pulse 2.6s ease-in-out infinite; }
.bigadd .ring svg { width: 40px; height: 40px; }
.bigadd b { font-size: 18px; }
.addrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.addrow label, .addrow button { display: grid; gap: 4px; justify-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.addrow small { font-weight: 400; color: var(--muted); font-size: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.list { display: grid; gap: 8px; margin-top: 8px; }
.rrow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; text-align: left; width: 100%; }
.rrow .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--brand); }
.rrow b { display: block; font-size: 14px; }
.rrow span { font-size: 12px; color: var(--muted); }
.rrow .amt { font-weight: 750; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 100px; padding: 2px 8px; background: var(--sage); color: var(--green); }
.chip.warn { background: #FBE7C6; color: #7E5313; }
.scan { position: relative; border-radius: 20px; overflow: hidden; background: var(--soft); min-height: 180px; display: grid; place-items: center; }
.scan img { max-width: 100%; max-height: 260px; display: block; }
.scan::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--brand-bright); box-shadow: 0 0 18px var(--brand-bright); animation: scanline 1.6s ease-in-out infinite; }
.readout { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.readout .lines { font: 12.5px/1.6 var(--mono); display: grid; gap: 2px; }
.readout .lines div { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.bd { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.trivia { background: #191917; color: #FFF9F3; border-radius: 18px; padding: 14px 16px; font-size: 14px; }
.trivia b { color: #E9B42E; }

/* house */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 12px; }
.member { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 800; }
.role { font-size: 11px; font-weight: 750; border-radius: 100px; padding: 3px 9px; background: var(--sage); color: var(--green); }
.role.helper { background: #FBE7C6; color: #7E5313; }
.links { display: grid; }
.links button { display: flex; justify-content: space-between; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; text-align: left; min-height: 52px; }
.links button span { color: var(--brand); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; min-height: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 100px; padding: 9px 14px; font-weight: 650; font-size: 13.5px; min-height: 42px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.who { width: 100%; border-collapse: collapse; font-size: 13px; }
.who th, .who td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.who td:not(:first-child), .who th:not(:first-child) { text-align: center; }
.yes { color: var(--green); font-weight: 750; }
.never { color: var(--muted); }

/* onboarding */
.welcome { min-height: 100%; display: grid; gap: 22px; padding-block: 10px 40px; }
.welcome .hero { position: relative; overflow: hidden; border-radius: 30px; background: #191917; color: #FFF9F3; padding: 26px 22px 24px; min-height: 420px; display: flex; flex-direction: column; gap: 14px; isolation: isolate; }
.welcome .hero h1 { font: 400 clamp(42px, 12vw, 56px)/1 var(--serif); letter-spacing: -2px; }
.welcome .hero p { color: #E8DFD3; max-width: 30ch; }
.fan { position: relative; height: 170px; margin-top: auto; }
.fan i { position: absolute; bottom: 0; width: 92px; height: 140px; border-radius: 16px; left: 50%; transform-origin: 50% 120%; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: fanin .9s cubic-bezier(.2, .8, .2, 1) both; display: flex; align-items: flex-start; padding: 10px; font: 800 18px/1 var(--sans); }
.cta { display: grid; gap: 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 100px; padding: 15px 24px; font-weight: 750; font-size: 15px; min-height: 54px; width: 100%; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.secondary { background: var(--surface); border: 1px solid var(--line); }
.btn.link { color: var(--muted); font-weight: 600; min-height: 44px; }
.step { display: grid; gap: 18px; padding-block: 24px 40px; }
.step h1 { font: 400 40px/1.05 var(--serif); letter-spacing: -1.4px; }
.progress { display: flex; gap: 6px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress span.on { background: var(--brand); }
.sample { background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 13.5px; color: var(--muted); }

/* helper */
.helper-banner { background: #FBE7C6; color: #7E5313; border-radius: 14px; padding: 10px 14px; font-size: 12.5px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.helper-banner button { font-weight: 800; text-decoration: underline; }
.note { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; background: #FFF4D6; color: #282920; border-radius: 18px; padding: 14px; }
.note .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #7E5313; display: grid; place-items: center; }
.note.done { opacity: .55; }
.note.done .tick { background: #365C46; border-color: #365C46; color: #FFF9F3; }

@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(var(--x, 30px), var(--y, -20px)) scale(1.08); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes scanline { 0% { top: 4%; } 50% { top: 92%; } 100% { top: 4%; } }
@keyframes fanin { from { opacity: 0; translate: 0 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Story player: full-screen colour fields. Card colours are fixed per meaning (PRD 4.3) in both themes. */
.player { position: fixed; inset: 0; z-index: 50; background: #0E0F0C; display: flex; justify-content: center; animation: fade .2s ease; }
.stage { position: relative; width: min(100%, 520px); height: 100%; overflow: hidden; }
.card-v { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(64px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) calc(26px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); gap: 14px; isolation: isolate; overflow: hidden; }
.card-v .art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.card-v .art i { position: absolute; border-radius: 50%; animation: drift 7s ease-in-out infinite alternate; }
.card-v .art .ring { border: 1.5px solid rgba(255, 249, 243, .14); background: none !important; }
.p-top { position: absolute; top: 0; left: 0; right: 0; z-index: 9; padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); display: grid; gap: 10px; }
.bars { display: flex; gap: 4px; }
.bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.bars span i { display: block; height: 100%; width: 0; background: #FFF; }
.bars span.done i { width: 100%; }
.p-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.p-row .t { font-size: 11px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; opacity: .85; }
.p-row .btns { display: flex; gap: 8px; }
.p-row .btns button { width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .18); color: inherit; display: grid; place-items: center; }
.p-row .btns svg { width: 18px; height: 18px; }

.c-eb { font-size: 11px; font-weight: 750; letter-spacing: 1.8px; text-transform: uppercase; opacity: .82; }
.c-hero { font: 800 clamp(76px, 25vw, 120px)/.92 var(--sans); letter-spacing: -4px; font-variant-numeric: tabular-nums; }
.c-hero.mid { font-size: clamp(60px, 19vw, 96px); }
.c-hero small { font-size: .38em; letter-spacing: -1px; opacity: .75; font-weight: 700; }
.c-h { font: 750 clamp(34px, 10vw, 46px)/1.02 var(--sans); letter-spacing: -1.4px; text-wrap: balance; }
.c-h.serif { font: 400 clamp(52px, 16vw, 76px)/.98 var(--serif); letter-spacing: -2.5px; }
.c-h.cont { font-size: clamp(30px, 9vw, 40px); }
.c-b { font-size: 17px; line-height: 1.45; max-width: 34ch; opacity: .95; }
.c-b b { font-weight: 750; }
.c-foot { font-size: 18px; font-weight: 650; }
.c-note { font-size: 12.5px; opacity: .75; max-width: 36ch; }
.push { margin-top: auto; }
.c-acts { display: grid; gap: 10px; position: relative; z-index: 6; }
.c-acts button { min-height: 52px; border-radius: 100px; font-weight: 750; font-size: 15px; padding: 12px 18px; border: 1.5px solid currentColor; background: transparent; color: inherit; }
.c-acts button.p { background: #FFF9F3; color: #282920; border-color: #FFF9F3; }
.card-v.dark-text .c-acts button.p { background: #282920; color: #FFF9F3; border-color: #282920; }
.c-acts button.done { opacity: .6; }
.info-btn { position: absolute; z-index: 6; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 12px; font-weight: 750; padding: 8px 12px; border-radius: 100px; background: rgba(0, 0, 0, .18); color: inherit; }
.card-v.has-acts .info-btn { position: static; justify-self: start; align-self: flex-start; }
.card-v:not(.has-acts) { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

/* reveal animation */
.r { opacity: 0; transform: translateY(14px); animation: rin .6s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes rin { to { opacity: 1; transform: none; } }

/* visuals */
.receipt { background: #FFFDF8; color: #282920; font: 12.5px/1.6 var(--mono); padding: 14px 14px 18px; border-radius: 4px; display: grid; gap: 2px; position: relative; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: linear-gradient(-45deg, transparent 6px, #FFFDF8 0) 0 0 / 12px 8px repeat-x, linear-gradient(45deg, transparent 6px, #FFFDF8 0) 0 0 / 12px 8px repeat-x; }
.receipt div { display: flex; justify-content: space-between; gap: 10px; }
.receipt .t { border-top: 1px dashed #282920; margin-top: 6px; padding-top: 6px; font-weight: 800; }
.receipt div { animation: print .35s steps(4) both; animation-delay: var(--d, 0s); }
@keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.rank { display: grid; gap: 12px; }
.rank > div { display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 700; border-bottom: 1px solid rgba(40, 41, 32, .15); padding-bottom: 10px; }
.rank b { font: 400 40px/1 var(--serif); }
.rank span:last-child { font-variant-numeric: tabular-nums; }
.qty { display: grid; gap: 12px; }
.qty > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.qty b { font-size: 26px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.qty em { display: block; height: 10px; border-radius: 10px; background: currentColor; opacity: .85; width: 0; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.qty span { font-size: 14px; display: grid; gap: 6px; }
.cbar { display: flex; height: 16px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.15); }
.cbar i { display: block; height: 100%; width: 0; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.legend { display: grid; gap: 7px; font-size: 14px; }
.legend div { display: flex; gap: 10px; align-items: baseline; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; display: inline-block; transform: translateY(1px); }
.legend small { opacity: .8; }
.chipz { display: flex; flex-wrap: wrap; gap: 7px; }
.chipz span { font-size: 13px; font-weight: 650; padding: 7px 11px; border-radius: 100px; background: rgba(255, 255, 255, .14); transform: scale(.6); opacity: 0; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes pop { to { transform: none; opacity: 1; } }
.donut { width: min(64vw, 240px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-self: center; background: conic-gradient(#282920 calc(var(--p) * 1%), rgba(40, 41, 32, .18) 0); --p: 0; transition: --p 1.4s; animation: donut 1.6s cubic-bezier(.2, .8, .2, 1) forwards .3s; max-width: 100%; }
.donut div { width: 64%; aspect-ratio: 1; border-radius: 50%; background: #E9B42E; display: grid; place-items: center; font: 800 44px/1 var(--sans); letter-spacing: -2px; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes donut { to { --p: var(--to); } }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; max-width: 320px; }
.dots i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(255, 249, 243, .45); transform: scale(.4); opacity: 0; animation: pop .4s ease forwards; animation-delay: var(--d, 0s); }
.dots i.on { background: #E9B42E; border-color: #E9B42E; }
.duo { display: grid; gap: 10px; }
.duo > div { background: rgba(40, 41, 32, .1); border-radius: 18px; padding: 14px 16px; display: grid; gap: 4px; }
.duo b { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.duo span { font-size: 14px; opacity: .85; }
.card-v.light-panels .duo > div { background: rgba(255, 249, 243, .12); }
.winlist { display: grid; gap: 8px; font-size: 16px; }
.winlist div { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.winlist div::before { content: "✓"; font-weight: 800; color: #E9B42E; }

/* end card + share */
.endcard { overflow-y: auto; position: absolute; inset: 0; z-index: 8; background: #191917; color: #FFF9F3; display: flex; flex-direction: column; gap: 14px; padding: calc(70px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); animation: fade .3s ease; }
.endcard h2 { font: 400 clamp(48px, 15vw, 66px)/1 var(--serif); letter-spacing: -2px; }
.sharecard { width: auto; max-width: 100%; max-height: 44vh; object-fit: contain; align-self: center; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.35); display: block; }
.ev { display: grid; gap: 8px; }
.ev .rrow { cursor: default; }
.rate { display: grid; gap: 8px; }
.rate span { font-size: 14px; opacity: .85; }
.rate div { display: flex; gap: 8px; }
.rate button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 249, 243, .5); color: #FFF9F3; font-weight: 800; }
.rate button.on { background: #E9B42E; border-color: #E9B42E; color: #282920; }
/* v1.4: the next-shop note, the goal tag on the kitchen check, two buttons side by side, the miss-it question */
.nextshop { background: rgba(255, 249, 243, .14); border: 1px solid rgba(255, 249, 243, .28); border-radius: 18px; padding: 12px 16px; display: grid; gap: 6px; position: relative; z-index: 5; }
.card-v.dark-text .nextshop { background: rgba(40, 41, 32, .08); border-color: rgba(40, 41, 32, .22); }
.nextshop .ns-h { font-size: 11px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; opacity: .85; }
.nextshop ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.nextshop li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 15.5px; line-height: 1.35; font-weight: 650; }
.nextshop li::before { content: "→"; font-weight: 800; opacity: .8; }
.card-v .nextshop + .c-ctx, .card-v.has-acts .nextshop { margin-top: 2px; }
.c-acts.two { grid-template-columns: 1fr 1fr; }
.c-acts.two button { font-size: 14px; padding: 10px 12px; min-height: 50px; line-height: 1.2; }
.hrows .gtag { display: inline-block; margin-left: 8px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; background: #282920; color: #FFF9F3; vertical-align: 2px; }
.hrows .is-goal .hl { font-weight: 800; }
.rate.miss div { flex-wrap: wrap; }
.rate.miss button { width: auto; height: auto; min-height: 44px; border-radius: 100px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; }
@media (max-height: 700px) { .card-v.dense .nextshop li { font-size: 14px; } .card-v.dense .c-b { font-size: 15px; } .card-v.dense .c-h { font-size: clamp(28px, 8.4vw, 38px); } }

/* v0.2: landing, set-up, home between stories, scanning, instant insights, health card, punch lines.
   Same house as getdoof.app: the tokens in styles.css; bucket and tone colours below. */
:root {
  --real: #3F8F5C; --helperc: #C9931A; --factory: #D9543A; --unsorted: #B8B0A3;
  --tone-catch: #BE452F; --tone-good: #365C46; --tone-ask: #8A5A0F; --tone-info: #716A60;
  --paper: #FFFDF8; --paper-ink: #282920; --wide: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --real: #7FD39E; --helperc: #F2C14E; --factory: #F38866; --unsorted: #8E887C; --tone-catch: #FFA48B; --tone-good: #B6D5B4; --tone-ask: #F2C14E; --tone-info: #C4BDAD; }
}
:root[data-theme="dark"] { --real: #7FD39E; --helperc: #F2C14E; --factory: #F38866; --unsorted: #8E887C; --tone-catch: #FFA48B; --tone-good: #B6D5B4; --tone-ask: #F2C14E; --tone-info: #C4BDAD; }

body[data-stage="landing"] .app { max-width: var(--wide); padding-bottom: 40px; }
.bd.real { background: var(--real); } .bd.helper { background: var(--helperc); } .bd.factory { background: var(--factory); } .bd.unsorted, .bd.non_food, .bd.baby { background: var(--unsorted); }
.center { text-align: center; }
.label { font-size: 12px; font-weight: 750; color: var(--muted); letter-spacing: .4px; }

/* ---------- landing */
.landing { display: grid; gap: 56px; }
.l-top { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.l-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.l-hero { display: grid; gap: 28px; align-items: center; }
.l-copy { display: grid; gap: 18px; min-width: 0; }
.l-copy h1 { font: 400 clamp(46px, 12.5vw, 84px)/.96 var(--serif); letter-spacing: -2.5px; }
.l-sub { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 34ch; }
.l-cta { display: grid; gap: 10px; max-width: 380px; }
.btn.secondary svg { width: 16px; height: 16px; }
.l-micro { font-size: 12.5px; color: var(--muted); }
.l-phone { margin: 0; display: grid; justify-items: center; gap: 12px; }
.l-screen { position: relative; width: min(300px, 100%); aspect-ratio: 390 / 693; border-radius: 38px; overflow: hidden; background: #191917; box-shadow: 0 30px 70px var(--shadow), 0 0 0 9px var(--ink); display: block; padding: 0; max-width: 100%; }
.l-stage { position: absolute; left: 0; top: 0; width: 390px; height: 693px; transform-origin: 0 0; transform: scale(var(--ls, .769)); }
.l-stage .card-v { padding-top: 48px; }
.l-phone figcaption { display: grid; justify-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.l-dots { display: flex; gap: 5px; }
.l-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.l-dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }
.l-how h2, .l-end h2 { font: 400 clamp(30px, 8vw, 44px)/1.05 var(--serif); letter-spacing: -1.2px; }
.l-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.l-steps li { counter-increment: s; display: grid; gap: 4px; padding: 18px 18px 18px 64px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; min-width: 0; }
.l-steps li::before { content: counter(s); position: absolute; left: 18px; top: 14px; font: 400 34px/1 var(--serif); color: var(--brand); }
.l-steps b { font-size: 17px; }
.l-steps span { color: var(--muted); }
.l-ins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ins-chip { font-size: 12.5px; font-weight: 700; border-radius: 100px; padding: 6px 11px; background: var(--soft); color: var(--tone-info); }
.ins-chip.tone-catch { color: var(--tone-catch); } .ins-chip.tone-good { color: var(--tone-good); } .ins-chip.tone-ask { color: var(--tone-ask); }
.l-trust { display: grid; gap: 1px; background: var(--line); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.l-trust div { background: var(--bg); padding: 18px; display: grid; gap: 4px; }
.l-trust span { color: var(--muted); font-size: 14px; }
.l-end { display: grid; gap: 14px; max-width: 520px; }
.l-end .btn { max-width: 380px; }
.l-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 18px; font-size: 12.5px; color: var(--muted); }
@media (min-width: 860px) {
  .l-hero { grid-template-columns: 1.15fr .85fr; gap: 48px; padding-top: 24px; }
  .l-screen { width: 330px; }
  .l-stage { --ls: .846; }
  .l-steps { grid-template-columns: repeat(3, 1fr); }
  .l-trust { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- onboarding */
.ob-top { display: flex; justify-content: space-between; align-items: baseline; }
.stepper { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sp { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 100px; padding: 4px; }
.sp button { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.sp button:disabled { opacity: .35; cursor: default; }
.sp svg { width: 16px; height: 16px; }
.sp output { min-width: 28px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.desi-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.desi-row > span { display: grid; gap: 2px; }
.switch { width: 54px; height: 32px; border-radius: 32px; background: var(--line); position: relative; flex: 0 0 auto; transition: background .2s; }
.switch i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px var(--shadow); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.punch-demo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.punch-demo.off { opacity: .4; text-decoration: line-through; }
.punch-demo small { color: var(--muted); font-size: 12px; }
.punch-demo span, .punch-line span { font: italic 600 17px/1.2 var(--serif); color: var(--brand); background: var(--soft); padding: 6px 12px; border-radius: 12px; display: inline-block; transform: rotate(-1.2deg); }
.punch-line { margin-top: 6px; }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: h; }
.howto li { counter-increment: h; display: grid; gap: 3px; padding-left: 44px; position: relative; }
.howto li::before { content: counter(h); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.howto span { color: var(--muted); font-size: 14px; }
.install .seg { justify-self: start; }

/* ---------- app shell */
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); padding: 4px 0; }
.demo-bar b { color: var(--brand); letter-spacing: 1.2px; font-size: 10px; margin-right: 4px; }
.demo-bar button { font-weight: 750; color: var(--ink); background: var(--soft); border-radius: 100px; padding: 6px 12px; min-height: 34px; font-size: 12px; }
.hname { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.tcol { display: grid; gap: 10px; flex: 1; min-width: 0; }
.tile h2.m { font-size: 34px; }

/* ---------- the story being built */
.building { background: #191917; color: #FFF9F3; border-radius: 26px; padding: 18px 18px 16px; display: grid; gap: 12px; }
.b-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.eyebrow.light { color: #F38866; }
.b-when { font: 400 22px var(--serif); }
.ghosts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ghosts i { aspect-ratio: 3 / 4; border-radius: 8px; border: 1.5px dashed rgba(255, 249, 243, .28); max-width: 100%; }
.ghosts i.on { border: 0; background: linear-gradient(160deg, #E9B42E, #BE452F); animation: pop .4s ease both; }
.ghosts i.on:nth-child(2n) { background: linear-gradient(160deg, #365C46, #A4C94F); }
.ghosts i.on:nth-child(3n) { background: linear-gradient(160deg, #1C2948, #3069A6); }
.building p { font-size: 14px; color: #E8DFD3; }
.building p b { color: #FFF9F3; }
.pill.light { background: #FFF9F3; color: #282920; justify-self: start; }

/* ---------- week so far */
.sofar2 { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; display: grid; gap: 8px; }
.sf-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sf-hero b { font: 800 44px/1 var(--sans); letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.chip.more { background: #FBE2D9; color: #9E2D1E; } .chip.less { background: var(--sage); color: var(--green); } .chip.same, .chip.learning { background: var(--soft); color: var(--muted); }
.sofar2 ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14.5px; }
.sofar2 li::before { content: "·"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.addcard { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--brand); color: var(--on-brand); border-radius: 22px; padding: 16px 18px; text-align: left; width: 100%; }
.addcard .ring { width: 54px; height: 54px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--on-brand) 45%, transparent); display: grid; place-items: center; }
.addcard .ring svg { width: 26px; height: 26px; }
.addcard b { display: block; font-size: 16px; }
.addcard .small { opacity: .85; }
.rmid { display: grid; gap: 2px; min-width: 0; }
.rins { font-size: 12.5px !important; font-weight: 700; color: var(--tone-info) !important; }
.rins.tone-catch { color: var(--tone-catch) !important; } .rins.tone-good { color: var(--tone-good) !important; } .rins.tone-ask { color: var(--tone-ask) !important; }
.checklist .ck { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.checklist .ck.ok .tick { background: var(--green); border-color: var(--green); color: var(--bg); }
.checklist .ck.ok span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.linkbtn { color: var(--brand); font-weight: 750; font-size: 13px; padding: 6px 4px; }
.row-sb { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tablewrap { overflow-x: auto; }

/* ---------- add: sample receipts as paper */
.papers { display: grid; gap: 10px; margin-top: 10px; }
.ptile { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; text-align: left; width: 100%; }
.pt-paper { background: var(--paper); color: var(--paper-ink); font: 7.5px/1.45 var(--mono); padding: 8px 7px; border-radius: 4px; display: grid; gap: 1px; height: 104px; overflow: hidden; box-shadow: 0 3px 10px var(--shadow); transform: rotate(-2deg); }
.pt-paper b { font-size: 8px; text-align: center; }
.pt-paper i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-meta { display: grid; gap: 3px; min-width: 0; }
.pt-meta > span { font-size: 12.5px; color: var(--muted); }
.pt-cta { display: inline-flex !important; align-items: center; gap: 6px; justify-self: start; margin-top: 4px; font-weight: 750; color: var(--on-brand) !important; background: var(--brand); border-radius: 100px; padding: 6px 12px; font-size: 12.5px !important; }
.ptile.done .pt-cta { background: var(--sage); color: var(--green) !important; }
.ptile.done .pt-paper { opacity: .7; }

/* ---------- scanner */
.scanner { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; animation: fade .2s ease; padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px)); }
.sc-top { width: min(100%, 472px); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; }
.sc-top .close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; }
.sc-body { width: min(100%, 472px); margin: 0 auto; flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding-bottom: 24px; }
.paper { position: relative; background: var(--paper); color: var(--paper-ink); font: 12.5px/1.5 var(--mono); padding: 18px 16px 22px; border-radius: 4px; box-shadow: 0 16px 40px var(--shadow); display: grid; gap: 3px; overflow: hidden; }
.paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(-45deg, var(--bg) 6px, transparent 0) 0 0 / 12px 8px repeat-x, linear-gradient(45deg, var(--bg) 6px, transparent 0) 0 0 / 12px 8px repeat-x; }
.pp-head { display: grid; justify-items: center; gap: 1px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--paper-ink); }
.pp-head b { font-size: 15px; letter-spacing: 1px; }
.pl { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 2px 4px; border-radius: 4px; transition: background .3s; }
.pl .pn { min-width: 0; overflow-wrap: anywhere; }
.pl em { font-style: normal; opacity: .65; }
.pl .pa { font-variant-numeric: tabular-nums; }
.pl .read { grid-column: 1 / -1; display: none; align-items: center; gap: 7px; font: 700 12.5px/1.4 var(--sans); color: #365C46; }
.pl.done { background: rgba(164, 201, 79, .16); }
.pl.done .read { display: flex; animation: rin .35s ease both; }
.pp-total { display: flex; justify-content: space-between; border-top: 1px dashed var(--paper-ink); margin-top: 6px; padding-top: 6px; font-weight: 800; }
.beam { position: absolute; left: 0; right: 0; height: 46px; top: -46px; background: linear-gradient(to bottom, transparent, rgba(229, 93, 63, .22) 70%, #E55D3F); pointer-events: none; opacity: 0; }
.paper.scanning .beam { opacity: 1; animation: beam 2.4s linear infinite; }
@keyframes beam { from { top: -46px; } to { top: 100%; } }
.sc-status { text-align: center; font-weight: 700; color: var(--muted); font-size: 14px; }

/* ---------- result + instant insights */
.result { display: grid; gap: 14px; animation: up .3s ease; }
.res-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.res-head > span { display: grid; gap: 2px; min-width: 0; }
.res-head h2 { font: 400 36px/1 var(--serif); letter-spacing: -1px; }
.res-total { font: 800 26px var(--sans); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.cbar2 { display: flex; height: 12px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.cbar2 i { display: block; height: 100%; }
.cbar2 .real { background: var(--real); } .cbar2 .helper { background: var(--helperc); } .cbar2 .factory { background: var(--factory); } .cbar2 .unsorted { background: var(--unsorted); }
.legend2 { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.res-h { font: 400 22px var(--serif); letter-spacing: -.4px; padding-top: 4px; }
.ins-list { display: grid; gap: 10px; }
.ins { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tone-info); border-radius: 16px; padding: 13px 15px; display: grid; gap: 3px; opacity: 0; animation: rin .5s ease forwards; animation-delay: var(--d, 0s); }
.ins.tone-catch { border-left-color: var(--tone-catch); } .ins.tone-good { border-left-color: var(--tone-good); } .ins.tone-ask { border-left-color: var(--tone-ask); }
.ins b { font-size: 16px; }
.ins > span { color: var(--muted); font-size: 14px; }
.lines-d summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
.lines-d .lines { font: 12.5px/1.6 var(--mono); display: grid; gap: 2px; padding-top: 6px; }
.lines-d .lines div { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.res-acts { display: grid; gap: 10px; }

/* ---------- demo steps sheet */
.dsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dsteps li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dsteps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--muted); }
.dsteps li.now .n { background: var(--brand); color: var(--on-brand); }
.dsteps li.past .n { background: var(--green); color: var(--bg); }
.dsteps .t { display: grid; gap: 2px; min-width: 0; }
.dsteps .t span { font-size: 12.5px; color: var(--muted); }
.dsteps .pill { min-height: 38px; padding: 8px 12px; font-size: 12.5px; }
.sheet .btn.secondary { flex-wrap: wrap; text-align: center; }

/* ---------- Friday nudge (in-app stand-in for the lock-screen notification) */
.nudge { position: fixed; z-index: 70; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: min(92vw, 420px); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; box-shadow: 0 18px 40px var(--shadow); animation: drop .45s cubic-bezier(.2, .8, .2, 1); }
.nudge .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; }
.nudge b { display: block; font-size: 13px; }
.nudge span span { font-size: 13.5px; }
.nowtag { font-size: 11px; color: var(--muted); }
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } }

/* ---------- player: punch lines, health signal */
.c-punch span { display: inline-block; font: italic 600 clamp(19px, 5.4vw, 23px)/1.2 var(--serif); padding: 7px 14px; border-radius: 14px; background: rgba(255, 249, 243, .16); transform: rotate(-1.6deg); }
.card-v.dark-text .c-punch span { background: rgba(40, 41, 32, .1); }
.c-ctx { font-size: 13px; line-height: 1.4; opacity: .85; max-width: 40ch; padding-top: 8px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 25%, transparent); }
.hrows { display: grid; gap: 0; }
.hrows > div { display: grid; grid-template-columns: 1fr auto 26px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(40, 41, 32, .14); }
.hrows .hl { font-size: 14px; font-weight: 650; }
.hrows .hv { display: grid; justify-items: end; text-align: right; }
.hrows .hv b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hrows .hv small { font-size: 11.5px; opacity: .7; }
.hrows .ha { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.hrows .watch .ha { background: #BE452F; color: #FFF9F3; }
.hrows .good .ha { background: #365C46; color: #FFF9F3; }
.hrows .neutral .ha { background: rgba(40, 41, 32, .1); }
.hrows .ha:empty { visibility: hidden; }
.card-v.dense { gap: 10px; }
.card-v.dense .c-h { font-size: clamp(27px, 7.6vw, 36px); }
.card-v.dense .c-b { font-size: 15px; }
.card-v.dense .c-acts button { min-height: 46px; padding: 10px 16px; }
.share-img { border-radius: 18px; border: 1px solid var(--line); }
@media (max-height: 700px) { .card-v.dense .hrows > div { padding: 5px 0; } .card-v.dense .c-ctx { display: none; } }
/* the landing's mini player: fixed type sizes (the stage is 390 px wide whatever the window) */
.l-screen { text-align: left; color: inherit; }
.l-stage .c-hero { font-size: 104px; }
.l-stage .c-hero.mid { font-size: 84px; }
.l-stage .c-h { font-size: 40px; }
.l-stage .c-h.serif { font-size: 66px; }
.l-stage .c-h.cont { font-size: 36px; }
.l-stage .card-v.dense .c-h { font-size: 33px; }
.l-stage .c-punch span { font-size: 21px; }
.l-stage .info-btn { display: none; }

/* ---------- live build: reading, review, data, dashboard */
.l-invite { font-size: 14px; max-width: 46ch; }
.demo-bar.warn { background: #FBE7C6; color: #7E5313; border-radius: 12px; padding: 8px 12px; }
.demo-bar.warn b { color: #7E5313; }
.info.warn { background: #FBE7C6; color: #5A3A09; }
.btn.danger, .btn.link.danger { color: #BE452F; }
.btn.danger-bg { background: #BE452F; color: #FFF9F3; }
.btn.typein { margin-top: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.inrow { display: flex; gap: 8px; }
.inrow input { flex: 1; min-width: 0; }
.res-acts.two { grid-template-columns: 1fr 1fr; }
.res-acts .muted.small { align-self: center; }
.reading { display: grid; gap: 14px; justify-items: center; padding-top: 10px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.thumbs img, .pdfthumb { width: 84px; height: 112px; object-fit: cover; border-radius: 10px; box-shadow: 0 6px 18px var(--shadow); background: var(--soft); }
.pdfthumb { display: grid; place-items: center; color: var(--muted); }
.pdfthumb svg { width: 32px; height: 32px; }
.rd-status { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.review { display: grid; gap: 14px; }
.review h2 { font: 400 32px/1.05 var(--serif); letter-spacing: -1px; }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-grid .field input, .rv-total input { width: 100%; min-width: 0; }
.rv-lines { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.rv-h { display: flex; justify-content: space-between; padding: 0 2px 4px; }
.rv-line { display: grid; grid-template-columns: 1fr 86px 34px; gap: 6px; align-items: center; }
.rv-name { display: grid; gap: 2px; min-width: 0; }
.rv-line input { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; min-height: 40px; min-width: 0; width: 100%; font-size: 14px; }
.rv-line .rv-amt { text-align: right; font-variant-numeric: tabular-nums; }
.rv-name small { font: 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.rv-del { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); font-size: 18px; line-height: 1; color: var(--muted); }
.rv-check { display: flex; gap: 8px; align-items: flex-start; border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.rv-check svg { flex: 0 0 auto; margin-top: 2px; }
.rv-check.ok { background: var(--sage); color: var(--green); }
.rv-check.warn { background: #FBE7C6; color: #5A3A09; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 2px; }
.kpis b { font: 800 26px var(--sans); font-variant-numeric: tabular-nums; }
.kpis span { font-size: 12px; color: var(--muted); }
.who.dash td, .who.dash th { text-align: left !important; }
.wrongbox { display: grid; gap: 8px; }
.wrongbox textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; font: inherit; color: inherit; width: 100%; }
.card .btn.secondary { justify-self: start; width: auto; }
.card a.btn { text-decoration: none; color: inherit; }
label.btn { cursor: pointer; }
.stack > *, .card > *, .res-acts > * { min-width: 0; }
.card .field input { width: 100%; }
/* v1.4: kitchen-check dots on receipts, the receipt's three signals, the house goal chips, the gate tiles */
.bd.fresh { background: var(--real); } .bd.refined { background: var(--helperc); } .bd.sweets { background: var(--factory); } .bd.other, .bd.none { background: var(--unsorted); }
.sig3 { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.sig3 span { display: inline-flex; align-items: center; gap: 6px; }
.sig3 b { color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.chips.goal { margin-top: 2px; }
.gates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gate { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 2px; border-left-width: 4px; }
.gate.pass { border-left-color: var(--real); } .gate.fail { border-left-color: var(--factory); }
.gate .g-l { font-size: 11px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.gate b { font: 800 24px var(--sans); font-variant-numeric: tabular-nums; }
.gate .g-s { font-size: 12px; color: var(--muted); line-height: 1.35; }
code.pre { white-space: pre-wrap; }

/* ---------------------------------------------------------------- v1.2 production (stories.getdoof.app) */
.btn.google { background: #FFFFFF; color: #1F1F1F; border: 1px solid #DADCE0; }
.btn.google svg { width: 18px; height: 18px; flex: none; }
:root[data-theme="dark"] .btn.google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.google { background: #131314; color: #E3E3E3; border-color: #8E918F; } }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 18px; padding: 14px 16px; font-size: 14px; margin: 4px 0 2px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.consent a { color: var(--brand); font-weight: 700; }
.card.push .btn, .card .btn + .muted { margin-top: 2px; }
.card .linkbtn { justify-self: start; }
.rrow.mem { cursor: default; }
.rrow.mem .pill { flex: none; }
.l-foot a { color: inherit; text-decoration: underline; }
.who.dash td:first-child, .who.dash th:first-child { min-width: 150px; }
