/* baba investor deck. One screen, never scrolls: header / stage / footer in 100dvh. */

@font-face { font-family: "Inter"; src: url("/assets/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Frank Ruhl Libre"; src: url("/assets/FrankRuhlLibre-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Frank Ruhl Libre"; src: url("/assets/FrankRuhlLibre-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --cream: #FAF7F2; --paper: #FFFDF9; --sand: #F4EFE6; --border: #E6DCC9;
  --ink: #1F1B16; --muted: #5E544A; --verm: #C9552F; --verm-text: #A2421F; --clay: #C77850; --clay-deep: #6B3E2A;
  --on-dark: #FAF7F2; --on-dark-muted: #D8CCBE; --peach: #F3C3A2; --live: #2F7D4A;
  --serif: "Frank Ruhl Libre", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1); --bar-h: 60px; --top-h: 60px; --pad: clamp(16px, 4vw, 56px);
  color-scheme: light;
}
@media (max-height: 520px) { :root { --bar-h: 50px; --top-h: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: var(--cream); color: var(--ink); font: 400 1rem/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--verm-text); outline-offset: 3px; border-radius: 8px; }
.theme-dark :focus-visible, .theme-clay :focus-visible { outline-color: var(--on-dark); }

.deck { height: 100vh; height: 100dvh; display: grid; grid-template-rows: var(--top-h) minmax(0, 1fr) var(--bar-h); overflow: hidden; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--on-dark); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; }

/* Header */
.bar.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 var(--pad); padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--border); min-width: 0; }
.brand { display: flex; align-items: center; min-height: 44px; flex: none; }
.brand img { width: clamp(68px, 9vw, 86px); }
.top-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.route-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; transition: color 180ms var(--ease), background-color 180ms var(--ease); }
.route-link:hover { color: var(--ink); background: var(--sand); }
.chat-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-dark); font-weight: 600; font-size: 0.9375rem; cursor: pointer; white-space: nowrap; transition: background-color 180ms var(--ease), transform 120ms var(--ease); }
.chat-btn:hover { background: #3A322A; }
.chat-btn:active, .btn:active, .choice:active, .nav-btn:active { transform: scale(0.98); }
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: #5BC27E; box-shadow: 0 0 0 3px rgba(91, 194, 126, 0.25); }
.chat-tag { padding: 4px 10px; border-radius: 999px; background: var(--verm); color: #fff; font-size: 0.75rem; letter-spacing: 0.04em; }
.chat-short { display: none; }
@media (max-width: 520px) { .chat-long { display: none; } .chat-short { display: inline; } .chat-btn { padding-left: 14px; gap: 8px; } }
@media (max-width: 380px) { .chat-tag { display: none; } .route-link { padding: 0 8px; } }

/* Stage and slides */
.stage { position: relative; overflow: hidden; container: stage / size; outline: none; touch-action: pan-y pinch-zoom; }
.slide { position: absolute; inset: 0; display: flex; padding: clamp(12px, 3.2cqh, 40px) var(--pad); overflow: hidden; }
.slide-inner {
  --gap: clamp(10px, 2.6cqh, 28px); --title: clamp(1.55rem, min(4.8cqw, 8.4cqh), 3.75rem); --display: clamp(2rem, min(7.6cqw, 12.5cqh), 6rem);
  --lede: clamp(1rem, min(1.9cqw, 3.2cqh), 1.4rem); --body: clamp(0.95rem, min(1.5cqw, 2.6cqh), 1.0625rem);
  width: min(100%, 1200px); margin: auto; max-height: 100%; display: flex; flex-direction: column; gap: var(--gap); font-size: var(--body); min-height: 0;
}
.slide.enter-next { animation: enter-next 350ms var(--ease) both; }
.slide.enter-prev { animation: enter-prev 350ms var(--ease) both; }
@keyframes enter-next { from { opacity: 0; transform: translateX(18px); } }
@keyframes enter-prev { from { opacity: 0; transform: translateX(-18px); } }
.theme-dark, .theme-clay { color: var(--on-dark); inset: 0 clamp(0px, 1.4cqw, 20px) clamp(0px, 1.4cqh, 14px); border-radius: clamp(0px, 2.4cqw, 28px); }
.theme-dark { background: var(--ink); }
.theme-clay { background: var(--clay-deep); }
@container stage (max-width: 600px) { .theme-dark, .theme-clay { inset: 0; border-radius: 0; } }

/* Type */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: none; color: var(--verm-text); }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.theme-dark .eyebrow, .theme-clay .eyebrow { color: #EDB08E; }
.s-title { font: 700 var(--title)/1.04 var(--serif); letter-spacing: -0.015em; outline: none; max-width: 24ch; }
.s-title em { font-style: normal; color: var(--verm); }
.theme-dark .s-title em, .theme-clay .s-title em { color: var(--peach); }
.kind-statement .s-title { font-size: calc(var(--title) * 1.12); max-width: 22ch; }
.kind-welcome .s-title, .big .s-title { font-size: var(--display); line-height: 0.98; letter-spacing: -0.02em; max-width: 20ch; }
.kind-principle .s-title { max-width: 30ch; }
.lede { font-size: var(--lede); line-height: 1.45; color: var(--muted); max-width: 46ch; }
.theme-dark .lede, .theme-clay .lede, .theme-dark .note, .theme-clay .note { color: var(--on-dark-muted); }
.note, .foot { color: var(--muted); max-width: 70ch; }
.note a, .foot a, .text-link { color: var(--verm-text); font-weight: 600; text-underline-offset: 4px; }
.theme-dark .note a, .theme-clay .note a { color: var(--on-dark); }
.col { display: flex; flex-direction: column; gap: calc(var(--gap) * 0.7); min-width: 0; }
.split { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }

/* Chips, buttons, links */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--border); color: var(--ink); font: 600 0.8125rem/1 var(--sans); white-space: nowrap; vertical-align: middle; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.chip.beta::before { background: var(--verm); }
.chip.plain::before { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
.btn.primary { background: var(--ink); color: var(--on-dark); }
.btn.ghost { background: var(--paper); border-color: var(--border); color: var(--ink); }
.btn.ghost:hover { border-color: var(--verm); }
.theme-dark .btn.primary, .theme-clay .btn.primary { background: var(--on-dark); color: var(--ink); }
.theme-dark .btn.ghost, .theme-clay .btn.ghost { background: transparent; border-color: rgba(250, 247, 242, 0.45); color: var(--on-dark); }
.col > .btn { align-self: flex-start; }
.arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.link-chips, .card-links { display: flex; flex-wrap: wrap; gap: 6px; }
.link-chips a, .card-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--paper); font-weight: 600; font-size: 0.9375rem; text-decoration: none; transition: border-color 180ms var(--ease); }
.link-chips a:hover, .card-links a:hover { border-color: var(--verm); }
.theme-dark .card-links a, .theme-clay .card-links a, .theme-dark .link-chips a, .theme-clay .link-chips a { background: transparent; border-color: rgba(250, 247, 242, 0.32); color: var(--on-dark); }
.app-icon { width: 40px; height: 40px; border-radius: 10px; flex: none; box-shadow: 0 1px 4px rgba(31, 27, 22, 0.14); }

