/* HIVEMIND — a light page about a busy hive. Warm paper, black ink, one hot colour (honey).
   Green and red only ever mean profit and loss. Sticker cards: thick ink borders, hard offset shadows, no glows. */
:root {
  --paper: #ECE8DF;
  --paper-2: #E3DED3;
  --paper-3: #D8D2C5;
  --card: #F7F4EC;
  --ink: #22201C;
  --ink-2: #4E4A43;
  --ink-3: #847E73;
  --line: #D6D0C3;
  --honey: #D9A441;
  --honey-deep: #A87420;
  --honey-soft: #EBD3A0;
  --honey-wash: #F3EAD6;
  --win: #2E8B57;
  --win-soft: #DCEBE1;
  --loss: #B84A3A;
  --loss-soft: #F2DDD8;
  --display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --bw: 2.5px;
  --r: 16px;
  --sh: 5px 5px 0 var(--ink);
  --sh-s: 3px 3px 0 var(--ink);
  --hdr: 60px;
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Cpath d='M12 1.5 22 7.25v11.5L12 24.5 2 18.75V7.25Z' fill='%23FFB000' stroke='%2317130D' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  --hex-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Cpath d='M12 1.5 22 7.25v11.5L12 24.5 2 18.75V7.25Z' fill='%2317130D' stroke='%2317130D' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  --hex-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Cpath d='M12 1.5 22 7.25v11.5L12 24.5 2 18.75V7.25Z' fill='%23E2DACA' stroke='%2317130D' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  --gut: 16px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 0; overflow-x: hidden;
  font: 450 16px/1.5 var(--display); color: var(--ink); -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  /* the honeycomb, barely there */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%2317130D' stroke-opacity='.045' stroke-width='1.4'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%2317130D' stroke-opacity='.035' stroke-width='1.4'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.win { color: var(--win); }
.loss { color: var(--loss); }
.flat { color: var(--ink-2); }
.small { font-size: 13px; color: var(--ink-3); }
.empty { padding: 18px 16px; color: var(--ink-3); font-weight: 600; text-align: center; }
::selection { background: var(--honey); color: var(--ink); }
:focus-visible { outline: 3px solid var(--honey-deep); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }

/* ---------- buttons, pills, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  font: 750 16px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap;
  background: var(--honey); border: var(--bw) solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none; box-shadow: 2px 2px 0 var(--ink); }
.btn.ghost { background: var(--card); }
.btn.ghost:hover { background: var(--honey-wash); }
.btn.big { min-height: 54px; padding: 0 24px; font-size: 18px; border-radius: 14px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-width: 2px; border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.btn.sm:active { box-shadow: 0 0 0 var(--ink); }
.btn.xs { min-height: 30px; padding: 0 10px; font-size: 13px; border-width: 2px; border-radius: 8px; box-shadow: 2px 2px 0 var(--ink); }
.btn.xs:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.linkish { background: none; border: 0; padding: 4px 2px; font-weight: 700; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; font-size: 13.5px; font-weight: 700;
  background: var(--card); border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.pill:hover { background: var(--honey-wash); }
.pill.icon { width: 36px; padding: 0; justify-content: center; }
.pill .ca-k { font-family: var(--display); font-weight: 800; }
.pill.me i { width: 12px; height: 12px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--c, var(--honey)); }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; font-size: 13.5px; font-weight: 750;
  background: var(--card); border: 2px solid var(--ink); border-radius: 999px; box-shadow: var(--sh-s);
}
.chip-btn:hover { background: var(--honey-wash); }
.chip-btn.on { background: var(--honey); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 9px; }
.icon-btn:hover { background: var(--honey-wash); }

/* ---------- header ---------- */
/* opaque paper, never frosted glass: a sticker strip pinned to the top */
.top { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: var(--bw) solid var(--ink); }
.top-in { display: flex; align-items: center; gap: 10px; height: var(--hdr); padding: 0 var(--gut); max-width: 1480px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.logo .mark { width: 34px; height: 34px; }
.logo-word { font: 800 21px/1 var(--display); letter-spacing: -0.03em; }
.live { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font: 800 11.5px/1 var(--display); letter-spacing: .08em; flex: none; }
.live i { width: 9px; height: 9px; border-radius: 50%; background: var(--honey); border: 1.5px solid var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.live.down i { background: var(--paper-3); animation: none; }
.live.down b { color: var(--ink-2); }
.nav { display: none; gap: 2px; margin-left: 10px; min-width: 0; overflow: hidden; flex: 0 1 auto; }
.nav a { white-space: nowrap; }
.nav a { padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 14.5px; text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--honey-wash); }
.top-r { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.top-r .pill.me { display: none; }
.hdr-count { display: none; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--honey-wash); border: 2px solid var(--ink); }
.hdr-count::before { content: 'Promotion in '; font-family: var(--display); font-weight: 700; color: var(--ink-2); }
.pill .ca-v { display: none; }

/* ---------- the arena + hero ---------- */
.arena-wrap { position: relative; height: 56vh; height: 56svh; min-height: 400px; max-height: 680px; background: var(--paper-2); border-bottom: var(--bw) solid var(--ink); overflow: hidden; isolation: isolate; }
.arena { position: absolute; inset: 0; z-index: 0; }
.arena canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.arena-still { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.arena-still svg { width: 100%; height: 100%; }
.hero {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 72px var(--gut) 18px; pointer-events: none;
  background: linear-gradient(to top, rgba(236, 232, 223, .97) 0%, rgba(236, 232, 223, .92) 52%, rgba(236, 232, 223, 0) 100%);
}
.hero > * { pointer-events: auto; }
.hero-name { font: 800 clamp(46px, 13vw, 120px)/.86 var(--display); letter-spacing: -0.045em; text-shadow: 3px 3px 0 var(--honey); width: fit-content; }
.hero-tag { margin-top: 10px; font: 750 clamp(18px, 4.6vw, 28px)/1.12 var(--display); letter-spacing: -0.02em; max-width: 20ch; }
.hero-sub { margin-top: 6px; font-size: clamp(14.5px, 3.6vw, 18px); font-weight: 550; color: var(--ink-2); max-width: 34ch; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; width: fit-content; }
.hero-btns .btn.big { min-height: 50px; font-size: 17px; }
.arena-hud { position: absolute; top: 12px; left: var(--gut); right: var(--gut); z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.arena-hud > * { pointer-events: auto; }
.brain-ticker {
  display: flex; align-items: center; gap: 8px; max-width: min(440px, 100%); padding: 7px 12px; font-size: 13.5px; font-weight: 650; line-height: 1.3;
  background: var(--card); border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--sh-s);
}
.brain-ticker #brainLine { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx { flex: none; width: 14px; height: 16px; background: var(--hex) center / contain no-repeat; }
.brain-ticker .hx { animation: pulse 2.2s ease-in-out infinite; }
.pick-pop {
  width: min(300px, 100%); padding: 10px 14px 12px; background: var(--honey); border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: var(--sh);
  animation: drop .5s cubic-bezier(.2, 1.4, .4, 1) both; text-decoration: none; display: block;
}
.pick-pop.out { animation: lift .35s ease-in both; }
.pick-pop .k { font: 800 11.5px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.pick-pop b { display: block; margin-top: 4px; font: 700 24px/1.05 var(--mono); }
.pick-pop span { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }

/* ---------- stat strip ---------- */
.stats { background: var(--card); border-bottom: var(--bw) solid var(--ink); }
.stats-in { display: grid; grid-template-columns: 1fr 1fr; max-width: 1480px; margin: 0 auto; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px var(--gut) 13px; border-bottom: 1.5px solid var(--ink); }
.stat:nth-child(odd):not(.wide) { border-right: 1.5px solid var(--ink); }
.stat .k { font: 800 11.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.stat .v { font-size: clamp(22px, 6vw, 32px); font-weight: 700; line-height: 1.1; transition: background-color .6s ease; border-radius: 6px; width: fit-content; }
.stat .v i { font-style: normal; color: var(--ink-3); }
.stat small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.wide { grid-column: 1 / -1; background: var(--honey); border-bottom: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.stat.wide .k, .stat.wide small { color: var(--ink); }
.stat.wide .v { order: 2; }
.stat.wide small { order: 3; flex-basis: 100%; }
.bump { background-color: var(--honey-soft); }

/* ---------- sections ---------- */
main { display: block; }
.sec { max-width: 1240px; margin: 0 auto; padding: 56px var(--gut) 0; }
.sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; margin-bottom: 20px; }
.hexnum {
  display: grid; place-items: center; width: 44px; height: 48px; font: 800 15px/1 var(--mono);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 48'%3E%3Cpath d='M22 2 41 13v22L22 46 3 35V13Z' fill='%23FFB000' stroke='%2317130D' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sec-head h2 { font: 800 clamp(32px, 7vw, 56px)/1 var(--display); letter-spacing: -0.035em; }
.sec-head p { grid-column: 1 / -1; margin-top: 10px; font-size: 16.5px; color: var(--ink-2); max-width: 62ch; font-weight: 500; }
.card { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); }
.mini-card { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.mc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mc-head b { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; }
.mc-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 8px; border-top: 1.5px dashed var(--line); font-size: 14px; font-weight: 700; }
.vtag { display: inline-block; padding: 2px 7px; font-size: 12px; font-weight: 700; background: var(--honey); border: 2px solid var(--ink); border-radius: 7px; line-height: 1.2; }

/* ---------- 01 your robot ---------- */
.robot-out { display: grid; gap: 18px; padding: 22px 18px; align-items: center; }
.ro-art { width: 132px; height: 132px; margin: 0 auto; }
.ro-art svg { width: 100%; height: 100%; }
.ro-copy h3 { font: 800 clamp(26px, 6vw, 38px)/1.05 var(--display); letter-spacing: -0.03em; }
.ro-lines { margin-top: 12px; display: grid; gap: 6px; }
.ro-lines li { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 600; }
.ro-lines li::before { content: ''; flex: none; width: 13px; height: 14px; background: var(--hex) center / contain no-repeat; }
.ro-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
/* block, not flex: the note mixes text, bold and a link, and must wrap like a sentence on a phone */
.hold-note { display: block; margin-top: 14px; padding: 8px 12px; font-size: 14.5px; font-weight: 600; line-height: 1.4; background: var(--honey-wash); border: 2px solid var(--ink); border-radius: 12px; width: fit-content; max-width: 100%; }
.hold-note::before { content: ''; display: inline-block; vertical-align: -1px; margin-right: 8px; width: 13px; height: 14px; background: var(--hex) center / contain no-repeat; }
.hold-note.ok::before { background-image: var(--hex-ink); }
.hold-note a { font-weight: 800; }

.robot-in { padding: 16px; }
.rb-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.rb-ava { width: 56px; height: 64px; }
.rb-ava svg { width: 100%; height: 100%; }
.rb-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rb-name { font: 800 clamp(24px, 6vw, 34px)/1.05 var(--display); letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; cursor: text; }
.rb-rename { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rb-rename input { flex: 1 1 160px; min-width: 0; height: 40px; padding: 0 12px; font-size: 16px; font-weight: 700; background: var(--card); border: 2px solid var(--ink); border-radius: 10px; }
.rb-rename input:focus { outline: 3px solid var(--honey); outline-offset: 0; }
.rb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; font: 800 11.5px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); }
.status.stage { background: var(--honey); }
.status.paused { background: var(--paper-3); color: var(--ink-2); }
.rb-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.rb-stats > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.rb-stats span { font: 800 11px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rb-stats b { font-size: clamp(20px, 5vw, 26px); font-weight: 700; line-height: 1.15; }
.rb-stats small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-last { margin-top: 12px; padding: 8px 12px; font-size: 14px; font-weight: 600; border-left: 4px solid var(--honey); background: var(--paper); border-radius: 0 10px 10px 0; animation: flash 1.2s ease-out; }
.rb-grid { display: grid; gap: 14px; margin-top: 16px; }
.rb-side { display: grid; gap: 12px; align-content: start; min-width: 0; }

/* the trainer chat */
.chat { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.chat-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 10px 14px; border-bottom: 2px solid var(--ink); background: var(--card); }
.chat-head b { font-size: 16px; font-weight: 800; }
.chat-head span { font-size: 13.5px; color: var(--ink-2); font-weight: 550; }
.chat-log { display: flex; flex-direction: column; gap: 10px; height: clamp(280px, 48vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 9px 12px; font-size: 15px; line-height: 1.4; font-weight: 520; border: 2px solid var(--ink); overflow-wrap: anywhere; animation: pop .22s ease-out both; }
.msg.me { align-self: flex-end; background: var(--honey-soft); border-radius: 14px 14px 4px 14px; }
.msg.bot { align-self: flex-start; background: var(--card); border-radius: 14px 14px 14px 4px; }
.msg.bot .who { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.msg.typing { display: inline-flex; gap: 5px; padding: 12px 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); animation: dots 1s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
.rule-card { align-self: stretch; background: var(--card); border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; animation: pop .25s ease-out both; flex: none; }
.rc-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--honey-wash); border-bottom: 2px solid var(--ink); }
.rc-head b { font-size: 14.5px; font-weight: 800; }
.rc-head .rc-state { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.rc-lines { padding: 6px 0; }
.rc-lines li, .rule-lines li { display: flex; gap: 9px; align-items: baseline; padding: 5px 12px; font-size: 14.5px; font-weight: 600; line-height: 1.35; border-left: 4px solid transparent; }
.rc-lines li::before, .rule-lines li::before { content: ''; flex: none; width: 8px; height: 9px; transform: translateY(-1px); background: var(--ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.rc-lines li.new { background: var(--honey-wash); border-left-color: var(--honey-deep); }
.rc-lines li.new::after { content: 'NEW'; margin-left: auto; padding: 1px 6px; font: 800 10.5px/1.4 var(--display); letter-spacing: .08em; background: var(--honey); border: 1.5px solid var(--ink); border-radius: 5px; }
.rc-changes { padding: 0 12px 6px; font-size: 13px; color: var(--ink-2); }
.rc-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 12px; border-top: 1.5px dashed var(--line); }
.rule-card.kept { opacity: .62; box-shadow: 2px 2px 0 var(--ink); }
.rule-card.kept .rc-lines li.new { background: none; border-left-color: transparent; }
.rule-card.kept .rc-lines li.new::after { display: none; }
.rule-card.applied .rc-head { background: var(--honey); }
.chips { display: flex; gap: 8px; padding: 10px 12px 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-top: 2px solid var(--ink); background: var(--card); }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; padding: 7px 12px; font-size: 13.5px; font-weight: 650; white-space: nowrap; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; }
.chips button:hover { background: var(--honey-wash); }
.chips button:disabled { opacity: .5; cursor: default; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--card); }
.chat-form input { flex: 1; min-width: 0; height: 46px; padding: 0 13px; font-size: 16px; font-weight: 550; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.chat-form input:focus { outline: 3px solid var(--honey); outline-offset: 0; background: var(--card); }
.chat-form .btn { min-height: 46px; }

.rule-hist { margin-top: 8px; border-top: 1.5px dashed var(--line); padding-top: 8px; }
.rule-hist summary { cursor: pointer; font-size: 13.5px; font-weight: 750; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 6px; }
.rule-hist summary::-webkit-details-marker { display: none; }
.rule-hist summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; font: 800 13px/1 var(--mono); border: 2px solid var(--ink); border-radius: 5px; background: var(--card); }
.rule-hist[open] summary::before { content: '−'; }
.rule-hist ol { display: grid; gap: 6px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.rule-hist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.rule-hist li .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 550; }
.rule-hist li .vtag { background: var(--card); }
.rule-hist li.cur .vtag { background: var(--honey); }
.pos-list, .trade-list { display: grid; gap: 0; }
.pos-list li, .trade-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 0; border-bottom: 1.5px solid var(--line); font-size: 14px; }
.pos-list li:last-child, .trade-list li:last-child { border-bottom: 0; }
.pos-list .sym, .trade-list .sym { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-list .sub, .trade-list .sub { grid-column: 1; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pos-list .pn, .trade-list .pn { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-weight: 700; }
.pos-list .none, .trade-list .none { display: block; color: var(--ink-3); font-weight: 600; border: 0; }
.sym a { text-decoration: none; }
.sym a:hover { text-decoration: underline; }

/* ---------- 02 what works now ---------- */
.hive-line { margin-bottom: 18px; padding: 4px 0 4px 16px; font: 750 clamp(19px, 4.4vw, 26px)/1.25 var(--display); letter-spacing: -0.02em; border-left: 6px solid var(--honey); max-width: 46ch; }
.works-grid { display: grid; gap: 16px; }
.hb-iq { padding: 18px; background: var(--honey); display: flex; flex-direction: column; gap: 4px; }
.hb-iq .k { font: 800 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.hb-iq b { font: 700 clamp(48px, 12vw, 68px)/1 var(--mono); letter-spacing: -0.04em; }
.hb-iq small { font-size: 13.5px; font-weight: 700; }
.hb-iq p { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 600; }
.hb-list { padding: 16px; min-width: 0; }
.hb-list h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.hb-list h3::before { content: ''; width: 12px; height: 14px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hb-win h3::before { background: var(--win); }
.hb-loss h3::before { background: var(--loss); }
.hb-list ol { display: grid; }
.hb-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 9px 0; border-bottom: 1.5px solid var(--line); }
.hb-list li:last-child { border-bottom: 0; }
.hb-list .lab { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.hb-list .avg { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 18px; font-weight: 700; }
.hb-list .meta { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.hb-list .none { display: block; padding: 10px 0; color: var(--ink-3); font-weight: 600; border: 0; }
.hb-list .small { margin-top: 8px; }
.hb-pick { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hb-pick .k { font: 800 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.hb-pick .sym { font: 700 clamp(26px, 6vw, 34px)/1.05 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-pick .lab { font-size: 14.5px; font-weight: 650; }
.hb-pick .meta { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.hb-pick .btn { margin-top: auto; align-self: flex-start; }
.hb-pick.fresh { animation: flash 1.6s ease-out; }

/* ---------- 03 leaderboard ---------- */
.lb-card { overflow: hidden; }
.lb-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 11px 16px; background: var(--paper-2); border-bottom: 2px solid var(--ink); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.lb-top .mono { font-weight: 700; color: var(--ink); }
.lb-head { display: none; }
.lb-head, .lb-row { grid-template-columns: 30px minmax(0, 1fr) auto 62px; }
.lb { max-height: 720px; overflow-y: auto; overscroll-behavior: contain; }
.lb-row { display: grid; gap: 4px 10px; align-items: center; padding: 10px 14px; border-bottom: 1.5px solid var(--line); cursor: pointer; transition: background-color .2s ease; }
.lb-row:hover { background: var(--honey-wash); }
.lb-row.me { background: var(--honey-soft); }
.lb-rank { font: 700 14px/1 var(--mono); color: var(--ink-2); text-align: center; }
.lb-row.top3 .lb-rank { color: var(--ink); font-size: 15px; }
.lb-bot { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; min-width: 0; }
.lb-bot .dot { grid-row: 1 / span 2; width: 18px; height: 20px; background: var(--c, var(--honey)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.lb-bot .nm { grid-column: 2; display: flex; align-items: center; min-width: 0; }
.lb-bot .nm .tag { flex: none; }
.lb-bot .tr-inline { font-family: var(--mono); }
.lb-open { padding: 0; border: 0; background: none; font-size: 15px; font-weight: 750; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lb-open:hover { text-decoration: underline; }
.lb-bot small { grid-column: 2; font-size: 12.5px; color: var(--ink-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 6px; font: 800 10px/1.5 var(--display); letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; border: 1.5px solid var(--ink); border-radius: 5px; background: var(--honey); }
.tag.you { background: var(--ink); color: var(--honey); }
/* house robots: the hive's own paper robots (grey honey: plain, never a prize colour) */
.tag.house { background: var(--paper-3); color: var(--ink-2); border-color: var(--ink-3); }
.feed .tag.house, .who + .tag.house { margin-left: 4px; margin-right: 2px; }
.lb-pnl { text-align: right; font-weight: 700; font-size: 15px; }
.lb-pnl small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.lb-tr, .lb-q { display: none; }
.lb-tr { font-size: 14px; font-weight: 600; text-align: right; }
.lb-tr small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.lb-q { justify-self: center; width: 22px; height: 24px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--paper-3); position: relative; }
.lb-q.yes { background: var(--ink); }
.lb-q.yes::after { content: ''; position: absolute; left: 7px; top: 6px; width: 6px; height: 10px; border: solid var(--honey); border-width: 0 3px 3px 0; transform: rotate(40deg); }
.lb-fork { justify-self: end; }
.lb-cut { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 7px 14px; background: var(--ink); color: var(--honey); }
.lb-cut b { font: 800 12.5px/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.lb-cut span { font-size: 12.5px; font-weight: 600; color: var(--paper); }

/* ---------- 04 on stage ---------- */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.st-card { overflow: hidden; display: flex; flex-direction: column; }
.st-card header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; background: var(--honey-wash); border-bottom: 2px solid var(--ink); cursor: pointer; }
.st-card.me header { background: var(--honey-soft); }
.st-card.me { box-shadow: 6px 6px 0 var(--honey-deep); }
.st-card .ava { width: 36px; height: 41px; }
.st-card .ava svg { width: 100%; height: 100%; }
.st-card header b { display: block; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-card header small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.st-card .st-pnl { font: 700 18px/1 var(--mono); }
.st-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 12px 14px 14px; }
.st-card dt { font: 800 10.5px/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.st-card dd { font: 700 16px/1.25 var(--mono); }
.stage-empty { padding: 22px 18px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.stage-empty b { font-size: 20px; font-weight: 800; }
.stage-sub { display: grid; gap: 16px; margin-top: 18px; }
.real-card, .settled-card { padding: 14px 16px; min-width: 0; }
.real-list, .settled-list { display: grid; max-height: 420px; overflow-y: auto; }
.real-list li, .settled-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1.5px solid var(--line); font-size: 14px; }
.real-list li:last-child, .settled-list li:last-child { border-bottom: 0; }
.real-list .main, .settled-list .main { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.real-list .sub, .settled-list .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.real-list .right, .settled-list .right { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 700; }
.side { display: inline-block; min-width: 38px; margin-right: 6px; padding: 0 5px; font: 800 10.5px/1.6 var(--display); letter-spacing: .08em; text-align: center; border: 1.5px solid var(--ink); border-radius: 5px; vertical-align: 1px; }
.side.buy { background: var(--card); }
.side.sell { background: var(--ink); color: var(--paper); }
.tx { font-family: var(--mono); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.tx:hover { color: var(--honey-deep); }

/* ---------- 05 live feed ---------- */
.feed-card { overflow: hidden; }
.feed-filters { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.feed-filters::-webkit-scrollbar { display: none; }
.feed-filters button { flex: none; padding: 6px 12px; font-size: 13.5px; font-weight: 700; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; }
.feed-filters button:hover { background: var(--honey-wash); }
.feed-filters button.on { background: var(--honey); }
.feed-list { height: 520px; overflow-y: auto; overscroll-behavior: contain; contain: content; }
.feed-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 14px; border-bottom: 1.5px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.feed-list li.in { animation: feedIn .45s ease-out both; }
.feed-list li .d { width: 12px; height: 14px; margin-top: 3px; background: var(--c, var(--ink-3)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.feed-list li .x { min-width: 0; overflow-wrap: anywhere; }
.feed-list li .x b { font-weight: 750; }
.feed-list li .x button.who { padding: 0; border: 0; background: none; font-weight: 750; font-size: inherit; }
.feed-list li .x button.who:hover { text-decoration: underline; }
.feed-list li .x .r { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.feed-list li time { font: 500 12px/1.6 var(--mono); color: var(--ink-3); white-space: nowrap; }
.feed-list li.k-coin .d { clip-path: none; background: var(--hex-paper) center / contain no-repeat; }
.feed-list li.k-pick { background: var(--honey-wash); }
.feed-list li.k-pick .d, .feed-list li.k-pay .d, .feed-list li.k-promo .d { background: var(--honey); }
.feed-list li.k-promo { background: var(--honey-soft); }
.real { display: inline-block; margin-left: 4px; padding: 0 5px; font: 800 10px/1.6 var(--display); letter-spacing: .08em; background: var(--honey); border: 1.5px solid var(--ink); border-radius: 5px; vertical-align: 1px; }

/* ---------- 06 how it works ---------- */
.steps { display: grid; gap: 16px; counter-reset: none; }
.step { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.step-n {
  display: grid; place-items: center; width: 48px; height: 52px; font: 800 20px/1 var(--mono);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 48'%3E%3Cpath d='M22 2 41 13v22L22 46 3 35V13Z' fill='%23FFB000' stroke='%2317130D' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.step h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.step p { font-size: 15.5px; color: var(--ink-2); font-weight: 520; }
.step.hot { background: var(--honey-wash); }
.step .hold-note { margin-top: 4px; color: var(--ink); background: var(--card); }
.how-grid { display: grid; gap: 16px; margin-top: 16px; }
.money, .risk { padding: 18px; display: grid; gap: 6px; align-content: start; }
.money h3, .risk h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.money p, .risk p { font-size: 16px; font-weight: 560; }
.risk { background: var(--paper-2); }
.seat-math { margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.split { display: flex; margin-top: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; overflow: hidden; }
.split > div { flex: 1; display: flex; flex-direction: column; padding: 10px 12px; }
.split b { font: 700 22px/1.1 var(--mono); }
.split span { font-size: 13px; font-weight: 700; }
.sp-you { background: var(--honey); border-right: var(--bw) solid var(--ink); }
.sp-hive { background: var(--paper-2); }
.treasury-link { margin-top: 6px; font-size: 13px; font-weight: 700; width: fit-content; }

/* ---------- footer ---------- */
.foot { margin-top: 72px; background: var(--card); border-top: var(--bw) solid var(--ink); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 24px var(--gut) calc(32px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-note { flex-basis: 100%; font-size: 13.5px; color: var(--ink-2); font-weight: 550; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(34, 32, 28, .5); animation: fade .18s ease-out both; }
.modal-card {
  position: relative; width: 100%; max-width: 680px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); background: var(--card); border: var(--bw) solid var(--ink); border-bottom: 0;
  border-radius: 20px 20px 0 0; animation: sheet .26s cubic-bezier(.2, .9, .3, 1) both;
}
.x-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; padding: 0; font: 700 22px/1 var(--display); background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; }
.x-close:hover { background: var(--honey-wash); }
.w-card h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; padding-right: 44px; }
.w-card > p { margin-top: 4px; color: var(--ink-2); font-weight: 550; }
.wlist { display: grid; gap: 8px; margin-top: 16px; }
.wlist button, .wlist a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; font-size: 16.5px; font-weight: 750; text-align: left; text-decoration: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--sh-s); }
.wlist button:hover, .wlist a:hover { background: var(--honey-wash); }
.wlist button:disabled { opacity: .6; }
.wlist img, .wlist i { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.wlist i { background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.wlist .none { display: block; padding: 6px 2px; font-size: 15px; color: var(--ink-2); font-weight: 550; }
.w-msg { margin-top: 12px; padding: 10px 12px; font-weight: 650; font-size: 14.5px; background: var(--honey-wash); border: 2px solid var(--ink); border-radius: 10px; }
.w-guest { margin-top: 16px; padding-top: 14px; border-top: 1.5px dashed var(--line); display: grid; gap: 8px; justify-items: start; }
.w-guest p { font-size: 14px; color: var(--ink-2); font-weight: 550; }

/* robot profile */
.pf-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding-right: 44px; }
.pf-head .ava { width: 64px; height: 73px; }
.pf-head .ava svg { width: 100%; height: 100%; }
.pf-head h3 { font: 800 clamp(26px, 6vw, 34px)/1.05 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.pf-head p { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.pf-sec { margin-top: 18px; }
.pf-sec > h4 { margin: 0 0 8px; font: 800 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.pf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-stats > div { padding: 8px 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; min-width: 0; }
.pf-stats span { display: block; font: 800 10.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pf-stats b { display: block; font: 700 17px/1.25 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-rule { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 6px 0; }
.pf-hist { display: grid; gap: 6px; }
.pf-hist li > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 6px 10px; font-size: 13.5px; text-align: left; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; }
.pf-hist li > button:hover { background: var(--honey-wash); }
.pf-hist li .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 550; }
.pf-hist li ul { margin: 6px 0 2px; }
.pf-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pf-note { margin-top: 10px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pf-note a { color: var(--ink); font-weight: 750; }
.pf-loading { padding: 40px 0; text-align: center; font-weight: 700; color: var(--ink-3); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%);
  max-width: calc(100vw - 32px); width: max-content; padding: 12px 18px; font-size: 15px; font-weight: 700; line-height: 1.35; text-align: center;
  background: var(--ink); color: var(--paper); border-radius: 12px; box-shadow: 4px 4px 0 var(--honey); animation: toastIn .22s ease-out both;
}

/* =====================================================================================================================
   WAVE 2 — the hive thinks out loud, checks coins, calls them with receipts, rewinds rules, crowns a Queen, signs in by QR.
   Every piece is a sticker from the same kit: card paper, 2–2.5 px ink, hard offset shadows, honey as the one hot colour,
   a light halftone where print would put one. Green/red still only mean profit and loss.
   ===================================================================================================================== */
:root {
  --wax: #F4EFE4;
  --halftone: radial-gradient(circle at 50% 50%, rgba(34, 32, 28, .16) 0 1px, transparent 1.4px) 0 0 / 6px 6px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- honest tags ---------- */
.real.stage { background: var(--card); }
.mtag { display: inline-block; margin-right: 4px; padding: 0 6px; font: 800 10px/1.65 var(--display); letter-spacing: .09em; border: 1.5px solid var(--ink); border-radius: 5px; background: var(--honey); vertical-align: 1px; }
.mtag.rug { background: var(--loss-soft); color: var(--loss); border-color: var(--loss); }
.mtag.bond { background: var(--card); box-shadow: inset 0 -3px 0 var(--honey); }
.mtag.call { background: var(--card); }

/* ---------- hero: sign in with the phone ---------- */
.qr-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 2px; background: none; border: 0; font: 700 14.5px/1.2 var(--display); color: var(--ink-2); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--honey); width: fit-content; }
.qr-link svg { width: 20px; height: 20px; flex: none; color: var(--ink); }
.qr-link:hover { color: var(--ink); }

/* ---------- stats: seat bar + the Queen line ---------- */
.seatbar-wrap { display: grid; gap: 4px; margin-top: 6px; min-width: 0; }
.seatbar-wrap:empty { display: none; }
.seatbar { position: relative; display: block; height: 9px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.seatbar-fill { position: absolute; inset: 0; background: var(--honey); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--spring); }
.seatbar-t { font: 700 12px/1.25 var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small.q-line { color: var(--ink-2); }
.stat small.q-line b { font-weight: 700; }

/* ---------- 01 the thinking strip ---------- */
.think { margin-top: 12px; padding: 10px 12px 10px 14px; background: var(--paper); border: 2px solid var(--ink); border-left-width: 6px; border-left-color: var(--honey); border-radius: 12px; display: grid; gap: 6px; }
.th-born { display: flex; align-items: center; gap: 8px; font: 800 14px/1.3 var(--display); padding: 4px 10px; width: fit-content; background: var(--honey); border: 2px solid var(--ink); border-radius: 999px; animation: pop .3s var(--spring) both; }
.th-lines { display: grid; gap: 2px; }
.th-l { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; column-gap: 9px; min-height: 28px; font-size: 14.5px; font-weight: 600; line-height: 1.35; transition: opacity .3s ease; }
.th-l:nth-child(2) { opacity: .7; }
.th-l:nth-child(3) { opacity: .45; }
.th-l:first-child .th-x { font-weight: 700; }
.th-l.fresh { animation: thIn .35s ease-out both; }
.th-x { min-width: 0; overflow-wrap: anywhere; }
.th-x a { font-weight: 800; }
.th-l time { font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
.th-ico { position: relative; width: 18px; height: 20px; background: var(--hex-paper) center / contain no-repeat; }
.th-ico::after { position: absolute; inset: 0; display: grid; place-items: center; font: 800 11px/1 var(--mono); color: var(--ink); content: '…'; }
.k-hold .th-ico { background-image: var(--hex); } .k-hold .th-ico::after { content: '$'; }
.k-pause .th-ico::after { content: '‖'; }
.k-skip .th-ico::after { content: '×'; }
.k-hive .th-ico { background-image: var(--hex-ink); } .k-hive .th-ico::after { content: '×'; color: var(--honey); }
.k-near .th-ico { background-image: var(--hex); } .k-near .th-ico::after { content: '!'; }
.k-dodged .th-ico::after { content: '↓'; }
.k-missed .th-ico::after { content: '↑'; }
.th-bar { width: 64px; height: 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; }
.th-bar i { display: block; height: 100%; background: var(--honey); transform-origin: 0 50%; transition: transform .6s ease; }
.th-k { display: inline-block; padding: 0 5px; font: 700 11px/1.5 var(--mono); background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 5px; vertical-align: 1px; }
.th-more { font: 700 12px/1 var(--mono); color: var(--ink-3); }
.th-tally, .th-near { padding-top: 6px; border-top: 1.5px dashed var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.th-near { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink); }
.th-near .btn { margin-left: auto; }

/* ---------- rule lines + the part icons (the rule builds the body) ---------- */
.rule-lines li .rl-t, .rc-lines li .rl-t { min-width: 0; }
.parts { display: inline-flex; gap: 3px; margin-left: auto; align-self: center; flex: none; }
.part { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 2px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 7px; }
.part svg { width: 100%; height: 100%; }
.rc-lines li.new:has(.parts)::after { margin-left: 6px; }
.rule-lines li { align-items: center; }

/* ---------- REWIND inside the rule card ---------- */
.rw { margin: 2px 12px 8px; }
.rw-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; text-align: left; background: var(--honey-wash); border: 2px dashed var(--ink); border-radius: 12px; color: var(--ink); }
.rw-btn:hover { background: var(--honey-soft); border-style: solid; }
.rw-btn svg { width: 24px; height: 24px; flex: none; }
.rw-btn b { display: block; font-size: 14.5px; font-weight: 800; }
.rw-btn small { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rw-run { display: grid; gap: 6px; padding: 10px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; font-size: 13.5px; font-weight: 700; }
.rw-bar { display: block; height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; }
.rw-bar i { display: block; height: 100%; width: 92%; background: var(--honey); transform-origin: 0 50%; animation: rwFill 2.2s cubic-bezier(.2, .7, .3, 1) both; }
.rw-err { padding: 8px 10px; font-size: 13.5px; font-weight: 650; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; margin-bottom: 6px; }
.rw.done { padding: 10px 12px 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; animation: pop .3s ease-out both; }
.rw-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 700 11.5px/1.3 var(--mono); color: var(--ink-2); }
.rw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-new::before { content: ''; width: 16px; height: 5px; border-radius: 3px; background: var(--honey); box-shadow: 0 0 0 1.5px var(--ink); }
.lg-old::before { content: ''; width: 16px; height: 0; border-top: 2.5px dashed var(--ink); opacity: .7; }
.rw-span { margin-left: auto; text-transform: uppercase; letter-spacing: .06em; }
.rw-chart { display: block; width: 100%; height: auto; margin: 6px 0 4px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 9px; }
.rw-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.rw-big b { font: 700 clamp(22px, 5.6vw, 28px)/1.1 var(--mono); letter-spacing: -0.02em; }
.rw-big b.dim { font-size: clamp(16px, 4vw, 19px); opacity: .75; }
.rw-big span { font: 800 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rw-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rw-say { margin-top: 6px; padding-left: 10px; font-size: 14.5px; font-weight: 750; line-height: 1.35; border-left: 4px solid var(--line); }
.rw-say.up { border-left-color: var(--win); }
.rw-say.down { border-left-color: var(--loss); }
.rw-vs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rw-vs button { padding: 4px 10px; font-size: 12.5px; font-weight: 700; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; }
.rw-vs button:hover { background: var(--honey-wash); }
.rw-vs button.on { background: var(--honey); }
.rw-fine { margin-top: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

/* ---------- 02 check any coin ---------- */
.ask { margin-bottom: 18px; }
.ask-form { padding: 12px 14px 14px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); }
.ask-k { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 9px; }
.ask-k b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.ask-sub { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.ask-hex { width: 16px; height: 18px; background: var(--hex) center / contain no-repeat; }
.ask-row { display: flex; gap: 8px; }
.ask-in { flex: 1; min-width: 0; height: 48px; padding: 0 14px; font-size: 15px; font-weight: 600; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.ask-in:focus { outline: 3px solid var(--honey); outline-offset: 0; background: var(--card); }
.ask-in::placeholder { color: var(--ink-3); font-family: var(--display); font-weight: 600; }
.ask-paste { flex: none; padding: 0 12px; font-size: 14px; font-weight: 750; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.ask-go { min-height: 48px; }
.ask.busy .ask-go { opacity: .7; }
.ask-out:empty { display: none; }
.ask-out { margin-top: 12px; }
.verdict { position: relative; display: grid; gap: 8px; padding: 14px 16px 14px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); max-width: 760px; }
.verdict.v-likes { box-shadow: 5px 5px 0 var(--honey-deep); }
.verdict.v-msg, .verdict.v-wait { display: flex; align-items: center; gap: 10px; padding: 12px 16px; box-shadow: var(--sh-s); font-weight: 650; }
.verdict.v-err { background: var(--paper); }
.vd-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; font: 700 19px/1 var(--display); background: var(--paper); border: 2px solid var(--ink); border-radius: 9px; }
.vd-x:hover { background: var(--honey-wash); }
.vd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-right: 38px; }
.vd-sym { font: 700 clamp(24px, 6vw, 32px)/1.05 var(--mono); letter-spacing: -0.02em; }
.vd-name { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.vd-meta { flex-basis: 100%; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.vd-link { margin-left: 6px; font-weight: 700; color: var(--ink); }
.vd-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; }
.vd-spark { width: 100%; max-width: 360px; height: auto; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--paper); }
.vd-stamp { justify-self: end; transform: rotate(-6deg); padding: 3px; border: 3px solid currentColor; border-radius: 10px; color: var(--ink); }
.vd-stamp span { display: block; padding: 7px 12px; font: 800 clamp(14px, 3.6vw, 18px)/1.05 var(--display); letter-spacing: .06em; text-align: center; border: 1.5px solid currentColor; border-radius: 6px; max-width: 13ch; }
.vd-stamp.s-likes { color: var(--ink); background: var(--honey); }
.vd-stamp.s-skips { color: var(--loss); background: var(--loss-soft); }
.vd-stamp.s-unknown { color: var(--ink); background: var(--halftone), var(--card); }
.verdict.slam .vd-stamp { animation: slam .42s var(--spring) both; }
.vd-setup { font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.vd-setup span { display: inline-block; margin-right: 8px; padding: 0 6px; font: 800 10.5px/1.7 var(--display); letter-spacing: .08em; text-transform: uppercase; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 5px; vertical-align: 1px; }
.vd-stats { font-size: 14px; font-weight: 600; }
.vd-stats b { font-size: 17px; }
.vd-facts { display: grid; gap: 4px; padding-top: 8px; border-top: 1.5px dashed var(--line); }
.vd-facts li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 600; }
.vd-facts li::before { content: ''; flex: none; width: 8px; height: 9px; background: var(--ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transform: translateY(-1px); }
.vd-facts .who, .verdict .who { padding: 0; border: 0; background: none; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.vd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-fine { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.vd-big { font-size: 17px; font-weight: 750; }
.vd-dots { display: inline-flex; gap: 5px; }
.vd-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); animation: dots 1s ease-in-out infinite; }
.vd-dots i:nth-child(2) { animation-delay: .15s; }
.vd-dots i:nth-child(3) { animation-delay: .3s; }

/* ---------- 02 setup rows: teach / show in brain ---------- */
.hb-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------- 02 the hive's calls (pick card head + receipts) ---------- */
.hb-pick { gap: 10px; }
.pick-now { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pick-now .k { font: 800 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.pick-now .sym { font: 700 clamp(26px, 6vw, 34px)/1.05 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-now .lab { font-size: 14.5px; font-weight: 650; }
.pick-now .meta { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pick-now .btn { align-self: flex-start; margin-top: 4px; }
.calls { display: grid; gap: 10px; min-width: 0; }
.calls:empty { display: none; }
.cl-live { display: grid; gap: 8px; padding: 10px 12px; background: var(--honey-wash); border: 2px solid var(--ink); border-radius: 12px; }
.cl-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cl-head b { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; font: 800 10.5px/1.75 var(--display); letter-spacing: .08em; background: var(--ink); color: var(--honey); border-radius: 5px; flex: none; }
.cl-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--honey); animation: pulse 1.6s ease-in-out infinite; }
.cl-timer { margin-left: auto; padding: 2px 8px; font-size: 13px; font-weight: 700; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; flex: none; }
.cl-line { display: block; width: 100%; height: auto; background: var(--card); border: 1.5px solid var(--ink); border-radius: 9px; }
.cl-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.cl-nums span { display: grid; gap: 1px; min-width: 0; }
.cl-nums small { font: 800 10px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cl-nums b { font-size: 15px; font-weight: 700; }
.calls-today { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.calls-today b { color: var(--ink); }
.calls-rc-head { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.calls-rc-head b { font-weight: 800; }
.calls-rc-head span { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.calls-list { display: grid; gap: 0; }
.calls-list .rc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 0; border-bottom: 1.5px solid var(--line); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.calls-list .rc:last-child { border-bottom: 0; }
.rc-stamp { display: inline-grid; place-items: center; min-width: 58px; padding: 1px 6px; font-size: 12px; font-weight: 700; border: 2px solid var(--ink); border-radius: 7px; transform: rotate(-3deg); background: var(--card); }
.rc-win .rc-stamp { background: var(--honey); }
.rc-died .rc-stamp { color: var(--loss); border-color: var(--loss); background: var(--loss-soft); font-family: var(--display); font-weight: 800; letter-spacing: .06em; }
.rc-x { min-width: 0; overflow-wrap: anywhere; }
.rc-sub { display: block; font-size: 12px; color: var(--ink-3); }
.rc-sub time { font-family: var(--mono); }
.calls-more { justify-self: start; padding: 4px 10px; font-size: 13px; font-weight: 750; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; }
.calls-empty { font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* ---------- 03 leaderboard: hats, crowns, the Queen's line, UP tickets ---------- */
.lb-bot .ava-s { grid-row: 1 / span 2; width: 24px; height: 28px; }
.lb-bot .ava-s svg { width: 100%; height: 100%; overflow: visible; }
.lb-bot .nm .beats { display: inline-grid; width: 18px; height: 12px; margin-right: 5px; flex: none; }
.lb-bot .nm .beats svg { width: 100%; height: 100%; }
.tag.up { background: var(--ink); color: var(--honey); border-color: var(--ink); }
.lb-q.half { background: var(--honey-soft); }
.lb-q.half::after { content: ''; position: absolute; left: 8px; top: 10px; width: 6px; height: 3px; background: var(--ink); border-radius: 2px; }
.lb-hats { flex-basis: 100%; margin-top: 2px; font: 700 12.5px/1.4 var(--mono); color: var(--ink); }
.lb-queen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 14px; background: var(--honey-wash); border-top: 2.5px dashed var(--honey-deep); border-bottom: 2.5px dashed var(--honey-deep); cursor: pointer; }
.lb-queen:hover { background: var(--honey-soft); }
.lb-queen > b, .lb-queen .q-open { font: 800 12.5px/1.3 var(--display); letter-spacing: .12em; }
.lb-queen .q-open { padding: 0; background: none; border: 0; color: var(--ink); }
.lb-queen .q-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.lb-queen .mono { font-weight: 700; font-size: 14px; }
.lb-queen .q-v { padding: 0 6px; font-size: 11.5px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; }
.lb-queen .q-say { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.q-crown { display: inline-grid; width: 24px; height: 16px; }
.q-crown svg { width: 100%; height: 100%; }

/* ---------- 05 feed: the new kinds ---------- */
.feed-list li.k-coin { grid-template-columns: 14px minmax(0, 1fr) auto auto; }
.ask-chip { align-self: center; padding: 2px 9px; font: 750 12px/1.5 var(--display); background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; }
.ask-chip:hover { background: var(--honey); }
.feed-list li.k-moment, .feed-list li.k-queen, .feed-list li.k-claim { background: var(--honey-wash); }
.feed-list li.k-milestone { background: var(--honey-soft); }
.feed-list li.k-milestone .d, .feed-list li.k-queen .d { clip-path: none; background: var(--hex) center / contain no-repeat; }
.feed-list li.k-call .x b.mono { font-weight: 700; }

/* ---------- the wallet box: the QR block ---------- */
.w-card { display: flex; flex-direction: column; }
.w-card > * { order: 2; }
.w-card > h3, .w-card > h3 + p, .w-card > .x-close { order: 0; }
.qr-first .w-card > .w-qr { order: 1; }
.qr-first .w-card > .w-qr { margin-top: 16px; }
.wlist i { background: var(--wl, var(--honey)); }
.wlist .go { margin-left: auto; font-size: 15px; }
.wlist p.none + a, .wlist p.none + button { margin-top: 2px; }
.w-qr { margin-top: 16px; }
.w-qr.qr-none, .w-qr:empty { display: none; }
.w-qr-open { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; text-align: left; background: var(--honey-wash); border: 2px dashed var(--ink); border-radius: 12px; color: var(--ink); }
.w-qr-open:hover { background: var(--honey-soft); border-style: solid; }
.w-qr-open svg { width: 28px; height: 28px; flex: none; }
.w-qr-open b { display: block; font-size: 16px; font-weight: 800; }
.w-qr-open small { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.w-qr-open .go { margin-left: auto; font-style: normal; font: 800 18px/1 var(--display); }
.qr-card { position: relative; display: grid; gap: 10px; padding: 14px; background: var(--honey-wash); border: var(--bw) solid var(--ink); border-radius: 16px; box-shadow: var(--sh); overflow: hidden; }
.qr-card.busy { justify-items: center; text-align: center; }
.qr-head { display: flex; align-items: center; gap: 10px; }
.qr-head b { font-size: 17px; font-weight: 800; }
.qr-timer { margin-left: auto; padding: 2px 9px; font-size: 13px; font-weight: 700; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; }
.qr-main { display: grid; gap: 14px; align-items: start; }
.qr-box { display: grid; place-items: center; width: min(220px, 100%); aspect-ratio: 1; padding: 8px; background: var(--honey-soft); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); justify-self: center; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-spin { width: 34px; height: 38px; background: var(--hex) center / contain no-repeat; animation: spinHex 1s linear infinite; }
.qr-side { display: grid; gap: 6px; align-content: start; min-width: 0; }
.qr-code { display: flex; align-items: center; gap: 10px; }
.qr-code small { font: 800 10.5px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.qr-code b { padding: 3px 10px 3px 12px; font-size: 26px; font-weight: 700; letter-spacing: .2em; background: var(--ink); color: var(--honey); border-radius: 9px; }
.qr-l { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.qr-l.small { font-size: 13px; color: var(--ink-2); }
.qr-pay { justify-self: start; margin-top: 4px; }
/* the vault wallet for a send by hand: full address on wide screens, shortened in the middle on phones */
.qr-to { display: grid; gap: 3px; min-width: 0; }
.qr-to small { font: 800 10.5px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.qr-addr { display: block; padding: 6px 9px; font-size: 13px; font-weight: 700; line-height: 1.35; background: var(--card); border: 2px solid var(--ink); border-radius: 9px; overflow-wrap: anywhere; word-break: break-all; }
.qr-addr-short { display: none; }
.qr-card.phone .qr-addr-full { display: none; }
.qr-card.phone .qr-addr-short { display: inline; }
.qr-copy { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-copy .btn { flex: 1 1 auto; justify-content: center; }
.qr-cp { min-height: 46px; font-size: 16px; }
.qr-copy .btn.ok { background: var(--honey); }
.qr-code-l b { padding: 0 6px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; }
/* the INSIDER line: one big "Send 0.001234 SOL from your phone wallet", then the code, then waiting */
.qr-send { font: 800 clamp(18px, 4.6vw, 22px)/1.2 var(--display); }
.qr-send b { padding: 0 6px; background: var(--honey); border: 2px solid var(--ink); border-radius: 8px; white-space: nowrap; }
.qr-wait { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 700; border: 2px dashed var(--ink-3); border-radius: 10px; }
.qr-wait .qr-spin { width: 20px; height: 22px; flex: none; }
.qr-card.done .qr-send { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .qr-wait .qr-spin { animation: none; } }
.qr-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 8px; border-top: 1.5px dashed var(--ink-3); }
.qr-free { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.qr-err { font-size: 14.5px; font-weight: 650; }
.qr-fail { padding: 10px; font-size: 13px; font-weight: 650; text-align: center; }
.qr-card.done .qr-box, .qr-card.done .qr-side { opacity: .55; }
.qr-stamp { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%) rotate(-8deg); padding: 4px; border: 4px solid var(--ink); border-radius: 14px; background: var(--honey); box-shadow: 5px 5px 0 var(--ink); pointer-events: none; }
.qr-stamp span { display: block; padding: 10px 20px; font: 800 clamp(26px, 7vw, 38px)/1 var(--display); letter-spacing: .06em; border: 2px solid var(--ink); border-radius: 9px; white-space: nowrap; }
.qr-stamp.hit { animation: stampHit .5s var(--spring) both; }

@keyframes thIn { from { transform: translateY(-6px); opacity: 0; } }
@keyframes rwFill { from { transform: scaleX(0); } }
@keyframes slam { 0% { transform: scale(1.7) rotate(-16deg); opacity: 0; } 55% { transform: scale(.94) rotate(-5deg); opacity: 1; } 100% { transform: rotate(-6deg); } }
@keyframes stampHit { 0% { transform: translate(-50%, -50%) scale(1.4) rotate(-14deg); opacity: 0; } 14% { transform: translate(-50%, -50%) scale(1.4) rotate(-14deg); opacity: 1; } 60% { transform: translate(-50%, -50%) scale(.96) rotate(-7deg); } 100% { transform: translate(-50%, -50%) rotate(-8deg); } }
@keyframes spinHex { to { transform: rotate(360deg); } }

@media (min-width: 560px) {
  .qr-main { grid-template-columns: 200px minmax(0, 1fr); }
  .qr-box { width: 200px; }
}
@media (max-width: 479px) {
  .qr-addr-full { display: none; }
  .qr-addr-short { display: inline; }
  .ask-row { flex-wrap: wrap; }
  .ask-in { flex-basis: 100%; }
  .ask-go { flex: 1; }
  .vd-body { grid-template-columns: minmax(0, 1fr); }
  .vd-stamp { justify-self: start; }
  .th-l { grid-template-columns: 20px minmax(0, 1fr); }
  .th-l time, .th-l .th-bar { grid-column: 2; justify-self: start; }
  .lb-queen .q-say { margin-left: 0; flex-basis: 100%; }
}

/* ---------- motion ---------- */
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .7; } }
@keyframes drop { from { transform: translateY(-18px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lift { to { transform: translateY(-10px); opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes feedIn { from { transform: translateY(-8px); opacity: 0; background-color: var(--honey-wash); } 60% { background-color: var(--honey-wash); } to { transform: none; opacity: 1; } }
@keyframes flash { from { background-color: var(--honey-soft); } }
@keyframes dots { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- small phones ---------- */
@media (max-width: 380px) {
  .logo-word { display: none; }
  .has-ca .top-r #xBtn { display: none; }      /* the X link is in the footer too */
  .live { padding: 0 7px; }
  .btn.big { padding: 0 18px; font-size: 16px; }
}

/* ---------- tablets and up ---------- */
@media (min-width: 640px) {
  .pill .ca-v { display: inline; }
}
@media (min-width: 560px) {
  .stats-in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:not(.wide) { border-right: 1.5px solid var(--ink); }
  .stat:nth-child(4) { border-right: 0; }
  .stat.wide { grid-column: 1 / -1; }
  .robot-out { grid-template-columns: 180px minmax(0, 1fr); padding: 28px; gap: 28px; }
  .ro-art { width: 180px; height: 180px; }
  .robot-in { padding: 20px; }
  .rb-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rb-actions { grid-column: auto; justify-content: flex-end; }
  .rb-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lb-head, .lb-row { grid-template-columns: 40px minmax(0, 1fr) 112px 84px 56px 70px; }
  .lb-head { display: grid; gap: 10px; padding: 8px 14px; border-bottom: 2px solid var(--ink); font: 800 11px/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
  .lb-head span:nth-child(3), .lb-head span:nth-child(4) { text-align: right; }
  .lb-head span:nth-child(5) { text-align: center; }
  .lb-tr, .lb-q { display: block; }
  .lb-bot .tr-inline { display: none; }
  .works-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .modal { align-items: center; padding: 24px; }
  .modal-card { border-bottom: var(--bw) solid var(--ink); border-radius: 20px; box-shadow: 8px 8px 0 var(--ink); padding: 26px 26px 24px; animation-name: pop; }
  .pf-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  :root { --gut: 24px; }
  .sec { padding-top: 80px; }
  .top-r .pill.me { display: inline-flex; }
  .hero-name { font-size: clamp(56px, 8.6vw, 104px); }
  .arena-wrap { height: 64vh; height: 64svh; min-height: 480px; max-height: 820px; }
  .hero {
    top: 0; right: auto; width: min(560px, 50%); padding: 40px 36px 40px var(--gut); display: flex; flex-direction: column; justify-content: center;
    background: linear-gradient(90deg, rgba(236, 232, 223, .96) 0%, rgba(236, 232, 223, .86) 62%, rgba(236, 232, 223, 0) 100%);
  }
  .hero-name { text-shadow: 4px 4px 0 var(--honey); }
  .arena-hud { left: auto; width: min(440px, 46%); top: 16px; right: var(--gut); }
  .stage-sub { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
  .how-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .hdr-count { display: inline-block; }
}
@media (min-width: 1360px) {
  .nav { display: flex; }
}
@media (min-width: 1000px) {
  .arena-wrap { height: 70vh; height: 70svh; min-height: 540px; max-height: 880px; }
  .stats-in { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr); }
  .stat { border-bottom: 0; padding: 14px 20px 15px; }
  .stat:nth-child(4) { border-right: 1.5px solid var(--ink); }
  .stat.wide { grid-column: auto; border-right: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .stat.wide .v { order: 0; }
  .stat.wide small { order: 0; flex-basis: auto; }
  .rb-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; gap: 18px; }
  .chat-log { height: clamp(340px, 52vh, 500px); }
  .works-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lb-head, .lb-row { grid-template-columns: 44px minmax(0, 1fr) 128px 96px 60px 76px; padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 479px) {
  .top-in { gap: 8px; }
  /* with a CA pill + X + Buy in the bar, the hex mark alone is the logo (the hero says HIVEMIND right below) */
  .has-ca .logo-word { display: none; }
  .hero-btns .btn.big { min-height: 46px; padding: 0 16px; font-size: 16px; }
  .arena-hud .brain-ticker { font-size: 12.5px; padding: 6px 10px; }
}
@media (hover: none) {
  .btn:hover { transform: none; box-shadow: 4px 4px 0 var(--ink); }
  .btn.sm:hover { box-shadow: 3px 3px 0 var(--ink); }
  .btn.xs:hover { box-shadow: 2px 2px 0 var(--ink); }
}

/* ---------- wave 3: seat tiers, the Queen's seat, the buyback fund, FIRED (BULLISH.md) ----------
   Tier badges are little paper stickers: WORKER plain, GUARD a helmet stripe, ROYAL honey, QUEEN ink + honey.
   No red here: FIRED is an ink stamp (green/red stay for P&L only). */
.tier { display: inline-block; flex: none; padding: 0 6px; font: 800 10px/1.6 var(--display); font-style: normal; letter-spacing: .09em; color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 5px; vertical-align: 1px; white-space: nowrap; }
.tier.t-guard { background: var(--paper-3); box-shadow: inset 0 -3px 0 var(--ink-2); }
.tier.t-royal { background: var(--honey); box-shadow: 2px 2px 0 var(--ink); }
.tier.t-queen { background: var(--ink); color: var(--honey); }
.st-card header small { display: flex; align-items: center; gap: 6px; min-width: 0; }
.st-card header small > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-card.queen header { background: var(--honey); }
.st-card.queen header small { color: var(--ink-2); }
.st-card.queen:not(.me) { box-shadow: 5px 5px 0 var(--honey-deep); }
.settled-list .main .tier { margin-right: 2px; }
/* the stage's rule lines (app.js adds them under the seats line when the page has none of its own) */
.bb-line { margin-top: 10px; max-width: 36ch; font-size: 14.5px; font-weight: 750; line-height: 1.35; color: var(--ink); }
.bb-line.bb-fired { margin-top: 4px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
/* the buyback fund in the vault: the rule line always, the numbers only when they are real */
.fund-wrap { display: grid; gap: 6px; margin-top: 12px; min-width: 0; }
.fund-wrap:empty, .fund-wrap[hidden] { display: none; }
.fund-rule { font-size: 15px; font-weight: 750; line-height: 1.35; }
.fund-nums { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.fund-n { display: flex; flex-direction: column; min-width: 0; }
.fund-n b { font: 700 clamp(22px, 2.2vw, 30px)/1 var(--mono); letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fund-n span { margin-top: 5px; font: 800 10.5px/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.fund-n small { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.fund-last, .fund-wait { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
.fund-wait { padding: 4px 9px; width: fit-content; max-width: 100%; background: var(--honey-wash); border: 1.5px solid var(--ink); border-radius: 8px; }
/* feed: a buyback is honey news, a firing an ink stamp */
.mtag.buy { background: var(--honey); box-shadow: 2px 2px 0 var(--ink); }
.mtag.fired { background: var(--ink); color: var(--paper); transform: rotate(-2deg); }
.feed-list li.k-buyback { background: var(--honey-soft); }
.feed-list li.k-buyback .d { clip-path: none; background: var(--hex) center / contain no-repeat; }
.feed-list li.k-fired { background: var(--paper-2); }

/* ---------- phones ---------- */
@media (max-width: 719px) {
  /* the hero sits under the arena, not over it: on a phone an overlay hid most of the robots, the brain and the stage */
  .arena-wrap { height: auto; min-height: 0; max-height: none; }
  .arena, .arena-still { position: relative; inset: auto; height: 46vh; height: 46svh; min-height: 280px; max-height: 420px; }
  .hero { position: relative; padding: 16px var(--gut) 20px; background: var(--paper); border-top: var(--bw) solid var(--ink); pointer-events: auto; }
  .hero-sub { max-width: none; }
  /* inner lists stay well under a screen tall, so there is always page left to grab */
  .lb { max-height: 60vh; max-height: 60svh; }
  .feed-list { height: 60vh; height: 60svh; min-height: 300px; }
  .real-list, .settled-list { max-height: 50vh; max-height: 50svh; }
}
/* touch: a list that hits its end hands the swipe back to the page ('contain' trapped the page under a thumb) */
@media (max-width: 719px), (pointer: coarse) {
  .lb, .feed-list { overscroll-behavior-y: auto; }
}
/* fingers need bigger targets than a mouse: Fork and Use sit in long lists */
@media (pointer: coarse) {
  .btn.xs { min-height: 40px; min-width: 44px; }
  .icon-btn { width: 40px; height: 40px; }
}
