/* ─── Young Bull · v2 redesign ─────────────────────────────────────
   Calm-technical. Perplexity + Vercel. Inter + JetBrains Mono only.
   No em-dashes in copy. No gradients. No shadows except subtle card lift.
   ─────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Surfaces */
  --bg: #0c0d10;
  --bg-elev: #131419;
  --bg-hover: #181b21;
  --bg-sunk: #08090b;

  /* Hairlines */
  --line: #1c1f25;
  --line-soft: #15171c;
  --line-strong: #2a2e36;

  /* Three text values only */
  --ink: #ffffff;            /* headlines */
  --ink-body: #c8cbd0;       /* soft white body */
  --ink-mute: #6b7280;       /* labels */
  --ink-faint: #3f444d;

  /* Accent */
  --gold: #d4a843;
  --gold-soft: rgba(212, 168, 67, 0.08);
  --gold-line: rgba(212, 168, 67, 0.35);

  /* Semantic */
  --gain: #22c55e;
  --loss: #ef4444;

  /* Type */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-med: 240ms;
  --t-slow: 380ms;

  /* Spacing scale */
  --gap-2: 4px;
  --gap-3: 8px;
  --gap-4: 12px;
  --gap-5: 16px;
  --gap-6: 24px;
  --gap-7: 32px;
  --gap-8: 48px;
  --gap-9: 64px;
  --gap-10: 96px;
  --gap-11: 128px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
::selection { background: var(--gold); color: var(--bg); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ─── LAYOUT ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.measure { max-width: 640px; }
.measure-wide { max-width: 760px; }

/* ─── NAV ───────────────────────────────────────────────────────── */
.yb-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(12, 13, 16, 0.78);
  backdrop-filter: saturate(1.1) blur(10px);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--line);
}
.yb-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 32px;
}
.yb-mark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.yb-mark .dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
}
.yb-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.yb-nav-links a {
  color: var(--ink-mute);
  transition: color var(--t-fast) var(--ease);
  padding: 4px 0;
  position: relative;
}
.yb-nav-links a:hover { color: var(--ink); }
.yb-nav-links a[aria-current="page"] { color: var(--ink); }
.yb-nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -22px;
  height: 1px; background: var(--gold);
}
.yb-nav-cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  border-radius: 2px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.yb-nav-cta:hover { border-color: var(--gold); }
@media (max-width: 720px) {
  .yb-nav-links { display: none; }
}

/* ─── TYPE ─────────────────────────────────────────────────────── */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker .live-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: yb-pulse 2s ease-in-out infinite;
}
@keyframes yb-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .kicker .live-dot { animation: none; } }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.headline {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-size: clamp(56px, 9vw, 112px);
  margin: 0;
}
.headline-md {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.028em;
  line-height: 1.02;
  font-size: clamp(36px, 5vw, 56px);
  margin: 0;
}
.headline-sm {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0;
}

.subhead {
  font-family: var(--sans);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.5;
  color: var(--ink-body);
  letter-spacing: -0.005em;
  max-width: 56ch;
  text-wrap: pretty;
}

.body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-body);
  letter-spacing: -0.003em;
  text-wrap: pretty;
}
.body strong { color: var(--ink); font-weight: 600; }

/* ─── BUTTONS ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 18px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  cursor: pointer;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn .arrow {
  display: inline-block;
  transition: transform var(--t-fast) var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #0c0d10;
}
.btn-gold:hover { background: #e2b94f; border-color: #e2b94f; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-body);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--line-strong); background: var(--bg-elev); }

/* ─── SECTIONS ─────────────────────────────────────────────────── */
.section {
  padding: clamp(64px, 9vw, 128px) 0;
  position: relative;
}
.section-sm { padding: clamp(48px, 6vw, 88px) 0; }

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ─── RECEIPTS RIBBON ──────────────────────────────────────────── */
.receipts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.receipts .cell {
  padding: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.receipts .cell:first-child { border-left: 0; }
.receipts .num-big {
  font-family: var(--mono);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.receipts .num-big.gain { color: var(--gain); }
.receipts .num-big.loss { color: var(--loss); }
.receipts .cell-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 8px;
}
.receipts .cell-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.receipts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  gap: 16px;
}
.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 5px 10px;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  background: var(--gold-soft);
}
.live-tag .dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: yb-pulse 2s ease-in-out infinite;
}
@media (max-width: 760px) {
  .receipts { grid-template-columns: 1fr; }
  .receipts .cell { border-left: 0; border-top: 1px solid var(--line); }
  .receipts .cell:first-child { border-top: 0; }
}

