/* Public data pages of the AI desk: home, signals, coin, decisions, run, record, team.
   Tokens, controls, the character system and motion primitives live in style.css. */

main.shell { min-width: 0; }
.d-section { margin-top: 64px; }
.d-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.d-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.03em; }
.d-head .note { font-size: 14px; color: var(--muted); }
.d-lede { color: var(--muted); font-size: 15px; margin-top: 6px; max-width: 62ch; }
.d-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.d-sub { font-size: 17px; color: var(--muted); max-width: 60ch; margin-top: 14px; line-height: 1.55; }
.d-crumb { font-size: 13.5px; color: var(--faint); margin-top: 28px; }
.d-crumb a { color: var(--muted); }
.page-title { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.035em; line-height: 1.05; }
.page-top { margin-top: 36px; }
.small { font-size: 12.5px; color: var(--faint); }
.risk { margin: 40px 0 10px; }

/* ── home hero ───────────────────────────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 32px; align-items: center; padding: 36px 0 10px; min-height: min(640px, calc(100vh - 90px)); }
.hero h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; margin-top: 18px; }
.hero h1 .accent { color: var(--lime); }
.hero-sub { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 54ch; margin-top: 22px; }
.hero-fine { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.hero-fine a { color: var(--text); }
.hero-live { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 10px; border-radius: var(--pill); background: var(--card);
  border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); max-width: 100%; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; animation: pulse-ring 2.4s var(--ease) infinite; }
@keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.hero-live.warn { color: var(--down); }
.hero-live.warn .pulse { background: var(--down); }
.hero-live.warn .pulse::after { border-color: var(--down); }

.hero-stage { position: relative; height: 480px; isolation: isolate; }
.hero-stage::before { content: ""; position: absolute; left: 50%; top: 52%; width: 82%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: -1;
  border-radius: 50%; background: radial-gradient(closest-side, var(--card-2), transparent 72%); }
.stage-desk { position: absolute; left: 6%; right: 6%; bottom: 0; height: 64px; border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, var(--card-3), transparent); opacity: 0.8; }
.seat { position: absolute; z-index: 1; transform: translateX(-50%); }
.seat .mascot { width: var(--s, 84px) !important; height: var(--s, 84px) !important; }
.seat.kairo { left: 50%; bottom: 0; z-index: 3; --s: 300px; }
.s0 { left: 9%; top: 31%; } .s1 { left: 22%; top: 12%; } .s2 { left: 38%; top: 0; } .s3 { left: 62%; top: 0; } .s4 { left: 78%; top: 12%; }
.s5 { left: 91%; top: 31%; }
.s6 { left: 9%; bottom: 4%; --s: 96px; z-index: 2; } .s7 { left: 24%; bottom: 0; --s: 104px; z-index: 2; }
.s8 { left: 76%; bottom: 0; --s: 104px; z-index: 2; } .s9 { left: 90%; bottom: 4%; --s: 96px; z-index: 2; }

/* the record strip under the hero */
.rec-strip { margin-top: 28px; }
.rs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rs { background: var(--card); padding: 18px 20px; min-width: 0; }
.rs > span { display: block; font-size: 13px; color: var(--muted); }
.rs b { display: block; font-size: clamp(26px, 2.8vw, 36px); font-weight: 600; letter-spacing: -0.03em; margin: 4px 0 2px; }
.rs i { display: block; font-style: normal; font-size: 12.5px; color: var(--faint); }
.rs-note { margin-top: 10px; font-size: 13px; color: var(--muted); max-width: 90ch; }
.rs-note a { color: var(--text); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 20px; gap: 8px; }
  /* one column: the status and the title lead, the owls follow, then the pitch and the buttons */
  .hero-copy { display: contents; }
  .hero-live { justify-self: start; }
  .hero-stage { order: 1; height: 330px; max-width: 520px; width: 100%; margin: 12px auto 0; overflow-x: clip; }
  .hero-sub, .hero-cta, .hero-fine { order: 2; }
  .seat.kairo { --s: 210px; }
  .seat { --s: 60px; } .s6, .s9 { --s: 68px; } .s7, .s8 { --s: 72px; }
  .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .hero-stage { height: 260px; }
  .seat.kairo { --s: 170px; }
  .seat { --s: 48px; } .s6, .s9 { --s: 54px; } .s7, .s8 { --s: 58px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 16px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .rs { padding: 14px; }
  .d-section { margin-top: 48px; }
}

