/* The home: one column on phones, a sticky side panel from 960px. Tokens from the approved prototype. */

:root {
    color-scheme: dark;
    --ground: #121010;
    --surface: #1b1816;
    --surface-2: #24201d;
    --line: #302a26;
    --line-2: #453c36;
    --ink: #f2ece4;
    --muted: #9c9189;
    --faint: #6f665f;
    --amber: #f4a340;
    --amber-soft: #3a2a17;
    --heat: #ff6a4d;
    --facts: #8fd19e;
    --warn: #ffcf66;
    --want: #8fd19e;
    --want-soft: rgba(143, 209, 158, .16);
    --paper: #f4efe6;
    --paper-ink: #1f1b18;
    --paper-muted: #7a716a;
    --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html, body { min-height: 100%; }

body.home {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.5;
    padding-inline: max(16px, env(safe-area-inset-left, 0px));
    padding-block: 14px 28px;
    -webkit-text-size-adjust: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

/* Top bar: the mark and the reading status */
.top { display: flex; justify-content: space-between; align-items: center; }
.mark { letter-spacing: .42em; font-size: 14px; font-weight: 500; }
.pill { font-family: var(--mono); font-size: 11px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); transition: background .3s; }

/* Headline: the company takes the place of "they" */
.layout { display: flex; flex-direction: column; gap: 14px; }
.side { display: contents; }
.headline {
    font-family: var(--display);
    font-weight: 750;
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -.02em;
    margin: 4px 0 0;
    text-wrap: balance;
}
.headline em {
    font-style: normal;
    color: var(--amber);
    display: inline-block;
    background: linear-gradient(var(--amber), var(--amber)) 0 100% / 100% 3px no-repeat;
    padding-bottom: 1px;
}
.headline em.swap { animation: swap .5s cubic-bezier(.34, 1.56, .64, 1); }
.lede { font-size: 14px; color: var(--muted); margin: 8px 0 0; max-width: 52ch; }

/* The reaction strip */
.stage {
    position: relative;
    height: 112px;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px) 0 0 / 16px 16px;
}
.stage.opening { animation: open-strip .45s cubic-bezier(.2, .8, .2, 1); }
.shelf { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; justify-content: center; gap: 6px; }
.shelf span {
    font-size: 26px;
    display: inline-block;
    animation: popin .5s cubic-bezier(.34, 1.56, .64, 1) both, bob 2.4s ease-in-out .5s infinite;
}
.shelf span.out { animation: popout .4s ease-in forwards; }
.fire { position: absolute; right: 10px; bottom: 8px; display: flex; flex-direction: column-reverse; align-items: center; line-height: 1; }
.fire span { font-size: 18px; animation: flicker .35s ease-in-out infinite alternate; transform-origin: bottom; }
.burst { position: absolute; font-size: 46px; line-height: 1; pointer-events: none; will-change: transform, opacity; }

/* The numbers row and the gauges */
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; padding: 2px 2px 0; }
.stats { display: contents; }
.stat small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.stat b { display: block; font-family: var(--mono); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b.on { color: var(--amber); }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gauge svg { width: 64px; height: auto; display: block; }
.gauge .lbl { font-size: 10.5px; color: var(--muted); line-height: 1.25; text-align: center; white-space: nowrap; }
.facts { width: 64px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 3px; }
.facts i { display: block; height: 100%; width: 0; background: var(--facts); transition: width .6s ease, background .3s; }
.facts i.heat { background: var(--heat); }
#fury-arc { transition: stroke-dasharray .7s ease; }
.needle { transition: transform .7s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 40px 40px; transform: rotate(-80deg); }

/* The ranked crowd */
.crowd h2 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 6px 0 2px; text-wrap: balance; }
.crowd .sub { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.crowd .legend { font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin: 0 0 4px; text-align: right; }
.crowd .gathering { height: 2px; border-radius: 1px; background: var(--surface-2); overflow: hidden; margin: 0 0 10px; }
.crowd .gathering i { display: block; height: 100%; width: 34%; background: var(--line-2); animation: gather 1.8s ease-in-out infinite; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 8px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line); position: relative; }
.row .e { font-size: 18px; text-align: center; line-height: 1; }
.row .l { font-size: 14px; }
.row .n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.row .n .rv { color: var(--faint); }
.row .bar { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.row .bar i { display: block; height: 100%; background: var(--line-2); transition: width .6s ease, background .3s; }
.row.on .n { color: var(--amber); }
.row.on .bar i { background: var(--amber); }
.row.on::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--amber); }
.row.lit { animation: rowin .5s ease-out; }
.row.deal { animation: deal .45s ease-out both; }
.row.leaving { animation: fold .26s ease-in forwards; overflow: hidden; pointer-events: none; }
.row .l.renamed { animation: renamed .45s ease-out; }
.row.own.naming .l { color: var(--muted); font-style: italic; }
.row.own.naming .n { color: var(--faint); }
.row.own.naming .bar i { animation: gather 1.8s ease-in-out infinite; }
.crowd-more { display: block; width: 100%; font: inherit; font-family: var(--mono); font-size: 10.5px; color: var(--faint); text-align: left; background: none; border: 0; border-top: 1px solid var(--line); margin: 6px 0 0; padding: 8px 0 0; min-height: 32px; cursor: pointer; }
.crowd-more::after { content: " ▾"; }
.crowd-more[aria-expanded="true"]::after { content: " ▴"; }
.crowd-more:hover, .crowd-more:focus-visible { color: var(--muted); }
.crowd-apart .row { opacity: .62; }
.crowd-apart .row .l { font-size: 13px; }