/* ─── ANCHORS GRID ─────────────────────────────────────────────── */
.anchors {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.anchor {
  padding: clamp(20px, 2vw, 28px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
  transition: background var(--t-fast) var(--ease);
  position: relative;
}
.anchor:hover { background: var(--bg-elev); }
.anchor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.anchor-ticker {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1;
}
.anchor-pct {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.anchor-pct.gain { color: var(--gain); }
.anchor-pct.loss { color: var(--loss); }
.anchor-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: -8px;
}
.anchor-thesis {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-body);
  margin: 0;
  text-wrap: pretty;
  flex: 1;
}
.anchor-foot {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 1080px) { .anchors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .anchors { grid-template-columns: 1fr; } }

/* ─── TERMINAL (hero, ambitious direction) ─────────────────────── */
.terminal {
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-body);
  padding: 16px 0 0;
  overflow: hidden;
  height: 380px;
  display: flex;
  flex-direction: column;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.terminal-bar .dots {
  display: inline-flex;
  gap: 6px;
}
.terminal-bar .dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.terminal-body {
  padding: 14px 18px 18px;
  flex: 1;
  overflow-x: hidden;
  word-break: break-word;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 36px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 36px), transparent 100%);
}
.terminal-line {
  white-space: pre;
  color: var(--ink-body);
  font-size: 12.5px;
  letter-spacing: 0;
  opacity: 1;
  animation: term-in 240ms var(--ease) both;
}
.terminal-line.t-time { color: var(--ink-faint); }
.terminal-line .t-time { color: var(--ink-faint); }
.terminal-line .t-tag  { color: var(--gold); }
.terminal-line .t-ok   { color: var(--gain); }
.terminal-line .t-info { color: var(--ink); }
.terminal-line .t-mute { color: var(--ink-mute); }
@keyframes term-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.terminal-foot {
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.terminal-foot .count {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ─── FOOTER ───────────────────────────────────────────────────── */
.yb-foot {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.yb-foot-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.yb-foot-links {
  display: flex;
  gap: 24px;
  letter-spacing: 0.06em;
}
.yb-foot-links a { color: var(--ink-body); transition: color var(--t-fast) var(--ease); }
.yb-foot-links a:hover { color: var(--gold); }
.yb-foot-meta {
  display: flex;
  gap: 24px;
  letter-spacing: 0.04em;
}
.yb-foot-manifesto {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: -0.01em;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.yb-foot-manifesto em { font-style: italic; color: var(--ink-body); }
.yb-foot-disclosure {
  flex: 1 1 100%;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  line-height: 1.65;
  max-width: 86ch;
}

/* ─── HEADLINE WORD REVEAL ─────────────────────────────────────── */
/* Default visible. Only animate when JS marks parent as ready. */
.reveal-word { display: inline-block; }
[data-reveal-ready] .reveal-word {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
  animation: reveal-in 700ms var(--ease) forwards;
}
@keyframes reveal-in {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal-ready] .reveal-word { opacity: 1; transform: none; filter: none; animation: none; }
}

/* ─── SCROLL REVEAL ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ─── DIGIT ROLL (agent count) ─────────────────────────────────── */
.roll {
  display: inline-flex;
  font-variant-numeric: tabular-nums;
}
.roll .grp { display: inline-block; }
.roll .d {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  overflow: hidden;
  vertical-align: bottom;
  position: relative;
}
.roll .d-col {
  display: flex;
  flex-direction: column;
  transition: transform 480ms var(--ease);
  line-height: 1.1em;
}
.roll .d-col span { height: 1.1em; }

/* ─── TABLES (portfolio) ───────────────────────────────────────── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th, .tbl td {
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl tr { transition: background var(--t-fast) var(--ease); }
.tbl tbody tr:hover { background: var(--bg-elev); }
.tbl .ticker { font-family: var(--mono); font-weight: 600; color: var(--ink); letter-spacing: 0.02em; }
.tbl .gain { color: var(--gain); }
.tbl .loss { color: var(--loss); }
.tbl .name { color: var(--ink-body); }
.tbl .sleeve {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  color: var(--ink-mute);
  border-radius: 2px;
}
.tbl .sleeve.core     { color: var(--gold);   border-color: var(--gold-line); }
.tbl .sleeve.frontier { color: #a78bfa;       border-color: rgba(167,139,250,0.35); }
.tbl .sleeve.neutral  { color: var(--ink-mute); }

/* ─── KEY-VALUE TABLE (command/pro) ────────────────────────────── */
.kv {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-top: 1px solid var(--line);
}
.kv > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.kv > .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.kv > .v { color: var(--ink-body); }
.kv > .v .mono { color: var(--ink); }
@media (max-width: 720px) { .kv { grid-template-columns: 1fr; } .kv > .k { padding-bottom: 0; border-bottom: 0; } }

/* ─── BADGES ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 4px 8px;
}
.badge.live { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.badge.live .d { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; animation: yb-pulse 2s ease-in-out infinite; }
.badge.gain { color: var(--gain); border-color: rgba(34,197,94,0.35); }
.badge.loss { color: var(--loss); border-color: rgba(239,68,68,0.35); }

/* ─── COMMAND PAGE: AGENT STREAM ───────────────────────────────── */
.stream {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-sunk);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-body);
  overflow: hidden;
}
.stream-row {
  display: grid;
  grid-template-columns: 110px 88px 1fr 80px;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.stream-row:last-child { border-bottom: 0; }
.stream-row .t { color: var(--ink-faint); font-size: 11px; }
.stream-row .agent { color: var(--gold); font-size: 11px; }
.stream-row .msg { color: var(--ink-body); }
.stream-row .status { color: var(--ink-mute); text-align: right; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.stream-row .status.ok { color: var(--gain); }
@media (max-width: 720px) {
  .stream-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
  .stream-row .status { text-align: left; }
}

/* ─── PROSE BLOCK ─────────────────────────────────────────────── */
.prose p { margin: 0 0 1.2em; }
.prose p:last-child { margin-bottom: 0; }
.prose .lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ─── PRICE TICKER WIGGLE EFFECT ───────────────────────────────── */
.wiggle-up   { animation: wiggle-up 600ms var(--ease); }
.wiggle-down { animation: wiggle-down 600ms var(--ease); }
@keyframes wiggle-up   { 0% { color: var(--gain); } 100% { } }
@keyframes wiggle-down { 0% { color: var(--loss); } 100% { } }

/* ─── ASCII STACK DIAGRAM ─────────────────────────────────────── */
.stack-diagram {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  white-space: pre;
  line-height: 1.65;
  letter-spacing: 0;
}
.stack-diagram b { color: var(--gold); font-weight: 500; }
.stack-diagram em { color: var(--ink-body); font-style: normal; }

/* ─── COMMAND PALETTE (Cmd+K) ──────────────────────────────────── */
#yb-palette-root {
  position: fixed; inset: 0; z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 160ms var(--ease);
}
#yb-palette-root.open { opacity: 1; pointer-events: auto; }
.yb-palette-overlay {
  position: absolute; inset: 0;
  background: rgba(8, 9, 11, 0.62);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
}
.yb-palette {
  position: absolute;
  top: 14vh; left: 50%;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 32px));
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--sans);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.yb-palette-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.yb-palette-prompt {
  font-family: var(--mono); color: var(--gold); font-size: 14px;
}
.yb-palette-input {
  flex: 1;
  background: transparent; border: 0; outline: 0;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  letter-spacing: -0.01em;
}
.yb-palette-input::placeholder { color: var(--ink-faint); }
.yb-palette-mode {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 3px 7px;
}
#yb-palette-root.quinn .yb-palette-mode {
  color: var(--gold);
  border-color: rgba(212, 168, 67, 0.35);
}
.yb-palette-hint {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 3px 7px;
}
.yb-palette-results { overflow-y: auto; padding: 8px 0; }
.yb-palette-grp {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; color: var(--ink-mute);
  padding: 14px 16px 6px;
}
.yb-palette-row {
  display: grid;
  grid-template-columns: 1fr auto 64px;
  gap: 16px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.yb-palette-row.active { background: var(--bg-hover); }
.yb-palette-label { color: var(--ink); font-size: 14px; }
.yb-palette-hint-2 { color: var(--ink-mute); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
.yb-palette-tail { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; text-align: right; letter-spacing: 0.08em; }
.yb-palette-row.active .yb-palette-tail { color: var(--gold); }
.yb-palette-empty {
  padding: 32px 16px;
  text-align: center;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.yb-palette-foot {
  display: flex; gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint);
}
.yb-palette-foot kbd {
  display: inline-block;
  font-family: var(--mono); font-size: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 1px 5px;
  margin-right: 4px;
  color: var(--ink-mute);
}

/* ─── FLOATING CMD+K TRIGGER ───────────────────────────────────── */
.yb-cmdk-trigger {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-body);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  cursor: pointer;
}
.yb-cmdk-trigger:hover { border-color: var(--gold); color: var(--ink); }
.yb-cmdk-trigger > span:first-child { color: var(--gold); }

/* ─── TICKER DRAWER ────────────────────────────────────────────── */
#yb-drawer-root {
  position: fixed; inset: 0; z-index: 180;
  pointer-events: none;
}
#yb-drawer-root.open { pointer-events: auto; }
.yb-drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(8, 9, 11, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
#yb-drawer-root.open .yb-drawer-overlay { opacity: 1; }
.yb-drawer {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(460px, calc(100vw - 24px));
  background: var(--bg);
  border-left: 1px solid var(--line-strong);
  transform: translateX(102%);
  transition: transform 320ms var(--ease);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#yb-drawer-root.open .yb-drawer { transform: translateX(0); }
.yb-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.yb-drawer-ticker {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 32px;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1;
}
.yb-drawer-name {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 8px;
}
.yb-drawer-close {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 5px 9px;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.yb-drawer-close:hover { color: var(--gold); border-color: var(--gold); }
.yb-drawer-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 28px; }
.yb-drawer-thesis .body { color: var(--ink-body); font-size: 15px; line-height: 1.6; }
.yb-drawer-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Pills shown above ticker (anchor + held/not-held) */
.yb-drawer-pills { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.yb-drawer-pill {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  display: inline-block;
  border-radius: 2px;
}
.yb-drawer-pill.anchor    { border-color: var(--gold); color: var(--gold); }
.yb-drawer-pill.held      { border-color: var(--line); color: var(--ink-body); }
.yb-drawer-pill.not-held  { border-color: var(--line); color: var(--ink-mute); }

/* Gain/loss color on the day + lifetime cells (matches polish.css convention) */
.yb-drawer-body .mono.pos { color: var(--gain, #4ec07a); }
.yb-drawer-body .mono.neg { color: var(--loss, #c64a4a); }

/* Disclosure shown for non-held tickers */
.yb-drawer-disclosure {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-mute);
  padding: 12px 14px;
  border-left: 2px solid var(--line);
  background: color-mix(in srgb, var(--bg-base) 92%, var(--ink-mute) 8%);
  margin: 0;
}

/* Loading placeholder inside drawer body while /api/portfolio-live resolves */
.yb-drawer-loading {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  padding: 32px 0;
  text-align: center;
}

/* ─── TOAST ────────────────────────────────────────────────────── */
#yb-toast {
  position: fixed;
  bottom: 76px; right: 22px;
  z-index: 220;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
#yb-toast.on { opacity: 1; transform: translateY(0); }

/* ─── CLICKABLE AFFORDANCES ────────────────────────────────────── */
/* Anchor cards click-to-open-drawer */
.anchor[data-ticker]::after {
  content: "OPEN ↗";
  position: absolute;
  right: 18px; top: 18px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.anchor[data-ticker]:hover::after { opacity: 1; }

/* Cell hover affordance on receipts */
.receipts a.cell, .receipts .cell[data-href] {
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.receipts a.cell:hover, .receipts .cell[data-href]:hover { background: var(--bg-elev); }

/* Underline links inside prose on hover */
.prose a { color: var(--ink); border-bottom: 1px solid var(--line-strong); transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.prose a:hover { border-bottom-color: var(--gold); color: var(--gold); }

/* Roll line whole-row hover */
.powers .roll-line { transition: border-color var(--t-fast) var(--ease); }
.powers .roll-line:hover { border-color: var(--gold-line); }

/* ─── SYSTEM RAIL (footer / hero) ──────────────────────────────── */
.yb-systems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.yb-systems > a {
  padding: 18px 18px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--t-fast) var(--ease);
}
.yb-systems > a:last-child { border-right: 0; }
.yb-systems > a:hover { background: var(--bg-elev); }
.yb-systems .ks-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.yb-systems .ks-name  { font-family: var(--sans); font-size: 15px; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.yb-systems .ks-name .arrow { color: var(--ink-faint); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.yb-systems > a:hover .ks-name .arrow { color: var(--gold); transform: translateX(2px); }
@media (max-width: 720px) {
  .yb-systems > a { border-right: 0; border-bottom: 1px solid var(--line); }
  .yb-systems > a:last-child { border-bottom: 0; }
}

/* Utility */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--gap-3); }
.gap-3 { gap: var(--gap-4); }
.gap-4 { gap: var(--gap-5); }
.gap-5 { gap: var(--gap-6); }
.gap-6 { gap: var(--gap-7); }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }
.mt-7 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 32px; }
.mb-7 { margin-bottom: 48px; }
.mb-8 { margin-bottom: 64px; }
.text-mute { color: var(--ink-mute); }
.text-body { color: var(--ink-body); }
.text-ink  { color: var(--ink); }
.text-gold { color: var(--gold); }
.text-gain { color: var(--gain); }
.text-loss { color: var(--loss); }
.tabular { font-variant-numeric: tabular-nums; }

/* ─── MOBILE FIXES (overnight pass 2026-05-12) ───────────────────
   Layered on top of existing breakpoints. Surgical, not nuclear.
   Reference viewport: 390px (iPhone 13/14/15). */

/* Nav at <=720px: replace display:none with a horizontally-scrollable
   strip. Every page reachable from every viewport. */
@media (max-width: 720px) {
  .yb-nav-row { gap: 12px; height: auto; padding: 10px 0; flex-wrap: wrap; }
  .yb-nav-links {
    display: flex;
    width: 100%;
    order: 3;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 8px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }
  .yb-nav-links::-webkit-scrollbar { display: none; }
  .yb-nav-links a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 4px 2px;
  }
  .yb-nav-links a[aria-current="page"]::after { bottom: 6px; }
  .yb-nav-cta { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Floating ⌘K trigger: hide on desktop (the header already has Jump
   anywhere button + global ⌘K shortcut), show as a circular touch
   target on mobile. */
@media (min-width: 769px) {
  .yb-cmdk-trigger { display: none !important; }
}
@media (max-width: 768px) {
  .yb-cmdk-trigger {
    width: 56px; height: 56px;
    padding: 0;
    border-radius: 50%;
    border-color: var(--gold);
    background: var(--bg-elev);
    bottom: 18px; right: 18px;
    z-index: 90;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    justify-content: center;
    flex-direction: column;
    gap: 1px;
  }
  .yb-cmdk-trigger > span:first-child { font-size: 14px; line-height: 1; }
  .yb-cmdk-trigger > span:last-child { font-size: 9px; letter-spacing: 0.08em; color: var(--ink-mute); }
}

/* Hero spec strip: 3-col → 1-col at narrow widths. */
@media (max-width: 480px) {
  .hero-spec { grid-template-columns: 1fr; gap: 14px; }
}

/* CTA buttons: ensure ≥44px touch target site-wide. Stack on tiny screens. */
.btn, .yb-nav-cta, [data-pal-open] { min-height: 44px; }
@media (max-width: 480px) {
  .hero .cta-row, .cta-row { flex-direction: column; align-items: stretch; }
  .hero .cta-row .btn, .cta-row .btn { width: 100%; justify-content: center; }
}

/* Footer: links wrap cleanly, each is a 44px tap target. */
.yb-foot-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 4px 0; }
@media (max-width: 720px) {
  .yb-foot-row { flex-direction: column; gap: 16px; align-items: flex-start; }
  .yb-foot-links { flex-wrap: wrap; gap: 14px 22px; }
  .yb-foot-meta { flex-wrap: wrap; gap: 12px; }
}

/* Receipts ribbon: ensure each cell is big enough to tap, no horizontal
   overflow at narrow widths. */
@media (max-width: 760px) {
  .receipts .cell { padding: 24px 20px; min-height: 96px; }
}

/* Global safety net: no horizontal scroll at 390px viewport. */
@media (max-width: 480px) {
  body { overflow-x: hidden; }
}

/* Terminal mock: scale font down so long agent lines fit narrow screens
   without ugly clipping. white-space:pre stays — formatting matters. */
@media (max-width: 480px) {
  .terminal-line { font-size: 10.5px; letter-spacing: -0.01em; }
  .terminal-body { padding: 10px 12px 14px; }
}