/* ── the replayed run (convo.js) ─────────────────────────────────────────────────────────────────── */
.cv-card { padding: 0; overflow: hidden; }
.cv { display: grid; }
.cv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cv-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cv-title h3 { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; }
.cv-title .coin-ic, .cv-title .coin-ic img { width: 26px; height: 26px; }
.cv-when { color: var(--muted); font-size: 13.5px; }
.cv-ctl { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-btn { height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), transform var(--dur-1) var(--ease); }
.cv-btn:hover { border-color: var(--line-3); background: var(--card-3); }
.cv-btn:active { transform: scale(0.97); }
.cv[data-mode="static"] [data-act="skip"], .cv[data-mode="static"] [data-act="replay"] { display: none; }
.cv-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); min-height: 440px; }
.cv-stage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; gap: 6px 4px; padding: 18px; border-right: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 100%, var(--card-2), transparent 70%); }
.cv-seat { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--faint); padding: 6px 2px; border-radius: 14px;
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease-spring), background var(--dur-3) var(--ease); }
.cv-seat span { white-space: nowrap; font-weight: 500; }
.cv-seat.final { grid-column: 1 / span 2; grid-row: 4; }
.cv-seat.gears { grid-column: 3; grid-row: 4; align-self: end; }
.cv[data-mode="play"] .cv-seat { opacity: 0.55; }
.cv[data-mode="play"] .cv-seat.done { opacity: 0.8; }
.cv[data-mode="play"] .cv-seat.now { opacity: 1; transform: translateY(-6px) scale(1.12); background: var(--lime-soft); color: var(--text); }
.cv-list { list-style: none; margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 470px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cv[data-mode="play"] .cv-turn:not(.shown) { display: none; }
.cv-turn { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: start; }
.cv-av { padding-top: 2px; }
.cv-bub { background: var(--card-2); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 14px; min-width: 0; transition: border-color var(--dur-3) var(--ease); }
.cv-turn.now .cv-bub { border-color: var(--line-3); }
.cv-who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cv-who b { font-weight: 600; }
.cv-who span { font-size: 12.5px; color: var(--faint); }
.cv-text { margin-top: 3px; font-size: 14px; line-height: 1.55; color: var(--muted); word-break: break-word; }
.cv-turn.final .cv-bub { background: var(--lime-soft); border-color: color-mix(in srgb, var(--lime) 45%, transparent); }
.cv-turn.final .cv-text { color: var(--text); }
.cv-turn.gears .cv-bub { background: var(--card); border-style: dashed; border-color: var(--line-3); }
.cv-gears { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.cv-end { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--line);
  transition: opacity var(--dur-4) var(--ease), transform var(--dur-4) var(--ease); }
.cv[data-mode="play"]:not(.ended) .cv-call { opacity: 0.35; }
.cv[data-mode="play"].ended .cv-end { opacity: 1; }
.cv-call { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cv-call span { color: var(--muted); font-size: 14px; }
.cv-call b { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.cv-call em { font-style: normal; font-size: 13px; color: var(--muted); }
.cv-call.buy b { color: var(--lime); } .cv-call.sell b { color: var(--down); } .cv-call.hold b { color: var(--text); }
.cv-prog { display: flex; gap: 3px; padding: 0 20px 16px; }
.cv-prog button { flex: 1; height: 20px; padding: 8px 0; border: 0; background: none; cursor: pointer; }
.cv-prog button i { display: block; height: 4px; border-radius: 4px; background: var(--card-3); transition: background var(--dur-3) var(--ease); }
.cv-prog button.done i, .cv-prog button.now i { background: var(--lime); }
.cv-prog button:hover i { background: var(--line-3); }
.cv[data-mode="static"] .cv-prog { display: none; }
/* the full run page: one column, big speakers */
.cv-full .cv-body { grid-template-columns: 1fr; min-height: 0; }
.cv-full .cv-stage { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); }
.cv-full .cv-seat.final, .cv-full .cv-seat.gears { grid-column: auto; grid-row: auto; align-self: start; }
.cv-full .cv-list { max-height: none; overflow: visible; gap: 14px; }
.cv-full .cv-turn { grid-template-columns: 56px minmax(0, 1fr); }
.cv-full .cv-text { white-space: pre-line; font-size: 14.5px; }
.cv-full .chips { margin-top: 10px; }
@media (max-width: 860px) {
  .cv-body { grid-template-columns: 1fr; min-height: 0; }
  .cv-stage { grid-template-columns: repeat(6, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; gap: 2px; }
  .cv-seat .mascot { width: 44px !important; height: 44px !important; }
  .cv-seat.final, .cv-seat.gears { grid-column: auto; grid-row: auto; }
  .cv-seat span { font-size: 10.5px; }
  .cv-list { max-height: 380px; padding: 14px; }
  .cv[data-mode="play"] .cv-seat.now { transform: translateY(-3px) scale(1.08); }
}

/* ── call cards ──────────────────────────────────────────────────────────────────────────────────── */
.sig-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sig-cards.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sig-card { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); position: relative; overflow: hidden; min-width: 0;
  transition: border-color var(--dur-3) var(--ease), transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease); }
.sig-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.sig-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--card-3); }
.sig-card.buy { border-color: color-mix(in srgb, var(--lime) 30%, transparent); }
.sig-card.buy::before { background: var(--lime); }
.sig-card.sell { border-color: color-mix(in srgb, var(--down) 30%, transparent); }
.sig-card.sell::before { background: var(--down); }
.sig-card.no-data { opacity: 0.7; }
.sig-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sig-head .coin-ic, .sig-head .coin-ic img { width: 40px; height: 40px; }
.sig-id { min-width: 0; flex: 1; }
.sig-owl { margin-left: auto; }
.sig-name { font-weight: 600; font-size: 18px; text-decoration: none; }
.sig-name:hover { text-decoration: underline; }
.sig-pair { color: var(--faint); font-size: 13px; font-weight: 400; display: block; }
.sig-rating { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; display: inline-block; }
.sig-rating.buy { color: var(--lime); } .sig-rating.sell { color: var(--down); } .sig-rating.hold { color: var(--text); }
.sig-pos { font-size: 13px; color: var(--muted); margin-top: 8px; }
.sig-pos b { color: var(--text); font-weight: 600; }
.sig-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sig-price b { font-size: 17px; font-weight: 600; display: inline-block; }
.sig-price span { font-size: 13px; }
.sig-meta { font-size: 12.5px; color: var(--faint); margin-top: 8px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.sig-meta a { color: var(--muted); }
.sig-meta a:hover { color: var(--text); }
.sig-note { margin-top: 10px; font-size: 12.5px; color: var(--down); }
.sig-why-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; padding: 12px 0 0; }
.sig-why-toggle i { font-style: normal; transition: transform var(--dur-2) var(--ease); }
.sig-why-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.sig-why-toggle:hover { color: var(--text); }
.sig-why { display: none; padding-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.6; word-break: break-word; white-space: pre-line; }
.sig-why.open { display: block; }
.sig-card.full .sig-why { display: block; }
@media (max-width: 1080px) { .sig-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sig-cards, .sig-cards.wide { grid-template-columns: 1fr; } }

