/* Bad Karma tokens (from 02-color-and-type/tokens.css) plus BJJ mode layout. */
@font-face { font-family: "Black Ops One"; src: url("fonts/black-ops-one-v21-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-v25-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-v12-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #0a0a0c;
  --surface: #16161a;
  --surface-2: #1f1f24;
  --surface-soft: #24252a;
  --faint: #26272d;
  --line: #34353c;
  --ink: #f3f4f6;
  --muted: #9aa0aa;
  --tert: #d3d6db;
  --teal: #14d8b4;
  --teal-ink: #121317;
  --halo: rgba(74, 229, 202, 0.18);
  --neutral: #b9bdc5;
  --negative: #df5047;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --font-word: "Black Ops One", "Stencil", "Impact", "Arial Black", sans-serif;
  --font-display: "Archivo", "Helvetica Neue", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tap: 56px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 12px) var(--gutter) calc(var(--safe-b) + 180px);
}
#app.full { padding: 0; max-width: none; }
#app.no-nav { padding-bottom: calc(var(--safe-b) + 104px); }

/* Demo banner */
.demo-banner {
  position: sticky; top: 0; z-index: 30;
  margin: calc(-12px - var(--safe-t)) calc(-1 * var(--gutter)) 12px;
  padding: calc(var(--safe-t) + 8px) var(--gutter) 8px;
  background: #2a1513; color: #ffd9d6;
  font-family: var(--font-num); font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-bottom: 1px solid #5a2622;
}
.demo-banner button { background: none; border: 1px solid #7a3530; border-radius: 999px; padding: 4px 10px; min-height: 32px; font-size: 12px; color: #ffd9d6; }
.demo-tag { font-family: var(--font-num); font-size: 11px; font-weight: 700; color: #ffb3ad; letter-spacing: 0.04em; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 14px; }
.word { font-family: var(--font-word); font-weight: 400; letter-spacing: 0.01em; font-size: 22px; line-height: 0.92; }
.word small { font-family: var(--font-body); font-weight: 800; font-size: 12px; color: var(--teal-ink); background: var(--teal); padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: 3px; letter-spacing: 0.02em; }
.back { min-width: var(--tap); min-height: 44px; background: none; border: 0; color: var(--tert); font-weight: 700; text-align: left; padding: 0; }
.screen-title { font-family: var(--font-display); font-weight: 900; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; margin: 4px 0 6px; }
.lede { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
h2.sec { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin: 24px 0 10px; }

/* The mat card: the one loud element on the home screen */
.mat {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px 18px 18px 22px;
  overflow: hidden;
}
.mat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--teal); }
.mat .kicker { font-family: var(--font-word); font-size: 15px; color: var(--teal); letter-spacing: 0.04em; }
.mat .hunt {
  font-family: var(--font-display); font-weight: 900; font-stretch: condensed;
  font-size: clamp(28px, 8.6vw, 36px); line-height: 1.02; letter-spacing: -0.02em;
  margin: 8px 0 12px; overflow-wrap: anywhere;
}
.mat .meta { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; margin: 4px 0 6px; }
.bars span { width: 12px; border-radius: 3px 3px 0 0; background: var(--line); }
.bars span.s-no { height: 6px; }
.bars span.s-saw { height: 16px; background: var(--neutral); }
.bars span.s-tried { height: 28px; background: var(--tert); }
.bars span.s-worked { height: 44px; background: var(--teal); }
.bars-key { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.mat .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.offer-line { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; font-size: 15px; }

/* Buttons */
.btn {
  min-height: var(--tap); border-radius: var(--r-md); border: 1px solid transparent;
  padding: 0 18px; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
}
.btn.primary { background: var(--teal); color: var(--teal-ink); }
.btn.primary:active { filter: brightness(0.9); }
.btn.primary:disabled { background: var(--surface-soft); color: var(--muted); }
.btn.secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn.tertiary { background: none; color: var(--tert); padding: 0 8px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.btn.wide { width: 100%; }
.btn.danger { background: none; color: #ff8a82; border-color: #5a2622; }
.stack { display: grid; gap: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.dock {
  position: fixed; left: 0; right: 0; bottom: calc(76px + var(--safe-b)); z-index: 20;
  padding: 10px var(--gutter);
  background: linear-gradient(to top, var(--bg) 70%, rgba(10, 10, 12, 0));
}
.no-nav .dock { bottom: 0; padding-bottom: calc(12px + var(--safe-b)); }
.dock > div { max-width: 448px; margin: 0 auto; display: grid; gap: 4px; width: 100%; }

/* Bottom nav */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: #0d0d10; border-top: 1px solid var(--faint);
  padding: 6px 8px calc(6px + var(--safe-b));
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.nav button { min-height: 60px; background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 13px; display: grid; place-items: center; gap: 2px; border-radius: var(--r-md); }
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { color: var(--teal); }

/* Cards and rows */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.soft { background: var(--surface-2); }
.card h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.2; }
.card p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label-line { font-size: 13px; color: var(--muted); margin: 10px 0 0; font-style: italic; }

.banner-pin {
  display: grid; gap: 10px; margin-bottom: 14px; padding: 14px 16px;
  border-radius: var(--r-lg); border: 1px dashed var(--teal); background: rgba(20, 216, 180, 0.06);
}
.banner-pin strong { font-family: var(--font-display); font-weight: 800; font-size: 17px; }

/* Outcome buttons */
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.outcome {
  min-height: 76px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--font-display); font-weight: 900; font-size: 19px; padding: 8px; display: grid; align-content: center; gap: 6px; justify-items: start; text-align: left;
}
.outcome .ticks { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.outcome .ticks i { width: 6px; background: var(--line); border-radius: 2px; }
.outcome .ticks i:nth-child(1) { height: 5px; }
.outcome .ticks i:nth-child(2) { height: 9px; }
.outcome .ticks i:nth-child(3) { height: 13px; }
.outcome .ticks i:nth-child(4) { height: 18px; }
.outcome[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.outcome[aria-pressed="true"] .ticks i.on { background: var(--teal-ink); }
.outcome .ticks i.on { background: var(--tert); }

.stayed { display: grid; gap: 10px; }
.choice {
  min-height: 64px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
  font-weight: 800; font-size: 18px; text-align: left; padding: 0 18px;
}
.choice[aria-pressed="true"] { border-color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; font-size: 15px;
}
.chip[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.chip.private::after { content: " (private)"; font-weight: 500; font-size: 12px; opacity: 0.75; }
.chip-label { font-size: 13px; color: var(--muted); font-weight: 700; margin: 14px 0 8px; }

.toggle-line { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
.switch { min-height: 48px; min-width: 120px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 800; padding: 0 16px; }
.switch[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }

.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { min-height: 48px; min-width: 88px; padding: 0 14px; background: var(--surface-2); border: 0; font-weight: 800; }
.seg button[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); }

.summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); margin: 20px 0 6px; }
.summary .txt { font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 52px; height: 52px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); font-size: 22px; font-weight: 800; }
.stepper output { font-family: var(--font-num); font-weight: 700; min-width: 72px; text-align: center; }

.field { display: grid; gap: 6px; margin: 12px 0; }
.field span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 52px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  padding: 12px 14px; font-size: 16px;
}
.field textarea { min-height: 84px; resize: vertical; }

.hint { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.linkish { background: none; border: 0; color: var(--tert); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; padding: 0; font-weight: 700; }

/* Mascot */
.mascot { width: 200px; height: 200px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, var(--halo) 0%, rgba(74, 229, 202, 0) 68%); display: grid; place-items: center; }
.mascot img { width: 200px; height: 200px; object-fit: contain; }
.mascot.sm { width: 120px; height: 120px; }
.mascot.sm img { width: 120px; height: 120px; }
.done-line { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1.05; text-align: center; margin: 8px 0 6px; letter-spacing: -0.01em; }
.center { text-align: center; }

/* Partner card: no chrome */
.partner {
  position: fixed; inset: 0; z-index: 100; background: #000; color: #fff;
  padding: calc(var(--safe-t) + 28px) 22px calc(var(--safe-b) + 24px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px; border: 0; text-align: left; width: 100%;
}
.partner .pl { font-family: var(--font-word); color: var(--teal); font-size: 22px; letter-spacing: 0.04em; display: block; }
.partner .pv { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 9.4vw, 44px); line-height: 1.05; letter-spacing: -0.015em; display: block; margin-top: 2px; overflow-wrap: anywhere; }
.partner .pf { margin-top: auto; font-family: var(--font-word); font-size: 15px; color: #8b9098; }
.partner .pv.long { font-size: clamp(20px, 6vw, 28px); }

/* Lists */
.rows { display: grid; gap: 8px; }
.srow {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; border: 0; text-align: left; width: 100%; min-height: 64px;
}
.srow .t { font-weight: 800; }
.srow .s { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.dots { display: flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line); }
.dots i.stuck { background: var(--tert); border-color: var(--tert); }
.dots i.clicked { background: var(--teal); border-color: var(--teal); }
.srow.zero .t { color: var(--muted); font-weight: 600; }

.rline {
  display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--faint);
  padding: 14px 0; font-size: 17px; line-height: 1.35; font-weight: 600; min-height: 56px;
}
.rline.cite::after { content: "See the sessions"; display: block; font-size: 13px; color: var(--teal); font-weight: 700; margin-top: 4px; }
.rline:first-child { font-family: var(--font-display); font-weight: 900; font-size: 24px; }

.post { background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px; }
.post + .post { margin-top: 10px; }
.post .who { font-weight: 800; }
.post .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.post .acts .btn { min-height: 48px; font-size: 15px; padding: 0 12px; }
.post .note { font-size: 14px; color: var(--teal); margin: 8px 0 0; font-weight: 700; }
.preview { border-left: 4px solid var(--line); padding: 8px 12px; margin: 10px 0 14px; background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.room-row { padding: 12px 0; border-bottom: 1px solid var(--faint); }
.room-row .t { font-weight: 800; }
.cell { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 14px; }
.cell b { font-family: var(--font-num); }
.hidden-cells { font-size: 13px; color: var(--muted); margin-top: 4px; }

.push { background: rgba(40, 40, 46, 0.95); border-radius: 18px; padding: 12px 14px; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; margin-top: 12px; }
.push img { width: 38px; height: 38px; border-radius: 9px; }
.push b { display: block; font-size: 14px; }
.push span { font-size: 14px; color: var(--tert); }

.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-width: 480px; margin: 0 auto; max-height: 86dvh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px var(--gutter) calc(20px + var(--safe-b)); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.logitem { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px; }
.logitem .d { font-weight: 800; }
.logitem .x { font-size: 14px; color: var(--tert); margin-top: 2px; }
.logitem .q { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 4px; }
.logitem .btn { min-height: 44px; margin-top: 8px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--safe-b)); z-index: 90;
  width: calc(100% - 32px); max-width: 448px; background: var(--ink); color: var(--teal-ink);
  border-radius: var(--r-md); padding: 8px 8px 8px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800;
}
.toast button { min-height: 48px; padding: 0 16px; border-radius: var(--r-sm); border: 0; background: var(--teal-ink); color: var(--ink); font-weight: 800; }

.path li { padding: 10px 0; border-bottom: 1px solid var(--faint); list-style: none; }
.path { padding: 0; margin: 0; }
.path li.here { color: var(--teal); font-weight: 800; }
.path li.done { color: var(--muted); text-decoration: line-through; }
.path .sec-name { font-size: 12px; color: var(--muted); display: block; }

.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days .chip { min-width: 48px; padding: 0 10px; }
.debug { font-family: var(--font-num); font-size: 12px; color: var(--muted); margin-top: 8px; }
.ver { background: none; border: 0; color: var(--muted); font-size: 12px; min-height: 44px; padding: 0; }

.onb-word { font-family: var(--font-word); font-size: clamp(48px, 17vw, 64px); line-height: 0.92; letter-spacing: 0.01em; margin: 24px 0 4px; }
.onb-sub { font-family: var(--font-display); font-weight: 900; color: var(--teal); font-size: 20px; margin: 0 0 12px; }

@media (prefers-reduced-motion: no-preference) {
  .pop { animation: pop 380ms cubic-bezier(.2, .9, .3, 1.2) both; }
  @keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
}

.cheer { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cheer img { width: 56px; height: 56px; object-fit: contain; }
.cheer .note { margin: 0; }
