:root {
  --bg: #faf9f5;          /* warm cream canvas (Claude) */
  --panel: #ffffff;
  --panel-2: #f4f2ec;
  --line: #e8e5db;
  --line-2: #ddd9cd;
  --text: #28261f;        /* warm near-black */
  --muted: #827f74;
  --accent: #c4623f;      /* Claude clay / coral */
  --accent-2: #ad5132;
  --accent-soft: #f5e9e2;
  --ok: #3f7d57;
  --warn: #b8762a;
  --radius: 14px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- design-handoff tokens (hi-fi home + widget board), additive ---- */
  --surface: #FFFFFF; --surface-2: #FBF9F5; --surface-3: #F4F0E9;
  --ink: #2B2620; --ink-2: #6E655A; --ink-3: #9C9286; --ink-4: #BBB2A6;
  --border: #EBE5DB; --border-2: #DED6C9;
  --coral: #C15F3C; --coral-ink: #A64E30; --coral-soft: #F6E7DE; --coral-soft2: #FBF1EB; --coral-line: #E7BBA4;
  --amber-bg: #FAF1DE; --amber-bg2: #F6E9CB; --amber-ink: #8A6A2C; --amber-line: #D8B25C;
  --m-claude: #C15F3C; --m-gpt: #10A37F; --m-gemini: #4385F4; --m-deepseek: #4D6BFE;
  --yt: #FF0033; --reddit: #FF4500; --x: #1A1A1A; --yelp: #D32323; --maps: #1A73E8; --maps-g: #34A853; --shop: #C15F3C; --insta: #C13584;
  --news: #1D4ED8; --review: #B45309; --g2: #FF492C;
  --r-pill: 999px; --r-lg: 18px; --r-md: 13px; --r-sm: 9px;
  --sh-sm: 0 1px 2px rgba(54,40,26,.05); --sh-md: 0 6px 22px -8px rgba(54,40,26,.14); --sh-lg: 0 18px 48px -16px rgba(54,40,26,.22);
}

* { box-sizing: border-box; }
#app, .transcript, .msg, .answer-page, .results, .widgets-below, .board, .sources, .route-body, .route-layout { max-width: 100%; overflow-x: hidden; word-wrap: break-word; overflow-wrap: break-word; }
html, body { min-height: 100%; margin: 0; overflow-x: hidden; width: 100%; max-width: 100vw; } /* force no horizontal scroll at root */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
/* Fixed film grain — editorial luxury texture, never on scrolling nodes */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app { position: relative; z-index: 1; }
.bubble, .answer, .card .body, .verdict, .disagree { overflow-wrap: anywhere; }

#app { display: flex; flex-direction: column; min-height: 100vh; width: 100%; max-width: 1240px; margin: 0 auto; }

/* ---------- top bar (spec-faithful) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: rgba(250,248,244,.82); backdrop-filter: blur(14px) saturate(1.1); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark { font-size: 22px; line-height: 1; transform: translateY(2px); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -.01em; color: var(--ink); }
.brand-tag { font-family: var(--serif); font-style: italic; color: var(--ink-3); font-size: 14.5px; white-space: nowrap; }
/* Angled BETA sticker on the wordmark */
.beta-badge { align-self: center; display: inline-block; font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--coral), var(--coral-ink, #b0512f)); padding: 2px 6px 2px 7px; border-radius: 5px; line-height: 1; transform: rotate(-9deg) translateY(-7px); box-shadow: 0 2px 7px rgba(193,95,60,.32); border: 1px solid rgba(255,255,255,.35); }
.topbar-spacer { flex: 1; }
.seg { display: inline-flex; align-items: center; padding: 3px; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-pill); }
.seg button { background: none; border: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 6px 15px; border-radius: var(--r-pill); letter-spacing: .01em; cursor: pointer; font-family: var(--sans); transition: all .16s ease; }
.seg button.on { background: var(--coral); color: #fff; box-shadow: var(--sh-sm); }
.seg button:not(.on):hover { color: var(--ink); }
.cost { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: var(--r-pill); }
.cost.budget b { color: var(--ink); font-weight: 600; }
.cost.budget .max { color: var(--ink-4); }
.syn-trust.trust-meter { background: var(--coral-soft); color: var(--coral-ink); border: 1px solid var(--coral-line); }
.src-favicon { width: 16px; height: 16px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.src-favicons { display: inline-flex; gap: 4px; margin-right: 8px; align-items: center; }
.web-hit-host { display: inline-flex; align-items: center; gap: 6px; }
.widget-foot .src { display: inline-flex; align-items: center; gap: 4px; }
.shop-img-icon { display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.shop-img-icon img { width: 28px; height: 28px; border-radius: 6px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0,0,0,.06); box-shadow: var(--sh-sm); cursor: pointer; padding: 0; }
.avatar.brain { background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 15px; border: 1px solid var(--border-2); }
@media (max-width: 600px) { .brand-tag { display: none; } }

/* ---------- transcript ---------- */
.transcript { flex: 1; min-width: 0; padding: 26px clamp(16px, 4vw, 32px) 8px; }
#app:not(.home) .transcript { padding-top: 20px; }
/* ---------- home / landing (Screen A) ---------- */
.empty { display: flex; flex-direction: column; align-items: center; padding: clamp(4px,1.5vh,16px) 0 20px; color: var(--ink-2); animation: fade .5s ease; }
.scene { position: relative; width: 300px; height: 96px; margin: 6px 0 26px; }
.scene .table-line { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: 220px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(120,90,60,.16), transparent 70%); }
.scene .pad { position: absolute; bottom: 16px; font-size: 46px; line-height: 1; filter: drop-shadow(0 5px 8px rgba(90,50,30,.22)); }
.scene .pad.l { left: 4px; transform: rotate(-22deg); transform-origin: bottom center; animation: hitL 2.6s ease-in-out infinite; }
.scene .pad.r { right: 4px; transform: rotate(22deg) scaleX(-1); transform-origin: bottom center; animation: hitR 2.6s ease-in-out infinite; }
@keyframes hitL { 0%,100%{transform:rotate(-22deg)} 48%,52%{transform:rotate(-30deg)} }
@keyframes hitR { 0%,2%,96%,100%{transform:rotate(30deg) scaleX(-1)} 50%{transform:rotate(22deg) scaleX(-1)} }
.ball-x { position: absolute; left: 58px; bottom: 52px; animation: ballX 2.6s linear infinite; }
.ball-y { animation: ballY 1.3s ease-in-out infinite; }
.pong-ball { width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff, #ded7cb 78%); box-shadow: 0 2px 5px rgba(0,0,0,.22); }
@keyframes ballX { 0%{transform:translateX(0)} 50%{transform:translateX(168px)} 100%{transform:translateX(0)} }
@keyframes ballY { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-30px)} }
@media (prefers-reduced-motion: reduce) { .scene .pad, .ball-x, .ball-y { animation: none !important; } .ball-x { left: 142px; } }
.home-hero { text-align: center; }
.home-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px,6vw,52px); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); margin: 0 0 12px; }
.home-sub { font-family: var(--serif); font-size: clamp(15px,2.2vw,18px); line-height: 1.5; color: var(--ink-2); max-width: 560px; margin: 10px auto 0; }
.home-sub b { color: var(--ink); font-weight: 500; }
/* Keyboard accessibility: a visible focus ring (none existed before — a WCAG 2.4.7 failure). */
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
/* Streaming caret — makes "still writing" vs "done" unmistakable on slower answers. */
.is-streaming::after { content: "▋"; display: inline-block; margin-left: 1px; color: var(--coral); animation: pong-blink 1s steps(2, start) infinite; vertical-align: baseline; }
@keyframes pong-blink { to { visibility: hidden; } }
/* Failure banner with a one-tap retry (re-runs the last query, attachments and all). */
.banner-fail { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
/* Usage-limit notice — calm + on-brand (NOT an alarming error), so users don't think Pong is down.
   .banner.banner-notice (2 classes) beats the base .banner background defined later in the file. */
.banner.banner-notice { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--accent-soft, #f6ede8); border-color: var(--coral-line, #e6c7b8); color: var(--ink-2); }
.banner-retry { flex: 0 0 auto; appearance: none; border: 1px solid var(--coral-line, #d8b3a8); background: var(--coral-soft, #fdf6f3); color: var(--coral, #c15f3c); font: 600 13px/1 var(--sans); padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.banner-retry:hover { background: var(--coral, #c15f3c); color: #fff; }
.followups-mount:not(:empty) { margin-top: 16px; }

/* ---- "Daily Serve" pill — loss-proof cumulative habit count (never "streak at risk") ---- */
.serve-pill { display: inline-flex; align-items: center; gap: 4px; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--coral-ink); background: var(--coral-soft2); border: 1px solid var(--coral-line); border-radius: 999px; padding: 4px 10px; line-height: 1; white-space: nowrap; cursor: default; user-select: none; }
.serve-pill:hover { background: var(--coral-soft); }
.serve-pill.bump { animation: servePop .55s cubic-bezier(.22,1.5,.5,1); }
@keyframes servePop { 0% { transform: scale(1); } 35% { transform: scale(1.22); background: var(--coral-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 18%, transparent); } 100% { transform: scale(1); } }
/* "Answer landed" — the earned-reward peak: a bright coral glow + tiny lift as the answer resolves. */
.landed { animation: answerLanded 1.1s ease-out; border-radius: 18px; }
@keyframes answerLanded {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--coral) 48%, transparent); }
  25%  { box-shadow: 0 0 40px 8px color-mix(in srgb, var(--coral) 34%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Particle spark burst — the visible companion to the chime. */
.spark-wrap { position: fixed; z-index: 1300; pointer-events: none; transform: translate(-50%, -50%); }
.spark { position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%; animation: sparkFly .66s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes sparkFly { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
/* Serve buttons — a satisfying spring-press on every send. */
.serve, #send, .composer button[type="submit"] { transition: transform .12s cubic-bezier(.22,1.6,.5,1); }
.serve:active, #send:active, .composer button[type="submit"]:active { transform: scale(.93); }
#soundBtn.muted { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .serve-pill.bump, .landed, .spark { animation: none; } }

/* Warm companion greeting — replaces the value-prop subhead for signed-in users */
.home-sub.home-greeting { color: var(--ink-2); font-style: italic; }

/* Celebration toast — rare, warm, auto-dismissing. The ONE allowed flourish, by design. */
.pong-toast { position: fixed; left: 50%; top: 26px; transform: translate(-50%, -18px); z-index: 1200; background: linear-gradient(135deg, var(--coral), var(--coral-ink)); color: #fff; font-family: var(--serif); font-size: 16px; font-weight: 500; padding: 12px 22px; border-radius: 999px; box-shadow: 0 14px 40px -10px rgba(193,95,60,.5); opacity: 0; transition: opacity .42s, transform .42s cubic-bezier(.22,1,.36,1); pointer-events: none; }
.pong-toast.in { opacity: 1; transform: translate(-50%, 0); }

/* Copy-button micro-interaction — a satisfying scale bounce on confirm (Doherty <400ms) */
.copy-btn.copied { animation: copyPop .4s cubic-bezier(.22,1.4,.5,1); }
@keyframes copyPop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Staggered follow-up chip entrance — they cascade in, so the close feels composed (peak-end) */
.followups.entering .fu-chip { animation: fuChipIn .42s cubic-bezier(.22,1,.36,1) both; }
.followups.entering .fu-chip:nth-of-type(2) { animation-delay: 70ms; }
.followups.entering .fu-chip:nth-of-type(3) { animation-delay: 140ms; }
.followups.entering .fu-chip:nth-of-type(4) { animation-delay: 210ms; }
@keyframes fuChipIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .pong-toast { transition: opacity .2s; transform: translate(-50%, 0); }
  .copy-btn.copied { animation: none; }
  .followups.entering .fu-chip { animation: none; }
}

.model-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 22px 0 4px; flex-wrap: wrap; }
.model-row .mr { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.model-row .pdot { width: 8px; height: 8px; border-radius: 50%; }
.model-row .sep { width: 1px; height: 13px; background: var(--border-2); }
/* Composer mode chips (Phase 6) — force the answer lane; Auto keeps the router's magic */
.mode-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px auto 0; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 13px/1 var(--sans); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.mode-chip:hover { border-color: var(--accent); color: var(--ink); }
.mode-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mode-chip .mc-ico { font: 600 12px/1 var(--mono); opacity: .85; }
.mode-chip.active .mc-ico { opacity: 1; }
/* Example-prompt menu (hover or click a chip) — onboarding: shows what each mode can do */
.mode-chip-wrap { position: relative; display: inline-flex; }
.mode-ex-pop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: max-content; min-width: 270px; max-width: 340px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 38px rgba(0,0,0,.16); padding: 6px; z-index: 60; display: none; }
.mode-ex-pop::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: var(--surface, #fff); filter: drop-shadow(0 1px 0 var(--line)); }
.mode-chip-wrap:hover .mode-ex-pop, .mode-chip-wrap.open .mode-ex-pop { display: block; }
.mode-ex-head { font: 700 10.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 8px 10px 7px; }
.mode-ex-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; appearance: none; border: 0; background: transparent; color: var(--ink); font: 500 13.5px/1.35 var(--sans); padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.mode-ex-item:hover { background: var(--accent-soft); color: var(--accent-2, var(--ink)); }
.mode-ex-ic { flex: none; font: 600 12px/1 var(--mono); opacity: .55; }
/* "Working on your image…" spinner card (image gen/edit takes ~10-40s) */
.media-pending { display: flex; align-items: center; gap: 13px; margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line, var(--border)); border-radius: 14px; background: var(--surface, #fff); max-width: 440px; box-shadow: var(--sh-sm); }
.mp-spin { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--accent-soft, #f0d8cc); border-top-color: var(--accent, #c4623f); animation: mp-rot .8s linear infinite; }
@keyframes mp-rot { to { transform: rotate(360deg); } }
.mp-title { font: 600 14px/1.3 var(--sans); color: var(--ink); }
.mp-sub { font: 400 12.5px/1.45 var(--sans); color: var(--ink-3); margin-top: 2px; }
.suggest { width: 100%; max-width: 760px; margin: clamp(10px, 2vh, 22px) auto 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.suggest .try-pre { flex: none; font: 500 13px/1 var(--sans); color: var(--ink-3); }
.try-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.schip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 400 13px/1 var(--sans); padding: 7px 13px; border-radius: var(--r-pill); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.schip:hover { border-color: var(--coral-line); color: var(--coral-ink); background: var(--coral-soft2); }
.schip.entering { animation: schipIn .3s ease both; animation-delay: var(--enter-delay, 0ms); }
.schip.exiting { animation: schipOut .2s ease both; animation-delay: var(--exit-delay, 0ms); }
@keyframes schipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes schipOut { to { opacity: 0; transform: translateY(-3px); } }

/* Search autocomplete dropdown (Google-style typeahead) */
.ac-menu { position: fixed; z-index: 400; background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--sh-lg); padding: 6px; max-height: 340px; overflow-y: auto; animation: acIn .12s ease; }
@keyframes acIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ac-row { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 10px; cursor: pointer; }
.ac-row.on { background: var(--surface-3); }
.ac-ic { flex: none; width: 16px; text-align: center; font-size: 13px; color: var(--ink-3); }
.ac-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 15px/1.2 var(--sans); color: var(--ink); }
.ac-badge { flex: none; font: 700 9.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ok); background: rgba(63,125,87,.12); padding: 4px 7px; border-radius: 999px; }
.suggest-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.suggest-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 12px; }
.suggest-eyebrow::before, .suggest-eyebrow::after { content: ""; height: 1px; width: 40px; background: var(--border-2); }
.suggest-rotate {
  width: 6px; height: 6px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 0 rgba(193,95,60,.45);
  animation: suggestPulse 2.4s cubic-bezier(.32,.72,0,1) infinite;
}
@keyframes suggestPulse {
  0%,100% { opacity: .35; transform: scale(.85); box-shadow: 0 0 0 0 rgba(193,95,60,0); }
  50% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 6px rgba(193,95,60,0); }
}
.suggest-grid { display: flex; flex-direction: column; gap: 10px; min-height: 198px; }
.scard {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 17px; box-shadow: var(--sh-sm); cursor: pointer; font-family: var(--sans);
  transition: transform .2s cubic-bezier(.32,.72,0,1), border-color .2s ease, box-shadow .2s ease, opacity .24s ease;
}
.scard:hover { border-color: var(--coral-line); transform: translateY(-3px) scale(1.01); box-shadow: var(--sh-md); }
.scard:active { transform: translateY(0) scale(.995); }
.scard.entering { animation: cardEnter .42s cubic-bezier(.32,.72,0,1) both; animation-delay: var(--enter-delay, 0ms); }
.scard.exiting { animation: cardExit .26s cubic-bezier(.4,0,1,1) both; animation-delay: var(--exit-delay, 0ms); }
@keyframes cardEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cardExit { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px); } }
.scard .cat { flex: none; width: 56px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); line-height: 1.3; }
.scard .qline { flex: 1; min-width: 0; }
.scard .q { font-family: var(--serif); font-size: 16px; color: var(--ink); line-height: 1.35; display: block; }
.scard .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.scard .meta .dots { display: inline-flex; gap: 3px; }
.scard .meta .dots i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.scard .go {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); transition: transform .2s cubic-bezier(.32,.72,0,1), background .2s ease, border-color .2s ease;
}
.scard .go-ico { font-size: 15px; color: var(--ink-3); transition: transform .2s cubic-bezier(.32,.72,0,1), color .2s ease; }
.scard:hover .go { background: var(--coral); border-color: var(--coral); }
.scard:hover .go-ico { color: #fff; transform: translate(1px, -1px); }
.composer-hint { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 20px 16px; margin-top: -10px; font-size: 12px; color: var(--ink-3); }
.composer-hint kbd { font-family: var(--mono); font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--ink-2); }
.composer-hint .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
@media (max-width: 540px) { .scard .cat { display: none; } }
/* home focal composer (Screen A) */
.composer-wrap { width: 100%; max-width: 864px; margin: 8px auto 0; }
.composer-wrap .composer-shell { padding: 5px; border-radius: 22px; background: var(--surface-3); border: 1px solid var(--border); box-shadow: var(--sh-sm); }
.composer-wrap .composer { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; padding: 9px 10px 9px 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); max-width: none; margin: 0; transition: border-color .2s ease, box-shadow .2s ease; }
.composer-wrap .composer-shell:focus-within .composer { border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft), inset 0 1px 0 rgba(255,255,255,.7); }
.composer-wrap .composer-shell:focus-within { border-color: var(--coral-line); }
.composer-wrap .attach { width: 40px; height: 40px; border-radius: 12px; flex: none; border: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--ink-3); cursor: pointer; font-size: 16px; transition: all .15s ease; }
.composer-wrap .attach:hover { color: var(--coral); border-color: var(--coral-line); background: var(--coral-soft2); }
.composer-wrap .composer input,
.composer-wrap .composer textarea { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: var(--sans); font-size: 16px; color: var(--ink); padding: 6px 2px; }
/* Auto-growing composer: starts at 1 line, spills to ~3 lines, then scrolls. */
.composer-wrap .composer textarea { resize: none; line-height: 1.45; min-height: calc(1.45em * 2 + 10px); max-height: calc(1.45em * 6 + 12px); overflow-y: auto; display: block; }
.composer textarea { resize: none; line-height: 1.5; max-height: calc(1.5em * 5 + 30px); overflow-y: auto; }
.composer-wrap .composer input::placeholder,
.composer-wrap .composer textarea::placeholder { color: var(--ink-3); }
/* keep the home composer items aligned to the top as the textarea grows */
.composer-wrap .composer { align-items: flex-end; }
.composer-wrap .serve {
  display: inline-flex; align-items: center; gap: 10px; flex: none; background: var(--coral); color: #fff;
  font-size: 15px; font-weight: 600; padding: 10px 12px 10px 18px; border-radius: var(--r-pill); border: 0;
  box-shadow: var(--sh-sm); cursor: pointer; transition: transform .2s cubic-bezier(.32,.72,0,1), background .2s ease, box-shadow .2s ease;
}
.composer-wrap .serve-go {
  width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.16);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
  transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.composer-wrap .serve:hover .serve-go { transform: translate(1px, -1px); }
.composer-wrap .serve:hover { background: var(--coral-ink); transform: translateY(-1px); box-shadow: var(--sh-md); }
.composer-wrap .serve:active { transform: translateY(0) scale(.98); }
.composer-wrap .composer-hint { margin-top: 12px; padding: 0; }
/* hide the docked composer while on the home screen */
#app.home > .composer, #app.home > .composer-hint, #app.home > #attachments { display: none; }

.msg { margin: 18px auto; animation: fade .25s ease; min-width: 0; max-width: 1180px; }
.msg.assistant { width: 100%; }
.msg.user { display: flex; min-width: 0; }
.msg.user .bubble { background: var(--panel-2); color: var(--text); margin-left: auto; max-width: 560px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 16px 16px 5px 16px; width: fit-content; font-size: 15px; }

/* ---------- rally court ---------- */
.rally { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 100%; box-shadow: 0 2px 10px rgba(40,38,31,.04); }
.rally-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.phase-label { font-family: var(--mono); font-size: 11.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.mode-pill { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; }

.court { position: relative; height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.court-paddle { height: 38px; width: auto; z-index: 2; opacity: .92; }
.court-paddle.right { transform: scaleX(-1); }
.court-paddle.left.hit { animation: cp-hit-l .17s ease; }
.court-paddle.right.hit { animation: cp-hit-r .17s ease; }
@keyframes cp-hit-l { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-15deg); } }
@keyframes cp-hit-r { 0%,100% { transform: scaleX(-1) rotate(0); } 50% { transform: scaleX(-1) rotate(-15deg); } }
.net { position: absolute; left: 50%; top: 12px; bottom: 12px; width: 1px; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }
.paddle { display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; opacity: .55; transition: .2s; }
.paddle .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: .2s; }
.paddle .nm { font-size: 11px; color: var(--muted); font-weight: 600; }
.paddle.active { opacity: 1; transform: translateY(-2px); }
.paddle.active .dot { box-shadow: 0 0 0 4px rgba(196,98,63,.12); }
.paddle.winner .nm { color: var(--accent); }
.paddle.winner .dot { box-shadow: 0 0 0 4px var(--accent-soft); }
.ball { position: absolute; width: 15px; height: 15px; background: url("/ball.png") center/contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); top: 28px; left: 50%; transition: left .42s cubic-bezier(.4,0,.5,1), top .42s ease; z-index: 3; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); }
.card { background: var(--panel); padding: 12px; min-height: 66px; }
.card .who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.card .who .chip { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.card .body { font-size: 12.5px; color: var(--muted); line-height: 1.5; max-height: 118px; overflow: hidden; white-space: pre-wrap; }
.card .score { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--accent); }
.card.thinking .body::after { content: "▍"; display: inline-block; vertical-align: bottom; animation: cursorPulse 1s ease-in-out infinite; color: var(--accent); }
@keyframes cursorPulse { 0%, 100% { opacity: 0; transform: scaleY(0.8); } 50% { opacity: 1; transform: scaleY(1); } }