/* ── charts (charts.js) ──────────────────────────────────────────────────────────────────────────── */
.chart { position: relative; width: 100%; min-height: 240px; }
.chart.small { min-height: 120px; }
.ch { position: relative; outline: none; border-radius: 10px; }
.ch:focus-visible { outline: 2px solid var(--lime); outline-offset: 6px; }
.ch-plot { position: relative; height: 216px; margin-right: 58px; cursor: crosshair; touch-action: pan-y; }
.chart.small .ch-plot { height: 96px; }
.ch-host[data-h="280"] .ch-plot { height: 256px; }
.ch svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch .grid { stroke: var(--line); vector-effect: non-scaling-stroke; }
.ch .base { stroke: var(--line-3); stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.ch .ln { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ch .area { stroke: none; opacity: 0.1; }
.ch .s-desk { stroke: var(--lime); fill: var(--lime); } .ch .ln.s-desk { stroke-width: 2.4; fill: none; }
.ch .s-btc { stroke: var(--series-btc); fill: var(--series-btc); } .ch .ln.s-btc { fill: none; }
.ch .s-hold { stroke: var(--series-hold); fill: var(--series-hold); } .ch .ln.s-hold { fill: none; }
.ch .s-price { stroke: var(--muted); } .ch .ln.s-price { stroke-width: 1.8; }
.ch .b-up { fill: var(--lime); } .ch .b-dn { fill: var(--down); }
.ch .mk { stroke-width: 11px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ch .mk.m-long { stroke: var(--lime); } .ch .mk.m-short { stroke: var(--down); } .ch .mk.m-flat { stroke: var(--faint); }
.ch-y { position: absolute; top: 0; bottom: 0; right: -58px; width: 54px; pointer-events: none; }
.ch-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ch-x { position: relative; height: 22px; margin-right: 58px; margin-top: 6px; }
.ch-x span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ch-x span.first { transform: none; } .ch-x span.last { transform: translateX(-100%); }
.ch-cross { position: absolute; inset: 0; pointer-events: none; }
.ch-vline { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; background: var(--line-3); }
.ch-dots i { position: absolute; left: var(--x); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--card); background: var(--muted); }
.ch-dots i.s-desk { background: var(--lime); } .ch-dots i.s-btc { background: var(--series-btc); } .ch-dots i.s-hold { background: var(--series-hold); }
.ch-read { position: absolute; top: 4px; left: calc(var(--x) + 12px); min-width: 150px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); z-index: 2; }
.ch-cross.flip .ch-read { left: auto; right: calc(100% - var(--x) + 12px); }
.ch-read time { display: block; color: var(--faint); margin-bottom: 3px; }
.ch-read div { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.ch-read div b { margin-left: auto; padding-left: 10px; color: var(--text); font-weight: 600; }
.ch-read div b.up { color: var(--lime); } .ch-read div b.down { color: var(--down); }
.ch-read i, .key .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; display: inline-block; background: var(--muted); }
.s-desk.sw, .ch-read i.s-desk, .s-up.sw, .ch-read i.s-up { background: var(--lime); }
.ch-read i.s-dn { background: var(--down); }
.s-btc.sw, .ch-read i.s-btc { background: var(--series-btc); }
.s-hold.sw, .ch-read i.s-hold { background: var(--series-hold); }
.ch-read i.m-long, .sw.m-long { background: var(--lime); } .ch-read i.m-short, .sw.m-short { background: var(--down); } .ch-read i.m-flat, .sw.m-flat { background: var(--faint); }
.key { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); margin: 6px 0 16px; }
.key span { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 640px) { .ch-plot { height: 180px; margin-right: 46px; } .ch-x { margin-right: 46px; } .ch-y { right: -46px; width: 42px; } }