/* What others with the same problem wrote, under the crowd list */
.voices { margin-top: 12px; }
.voices h3 { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .03em; color: var(--faint); margin: 0 0 6px; }
.voices ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.voices li { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 2px solid var(--line-2); }
.voices q { font-size: 13.5px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.voices q::before { content: "“"; }
.voices q::after { content: "”"; }
.voices small { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.crowd.arriving { animation: panel-in .4s cubic-bezier(.2, .8, .2, 1); }

/* The open case the live read matched, pinned on top of the crowd */
.pinned-case {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--amber);
    border-radius: 14px;
    background: var(--amber-soft);
    color: var(--ink);
    text-decoration: none;
    min-height: 44px;
}
.pinned-case .eyebrow { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: .02em; overflow-wrap: anywhere; }
.pinned-case .eyebrow .n { color: var(--muted); }
.pinned-case .t { font-family: var(--display); font-weight: 700; font-size: 16.5px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pinned-case .go-on { font-size: 13.5px; font-weight: 600; color: var(--amber); }
.pinned-case:hover .go-on { text-decoration: underline; text-underline-offset: 3px; }
.pinned-case:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.pinned-case.is-arriving { animation: panel-in .5s cubic-bezier(.2, .8, .2, 1); }

/* The live scoreboards lead the page, full width above the box; each theme row links to its page */
.scoreboards { display: flex; flex-direction: column; gap: 10px; }
.scoreboards h1 { font-family: var(--display); font-weight: 750; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; margin: 4px 0 0; }
.scoreboards-sub { font-size: 13.5px; color: var(--muted); margin: 0; max-width: 62ch; }
.scoreboard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.scoreboard { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 4px; }
.scoreboard-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; margin: 0; }
.scoreboard-name a { color: inherit; text-decoration: none; }
.scoreboard-name a:hover { color: var(--amber); }
.scoreboard .sub { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.scoreboard-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.scoreboard-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "status n" "t n"; gap: 2px 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 44px; }
.scoreboard-row .sb-status { grid-area: status; font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--amber); }
.scoreboard-row .sb-status.is-reset { color: var(--warn); }
.scoreboard-row .sb-status.is-addressed { color: var(--facts); }
.scoreboard-row .t { grid-area: t; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.scoreboard-row .n { grid-area: n; font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.scoreboard-row .n b { display: block; font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; }
.scoreboard-row:hover .t { color: var(--amber); }
.scoreboard-row:focus-visible, .scoreboard-name a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }

/* The open cases, each linking to its page */
.open-cases { display: flex; flex-direction: column; gap: 4px; }
.open-cases h2 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 6px 0 0; }
.open-cases .sub { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.case-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.case-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 11px 4px;
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    min-height: 44px;
}
.case-row .r { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-row .t { font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.case-row .n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.case-row .n b { color: var(--amber); font-weight: 500; }
.case-row:hover .t { color: var(--amber); }
.case-row:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
.live-more { display: block; padding: 11px 4px 2px; border-top: 1px solid var(--line); font-size: 13px; color: var(--amber); text-decoration: none; min-height: 44px; box-sizing: border-box; }
.live-more:hover { text-decoration: underline; }
.live-more:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
.route-now { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: .02em; margin: 6px 0 0; }
.route-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.route-steps li { font-size: 14px; line-height: 1.4; }
.route-steps li[hidden] { display: none; }
.step-title { display: block; }
.step-deadline { display: block; font-size: 12.5px; color: var(--muted); }
.route-more { font-size: 12.5px; color: var(--muted); margin: 0; }
.route-panel { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.route-panel[hidden] { display: none; }
.route-panel.arriving { animation: route-in .35s ease-out; }
@keyframes route-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.route-panel .route-eyebrow { color: var(--amber); }
.route-panel .route-title { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.step-how summary { font-size: 12.5px; color: var(--muted); cursor: pointer; min-height: 28px; display: flex; align-items: center; }
.step-how p { font-size: 13px; color: var(--muted); margin: 4px 0; }
.route-link { color: var(--amber); text-decoration: none; }
.route-link:hover { text-decoration: underline; }
.route-more-btn { align-self: flex-start; background: none; border: 1px solid var(--line); color: inherit; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.route-complaint summary { font-size: 13.5px; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.route-complaint ul { margin: 6px 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.route-to, .route-keep { font-size: 13px; color: var(--muted); margin: 6px 0; }
.route-note { font-size: 12px; color: var(--muted); margin: 0; }
.route-write { align-self: stretch; min-height: 44px; border-radius: 12px; border: 1px solid var(--amber); background: none; color: var(--amber); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.route-write:disabled { opacity: .6; cursor: progress; }
.route-agent { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.route-agent-title { font-weight: 600; font-size: 14.5px; margin: 0; }
.route-agent-sub, .route-agent-status { font-size: 12.5px; color: var(--muted); margin: 0; }
.route-agent-status:empty { display: none; }
.route-agent-connect { font-size: 12.5px; color: var(--amber); text-decoration: none; align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; }
.route-agent-connect:hover { text-decoration: underline; }
.route-agent-preview summary { font-size: 12.5px; color: var(--muted); cursor: pointer; min-height: 28px; display: flex; align-items: center; }
.route-agent-text { white-space: pre-wrap; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; max-height: 260px; overflow: auto; margin: 6px 0 0; padding: 10px; border-radius: 10px; background: var(--surface); }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (max-width: 959px) {
    .head, .composer, .warnline, .claim-card { order: -2; }
    .pinned-case, .route-panel { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .route-panel.arriving { animation: none; } }

/* Release */
.go {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.01em;
    color: #1d1204;
    background: var(--amber);
    border: 0;
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7);
}
.go:active { transform: scale(.99); }
.go:disabled { cursor: default; filter: saturate(.4) brightness(.8); }
.go[aria-disabled="true"]:not(.is-released) {
    position: static;
    cursor: not-allowed;
    color: var(--faint);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    transform: none;
}
.go[aria-disabled="true"]:not(.is-released) .k { background: rgba(255, 255, 255, .05); }
.go.unlocked { animation: unlock .6s cubic-bezier(.2, .8, .3, 1.2); }
.go.is-released { position: static; box-shadow: none; }
.go.is-released .k { display: none; }
.k { display: none; font-family: var(--mono); font-size: 12px; font-weight: 500; margin-left: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .14); }

button:focus-visible,
a:focus-visible,
input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* The paper receipt */
.receipt-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.receipt {
    width: 100%;
    max-width: 330px;
    background: var(--paper);
    color: var(--paper-ink);
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.55;
    padding: 18px 18px 14px;
    position: relative;
    animation: print 1.1s cubic-bezier(.2, .8, .3, 1) both;
    -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 5.5px, #000 6px) 0 100% / 14px 100% repeat-x;
    mask: radial-gradient(circle 6px at 50% 100%, transparent 5.5px, #000 6px) 0 100% / 14px 100% repeat-x;
}
.receipt p { margin: 0; }
.receipt .c { text-align: center; }
.receipt .brand { letter-spacing: .4em; font-weight: 700; }
.receipt .muted { color: var(--paper-muted); }
.receipt hr { border: 0; border-top: 1px dashed var(--paper-muted); margin: 10px 0; }
.receipt .li { display: flex; justify-content: space-between; gap: 10px; }
.receipt .li span:last-child { white-space: nowrap; }
.receipt .head { text-transform: uppercase; }
.receipt .tot { font-weight: 700; font-size: 14px; }
.receipt .li.own { display: block; color: var(--paper-muted); font-size: 11px; margin: -2px 0 2px; }
.receipt .own::before { content: "↳ "; }
.receipt .want { font-weight: 700; }
.receipt .bars {
    height: 34px;
    margin: 12px 6px 2px;
    background: repeating-linear-gradient(90deg, var(--paper-ink) 0 2px, transparent 2px 4px, var(--paper-ink) 4px 5px, transparent 5px 8px, var(--paper-ink) 8px 11px, transparent 11px 12px);
}
.receipt-side { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 330px; }
.rbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rbtns button,
.rbtns a {
    font: inherit;
    font-size: 13px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    padding: 7px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}
.rbtns button:hover,
.rbtns a:hover { border-color: var(--amber); }
.toast { font-size: 12px; color: var(--muted); min-height: 18px; text-align: center; margin: 0; overflow-wrap: anywhere; }
.follow { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.follow label { font-size: 13px; color: var(--ink); }
.follow .row-in { display: flex; gap: 8px; }
.follow input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    padding: 8px 12px;
}
.follow input:focus { border-color: var(--amber); outline: none; }
.follow button {
    min-height: 44px;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    color: #1d1204;
    background: var(--amber);
    border: 0;
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
}
.follow button:disabled { filter: saturate(.4) brightness(.8); cursor: default; }
.follow small { font-size: 12px; color: var(--muted); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; align-items: center; font-size: 11.5px; color: var(--faint); margin: 4px 0 0; }
.foot a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.foot a:hover { color: var(--amber); }

/* Cookie banner (cookie-consent.js) in the home's palette */
#cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--surface);
    border-top: 1px solid var(--line-2);
    padding: 14px max(16px, env(safe-area-inset-left, 0px)) calc(14px + env(safe-area-inset-bottom, 0px));
}
.cookie-banner-content { max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.cookie-banner-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 600px; }
.cookie-banner-content a { color: var(--amber); text-decoration: none; }
.cookie-banner-content .btn {
    min-height: 44px;
    font: inherit;
    font-size: 13px;
    border-radius: 999px;
    padding: 8px 18px;
    cursor: pointer;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    color: var(--ink);
}
.cookie-banner-content .btn-primary { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* Burst motions, one per problem */
.g-glitch { animation: glitch 1s steps(6) forwards; }
.g-spin { animation: spin 1.1s cubic-bezier(.2, .8, .3, 1) forwards; }
.g-slide { animation: slide 1.1s ease-in-out forwards; }
.g-rise { animation: rise 1.2s cubic-bezier(.2, .9, .3, 1) forwards; }
.g-float { animation: ghost 1.4s ease-out forwards; }
.g-shrug { animation: shrug 1.1s ease-in-out forwards; }
.g-split { animation: split 1.1s ease-out forwards; }
.g-echo { animation: echo 1.1s ease-out forwards; }
.g-slam { animation: slam .9s cubic-bezier(.2, .9, .3, 1.4) forwards; }
.g-wobble { animation: wobble 1.1s ease-in-out forwards; }
.g-fall { font-size: 22px; animation: fall 1.2s ease-in forwards; }

@keyframes panel-in { 0% { transform: translateY(8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gather { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes unlock { 0% { transform: scale(.96); box-shadow: 0 0 0 0 rgba(244, 163, 64, .6); } 60% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(244, 163, 64, 0); } 100% { transform: none; } }
@keyframes swap { 0% { transform: translateY(8px) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes open-strip { 0% { height: 0; opacity: 0; } 100% { opacity: 1; } }
@keyframes popin { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes popout { to { transform: scale(.4); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes flicker { to { transform: scaleY(1.15) skewX(4deg); } }
@keyframes rowin { 0% { background: var(--amber-soft); } 100% { background: transparent; } }
@keyframes deal { 0% { transform: translateX(-8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fold { 0% { max-height: 64px; opacity: 1; } 100% { max-height: 0; opacity: 0; padding-block: 0; border-top-width: 0; } }
@keyframes renamed { 0% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: none; } }
@keyframes print { 0% { clip-path: inset(0 0 100% 0); transform: translateY(-14px); } 100% { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes glitch { 0% { transform: scale(.3); opacity: 1; } 16% { transform: translate(-7px, 3px) scale(1.25); } 33% { transform: translate(7px, -3px) scale(1.05); filter: hue-rotate(90deg); } 50% { transform: translate(-4px, 2px) scale(1.2); } 66% { transform: translate(4px, 0) scale(1.1); filter: none; } 100% { transform: scale(.6); opacity: 0; } }
@keyframes spin { 0% { transform: scale(.2) rotate(0); } 60% { transform: scale(1.15) rotate(600deg); opacity: 1; } 100% { transform: scale(.5) rotate(720deg); opacity: 0; } }
@keyframes slide { 0% { transform: translateX(-200px) rotate(-10deg); } 45%, 55% { transform: none; } 100% { transform: translateX(240px) rotate(10deg); opacity: .2; } }
@keyframes rise { 0% { transform: translateY(80px) scale(.8); } 50% { transform: translateY(0) scale(1.1); } 100% { transform: translateY(-30px) scale(.7); opacity: 0; } }
@keyframes ghost { 0% { transform: scale(.4); opacity: 0; } 25% { transform: scale(1.05); opacity: 1; } 100% { transform: translateY(-80px) scale(.9); opacity: 0; } }
@keyframes shrug { 0% { transform: scale(.3); } 25% { transform: scale(1.15) rotate(-14deg); } 50% { transform: scale(1.15) rotate(14deg); } 75% { transform: scale(1.15) rotate(-8deg); } 100% { transform: scale(.6); opacity: 0; } }
@keyframes split { 0% { transform: scale(.4); } 40% { transform: scale(1.15); } 70% { transform: scaleX(2) scaleY(.7); } 100% { transform: scaleX(2.4) scaleY(.4); opacity: 0; } }
@keyframes echo { 0% { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.05); opacity: 1; } 100% { transform: translate(34px, -24px) scale(.8); opacity: 0; } }
@keyframes slam { 0% { transform: scale(2.6); opacity: 0; } 35% { transform: scale(1); opacity: 1; } 45% { transform: translate(-4px, 2px); } 55% { transform: translate(4px, -2px); } 100% { transform: scale(.6); opacity: 0; } }
@keyframes wobble { 0% { transform: scale(.3); } 20% { transform: scale(1.15) rotate(-10deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 100% { transform: scale(.7); opacity: 0; } }
@keyframes fall { 0% { transform: translateY(-40px) rotate(0); opacity: 1; } 100% { transform: translateY(170px) rotate(260deg); opacity: .6; } }

/* Two columns with a sticky side panel from 960px */
@media (min-width: 960px) {
    body.home { padding-inline: 40px; padding-block: 28px 48px; }
    .app { max-width: 1180px; gap: 28px; }
    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 390px;
        grid-template-rows: auto auto auto auto auto 1fr;
        grid-template-areas: "head side" "composer side" "warn side" "claim side" "stage side" "result side";
        column-gap: 56px;
        row-gap: 18px;
        align-items: start;
    }
    .head { grid-area: head; padding-top: 10px; }
    .composer { grid-area: composer; }
    .warnline { grid-area: warn; }
    .case-row { padding: 10px 8px; border-radius: 10px; transition: background .2s; }
    .case-row:hover { background: var(--surface-2); }
    .claim-card { grid-area: claim; }
    .stage { grid-area: stage; height: 150px; }
    .receipt-wrap { grid-area: result; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 20px; }
    .receipt-side { max-width: 360px; align-self: flex-end; }
    .rbtns { justify-content: flex-start; }
    .toast { text-align: left; }
    .side {
        grid-area: side;
        display: flex;
        flex-direction: column;
        gap: 18px;
        position: sticky;
        top: 24px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 22px;
        padding: 20px 22px;
        max-height: calc(100vh - 48px);
        overflow: auto;
    }
    .side > * { flex-shrink: 0; }
    .headline { font-size: 60px; letter-spacing: -.03em; }
    .scoreboards h1 { font-size: 30px; }
    .scoreboard { padding: 22px 26px; }
    .scoreboard-rows { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 18px; }
    .scoreboard-row { padding: 12px 10px; border-radius: 10px; transition: background .2s; }
    .scoreboard-row:hover { background: var(--surface-2); }
    .lede { font-size: 16px; }
    .meters { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
    .crowd h2 { margin-top: 0; }
    .row { padding: 9px 6px; border-radius: 8px; transition: background .2s; }
    .row:hover { background: var(--surface-2); }
    .row.on::before { left: -8px; }
    .go { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -14px 18px -6px var(--surface); transition: filter .2s; }
    .go:hover:not(:disabled):not([aria-disabled="true"]) { filter: brightness(1.07); }
    .k { display: inline-block; }
    .foot { justify-content: flex-start; }
    .foot a { min-height: 0; }
    .burst { font-size: 64px; }
    .shelf span { font-size: 34px; }
    .shelf { bottom: 42px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.journey-nav { color: inherit; font: 500 14px/1.4 Figtree, sans-serif; text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; }
.top { flex-wrap: wrap; gap: 12px; }