.verdict { padding: 11px 15px; font-size: 13px; border-bottom: 1px solid var(--line); color: var(--muted); }
.verdict b { color: var(--accent); }
.disagree { padding: 10px 15px; background: #fbf3e7; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--warn); }
.disagree .h { font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; opacity: .85; }

.final { padding: 17px; }
.final .lead { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.final .lead .by { color: var(--accent); font-weight: 700; }
.final .answer, .route-answer .answer { font-size: 15.5px; line-height: 1.68; white-space: pre-wrap; color: var(--text); }
.final .feedback { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.final .feedback span { font-size: 12px; color: var(--muted); }
.final .feedback button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.final .feedback button:hover { border-color: var(--accent); }
.final .feedback button.picked { background: var(--accent); color: #fff; border-color: var(--accent); }

.route-answer { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; box-shadow: 0 2px 10px rgba(40,38,31,.04); }
.route-answer .lead { font-size: 12px; color: var(--muted); margin-bottom: 7px; }

/* diagrams, code, citations */
.diagram { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 12px 0; overflow-x: auto; text-align: center; }
.diagram svg { max-width: 100%; height: auto; }
pre.code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; margin: 8px 0; transition: transform 0.2s ease, box-shadow 0.2s ease; }
pre.code:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
pre.code code { font-family: var(--mono); color: #c4c1b5; white-space: pre; }

/* Fenced code blocks — header bar (language pill + copy/run) over a <pre>. Makes code answers feel
   like a real assistant, not mangled prose. The wrapper owns the border/radius; the inner pre is flush. */
.code-block { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); box-shadow: var(--sh-sm); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px 5px 12px; background: color-mix(in srgb, var(--panel-2) 88%, #000 12%); border-bottom: 1px solid var(--line); }
.code-lang { font: 700 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3, #8a8a8a); }
.code-head .copy-btn { opacity: .65; }
.code-block pre.code { border: 0; border-radius: 0; margin: 0; background: transparent; box-shadow: none; }
.code-block pre.code:hover { transform: none; box-shadow: none; }
.answer .code-block pre.code code { background: none; border: 0; padding: 0; }
/* light syntax-highlight tokens (read on the dark code panel) */
.code-block .tok-com { color: #7d8a7d; font-style: italic; }
.code-block .tok-str { color: #98c379; }
.code-block .tok-num { color: #d19a66; }
.code-block .tok-kw  { color: #c678dd; }
/* live artifact preview (Phase 4) */
.artifact-preview { width: 100%; border: 0; border-top: 1px solid var(--line); background: #fff; display: block; }
.artifact-bar { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: color-mix(in srgb, var(--panel-2) 88%, #000 12%); border-top: 1px solid var(--line); }
.artifact-btn { font: 600 11px/1 var(--sans); padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-3); color: var(--ink); cursor: pointer; }
.artifact-btn:hover { border-color: var(--coral-line); color: var(--coral-ink); background: var(--coral-soft2); }
.artifact-tag { margin-left: auto; font: 600 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3, #8a8a8a); }

/* Artifacts / Canvas (Phase 5) — slide-in side panel for runnable/iterable artifacts */
.canvas { position: fixed; top: 0; right: 0; width: min(620px, 92vw); height: 100vh; z-index: 80; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 40px -20px rgba(40,38,31,.4); display: flex; flex-direction: column; transition: width .18s ease; }
.canvas[hidden] { display: none; }
.canvas.canvas-full { width: 100vw; } /* Expand: full-screen so big/interactive artifacts (games) fit + are playable */
.canvas-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.canvas-title-wrap { min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.canvas-title { font: 600 14px/1.2 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canvas-model { font: 500 11px/1 var(--mono); color: var(--ink-3); flex: none; }
.canvas-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.canvas-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.canvas-toggle .cv-tab { padding: 5px 10px; font: 600 12px/1 var(--sans); border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.canvas-toggle .cv-tab.on { background: var(--accent); color: #fff; }
.canvas-toggle .cv-tab:disabled { opacity: .4; cursor: not-allowed; }
.cv-btn, .cv-x { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: 5px 9px; font: 600 12px/1 var(--sans); cursor: pointer; }
.cv-btn:hover, .cv-x:hover { border-color: var(--accent); color: var(--ink); }
.cv-x { border: 0; font-size: 14px; }
.canvas-tabs { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; }
.canvas-tabs:empty { display: none; }
.cv-version { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 11px/1 var(--sans); cursor: pointer; }
.cv-version.on { border-color: var(--accent); color: var(--accent); }
.cv-version .cv-by { color: var(--ink-3); font-weight: 500; }
.canvas-body { flex: 1; min-height: 0; overflow: auto; background: var(--panel-2); }
.cv-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.cv-code { margin: 0; padding: 14px; min-height: 100%; overflow: auto; font: 12.5px/1.5 var(--mono); color: #c4c1b5; white-space: pre; background: var(--panel-2); }
.cv-code .tok-com { color: #7d8a7d; font-style: italic; } .cv-code .tok-str { color: #98c379; } .cv-code .tok-num { color: #d19a66; } .cv-code .tok-kw { color: #c678dd; }
.cv-empty { padding: 28px; color: var(--ink-3); font: 500 13px/1.5 var(--sans); text-align: center; }
/* self-healing run-and-fix bar (Phase 7) */
.canvas-fix { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #3a1d1d; border-bottom: 1px solid #5a2d2d; }
.canvas-fix[hidden] { display: none; }
.canvas-fix .cf-msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/1.4 var(--mono); color: #f0c9c0; }
.canvas-fix .cf-fix { flex: none; background: var(--accent); color: #fff; border: 0; border-radius: 7px; padding: 5px 11px; font: 600 12px/1 var(--sans); cursor: pointer; }
.canvas-fix .cf-x { flex: none; background: transparent; border: 0; color: #f0c9c0; cursor: pointer; font-size: 13px; }
@media (max-width: 680px) { .canvas { width: 100vw; } }

/* rich answer formatting — make every answer graphical + scannable */
.answer h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 16px 0 8px; letter-spacing: -.01em; color: var(--text); }
.answer h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 15px 0 6px; color: var(--text); }
.answer h4 { font-size: 13px; font-weight: 700; margin: 13px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.answer p { margin: 9px 0; line-height: 1.68; }
.answer ul, .answer ol { margin: 8px 0; padding-left: 22px; }
.answer li { margin: 5px 0; line-height: 1.6; }
.answer a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.answer code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-family: var(--mono); font-size: .88em; }
.answer pre.code code { background: none; border: 0; padding: 0; }
.answer blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: #5c4b43; }
.answer hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.answer .md-table-wrap { width: 100%; margin: 13px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; }
.answer .md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
/* Columns size to their longest WHOLE word — never crush a header into one letter per
   line (the inherited `overflow-wrap:anywhere` on .answer would otherwise allow that). */
.answer .md-table th, .answer .md-table td { overflow-wrap: normal; word-break: normal; hyphens: none; }
.answer .md-table th { background: var(--panel-2); text-align: left; padding: 9px 12px; font-weight: 700; border-bottom: 1px solid var(--line-2); }
.answer .md-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.answer .md-table tr:last-child td { border-bottom: 0; }
.answer .md-table tbody tr:nth-child(even) { background: rgba(40,38,31,.022); }
.answer > :first-child { margin-top: 0; }

/* live sports schedule table (logos + odds in answer) */
.sports-board {
  width: 100%;
  margin-top: 44px; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.sports-board-head { margin-bottom: 32px; max-width: 72ch; }
.sports-board-head h2 {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 38px); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.08; margin-bottom: 10px;
}
.sports-schedule-wrap { display: flex; flex-direction: column; gap: 40px; }
.sports-mount { width: 100%; }
.sports-mount:empty { display: none; }
.sports-source-note { font: 500 11px var(--mono); color: var(--ink-3); margin-top: 12px; }
.sports-schedule { margin: 0; width: 100%; }
.sports-table-title { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 24px); font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.sports-table-meta { font-size: 13px; color: var(--ink-3); margin: 0 0 18px; }
.sports-lead { margin-bottom: 14px; }
.sports-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sports-schedule-table {
  width: 100%;
  table-layout: fixed;
  font-size: 14px;
  margin: 0;
}
.answer .sports-schedule-table th,
.answer .sports-schedule-table td { vertical-align: middle; }
.sports-schedule-table th {
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  padding: 14px 22px;
}
.sports-schedule-table td {
  vertical-align: middle;
  padding: 20px 22px;
}
.sports-schedule-table th:nth-child(1),
.sports-schedule-table th:nth-child(2) { width: 22%; }
.sports-schedule-table th:nth-child(3) { width: 14%; }
.sports-schedule-table th:nth-child(4) { width: 11%; }
.sports-schedule-table th:nth-child(5),
.sports-schedule-table th:nth-child(6) { width: 15.5%; }
.sports-schedule-table tbody tr:nth-child(even) { background: rgba(40,38,31,.028); }
.sports-team-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-align: left;
}
.sports-team-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.sports-team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sports-team-score { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1; }
.sports-odds-stack { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12.5px; line-height: 1.4; }
.sports-odds-line { color: var(--ink); white-space: nowrap; }
.sports-odds-na { color: var(--ink-4); }
.sports-odds-provider { font-size: 11px; color: var(--ink-4); margin: 12px 0 0; font-style: italic; }
.sports-icon {
  width: 48px; height: 48px; object-fit: contain; flex-shrink: 0;
  border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border);
}
.sports-icon.round { border-radius: 50%; object-fit: cover; }
.sports-icon-fallback {
  width: 48px; height: 48px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--ink-3);
}
.sports-source { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--coral-ink); text-decoration: none; font-weight: 600; }
.sports-source:hover { text-decoration: underline; }
.sports-row.live td:nth-child(4) { color: var(--ok); font-weight: 600; }
.intel-deck-page .sports-board {
  margin-top: 48px;
  padding-top: 44px;
}
.intel-deck-page .sports-board-head { max-width: none; }
.intel-deck-page .sports-schedule-wrap { gap: 48px; }
.intel-deck-page .sports-schedule-table th { padding: 16px 24px; }
.intel-deck-page .sports-schedule-table td { padding: 22px 24px; }
.intel-deck-page .sports-team-cell { gap: 16px; }
.intel-deck-page .sports-icon,
.intel-deck-page .sports-icon-fallback { width: 52px; height: 52px; }
.intel-deck-page .sports-team-name { font-size: 15px; }
.intel-deck-page .sports-team-score { font-size: 22px; }
@media (max-width: 900px) {
  .sports-schedule-table { table-layout: auto; min-width: 860px; }
  .sports-schedule-table th,
  .sports-schedule-table td { padding: 16px 18px; }
}
.cites { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.cites-rich { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 0; padding-top: 0; border-top: 0; }
.cites-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.cite { font-size: 11.5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.cite:hover { border-color: var(--accent); color: var(--accent); }
.cite-rich { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; border-radius: 14px; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.cite-rich:hover { border-color: var(--coral-line); box-shadow: var(--sh-sm); color: var(--ink); }
.cite-host { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); }
.cite-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.cites-card { margin-top: 0; }
.cites-intro { font-size: 14px; color: var(--ink-3); line-height: 1.45; margin: -2px 0 14px; }
.cites-slot:empty { display: none; }
.syn-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.syn-hero-top .label { margin-bottom: 0; }
.syn-trust { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #2d7a5f; background: #e8f5ef; border: 1px solid #b8e0ce; border-radius: var(--r-pill); padding: 5px 10px; font-weight: 600; white-space: nowrap; }

/* embedded YouTube video card */
.video-card { margin: 14px 0; }
.video-head { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.video-title { color: var(--text); font-weight: 600; }
.video-ch { color: var(--muted); }
.video-frame { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.banner { display: flex; align-items: center; gap: 10px; background: #fbf3e7; border: 1px solid #e7c9a0; color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin: 10px 0; transition: opacity 0.5s ease, transform 0.5s ease, margin 0.5s ease, padding 0.5s ease, max-height 0.5s ease; opacity: 1; transform: translateY(0); max-height: 200px; overflow: hidden; }
.banner.fade-out { opacity: 0; transform: translateY(-8px); margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; max-height: 0; border-top-width: 0; border-bottom-width: 0; border-color: transparent; }
.banner-msg { flex: 1 1 auto; }
.banner-x { flex: 0 0 auto; appearance: none; border: 0; background: transparent; color: var(--warn); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; opacity: 0.6; transition: opacity .15s, background .15s; }
.banner-x:hover { opacity: 1; background: rgba(0,0,0,0.06); }

/* ---------- composer ---------- */
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 14px 20px 22px; background: var(--bg); max-width: 1180px; margin: 0 auto; width: 100%; }
.composer input, .composer textarea { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; color: var(--text); font-size: 16px; padding: 15px 18px; outline: none; transition: .15s; font-family: var(--sans); }
.composer input::placeholder, .composer textarea::placeholder { color: #a8a59a; }
.composer input:focus, .composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer button { background: var(--accent); color: #fff; border: 0; border-radius: 13px; font-weight: 600; padding: 0 22px; cursor: pointer; font-size: 14px; transition: .15s; }
.composer button:hover { background: var(--accent-2); }
.composer button:disabled { opacity: .5; cursor: default; }

/* attachments — attach button, pending chips above composer, in-bubble previews */
.composer .attachBtn { background: var(--panel); color: var(--muted); border: 1px solid var(--line-2); border-radius: 13px; width: 48px; padding: 0; font-size: 18px; flex: 0 0 auto; }
.composer .attachBtn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 0; background: var(--bg); }
.att-chip { display: flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 5px 8px 5px 6px; max-width: 220px; }
.att-thumb { width: 30px; height: 30px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.att-icon { font-size: 18px; width: 26px; text-align: center; flex: 0 0 auto; }
.att-name { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; line-height: 1; flex: 0 0 auto; }
.att-x:hover { color: var(--accent); }
.bubble-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bubble-thumb { max-width: 200px; max-height: 200px; border-radius: 11px; display: block; border: 1px solid var(--line); }
.bubble-file { font-size: 13px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }

/* ---------- structured rally results page ---------- */
.route-answer { max-width: 840px; }
.results { margin-top: 6px; }
.answer-layout { display: flex; flex-direction: column; gap: 20px; align-items: stretch; min-width: 0; }
.results-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.results-side { display: flex; flex-direction: column; gap: 18px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 22px rgba(40,38,31,.05); padding: 20px 22px; min-width: 0; }
.rlabel { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #a89f90; font-weight: 800; margin-bottom: 10px; }
.rhead { font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.16; letter-spacing: -0.02em; margin: 0 0 10px; color: var(--text); }
.rsummary { font-size: 15.5px; line-height: 1.62; color: #6c6860; margin: 0; }
.rsummary a { color: var(--accent); }
.rank { display: grid; grid-template-columns: 32px 1fr auto; gap: 13px; align-items: center; border-top: 1px solid var(--line); padding: 15px 0 3px; }
.rank:last-child { padding-bottom: 0; }
.rnum { width: 30px; height: 30px; background: var(--accent); color: #fff; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.rmid { min-width: 0; }
.rname { font-size: 17px; font-weight: 750; color: var(--text); }
.rwhy { color: var(--muted); font-size: 13.5px; margin-top: 2px; line-height: 1.45; }
.rscore { font-family: var(--mono); color: #3f9e86; font-weight: 800; font-size: 14px; white-space: nowrap; }
.rnotes { display: flex; flex-direction: column; gap: 12px; }
.rnote { border-left: 4px solid var(--accent); background: #fff7f1; border-radius: 12px; padding: 12px 14px; color: #6f695e; font-size: 14px; line-height: 1.5; }
.rnote b { color: var(--text); }
.src-list { display: flex; flex-direction: column; gap: 8px; }
.src { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); text-decoration: none; transition: .15s; }
.src:hover { border-color: var(--accent); background: var(--accent-soft); }
.src-t { color: var(--text); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-h { color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.video-cap { font-size: 13px; color: var(--text); margin-top: 9px; line-height: 1.4; }
.ractions { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 18px; }
.raction { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text); padding: 14px 16px; font-weight: 650; font-size: 13.5px; cursor: pointer; transition: .15s; font-family: var(--sans); text-align: left; }
.raction:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.ra-arrow { color: var(--accent); font-weight: 800; }
.mc-pick { color: var(--text); font-weight: 650; font-size: 13px; line-height: 1.4; }
.mc-angle { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.results .feedback { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.results .feedback button { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 5px 11px; cursor: pointer; font-size: 13px; color: var(--text); }
.results .feedback button:hover { border-color: var(--accent); }
.results .feedback button.picked { background: var(--accent-soft); border-color: var(--accent); }
@media (max-width: 880px) {
  .ractions { grid-template-columns: 1fr 1fr; }
}

/* ---------- entry motion (results + home cards) ---------- */
.entering { animation: riseIn .55s cubic-bezier(.32,.72,0,1) both; animation-delay: var(--enter-delay, 0ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .entering, .scard.entering, .scard.exiting, .suggest-rotate { animation: none !important; }
  .scard.exiting { opacity: 0; }
}

/* ---------- results information hierarchy ---------- */
.results-stack { display: flex; flex-direction: column; gap: 20px; margin-bottom: 8px; scroll-margin-top: 76px; }
.result-meta,
.route-hero,
.results-stack .syn-hero { scroll-margin-top: 76px; }
.result-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 4px 2px 2px;
}
.meta-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 12px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 6px 12px; box-shadow: var(--sh-sm);
}
.meta-chip-k { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }
.meta-chip-v { color: var(--ink); font-weight: 600; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verdict-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px;
  padding: 14px 18px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--coral-soft2), var(--surface));
  border: 1px solid var(--coral-line); box-shadow: var(--sh-sm);
}
.verdict-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(193,95,60,.12); }
.verdict-copy { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.verdict-k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-ink); }
.verdict-v { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.verdict-why { flex: 1; min-width: 200px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.result-shell {
  padding: 6px; border-radius: 26px; background: var(--surface-3);
  border: 1px solid var(--border); box-shadow: var(--sh-sm);
}
.result-shell-pad {
  border-radius: 22px; background: var(--surface);
  border: 1px solid var(--border-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
  overflow: hidden;
}
.result-shell-pad > .card { border: 0; border-radius: 0; box-shadow: none; }
.consensus { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.consensus-track { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; max-width: 220px; }
.consensus-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), #3f9e86); transition: width .6s cubic-bezier(.32,.72,0,1); }
.consensus-pct { font-family: var(--mono); font-size: 11px; color: var(--ink-3); min-width: 34px; }
.rank-card .rank-intro { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-3); line-height: 1.45; }
.rank-mid { min-width: 0; flex: 1; }
.lead-summary { font-family: var(--serif); font-size: 18px !important; line-height: 1.55 !important; color: var(--ink-2) !important; }
.results-stack.preview .syn-preview { border-color: var(--coral-line); }
.preview-pill {
  display: inline-flex; margin: 0 0 10px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--coral-ink);
  background: var(--coral-soft2); border: 1px solid var(--coral-line); border-radius: var(--r-pill);
  padding: 4px 10px; animation: suggestPulse 2s cubic-bezier(.32,.72,0,1) infinite;
}
.disagree-card { background: linear-gradient(180deg, var(--amber-bg), var(--surface) 55%); border-color: var(--amber-line) !important; }
.label-warn { color: var(--amber-ink) !important; }
.disagree-list { display: flex; flex-direction: column; gap: 10px; }
.matrix-card .matrix { margin-top: 4px; }
.route-page .route-hero { min-height: 120px; }
.route-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-bottom: 14px; letter-spacing: .02em; }
.route-body { font-size: 16px; line-height: 1.65; }
.route-done .route-meta { color: var(--coral-ink); }
.route-layout { margin-top: 0 !important; }

/* ---------- answer page (pong_search_ui_mockup.html format) ---------- */
.answer-page { width: 100%; }
.answer-page .rally { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--sh-md); overflow: hidden; margin: 0; }
.answer-page .rally-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); font-family: var(--mono); letter-spacing: .06em; color: var(--coral); font-weight: 700; font-size: 12.5px; }
.answer-page .rally.rally-done .court { display: none; }
.answer-page .rally-fold { margin-top: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface-2); overflow: hidden; }
.answer-page .rally-fold-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.answer-page .rally-fold-sum::-webkit-details-marker { display: none; }
.answer-page .rally-fold-sum::before { content: "▸"; color: var(--coral); margin-right: 8px; transition: transform .15s; }
.answer-page .rally-fold[open] .rally-fold-sum::before { transform: rotate(90deg); }
.answer-page .rally-fold-title { color: var(--ink); }
.answer-page .rally-fold-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 500; }
.answer-page .rally-fold .rally { border: 0; border-radius: 0; box-shadow: none; margin: 0; }
.answer-page .card.syn-hero { border-color: var(--coral-line); box-shadow: var(--sh-md), 0 0 0 1px var(--coral-soft2); }
.answer-page .model-card.winner { background: linear-gradient(180deg, var(--coral-soft2), transparent 85%); }
.answer-page .model-card.winner h3::after { content: " · winner"; font-size: 11px; color: var(--coral); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.answer-page .model-card .mc-score { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.answer-page .model-card.winner .mc-score { color: var(--coral-ink); border-color: var(--coral-line); background: var(--coral-soft); }
.answer-page .model-card.errored { opacity: .55; }
.answer-page .model-card.errored h3::after { content: " · no response"; font-size: 11px; color: var(--ink-4); font-weight: 600; }
.answer-page .rally-after { margin-bottom: 4px; }
.answer-page .mini-pill { border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; color: var(--ink-3); background: var(--surface); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-weight: 500; font-size: 12.5px; }
.answer-page .court { position: relative; min-height: 118px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(var(--rcols,4), 1fr); align-items: center; text-align: center; padding: 20px 0; }
.answer-page .court::before { content: ""; position: absolute; left: 50%; top: 22px; bottom: 22px; border-left: 3px dashed var(--border-2); }
.answer-page .court-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1; }
.answer-page .court .model-dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.answer-page .court .model-name { font-size: 15px; font-weight: 800; color: var(--ink-3); }
.answer-page .paddle { position: absolute; font-size: 44px; z-index: 2; top: 50%; transform: translateY(-50%); }
.answer-page .paddle.left { left: 22px; }
.answer-page .paddle.right { right: 22px; transform: translateY(-50%) scaleX(-1); }
.answer-page .ball { position: absolute; top: 28px; left: 50%; font-size: 20px; z-index: 2; }
.answer-page .court.searching .ball { animation: courtBall 1.7s ease-in-out infinite; }
@keyframes courtBall { 0%,100% { left: 12%; } 50% { left: 84%; } }
.answer-page .model-grid { display: grid; grid-template-columns: repeat(var(--rcols,4), 1fr); }
.answer-page .model-card { min-height: 110px; padding: 20px 22px; border-right: 1px solid var(--border); }
.answer-page .model-card:last-child { border-right: 0; }
.answer-page .model-card h3 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 700; }
.answer-page .model-card .model-dot.sm { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.answer-page .model-card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 0; }
.answer-page .model-card b { color: var(--ink); }
.answer-page .mc-loading { color: var(--ink-4); font-style: italic; }
.answer-page .answer-layout,
.results-stack .answer-layout { display: flex; flex-direction: column; gap: 22px; align-items: stretch; margin-top: 4px; }
.answer-page .answer-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.widgets-below { width: 100%; min-width: 0; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--border); }
.widgets-below:empty { display: none; margin: 0; padding: 0; border: 0; }
.widgets-below .sources { margin-top: 0; }
.answer-page .card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--sh-md); padding: 24px; }
.answer-page .label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 800; margin-bottom: 12px; }
.answer-page .card h2 { font-family: var(--serif); font-size: clamp(26px, 4vw, 34px); font-weight: 600; margin: 0 0 12px; letter-spacing: -.02em; color: var(--ink); line-height: 1.12; }
.answer-page .syn-hero { background: linear-gradient(180deg, var(--surface), var(--coral-soft2) 120%); }
.answer-page .syn-hero-only { padding-bottom: 28px; }
.answer-page .summary { font-size: 17px; color: var(--ink-2); line-height: 1.6; margin: 0; }
.answer-page .rank { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; border-top: 1px solid var(--border); padding: 16px 0 4px; }
.answer-page .rank:first-of-type { margin-top: 10px; }
.answer-page .num { width: 32px; height: 32px; background: var(--coral); color: #fff; border-radius: 11px; display: grid; place-items: center; font-weight: 900; }
.answer-page .rank-name { font-size: 20px; font-weight: 800; color: var(--ink); }
.answer-page .why { color: var(--ink-3); margin-top: 3px; font-size: 14px; line-height: 1.45; }
.answer-page .score { font-family: var(--mono); color: #3f9e86; font-weight: 800; white-space: nowrap; }
.answer-page .disagree { display: grid; gap: 12px; }
.answer-page .note { border-left: 4px solid var(--coral); background: var(--coral-soft2); border-radius: 12px; padding: 13px 15px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.answer-page .note b { color: var(--ink); }
.answer-page .matrix { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 6px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; }
.answer-page .matrix th, .answer-page .matrix td { text-align: left; padding: 12px 13px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--ink); }
.answer-page .matrix th { background: var(--surface-2); font-weight: 700; color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.answer-page .matrix tbody tr:last-child td { border-bottom: 0; }
.answer-page .actions, .results-stack .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.answer-page .action, .results-stack .action {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface);
  padding: 14px 14px 14px 18px; font-weight: 600; font-size: 13.5px; color: var(--ink);
  cursor: pointer; text-align: left; box-shadow: var(--sh-sm); font-family: var(--sans);
  transition: transform .2s cubic-bezier(.32,.72,0,1), border-color .2s ease, box-shadow .2s ease, color .2s ease;
  animation: riseIn .45s cubic-bezier(.32,.72,0,1) both; animation-delay: var(--enter-delay, 0ms);
}
.answer-page .action:hover, .results-stack .action:hover { border-color: var(--coral); color: var(--coral-ink); transform: translateY(-1px); box-shadow: var(--sh-md); }
.answer-page .action:active, .results-stack .action:active { transform: scale(.98); }
.action-go { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; transition: transform .2s cubic-bezier(.32,.72,0,1), background .2s ease; }
.action-go-ico { font-size: 13px; color: var(--ink-3); }
.results-stack .action:hover .action-go { background: var(--coral); border-color: var(--coral); }
.results-stack .action:hover .action-go-ico { color: #fff; transform: translate(1px, -1px); }
.action-t { min-width: 0; line-height: 1.35; }
.answer-page .rfeedback, .results-stack .rfeedback {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 18px 4px 6px; border-top: 1px solid var(--border); color: var(--ink-2); font-size: 13px;
}
.rfeedback-lbl { font-size: 12.5px; color: var(--ink-3); }
.rfeedback-sep { width: 1px; height: 18px; background: var(--border-2); margin: 0 4px; }
.answer-page .rfeedback .fbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; }
.answer-page .rfeedback .fbtn.picked { background: var(--coral-soft); border-color: var(--coral); }
@media (max-width: 900px) {
  .answer-page .model-grid, .answer-page .actions { grid-template-columns: 1fr; }
  .answer-page .model-card { border-right: 0; border-bottom: 1px solid var(--border); }
  .answer-page .court { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------- evergreen topic page (/best/<slug>) ---------- */
.topic-page { max-width: 1100px; margin: 0 auto; padding: 28px clamp(16px,4vw,32px) 70px; }
.presented-by { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--coral-soft2); border: 1px solid var(--coral-line); border-radius: var(--r-pill); padding: 8px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 20px; width: fit-content; max-width: 100%; }
.pb-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.pb-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink); text-decoration: none; }
.pb-logo { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 12px; }
.pb-note { color: var(--ink-4); font-size: 12px; }
.tp-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); font-weight: 600; margin-bottom: 10px; }
.tp-h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px,5vw,46px); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); margin: 0 0 14px; }
.tp-rallied { font-size: 15px; color: var(--ink-2); max-width: 640px; margin: 0 0 26px; line-height: 1.5; }
.tp-cta { display: inline-block; margin-top: 6px; background: var(--coral); color: #fff; padding: 13px 22px; border-radius: 14px; font-weight: 600; text-decoration: none; box-shadow: var(--sh-sm); }
.tp-cta:hover { background: var(--coral-ink); }
.tp-top-cta { font-size: 13px; font-weight: 600; color: var(--coral-ink); text-decoration: none; border: 1px solid var(--coral-line); border-radius: var(--r-pill); padding: 7px 14px; }
.tp-takes { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.tp-take { border: 1px solid var(--border); border-radius: var(--r-md); padding: 13px 15px; background: var(--surface-2); }
.tp-take-h { font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 5px; }
.tp-take-b { font-family: var(--serif); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.tp-aside { display: flex; flex-direction: column; gap: 10px; }
.widgets-below .tp-aside { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.board-featured .tp-src.tp-featured { width: 100%; max-width: min(640px, 52%); margin: 0 auto; border-radius: 22px; box-shadow: var(--sh-md); padding: 0; overflow: hidden; }
.board-featured .tp-src.tp-featured .tp-chip { padding: 14px 18px 0; }
.board-featured .tp-src.tp-featured .tp-src-t { padding: 0 18px; font-size: 17px; }
.board-featured .tp-src.tp-featured .tp-src-m { padding: 0 18px 16px; font-size: 13px; }
.board-grid .tp-src { height: 100%; }
.tp-src { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); text-decoration: none; transition: .15s; box-shadow: var(--sh-sm); }
.tp-src:hover { border-color: var(--coral-line); }
.tp-src-sp { background: var(--coral-soft2); border-color: var(--coral-line); }
.tp-chip { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.tp-chip-sp { color: var(--coral-ink); font-weight: 700; }
.tp-src-t { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.tp-src-m { font-size: 11.5px; color: var(--ink-3); }
.tp-video-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; background: #000; margin: 6px 0; }
.tp-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tp-foot { max-width: 1100px; margin: 0 auto; padding: 24px clamp(16px,4vw,32px) 60px; border-top: 1px solid var(--border); color: var(--ink-3); font-size: 13px; }
.tp-foot a { color: var(--coral-ink); }
@media (max-width: 820px) { .board-featured .tp-src.tp-featured { max-width: 100%; } }
@media (max-width: 760px) { .tp-takes { grid-template-columns: 1fr; } }

/* ---------- rally panel + synthesized answer (spec-faithful) ---------- */
.rally { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; margin-bottom: 20px; }
.rally-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.rally-status { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.rally-status .dot-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.3; transform:scale(.8)} 50%{opacity:1; transform:scale(1.2)} }
.rally-mode { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 11px; text-transform: lowercase; letter-spacing: .04em; }
.rally-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.rally-banner .paddle { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.12)); }
.rally-banner .paddle.left { transform: rotate(-18deg); animation: swayL 4s ease-in-out infinite; }
.rally-banner .paddle.right { transform: rotate(18deg) scaleX(-1); animation: swayR 4s ease-in-out infinite; }
@keyframes swayL { 0%,100%{transform:rotate(-18deg)} 50%{transform:rotate(-10deg)} }
@keyframes swayR { 0%,100%{transform:rotate(18deg) scaleX(-1)} 50%{transform:rotate(10deg) scaleX(-1)} }
.rally-players { flex: 1; display: flex; align-items: center; justify-content: space-around; gap: 6px; flex-wrap: wrap; }
.rp { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--ink); transition: opacity .3s; }
.rp .pdot { width: 8px; height: 8px; border-radius: 50%; }
.rp.dim { color: var(--ink-3); }
.rp.dim .pdot { opacity: .5; }
.rally-cards { display: grid; grid-template-columns: repeat(var(--rcols, 4), 1fr); gap: 0; }
.mcard { padding: 14px 15px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 9px; min-height: 132px; }
.mcard:last-child { border-right: none; }
.mcard-head { display: flex; align-items: center; gap: 7px; }
.mcard-head .pdot { width: 8px; height: 8px; border-radius: 50%; }
.mcard-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.mcard-pts { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.mcard-pts b { color: var(--coral); font-weight: 600; }
.mcard-body { font-family: var(--serif); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.mcard-meta { margin-top: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); letter-spacing: .02em; }
.mcard.winner { background: linear-gradient(180deg, var(--coral-soft2), transparent 70%); }
.mcard.winner .mcard-name::after { content: " 👑"; font-size: 11px; }
.rally-verdict { padding: 11px 18px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--border); background: var(--surface); }
.rally-verdict b { color: var(--ink); }
@media (max-width: 620px) { .rally-cards { grid-template-columns: repeat(2, 1fr) !important; } .rally-players { display: none; } }
.disagree { background: var(--amber-bg); border: 1px solid var(--amber-bg2); border-radius: var(--r-md); padding: 13px 16px; margin-bottom: 22px; }
.disagree-head { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-ink); display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-weight: 500; }
.disagree-body { font-family: var(--serif); font-size: 13.5px; line-height: 1.55; color: var(--amber-ink); }
.synth-by { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-size: 13px; color: var(--ink-2); }
.synth-by .chip-ico { color: var(--coral); display: inline-flex; }
.synth-by b { color: var(--ink); font-weight: 600; }
.answer.synth { font-family: var(--serif); color: var(--ink); }
.answer.synth .lead { font-size: 19px; line-height: 1.5; font-weight: 500; margin: 0 0 18px; letter-spacing: -.005em; }
.answer.synth h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 28px 0 12px; color: var(--ink); }
.agree-box { border-left: 3px solid var(--coral); background: var(--coral-soft2); border-radius: 4px var(--r-md) var(--r-md) 4px; padding: 13px 16px; margin: 0 0 22px; font-family: var(--serif); font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.agree-box b { color: var(--coral-ink); }
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin: 0 0 8px; box-shadow: var(--sh-sm); }
table.suv { width: 100%; border-collapse: collapse; font-family: var(--sans); }
table.suv thead th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; color: var(--ink-3); text-align: left; padding: 11px 13px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
table.suv td { padding: 12px 13px; font-size: 13.5px; color: var(--ink); border-bottom: 1px solid var(--border); vertical-align: top; }
table.suv tbody tr:last-child td { border-bottom: none; }
table.suv td:first-child { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
table.suv td:nth-child(2) { font-weight: 600; }
table.suv tr.total td { background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
table.suv tr.total td:nth-child(2) { color: var(--ink); }
.guide { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.guide li { display: flex; gap: 11px; font-family: var(--serif); font-size: 15px; line-height: 1.45; align-items: baseline; }
.guide .em { font-size: 17px; line-height: 1; flex: none; }
.guide b { font-weight: 600; }
.guide .arrow { color: var(--coral); font-weight: 600; }
.mentions { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 9px; }
.mentions li { font-family: var(--serif); font-size: 15px; line-height: 1.45; }
.mentions li::before { content: "•"; color: var(--coral); margin-right: 10px; font-weight: 700; }
.mentions b { font-weight: 600; }
.caveat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; margin: 20px 0 8px; font-family: var(--serif); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.caveat b { color: var(--ink); }
.synth-feedback { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 0; margin-top: 8px; border-top: 1px solid var(--border); }
.synth-feedback .lbl { font-size: 13px; color: var(--ink-2); }
.fbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: all .15s ease; }
.fbtn:hover { border-color: var(--coral-line); background: var(--coral-soft2); transform: translateY(-1px); }
.fbtn.picked { border-color: var(--coral); background: var(--coral-soft); }
.pref-chips { display: inline-flex; gap: 6px; margin-left: 4px; flex-wrap: wrap; }
.pref-chip { font-size: 12px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--border); color: var(--ink-2); background: var(--surface); cursor: pointer; transition: all .15s; }
.pref-chip:hover { border-color: var(--coral-line); color: var(--ink); }
.pref-chip.picked { background: var(--coral); color: #fff; border-color: var(--coral); }

/* ---------- Sources & Media board (Screen B) ---------- */
.sources { margin-top: 26px; }
.sources-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sources-title { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 9px; letter-spacing: -.01em; }
.sources-title .cnt { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.add-widget { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink); border: 1px solid var(--border-2); background: var(--surface); border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; transition: all .16s ease; box-shadow: var(--sh-sm); }
.add-widget:hover { border-color: var(--coral); color: var(--coral-ink); transform: translateY(-1px); box-shadow: var(--sh-md); }
.add-widget svg { width: 14px; height: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 12px; margin-bottom: 4px; }
.filters-all-on .fchip { cursor: default; pointer-events: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-pill); padding: 7px 13px; cursor: pointer; transition: all .15s ease; white-space: nowrap; }
.fchip .fcnt { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); }
.fchip:hover { border-color: var(--border-2); color: var(--ink); }
.fchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip.on .fcnt { color: rgba(255,255,255,.6); }
.board { display: flex; flex-direction: column; gap: 20px; width: 100%; min-width: 0; }
.board-featured { display: flex; justify-content: center; width: 100%; }
.board-featured .widget-featured { width: 100%; max-width: min(640px, 52%); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: start; width: 100%; }
.widget-featured { border-radius: 22px; box-shadow: var(--sh-md); }
.widget-featured .yt-thumb { aspect-ratio: 16 / 9; }
.widget-featured .yt-title { font-size: 17px; line-height: 1.35; }
.widget-featured .yt-meta { padding: 14px 18px 16px; }
.widget-featured .yt-sub { font-size: 13px; }
.widget-featured .yt-play .pbtn { width: 68px; height: 48px; border-radius: 12px; }
.widget-featured .yt-play .pbtn svg { width: 28px; height: 28px; }
.widget-featured .yt-play .pbtn svg path { fill: #fff !important; }
@media (max-width: 820px) {
  .board-featured .widget-featured { max-width: 100%; }
  .board-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 520px) {
  .board-grid { grid-template-columns: 1fr; }
}
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; position: relative; }
.widget:hover { box-shadow: var(--sh-md), 0 10px 30px rgba(99, 102, 241, 0.08); transform: translateY(-3px) scale(1.015); border-color: var(--coral-line); }
.widget.entering { animation: widgetIn .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes widgetIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.wtype { position: absolute; top: 11px; left: 11px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: #fff; padding: 4px 9px 4px 7px; border-radius: var(--r-pill); background: rgba(20,16,12,.62); backdrop-filter: blur(4px); }
.wtype .ti { width: 12px; height: 12px; display: inline-flex; }
.wtype .ti svg { width: 12px; height: 12px; }
.widget-pad { padding: 14px 15px; }
.widget-foot { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--ink-3); }
.widget-foot .src { font-weight: 500; color: var(--ink-2); }
.widget-foot .open { margin-left: auto; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; background: none; border: 0; font-size: 11.5px; transition: color .15s; }
.widget-foot .open svg { width: 13px; height: 13px; }
.widget:hover .widget-foot .open { color: var(--coral); }
.widget.is-model .widget-foot .src::after { content: " · AI-curated"; color: var(--ink-4); font-weight: 400; }
.widget.is-real .widget-foot .src::after { content: " · Live"; color: #2d7a5f; font-weight: 600; }
.rank-links { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 5px; }
.rank-src { display: inline-block; font-size: 11.5px; font-family: var(--mono); color: var(--coral-ink); text-decoration: none; letter-spacing: .02em; }
.rank-src:hover { text-decoration: underline; }
.rank-phone { color: var(--ink-2); }
a.auto-link { color: var(--coral-ink); text-decoration: underline; text-underline-offset: 2px; }
a.auto-link:hover { color: var(--coral); }
a.auto-tel { font-variant-numeric: tabular-nums; }
.web-widget .web-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--ink); }
.web-results { display: flex; flex-direction: column; gap: 2px; }
.web-hit { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.web-hit:last-child { border-bottom: 0; }
.web-hit:hover .web-hit-title { color: var(--coral-ink); text-decoration: underline; }
.web-hit-host { font-size: 11px; font-family: var(--mono); color: var(--ink-3); }
.web-hit-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.web-hit-snippet { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.guest-panel { z-index: 21; }
.guest-intro { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 12px 0 16px; }
.guest-row { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.guest-row input { font-weight: 400; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-family: var(--sans); background: var(--panel-2); }
.guest-save { width: 100%; margin-top: 8px; border: 0; border-radius: var(--r-pill); background: var(--coral); color: #fff; font-weight: 600; font-size: 13px; padding: 12px 16px; cursor: pointer; font-family: var(--sans); }
.guest-save:hover { background: var(--coral-ink); }
.meta-chip.meta-link { text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.meta-chip.meta-link:hover { border-color: var(--coral-line); background: var(--coral-soft2); }
.meta-chip.meta-link .meta-chip-v { color: var(--coral-ink); }
.cites-by-model { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.model-cites-h { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.cites-compact { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.cites-compact .cite { font-size: 11px; padding: 4px 9px; }
.regen-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; margin-top: 4px; border: 1px dashed var(--coral-line); border-radius: 16px; background: var(--coral-soft2); }
.regen-bar p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 520px; line-height: 1.4; }
.regen-btn { flex: none; border: 0; border-radius: var(--r-pill); background: var(--coral); color: #fff; font-weight: 600; font-size: 13px; padding: 10px 16px; cursor: pointer; font-family: var(--sans); box-shadow: var(--sh-sm); }
.regen-btn:hover { background: var(--coral-ink); }
.yt-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111; }
.yt-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.yt-play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.yt-play .pbtn {
  width: 54px; height: 38px; border-radius: 10px; background: var(--yt); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); cursor: pointer; border: 0; transition: transform .18s ease;
  pointer-events: auto;
}
.widget:hover .yt-play .pbtn { transform: scale(1.08); }
.yt-play .pbtn svg,
.yt-play .pbtn svg path { fill: #fff !important; color: #fff; }
.yt-dur { position: absolute; bottom: 8px; right: 8px; font-family: var(--mono); font-size: 11px; color: #fff; background: rgba(0,0,0,.78); padding: 2px 6px; border-radius: 5px; }
.yt-meta { padding: 11px 14px 12px; }
.yt-title { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--ink); margin-bottom: 6px; }
.yt-sub { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); }
.yt-ch { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.yt-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.yt-expand { position: absolute; top: 8px; right: 8px; z-index: 4; width: 28px; height: 28px; border-radius: 7px; background: rgba(20,16,12,.6); backdrop-filter: blur(4px); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; }
.yt-thumb:hover .yt-expand { opacity: 1; }
.yt-expand svg { width: 14px; height: 14px; }
/* YouTube fallback (no embeddable video) — clean branded search tile, not a fake player */
.yt-thumb.yt-search { background: linear-gradient(135deg, #ff3b30 0%, #c00 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; transition: filter .15s; }
.yt-thumb.yt-search:hover { filter: brightness(1.06); }
.yt-search-logo { color: #fff; display: flex; }
.yt-search-logo svg { width: 58px; height: 58px; }
.yt-search-logo svg path { fill: #fff; }
.yt-search-cta { color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .01em; }
.rd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.rd-sub { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.rd-ico { width: 20px; height: 20px; border-radius: 50%; background: var(--reddit); display: flex; align-items: center; justify-content: center; flex: none; }
.rd-ico svg { width: 13px; height: 13px; }
.rd-title { font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); margin-bottom: 10px; }
.rd-comment { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 11px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.rd-comment .who { font-weight: 600; color: var(--ink); font-size: 11.5px; margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.rd-comment .who .uv { font-family: var(--mono); color: var(--reddit); font-size: 10.5px; }
.rd-stats { display: flex; gap: 14px; margin-top: 11px; font-size: 11.5px; color: var(--ink-3); }
.rd-stats span { display: inline-flex; align-items: center; gap: 5px; }
.rd-stats svg { width: 13px; height: 13px; }
.rd-up { color: var(--reddit); font-weight: 600; }
.x-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.x-av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }
.x-av-img { width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover; border: 1px solid var(--border); }
.x-name { font-weight: 700; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 4px; }
.x-name .vrf { color: var(--maps); display: inline-flex; }
.x-name .vrf svg { width: 14px; height: 14px; }
.x-handle { font-size: 12.5px; color: var(--ink-3); }
.x-logo { margin-left: auto; color: var(--x); }
.x-logo svg { width: 15px; height: 15px; }
.x-text { font-size: 14.5px; line-height: 1.5; color: var(--ink); margin-bottom: 11px; }
.x-stats { display: flex; gap: 18px; font-size: 12px; color: var(--ink-3); }
.x-stats span { display: inline-flex; align-items: center; gap: 6px; }
.x-stats svg { width: 14px; height: 14px; }
.rv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rv-logo { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.rv-score { margin-left: auto; text-align: right; }
.rv-score .num { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1; }
.rv-score .cnt { font-size: 11px; color: var(--ink-3); }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 14px; height: 14px; }
.rv-bars { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.rv-bar { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.rv-bar .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.rv-bar .bar i { display: block; height: 100%; background: var(--yelp); border-radius: 3px; }
.rv-bar .tnum { font-family: var(--mono); }
.rv-quote { font-family: var(--serif); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); border-left: 2px solid var(--border-2); padding-left: 11px; font-style: italic; }
.rv-quote .who { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 5px; font-family: var(--sans); }
.map-canvas { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #E8EDE4; }
.map-canvas svg { width: 100%; height: 100%; display: block; }
.map-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.map-pin .pinhead { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--yelp); border: 2px solid #fff; box-shadow: 0 3px 6px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
.map-pin .pinhead b { transform: rotate(45deg); color: #fff; font-size: 10px; font-family: var(--mono); }
.map-list { padding: 4px 0; }
.map-item { display: flex; gap: 11px; padding: 10px 15px; border-top: 1px solid var(--border); align-items: flex-start; }
.map-item:first-child { border-top: none; }
.map-num { width: 20px; height: 20px; border-radius: 50%; background: var(--yelp); color: #fff; font-family: var(--mono); font-size: 10.5px; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.map-item .nm { font-weight: 600; font-size: 13px; color: var(--ink); }
.map-item .det { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.map-item .det .rt { color: var(--yelp); font-weight: 600; }
.shop-grid { display: flex; flex-direction: column; }
.shop-item { display: flex; gap: 12px; padding: 12px 15px; border-top: 1px solid var(--border); align-items: center; }
.shop-item:first-child { border-top: none; }
.shop-img { width: 64px; height: 48px; border-radius: var(--r-sm); flex: none; overflow: hidden; border: 1px solid var(--border); }
.shop-info { flex: 1; min-width: 0; }
.shop-nm { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.shop-tag { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.shop-price { font-family: var(--mono); font-size: 13px; color: var(--ink); font-weight: 500; }
.shop-cta { font-size: 11.5px; color: var(--coral-ink); border: 1px solid var(--coral-line); background: var(--coral-soft2); border-radius: var(--r-pill); padding: 4px 10px; white-space: nowrap; cursor: pointer; transition: all .15s; }
.shop-cta:hover { background: var(--coral); color: #fff; border-color: var(--coral); }
/* sponsored ("sponsored but verified") widget */
.widget.sponsored { border-color: var(--coral-line); background: linear-gradient(180deg, var(--coral-soft2), var(--surface) 62%); }
.wtype.sp { background: var(--coral); color: #fff; }
.sp-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sp-logo { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.sp-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.sp-headline { font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); margin-bottom: 6px; }
.sp-body { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-bottom: 10px; }
.sp-verdict { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 11px; font-size: 12px; color: var(--ink-2); line-height: 1.45; margin-bottom: 12px; }
.sp-verdict-h { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #3f9e86; font-weight: 600; margin-bottom: 3px; }
.sp-cta { background: var(--coral); color: #fff; border: 0; border-radius: var(--r-pill); padding: 8px 16px; font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s; }
.sp-cta:hover { background: var(--coral-ink); }
.ph-img { width: 100%; height: 100%; position: relative; background: var(--surface-3); }
.ph-img::after { content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; color: var(--ink-4); text-align: center; padding: 6px; letter-spacing: .02em; }
.ph-striped { background-image: repeating-linear-gradient(135deg, var(--surface-3) 0 9px, #ECE6DC 9px 18px); }
.palette-back { position: fixed; inset: 0; z-index: 60; background: rgba(40,30,20,.34); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease; padding: 0 16px; }
@media (min-width: 640px) { .palette-back { align-items: center; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.palette { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100%; max-width: 520px; box-shadow: var(--sh-lg); overflow: hidden; animation: sheetUp .28s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 640px) { .palette { border-radius: var(--r-lg); } }
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.palette-head { padding: 16px 18px 8px; }
.palette-head h4 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.palette-head p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px 20px; }
.pal-card { display: flex; align-items: center; gap: 11px; text-align: left; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 13px; background: var(--surface); cursor: pointer; transition: all .15s ease; }
.pal-card:hover { border-color: var(--coral-line); background: var(--coral-soft2); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.pal-ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.pal-ico svg { width: 17px; height: 17px; color: #fff; }
/* DOMParser-built SVGs don't inherit the swatch's white color, so force the fill white. */
.pal-ico svg path { fill: #fff; }
.pal-card .nm { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.pal-card .ds { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.palette-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.palette-foot button { font-size: 13px; color: var(--ink-2); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; }
.palette-foot button:hover { color: var(--ink); }
.video-back { position: fixed; inset: 0; z-index: 70; background: rgba(20,14,10,.78); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px 20px 64px; animation: fadeIn .2s ease; }
.vid-frame { width: min(900px, 100%); aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--sh-lg); position: relative; }
.vid-frame iframe { width: 100%; height: 100%; border: 0; }
.video-close { position: absolute; top: -44px; right: 0; color: #fff; font-size: 13px; display: flex; align-items: center; gap: 7px; opacity: .85; cursor: pointer; background: none; border: 0; }
.video-close:hover { opacity: 1; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; font-size: 13px; padding: 10px 16px; border-radius: var(--r-pill); box-shadow: var(--sh-lg); animation: fadeIn .2s ease; }
.toast.out { opacity: 0; transition: opacity .3s ease; }

/* ---------- memory drawer ---------- */
.memory { position: fixed; top: 0; right: 0; width: 330px; height: 100vh; background: var(--panel); border-left: 1px solid var(--line); padding: 20px; z-index: 20; box-shadow: -24px 0 60px rgba(40,38,31,.1); animation: slide .2s ease; display: flex; flex-direction: column; }
.memory[hidden] { display: none; } /* flex display above must not defeat the hidden attribute */
.memory-head { display: flex; justify-content: space-between; align-items: center; flex: none; }
.memory-head h3 { margin: 0; font-size: 15px; font-family: var(--serif); font-weight: 600; }
.memory-head button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
.memory-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 14px 0; padding-right: 4px; }
.memory-summary { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.memory-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.memory-facts li { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: var(--muted); word-break: break-word; }
.memory-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); opacity: .9; }
.mem-clear { flex: none; background: none; border: 1px solid var(--border); color: var(--coral, #c4634a); border-radius: 999px; padding: 5px 12px; font: 600 11.5px var(--sans); cursor: pointer; transition: background .15s, border-color .15s; }
.mem-clear:hover { background: rgba(196,99,74,.08); border-color: var(--coral, #c4634a); }
.home-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; font: 500 12.5px/1 var(--sans); color: var(--ink-3); }
.home-foot a { color: var(--ink-3); text-decoration: none; }
.home-foot a:hover { color: var(--accent); }
.home-foot span { opacity: .5; }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes blink { 50% { opacity: 0; } }

/* rally loader — paddle swings at a bouncing ball while Pong is searching/working */
.rally-loader { display: inline-flex; align-items: flex-end; gap: 0; height: 32px; }
.rl-paddle { height: 32px; width: auto; transform-origin: 60% 86%; animation: rl-swing .68s ease-in-out infinite; }
.rl-ball { width: 14px; height: 14px; margin: 0 0 9px 1px; background: url("/ball.png") center/contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); animation: rl-bounce .68s ease-in-out infinite; }
@keyframes rl-swing { 0%,100% { transform: rotate(3deg); } 36% { transform: rotate(-16deg); } 58% { transform: rotate(9deg); } }
@keyframes rl-bounce { 0%,100% { transform: translate(18px, 0); } 50% { transform: translate(0, -13px); } }

/* ---------- rally flow results (mockup format — no widget grid) ---------- */
.rally-flow { display: flex; flex-direction: column; gap: 0; }
.rally-flow .query-echo {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.rally-flow .query-text {
  font-family: var(--serif); font-size: clamp(20px, 3.5vw, 28px); font-weight: 500;
  line-height: 1.2; letter-spacing: -.02em; margin-bottom: 24px; color: var(--ink);
}
.rally-flow .verdict-hero {
  margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border);
  scroll-margin-top: 76px;
}
.rally-flow .verdict-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 12px;
}
.rally-flow .verdict-hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); flex: none; }
.rally-flow .verdict-hero h1 {
  font-family: var(--serif); font-size: clamp(28px, 5vw, 44px); font-weight: 600;
  line-height: 1.08; letter-spacing: -.03em; margin: 0 0 12px; color: var(--ink);
}
.rally-flow .verdict-hero .lede {
  font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin: 0;
}
.rally-flow .trust-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font: 500 12px var(--mono); color: var(--ink-2);
  padding: 6px 12px; border-radius: var(--r-pill); background: var(--coral-soft);
}
.rally-flow .flowchart { width: 100%; margin: 28px 0 36px; overflow-x: auto; }
.rally-flow .flowchart svg { display: block; min-width: 640px; width: 100%; height: auto; }
.rally-flow .consensus-path { margin: 32px 0; }
.rally-flow .consensus-path h3,
.rally-flow .model-timeline h3,
.rally-flow .source-constellation h3,
.rally-flow .matrix-flow h3,
.rally-flow .fork-diagram h3 {
  font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
}
.rally-flow .path-step {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px 20px;
  position: relative; padding-bottom: 24px;
}
.rally-flow .path-step:not(:last-child)::before {
  content: ""; position: absolute; left: 23px; top: 44px; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--border), transparent);
}
.rally-flow .path-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font: 600 16px var(--serif); color: var(--coral); z-index: 1;
}
.rally-flow .path-step.top .path-num { border-color: var(--coral); background: var(--coral-soft); }
.rally-flow .path-body h4 { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.rally-flow .path-body p { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0 0 8px; }
.rally-flow .path-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rally-flow .path-link {
  font-size: 12px; color: var(--coral); text-decoration: none; font-weight: 500;
}
.rally-flow .path-link:hover { text-decoration: underline; }
.rally-flow .consensus-ring {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px var(--mono); color: var(--ink-3);
}
.rally-flow .ring-dots { display: flex; gap: 3px; }
.rally-flow .ring-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border);
}
.rally-flow .ring-dot.on { background: var(--coral); }
.rally-flow .ring-dot.gpt.on { background: var(--m-gpt); }
.rally-flow .ring-dot.gem.on { background: var(--m-gemini); }
.rally-flow .fork-diagram {
  margin: 32px 0; padding: 22px; background: var(--amber-bg);
  border-radius: 16px; border: 1px solid #f0e6d8;
}
.rally-flow .fork-diagram h3 { color: var(--amber-ink); margin-bottom: 14px; }
.rally-flow .fork-svg { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto; }
.rally-flow .fork-note { font-size: 14px; color: var(--ink-2); text-align: center; margin: 8px 0 0; line-height: 1.5; }
.rally-flow .source-constellation { margin: 36px 0; }
.rally-flow .constellation-glance {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-bottom: 20px;
}
.rally-flow .glance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px var(--mono); color: var(--ink-2);
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border);
}
.rally-flow .glance-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
}
.rally-flow .glance-total {
  font: 500 11px var(--mono); color: var(--ink-3);
  margin-left: auto;
}
.rally-flow .source-orbit {
  position: relative; height: 220px; margin: 0 auto 22px; max-width: 540px;
}
.rally-flow .source-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral-soft), var(--surface));
  border: 2px solid var(--coral-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; z-index: 2;
}
.rally-flow .source-node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none; color: inherit; transition: transform .2s;
}
.rally-flow .source-node:hover { transform: translate(-50%, -50%) scale(1.06); }
.rally-flow .source-node .fav {
  width: 40px; height: 40px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 4px 14px rgba(43,38,32,.08);
  display: flex; align-items: center; justify-content: center;
  font: 600 11px var(--sans); color: var(--ink-2);
  overflow: hidden;
}
.rally-flow .source-node .fav img { width: 20px; height: 20px; border-radius: 4px; }
.rally-flow .source-node .lbl { font: 500 10px var(--mono); color: var(--ink-3); max-width: 72px; text-align: center; line-height: 1.2; }
.rally-flow .source-river {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin;
}
.rally-flow .source-chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; color: var(--ink);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: border-color .2s, box-shadow .2s;
}
.rally-flow .source-chip:hover { border-color: var(--coral-line); box-shadow: 0 4px 12px rgba(43,38,32,.06); }
.rally-flow .source-chip .ico {
  width: 22px; height: 22px; border-radius: 6px; background: var(--coral-soft);
  display: flex; align-items: center; justify-content: center;
  font: 600 9px var(--mono); color: var(--coral); overflow: hidden;
}
.rally-flow .source-chip .ico img { width: 14px; height: 14px; border-radius: 3px; }
.rally-flow .source-chip.source-more {
  color: var(--ink-3); border-style: dashed; cursor: default;
}
.rally-flow .source-node .fav.plat-youtube { font-size: 10px; font-weight: 800; }
.rally-flow .source-node .fav.plat-reddit { font-size: 11px; font-weight: 800; }
.rally-flow .model-timeline { margin: 36px 0; padding-top: 28px; border-top: 1px solid var(--border); }
.rally-flow .timeline-row {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--surface-3);
}
.rally-flow .timeline-row.winner {
  background: linear-gradient(90deg, var(--coral-soft) 0%, transparent 60%);
  margin: 0 -12px; padding: 14px 12px; border-radius: 10px; border-bottom: none;
}
.rally-flow .tl-brand { font: 600 13px var(--sans); display: flex; align-items: center; gap: 8px; color: var(--ink); }
.rally-flow .tl-brand .pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rally-flow .tl-take { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rally-flow .tl-take b { color: var(--ink); font-weight: 600; }
.rally-flow .tl-score { font: 600 13px var(--mono); color: var(--ink-3); }
.rally-flow .matrix-flow { margin: 32px 0; }
.rally-flow .inline-table-wrap { margin: 8px 0; overflow-x: auto; }
.rally-flow .inline-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rally-flow .inline-table th {
  text-align: left; font: 500 10px var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); padding: 10px 12px;
  border-bottom: 2px solid var(--border);
}
.rally-flow .inline-table td {
  padding: 12px; border-bottom: 1px solid var(--surface-3); vertical-align: top; color: var(--ink);
}
.rally-flow .inline-table tr:hover td { background: #fdfbf7; }
@media (max-width: 640px) {
  .rally-flow .glance-total { margin-left: 0; width: 100%; }
  .rally-flow .timeline-row { grid-template-columns: 1fr; gap: 8px; }
  .rally-flow .tl-score { justify-self: start; }
  .rally-flow .source-orbit { height: 160px; transform: scale(.88); transform-origin: center top; }
}

/* ---- Rally Intel Deck v2 ---- */
.intel-deck-page { display: flex; flex-direction: column; gap: 0; }
.intel-deck-page .deck-hero { margin-bottom: 28px; }
.intel-deck-page .deck-hero .eyebrow {
  font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 10px;
}
.intel-deck-page .deck-query {
  font-family: var(--serif); font-size: clamp(18px, 3vw, 24px); font-weight: 500;
  letter-spacing: -.02em; color: var(--ink-2); margin-bottom: 14px; line-height: 1.2;
}
.intel-deck-page .deck-hero h1 {
  font-family: var(--serif); font-size: clamp(28px, 4.5vw, 42px); font-weight: 600;
  line-height: 1.06; letter-spacing: -.03em; margin-bottom: 12px;
}
.intel-deck-page .deck-hero .lede { font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.intel-deck-page .stat-ribbon { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.intel-deck-page .stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); min-width: 100px;
}
.intel-deck-page .stat .k { font: 500 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.intel-deck-page .stat .v { font: 700 18px var(--sans); color: var(--ink); letter-spacing: -.02em; }
.intel-deck-page .stat .v small { font-size: 12px; font-weight: 600; color: var(--ink-3); }

.intel-deck {
  display: grid; grid-template-columns: 1fr min(360px, 34vw); gap: 22px; align-items: start;
}
.intel-deck-page .tile-shell {
  padding: 5px; border-radius: 20px;
  background: var(--surface-3); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(43,38,32,.04);
  transition: transform .35s cubic-bezier(.32,.72,0,1), box-shadow .35s cubic-bezier(.32,.72,0,1);
}
.intel-deck-page .tile-shell:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -12px rgba(43,38,32,.12); }
.intel-deck-page .tile {
  background: var(--surface); border-radius: 16px;
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  padding: 16px 18px; height: 100%;
}
.intel-deck-page .tile-label {
  font: 500 9px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.intel-deck-page .bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.intel-deck-page .span-2 { grid-column: span 2; }
.intel-deck-page .span-3 { grid-column: span 3; }
.intel-deck-page .span-4 { grid-column: span 4; }
.intel-deck-page .span-6 { grid-column: span 6; }

.intel-deck-page .micro-flow { display: flex; align-items: center; gap: 0; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.intel-deck-page .mf-node { flex: 0 0 auto; text-align: center; padding: 0 10px; position: relative; }
.intel-deck-page .mf-node:not(:last-child)::after {
  content: ""; position: absolute; right: -2px; top: 50%; width: 20px; height: 2px;
  background: var(--border); transform: translateY(-50%);
}
.intel-deck-page .mf-dot {
  width: 36px; height: 36px; border-radius: 50%; margin: 0 auto 6px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  border: 2px solid var(--border); background: var(--surface-2);
}
.intel-deck-page .mf-dot.hot { border-color: var(--coral); background: var(--coral-soft); color: var(--coral); }
.intel-deck-page .mf-dot.win { background: var(--coral); color: #fff; border: none; }
.intel-deck-page .mf-lbl { font-size: 10px; color: var(--ink-3); font-weight: 500; }
.intel-deck-page .mf-sub { font: 500 9px var(--mono); color: var(--ink-3); }

.intel-deck-page .ladder { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.intel-deck-page .ladder-row { display: grid; grid-template-columns: 28px 1fr 52px; gap: 10px; align-items: center; }
.intel-deck-page .ladder-rank {
  width: 28px; height: 28px; border-radius: 9px; background: var(--coral-soft);
  color: var(--coral); font-weight: 800; font-size: 13px; display: grid; place-items: center;
}
.intel-deck-page .ladder-row:first-child .ladder-rank { background: var(--coral); color: #fff; }
.intel-deck-page .ladder-mid { min-width: 0; }
.intel-deck-page .ladder-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intel-deck-page .ladder-bar { height: 5px; border-radius: 999px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.intel-deck-page .ladder-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--m-gpt)); }
.intel-deck-page .ladder-dots { display: flex; gap: 3px; justify-content: flex-end; }
.intel-deck-page .ld { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.intel-deck-page .ld.on { background: var(--coral); }
.intel-deck-page .ld.gpt.on { background: var(--m-gpt); }
.intel-deck-page .ld.gem.on { background: var(--m-gemini); }

.intel-deck-page .radar-wrap { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.intel-deck-page .radar-svg { width: 88px; height: 88px; flex: none; }
.intel-deck-page .radar-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.intel-deck-page .radar-leg { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.intel-deck-page .radar-leg i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.intel-deck-page .mini-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.intel-deck-page .mini-table th {
  text-align: left; font: 500 9px var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); padding: 8px 10px; border-bottom: 2px solid var(--border);
}
.intel-deck-page .mini-table td { padding: 9px 10px; border-bottom: 1px solid var(--surface-3); color: var(--ink-2); }
.intel-deck-page .mini-table td:first-child { font-weight: 600; color: var(--ink); }
.intel-deck-page .mini-table tr:last-child td { border-bottom: 0; }

.intel-deck-page .fork-mini { text-align: center; padding: 8px 0; }
.intel-deck-page .fork-mini svg { max-width: 200px; height: auto; margin: 0 auto 8px; display: block; }
.intel-deck-page .fork-mini p { font-size: 12px; color: var(--ink-2); line-height: 1.45; }

.intel-deck-page .panel-stack { display: flex; flex-direction: column; gap: 8px; }
.intel-deck-page .panel-row {
  display: grid; grid-template-columns: 88px 1fr 44px; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--surface-3); transition: background .2s;
}
.intel-deck-page .panel-row.win { background: linear-gradient(90deg, var(--coral-soft), transparent 70%); border-color: var(--coral-line); }
.intel-deck-page .p-brand { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.intel-deck-page .p-dot { width: 9px; height: 9px; border-radius: 50%; }
.intel-deck-page .p-take { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.intel-deck-page .p-take b { color: var(--ink); }
.intel-deck-page .p-score { font: 700 13px var(--mono); color: var(--ink-3); text-align: right; }

.intel-deck-page .actions-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px;
}
.intel-deck-page .deck-act {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: all .2s cubic-bezier(.32,.72,0,1);
}
.intel-deck-page .deck-act:hover { border-color: var(--coral); color: var(--coral); }
.intel-deck-page .act-go {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-3); display: grid; place-items: center;
  font-size: 11px; color: var(--ink-3);
}

.intel-deck-page .galaxy-col { position: static; }
.intel-deck-page .galaxy-shell {
  padding: 6px; border-radius: 24px;
  background: linear-gradient(160deg, var(--surface-3), #ede8df);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px -18px rgba(43,38,32,.18);
}
.intel-deck-page .galaxy {
  background: var(--surface); border-radius: 20px;
  padding: 20px 18px 18px;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.intel-deck-page .galaxy h2 {
  font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}
.intel-deck-page .galaxy-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.intel-deck-page .gc {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 10px var(--mono); color: var(--ink-2);
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.intel-deck-page .gc i { width: 7px; height: 7px; border-radius: 50%; }

.intel-deck-page .galaxy-orbit { position: relative; height: 240px; margin: 0 auto 20px; max-width: 100%; }
.intel-deck-page .galaxy-orbit::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 200px; height: 200px; transform: translate(-50%, -50%);
  border: 1px dashed var(--border); border-radius: 50%; opacity: .6;
}
.intel-deck-page .galaxy-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--coral-soft));
  border: 2px solid var(--coral-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 3; box-shadow: 0 8px 24px rgba(193,95,60,.15);
}
.intel-deck-page .galaxy-core span:first-child { font-size: 30px; line-height: 1; }
.intel-deck-page .galaxy-core span:last-child {
  font: 600 8px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--coral); margin-top: 2px;
}
.intel-deck-page .g-node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-decoration: none; color: inherit;
  transition: transform .25s cubic-bezier(.32,.72,0,1);
}
.intel-deck-page .g-node:hover { transform: translate(-50%, -50%) scale(1.08); }
.intel-deck-page .g-fav {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(43,38,32,.08);
  display: grid; place-items: center;
  font: 800 11px var(--sans);
}
.intel-deck-page .g-fav img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; }
.intel-deck-page .g-fav:empty { min-width: 44px; }
.intel-deck-page .g-lbl { font: 500 9px var(--mono); color: var(--ink-3); max-width: 72px; text-align: center; line-height: 1.2; }

.intel-deck-page .tapes { display: flex; flex-direction: column; gap: 12px; }
.intel-deck-page .tape-label {
  display: flex; align-items: center; gap: 8px;
  font: 700 9px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.intel-deck-page .tape-label i { width: 8px; height: 8px; border-radius: 50%; }
.intel-deck-page .tape {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin;
}
.intel-deck-page .chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--ink);
  text-decoration: none; white-space: nowrap;
  transition: border-color .2s, box-shadow .2s;
}
.intel-deck-page .chip:hover { border-color: var(--coral-line); box-shadow: 0 4px 12px rgba(43,38,32,.06); }
.intel-deck-page .chip .ci {
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  font: 800 8px var(--mono);
}
.intel-deck-page .chip .ci img { width: 12px; height: 12px; border-radius: 3px; }

/* inline YouTube in source galaxy */
.intel-deck-page .deck-yt-block { margin-bottom: 16px; }
.intel-deck-page .deck-yt { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0a0a0a; }
.intel-deck-page .deck-yt-screen {
  position: relative; display: block; width: 100%; aspect-ratio: 16/9;
  padding: 0; border: 0; cursor: pointer; background: #111; overflow: hidden;
}
.intel-deck-page .deck-yt-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease, filter .3s ease;
}
.intel-deck-page .deck-yt-screen:hover .deck-yt-poster { transform: scale(1.03); filter: brightness(.92); }
.intel-deck-page .deck-yt-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,0,51,.92); color: #fff;
  display: grid; place-items: center; font-size: 18px; padding-left: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none;
}
.intel-deck-page .deck-yt-dur {
  position: absolute; right: 8px; bottom: 8px;
  font: 600 10px var(--mono); color: #fff;
  background: rgba(0,0,0,.72); padding: 3px 6px; border-radius: 6px; pointer-events: none;
}
.intel-deck-page .deck-yt-screen.deck-yt-playing {
  cursor: default; position: relative; aspect-ratio: 16/9;
}
.intel-deck-page .deck-yt-iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.intel-deck-page .deck-yt-expand {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 8px; border: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s;
}
.intel-deck-page .deck-yt-expand:hover { background: rgba(0,0,0,.78); }
.intel-deck-page .deck-yt-meta { padding: 10px 12px 12px; background: var(--surface); }
.intel-deck-page .deck-yt-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 4px; }
.intel-deck-page .deck-yt-sub { font-size: 11px; color: var(--ink-3); }
.intel-deck-page .deck-yt-ch { font-weight: 600; color: var(--ink-2); }
.intel-deck-page .g-node.proof-jump { scroll-margin-top: 24px; }
.intel-deck-page .g-node.yt-trigger { cursor: pointer; border: 0; background: none; font: inherit; }

.intel-deck-page .proof-field {
  margin-top: 44px; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.intel-deck-page .proof-field [id] { scroll-margin-top: 28px; }
.intel-deck-page .proof-intro { margin-bottom: 32px; max-width: 72ch; }
.intel-deck-page .proof-eyebrow {
  font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--coral); display: block; margin-bottom: 10px;
}
.intel-deck-page .proof-intro h2 {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 38px); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.08; margin-bottom: 10px;
}
.intel-deck-page .proof-lede { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.intel-deck-page .band-label {
  font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.intel-deck-page .band-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.intel-deck-page .band-label .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.intel-deck-page .news-mosaic {
  display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 18px;
  margin-bottom: 36px;
}
.intel-deck-page .news-article {
  padding: 22px 24px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .25s cubic-bezier(.32,.72,0,1), border-color .25s;
}
.intel-deck-page .news-article:hover { border-color: var(--coral-line); box-shadow: 0 12px 32px -16px rgba(43,38,32,.14); }
.intel-deck-page .news-article.featured { padding: 28px 30px; background: linear-gradient(160deg, #fff, var(--surface-2)); }
.intel-deck-page .news-outlet {
  display: flex; align-items: center; gap: 10px;
  font: 600 11px var(--mono); color: var(--news); text-transform: uppercase; letter-spacing: .06em;
}
.intel-deck-page .news-outlet img { width: 18px; height: 18px; border-radius: 4px; }
.intel-deck-page .news-article h3 {
  font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; color: var(--ink);
}
.intel-deck-page .news-article.featured h3 { font-size: clamp(22px, 2.8vw, 28px); }
.intel-deck-page .news-article:not(.featured) h3 { font-size: 18px; }
.intel-deck-page .news-dek { font-size: 14px; line-height: 1.6; color: var(--ink-2); flex: 1; }
.intel-deck-page .news-article.featured .news-dek { font-size: 15px; }
.intel-deck-page .news-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--surface-3);
  font: 500 10px var(--mono); color: var(--ink-3);
}
.intel-deck-page .news-take { font-size: 12px; color: var(--coral); font-weight: 600; font-family: var(--sans); }
.intel-deck-page .proof-body-grid {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start;
}
.intel-deck-page .thread-sheet {
  padding: 28px 30px 30px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
}
.intel-deck-page .thread-sheet .band-label .dot { background: var(--reddit); }
.intel-deck-page .thread-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font: 600 11px var(--mono); color: var(--reddit); margin-bottom: 14px;
}
.intel-deck-page .thread-meta span { color: var(--ink-3); font-weight: 500; }
.intel-deck-page .thread-title {
  font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); font-weight: 600;
  line-height: 1.12; letter-spacing: -.025em; margin-bottom: 22px;
}
.intel-deck-page .thread-comments { display: flex; flex-direction: column; gap: 0; }
.intel-deck-page .thread-comment {
  padding: 18px 0; border-top: 1px solid var(--surface-3);
  display: grid; grid-template-columns: 52px 1fr; gap: 16px;
}
.intel-deck-page .thread-comment:first-child { border-top: 0; padding-top: 0; }
.intel-deck-page .comment-vote {
  font: 700 13px var(--mono); color: var(--reddit); text-align: center;
  padding-top: 2px;
}
.intel-deck-page .comment-vote small { display: block; font-size: 9px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }
.intel-deck-page .comment-who { font: 600 12px var(--mono); color: var(--ink-3); margin-bottom: 8px; }
.intel-deck-page .comment-body { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.intel-deck-page .comment-body strong { color: var(--ink); font-weight: 600; }
.intel-deck-page .thread-verdict {
  margin-top: 22px; padding: 16px 18px; border-radius: 14px;
  background: var(--coral-soft); border: 1px solid var(--coral-line);
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
}
.intel-deck-page .thread-verdict strong { color: var(--coral); }
.thread-related {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--surface-3);
  display: flex; flex-direction: column; gap: 8px;
}
.thread-rel-label {
  font: 600 11px var(--mono); color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 4px;
}
.thread-rel-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); text-decoration: none;
  transition: background .15s;
}
.thread-rel-card:hover { background: var(--surface-3); }
.thread-rel-sub {
  font: 700 10px var(--mono); color: var(--reddit);
  text-transform: uppercase; letter-spacing: .04em;
}
.thread-rel-title {
  font: 500 13px var(--sans); color: var(--ink);
  line-height: 1.35;
}
.thread-rel-meta {
  font: 500 11px var(--mono); color: var(--ink-3);
}
.intel-deck-page .reviews-sheet { display: flex; flex-direction: column; gap: 18px; }
.intel-deck-page .reviews-sheet .band-label .dot { background: var(--review); }
.intel-deck-page .review-card {
  padding: 22px 24px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  flex: 1;
}
.intel-deck-page .review-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.intel-deck-page .review-source { font: 800 14px var(--sans); letter-spacing: -.02em; }
.intel-deck-page .review-source.g2 { color: var(--g2); }
.intel-deck-page .review-source.so { color: var(--m-gpt); }
.intel-deck-page .review-score-block { text-align: right; }
.intel-deck-page .review-num { font: 700 22px var(--sans); color: var(--ink); letter-spacing: -.02em; line-height: 1; }
.intel-deck-page .review-stars { color: var(--review); font-size: 13px; letter-spacing: 2px; margin-top: 2px; }
.intel-deck-page .review-cat { font: 500 10px var(--mono); color: var(--ink-3); margin-top: 4px; }
.intel-deck-page .review-quote {
  font-family: var(--serif); font-size: 17px; font-style: italic;
  line-height: 1.5; color: var(--ink); letter-spacing: -.01em;
}
.intel-deck-page .review-by {
  margin-top: 14px; font: 600 11px var(--mono); color: var(--ink-3);
}
.intel-deck-page .review-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.intel-deck-page .review-tag {
  font: 600 10px var(--mono); padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
}
.intel-deck-page.route-deck .route-answer-body { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.intel-deck-page.route-deck .route-answer-body p { margin: 0 0 12px; }
.intel-deck-page.route-deck .route-answer-body p:last-child { margin-bottom: 0; }

@media (max-width: 960px) {
  .intel-deck { grid-template-columns: 1fr; }
  .intel-deck-page .galaxy-col { position: static; order: -1; }
  .intel-deck-page .bento { grid-template-columns: repeat(2, 1fr); }
  .intel-deck-page .span-2, .intel-deck-page .span-3, .intel-deck-page .span-4, .intel-deck-page .span-6 { grid-column: span 2; }
  .intel-deck-page .news-mosaic { grid-template-columns: 1fr; }
  .intel-deck-page .proof-body-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .intel-deck-page .bento { grid-template-columns: 1fr; }
  .intel-deck-page .span-2, .intel-deck-page .span-3, .intel-deck-page .span-4, .intel-deck-page .span-6 { grid-column: span 1; }
  .intel-deck-page .panel-row { grid-template-columns: 1fr; gap: 6px; }
  .intel-deck-page .p-score { text-align: left; }
  .intel-deck-page .actions-row { grid-template-columns: 1fr; }
  .intel-deck-page .galaxy-orbit { height: 200px; transform: scale(.92); transform-origin: center top; }
  .intel-deck-page .thread-comment { grid-template-columns: 1fr; gap: 8px; }
  .intel-deck-page .comment-vote { text-align: left; }
}

@media (max-width: 600px) {
  .tag { display: none; }
  .memory { width: 100%; }
  .empty h1 { font-size: 28px; }
}

/* ---------- news widget (Google News headlines) ---------- */
.news-list { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.news-item { display: flex; flex-direction: column; gap: 2px; text-decoration: none; border-left: 3px solid var(--coral-line); padding: 2px 0 2px 10px; transition: border-color .15s; }
.news-item:hover { border-left-color: var(--coral); }
.news-head { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.news-meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

/* ---------- wikipedia widget ---------- */
.wiki-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.wiki-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--border); }
.wiki-title { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); }
.wiki-extract { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Answer Bank (cached replay) ---------- */
.from-bank { position: relative; }
.from-bank::after { content: "⚡ ANSWER BANK"; position: absolute; top: 10px; right: 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: #3f9e86; background: rgba(63,158,134,.09); border: 1px solid rgba(63,158,134,.25); border-radius: 999px; padding: 3px 9px; pointer-events: none; z-index: 5; }

/* ================= HOME v4 — Rally Orbit hero + glass chrome ================= */
/* Glass sticky topbar */
.topbar { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 74%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent); }

/* Ambient aurora wash (very subtle, keeps the cream identity) */
body::before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 34% at 18% 6%, rgba(193,95,60,.08), transparent 70%),
    radial-gradient(36% 30% at 85% 10%, rgba(67,133,244,.055), transparent 70%),
    radial-gradient(40% 36% at 55% 98%, rgba(16,163,127,.05), transparent 72%);
}

/* Retire the old static paddle scene */
.scene { display: none !important; }

/* Orbit stage */
.orbit-hero { display: flex; justify-content: center; margin: clamp(6px, 2.2vh, 22px) 0 2px; }
.orbit-stage { position: relative; width: min(340px, 64vw); aspect-ratio: 1; }
.o-ring { position: absolute; border: 1.5px dashed var(--border-2); border-radius: 50%; }
.o-ring.r1 { inset: 18%; animation: oring 90s linear infinite; }
.o-ring.r2 { inset: 2%; opacity: .55; animation: oring 140s linear infinite reverse; }
@keyframes oring { to { transform: rotate(360deg); } }
.o-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(120% 120% at 30% 25%, #fff, var(--surface-2)); border: 1px solid var(--coral-line); box-shadow: 0 18px 50px rgba(193,95,60,.16), inset 0 1px 0 #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; z-index: 2; }
.o-center img { width: 32px; height: 32px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.16)); animation: floaty 5s ease-in-out infinite; }
.o-brand { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--coral-ink); font-weight: 600; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-5px) rotate(6deg); } }
/* Luminous core — a soft coral aura that breathes behind the paddle, echoing the constellation hero. */
.o-center::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--coral) 34%, transparent), transparent 68%); z-index: -1; animation: opulse 3.8s ease-in-out infinite; }
@keyframes opulse { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.2); opacity: .92; } }
@media (prefers-reduced-motion: reduce) { .o-center::before { animation: none; } }

/* Orbiting model chips: the arm spins, the chip counter-spins to stay upright */
.o-arm { position: absolute; inset: 0; animation: ospin var(--t,30s) linear infinite; }
/* Eight model families, evenly spaced 45° apart around the ring
   (Claude/GPT/Gemini/Grok/DeepSeek/GLM/Kimi/Fugu). */
.o-arm.a1 { --a: -135deg; --t: 38s; }
.o-arm.a2 { --a: -90deg;  --t: 38s; }
.o-arm.a3 { --a: -45deg;  --t: 38s; }
.o-arm.a4 { --a: 0deg;    --t: 38s; }
.o-arm.a5 { --a: 45deg;   --t: 38s; }
.o-arm.a6 { --a: 90deg;   --t: 38s; }
.o-arm.a7 { --a: 135deg;  --t: 38s; }
.o-arm.a8 { --a: 180deg;  --t: 38s; }
@keyframes ospin { from { transform: rotate(var(--a,0deg)); } to { transform: rotate(calc(var(--a,0deg) + 360deg)); } }
.orbiter { position: absolute; left: 50%; top: 15%; display: flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--border); border-radius: 999px; padding: 6px 11px; box-shadow: 0 6px 18px rgba(40,35,25,.09); backdrop-filter: blur(6px); animation: ospinrev var(--t,30s) linear infinite; }
@keyframes ospinrev { from { transform: translate(-50%,-50%) rotate(calc(-1 * var(--a,0deg))); } to { transform: translate(-50%,-50%) rotate(calc(-360deg - var(--a,0deg))); } }
.o-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent), 0 0 11px color-mix(in srgb, currentColor 62%, transparent); }
.o-name { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.o-guest .o-name { color: #6d28d9; }
.ball-arm { --a: 205deg; --t: 9s; }
.o-ball { position: absolute; left: 50%; top: 33.5%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle at 32% 30%, #fff, #e8e2d6 65%, #cfc7b6); box-shadow: 0 3px 8px rgba(0,0,0,.2); }

/* Headline gradient accent */
.home-hero h1 .hero-grad { font-style: normal; background: linear-gradient(92deg, var(--coral) 8%, #E08A4E 48%, var(--m-gemini) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Live stat chips */
.home-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 14px 0 2px; }
.hstat { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 84%, transparent); border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; backdrop-filter: blur(4px); }
.hstat i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(63,125,87,.14); animation: hpulse 2.4s ease-in-out infinite; }
.hstat.quick i { background: var(--coral); box-shadow: 0 0 0 3px rgba(193,95,60,.14); }
.hstat.bank i { background: #3F9E86; box-shadow: 0 0 0 3px rgba(63,158,134,.16); }
@keyframes hpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* Composer glow focus + suggestion lift */
.composer-shell { transition: box-shadow .25s ease, transform .25s ease; }
.composer-shell:focus-within { box-shadow: 0 0 0 4px rgba(193,95,60,.13), 0 24px 60px rgba(193,95,60,.15); transform: translateY(-1px); }
.scard { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.scard:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(40,35,25,.10); border-color: var(--coral-line); }

@media (max-width: 640px) {
  .orbit-stage { width: 76vw; }
  .o-center { width: 84px; height: 84px; }
  .o-center img { width: 34px; height: 34px; }
  .orbiter { padding: 5px 10px; }
  .o-name { font-size: 11.5px; }
}

.model-row[hidden] { display: none !important; }

/* ── One-viewport home: orbital hero + everything fits, no scroll, auto-sizing ──
   Everything is sized in vh-aware clamps so the whole landing collapses to fit any
   screen height. The home owns exactly the viewport and never scrolls. */
#app.home { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
#app.home .transcript { display: flex; flex-direction: column; min-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
/* Top-anchored (not centered) so there's no dead space between the header and the orbit;
   the footer is pushed to the bottom with margin-top:auto. */
#app.home .empty { flex: 1 1 auto; min-height: 0; justify-content: flex-start; padding: clamp(6px, 1.6vh, 16px) 0 0; overflow: hidden; }

/* Orbital hero — BIG, sits right under the top bar. Scales with the smaller of width/height. */
.orbit-hero { margin: 0; }
#app.home .orbit-stage { width: min(340px, 41vh, 66vw); }
#app.home .o-center { width: clamp(70px, 11.5vh, 104px); height: clamp(70px, 11.5vh, 104px); }
#app.home .o-center img { width: clamp(32px, 5.2vh, 46px); height: clamp(32px, 5.2vh, 46px); }
#app.home .o-brand { font-size: clamp(9px, 1.3vh, 11px); }

/* Slim, vh-aware headline + sub pulled up tight under the orbit */
#app.home .c-home { margin: clamp(-4px, 0.2vh, 6px) 0 0; }
#app.home .c-home h1 { font-size: clamp(26px, 4.8vh, 50px); line-height: 1.04; }

/* Apple-style flowing multi-colour headline — Pong's own model palette (coral→orange→green→blue→violet)
   sweeps across the words and gently drifts, tying the line to the orbit above it. */
.c-home h1.grad-head,
.c-home h1.grad-head em {
  font-style: normal;
  background: linear-gradient(102deg, #C15F3C 0%, #E0823F 16%, #D98A2B 27%, #3F9E86 48%, #3B82F6 70%, #7C5CFF 92%);
  background-size: 150% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.c-home h1.grad-head { animation: gradHeadDrift 9s ease-in-out infinite; }
@keyframes gradHeadDrift { 0%, 100% { background-position: 0% center; } 50% { background-position: 100% center; } }
@media (prefers-reduced-motion: reduce) { .c-home h1.grad-head { animation: none; } }
#app.home .home-sub { margin-top: clamp(4px, 1vh, 10px); font-size: clamp(12.5px, 1.7vh, 16px); }

/* Tighten the stack so the search box rides up close to the headline */
#app.home .composer-wrap { margin-top: clamp(8px, 1.7vh, 16px); }
#app.home .mode-chips { margin-top: clamp(6px, 1.2vh, 12px); }
#app.home .suggest { margin-top: clamp(30px, 6vh, 72px); } /* ~3 lines of breathing room before Try */

/* ── Mobile search overlay (Google-style) — input pinned at the top, suggestions below, so you can
   always see what you're typing above the keyboard. Opened only on mobile (see app.js). ── */
.msearch { position: fixed; inset: 0; z-index: 300; background: var(--bg, #FBF8F4); display: flex; flex-direction: column; animation: msIn .14s ease; }
.msearch[hidden] { display: none; }
@keyframes msIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
body.msearch-open { overflow: hidden; }
.msearch-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-top, 0px)); padding-top: max(12px, env(safe-area-inset-top, 12px)); background: var(--surface); border-bottom: 1px solid var(--border); }
.msearch-back { flex: none; width: 40px; height: 40px; border: 0; background: none; color: var(--ink-2); font-size: 24px; line-height: 1; border-radius: 50%; cursor: pointer; }
.msearch-back:active { background: var(--surface-2); }
.msearch-field { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 0 12px; }
.msearch-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-family: var(--sans); font-size: 18px; color: var(--ink); padding: 13px 0; }
.msearch-input::placeholder { color: var(--ink-3); }
.msearch-clear { flex: none; width: 30px; height: 30px; border: 0; background: none; color: var(--ink-3); font-size: 15px; cursor: pointer; }
.msearch-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 24px; overscroll-behavior: contain; }
.msearch-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer; }
.msearch-row:active { background: var(--surface-2); }
.msearch-ic { flex: none; width: 18px; text-align: center; color: var(--ink-3); font-size: 15px; }
.msearch-txt { flex: 1; min-width: 0; font-size: 17px; line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.msearch-fill { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--ink-3); font-size: 18px; cursor: pointer; border-radius: 50%; }
.msearch-fill:active { background: var(--surface-2); }

/* ── Talk to Pong — compact bottom bar (no backdrop; the page stays visible + interactive) ── */
.vbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; justify-content: center; padding: 0 0 max(12px, env(safe-area-inset-bottom, 12px)); pointer-events: none; animation: vbarIn .22s ease; }
.vbar[hidden] { display: none; }
@keyframes vbarIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.vbar-inner { pointer-events: auto; display: flex; align-items: center; gap: 14px; width: min(640px, calc(100vw - 24px)); padding: 11px 14px 11px 18px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 16px 44px -12px rgba(40,30,20,.42); }
.vbar-viz { flex: none; display: flex; align-items: center; gap: 3px; width: 30px; height: 26px; }
.vbar-viz i { width: 4px; height: 7px; border-radius: 2px; background: var(--ink-3); transition: background .2s ease; }
.vbar-viz[data-state="listening"] i { background: var(--m-gemini, #3b82f6); animation: vEq .9s ease-in-out infinite; }
.vbar-viz[data-state="thinking"] i { background: #E0823F; animation: vEq .6s ease-in-out infinite; }
.vbar-viz[data-state="speaking"] i { background: var(--coral); animation: vEq .5s ease-in-out infinite; }
.vbar-viz[data-state="error"] i { background: #b43c32; }
.vbar-viz i:nth-child(2) { animation-delay: .15s; } .vbar-viz i:nth-child(3) { animation-delay: .3s; } .vbar-viz i:nth-child(4) { animation-delay: .45s; }
@keyframes vEq { 0%, 100% { height: 7px; } 50% { height: 22px; } }
.vbar-cap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vbar-status { font: 600 11px/1.3 var(--sans); color: var(--ink-3); }
.vbar-line { font: 500 14px/1.35 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbar-line.is-you { color: var(--ink-3); font-style: italic; }
.vbar-end { flex: none; border: 0; background: var(--coral); color: #fff; font: 600 13px/1 var(--sans); padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.vbar-end:hover { background: var(--coral-ink, #b0512f); }
body.vbar-open .voice-fab { display: none; }
@media (prefers-reduced-motion: reduce) { .vbar-viz i { animation: none !important; } }

/* Voice — floating "🎤 Talk" button. Bottom-right, always visible on every screen (the topbar was
   too crowded and clipped the icon on narrow widths). Coral so it reads as the premium Max feature. */
.voice-fab { position: fixed; right: clamp(14px, 4vw, 28px); bottom: clamp(16px, 4vh, 28px); z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 15px; border: 0; border-radius: 999px; background: var(--coral); color: #fff; font: 600 14.5px/1 var(--sans); cursor: pointer; box-shadow: 0 10px 30px -6px rgba(193,95,60,.55); animation: vfBreathe 3.2s ease-in-out infinite; transition: transform .15s ease, background .15s ease; }
.voice-fab:hover { background: var(--coral-ink, #b0512f); transform: translateY(-2px); }
.voice-fab:active { transform: translateY(0) scale(.97); }
.voice-fab .vf-ic { font-size: 18px; line-height: 1; }
@keyframes vfBreathe { 0%, 100% { box-shadow: 0 10px 30px -6px rgba(193,95,60,.5); } 50% { box-shadow: 0 12px 38px -4px rgba(193,95,60,.8); } }
@media (max-width: 560px) { .voice-fab { padding: 14px; } .voice-fab .vf-label { display: none; } } /* icon-only circle on small phones */
body.pv-open .voice-fab, body.msearch-open .voice-fab { display: none; } /* hide while an overlay is open */
@media (prefers-reduced-motion: reduce) { .voice-fab { animation: none; } }
#app.home .home-foot { margin-top: auto; padding-top: clamp(10px, 2vh, 20px); padding-bottom: clamp(6px, 1.4vh, 14px); }

/* Short screens (laptops, split windows): hide the sub, shrink the orbit so it still fits */
@media (max-height: 680px) {
  #app.home .home-sub { display: none; }
  #app.home .orbit-stage { width: min(230px, 32vh, 58vw); }
  #app.home .o-center { width: clamp(60px, 9vh, 84px); height: clamp(60px, 9vh, 84px); }
}

/* Galaxy brand glyphs (YouTube/Reddit/X) — real SVG logos in the tiles */
.g-fav.g-brand svg { width: 21px; height: 21px; display: block; }
.g-fav.g-brand { display: flex; align-items: center; justify-content: center; }

/* Favicon tiles: warm backing so white/transparent logos stay visible */
.g-fav img { background: var(--surface-3); border-radius: 8px; }

/* ---------- Judge's scorecard (replaces the decorative radar) ---------- */
.scorecard { display: flex; flex-direction: column; gap: 9px; }
.sc-row { display: grid; grid-template-columns: 12px 64px 1fr 44px; gap: 9px; align-items: center; }
.sc-row.win .sc-name { font-weight: 800; }
.sc-dot { width: 10px; height: 10px; border-radius: 50%; }
.sc-name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.sc-bar i { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.sc-score { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: right; white-space: nowrap; }
.sc-note { font-size: 10.5px; color: var(--ink-4); margin: 4px 0 0; line-height: 1.4; }

/* ---------- Where they split ---------- */
.split-wrap { display: flex; flex-direction: column; gap: 10px; }
.split-row { border-left: 3px solid var(--coral); background: var(--coral-soft2); border-radius: 10px; padding: 9px 12px; }
.split-row b { font-size: 12.5px; color: var(--ink); display: block; margin-bottom: 2px; }
.split-row p { font-size: 12px; color: var(--ink-2); margin: 0; line-height: 1.45; }
.split-agree { display: flex; gap: 9px; align-items: flex-start; border-left: 3px solid #3F9E86; background: rgba(63,158,134,.07); border-radius: 10px; padding: 10px 12px; }
.split-check { color: #3F9E86; font-weight: 800; }
.split-agree p { font-size: 12.5px; color: var(--ink-2); margin: 0; line-height: 1.45; }

/* ---------- Question Coach receipt ---------- */
.coach { margin: 2px 0 10px; }
.coach-sum { list-style: none; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.coach-sum::-webkit-details-marker { display: none; }
.coach-chip { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; font-weight: 600; color: var(--coral-ink); background: var(--coral-soft2); border: 1px solid var(--coral-line); border-radius: 999px; padding: 4px 11px; }
.coach-hint { font-size: 11px; color: var(--ink-4); }
.coach[open] .coach-hint { display: none; }
.coach-box { margin-top: 8px; border: 1px solid var(--border); border-left: 3px solid var(--coral); border-radius: 10px; background: var(--surface); padding: 11px 14px; max-width: 720px; }
.coach-brief { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 0 0 6px; }
.coach-focus { margin: 0; padding-left: 18px; }
.coach-focus li { font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* ---------- Peek cards (hover link previews) ---------- */
.peek-card { position: fixed; z-index: 300; width: 324px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 18px 50px rgba(40,35,25,.16); padding: 12px 14px; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.peek-card.on { opacity: 1; transform: none; pointer-events: auto; }
.peek-head { display: flex; gap: 9px; align-items: center; margin-bottom: 7px; }
.peek-fav { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--ink-2); overflow: hidden; flex: none; }
.peek-fav img { width: 20px; height: 20px; border-radius: 5px; }
.peek-host { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.peek-src { font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); letter-spacing: .03em; }
.peek-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.peek-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.peek-open { width: 100%; background: var(--coral-soft2); border: 1px solid var(--coral-line); color: var(--coral-ink); font-weight: 600; font-size: 12.5px; border-radius: 10px; padding: 8px 10px; cursor: pointer; transition: all .15s; }
.peek-open:hover { background: var(--coral); color: #fff; }
@media (hover: none) { .peek-card { display: none !important; } }

/* ---------- Full intelligence brief (rich synthesis) ---------- */
.full-answer { font-size: 14.5px; line-height: 1.65; color: var(--ink); }
.full-answer p { margin: 0 0 10px; }
.full-answer table { margin: 10px 0; }
.fa-list { display: flex; flex-direction: column; gap: 12px; }
.fa-row { border-left: 3px solid var(--coral-line); padding: 2px 0 2px 13px; }
.fa-q { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; }
.fa-num { flex: none; width: 19px; height: 19px; border-radius: 6px; background: var(--coral-soft2); color: var(--coral-ink); font-family: var(--mono); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fa-a { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.gc-wrap { display: flex; flex-direction: column; gap: 6px; }
.gc-h { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #3F9E86; font-weight: 700; margin-top: 4px; }
.gc-h.warn { color: var(--amber-ink, #8A6A2C); }
.gc-list { margin: 0 0 4px; padding-left: 17px; }
.gc-list li { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 4px; }
.gc-list.warn li { color: #7a5b22; }
.ladder-why { font-size: 12px; color: var(--ink-2); line-height: 1.45; margin: 1px 0 5px; }
.followups { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 16px 0 4px; }
.fu-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-right: 2px; }
.fu-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; transition: all .15s; }
.fu-chip:hover { border-color: var(--coral-line); background: var(--coral-soft2); color: var(--coral-ink); transform: translateY(-1px); }

/* ---------- Podcast Moment widget ---------- */
.pod-stamp { position: absolute; left: 10px; bottom: 10px; z-index: 3; background: rgba(124,58,237,.92); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.pod-quote { margin: 8px 0 0; padding: 8px 11px; border-left: 3px solid #7C3AED; background: #F8F5FF; border-radius: 8px; font-family: var(--serif); font-size: 13px; font-style: italic; color: var(--ink-2); line-height: 1.5; }
.podcast-widget .yt-thumb { background: #14101e; }

/* PodcastIndex native-audio card */
.pod-audio-card { padding: 10px 12px; }
.pod-audio-head { display: flex; gap: 10px; align-items: center; margin-bottom: 9px; }
.pod-art { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--border); }
.pod-art-fallback { display: flex; align-items: center; justify-content: center; background: #F5F0FF; font-size: 22px; }
.pod-audio { width: 100%; height: 36px; margin: 2px 0 4px; }

/* Podcast Moments carousel */
.pod-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; scrollbar-width: none; }
.pod-carousel::-webkit-scrollbar { display: none; }
.pod-slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.pod-nav { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; }
.pod-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); transition: all .2s; cursor: pointer; }
.pod-dot.on { background: #7C3AED; transform: scale(1.25); }
.pod-arrow { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pod-arrow:hover { border-color: #7C3AED; color: #7C3AED; }

/* stacked moment bands */
.deck-pod-block + .deck-pod-block { margin-top: 14px; }

/* ── Rally line v2: one ball, mirrored paddles, model nodes ─────────────── */
.court2 { display: flex; align-items: center; gap: 6px; padding: 6px 10px 10px; }
.c2-paddle { width: 30px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(60,40,20,.18)); }
.c2-paddle.l { transform-origin: 80% 90%; animation: c2swingL 0.95s ease-in-out infinite; }
.c2-paddle.r { transform-origin: 20% 90%; animation: c2swingR 0.95s ease-in-out infinite; }
@keyframes c2swingL { 0%,100% { transform: rotate(-14deg); } 6% { transform: rotate(10deg); } 18% { transform: rotate(-14deg); } }
@keyframes c2swingR { 0%,44% { transform: scaleX(-1) rotate(-14deg); } 56% { transform: scaleX(-1) rotate(10deg); } 68%,100% { transform: scaleX(-1) rotate(-14deg); } }
.c2-track { position: relative; flex: 1; height: 58px; min-width: 0; }
.c2-line { position: absolute; left: 2%; right: 2%; top: 16px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--border-2) 12%, var(--border-2) 88%, transparent); }
.c2-net { position: absolute; left: 50%; top: 7px; height: 20px; border-left: 2px dashed var(--border-2); opacity: .8; }
.c2-ball { position: absolute; top: 16px; left: 6%; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 28%, #F3EAD9 60%, #D8C9AE);
  box-shadow: 0 1px 2px rgba(60,40,20,.25); transform: translate(-50%, -50%);
  animation: c2rally 0.95s cubic-bezier(.45,.05,.55,.95) infinite alternate; }
.c2-ball::after { content: ""; position: absolute; inset: 2px -14px 2px 10px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(216,201,174,.5), transparent); }
@keyframes c2rally { 0% { left: 5%; margin-top: 0; } 50% { margin-top: -9px; } 100% { left: 95%; margin-top: 0; } }
.c2-nodes { position: absolute; inset: 0; display: flex; justify-content: space-around; align-items: flex-start; padding-top: 10px; }
.c2-node { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.c2-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--border-2), 0 1px 2px rgba(60,40,20,.15); position: relative; transition: transform .25s; }
.c2-name { font: 600 12.5px/1.2 var(--sans); color: var(--ink); letter-spacing: .01em; }
.c2-state { font: italic 400 10.5px/1.2 var(--serif); color: var(--ink-4); transition: color .25s; }
.c2-node.done .c2-dot { transform: scale(1.12); }
.c2-node.done .c2-dot::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #fff; font: 700 8px/1 var(--sans); }
.c2-node.done .c2-state { color: var(--accent); font-style: normal; font-weight: 500; font-family: var(--sans); }
.c2-node.err .c2-dot { opacity: .35; }
.court2.done .c2-ball, .court2.done .c2-ball::after { animation: none; opacity: 0; transition: opacity .5s; }
.court2.done .c2-paddle { animation: none; transform: rotate(-14deg); }
.court2.done .c2-paddle.r { transform: scaleX(-1) rotate(-14deg); }
@media (prefers-reduced-motion: reduce) { .c2-ball, .c2-paddle.l, .c2-paddle.r { animation: none; } }
@media (max-width: 720px) { .c2-paddle { display: none; } .c2-state { display: none; } .c2-track { height: 44px; } }

/* live serve text in model cards */
.mc-live { font: 400 12.5px/1.55 var(--sans); color: var(--ink-3); display: block; }

/* the early answer — Pong's first words while the brief is polished */
.early-answer { margin: 10px 0 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 12px; animation: eaIn .35s ease; }
@keyframes eaIn { from { opacity: 0; transform: translateY(6px); } }
.ea-tag { display: flex; align-items: center; gap: 5px; font: 600 10.5px/1 var(--mono, monospace); letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.ea-bolt { animation: eaPulse 1.2s ease-in-out infinite; }
@keyframes eaPulse { 50% { opacity: .45; } }
.ea-text { font: 400 15.5px/1.65 var(--serif); color: var(--ink); margin: 0 0 8px; }
.ea-note { font: italic 400 11.5px/1 var(--serif); color: var(--ink-4); position: relative; overflow: hidden; }
.ea-note::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: eaShimmer 1.6s infinite; }
@keyframes eaShimmer { to { transform: translateX(100%); } }

/* Scout evidence inside the left column: tighter rhythm, 2-up news instead of 3-up */
.deck-main .proof-field { margin-top: 6px; }
.deck-main .proof-field .proof-intro h2 { font-size: 21px; }
.deck-main .proof-field .proof-lede { max-width: none; }
.deck-main .news-mosaic { grid-template-columns: repeat(2, 1fr); }

/* ── Image strip: visual answers in-garden ─────────────────────────────── */
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.img-cell { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  padding: 0; cursor: zoom-in; background: var(--surface-2); aspect-ratio: 4/3; transition: transform .15s, box-shadow .15s; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-cell:hover { transform: scale(1.03); box-shadow: 0 6px 18px rgba(40,35,25,.18); z-index: 1; }
.img-cell-src { position: absolute; left: 0; right: 0; bottom: 0; font: 500 8.5px/1.6 var(--sans); color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); padding: 10px 6px 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-align: left; }
.img-grid .img-cell:first-child { grid-column: span 3; aspect-ratio: 16/8; }

/* lightbox — stays in Pong */
.img-lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(20,16,10,.88); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; animation: eaIn .2s ease; }
.img-lb-stage { display: flex; align-items: center; gap: 14px; max-width: 92vw; }
.img-lb-photo { max-width: 78vw; max-height: 74vh; border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.5);
  background: #111; object-fit: contain; }
.img-lb-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.img-lb-nav:hover { background: rgba(255,255,255,.2); }
.img-lb-close { position: absolute; top: 18px; right: 22px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 15px; cursor: pointer; }
.img-lb-meta { display: flex; align-items: center; gap: 14px; max-width: 78vw; color: rgba(255,255,255,.92);
  font: 400 13px/1.5 var(--sans); }
.img-lb-caption b { font-weight: 600; }
.img-lb-src { color: rgba(255,255,255,.6); }
.img-lb-open { color: #7DD3FC; text-decoration: none; }
.img-lb-open:hover { text-decoration: underline; }
.img-lb-counter { color: rgba(255,255,255,.55); font: 500 11.5px/1 var(--mono, monospace); }

/* self-enriched scout evidence cards: og image + inlined description */
.news-hero-img { width: 100%; aspect-ratio: 16/8.5; object-fit: cover; border-radius: 10px;
  margin: 2px 0 10px; border: 1px solid var(--border); display: block; background: var(--surface-2); }
.news-dek { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-dek-pending { min-height: 14px; opacity: .35; }
.news-article h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Forum wisdom band — the helpers who never left */
.forum-band { margin: 18px 0 6px; }
.forum-list { display: flex; flex-direction: column; gap: 8px; }
.forum-row { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid #0D9488; border-radius: 10px; text-decoration: none;
  transition: transform .12s, box-shadow .12s; }
.forum-row:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(40,35,25,.1); }
.forum-ico { border-radius: 6px; flex: 0 0 auto; margin-top: 2px; }
.forum-txt { min-width: 0; flex: 1; }
.forum-name { font: 600 10.5px/1.2 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: #0D9488; }
.forum-title { font: 600 14px/1.4 var(--sans); color: var(--ink); margin-top: 2px; }
.forum-snip { font: 400 12px/1.5 var(--sans); color: var(--ink-3); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.forum-go { font: 600 11px/1 var(--sans); color: var(--accent); white-space: nowrap; margin-top: 4px; }

/* News as lines — outlet favicon · headline — synopsis · source · age */
.news-lines { display: flex; flex-direction: column; }
.news-line { display: flex; gap: 11px; align-items: flex-start; padding: 10px 4px; text-decoration: none;
  border-bottom: 1px solid var(--border); transition: background .12s; border-radius: 6px; }
.news-line:last-child { border-bottom: none; }
.news-line:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.news-line-ico { border-radius: 5px; flex: 0 0 auto; margin-top: 2px; }
.news-line-body { min-width: 0; flex: 1; }
.news-line-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.news-line-top b { font: 600 13.5px/1.45 var(--sans); color: var(--ink); }
.news-line:hover .news-line-top b { text-decoration: underline; }
.news-line-meta { font: 500 10.5px/1.3 var(--mono, monospace); letter-spacing: .04em; color: var(--ink-4); white-space: nowrap; }
.news-line-syn { font: 400 12.5px/1.5 var(--sans); color: var(--ink-3); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 1px; }

/* One-scroll layout: the composer stays reachable via sticky-bottom, the page itself
   scrolls like a normal webpage (screen-capture tools see everything). */
#attachments, .composer, .composer-hint { position: sticky; z-index: 45; }
.composer { bottom: 26px; background: var(--bg); box-shadow: 0 -10px 24px -18px rgba(40,38,31,.4); }
.composer-hint { bottom: 4px; background: var(--bg); padding-top: 4px; }
#attachments { bottom: 86px; background: var(--bg); }
/* home attachments row flows inline above the home composer (not sticky-bottom) */
#homeAttachments { position: static; justify-content: center; padding: 0 0 10px; }
.att-count { width: 100%; text-align: center; font: 600 11px/1 var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 2px; }
.att-chip { transition: border-color .15s; }
.att-chip:hover { border-color: var(--accent); }
.att-x { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; background: color-mix(in srgb, var(--ink-4) 18%, transparent); color: var(--ink-2); }
.att-x:hover { background: var(--accent); color: #fff; }

/* Generated-file download card */
.file-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid #16A34A; border-radius: 12px; padding: 13px; }
.file-head { display: flex; align-items: center; gap: 11px; }
.file-ico { font-size: 24px; color: #16A34A; flex: 0 0 auto; }
.file-name { font: 600 14px/1.3 var(--sans); color: var(--ink); word-break: break-all; }
.file-sub { font: 400 11.5px/1.3 var(--sans); color: var(--ink-3); margin-top: 1px; }
.file-preview-wrap { overflow-x: auto; margin: 11px 0; border: 1px solid var(--border); border-radius: 8px; }
.file-preview { border-collapse: collapse; width: 100%; font: 400 11px/1.3 var(--mono, monospace); }
.file-preview th { background: var(--surface-2); color: var(--ink-2); font-weight: 600; text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.file-preview td { padding: 5px 8px; color: var(--ink-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.file-preview tr:last-child td { border-bottom: none; }
.file-dl { display: block; text-align: center; background: #16A34A; color: #fff; font: 600 13px/1 var(--sans); padding: 11px; border-radius: 9px; text-decoration: none; transition: background .15s; }
.file-dl:hover { background: #15803D; }
/* Generated-video card */
.videogen-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid #C15F3C; border-radius: 12px; padding: 13px; display: flex; flex-direction: column; gap: 10px; }
.videogen-video { width: 100%; border-radius: 12px; background: #000; display: block; }
.videogen-card .file-dl { background: #C15F3C; }
.videogen-card .file-dl:hover { background: #a44d2f; }
.videogen-msg { color: var(--ink-2); font-size: 14px; margin: 4px 0; }
.videogen-prompt { color: var(--ink-3); font-size: 13px; font-style: italic; margin: 0; }
.videogen-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: #C15F3C; animation: spin 0.8s linear infinite; margin: 4px 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Tiers & billing ---- */
.plan-pill { font: 600 10.5px/1 var(--sans); letter-spacing: 0.12em; padding: 7px 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2);
  cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.plan-pill:hover { border-color: var(--accent); color: var(--accent); }
.plan-pill[data-plan="pro"], .plan-pill[data-plan="max"] { border-color: var(--accent); color: var(--accent); }
.tier-overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg-1) 62%, transparent);
  backdrop-filter: blur(6px); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tier-modal { width: min(880px, 100%); max-height: 88vh; overflow: auto; background: var(--bg-1);
  border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.tier-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 16px; }
.tier-head h3 { font: 600 19px/1.2 var(--serif); margin: 0; }
.tier-x { border: none; background: none; color: var(--ink-3); font-size: 15px; cursor: pointer; padding: 6px; }
.tier-x:hover { color: var(--ink-1); }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; display: flex;
  flex-direction: column; gap: 6px; background: var(--bg-2); position: relative; }
.tier-card.best { border-color: var(--accent); }
.tier-card.best::before { content: "MOST POPULAR"; position: absolute; top: -8px; left: 14px;
  font: 700 9px/1 var(--sans); letter-spacing: 0.14em; color: var(--bg-1); background: var(--accent);
  padding: 4px 8px; border-radius: 999px; }
.tier-card.current { outline: 2px solid var(--line-2); }
.tier-name { font: 600 15px/1 var(--sans); }
.tier-price { font: 600 26px/1.1 var(--serif); }
.tier-tag { font: 400 12px/1.3 var(--sans); color: var(--ink-3); font-style: italic; }
.tier-feats { margin: 8px 0 4px; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 5px; }
.tier-feats li { font: 400 12.5px/1.45 var(--sans); color: var(--ink-2); }
.tier-go { margin-top: auto; font: 600 12.5px/1 var(--sans); padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--bg-1); cursor: pointer; }
.tier-go:hover { filter: brightness(1.08); }
.tier-current { margin-top: auto; font: 600 11px/1 var(--sans); letter-spacing: 0.1em; color: var(--ink-3);
  text-transform: uppercase; padding: 11px 0 2px; text-align: center; }
.tier-portal { margin: 14px auto 0; display: block; border: none; background: none; color: var(--ink-3);
  font: 500 12px/1 var(--sans); cursor: pointer; text-decoration: underline dotted; }
.tier-portal:hover { color: var(--accent); }
.tier-note { margin: 14px 2px 0; font: 400 11.5px/1.4 var(--sans); color: var(--ink-3); text-align: center; }
.upsell-card { display: flex; gap: 12px; align-items: flex-start; margin: 10px auto; max-width: 660px;
  padding: 14px 16px; border: 1px solid var(--accent); border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); }
.upsell-icon { font-size: 20px; line-height: 1; padding-top: 2px; }
.upsell-body { display: flex; flex-direction: column; gap: 8px; }
.upsell-text { font: 400 13px/1.5 var(--sans); color: var(--ink-1); }
.upsell-go { align-self: flex-start; font: 600 12px/1 var(--sans); padding: 8px 12px; border-radius: 9px;
  border: 1px solid var(--accent); background: none; color: var(--accent); cursor: pointer; }
.upsell-go:hover { background: var(--accent); color: var(--bg-1); }

/* ---- Auth (login) ---- */
.auth-pill[data-in="1"] { border-color: var(--accent); color: var(--accent); }
.auth-overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg-1) 62%, transparent);
  backdrop-filter: blur(6px); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-modal { position: relative; width: min(380px, 100%); background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: 18px; padding: 26px 24px 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.auth-x { position: absolute; top: 12px; right: 12px; }
.auth-card { display: flex; flex-direction: column; gap: 10px; }
.auth-title { font: 600 20px/1.2 var(--serif); }
.auth-sub, .auth-note { font: 400 12.5px/1.45 var(--sans); color: var(--ink-3); }
.auth-email { font: 600 14px/1.2 var(--sans); color: var(--ink-1); }
.auth-plan { font: 400 12.5px/1 var(--sans); color: var(--ink-3); margin-bottom: 4px; }
.auth-in { font: 400 14px/1.2 var(--sans); padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--ink-1); }
.auth-in:focus { outline: none; border-color: var(--accent); }
.auth-err { font: 400 12px/1.4 var(--sans); color: var(--danger, #c0392b); padding: 2px; }
.auth-err.ok { color: var(--accent); }
.auth-go { margin-top: 4px; font: 600 13px/1 var(--sans); padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--bg-1); cursor: pointer; }
.auth-go:hover { filter: brightness(1.08); }
.auth-alt { font: 500 12.5px/1 var(--sans); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: none; color: var(--ink-2); cursor: pointer; }
.auth-alt:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Results page v3 — answer-first, clean media rows (orbit retired) ===== */
.answer-page.route-v3 { max-width: 940px; margin: 0 auto; }
.answer-head { margin-bottom: 16px; }
.ah-eyebrow { font: 600 10.5px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 9px; }
.ah-query { font: 400 14px/1.45 var(--sans); color: var(--ink-3); margin: 0 0 14px; }
.ah-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ah-model { display: inline-flex; align-items: center; gap: 5px; font: 500 12.5px/1 var(--sans); color: var(--ink-2); }
.ah-spark { font-size: 12px; }
.ah-k { color: var(--ink-3); font-weight: 400; }
.ah-pill { font: 500 11.5px/1 var(--sans); color: var(--ink-3); padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; }

.answer-lead.answer { max-width: 780px; font-size: 16px; line-height: 1.72; }
.answer-lead.answer > p:first-child,
.answer-lead.answer > .full-answer > p:first-child { font: 400 19px/1.5 var(--serif); color: var(--ink-1); margin-bottom: 0.7em; }
.answer-lead.answer table { font-size: 13.5px; }

.media-deck { display: flex; flex-direction: column; gap: 22px; margin-top: 26px; }
.media-deck:empty { display: none; }
.media-row-h { display: flex; align-items: center; gap: 8px; font: 600 10.5px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.mr-ic { font-size: 13px; }
.mr-count { font-weight: 500; opacity: 0.6; }

.src-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.src-pill { display: inline-flex; align-items: center; gap: 7px; font: 400 12.5px/1 var(--sans); color: var(--ink-2); padding: 7px 12px 7px 9px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.src-pill:hover { border-color: var(--accent); background: var(--bg-2); }
.src-fav { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; flex: none; }
.src-host { white-space: nowrap; }


/* ===== Full-screen pages: Account / Login + Pricing / Upgrade ===== */
.page-view { position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page-topbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: color-mix(in srgb, var(--bg-1) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.page-brand { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; }
.page-brand .brand-mark { font-size: 20px; }
.page-brand .brand-name { font: 600 17px/1 var(--serif); color: var(--ink-1); }
.page-close { background: none; border: 1px solid var(--line-2); border-radius: 999px; width: 32px; height: 32px; color: var(--ink-3); cursor: pointer; font-size: 13px; }
.page-close:hover { border-color: var(--accent); color: var(--accent); }
.page-body { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }

/* Pricing / Upgrade */
.pp-title { font: 500 30px/1.15 var(--serif); text-align: center; margin: 12px 0 8px; }
.pp-sub { font: 400 15px/1.6 var(--sans); color: var(--ink-3); text-align: center; max-width: 620px; margin: 0 auto 36px; }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .pp-grid { grid-template-columns: 1fr; } }
.pp-card { position: relative; border: 1px solid var(--line-2); border-radius: 16px; padding: 24px 22px; background: var(--bg-1); display: flex; flex-direction: column; gap: 6px; }
.pp-card.best { border-color: var(--accent); box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 12%, transparent); }
.pp-card.current { outline: 2px solid var(--line-2); }
.pp-badge { position: absolute; top: -11px; left: 22px; font: 700 9.5px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bg-1); background: var(--accent); padding: 5px 10px; border-radius: 999px; }
.pp-name { font: 600 16px/1 var(--sans); }
.pp-price { display: flex; align-items: baseline; gap: 3px; }
.pp-amt { font: 600 34px/1.05 var(--serif); }
.pp-per { font: 400 14px/1 var(--sans); color: var(--ink-3); }
.pp-tag { font: 400 12.5px/1.3 var(--sans); color: var(--ink-3); font-style: italic; margin-bottom: 8px; }
.pp-feats { list-style: none; margin: 8px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.pp-feats li { display: flex; gap: 9px; align-items: flex-start; font: 400 13.5px/1.45 var(--sans); color: var(--ink-2); }
.pp-check { color: var(--accent); font-weight: 600; flex: none; }
.pp-cta { margin-top: auto; font: 600 14px/1 var(--sans); padding: 13px 14px; border-radius: 11px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg-1); cursor: pointer; transition: filter 0.15s; }
.pp-cta:hover { filter: brightness(1.08); }
.pp-cta.pp-down { background: none; color: var(--ink-3); border-color: var(--border); }
.pp-cta.pp-down:hover { filter: none; border-color: var(--ink-3); color: var(--ink-2); }
/* monthly / annual toggle */
.pp-toggle { display: inline-flex; gap: 4px; padding: 4px; margin: 4px auto 22px; background: var(--surface-2, #f3efe9); border: 1px solid var(--border); border-radius: 999px; }
.pp-seg { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 600 13px/1 var(--sans); color: var(--ink-3); cursor: pointer; transition: background .15s, color .15s; }
.pp-seg.on { background: var(--bg-1, #fff); color: var(--ink); box-shadow: 0 1px 4px rgba(40,35,25,.12); }
.pp-save { font: 600 12px/1.4 var(--sans); color: var(--ok, #3f7d57); }
.pp-save.pp-muted { color: var(--ink-3); font-weight: 500; }
/* token buckets */
.pp-buckets { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line-2); }
.pp-buckets-h { font: 600 16px/1.3 var(--serif); color: var(--ink); text-align: center; margin: 0 0 16px; }
.pp-bucket-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; margin: 0 auto; }
@media (max-width: 560px) { .pp-bucket-row { grid-template-columns: 1fr; } }
.pp-bucket { border: 1px solid var(--line-2); border-radius: 13px; padding: 16px; text-align: center; background: var(--bg-1); display: flex; flex-direction: column; gap: 8px; }
.pp-bucket-t { font: 600 14px/1 var(--sans); color: var(--ink); }
.pp-bucket-p { font: 700 22px/1 var(--serif); color: var(--ink); }
.pp-bucket-cta { border: 1px solid var(--accent); background: none; color: var(--accent); border-radius: 9px; padding: 8px 0; font: 600 13px/1 var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.pp-bucket-cta:hover { background: var(--accent); color: var(--bg-1); }
.pp-current { margin-top: auto; text-align: center; font: 600 12px/1 var(--sans); color: var(--accent); padding: 13px 0 2px; }
.pp-current.pp-muted { color: var(--ink-3); }
.pp-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; }
.pp-portal, .pp-loginhint { background: none; border: none; color: var(--ink-3); font: 500 13px/1.4 var(--sans); cursor: pointer; text-decoration: underline dotted; }
.pp-portal:hover, .pp-loginhint:hover { color: var(--accent); }
.pp-note { font: 400 12.5px/1.4 var(--sans); color: var(--ink-3); text-align: center; }

/* Account / Login */
.account-page { max-width: 420px; margin: 24px auto 0; }
.acc-card { border: 1px solid var(--line-2); border-radius: 18px; padding: 30px 28px; background: var(--bg-1); display: flex; flex-direction: column; gap: 12px; }
.acc-card.login { gap: 10px; }
.acc-title { font: 500 24px/1.2 var(--serif); text-align: center; margin: 0; }
.acc-sub { font: 400 13.5px/1.5 var(--sans); color: var(--ink-3); text-align: center; margin: 0 0 6px; }
.acc-google { font: 500 13.5px/1 var(--sans); padding: 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--ink-1); cursor: pointer; }
.acc-google:hover { border-color: var(--accent); }
.acc-or { text-align: center; font: 400 11px/1 var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; margin: 4px 0; }
.acc-in { font: 400 14px/1.2 var(--sans); padding: 12px 13px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-1); }
.acc-in:focus { outline: none; border-color: var(--accent); }
.acc-err { font: 400 12.5px/1.45 var(--sans); color: var(--danger, #c0392b); padding: 2px 2px 0; }
.acc-err.ok { color: var(--accent); }
.acc-btn { font: 600 14px/1 var(--sans); padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--ink-1); cursor: pointer; transition: border-color 0.15s, filter 0.15s; }
.acc-btn:hover { border-color: var(--accent); }
.acc-btn.primary { border-color: var(--accent); background: var(--accent); color: var(--bg-1); }
.acc-btn.primary:hover { filter: brightness(1.08); }
.acc-btn.danger { color: var(--danger, #c0392b); }
.acc-btn.danger:hover { border-color: var(--danger, #c0392b); }
.acc-note { font: 400 12px/1.4 var(--sans); color: var(--ink-3); text-align: center; margin: 4px 0 0; }
.acc-link { background: none; border: none; color: var(--accent-2); font: 400 13px/1 var(--sans); cursor: pointer; text-decoration: underline; text-align: center; margin: 2px auto 0; padding: 4px; }
.acc-link:hover { color: var(--accent); }
.acc-id { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.acc-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--bg-1); display: flex; align-items: center; justify-content: center; font: 600 20px/1 var(--sans); flex: none; }
.acc-email { font: 600 15px/1.2 var(--sans); color: var(--ink-1); }
.acc-plan { display: flex; align-items: center; gap: 6px; font: 400 13px/1.2 var(--sans); color: var(--ink-3); margin-top: 3px; }
.acc-plan-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.acc-plan-dot[data-plan="pro"], .acc-plan-dot[data-plan="max"] { background: var(--accent); }
.acc-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }

/* ===================================================================== */
/* Results dashboard (route-v3) — two-column layout                       */
/* LEFT: search bar · answer · news links · top results · TikTok pair     */
/* RIGHT: YouTube video · podcast player · DuckDuckGo images              */
/* ===================================================================== */
.route-v3 { width: 100%; }
.rv3-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 38px); align-items: start; }
.rv3-left { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.rv3-right { min-width: 0; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.rv3-left-media { display: flex; flex-direction: column; gap: 24px; }
.rv3-right-media { display: flex; flex-direction: column; gap: 18px; }
.rv3-right-media:empty, .rv3-tweets-mount:empty { display: none; }
/* No media at all → the concise C answer spans full width, no empty right gap. */
.rv3-grid:not(:has(.rv3-right-media > *)):not(:has(.rv3-tweets-mount > *)) { grid-template-columns: 1fr; }
.rv3-grid:not(:has(.rv3-right-media > *)):not(:has(.rv3-tweets-mount > *)) .rv3-right { display: none; }
@media (max-width: 920px) {
  .rv3-grid { grid-template-columns: 1fr; gap: 26px; }
  .rv3-right { position: static; }
}

/* top search bar */
.rv3-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 7px 7px 7px 18px; box-shadow: var(--sh-sm); transition: border-color .18s ease, box-shadow .18s ease; }
.rv3-search:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.rv3-search-input { flex: 1; min-width: 0; border: none; background: none; outline: none; font: 400 16px/1.4 var(--sans); color: var(--ink); padding: 8px 0; }
.rv3-search-input::placeholder { color: var(--ink-3); }
.rv3-search-go { flex: none; width: 38px; height: 38px; border-radius: var(--r-md); border: none; background: var(--coral); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: filter .15s ease, transform .1s ease; }
.rv3-search-go:hover { filter: brightness(1.06); }
.rv3-search-go:active { transform: scale(.95); }

/* left-column section headers */
.rv3-section { display: flex; flex-direction: column; gap: 11px; }
.rv3-sec-h { margin: 2px 0 0; font: 700 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* DuckDuckGo / web search results list */
.ddg-results { display: flex; flex-direction: column; gap: 10px; }
.ddg-result { display: block; text-decoration: none; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.ddg-result:hover { border-color: var(--border-2); box-shadow: var(--sh-sm); }
.ddg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.ddg-fav { width: 16px; height: 16px; border-radius: 4px; flex: none; object-fit: cover; }
.ddg-host { font: 400 12px/1.2 var(--sans); color: var(--ink-3); }
.ddg-title { font: 600 15px/1.35 var(--sans); color: var(--coral-ink); }
.ddg-snip { margin-top: 4px; font: 400 13px/1.5 var(--sans); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* TikTok — two large portrait cards */

/* Maps / local — concierge ranked places, one-tap directions (beats Google's pin-dump) */
.deck-maps-block .tape-label { display: flex; align-items: center; gap: 7px; }
.deck-maps-block .tl-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maps-openall { flex: none; font: 600 11px/1 var(--sans); color: var(--maps); text-decoration: none; padding: 5px 9px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); white-space: nowrap; transition: border-color .15s ease; }
.maps-openall:hover { border-color: var(--maps); }
.maps-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.maps-card { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.maps-card:hover { border-color: var(--maps); box-shadow: var(--sh-sm); }
.maps-rank { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--maps-g); color: #fff; font: 700 12px/22px var(--mono); text-align: center; }
.maps-body { flex: 1; min-width: 0; }
.maps-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.maps-nm { font: 600 14.5px/1.3 var(--sans); color: var(--ink); }
.maps-det { font: 400 12px/1.3 var(--sans); color: var(--ink-3); }
.maps-why { margin-top: 3px; font: 400 13px/1.45 var(--sans); color: var(--ink-2); }
.maps-dir { flex: none; align-self: center; font: 600 12px/1 var(--sans); color: var(--maps); white-space: nowrap; }

/* Video block in the route-v3 dashboard — the base .deck-yt rules are scoped to .intel-deck-page,
   so without these the YouTube poster renders unsized and crops. 16:9 box + object-fit cover. */
.route-v3 .deck-yt-block { width: 100%; }
.route-v3 .deck-yt { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0a0a0a; }
.route-v3 .deck-yt-screen { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer; background: #111; overflow: hidden; }
.route-v3 .deck-yt-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease, filter .3s ease; }
.route-v3 .deck-yt-screen:hover .deck-yt-poster { transform: scale(1.03); filter: brightness(.92); }
.route-v3 .deck-yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(255,0,51,.92); color: #fff; display: grid; place-items: center; font-size: 19px; padding-left: 3px; box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none; }
.route-v3 .deck-yt-dur { position: absolute; right: 8px; bottom: 8px; font: 600 10px var(--mono); color: #fff; background: rgba(0,0,0,.72); padding: 3px 6px; border-radius: 6px; pointer-events: none; }
.route-v3 .deck-yt-screen.deck-yt-playing { cursor: default; aspect-ratio: 16 / 9; }
.route-v3 .deck-yt-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.route-v3 .deck-yt-expand { position: absolute; right: 8px; top: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 8px; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.route-v3 .deck-yt-expand:hover { background: rgba(0,0,0,.78); }
.route-v3 .deck-yt-meta { padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.route-v3 .deck-yt-title { font: 600 13.5px/1.35 var(--sans); color: var(--ink); margin-bottom: 4px; }
.route-v3 .deck-yt-sub { font: 400 11.5px/1.3 var(--sans); color: var(--ink-3); }
.route-v3 .deck-yt-ch { font-weight: 600; color: var(--ink-2); }

/* Wide screens: stop wasting the real estate — widen the canvas and give the right-column media
   (video/podcast/images) more room. Answer prose stays readable; tables/cards grow with it. */
@media (min-width: 1400px) {
  #app { max-width: 1500px; }
  .msg { max-width: 1460px; }
  .composer, .composer-hint { max-width: 1460px; }
  .rv3-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.04fr); gap: 40px; }
}
@media (min-width: 1750px) {
  #app { max-width: 1680px; }
  .msg, .composer, .composer-hint { max-width: 1640px; }
}
.route-v3 .answer-lead > p { max-width: 76ch; }

/* ===================== LABS — frontier-model playground ===================== */
.tabswitch { display:flex; gap:2px; background:var(--surface-3); border:0.5px solid var(--border); border-radius:9px; padding:2px; margin-left:14px; }
.tabswitch .tab { font-family:var(--sans); font-size:13px; color:var(--ink-3); background:transparent; border:none; border-radius:7px; padding:5px 14px; cursor:pointer; display:flex; align-items:center; gap:6px; }
.tabswitch .tab.on { background:var(--surface); color:var(--ink); box-shadow:0 0 0 0.5px var(--border-2); }
.tab-new { font-size:9px; font-weight:600; background:#f0d9cf; color:#9a4a2c; padding:1px 5px; border-radius:5px; letter-spacing:.02em; }
body.labs-mode > #app > .transcript, body.labs-mode > #app > .composer, body.labs-mode > #app > #attachments, body.labs-mode > #app > .composer-hint { display:none !important; }

#labsView { max-width:980px; margin:0 auto; padding:18px 22px 60px; font-family:var(--sans); color:var(--ink); }
.labs-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.labs-title { font-family:var(--serif); font-size:26px; font-weight:600; line-height:1.1; }
.labs-sub { font-size:13px; color:var(--ink-3); margin-top:2px; }
.labs-meter { text-align:right; min-width:170px; }
.labs-meter .lm-l { font-size:11px; color:var(--ink-3); }
.labs-meter .lm-v { font-size:13px; font-weight:500; }
.labs-meter .lm-bar { height:5px; background:var(--surface-3); border-radius:3px; margin-top:4px; overflow:hidden; }
.labs-meter .lm-fill { height:100%; background:var(--accent); border-radius:3px; transition:width .4s; }

.labs-modes { display:flex; gap:6px; margin-bottom:12px; }
.labs-mode-btn { font-size:13px; color:var(--ink-2); background:var(--surface); border:0.5px solid var(--border); border-radius:8px; padding:6px 14px; cursor:pointer; display:flex; align-items:center; gap:6px; }
.labs-mode-btn.on { background:var(--accent-soft); border-color:#e3c3b4; color:var(--accent-2); font-weight:500; }

.labs-rail { display:flex; gap:7px; flex-wrap:wrap; margin-bottom:14px; }
.labs-chip { font-size:12px; display:flex; align-items:center; gap:6px; background:var(--surface); border:0.5px solid var(--border); border-radius:15px; padding:5px 11px; cursor:pointer; user-select:none; }
.labs-chip:hover { border-color:var(--border-2); }
.labs-chip.on { background:var(--accent-soft); border:1px solid #d98a63; color:var(--accent-2); }
.labs-chip .dot { width:6px; height:6px; border-radius:50%; }
.labs-chip .w { color:var(--ink-3); font-size:11px; }
.labs-chip .nu { font-size:8px; font-weight:600; background:#e7c9bb; color:#8a3f22; padding:1px 4px; border-radius:4px; }
.labs-chip.dis { opacity:.4; cursor:not-allowed; }

.labs-thread { display:flex; flex-direction:column; gap:12px; margin-bottom:14px; min-height:60px; }
.labs-msg-user { align-self:flex-end; max-width:78%; background:var(--surface-3); border-radius:13px 13px 4px 13px; padding:8px 13px; font-size:14px; }
.labs-msg-bot { align-self:flex-start; max-width:90%; }
.labs-bot-head { display:flex; align-items:center; gap:6px; margin-bottom:4px; font-size:11px; font-weight:500; color:var(--ink-2); }
.labs-bot-body { font-size:14px; line-height:1.6; }
/* Animated "thinking" indicator — a slow model never looks like a dead request. */
.labs-think { display:inline-flex; align-items:center; gap:9px; color:var(--ink-3); font-size:13.5px; padding:4px 0; }
.labs-think-logo { width:22px; height:22px; object-fit:contain; animation:labsThinkLogo 1.1s infinite ease-in-out; }
@keyframes labsThinkLogo { 0%,100% { transform:scale(.82) rotate(-7deg); opacity:.7; } 50% { transform:scale(1) rotate(7deg); opacity:1; } }
.labs-think-dots { display:inline-flex; gap:5px; }
.labs-think-dot { width:7px; height:7px; border-radius:50%; background:var(--accent-2,#c96f4c); animation:labsThinkPulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; }
.labs-think-dot:nth-child(2) { animation-delay: 0.15s; }
.labs-think-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes labsThinkPulse {
  0% { transform: scale(0.6) translateY(2px); opacity: 0.3; }
  100% { transform: scale(1) translateY(-2px); opacity: 1; box-shadow: 0 0 10px var(--accent); }
}
@keyframes labsThink { 0%,80%,100% { transform:scale(.5); opacity:.35; } 40% { transform:scale(1); opacity:1; } }
.labs-bot-body pre { background:#2b2722; color:#e9e2d5; font-family:var(--mono); font-size:12.5px; line-height:1.55; border-radius:9px; padding:11px 13px; overflow-x:auto; margin:8px 0; }
.labs-bot-body code { font-family:var(--mono); font-size:12.5px; background:var(--surface-3); padding:1px 5px; border-radius:4px; }
.labs-bot-body pre code { background:none; padding:0; }
.labs-meta { font-size:10.5px; color:var(--ink-3); margin-top:6px; display:flex; align-items:center; gap:6px; }

.labs-composer { display:flex; gap:8px; align-items:flex-end; position:sticky; bottom:10px; background:var(--bg); padding-top:8px; }
.labs-composer textarea { flex:1; font-family:var(--sans); font-size:14px; color:var(--ink); background:var(--surface); border:0.5px solid var(--border-2); border-radius:14px; padding:11px 14px; resize:none; min-height:24px; max-height:160px; line-height:1.5; }
.labs-composer textarea:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.labs-send { background:var(--accent); color:#fff; font-size:14px; font-weight:500; border:none; border-radius:12px; padding:11px 18px; cursor:pointer; white-space:nowrap; }
.labs-send:disabled { opacity:.5; cursor:default; }

.labs-duel-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:10px; margin-bottom:14px; }
.labs-duel-col { border:0.5px solid var(--border); border-radius:11px; background:var(--surface); padding:11px; display:flex; flex-direction:column; }
.labs-duel-col.win { border:1.5px solid var(--accent); background:var(--accent-soft); }
.labs-duel-head { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:500; margin-bottom:7px; }
.labs-duel-body { font-size:13px; line-height:1.55; color:var(--ink); flex:1; white-space:pre-wrap; }
.labs-duel-body pre { background:#2b2722; color:#e9e2d5; font-family:var(--mono); font-size:11.5px; border-radius:8px; padding:9px; overflow-x:auto; }
.labs-pick { margin-top:9px; text-align:center; font-size:12px; color:var(--accent-2); background:var(--surface-2); border:0.5px solid #e3c3b4; border-radius:8px; padding:6px; cursor:pointer; }
.labs-pick:hover { background:var(--accent-soft); }
.labs-pick.picked { background:var(--accent); color:#fff; border-color:var(--accent); }

.labs-foot { display:flex; flex-wrap:wrap; gap:14px; margin-top:18px; padding-top:12px; border-top:0.5px solid var(--border); font-size:11px; color:var(--ink-3); }
.labs-foot span { display:flex; align-items:center; gap:5px; }
.labs-gate { text-align:center; padding:40px 20px; }
.labs-gate h3 { font-family:var(--serif); font-size:22px; margin-bottom:8px; }
.labs-gate p { color:var(--ink-2); font-size:14px; max-width:440px; margin:0 auto 18px; line-height:1.6; }
.labs-gate button { background:var(--accent); color:#fff; border:none; border-radius:12px; padding:11px 22px; font-size:14px; font-weight:500; cursor:pointer; }
.labs-hint-note { font-size:11px; color:var(--ink-3); margin-bottom:10px; }

/* Face-Off free / logged-out INTERACTIVE demo gate (reuses .labs-duel-* so the preview is the real UI) */
.labs-gate.labs-demo { text-align:left; padding:28px 20px 36px; max-width:680px; margin:0 auto; }
.labs-demo-eyebrow { font-size:11px; font-weight:700; letter-spacing:.13em; color:var(--accent-2); margin-bottom:9px; }
.labs-demo-head { font-family:var(--serif); font-size:26px; line-height:1.15; margin:0 0 8px; }
.labs-demo-sub { color:var(--ink-2); font-size:14.5px; line-height:1.55; margin:0 0 16px; max-width:580px; }
.labs-demo-prompt { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:var(--surface-2); border:0.5px solid var(--border); border-radius:11px; padding:11px 14px; margin-bottom:14px; }
.labs-demo-plabel { font-size:10px; font-weight:700; letter-spacing:.11em; color:var(--ink-3); }
.labs-demo-ptext { font-family:var(--serif); font-size:16px; color:var(--ink); }
.labs-demo-name { font-weight:600; }
.labs-demo-badge { font-size:9px; font-weight:700; letter-spacing:.06em; color:#fff; background:var(--accent); border-radius:5px; padding:1px 5px; margin-left:auto; }
.labs-duel-col.lose { opacity:.5; }
.labs-demo .labs-pick { background:var(--surface-2); color:var(--accent-2); border:0.5px solid #e3c3b4; font-weight:500; }
.labs-demo .labs-pick:hover { background:var(--accent-soft); }
.labs-demo .labs-pick.picked { background:var(--accent); color:#fff; border-color:var(--accent); }
.labs-demo-reveal { background:var(--accent-soft); border:0.5px solid var(--accent); border-radius:11px; padding:12px 14px; font-size:13.5px; line-height:1.55; color:var(--ink); font-weight:500; margin:0 0 14px; animation:labsRevealIn .25s ease; }
.labs-demo-fomo { font-size:12.5px; color:var(--ink-2); line-height:1.5; margin-bottom:18px; padding-left:11px; border-left:2px solid var(--accent); }
.labs-demo-cta { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.labs-demo .labs-demo-primary { background:var(--accent); color:#fff; border:none; border-radius:12px; padding:12px 22px; font-size:14px; font-weight:600; cursor:pointer; }
.labs-demo .labs-demo-primary:hover { filter:brightness(.95); }
.labs-demo .labs-demo-secondary { background:none; color:var(--accent-2); border:0.5px solid var(--border-2); border-radius:12px; padding:12px 18px; font-size:14px; font-weight:500; cursor:pointer; }
.labs-demo .labs-demo-secondary:hover { background:var(--surface-2); }
.labs-demo-foot { font-size:11.5px; color:var(--ink-3); margin-top:14px; }
@keyframes labsRevealIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* Account data-consent toggle */
.acc-consent { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.acc-consent-title { font-size:15px; font-weight:500; color:var(--ink); margin-bottom:3px; }
.acc-consent-sub { font-size:12.5px; color:var(--ink-2); line-height:1.5; max-width:540px; }
.acc-toggle { position:relative; display:inline-block; width:46px; height:26px; flex-shrink:0; cursor:pointer; }
.acc-toggle input { position:absolute; opacity:0; width:0; height:0; }
.acc-toggle-track { position:absolute; inset:0; background:var(--border-2); border-radius:26px; transition:background .2s; }
.acc-toggle-track::before { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:transform .2s; }
.acc-toggle input:checked + .acc-toggle-track { background:var(--accent); }
.acc-toggle input:checked + .acc-toggle-track::before { transform:translateX(20px); }

/* ===================== Workspace (Labs save & sync) ===================== */
.labs-saved-wrap { margin-top:4px; }
.labs-ws-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:12px; }
.labs-ws-headtext { font-size:13px; color:var(--ink-3); }
.labs-ws-nudge { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; background:var(--accent-soft); border:0.5px solid #e3c3b4; border-radius:10px; padding:10px 14px; margin-bottom:14px; font-size:13px; color:var(--accent-2); }
.labs-ws-up { background:var(--accent); color:#fff; border:none; border-radius:9px; padding:7px 14px; font-size:12.5px; font-weight:500; cursor:pointer; white-space:nowrap; }
.labs-ws-search { width:100%; box-sizing:border-box; font-family:var(--sans); font-size:13.5px; color:var(--ink); background:var(--surface); border:0.5px solid var(--border-2); border-radius:10px; padding:9px 13px; margin-bottom:12px; }
.labs-ws-search:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.labs-ws-list { display:flex; flex-direction:column; gap:8px; }
.labs-ws-card { display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--surface); border:0.5px solid var(--border); border-radius:10px; padding:10px 12px; }
.labs-ws-card:hover { border-color:var(--border-2); }
.labs-ws-main { display:flex; align-items:center; gap:10px; flex:1; min-width:0; cursor:pointer; }
.labs-ws-typetag { font-size:9.5px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; border-radius:5px; padding:2px 6px; flex-shrink:0; }
.labs-ws-typetag[data-t="chat"] { background:#e7eef7; color:#2f5d8a; }
.labs-ws-typetag[data-t="duel"] { background:#f3e9df; color:#8a5a2c; }
.labs-ws-typetag[data-t="snippet"] { background:#e8f0e6; color:#3f6b3a; }
.labs-ws-title { font-size:14px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.labs-ws-actions { display:flex; gap:6px; flex-shrink:0; }
.labs-ws-act { width:28px; height:28px; border:0.5px solid var(--border); border-radius:7px; background:var(--surface); color:var(--ink-3); font-size:13px; cursor:pointer; line-height:1; }
.labs-ws-act:hover { background:var(--surface-3); color:var(--ink); }
.labs-ws-detail { background:var(--surface-2); border:0.5px solid var(--border); border-radius:10px; padding:12px; margin:6px 0 2px; }
.labs-ws-detail pre { background:#2b2722; color:#e9e2d5; font-family:var(--mono); font-size:12px; border-radius:8px; padding:11px; overflow-x:auto; margin:0; }
.labs-ws-prompt { font-size:12px; color:var(--ink-2); font-style:italic; margin-bottom:10px; }
.labs-ws-duelcol { border-top:0.5px solid var(--border); padding-top:9px; margin-top:9px; }
.labs-ws-duelcol.win { }
.labs-ws-duelcol.win .labs-bot-head { color:var(--accent-2); }
.labs-chat-tools { display:flex; gap:8px; margin:10px 0; }
.labs-savebtn { font-size:12.5px; color:var(--accent-2); background:var(--accent-soft); border:0.5px solid #e3c3b4; border-radius:9px; padding:7px 14px; cursor:pointer; }
.labs-savebtn:hover { background:#f3ddd1; }
.labs-savebtn:disabled { opacity:.7; cursor:default; }
.labs-savebtn.ghost { color:var(--ink-2); background:var(--surface); border-color:var(--border); }

/* ===================== Copy buttons (questions + answers, Ask + Labs) ===================== */
.copy-btn { display:inline-flex; align-items:center; gap:5px; background:transparent; border:0.5px solid transparent; border-radius:7px; padding:4px 6px; color:var(--ink-3); cursor:pointer; opacity:.5; transition:opacity .15s, background .15s, color .15s; line-height:0; vertical-align:middle; }
.copy-btn:hover { opacity:1; background:var(--surface-3); color:var(--ink); border-color:var(--border); }
.copy-btn.copied { opacity:1; color:#2f8f6f; }
.copy-lbl { font-size:12px; line-height:1; }
.ah-query-row { display:flex; align-items:flex-start; gap:8px; }
.ah-query-row .ah-query { flex:1; margin:0; }
.ah-query-row .copy-btn { margin-top:2px; flex-shrink:0; }
.answer-actions { display:flex; justify-content:flex-start; margin:10px 0 4px; }
.labs-user-wrap { align-self:flex-end; display:flex; flex-direction:column; align-items:flex-end; gap:1px; max-width:82%; }
.labs-user-wrap .labs-msg-user { max-width:100%; }
.labs-user-wrap .copy-btn { padding:2px 5px; }
.labs-msg-actions { display:flex; align-items:center; gap:10px; margin-top:5px; }
.labs-msg-actions .labs-meta { margin-top:0; }
.labs-duel-head .copy-btn { padding:2px 4px; }

/* Labs live code preview (#4) — Run a returned web page in a sandboxed iframe + download it. */
.labs-preview { margin:10px 0 4px; border:0.5px solid var(--border-2); border-radius:11px; overflow:hidden; background:var(--surface); }
.labs-preview-bar { display:flex; align-items:center; gap:8px; padding:7px 10px; background:var(--surface-3); border-bottom:0.5px solid var(--border); }
.labs-prev-label { font:500 11px/1 var(--mono); letter-spacing:.04em; color:var(--ink-2); text-transform:uppercase; margin-right:auto; }
.labs-prev-btn { font-size:12.5px; color:var(--accent-2); background:var(--accent-soft); border:0.5px solid #e3c3b4; border-radius:8px; padding:5px 12px; cursor:pointer; }
.labs-prev-btn:hover { background:#f3ddd1; }
.labs-prev-btn.ghost { color:var(--ink-2); background:var(--surface); border-color:var(--border); }
.labs-prev-frame { display:block; width:100%; height:460px; border:0; background:#fff; }
/* Collapse a long code block so it doesn't bury the screen — preview is the star. */
.labs-code-wrap.collapsed pre { max-height:280px; overflow:hidden; -webkit-mask-image:linear-gradient(#000 72%, transparent); mask-image:linear-gradient(#000 72%, transparent); }
.labs-code-toggle { display:block; width:100%; margin-top:6px; padding:7px; font-size:12.5px; color:var(--ink-2); background:var(--surface-3); border:0.5px solid var(--border); border-radius:8px; cursor:pointer; }
.labs-code-toggle:hover { background:var(--border); }

/* Labs file upload (#5) */
.labs-attach { flex:none; width:38px; height:38px; border-radius:11px; border:0.5px solid var(--border-2); background:var(--surface); color:var(--ink-2); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.labs-attach:hover { background:var(--surface-3); }
.labs-attach-chips { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
.labs-chip { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--ink-2); background:var(--surface-3); border:0.5px solid var(--border); border-radius:999px; padding:4px 6px 4px 10px; }
.labs-chip-x { border:0; background:none; color:var(--ink-3); cursor:pointer; font-size:11px; line-height:1; padding:2px 4px; border-radius:50%; }
.labs-chip-x:hover { background:var(--border); color:var(--ink); }
.labs-user-files { font-size:11px; color:var(--ink-3); margin-top:4px; }

/* "From X" — native-embed-style tweet cards on the results page (real getxapi data) */
.x-section { margin:18px 0 6px; }
.x-sec-head { display:flex; align-items:center; gap:8px; margin-bottom:11px; }
.x-sec-title { font-size:15px; font-weight:600; color:var(--ink); }
.x-sec-meta { font-size:12.5px; color:var(--ink-3); }
.x-logo { font-weight:700; color:var(--ink); font-size:18px; line-height:1; }
.x-logo.sm { font-size:15px; }
.x-tweets { display:grid; gap:12px; max-width:560px; }
.x-tweet { background:#fff; border:1px solid #cfd9de; border-radius:16px; padding:12px 16px; color:#0f1419; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; }
.x-head { display:flex; align-items:flex-start; gap:10px; }
.x-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; flex:none; background:#e1e8ed; }
.x-avatar-fb { display:flex; align-items:center; justify-content:center; background:#536471; color:#fff; font-weight:600; font-size:15px; }
.x-id { flex:1; min-width:0; }
.x-name-row { display:flex; align-items:center; gap:4px; }
.x-name { font-weight:700; font-size:15px; color:#0f1419; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.x-verified { flex:none; width:18px; height:18px; border-radius:50%; background:#1d9bf0; color:#fff; font-size:11px; line-height:18px; text-align:center; }
.x-handle { font-size:14.5px; color:#536471; }
.x-tweet .x-logo { margin-left:auto; }
.x-text { font-size:16px; line-height:1.4; color:#0f1419; margin:10px 0 11px; word-wrap:break-word; }
.x-stats { display:flex; align-items:center; gap:18px; font-size:13px; color:#536471; flex-wrap:wrap; }
.x-view { margin-left:auto; color:#1d9bf0; font-weight:600; text-decoration:none; }
.x-view:hover { text-decoration:underline; }

/* ===================== Fuel gauge (replaces the $ spend meter — no money anxiety) ===================== */
.fuel { display:flex; align-items:center; gap:1.5px; padding:5px 4px; cursor:default; }
.fuel-bar { position:relative; width:27px; height:15px; border:1.5px solid var(--ink-3); border-radius:3.5px; background:transparent; padding:1.5px; box-sizing:border-box; display:flex; }
.fuel-fill { height:100%; width:100%; background:#3a9d78; border-radius:1.5px; transition:width .45s ease, background .35s; }
.fuel.mid .fuel-fill { background:#d39b3a; }
.fuel.low .fuel-fill { background:#c4623f; }
.fuel-cap { width:2.5px; height:6px; background:var(--ink-3); border-radius:0 2px 2px 0; }

/* ===================== Design v3 — editorial refinement (June 2026) ===================== */

/* --- Answer hero card — more editorial, less "card" --- */
.answer-page .card.syn-hero {
  border-left: 3px solid var(--coral);
  border-radius: 0 20px 20px 0;
  padding: 28px 32px;
}
.answer-page .syn-hero h2 {
  font-size: clamp(28px, 4.5vw, 38px);
  line-height: 1.10;
  margin-bottom: 16px;
}

/* --- Route answer body — bigger, more readable --- */
.route-body {
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--ink);
  max-width: 72ch;
}
.route-body p { margin: 0 0 14px; }
.route-body p:last-child { margin-bottom: 0; }
.route-body strong { color: var(--ink); font-weight: 650; }
.route-body a { color: var(--coral-ink); text-decoration: underline; text-underline-offset: 3px; }

/* --- Source widget cards — refined labels --- */
.widget .wtype { font-size: 9.5px; padding: 3px 8px 3px 6px; letter-spacing: .04em; }
.widget[data-kind="reddit"] .wtype { background: var(--reddit); }
.widget[data-kind="youtube"] .wtype { background: var(--yt); }
.widget[data-kind="podcast"] .wtype { background: #7C3AED; }
.widget[data-kind="forums"] .wtype { background: #0F766E; }
.widget[data-kind="news"] .wtype { background: var(--news); }

/* --- Copy button — cleaner pill --- */
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--ink-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 6px 14px; cursor: pointer;
  transition: all .15s ease;
}
.copy-btn:hover { border-color: var(--coral-line); color: var(--coral-ink); background: var(--coral-soft2); }
.copy-btn.copied { color: var(--ok); border-color: #3f7d57; background: #e8f5ee; }

/* --- Widget board — better section headers --- */
.sources-title {
  font-size: 21px;
  letter-spacing: -.015em;
}
.sources-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-2);
}

/* --- Reddit thread card — distinct visual treatment --- */
.thread-sheet {
  background: linear-gradient(135deg, #FFF8F5, var(--surface));
  border: 1px solid #FFE8DB;
  border-radius: 18px;
  padding: 22px 24px;
}
.thread-sheet .band-label .dot { background: var(--reddit) !important; }

/* --- Follow-up suggestions row --- */
.followups {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.followups-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 10px; width: 100%;
}
.followup-chip {
  font-size: 13px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 8px 16px; cursor: pointer; transition: all .15s ease;
  font-family: var(--sans);
}
.followup-chip:hover {
  border-color: var(--coral-line); color: var(--coral-ink);
  background: var(--coral-soft2); transform: translateY(-1px);
}

/* --- Mobile refinements --- */
@media (max-width: 640px) {
  .route-body { font-size: 16px; line-height: 1.65; }
  .answer-page .card.syn-hero { padding: 20px 18px; border-radius: 0 16px 16px 0; }
  .answer-page .syn-hero h2 { font-size: 24px; }
  .thread-sheet { padding: 16px 14px; }
  .followup-chip { font-size: 12px; padding: 7px 13px; }
}

/* ============================================================================
   PONG, THE COMPANION — a living being on a warm "Nightlight" home stage.
   The five-model rally is untouched underneath; this is the face of it.
   ============================================================================ */
:root {
  --pong-hi: #FAD9C2; --pong-mid: #F0997B; --pong-deep: #D85A30;
  --eye: #3A241B; --blush: #F4A98A; --mote: #FAC775;
  --glow: #D85A30;                       /* emotion-coded; states override */
  --c-coral: #D85A30; --c-amber: #EF9F27; --c-plum: #8A5A6E;
  --c-answer: #5BB39A; --c-gold: #FAC775; --c-rose: #E6A6B4;
  --say: #F3E6D6;
}

/* ---- "Focus" home: bold, confident, verdict-forward (matches the C answer direction) ---- */
.c-home { text-align: center; margin: clamp(20px, 7vh, 70px) 0 8px; }
.c-home .c-kick { display: inline-block; font: 600 11.5px/1 "Geist Mono", var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--coral-ink, #a64e30); background: var(--coral-soft2, #fbf1eb); border: 1px solid var(--coral-line, #e7bba4); border-radius: 999px; padding: 7px 14px; margin-bottom: 22px; }
.c-home h1 { font-family: "Space Grotesk", var(--sans); font-weight: 700; font-size: clamp(40px, 7vw, 66px); line-height: 1.02; letter-spacing: -.03em; color: var(--ink, #28261f); }
.c-home h1 em { font-style: normal; color: var(--coral, #c4623f); }
.c-home .home-sub { margin-top: 18px; }

/* ---- "Focus" answer: the bold coral VERDICT band (the peak-end payoff) ---- */
.c-verdict { background: var(--coral, #c4623f); border-radius: 16px; padding: 22px 26px 24px; margin: 2px 0 18px; color: #fff; }
.c-verdict-kick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 600 11px/1 "Geist Mono", var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #ffd9c9; margin-bottom: 13px; }
.c-verdict-by { background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 9px; letter-spacing: .04em; color: #fff; }
.c-verdict-line { font-family: "Space Grotesk", var(--sans); font-weight: 700; font-size: clamp(21px, 3.3vw, 29px); line-height: 1.16; letter-spacing: -.02em; color: #fff; margin: 0; }
.c-verdict-q { margin: 13px 0 0; font-size: 13.5px; color: rgba(255,255,255,.82); font-style: italic; }
.route-v3 .answer-lead.answer { font-size: 16.5px; line-height: 1.66; }
.route-v3 .answer-lead.answer > p:first-child strong:first-child { color: var(--coral-ink, #a64e30); }

/* honor [hidden] on the attachment trays (a class display:flex was overriding it → a stray bar) */
.attachments[hidden] { display: none !important; }
/* ---- the stage ---- */
.pong-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: clamp(8px, 4vh, 48px) 0 18px; }
.pong { width: clamp(150px, 26vw, 220px); height: auto; overflow: visible; cursor: pointer; }
#app:not(.home) .pong-stage:not(.pong-docked) { display: none; }
/* docked: a small fixed presence at top-center that keeps reacting through the whole answer */
.pong-stage.pong-docked { position: fixed; top: 50px; left: 50%; transform: translateX(-50%); z-index: 45; margin: 0; gap: 0; pointer-events: none; }
.pong-stage.pong-docked .pong { width: 56px; cursor: default; }
.pong-stage.pong-docked .pong-say, .pong-stage.pong-docked .pong-actions { display: none; }
#app:has(.pong-docked) .transcript { padding-top: 58px; }

/* his serif voice, typed beneath him */
.pong-say { font-family: var(--serif); font-style: italic; color: var(--say); font-size: clamp(18px, 2.8vw, 27px); line-height: 1.38; text-align: center; max-width: 30ch; margin: 4px auto 0; min-height: 1.4em; text-wrap: balance; }
.pong-say .cursor { display: inline-block; width: .5ch; animation: pong-blink 1s steps(2,start) infinite; color: var(--c-coral); }
.pong-actions { margin-top: 12px; }
.pong-chip { font-family: var(--sans); font-size: 13px; color: #E3D3C4; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: all .2s; }
.pong-chip:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---- the body: breathing, bobbing, glowing ---- */
#pong-body { transform-origin: 120px 124px; animation: breathe var(--breathe,4.2s) ease-in-out infinite; }
#pong-aura { animation: aura-pulse var(--breathe,4.2s) ease-in-out infinite; }
#pong { animation: bob 5.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes aura-pulse { 0%,100% { opacity: .8; } 50% { opacity: 1; } }
/* aura hue follows mood */
#pong .glint, #pong #pong-eyes { transition: transform .3s ease; }
#pong-aura { fill: url(#pongAura); }
.pong { --glow: var(--c-coral); }
#pong-mouth { transition: d .4s ease, opacity .3s; }

/* blink — squash the eyes vertically for a beat */
#pong.blink #pong-eyes rect { transform: scaleY(.12); transform-origin: center 117px; }
#pong #pong-eyes rect { transition: transform .09s ease; transform-origin: center 117px; }

/* ---- GREET: a happy hop + wide eyes + cheeks + aura flare (one-shot) ---- */
#pong.pong--greet { --glow: var(--c-gold); }
#pong.pong--greet #pong-body { animation: greet-hop .62s cubic-bezier(.34,1.56,.5,1); }
#pong.pong--greet #cheek-l, #pong.pong--greet #cheek-r { opacity: .72; transition: opacity .3s; }
#pong.pong--greet #pong-eyes rect { transform: scaleY(1.12); }
@keyframes greet-hop { 0% { transform: scale(1) translateY(0); } 35% { transform: scale(1.08,.94) translateY(-14px); } 70% { transform: scale(.97,1.04) translateY(2px); } 100% { transform: scale(1) translateY(0); } }

/* ---- LISTEN: leans toward you, attentive ---- */
#pong.pong--listen { --glow: var(--c-amber); }
#pong.pong--listen #pong-body { transform: rotate(4deg) translateX(4px); transition: transform .4s ease; }

/* ---- THINK: the Five wake and confer ---- */
#pong.pong--think { --glow: var(--c-plum); }
#pong-five { transform-origin: 120px 120px; }
#pong.pong--think #pong-five { opacity: 1; animation: confer 2.4s linear infinite; transition: opacity .4s; }
.mote { fill: var(--mote); filter: drop-shadow(0 0 5px var(--mote)); }
.m1 { transform: translate(162px,120px); } .m2 { transform: translate(133px,160px); }
.m3 { transform: translate(86px,145px); } .m4 { transform: translate(86px,95px); } .m5 { transform: translate(133px,80px); }
#pong.pong--think #pong-eyes { transform: translate(-2px,-4px); }
@keyframes confer { to { transform: rotate(360deg); } }

/* ---- ANSWER: the Five merge into one bright pulse ---- */
#pong.pong--answer { --glow: var(--c-answer); }
#pong.pong--answer #pong-five { opacity: 1; }
#pong.pong--answer .mote { transform: translate(120px,120px); transition: transform .34s cubic-bezier(.5,0,.2,1); fill: #fff; }
#pong.pong--answer #pong-mouth { d: path("M104 149 Q120 160 136 149"); }
#pong.beat #pong-body { animation: beat .32s ease-out; }
@keyframes beat { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* ---- CELEBRATE: bounce + happy crescent eyes + cheeks ---- */
#pong.pong--celebrate { --glow: var(--c-gold); }
#pong.pong--celebrate #pong-body { animation: celebrate-bounce .7s cubic-bezier(.34,1.56,.4,1); }
#pong.pong--celebrate #cheek-l, #pong.pong--celebrate #cheek-r { opacity: .85; }
#pong.pong--celebrate #pong-eyes rect { transform: scaleY(.5); }
@keyframes celebrate-bounce { 0%,100% { transform: translateY(0) scale(1); } 25% { transform: translateY(-22px) scale(1.06,.95); } 55% { transform: translateY(0) scale(.96,1.05); } 78% { transform: translateY(-8px); } }

/* ---- COMFORT: lowers, leans in, softens ---- */
#pong.pong--comfort { --glow: var(--c-rose); --breathe: 6.5s; }
#pong.pong--comfort #pong-body { transform: translateY(8px) scale(.97); transition: transform .7s ease; }
#pong.pong--comfort #pong-eyes rect { transform: scaleY(.55); }
#pong.pong--comfort #pong-mouth { d: path("M108 151 Q120 156 132 151"); }

/* ---- SLEEPY: eyelids droop ---- */
#pong.pong--sleepy { --glow: var(--c-coral); --breathe: 7s; opacity: .9; }
#pong.pong--sleepy #pong-eyes rect { transform: scaleY(.4); transform-origin: center 124px; }

/* the page itself warms ~4% toward his mood */
#app.home { transition: background .8s ease; }
#app.home.mood-comfort { background: radial-gradient(125% 95% at 50% 34%, #2E1B28 0%, #1C1422 55%, #140E1A 100%); }
#app.home.mood-celebrate { background: radial-gradient(125% 95% at 50% 34%, #33231F 0%, #1C1422 55%, #140E1A 100%); }

/* celebration sparks (JS-spawned), reuse the existing burst machinery colors */
.pong-spark { position: fixed; width: 8px; height: 8px; border-radius: 50%; z-index: 1250; pointer-events: none; animation: pong-fling .8s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes pong-fling { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx),var(--dy)) scale(.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #pong, #pong-body, #pong-aura, #pong.pong--greet #pong-body, #pong.pong--celebrate #pong-body, #pong.pong--think #pong-five { animation: none !important; }
}

/* ======================= CODE SECTION — dedicated coding surface ======================= */
/* Topbar tab switch (Ask / Code) */
.tabswitch { display: inline-flex; gap: 2px; padding: 3px; margin-left: 14px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 999px; }
.tabswitch .tab { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 13px/1 inherit; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.tabswitch .tab:hover { color: var(--ink); }
.tabswitch .tab.on { background: var(--bg); color: var(--accent-2); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
@media (max-width: 560px) { .tabswitch { margin-left: 8px; } .tabswitch .tab { padding: 6px 11px; } }

/* In code mode, the chat surfaces step aside (topbar stays) */
body.code-mode #transcript, body.code-mode #composer, body.code-mode #attachments, body.code-mode .voice-fab, body.code-mode #pongStage { display: none !important; }
body.code-mode #app.home { background: var(--bg); }

#codeView { max-width: 880px; margin: 0 auto; padding: 22px 18px 120px; }
#codeView[hidden] { display: none; }
.code-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.code-title { font: 700 26px/1.1 var(--display, inherit); color: var(--ink); letter-spacing: -0.01em; }
.code-sub { margin-top: 4px; color: var(--ink-2); font-size: 14px; max-width: 620px; }
.code-pill { flex: none; appearance: none; border: 1px solid var(--coral-line); background: var(--coral-soft2); color: var(--coral-ink); font: 700 11px/1 inherit; letter-spacing: .04em; padding: 7px 11px; border-radius: 999px; cursor: pointer; }

.code-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.code-mode-btn { appearance: none; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink-2); font: 600 13px/1 inherit; padding: 8px 13px; border-radius: 10px; cursor: pointer; transition: all .15s; }
.code-mode-btn:hover { border-color: var(--coral-line); color: var(--ink); }
.code-mode-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(196,98,63,.25); }
.code-mode-hint { color: var(--ink-3); font-size: 12.5px; margin: 2px 2px 16px; }

.code-thread { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.code-empty { color: var(--ink-3); font-size: 14px; padding: 28px 6px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--accent-soft); }
.code-user { display: flex; align-items: flex-start; gap: 8px; justify-content: flex-end; }
.code-user-body { background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 14.5px; white-space: pre-wrap; max-width: 80%; }
.code-bot { border: 1px solid var(--border); background: var(--card, #fff); border-radius: 14px; padding: 14px 16px; }
.code-bot-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-size: 13.5px; margin-bottom: 8px; }
.code-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.code-phase { margin-left: 8px; font-weight: 500; font-size: 12px; color: var(--accent-2); }
.code-bot-body { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.code-think { color: var(--ink-3); font-style: italic; }
.code-msg-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.code-composer-wrap { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--bg) 22%); padding-top: 14px; }
.code-field-wrap { margin-bottom: 8px; }
.code-field-label { display: block; font: 600 11.5px/1 inherit; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 2px 4px; }
.code-field, .code-input, .code-lang-in { width: 100%; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card, #fff); color: var(--ink); font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 11px 13px; resize: vertical; }
.code-input { font-family: inherit; font-size: 15px; }
.code-lang-in { font-family: inherit; margin-bottom: 8px; padding: 8px 12px; }
.code-field:focus, .code-input:focus, .code-lang-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.code-composer { display: flex; gap: 8px; align-items: flex-end; }
.code-composer .code-input { flex: 1; }
.code-send { flex: none; appearance: none; border: 0; background: var(--accent); color: #fff; font: 700 14px/1 inherit; padding: 13px 18px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.code-send:hover { background: var(--accent-2); }
.code-send.stopping { background: #c0392b; }
.code-send.stopping:hover { background: #a93226; }

.code-upsell { border: 1px solid var(--coral-line); background: var(--coral-soft2); border-radius: 12px; padding: 16px; }
.code-upsell-head { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.code-upsell-text { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.code-upsell-btn { appearance: none; border: 0; background: var(--accent); color: #fff; font: 700 13px/1 inherit; padding: 10px 16px; border-radius: 10px; cursor: pointer; }

/* ======================= CODE — Claude-Code-style IDE layout ======================= */
/* Full-bleed IDE: overrides the earlier centered card layout. */
#codeView { max-width: none; margin: 0; padding: 0; height: calc(100vh - 58px); display: flex; flex-direction: column; overflow: hidden; }

.code-topbar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg); flex: none; }
.code-brandrow { display: flex; align-items: baseline; gap: 8px; }
.code-logo { font: 700 14px/1 ui-monospace, monospace; color: var(--accent); }
.code-topbar .code-title { font: 700 16px/1 inherit; color: var(--ink); }
.code-tagline { font-size: 12px; color: var(--ink-3); }
.code-repo-btn { display: inline-flex; align-items: center; gap: 7px; margin-left: 6px; border: 1px solid var(--line-2); background: var(--card,#fff); color: var(--ink-2); font: 600 12.5px/1 ui-monospace, monospace; padding: 7px 11px; border-radius: 9px; cursor: pointer; }
.code-repo-btn:hover { border-color: var(--coral-line); color: var(--ink); }
/* (repo button shows its label only — the earlier glyph hack leaked literal chars) */
.code-repo-caret { color: var(--ink-3); }
.code-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.code-sandbox-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-4); box-shadow: 0 0 0 3px var(--accent-soft); }
.code-sandbox-dot.on { background: #3a9d78; box-shadow: 0 0 0 3px #d9efe5; }

.code-main { flex: 1; display: flex; min-height: 0; }
.code-agent { width: 42%; min-width: 340px; max-width: 600px; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); }
.code-ws { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--accent-soft); }

/* agent thread + composer fill the left pane */
.code-thread { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.code-empty { text-align: center; margin: auto; padding: 24px; color: var(--ink-3); }
.code-empty-mark { font: 700 26px/1 ui-monospace, monospace; color: var(--accent); opacity: .6; }
.code-empty-head { font: 700 18px/1.2 inherit; color: var(--ink); margin: 12px 0 6px; }
.code-empty-sub { font-size: 13.5px; max-width: 320px; margin: 0 auto; }
.code-composer-wrap { position: static; background: var(--bg); border-top: 1px solid var(--border); padding: 10px 12px 12px; }
.code-modes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.code-mode-btn { padding: 6px 11px; font-size: 12.5px; }

/* workspace tabs + body */
.code-ws-tabs { display: flex; gap: 2px; padding: 6px 8px 0; flex: none; border-bottom: 1px solid var(--border); background: var(--bg); }
.code-ws-tab { display: inline-flex; align-items: center; gap: 6px; appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-3); font: 600 12.5px/1 inherit; padding: 9px 13px; cursor: pointer; }
.code-ws-tab:hover { color: var(--ink-2); }
.code-ws-tab.on { color: var(--accent-2); border-bottom-color: var(--accent); }
.code-ws-ic { font-size: 12px; opacity: .8; }
.code-ws-body { flex: 1; overflow: auto; min-height: 0; }
.code-ws-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; }
.code-ws-empty-ic { font-size: 30px; opacity: .55; }
.code-ws-empty-head { font: 700 16px/1.2 inherit; color: var(--ink); margin: 12px 0 6px; }
.code-ws-empty-sub { font-size: 13px; color: var(--ink-2); max-width: 360px; line-height: 1.55; }
.code-connect-btn { margin-top: 16px; appearance: none; border: 0; background: var(--ink); color: var(--bg); font: 700 13px/1 inherit; padding: 11px 18px; border-radius: 10px; cursor: pointer; }
.code-connect-btn:hover { background: #000; }

/* file tree */
.code-tree { padding: 8px 6px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-tree-loading { padding: 14px; color: var(--ink-3); }
.code-tree-row { display: flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.code-tree-row:hover { background: var(--card,#fff); color: var(--ink); }
.code-tree-row.on { background: var(--card,#fff); color: var(--accent-2); }
.code-tree-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* editor + artifact preview */
.code-editor { height: 100%; display: flex; flex-direction: column; background: var(--card,#fff); }
.code-editor-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border); font: 600 12.5px/1 ui-monospace, monospace; color: var(--ink-2); flex: none; }
.code-editor-bar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-art-toggle { display: inline-flex; gap: 2px; margin-left: auto; background: var(--accent-soft); border-radius: 7px; padding: 2px; }
.code-art-tab { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 11.5px/1 inherit; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.code-art-tab.on { background: var(--card,#fff); color: var(--accent-2); }
.code-editor-pre { flex: 1; overflow: auto; margin: 0; padding: 14px 16px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card,#fff); color: var(--ink); }
.code-art-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* terminal — dark, like a real shell */
.code-terminal { height: 100%; background: #161310; }
.code-term-out { height: 100%; overflow: auto; padding: 12px 14px; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d8d2c4; }
.code-term-idle { color: #8a8170; }
.code-term-line { white-space: pre-wrap; }
.code-term-line.sys { color: #c4934f; }
.code-term-line.err { color: #e07a5f; }

/* repo picker + tree head + terminal input + cited files */
.code-repo-list { padding: 10px 8px; }
.code-repo-list-head { font: 600 12px/1.2 inherit; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px 8px; }
.code-repo-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: 13px/1.3 ui-monospace, monospace; color: var(--ink-2); }
.code-repo-row:hover { background: var(--card,#fff); color: var(--ink); }
.code-repo-branch { margin-left: auto; font-size: 11px; color: var(--ink-3); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px; }
.code-tree-repohead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font: 600 12px/1.3 ui-monospace, monospace; color: var(--ink-2); }
.code-tree-switch { appearance: none; border: 1px solid var(--line-2); background: var(--card,#fff); color: var(--ink-3); font: 600 10.5px/1 inherit; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.code-term-input { width: 100%; box-sizing: border-box; border: 0; border-top: 1px solid #2a2620; background: #0f0d0b; color: #d8d2c4; font: 12.5px/1.5 ui-monospace, monospace; padding: 9px 14px; outline: none; }
.code-term-input::placeholder { color: #6b6353; }
.code-cited { margin-top: 8px; font: 12px/1.4 ui-monospace, monospace; color: var(--ink-3); background: var(--accent-soft); padding: 6px 10px; border-radius: 8px; }

/* Integrated Terminal + MCP tools drawer (docked above the composer) */
.code-term-toggle { display: inline-flex; align-items: center; gap: 5px; appearance: none; border: 1px solid var(--line, var(--border)); background: var(--card, #fff); color: var(--ink-2); font: 600 12px/1 inherit; padding: 7px 11px; border-radius: 9px; cursor: pointer; }
.code-term-toggle:hover { border-color: var(--coral-line, var(--accent)); color: var(--ink); }
.code-term-toggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.code-drawer { flex: none; height: 38vh; min-height: 200px; display: flex; flex-direction: column; border-top: 1px solid #2a2620; background: #161310; }
.code-drawer-head { display: flex; align-items: center; gap: 4px; padding: 5px 10px; background: #0f0d0b; border-bottom: 1px solid #2a2620; }
.code-drawer-tab { appearance: none; border: 0; background: transparent; color: #8a8170; font: 600 12px/1 inherit; padding: 7px 11px; border-radius: 7px; cursor: pointer; }
.code-drawer-tab:hover { color: #d8d2c4; }
.code-drawer-tab.on { color: #f0e9da; background: #262019; }
.code-drawer-sp { margin-left: auto; }
.code-drawer-x { appearance: none; border: 0; background: transparent; color: #8a8170; font-size: 14px; cursor: pointer; padding: 4px 8px; }
.code-drawer-x:hover { color: #e07a5f; }
.code-drawer-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.code-drawer .code-terminal { display: flex; flex-direction: column; height: 100%; }
.code-drawer .code-term-out { flex: 1; height: auto; min-height: 0; }
.code-tools { flex: 1; overflow: auto; padding: 10px 14px; color: #d8d2c4; font-size: 12.5px; }
.code-tool-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #2a2620; }
.code-tool-meta { flex: 1; min-width: 0; }
.code-tool-name { font-weight: 700; color: #f0e9da; text-transform: capitalize; }
.code-tool-desc { color: #8a8170; font-size: 11.5px; margin-top: 2px; }
.code-tool-arg { background: #0f0d0b; border: 1px solid #2a2620; color: #d8d2c4; border-radius: 6px; padding: 6px 9px; font: 12px/1.2 ui-monospace, monospace; width: 200px; outline: none; }
.code-tool-arg:focus { border-color: var(--accent); }
.code-tool-arg:disabled { opacity: .5; }
.code-tool-run { flex: none; appearance: none; border: 0; background: var(--accent); color: #fff; font: 600 12px/1 inherit; padding: 8px 13px; border-radius: 7px; cursor: pointer; }
.code-tool-run:disabled { opacity: .4; cursor: default; }
.code-tools-foot { color: #6b6353; font-size: 11px; margin-top: 10px; }

/* "+" attach menu (Claude-style) + chips + plugins popover */
#codeView { position: relative; }
.code-composer { position: relative; }
.code-plus { flex: none; appearance: none; width: 38px; height: 38px; border: 1px solid var(--line-2); background: var(--card,#fff); color: var(--ink-2); font: 300 22px/1 inherit; border-radius: 11px; cursor: pointer; align-self: flex-end; }
.code-plus:hover { border-color: var(--coral-line); color: var(--accent-2); }
.code-plus-menu { position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 232px; background: var(--card,#fff); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 12px 32px rgba(40,30,20,.16); padding: 6px; z-index: 60; }
.code-plus-item { display: flex; align-items: center; gap: 11px; width: 100%; appearance: none; border: 0; background: transparent; color: var(--ink); font: 500 14px/1 inherit; padding: 10px 11px; border-radius: 8px; cursor: pointer; text-align: left; }
.code-plus-item:hover { background: var(--accent-soft); }
.code-plus-ic { width: 18px; text-align: center; }
.code-plus-label { flex: 1; }
.code-plus-sc { color: var(--ink-4); font-size: 12px; }
.code-attach-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid var(--coral-line); color: var(--ink-2); font: 500 12px/1 ui-monospace, monospace; padding: 5px 8px; border-radius: 8px; max-width: 240px; }
.code-chip > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-chip-x { appearance: none; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 12px; padding: 0; }
.code-plugins-pop { position: absolute; left: 16px; bottom: 124px; width: 320px; max-width: calc(100% - 32px); background: var(--card,#fff); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 16px 40px rgba(40,30,20,.18); padding: 12px; z-index: 60; }
.code-plugins-head { font: 700 13px/1 inherit; color: var(--ink); margin-bottom: 8px; }
.code-plugin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }
.code-plugin-row:first-of-type { border-top: 0; }
.code-plugin-name { font: 600 13px/1.2 inherit; color: var(--ink); text-transform: capitalize; }
.code-plugin-desc { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.code-plugin-on { font: 600 11px/1 inherit; color: #3a9d78; }
.code-plugin-btn { appearance: none; border: 1px solid var(--coral-line); background: var(--coral-soft2); color: var(--coral-ink); font: 600 12px/1 inherit; padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.code-plugins-foot { font-size: 11px; color: var(--ink-4); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ===== Full-width bottom composer (Claude-Code style) + coding-model selector ===== */
.code-composer-wrap { position: relative; border-top: 1px solid var(--border); background: var(--bg); padding: 12px 16px 14px; }
.code-composer-wrap > .code-attach-chips, .code-input-shell, .code-composer-meta { max-width: 1080px; margin-left: auto; margin-right: auto; }
.code-input-shell { position: relative; display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--line-2); background: var(--card,#fff); border-radius: 16px; padding: 6px 6px 6px 16px; box-shadow: 0 2px 10px rgba(40,30,20,.05); }
.code-input-shell:focus-within { border-color: var(--coral-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.code-input-shell .code-input { flex: 1; border: 0; background: transparent; resize: none; outline: none; box-shadow: none; padding: 9px 0; max-height: 220px; font-family: inherit; font-size: 15px; }
.code-input-shell .code-send { flex: none; width: 34px; height: 34px; padding: 0; border-radius: 10px; font-size: 17px; line-height: 1; }
.code-composer-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.code-meta-left { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.code-meta-right { position: relative; display: flex; align-items: center; gap: 8px; }
.code-meta-left .code-modes { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.code-meta-left .code-modes::-webkit-scrollbar { display: none; }
.code-meta-left .code-mode-btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.code-plus { width: 32px; height: 32px; font-size: 20px; align-self: center; border-radius: 9px; }
.code-plus-menu { bottom: calc(100% + 10px); left: 0; }
.code-model-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--card,#fff); color: var(--ink-2); font: 600 12.5px/1 inherit; padding: 8px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.code-model-btn:hover { border-color: var(--coral-line); color: var(--ink); }
.code-model-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.code-model-caret { color: var(--ink-3); font-size: 10px; }
.code-model-menu { position: absolute; bottom: calc(100% + 10px); right: 0; min-width: 252px; background: var(--card,#fff); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 12px 32px rgba(40,30,20,.16); padding: 6px; z-index: 60; }
.code-model-menu-head { font: 600 11px/1 inherit; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px 8px; }
.code-model-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; appearance: none; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.code-model-item:hover, .code-model-item.on { background: var(--accent-soft); }
.code-model-item.locked { opacity: .62; }
.code-model-label { font: 600 13px/1.2 inherit; color: var(--ink); }
.code-model-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.code-model-check { color: var(--accent-2); font-weight: 700; }
.code-model-lock { font-size: 10.5px; color: var(--ink-4); text-transform: capitalize; }
@media (max-width: 820px) { .code-meta-left .code-modes { max-width: 46vw; } }

/* ===== Single-column conversation — code renders INLINE (Claude-Code style, no side panel) ===== */
.code-agent { width: auto; max-width: none; min-width: 0; flex: 1; border-right: 0; min-height: 0; }
.code-thread { max-width: 820px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.code-composer-wrap > .code-attach-chips, .code-input-shell, .code-composer-meta { max-width: 820px; }
/* inline artifact card (lives inside the assistant message) */
.code-artcard { margin-top: 10px; border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; background: var(--card,#fff); }
.code-artcard-bar { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 12px; border-bottom: 1px solid var(--border); background: var(--accent-soft); font: 600 12.5px/1 inherit; color: var(--ink-2); }
.code-artcard-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.code-artcard-status { color: var(--accent-2); font-weight: 500; }
.code-artcard-tabs { display: inline-flex; gap: 2px; margin-left: auto; background: var(--card,#fff); border-radius: 7px; padding: 2px; }
.code-artcard-tools { display: inline-flex; gap: 4px; align-items: center; }
.code-artcard-body { max-height: 460px; overflow: auto; }
.code-artcard-pre { margin: 0; padding: 12px 14px; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: auto; }
.code-artcard-frame { width: 100%; height: 420px; border: 0; background: #fff; display: block; }
.code-repo-pick { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.code-repo-pick:hover { background: var(--accent-soft); }
/* visible toast (banner() goes to the hidden #transcript in code-mode) */
.code-toast { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%) translateY(8px); max-width: 540px; background: var(--ink); color: var(--bg); font: 500 13.5px/1.45 inherit; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(40,30,20,.22); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; text-align: center; }
.code-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.code-toast.err { background: var(--accent-2); }

@media (max-width: 820px) {
  #codeView { height: calc(100vh - 52px); }
  .code-main { flex-direction: column; }
  .code-agent { width: auto; max-width: none; min-width: 0; border-right: 0; border-bottom: 1px solid var(--border); height: 55%; }
  .code-ws { min-height: 0; }
}

/* Private-beta login wall — full-screen, non-dismissible, login-only */
.beta-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--bg, #faf8f3); padding: 24px; }
.beta-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line, #e7e2d8); border-radius: 18px; padding: 34px 28px; box-shadow: 0 24px 60px rgba(40,35,25,.12); text-align: center; }
.beta-mark { font-size: 34px; line-height: 1; }
.beta-name { font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin-top: 4px; color: var(--ink, #26241f); }
.beta-tag { display: inline-block; margin-top: 8px; font: 600 11px/1 var(--mono, ui-monospace, monospace); letter-spacing: .18em; text-transform: uppercase; color: #c4634a; background: color-mix(in srgb, #c4634a 12%, transparent); border-radius: 999px; padding: 5px 11px; }
.beta-sub { color: var(--ink-2, #5b574e); font-size: 14.5px; line-height: 1.5; margin: 16px 0 18px; }
.beta-in { width: 100%; box-sizing: border-box; border: 1px solid var(--line, #e7e2d8); border-radius: 11px; padding: 12px 14px; font-size: 15px; margin-bottom: 10px; background: #fcfbf8; }
.beta-in:focus { outline: none; border-color: #c4634a; box-shadow: 0 0 0 3px rgba(196,99,74,.14); }
.beta-go { width: 100%; border: 0; background: #c4634a; color: #fff; font-weight: 700; font-size: 15px; padding: 12px; border-radius: 11px; cursor: pointer; margin-top: 4px; }
.beta-go:hover { background: #a93226; }
.beta-go:disabled { opacity: .6; cursor: default; }
.beta-err { color: #c0392b; font-size: 13px; min-height: 16px; margin-bottom: 6px; }
.beta-foot { color: var(--ink-3, #8a857a); font-size: 12px; margin-top: 16px; }