/* ── record block and chips ──────────────────────────────────────────────────────────────────────── */
.rec-top { display: flex; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.rec-value b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.rec-value span { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips > span { display: inline-flex; align-items: baseline; gap: 7px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 11px; font-size: 13px; }
.chips i { color: var(--muted); font-style: normal; font-size: 12px; }
.chips b { font-weight: 600; }

/* ── tables ──────────────────────────────────────────────────────────────────────────────────────── */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl table { font-size: 13.5px; }
.tbl td.wrap { white-space: normal; min-width: 180px; }
.rtag { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; display: inline-block; }
.rtag.long, .rtag.buy { background: var(--lime-soft); color: var(--lime); }
.rtag.short, .rtag.sell { background: var(--down-soft); color: var(--down); }
.rtag.flat, .rtag.hold, .rtag.exit { background: var(--card-2); color: var(--muted); }
.coin-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.coin-cell:hover { text-decoration: underline; }
.coin-cell .coin-ic.sm, .coin-cell .coin-ic.sm img { width: 22px; height: 22px; }
/* phones: wide tables become stacked rows, label above value, instead of scrolling sideways */
@media (max-width: 640px) {
  .tbl.stack table, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .tbl.stack tr:last-child { border-bottom: 0; }
  .tbl.stack td { border: 0; padding: 0; white-space: normal; text-align: left !important; min-width: 0; }
  .tbl.stack td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--faint); }
  .tbl.stack td.wide { grid-column: 1 / -1; }
}