/* Cards and grids */
.grid { display: grid; gap: calc(var(--gap) * 0.7); grid-template-columns: minmax(0, 1fr); }
.card { display: flex; flex-direction: column; gap: 8px; padding: clamp(14px, 2.4cqh, 26px); border-radius: 20px; background: var(--paper); border: 1px solid var(--border); min-width: 0; }
.card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font: 600 1.125rem/1.3 var(--sans); }
.theme-dark .card, .theme-clay .card { background: rgba(250, 247, 242, 0.07); border-color: rgba(250, 247, 242, 0.18); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-name { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.125rem; }
.card-job { font: 400 clamp(1.2rem, min(2.1cqw, 3.4cqh), 1.6rem)/1.2 var(--serif); }
.card-text { color: var(--muted); }
.theme-dark .card-text, .theme-clay .card-text { color: var(--on-dark-muted); }
.kicker { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: none; color: var(--verm-text); }
.theme-clay .kicker, .theme-dark .kicker { color: #EDB08E; }
.product-card .text-link { display: inline-flex; align-items: center; min-height: 40px; }
.needs .card { flex-direction: row; align-items: center; gap: 14px; }
.icon-row { display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 600; }
.icon-row li { display: flex; align-items: center; gap: 10px; }
.facts { display: grid; gap: calc(var(--gap) * 0.6) 32px; grid-template-columns: minmax(0, 1fr); }
.facts dt, .defs dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: none; color: var(--verm-text); }
.facts dd { margin-top: 2px; max-width: 56ch; }
.defs { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
.defs > div { padding-top: calc(var(--gap) * 0.6); border-top: 1px solid var(--border); }
.defs dd { margin-top: 4px; color: var(--muted); max-width: 60ch; }
.bullets { display: grid; gap: 6px; }
.bullets li { position: relative; padding-left: 24px; }
.bullets li::before { content: ""; position: absolute; left: 3px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--verm); }
.bullets strong, .lines strong { font-weight: 600; }
.mini { display: flex; gap: 32px; }
.mini dt { font: 700 clamp(2.2rem, min(5cqw, 8cqh), 3.75rem)/1 var(--serif); }
.mini dd { color: var(--muted); font-weight: 600; }

/* Stats */
.stats { display: grid; gap: 1px; grid-template-columns: minmax(0, 1fr); border-radius: 20px; overflow: hidden; background: var(--border); }
.stats li { display: grid; grid-template-columns: minmax(6.2ch, auto) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: clamp(12px, 2.4cqh, 32px) clamp(16px, 2.4cqw, 32px); background: var(--paper); }
.theme-dark .stats { background: rgba(250, 247, 242, 0.16); }
.theme-dark .stats li { background: var(--ink); }
.stat-num { grid-row: 1 / 3; font: 700 clamp(2.1rem, min(5.6cqw, 9.5cqh), 5rem)/1 var(--serif); letter-spacing: -0.02em; }
.stat-label { font-weight: 600; }
.stat-detail { color: var(--muted); font-size: 0.9375rem; }
.theme-dark .stat-detail { color: var(--on-dark-muted); }

/* Lines, steps, directory */
.lines { border-top: 1px solid var(--border); }
.lines li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: clamp(10px, 2cqh, 18px) 0; border-bottom: 1px solid var(--border); font-size: 1.0625rem; }
.lines span { color: var(--muted); }
.steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 24px; align-items: baseline; padding: clamp(10px, 2.2cqh, 24px) 0; border-top: 1px solid var(--border); }
.step-num { font: 700 clamp(2rem, min(4.6cqw, 8cqh), 3.75rem)/1 var(--serif); color: var(--verm); min-width: 2ch; }
.steps h3 { font: 600 clamp(1.1rem, min(2cqw, 3.4cqh), 1.5rem)/1.3 var(--sans); }
.steps p { color: var(--muted); }
.directory { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.directory li > * { display: flex; flex-direction: column; gap: 2px; height: 100%; min-height: 44px; padding: clamp(10px, 2cqh, 18px) 18px; background: var(--cream); text-decoration: none; }
.directory a:hover { background: var(--paper); }
.directory a strong { color: var(--clay-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.directory span { color: var(--muted); font-size: 0.9375rem; }

/* Media: whole screenshot, contained, never cropped */
.media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 0; }
.media figcaption { font-size: 0.875rem; color: var(--muted); text-align: center; }
.frame.phone { border: 5px solid var(--ink); border-radius: 26px; overflow: hidden; background: var(--ink); box-shadow: 0 20px 50px rgba(31, 27, 22, 0.18); }
.frame.phone img { width: auto; max-height: 30cqh; object-fit: contain; border-radius: 21px; }
.frame.browser { border-radius: 14px; overflow: hidden; background: #26221E; border: 1px solid #3A332C; box-shadow: 0 20px 50px rgba(31, 27, 22, 0.18); max-width: 100%; }
.frame.browser img { width: auto; max-height: 30cqh; object-fit: contain; }
.browser-bar { display: flex; gap: 6px; align-items: center; height: 22px; padding: 0 12px; background: #322C26; }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: #5E544A; }

/* Allocation */
.alloc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.alloc-head .eyebrow { flex-basis: 100%; }
.alloc-total { font-size: var(--display); max-width: none; }
.alloc-bar { display: flex; gap: 3px; height: clamp(14px, 4cqh, 44px); border-radius: 10px; overflow: hidden; flex: none; }
.alloc-bar span { flex-basis: 0; min-width: 5px; }
.a1 { background: var(--verm); } .a2 { background: #E9A27E; } .a3 { background: #F6D6C2; } .a4 { background: #FAF7F2; } .a5 { background: #9C6446; }
.a6 { background: repeating-linear-gradient(135deg, rgba(250, 247, 242, 0.55) 0 2px, transparent 2px 8px), #4A3A2E; }
.alloc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.alloc-table th, .alloc-table td { padding: clamp(6px, 1.5cqh, 13px) 0; border-top: 1px solid rgba(250, 247, 242, 0.16); text-align: left; vertical-align: top; }
.alloc-table th { font-weight: 400; padding-right: 12px; }
.alloc-table tbody th { display: flex; gap: 12px; }
.alloc-table td { text-align: right; white-space: nowrap; font-weight: 600; }
.alloc-table td.pct { width: 3.6rem; color: var(--on-dark-muted); font-weight: 400; }
.alloc-table tfoot th, .alloc-table tfoot td { font-weight: 600; color: var(--on-dark); border-top: 2px solid rgba(250, 247, 242, 0.5); }
.swatch { flex: none; width: 12px; height: 12px; margin-top: 0.35em; border-radius: 3px; }
.swatch.a6 { outline: 1px solid var(--on-dark-muted); }
.alloc-what { display: none; font-size: 0.875rem; color: var(--on-dark-muted); }
.amt-short { display: none; }

/* Apps and badges */
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badges a { display: inline-flex; border-radius: 9px; }
.badges img { height: 42px; width: auto; }

/* Talk */
.talk .col { gap: var(--gap); }
.person { display: flex; flex-direction: column; }
.person-name { font: 700 clamp(1.5rem, min(3cqw, 5cqh), 2.25rem)/1.1 var(--serif); }
.person-role { color: var(--on-dark-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Welcome */
.kind-welcome .slide-inner { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; }
.w-copy { display: flex; flex-direction: column; gap: calc(var(--gap) * 0.8); min-width: 0; }
.w-copy .lede { color: var(--ink); max-width: 32ch; }
.choices { display: grid; gap: 12px; max-width: 560px; }
.choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; min-height: 76px; padding: 12px 14px 12px 22px; border-radius: 20px; border: 1px solid var(--border); background: var(--paper); text-decoration: none; box-shadow: 0 10px 28px rgba(31, 27, 22, 0.07); transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 350ms var(--ease); }
.choice:hover { border-color: var(--verm); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(31, 27, 22, 0.12); }
.choice-title { font: 700 clamp(1.3rem, min(2.4cqw, 4cqh), 1.85rem)/1.15 var(--serif); }
.choice-sub { grid-column: 1; color: var(--muted); font-size: 0.9375rem; }
.choice-go { grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sand); }
.choice.primary { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.choice.primary .choice-sub { color: var(--on-dark-muted); }
.choice.primary .choice-go { background: var(--verm); color: #fff; }
.w-art { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 0; }
.fan { display: none; padding: 4cqh 2cqw 2.4cqh; border-radius: 28px; background: var(--sand); }
.fan ul { display: flex; justify-content: center; align-items: flex-end; }
.fan li { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; }
.fan li:nth-child(1) { margin-right: -14px; margin-bottom: 5cqh; z-index: 1; }
.fan li:nth-child(2) { z-index: 2; }
.fan li:nth-child(3) { margin-left: -14px; margin-bottom: 5cqh; z-index: 1; }
.fan .frame.phone img { max-height: 44cqh; }
.fan li:nth-child(2) .frame.phone img { max-height: 52cqh; }
.fan-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9375rem; }
.fan-label .app-icon { width: 26px; height: 26px; border-radius: 7px; }
.fan figcaption { margin-top: 2cqh; text-align: center; color: var(--muted); font-size: 0.9375rem; }

/* Layouts by stage size */
@container stage (min-width: 720px) {
  .split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4cqw, 64px); align-items: center; }
  .grid.cols-2, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3, .stats, .defs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats li { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: 6px; align-content: start; }
  .stat-num { grid-row: auto; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .directory { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
  .needs .card { flex-direction: column; align-items: flex-start; }
  .frame.phone img { max-height: 62cqh; }
  .media.wide .frame.browser img, .frame.browser img { max-height: 52cqh; }
  .kind-product .split:has(.media.wide) { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .talk { max-width: 900px; }
}
@container stage (min-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container stage (min-width: 900px) and (min-height: 540px) {
  .kind-welcome .slide-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5cqw, 80px); align-items: center; }
  .fan { display: block; }
  .w-art .icon-row { display: none; }
}
@container stage (min-width: 600px) and (max-height: 480px) {
  .kind-welcome .slide-inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 32px; align-items: center; }
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .w-art .icon-row { flex-direction: column; }
  .kind-alloc .slide-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: auto auto 1fr; column-gap: 32px; }
  .kind-alloc .alloc-head, .kind-alloc .alloc-bar, .kind-alloc .note { grid-column: 1; }
  .kind-alloc .alloc-table { grid-column: 2; grid-row: 1 / 4; align-self: center; }
}
@container stage (min-width: 720px) and (min-height: 620px) { .alloc-table tbody .alloc-what { display: block; } }
@container stage (max-width: 520px) {
  .amt-long { display: none; } .amt-short { display: inline; }
  .product-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lines li { flex-direction: column; }
}

/* Fitting: applied by deck.js only while a slide would otherwise overflow */
.slide[data-fit="1"] .slide-inner { --gap: clamp(8px, 1.8cqh, 18px); --title: clamp(1.4rem, min(4.2cqw, 7cqh), 3.1rem); --display: clamp(1.8rem, min(6.4cqw, 10cqh), 4.8rem); }
.slide[data-fit="1"] .frame.phone img { max-height: 24cqh; }
.slide[data-fit="2"] .slide-inner, .slide[data-fit="3"] .slide-inner { --gap: clamp(6px, 1.4cqh, 14px); --title: clamp(1.3rem, min(3.8cqw, 6.2cqh), 2.6rem); --display: clamp(1.7rem, min(5.6cqw, 8.6cqh), 4rem); --lede: clamp(0.95rem, min(1.7cqw, 2.8cqh), 1.2rem); }
.slide[data-fit="2"] .media, .slide[data-fit="3"] .media, .slide[data-fit="2"] .fan figcaption, .slide[data-fit="3"] .fan figcaption,
.slide[data-fit="2"] .alloc-what, .slide[data-fit="3"] .alloc-what, .slide[data-fit="2"] .product-card .text-link, .slide[data-fit="3"] .product-card .text-link { display: none !important; }
.slide[data-fit="2"] .split, .slide[data-fit="3"] .split { grid-template-columns: minmax(0, 1fr); }
.slide[data-fit="3"] .slide-inner { --body: 0.875rem; --lede: 0.9375rem; --title: clamp(1.2rem, min(3.4cqw, 5.6cqh), 2.2rem); --display: clamp(1.55rem, min(5cqw, 7.6cqh), 3.4rem); --gap: 6px; }
.slide[data-fit="3"] .card { padding: 10px 14px; gap: 4px; }
.slide[data-fit="3"] .eyebrow { font-size: 0.75rem; }
.slide[data-fit="3"] .choice { min-height: 60px; padding: 8px 10px 8px 16px; }
.slide[data-fit="3"] .stat-num { font-size: clamp(1.8rem, 6cqh, 3rem); }
.slide[data-fit="3"] .alloc-table th, .slide[data-fit="3"] .alloc-table td { padding: 4px 0; }

/* Footer */
@container stage (min-width: 600px) and (max-height: 400px) {
  .needs .card { flex-direction: row; align-items: center; }
  .needs .app-icon { width: 30px; height: 30px; }
  .kind-steps .slide-inner,
  .kind-cards .slide-inner:has(> .note) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); column-gap: 24px; }
  .kind-steps .steps,
  .kind-cards .slide-inner:has(> .note) > .grid { grid-column: 2; grid-row: 1 / 3; }
  .kind-cards .slide-inner:has(> .note) > .note { grid-column: 1; }
  .steps li { padding: 6px 0; gap: 4px 12px; }
  .kind-welcome .choice-sub { font-size: 0.8125rem; }
  .kind-welcome .choices { gap: 8px; }
  .kind-welcome .w-copy { gap: 6px; }
  .kind-welcome .slide-inner { grid-template-columns: minmax(0, 1fr); }
  .kind-welcome .w-art { display: none; }
  .kind-welcome .w-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); column-gap: 24px; align-items: center; }
  .kind-welcome .eyebrow { grid-column: 1 / 3; }
  .kind-welcome .s-title { grid-column: 1; grid-row: 2 / 4; }
  .kind-welcome .lede, .kind-welcome .choices { grid-column: 2; }
}

.bar.bottom { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto; align-items: center; gap: 16px; padding: 0 var(--pad); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); }
.progress { position: absolute; left: 0; right: 0; top: -1px; height: 3px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--verm); transform: scaleX(var(--progress, 0)); transform-origin: left center; transition: transform 350ms var(--ease); }
.chooser { position: relative; min-width: 0; }
.chooser-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper); cursor: pointer; }
.chooser-btn:hover { border-color: var(--verm); }
.count { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--verm-text); white-space: nowrap; }
.count-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.9375rem; }
.chev, .nav-btn svg, .pager-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chooser-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sections { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 20; width: min(420px, calc(100vw - 2 * var(--pad))); padding: 12px; border-radius: 18px; background: var(--paper); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(31, 27, 22, 0.2); overflow: hidden; }
.sections-title { padding: 4px 8px 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: none; color: var(--muted); }
.sections-list a { display: grid; grid-template-columns: 2.2ch minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 12px; text-decoration: none; }
.sections-list a:hover { background: var(--sand); }
.sections-list a[aria-current="true"] { background: var(--sand); color: var(--clay-deep); font-weight: 600; }
.sections-list .n { color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.sections-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sections-list .sec { color: var(--muted); font-size: 0.75rem; }
.sections-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.pager-btn, .nav-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--paper); cursor: pointer; }
.pager-count { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sections-switch { display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--verm-text); font-weight: 600; font-size: 0.9375rem; }
.foot-note { font-size: 0.8125rem; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-note a { color: var(--ink); }
.nav-btns { display: flex; justify-content: flex-end; gap: 8px; }
.nav-btn.primary { display: inline-flex; justify-content: center; align-items: center; gap: 10px; width: auto; min-width: 120px; height: 50px; padding: 0 24px; border-radius: 999px; background: var(--verm-text); border-color: var(--verm-text); color: #fff; font-weight: 600; font-size: 1.0625rem; box-shadow: 0 3px 10px rgba(162, 66, 31, 0.18); }
@media (max-height: 520px) { .nav-btn.primary { height: 44px; } }
.nav-btn.primary:hover:not(:disabled) { background: #873519; border-color: #873519; }
@media (max-width: 520px) { .nav-btn.primary { min-width: 108px; padding: 0 18px; } .bar.bottom { gap: 8px; } .chooser-btn { gap: 6px; padding: 0 10px; } }
.nav-btn:hover:not(:disabled), .pager-btn:hover:not(:disabled) { border-color: var(--verm); }
.nav-btn:disabled, .pager-btn:disabled { opacity: 0.38; cursor: default; }
@media (max-width: 860px) { .foot-note { display: none; } .bar.bottom { grid-template-columns: minmax(0, 1fr) auto; } }
[data-deck-key="welcome"] .chooser, [data-deck-key="welcome"] .nav-btns, [data-deck-key="welcome"] .progress { display: none; }
[data-deck-key="welcome"] .bar.bottom { grid-template-columns: minmax(0, 1fr); }
[data-deck-key="welcome"] .foot-note { display: block; white-space: normal; }

.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 12px); z-index: 40; transform: translateX(-50%); width: min(460px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--on-dark); font-size: 0.9375rem; box-shadow: 0 16px 40px rgba(31, 27, 22, 0.25); }
.noscript { display: grid; place-content: center; gap: 12px; height: 100%; padding: 24px; text-align: center; font-size: 1.125rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; } }
@media print {
  html, body { height: auto; overflow: visible; }
  .deck { display: block; height: auto; }
  .bar, .skip-link, .toast { display: none !important; }
  .stage { overflow: visible; container-type: normal; }
  .slide { position: static; display: block !important; break-after: page; padding: 12mm 0; }
  .slide[hidden] { display: block !important; }
  .theme-dark, .theme-clay { color: var(--ink); background: none; }
}