/* ── filters, switch, steps, team ────────────────────────────────────────────────────────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters button { height: 38px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-2); color: var(--text); padding: 0 12px; font-size: 13.5px; cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.filters select:hover, .filters button:hover { border-color: var(--line-3); }
.filters button[aria-pressed="true"] { border-color: var(--lime); background: var(--lime-soft); }
.load-more { margin: 16px auto 0; display: flex; }
.switch { display: inline-flex; gap: 4px; background: var(--card-2); border-radius: 11px; padding: 3px; }
.switch button { background: none; border: 0; color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.switch button:hover { color: var(--text); }
.switch button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--lime); }

.how-steps4 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.how-step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; }
.how-step .mascot { width: 64px; height: 64px; margin: 2px 0 10px -4px; }
.how-n { position: absolute; top: 16px; right: 18px; font-size: 13px; font-weight: 600; color: var(--faint); }
.how-step h3 { font-size: 16px; margin-bottom: 6px; }
.how-step p { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .how-steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .how-steps4 { grid-template-columns: 1fr; } }

.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cast-card { display: grid; justify-items: center; text-align: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px 16px;
  transition: transform var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease); }
.cast-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.cast-card .mascot { width: 72px; height: 72px; margin-bottom: 4px; }
.cast-card b { font-size: 15px; }
.cast-card span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cast-card.off { opacity: 0.7; }
@media (max-width: 520px) { .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.join { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px 32px;
  }
.join h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.03em; }
.join .mascot { width: 140px; height: 140px; }
@media (max-width: 640px) { .join { grid-template-columns: 1fr; padding: 22px; gap: 8px; } .join .mascot { width: 96px; height: 96px; } }

/* ── run page ───────────────────────────────────────────────────────────────────────────────────── */
.run-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 18px; }
.run-head .mascot { width: 112px; height: 112px; }
.run-head h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em; }
.run-final { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; margin: 2px 0 4px; }
.run-final.buy { color: var(--lime); } .run-final.sell { color: var(--down); }
.run-sub { font-size: 14px; color: var(--muted); }
.run-sub b { color: var(--text); font-weight: 600; }
.gears-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.gears-box .mascot { width: 72px; height: 72px; }
.gears-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.run-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 18px; }
.run-facts div span { display: block; font-size: 12px; color: var(--faint); }
.run-facts div b { font-weight: 600; word-break: break-word; }
@media (max-width: 520px) { .run-head { grid-template-columns: 1fr; } .run-head .mascot { width: 84px; height: 84px; } .gears-box { grid-template-columns: 1fr; } }

/* ── record page ────────────────────────────────────────────────────────────────────────────────── */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.month { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.month span { display: block; font-size: 12px; color: var(--faint); }
.month b { font-weight: 600; font-size: 17px; }
.rec-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rec-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.rec-stat span { display: block; font-size: 12.5px; color: var(--muted); }
.rec-stat b { font-size: 20px; font-weight: 600; }
.rec-stat span.mascot, .rec-high .mascot { display: inline-block; width: 28px; height: 28px; margin: -6px 0 -6px 6px; }
.rec-high { white-space: nowrap; color: var(--muted); font-size: 13px; }

/* ── team page ──────────────────────────────────────────────────────────────────────────────────── */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.agent { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center;
  transition: border-color var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
.agent:hover { border-color: var(--line-2); transform: translateY(-2px); }
.agent .mascot { width: 88px; height: 88px; }
.agent h3 { font-size: 18px; }
.agent p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.agent .small { color: var(--faint); }
.agent.off { opacity: 0.72; }
.risk { margin: 34px 0 10px; }

/* scorecard tiles */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.metric { position: relative; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px; min-width: 0; }
.metric .m-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.metric .m-val { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.metric.lead .m-val { font-size: 30px; }
.metric .m-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--faint); margin-top: 3px; min-height: 16px; }
.m-info { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--muted);
  font: italic 600 11px/1 Georgia, serif; cursor: pointer; display: inline-grid; place-items: center; padding: 0; flex: none; }
.m-info:hover, .m-info[aria-expanded="true"] { border-color: var(--lime); color: var(--text); }
.m-info:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.m-pop { position: absolute; z-index: 20; left: 0; right: auto; top: calc(100% + 6px); width: min(320px, 86vw); background: var(--card);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); font-size: 13px; color: var(--muted); }
.m-pop p + p { margin-top: 6px; }
.m-pop i { font-style: normal; color: var(--text); font-weight: 600; }
.m-pop .m-now b { color: var(--text); }
.mat { font-size: 11.5px; font-weight: 500; padding: 1px 6px; border-radius: 5px; }
.mat.early { background: color-mix(in srgb, #f5a524 18%, transparent); color: #d48806; }
.mat.building { background: var(--card); color: var(--muted); border: 1px solid var(--line-2); }
:root[data-theme="dark"] .mat.early { color: #f5b544; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mat.early { color: #f5b544; } }
.metric-group { margin-top: 18px; }
.metric-group h3 { font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.honest-note { margin-top: 14px; font-size: 14px; color: var(--muted); border-left: 3px solid #f5a524; padding: 4px 0 4px 12px; }
.up-arrow::before { content: "▲ "; font-size: 0.7em; } .down-arrow::before { content: "▼ "; font-size: 0.7em; }
@media (max-width: 520px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metric .m-val { font-size: 19px; } .metric.lead .m-val { font-size: 24px; } }
.mark-line { stroke: #f5a524; stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.mark-tag { position: absolute; top: -2px; z-index: 2; font-size: 11.5px; color: #d48806; background: var(--card); border: 1px solid color-mix(in srgb, #f5a524 40%, transparent);
  border-radius: 6px; padding: 1px 6px; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
.mark-tag[style*="right"] { transform: translateX(50%); }

/* home as a sales page */
.d-hero.sell { padding-top: 56px; }
.d-hero.sell h1 { font-size: clamp(34px, 5.2vw, 64px); max-width: 15ch; }
.hero-sub { font-size: 17px; color: var(--muted); margin-top: 14px; }
.cta-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.risk-short { font-size: 12.5px; color: var(--faint); margin-top: 10px; max-width: 62ch; }
.risk-short a { color: var(--muted); }
.hero-side { display: grid; justify-items: center; gap: 4px; }
.hero-side .d-status { margin-top: 4px; font-size: 13px; text-align: center; justify-content: center; max-width: 220px; }
.d-hero.sell .mascot.big { width: 168px; height: 168px; }
.proof { margin-top: 28px; }
.proof-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.proof-meta { margin-top: 10px; }
.proof-meta a { color: var(--muted); }
@media (max-width: 1080px) { .proof-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .d-hero.sell .mascot.big { width: 84px !important; height: 84px !important; } .hero-side .d-status { display: none; } }
.lg.mark { background: none; border: 2px dashed #f5a524; width: 8px; height: 8px; }
.calc-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; margin-bottom: 16px; }
.calc-in label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.calc-in label b { color: var(--text); font-size: 18px; margin-left: 6px; }
.calc-in input[type="range"] { width: 100%; accent-color: var(--lime); height: 28px; }
.calc .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc > .small { margin-top: 12px; }
@media (max-width: 640px) { .calc-in { grid-template-columns: 1fr; } .calc .metrics { grid-template-columns: 1fr; } }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trust-tile { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; text-decoration: none; color: inherit; transition: border-color 0.15s; }
.trust-tile:hover { border-color: color-mix(in srgb, var(--lime) 45%, transparent); }
.trust-tile .mascot { width: 40px; height: 40px; }
.trust-tile h3 { font-size: 15.5px; margin-bottom: 4px; }
.trust-tile p { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trust { grid-template-columns: 1fr; } }
.cmp table td:first-child { color: var(--muted); }
.cmp table th:nth-child(2), .cmp table td:nth-child(2) { background: color-mix(in srgb, var(--lime) 7%, transparent); }
.cmp td { white-space: normal; min-width: 130px; }
.yes { color: var(--lime); font-weight: 600; } .no { color: var(--down); font-weight: 600; }
.faq-list { display: grid; gap: 8px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq-item p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.final-cta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 48px; }
.final-cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.final-cta .mascot { width: 96px; height: 96px; }
@media (max-width: 560px) { .final-cta { grid-template-columns: 1fr; } .final-cta .mascot { width: 64px; height: 64px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chart { position: relative; }
.was-right { margin-top: 10px; font-size: 14px; color: var(--muted); }
.was-right b.up { color: var(--lime); } .was-right b.down { color: var(--down); }

/* decisions list: repeats are quiet, changes stand out; on a phone each run is a card */
.runs-list tr.rep td { color: var(--faint); }
@media (max-width: 640px) {
  .runs-list.tbl { overflow: visible; padding: 8px; }
  .runs-list table, .runs-list tbody { display: block; width: 100%; }
  .runs-list thead { display: none; }
  .runs-list tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .runs-list td { display: block; padding: 0; border: 0; white-space: normal; text-align: left !important; min-width: 0; }
  .runs-list td.wrap { min-width: 0; }
  .runs-list td[data-label="Model"], .runs-list td[data-label="Cost"] { display: none; }
  .runs-list td.open { grid-column: 1 / -1; }
}
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 12px; }
.period-note { font-size: 13.5px; color: var(--muted); }
.period-note b { font-weight: 600; }
.switch { flex-wrap: wrap; }

/* agent text: markdown emphasis in the text colour, not a new style */
.cv-text strong, .sig-why strong { color: var(--text); font-weight: 600; }
.nowrap { white-space: nowrap; }
/* stacked tables on phones keep a gutter for their labels */
@media (max-width: 640px) { .cmp td:first-child { font-weight: 500; color: var(--text); } }
.d-head .linkish::after { content: " →"; }

/* ── interactions on the desk pages (play.js) ── */
.cv-seat { border: 0; background: none; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cv-seat:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.hero-cd { color: var(--faint); white-space: nowrap; }
.hero-cd::before { content: "·"; margin: 0 7px 0 1px; }
.d-acts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.cv-new { border: 1px solid var(--lime); background: var(--lime-soft); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 7px 13px; border-radius: var(--pill); cursor: pointer; }
.cv-new:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
/* a new call: the card's ring shows once (reduced motion: the ring shows still, for the same 2.6 s) */
.sig-card.k-new { position: relative; }
.sig-card.k-new::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--lime); pointer-events: none;
  opacity: 0; animation: k-ring 1.5s var(--ease) 1; }
@keyframes k-ring { 0% { opacity: 0; transform: scale(0.985); } 22% { opacity: 1; } 100% { opacity: 0; transform: scale(1.025); } }
.k-still .sig-card.k-new::after { animation: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sig-card.k-new::after { animation: none; opacity: 1; } }

/* ── /kairo: the playground ── */
.pg { margin-top: 22px; display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pg-stage { position: sticky; top: 96px; display: grid; justify-items: center; gap: 12px; padding: 24px 8px 8px; }
.pg-stage::before { content: ""; position: absolute; left: 50%; top: 42%; width: 240px; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 0;
  border-radius: 50%; background: radial-gradient(circle, var(--lime-soft), transparent 68%); pointer-events: none; }
.pg-owl { position: relative; z-index: 1; width: 200px; height: 200px; }
.pg-owl .mascot { width: 200px !important; height: 200px !important; }
.pg-now { position: relative; z-index: 1; font-size: 13.5px; color: var(--muted); text-align: center; min-height: 2.9em; max-width: 30ch; }
.pg-ctl { display: grid; gap: 16px; min-width: 0; }
.pg-set { border: 0; padding: 0; margin: 0; min-width: 0; }
.pg-set legend { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; padding: 0; }
.pg-set legend span { font-weight: 400; color: var(--faint); margin-left: 6px; }
.pg-set .filters { margin-bottom: 0; }
.pg-set .filters button { text-transform: none; }
.pg-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.pg-agent { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px 0 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-2);
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-width: 0; }
.pg-agent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-agent[aria-pressed="true"] { border-color: var(--lime); background: var(--lime-soft); }
.pg-agent:focus-visible, .pg-set .filters button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.pg-cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.pg-member { display: grid; justify-items: center; gap: 6px; padding: 16px 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--muted); }
.pg-member .mascot { width: 72px; height: 72px; }
@media (max-width: 860px) {
  .pg { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pg-stage { position: relative; top: 0; padding-top: 12px; }
  .pg-owl, .pg-owl .mascot { width: 160px !important; height: 160px !important; }
  .pg-cast { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
