/* Mahfoof Monitor. Tokens and layout follow docs/monitor-ui-spec.md.
   Logical properties only, so the Arabic interface mirrors without special cases. */

:root {
  color-scheme: dark;
  --bg: #141210;
  --surface: #1c1916;
  --surface-2: #26221e;
  --line: #3a342e;
  --line-2: #4d453d;
  --ink: #fff5ec;
  --ink-2: #d9cfc4;
  --ink-3: #a89c90;
  --brand: #c42414;
  --brand-ink: #ffffff;
  --brand-hi: #ef5a4a;
  --tan: #cea06e;
  --tan-fill: #cea06e;
  --tan-ink: #1a140e;
  --warn: #e3a13a;
  --focus: #fff5ec;

  --map-sea: #151210;
  --map-land: #2a2521;
  --map-border: #4a423a;
  --map-tracked: color-mix(in srgb, var(--tan) 16%, #2a2521);
  --map-selected: color-mix(in srgb, var(--tan) 38%, #2a2521);
  --warn-tint: color-mix(in srgb, var(--warn) 13%, var(--bg));
  --warn-line: color-mix(in srgb, var(--warn) 38%, var(--bg));
  --hi: color-mix(in srgb, var(--tan) 16%, var(--surface));
  --dot-fill: var(--tan-fill);
  --dot-ink: var(--tan-ink);

  --r-control: 6px;
  --r-panel: 10px;
  --r-pill: 999px;
  --bar-h: 56px;
  --gutter: 24px;
  --page-max: 1600px;

  --t-xs: 12px;
  --t-sm: 13px;
  --t-ui: 14px;
  --t-md: 16px;
  --t-lg: 19px;
  --t-xl: 23px;
  --t-2xl: 28px;
  --lh-ui: 1.45;
  --lh-ar: 1.7;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 180ms;
  --shadow-sheet: 0 8px 24px rgb(0 0 0 / .35);
  --z-sticky: 10;
  --z-menu: 20;
  --z-sheet: 30;
  --z-toast: 40;
  --z-tooltip: 50;
  --dir-sign: 1;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfaf9;
  --surface: #ffffff;
  --surface-2: #f3efeb;
  --line: #e3ddd6;
  --line-2: #cbc2b8;
  --ink: #1b1512;
  --ink-2: #4a403a;
  --ink-3: #6e635b;
  --brand: #c42414;
  --brand-ink: #ffffff;
  --brand-hi: #b01f10;
  --tan: #8a5f2c;
  --tan-fill: #f0e2d0;
  --tan-ink: #3d2a12;
  --warn: #9a5b00;
  --focus: #1b1512;
  --map-sea: #fbfaf8;
  --map-land: #e6ded5;
  --map-border: #cdc1b4;
  --map-tracked: color-mix(in srgb, #cea06e 38%, #e6ded5);
  --map-selected: color-mix(in srgb, #cea06e 70%, #e6ded5);
  --dot-fill: #8a5f2c;
  --dot-ink: #ffffff;
  --warn-tint: #fbf1e1;
  --warn-line: #ecd3a8;
  --hi: #f6ecdf;
  --shadow-sheet: 0 8px 24px rgb(40 24 12 / .16);
}

:root[lang="ar"] {
  --t-xs: 13px;
  --t-sm: 14px;
  --t-ui: 16px;
  --lh-ui: 1.6;
}
:root[dir="rtl"] { --dir-sign: -1; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "SF Arabic", "Geeza Pro", system-ui, sans-serif;
  font-size: var(--t-ui);
  line-height: var(--lh-ui);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: start; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg.icon { flex: none; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num, time, .tabular { font-variant-numeric: tabular-nums; }
[dir="rtl"] { unicode-bidi: isolate; letter-spacing: 0; }
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.flip-rtl { transform: scaleX(var(--dir-sign)); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: var(--z-tooltip);
  background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--r-control);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------------ header */
.bar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--brand); color: var(--brand-ink);
}
.bar::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 8px; height: 1px;
  background: rgba(255, 255, 255, .35); pointer-events: none;
}
.bar :focus-visible { outline-color: #fff; }
.bar-row { height: var(--bar-h); display: flex; align-items: center; gap: 20px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; min-width: 0; }
.brand-mark { height: 28px; width: auto; }
.brand-text { font-size: 21px; font-weight: 600; line-height: 1; padding-block-end: 2px; }
.brand-div { width: 1px; height: 22px; background: rgba(255, 255, 255, .5); }
.brand-product { font-size: var(--t-md); font-weight: 500; letter-spacing: 0; }

.tabs { display: flex; align-items: stretch; height: 100%; gap: 4px; }
.tab {
  position: relative; display: flex; align-items: center; padding-inline: 12px;
  font-size: var(--t-ui); font-weight: 500; color: rgba(255, 255, 255, .86);
  transition: color var(--dur) var(--ease);
}
.tab:hover { color: #fff; }
/* "Episodes" is a real link to /room/, styled like the tabs beside it. */
.room-link { text-decoration: none; }
.tab[aria-current="page"] { color: #fff; font-weight: 600; }
.tab[aria-current="page"]::after {
  content: ""; position: absolute; inset-inline: 8px; bottom: 7px; height: 3px;
  background: #fff; border-radius: 2px;
}

.live {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  padding: 5px 12px 5px 10px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .42); font-size: var(--t-sm); white-space: nowrap;
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; }
.live[data-state="ok"] .live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #fff;
  opacity: 0; animation: pulse 2.4s var(--ease) infinite;
}
.live[data-state="stale"] .live-dot, .live[data-state="never"] .live-dot { background: transparent; border: 2px solid #fff; }
.live[data-state="running"] .live-dot {
  background: transparent; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin 900ms linear infinite; width: 12px; height: 12px;
}
.live-word { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
:root[lang="ar"] .live-word { letter-spacing: 0; text-transform: none; font-size: var(--t-sm); }
.live-text { color: #fff; overflow: hidden; text-overflow: ellipsis; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.seg-bar { display: inline-flex; border: 1px solid rgba(255, 255, 255, .45); border-radius: var(--r-control); overflow: hidden; }
.seg-bar button {
  height: 32px; padding-inline: 10px; font-size: var(--t-sm); font-weight: 500; color: #fff;
  transition: background var(--dur) var(--ease);
}
.seg-bar button[aria-pressed="true"] { background: #fff; color: var(--brand); font-weight: 600; }
.seg-bar button:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .14); }
.icon-btn-bar {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-control); color: #fff;
  transition: background var(--dur) var(--ease);
}
.icon-btn-bar:hover { background: rgba(255, 255, 255, .14); }
.icon-btn-bar:active { background: rgba(255, 255, 255, .22); }
.ask-btn {
  height: 36px; display: inline-flex; align-items: center; gap: 8px; padding-inline: 14px;
  background: #fff; color: var(--brand); border-radius: var(--r-control); font-weight: 600;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.ask-btn:hover { background: #fff5ec; }
.ask-btn:active { transform: translateY(1px); }
.menu-btn { display: none; }
.bar-menu {
  position: absolute; inset-inline: 0; top: 100%; z-index: var(--z-menu);
  background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sheet); padding: 8px var(--gutter) 16px;
}
.bar-menu nav { display: grid; }
.bar-menu .menu-tab {
  min-height: 48px; display: flex; align-items: center; font-size: var(--t-md); font-weight: 500;
  border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.bar-menu .menu-tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.bar-menu .menu-tab[aria-current="page"]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-hi); margin-inline-end: 10px;
}
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.menu-label { color: var(--ink-3); font-size: var(--t-sm); }

/* ------------------------------------------------------------------ banners and toolbar */
.demo-banner { background: var(--warn-tint); border-bottom: 1px solid var(--warn-line); }
.demo-banner .wrap { display: flex; align-items: center; gap: 10px; min-height: 40px; padding-block: 8px; font-size: var(--t-sm); }
.demo-banner .icon { color: var(--warn); }
.demo-banner strong { font-weight: 600; }

.toolbar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 14px 12px; min-width: 0; }
.chips-scroll { position: relative; min-width: 0; display: flex; align-items: center; gap: 10px; }
.seg {
  display: inline-flex; flex: none; padding: 3px; gap: 2px; border: 1px solid var(--line);
  border-radius: calc(var(--r-control) + 3px); background: var(--surface);
}
.seg button {
  height: 30px; padding-inline: 12px; border-radius: var(--r-control); white-space: nowrap;
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-2);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg button:hover { color: var(--ink); background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.seg button:active { transform: translateY(1px); }
.geo-chip {
  flex: none; height: 32px; display: inline-flex; align-items: center; gap: 6px; padding-inline: 12px 8px;
  border-radius: var(--r-pill); background: var(--tan-fill); color: var(--tan-ink); font-weight: 600; font-size: var(--t-sm);
}
.geo-chip:hover { filter: brightness(1.05); }
.toolbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.asof { font-size: var(--t-sm); color: var(--warn); display: inline-flex; align-items: center; gap: 6px; }
.text-btn {
  height: 32px; display: inline-flex; align-items: center; gap: 6px; padding-inline: 10px;
  border-radius: var(--r-control); color: var(--ink-2); font-weight: 500; font-size: var(--t-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.text-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.text-btn:disabled { color: var(--ink-3); opacity: .75; }
.text-btn.is-busy .icon { animation: spin 1s linear infinite; }

/* ------------------------------------------------------------------ main + panels */
main { padding-block: 4px 32px; min-width: 0; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 8px 16px; }
.view-title { font-size: var(--t-xl); font-weight: 600; line-height: 1.2; }
.view-note { color: var(--ink-3); font-size: var(--t-sm); max-width: 72ch; margin-top: 4px; }

.ov {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas: "map map map map rise rise" "eps eps news news log log";
}
.ov.with-first { grid-template-areas: "first first first first first first" "map map map map rise rise" "eps eps news news log log"; }
.ov > .first-run { grid-area: first; }
.ov > .p-map { grid-area: map; }
.ov > .p-rise { grid-area: rise; }
.ov > .p-eps { grid-area: eps; }
.ov > .p-news { grid-area: news; }
.ov > .p-log { grid-area: log; }
.ov > .p-eps, .ov > .p-news, .ov > .p-log { align-self: start; }
@media (min-width: 1200px) {
  /* Rising now takes the map panel's height and scrolls inside it. */
  .ov > .p-rise { height: 0; min-height: 100%; }
  .ov > .p-rise .panel-body { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
}

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  min-width: 0; display: flex; flex-direction: column;
}
.panel-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.panel-head-text { flex: 1; min-width: 0; }
.panel-title { font-size: var(--t-md); font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.panel-note { color: var(--ink-3); font-size: var(--t-sm); margin-top: 2px; }
.panel-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: var(--r-control); color: var(--ink-3);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.panel-info { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-sm); }
.panel-info p + p { margin-top: 6px; }
.panel-body { flex: 1; min-width: 0; }
.panel-foot { padding: 10px 16px 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-size: var(--t-sm);
  text-decoration: none; border-radius: 4px; padding-block: 4px;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn .icon { color: var(--ink-3); }
.muted { color: var(--ink-3); }
.warn-text { color: var(--warn); }

/* rows */
.rows > li + li { border-top: 1px solid var(--line); }
.row-btn {
  display: block; width: 100%; padding: 12px 16px; color: inherit; text-decoration: none;
  transition: background var(--dur) var(--ease);
}
.row-btn:hover { background: var(--surface-2); }
.row-btn:focus-visible { outline-offset: -2px; }
.c-title { font-size: 15px; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
.c-title[dir="rtl"] { line-height: var(--lh-ar); }
.c-title-lg { font-size: var(--t-md); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.c-title-lg[dir="rtl"] { line-height: var(--lh-ar); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: var(--t-xs); color: var(--ink-3); margin-top: 4px; }
.meta .sep { color: var(--line-2); }

.is-new { animation: arrive 1.2s var(--ease) 1; }
@keyframes arrive { from { background: var(--hi); } to { background: transparent; } }

/* signal chips */
.signals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.sig {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding-inline: 8px;
  border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-xs); font-weight: 500;
  white-space: nowrap;
}
.sig .icon { color: var(--ink-3); }
.sig b { font-weight: 600; color: var(--ink); }
.since { font-size: var(--t-xs); color: var(--ink-3); margin-inline-start: 2px; white-space: nowrap; }

/* momentum chips */
.mchip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding-inline: 8px;
  border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--ink-2); background: transparent;
}
.mchip[data-label="well_above"] { background: var(--tan-fill); border-color: var(--tan-fill); color: var(--tan-ink); }
.mchip[data-label="above"], .mchip[data-label="fast_start"] { border-color: var(--tan); color: var(--tan); }
.mchip[data-label="below"] { border-color: var(--ink-3); color: var(--ink-3); font-weight: 500; }
.mchip[data-label="early"], .mchip[data-label="no_baseline"] { border-style: dashed; color: var(--ink-3); font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; height: 18px; padding-inline: 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1;
}
:root[lang="ar"] .badge { font-size: 12px; }
.badge-own { background: var(--brand); color: var(--brand-ink); }
.badge-watch { border: 1px dashed var(--line-2); color: var(--ink-3); }
.badge-brief { background: var(--tan-fill); color: var(--tan-ink); }
.badge-question { border: 1px solid var(--line-2); color: var(--ink-2); }
.badge-changes { border: 1px solid var(--line); color: var(--ink-3); }
.badge-interp { border: 1px solid var(--line-2); color: var(--ink-3); font-weight: 500; }
.badge-uncited { border: 1px dashed var(--warn); color: var(--warn); font-weight: 500; }

/* episodes */
.ep { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.ep-row { position: relative; }
.ep-row .row-btn { padding-inline-end: 44px; }
.ep-ext {
  position: absolute; top: 10px; inset-inline-end: 8px; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-control); color: var(--ink-3);
}
.ep-ext:hover { background: var(--line); color: var(--ink); }
.thumb {
  width: 112px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-2);
  position: relative; flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph {
  position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 20px;
  color: var(--tan); background: color-mix(in srgb, var(--tan) 14%, var(--surface-2));
}
.ep-body { min-width: 0; grid-column: 2 / 4; }
.ep-chan { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); min-width: 0; }
.ep-chan .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ep-chan.named .name { color: var(--tan); }
.ep .c-title { margin-top: 2px; }
.ep-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: var(--t-xs); color: var(--ink-3); }

/* news */
.news-row { display: flex; gap: 12px; align-items: flex-start; }
.news-row .news-main { flex: 1; min-width: 0; }
.news-row .icon.ext { color: var(--ink-3); margin-top: 4px; }
.feed-chips { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.feed-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 28px; padding-inline: 10px; border-radius: var(--r-pill); border: 1px solid var(--line);
  font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.chip:active { transform: translateY(1px); }
.sport-chip { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.sport-chip::after { content: ""; position: absolute; inset: -4px; } /* 44px touch target, same look */
.sport-chip .num { font-weight: 600; color: var(--ink); }
.sport-chip[aria-pressed="true"] .num { color: inherit; }
.sport-note { color: var(--ink-3); font-size: var(--t-xs); }
.inline-btn {
  position: relative; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--line-2); border-radius: 4px; padding-block: 2px;
}
.inline-btn::after { content: ""; position: absolute; inset: -10px -6px; }
.inline-btn:hover { text-decoration-color: currentColor; }
.inline-btn:active { transform: translateY(1px); }

/* timeline */
.timeline { padding: 6px 0; }
.tl-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 10px 16px; position: relative; }
.tl-time { font-size: var(--t-xs); color: var(--ink-3); padding-top: 2px; white-space: nowrap; }
.tl-main { min-width: 0; position: relative; padding-inline-start: 16px; }
.tl-main::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-2);
}
.tl-main::after { content: ""; position: absolute; inset-inline-start: 3px; top: 18px; bottom: -18px; width: 1px; background: var(--line); }
.tl-item:last-child .tl-main::after { display: none; }
.tl-item[data-kind="brief"] .tl-main::before { background: var(--tan); }
.tl-item[data-kind="question"] .tl-main::before { background: var(--ink-2); }
.tl-title { font-size: var(--t-sm); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; min-width: 0; }
.tl-title .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-sub { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }

/* empty, error and first run */
.empty { padding: 20px 16px; color: var(--ink-2); font-size: var(--t-sm); display: flex; gap: 10px; align-items: flex-start; }
.empty .icon { color: var(--ink-3); margin-top: 2px; }
.empty.warn .icon { color: var(--warn); }
.empty p + p { margin-top: 4px; }
.first-run {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--surface);
}
.first-run p { flex: 1; min-width: 220px; font-size: var(--t-md); }
.btn {
  height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding-inline: 16px;
  border-radius: var(--r-control); font-weight: 600; font-size: var(--t-ui); white-space: nowrap;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
a.btn { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover:not(:disabled) { background: #b01f10; }
.btn-primary:disabled { opacity: .6; }
.btn-quiet { border: 1px solid var(--line-2); color: var(--ink); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); }
.more-btn { width: 100%; height: 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: var(--t-sm); text-align: center; }
.more-btn:hover { background: var(--surface-2); color: var(--ink); }

/* skeletons */
.sk-list { padding: 14px 16px 16px; display: grid; gap: 18px; }
.sk-row { display: block; }
.sk-row.media { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
.sk-lines { display: grid; gap: 8px; }
.sk.thumb { height: auto; aspect-ratio: 16 / 9; border-radius: 6px; }
.sk { display: block; height: 12px; border-radius: 4px; background: var(--surface-2); position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 7%, transparent), transparent);
  animation: shimmer 1.4s var(--ease) infinite;
}
.sk.w80 { width: 80%; } .sk.w60 { width: 60%; } .sk.w40 { width: 40%; } .sk.h20 { height: 20px; }
.sk-map { aspect-ratio: 1000 / 650; border-radius: 8px; height: auto; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ------------------------------------------------------------------ map */
.map-body { padding: 12px 16px 14px; }
.map-frame { position: relative; margin-inline: auto; width: 100%; }
.map-wrap { position: relative; width: 100%; aspect-ratio: 1000 / 650; direction: ltr; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; border-radius: 6px; }
.map-svg .sea { fill: var(--map-sea); }
.map-svg .land { fill: var(--map-land); stroke: var(--map-border); stroke-width: .7; vector-effect: non-scaling-stroke; }
.map-svg .land.tracked { fill: var(--map-tracked); cursor: pointer; transition: fill var(--dur) var(--ease); }
.map-svg .land.tracked:hover { fill: var(--map-selected); }
.map-svg .land.selected { fill: var(--map-selected); stroke: var(--tan); stroke-width: 1.5; }
.map-svg .leader { stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.map-svg .anchor { fill: var(--dot-fill); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.map-layer { position: absolute; inset: 0; pointer-events: none; }
.map-layer > * { pointer-events: auto; }
.callout {
  position: absolute; width: 20%; min-width: 0; padding: 7px 10px 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; text-align: start;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  box-shadow: 0 2px 6px rgb(0 0 0 / .18);
}
.callout:hover { border-color: var(--tan); }
.callout[aria-pressed="true"] { border-color: var(--tan); background: color-mix(in srgb, var(--tan) 10%, var(--surface)); }
.callout .co-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.callout .co-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callout .co-count { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.callout .co-num { display: none; }
.callout .co-trend { display: block; font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.callout .co-traffic { display: block; font-size: 12px; color: var(--ink-3); }
.callout .co-warn { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--warn); margin-top: 2px; line-height: 1.35; }
.callout .co-empty { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.map-frame.compact .callout {
  width: auto; padding: 2px 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px;
  box-shadow: none; min-height: 24px;
}
.map-frame.compact .callout .co-head { gap: 5px; }
.map-frame.compact .callout .co-name { font-size: 12px; }
.map-frame.compact .callout .co-count { display: none; }
.map-frame.compact .callout .co-num { display: inline; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.map-frame.compact .callout .co-trend, .map-frame.compact .callout .co-traffic,
.map-frame.compact .callout .co-empty, .map-frame.compact .callout .co-warn span { display: none; }
.map-frame.compact .callout .co-warn { margin: 0; }
.chan-dot {
  position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: var(--dot-fill); color: var(--dot-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--surface); line-height: 1;
}
.chan-dot.plain { width: 10px; height: 10px; margin: -5px 0 0 -5px; box-shadow: 0 0 0 2px var(--surface); }
button.chan-dot:hover { transform: scale(1.12); }
.map-frame.compact .chan-dot { width: 16px; height: 16px; margin: -8px 0 0 -8px; font-size: 10px; }
.map-frame.compact .chan-dot.plain { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.map-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: var(--t-xs); color: var(--ink-3); }
.map-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--map-tracked); border: 1px solid var(--map-border); }
.map-legend .sw-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot-fill); }
.region-strip { display: none; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.map-frame.compact + .region-strip { display: flex; }
.region-strip .chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; }
.region-strip .chip .icon { color: var(--warn); }
.region-detail { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.region-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface-2); }
.region-detail-head h3 { font-size: var(--t-ui); font-weight: 600; }
.trend-list > li + li { border-top: 1px solid var(--line); }
.trend-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; }
button.trend-row:hover { background: var(--surface-2); }
.trend-row .c-title { flex: 1; min-width: 0; }
.trend-row .traffic { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; }

/* ------------------------------------------------------------------ competitors, log and sources views */
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.table-panel { overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th {
  text-align: start; font-weight: 600; font-size: var(--t-xs); color: var(--ink-3); padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; transition: background var(--dur) var(--ease); }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.chan-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tan) 22%, var(--surface-2)); color: var(--tan); font-weight: 700; font-size: 15px;
}
.chan-open { display: block; min-width: 0; text-align: start; border-radius: 4px; }
.chan-open .name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--t-ui); color: var(--ink); }
.chan-open .name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-open.named .name span:first-child { color: var(--tan); }
.chan-open .handle { font-size: var(--t-xs); color: var(--ink-3); direction: ltr; unicode-bidi: isolate; }
.cell-latest .c-title { font-size: 14px; }
.status-ok { color: var(--ink-2); }
.status-failed { color: var(--warn); display: inline-flex; align-items: flex-start; gap: 5px; }
.status-never { color: var(--ink-3); }
.st {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
}
.st .icon { width: 15px; height: 15px; }
.st-ok { color: var(--ink-2); }
.st-ok .icon { color: var(--tan); }
.st-empty { color: var(--ink-3); }
.st-failed { color: var(--warn); }
.st-reason { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; max-width: 42ch; }

.log-layout { display: grid; gap: 16px; }
.day-group + .day-group { margin-top: 18px; }
.day-title { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); margin: 0 0 8px; }
.entry { border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry-btn { display: grid; grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 12px; width: 100%; padding: 14px 16px; align-items: start; }
.entry-btn > span:nth-child(2) { max-width: 76ch; }
.entry-detail > * { max-width: 76ch; }
.entry-btn:hover { background: var(--surface-2); }
.entry-btn .chev { color: var(--ink-3); transition: transform var(--dur) var(--ease); }
.entry-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.entry-title { font-size: var(--t-ui); font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.entry-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 3px; }
.entry-detail { padding: 0 16px 16px; padding-inline-start: 92px; display: grid; gap: 12px; }
.detail-block h4 { font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.detail-block li { font-size: var(--t-sm); color: var(--ink-2); padding-block: 3px; }
.detail-block a { color: var(--ink); text-underline-offset: 3px; }
.ref-list li { display: flex; align-items: flex-start; gap: 6px; }
.ref-list .icon { color: var(--ink-3); margin-top: 4px; }

.sources-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.sources-grid > .span-2 { grid-column: 1 / -1; }
.prose { padding: 14px 16px 16px; display: grid; gap: 10px; font-size: var(--t-ui); color: var(--ink-2); max-width: 78ch; }
.prose li { position: relative; padding-inline-start: 18px; }
.prose li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--tan); }
.gap-list li { padding: 12px 16px; display: flex; gap: 10px; font-size: var(--t-ui); color: var(--ink-2); }
.gap-list li + li { border-top: 1px solid var(--line); }
.gap-list .icon { color: var(--ink-3); margin-top: 3px; }
.run-line { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--t-sm); color: var(--ink-2); }
.run-line b { color: var(--ink); font-weight: 600; }
.url-cell { max-width: 280px; }
.url-cell a { font-size: var(--t-xs); color: var(--ink-3); direction: ltr; unicode-bidi: isolate; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; text-align: start; }
.url-cell a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); }

.foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: var(--t-xs); color: var(--ink-3); }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ------------------------------------------------------------------ sheet */
.sheet {
  position: fixed; top: var(--bar-h); bottom: 0; inset-inline-end: 0; z-index: var(--z-sheet);
  width: min(520px, 100vw); background: var(--surface); box-shadow: var(--shadow-sheet);
  display: flex; flex-direction: column; transform: translateX(calc(100% * var(--dir-sign)));
  transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); visibility: hidden;
}
.sheet.is-ask { width: min(560px, 100vw); }
.sheet.open { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-kicker { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; }
.sheet-title { font-size: var(--t-lg); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.sheet-title[dir="rtl"] { line-height: 1.6; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: grid; grid-auto-rows: max-content; gap: 18px; align-content: start; min-height: 0; }
.chan-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-weight: 600; border-radius: 4px; min-width: 0; }
.chan-link:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.chan-link .icon { color: var(--ink-3); }
.sheet-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-section h3 { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.reason { font-size: var(--t-md); color: var(--ink); }
.reason[dir="rtl"] { line-height: var(--lh-ar); }
.ev-list > li + li { border-top: 1px solid var(--line); }
.ev-row { display: flex; gap: 10px; align-items: flex-start; padding-block: 10px; text-decoration: none; color: inherit; }
.ev-row:hover .c-title { text-decoration: underline; text-underline-offset: 3px; }
.ev-row .icon.ext { color: var(--ink-3); margin-top: 4px; flex: none; }
.ev-row .grow { flex: 1; min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stat { background: var(--surface); padding: 10px 12px; }
.stat dt { font-size: var(--t-xs); color: var(--ink-3); }
.stat dd { font-size: var(--t-md); font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ep-hero { display: grid; gap: 12px; }
.ep-hero .thumb { width: 100%; border-radius: 8px; }
.ep-hero .thumb-ph { font-size: 56px; }
.sheet-foot .btn { padding-inline: 14px; }
.sentence { font-size: var(--t-md); color: var(--ink); }
.sentence[dir="rtl"] { line-height: var(--lh-ar); }
.sheet .rows { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }

/* ask */
.ask-context { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ask-context .sig { max-width: 100%; }
.ask-context .icon-btn { width: 20px; height: 20px; border-radius: 50%; margin-inline-end: -4px; }
.ask-context .sig span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ask-body { gap: 22px; }
.ask-intro { font-size: var(--t-md); color: var(--ink-2); }
.suggest { display: grid; gap: 8px; }
.suggest button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--ink); font-size: var(--t-ui); line-height: 1.45;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.suggest button:hover { background: var(--surface-2); border-color: var(--line-2); }
.suggest .icon { color: var(--ink-3); }
.qa { display: grid; gap: 14px; }
.qa + .qa { padding-top: 18px; border-top: 1px solid var(--line); }
.q-bubble {
  justify-self: end; max-width: 88%; background: var(--surface-2); border-radius: 10px; padding: 10px 12px;
  font-size: var(--t-ui); color: var(--ink); overflow-wrap: anywhere;
}
.ans { display: grid; gap: 16px; }
.ans-summary { font-size: var(--t-md); font-weight: 500; line-height: 1.6; color: var(--ink); }
.ans-summary[dir="auto"]:dir(rtl), .ans li:dir(rtl) { line-height: var(--lh-ar); }
.ans h4 { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.ans ul { display: grid; gap: 8px; }
.ans li { position: relative; padding-inline-start: 16px; font-size: var(--t-ui); color: var(--ink); line-height: 1.6; }
.ans li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.ans .interp li::before { background: transparent; border: 1px solid var(--ink-3); }
.cites { display: inline-flex; gap: 4px; margin-inline-start: 6px; vertical-align: 1px; flex-wrap: wrap; }
.cite {
  min-width: 26px; height: 20px; padding-inline: 5px; border-radius: 4px; font-size: 11px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); display: inline-grid; place-items: center;
  font-variant-numeric: tabular-nums; direction: ltr; line-height: 1;
}
.cite:hover, .cite[aria-expanded="true"] { background: var(--tan-fill); border-color: var(--tan-fill); color: var(--tan-ink); }
.ans .badge { margin-inline-start: 6px; vertical-align: 1px; }
.tech { border-top: 1px solid var(--line); padding-top: 10px; font-size: var(--t-xs); color: var(--ink-3); }
.tech summary { cursor: pointer; font-weight: 500; width: max-content; border-radius: 4px; }
.tech dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin-top: 8px; }
.tech dd { font-variant-numeric: tabular-nums; color: var(--ink-2); overflow-wrap: anywhere; }
.ans-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 8px; background: var(--warn-tint); border: 1px solid var(--warn-line); }
.ans-error .icon { color: var(--warn); margin-top: 2px; }
.ans-error p { font-size: var(--t-ui); color: var(--ink); }
.ans-error .btn { margin-top: 10px; height: 34px; }
.ans-loading { display: grid; gap: 10px; }
.ans-loading p { font-size: var(--t-sm); color: var(--ink-3); }
.composer { border-top: 1px solid var(--line); padding: 12px 16px 14px; background: var(--surface); }
.composer-box {
  display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
  padding: 6px 6px 6px 12px; padding-inline: 12px 6px; transition: border-color var(--dur) var(--ease);
}
.composer-box:focus-within { border-color: var(--ink-3); }
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; min-height: 36px; max-height: 160px;
  padding-block: 7px; font-size: var(--t-ui); line-height: 1.5; color: var(--ink);
}
.composer textarea::placeholder { color: var(--ink-3); opacity: 1; }
.send-btn {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--brand); color: #fff; transition: opacity var(--dur) var(--ease);
}
.send-btn:disabled { opacity: .45; }
.composer-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: var(--t-xs); color: var(--ink-3); }
.composer-meta .over { color: var(--warn); font-weight: 600; }

.cite-pop {
  position: fixed; z-index: var(--z-tooltip); width: min(320px, calc(100vw - 24px)); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; box-shadow: 0 6px 18px rgb(0 0 0 / .3);
  font-size: var(--t-sm);
}
.cite-pop .c-title { font-size: 14px; }
.cite-pop .meta { margin-top: 4px; }
.cite-pop .link-btn { margin-top: 6px; }

.toast {
  position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(calc(-50% * var(--dir-sign)));
  z-index: var(--z-toast); display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px;
  background: var(--ink); color: var(--bg); font-size: var(--t-sm); font-weight: 500; box-shadow: 0 6px 18px rgb(0 0 0 / .3);
  max-width: calc(100vw - 32px);
}
.toast[hidden] { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1199px) {
  .ov {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "map map" "rise rise" "eps news" "log log";
  }
  .ov.with-first { grid-template-areas: "first first" "map map" "rise rise" "eps news" "log log"; }
  .p-map .map-frame { max-width: calc(360px * 1000 / 650); }
  .tab { padding-inline: 9px; }
  .bar-row { gap: 14px; }
  .sources-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .p-map .map-body { display: grid; grid-template-columns: minmax(0, 554px) minmax(0, 1fr); column-gap: 20px; align-items: start; }
  .p-map .map-frame { grid-row: 1 / span 3; max-width: none; }
  .p-map .region-strip { flex-direction: column; flex-wrap: nowrap; margin-top: 0; }
  .p-map .region-strip .chip { justify-content: space-between; height: 38px; font-size: var(--t-sm); }
  .p-map .region-detail { margin-top: 12px; }
}
@media (max-width: 1080px) {
  .live-text { max-width: 170px; }
}
@media (max-width: 899px) {
  :root { --gutter: 16px; }
  .ov, .ov.with-first { grid-template-columns: minmax(0, 1fr); }
  .ov { grid-template-areas: "rise" "map" "eps" "news" "log"; }
  .ov.with-first { grid-template-areas: "first" "rise" "map" "eps" "news" "log"; }
  .p-map .map-frame { max-width: calc(260px * 1000 / 650); }
  .tabs, .bar-end .seg-bar, .bar-end .theme-btn, .live-text, .live-word, .brand-product, .brand-div { display: none; }
  .menu-btn { display: inline-grid; }
  .live { padding: 0; border: 0; width: 44px; height: 44px; justify-content: center; }
  .live[data-state="ok"] .live-dot, .live[data-state="partial"] .live-dot { width: 10px; height: 10px; }
  .live[data-state="partial"], .live[data-state="stale"] { width: auto; gap: 6px; padding-inline: 12px; }
  .bar-row { gap: 6px; }
  .brand { margin-inline-end: auto; }
  .bar-end { gap: 4px; margin-inline-start: 0; }
  .ask-btn { width: 44px; height: 44px; padding: 0; justify-content: center; background: transparent; color: #fff; }
  .ask-btn .label { display: none; }
  .ask-btn:hover { background: rgba(255, 255, 255, .14); }
  .icon-btn-bar { width: 44px; height: 44px; }
  .toolbar .wrap { padding-block: 12px 10px; gap: 8px; }
  .chips-scroll {
    flex: 1; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
  }
  :root[dir="rtl"] .chips-scroll {
    -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent 100%);
  }
  .feed-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); }
  :root[dir="rtl"] .feed-chips { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent 100%); }
  .panel-head { flex-wrap: wrap; }
  .panel-head-text { flex: 1 1 60%; }
  .chips-scroll::-webkit-scrollbar { display: none; }
  .seg button { height: 38px; }
  .geo-chip { height: 40px; }
  .toolbar-end .text-btn .label { display: none; }
  .toolbar-end .text-btn { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .chip { height: 36px; }
  .icon-btn { width: 44px; height: 44px; }
  .row-btn { padding-block: 14px; }
  .ep { grid-template-columns: 96px minmax(0, 1fr); }
  .thumb { width: 96px; }
  .ep-body { grid-column: 2; }
  .view-title { font-size: var(--t-lg); }
  .entry-btn { grid-template-columns: 52px minmax(0, 1fr) 24px; }
  .entry-detail { padding-inline-start: 16px; }

  /* stacked tables */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 0; border: 0; }
  .table td.full { grid-column: 1 / -1; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 2px; }
  .table td.full[data-label]::before { display: none; }
  .url-cell { max-width: none; }

  .sheet { top: var(--bar-h); width: 100vw; }
  .sheet.is-ask {
    top: auto; bottom: 0; width: 100vw; max-height: 92dvh; height: 92dvh; border-radius: 14px 14px 0 0;
    transform: translateY(100%);
  }
  .sheet.is-ask.open { transform: none; }
  .bar-menu .seg-bar { border-color: var(--line-2); }
  .bar-menu .seg-bar button { color: var(--ink); height: 40px; padding-inline: 14px; }
  .bar-menu .seg-bar button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
}
@media (max-width: 420px) {
  .brand-text { font-size: 19px; }
  .first-run p { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .live[data-state="ok"] .live-dot::after { display: none; }
  .sk::after { display: none; }
  .is-new { animation: none; }
}

@media print {
  .bar, .toolbar, .sheet, .toast { display: none !important; }
}

/* ---------------------------------------------------------------- Log (archive) */
.arc-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.arc-search { display: flex; gap: 8px; align-items: center; padding: 16px; position: relative; border-bottom: 1px solid var(--line); }
.arc-search input {
  flex: 1; min-width: 0; height: 44px; padding-inline: 40px 12px; border-radius: var(--r-control);
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink); font-size: var(--t-md);
}
.arc-search input::placeholder { color: var(--ink-3); }
.arc-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.arc-search-icon { position: absolute; inset-inline-start: 28px; top: 29px; color: var(--ink-3); display: inline-flex; pointer-events: none; }
.arc-search .btn { height: 44px; }
.arc-hint { padding: 16px; color: var(--ink-3); font-size: var(--t-ui); }
.arc-results-title { padding: 14px 16px 6px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.arc-results-title:focus { outline: none; }
.arc-hits { display: grid; }
.arc-hit { padding: 14px 16px; display: grid; gap: 6px; }
.arc-hit + .arc-hit { border-top: 1px solid var(--line); }
.arc-hit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--t-sm); }
.arc-tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding-inline: 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums;
}
.arc-tag-transcript { border-color: var(--tan); color: var(--tan); }
.arc-hit-title { font-weight: 600; color: var(--ink); line-height: 1.5; }
.arc-hit-body { color: var(--ink-2); line-height: 1.7; max-width: 80ch; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.arc-hit-link { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.arc-hit-link:hover { color: var(--tan); }
.arc-caveat { padding: 12px 16px 16px; font-size: var(--t-sm); color: var(--ink-3); border-top: 1px solid var(--line); }
.arc-plats { display: grid; }
.arc-plat { padding: 14px 16px; display: grid; gap: 10px; }
.arc-plat + .arc-plat { border-top: 1px solid var(--line); }
.arc-plat-title { font-size: var(--t-ui); font-weight: 600; color: var(--ink); }
.arc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px 12px; }
.arc-stat { display: grid; gap: 2px; }
.arc-num { font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.arc-label { font-size: var(--t-sm); color: var(--ink-3); }
@media (max-width: 1199px) { .arc-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) { .arc-search { flex-wrap: wrap; } .arc-search .btn { width: 100%; } }

/* ------------------------------------------------------------------ channel avatars */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-ph { line-height: 1; }
.avatar-xs { width: 18px; height: 18px; font-size: 10px; }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 20px; }
.ep-chan .avatar-xs { flex: none; }

/* ------------------------------------------------------------------ ask bar (overview) */
.ask-bar {
  display: flex; align-items: center; gap: 10px; margin-block: 4px 16px; padding: 6px; padding-inline-start: 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-panel);
  transition: border-color var(--dur) var(--ease);
}
.ask-bar:focus-within { border-color: var(--tan); }
.ask-bar-icon { color: var(--tan); display: grid; flex: none; }
.ask-bar input { flex: 1; min-width: 0; height: 44px; background: transparent; border: 0; color: var(--ink); font-size: var(--t-md); }
.ask-bar input::placeholder { color: var(--ink-3); }
.ask-bar input:focus-visible { outline: none; }
.ask-bar .btn { height: 44px; padding-inline: 22px; }

/* ------------------------------------------------------------------ competitors: compare + cards */
.p-compare { margin-bottom: 16px; }
.seg-sm button { height: 30px; font-size: var(--t-xs); padding-inline: 10px; }
.cmp-list { list-style: none; margin: 0; padding: 8px 8px 12px; display: grid; gap: 2px; }
.cmp-row {
  width: 100%; display: grid; grid-template-columns: 24px minmax(90px, 210px) minmax(0, 1fr) 76px; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--r-control); text-align: start; transition: background var(--dur) var(--ease);
}
.cmp-row:hover { background: var(--surface-2); }
.cmp-name { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-row.named .cmp-name { color: var(--tan); }
.cmp-row.own .cmp-name { color: var(--ink); }
.cmp-track { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.cmp-fill {
  display: block; height: 100%; width: var(--w, 0%); border-radius: inherit;
  background: color-mix(in srgb, var(--tan) 72%, var(--surface-2)); transition: width 500ms var(--ease);
}
.cmp-row.own .cmp-fill { background: var(--brand-hi); }
.cmp-val { font-size: var(--t-sm); font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }

.chan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.chan-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0; cursor: pointer; transition: border-color var(--dur) var(--ease);
}
.chan-card:hover { border-color: var(--line-2); }
.chan-card.own { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); }
.chan-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chan-card-id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chan-card .chan-open .name { font-size: var(--t-md); }
.chan-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: var(--t-xs); color: var(--ink-3); }
.chan-sub .handle { direction: ltr; unicode-bidi: isolate; }
.chan-latest {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; text-align: start;
  padding: 8px; margin: -8px; border-radius: var(--r-control); transition: background var(--dur) var(--ease);
}
.chan-latest:hover { background: var(--surface-2); }
.chan-latest .thumb { width: 128px; }
.chan-latest-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.chan-latest-body .meta { margin-top: 0; }
.kicker { font-size: var(--t-xs); color: var(--ink-3); }
.chan-empty { font-size: var(--t-sm); }
.spark { margin: 0; }
.spark-bars { position: relative; height: 56px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.spark-bar {
  flex: 1; height: var(--h, 0%); min-height: 2px; border-radius: 2px 2px 0 0;
  background: color-mix(in srgb, var(--ink-3) 45%, var(--surface-2));
}
.spark-bar.up { background: var(--tan); }
.chan-card.own .spark-bar.up { background: var(--brand-hi); }
.spark-median { position: absolute; inset-inline: 0; bottom: var(--m, 0%); border-top: 1px dashed var(--ink-2); pointer-events: none; }
.spark figcaption { font-size: var(--t-xs); color: var(--ink-3); margin-top: 6px; }
.sheet-body .spark { padding-block: 4px; }
.chan-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.chan-stats dt { font-size: var(--t-xs); color: var(--ink-3); }
.chan-stats dd { margin: 2px 0 0; font-size: var(--t-ui); font-weight: 600; }

@media (max-width: 899px) {
  .chan-grid { grid-template-columns: minmax(0, 1fr); }
  .cmp-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 8px; padding-block: 8px; }
  .cmp-track { grid-column: 2 / 4; grid-row: 2; height: 8px; }
  .cmp-val { grid-column: 3; grid-row: 1; }
  .chan-latest { grid-template-columns: 112px minmax(0, 1fr); }
  .chan-latest .thumb { width: 112px; }
  .ask-btn { width: auto; padding-inline: 12px; height: 36px; gap: 6px; background: #fff; color: var(--brand); }
  .ask-btn .label { display: inline; }
  .ask-btn:hover { background: #fff5ec; }
  .ask-bar .btn { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp-fill { transition: none; }
}

/* ------------------------------------------------------------------ team login */
.login { min-height: calc(100dvh - var(--bar-h) - 48px); display: grid; place-items: center; padding: 32px var(--gutter); }
.login-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 6px;
}
.login-mark {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: color-mix(in srgb, var(--brand) 18%, var(--surface-2)); color: var(--brand-hi);
}
.login-title { font-size: var(--t-2xl); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.login-note { color: var(--ink-2); font-size: var(--t-ui); margin-bottom: 18px; text-wrap: pretty; }
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); margin-top: 8px; }
.login-form input {
  height: 46px; padding-inline: 12px; border-radius: var(--r-control); background: var(--surface-2);
  border: 1px solid var(--line-2); color: var(--ink); font-size: var(--t-md); text-align: start;
}
:root[dir="rtl"] .login-form input { text-align: end; }
.login-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.login-error {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--r-control); font-size: var(--t-sm);
  background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--ink);
}
.login-btn { height: 46px; margin-top: 16px; font-size: var(--t-md); }
.login-btn:disabled { opacity: .7; }
.out-btn { color: #fff; }
@media (max-width: 899px) {
  .out-btn { display: none; }
  .bar-end.login-end .seg-bar { display: inline-flex; }
  .login-card { padding: 26px 20px 22px; }
}

/* ------------------------------------------------------------------ agent thinking + answer layout */
.think { display: grid; justify-items: start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface-2); }
.think-mark { display: inline-flex; height: 30px; align-items: center; animation: think-breathe 1.8s var(--ease) infinite; transform-origin: center; }
.think-mark img { height: 30px; width: auto; display: block; }
.think-mark .brand-text { font-size: 22px; font-weight: 700; color: var(--ink); }
.think-bar { position: relative; width: 100%; height: 3px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--brand) 18%, var(--surface)); overflow: hidden; }
.think-bar::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 35%; border-radius: inherit; background: var(--brand-hi);
  animation: think-sweep 1.4s cubic-bezier(.65, 0, .35, 1) infinite;
}
.think-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; }
.think-status { font-size: var(--t-ui); color: var(--ink-2); }
.think-secs { font-size: var(--t-xs); color: var(--ink-3); }
@keyframes think-breathe { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.02); } }
@keyframes think-sweep { 0% { transform: translateX(calc(-110% * var(--dir-sign))); } 100% { transform: translateX(calc(300% * var(--dir-sign))); } }
.ans-steps ol { display: grid; gap: 10px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.ans-steps li { position: relative; padding-inline-start: 34px; counter-increment: step; }
.ans-steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700; background: var(--brand); color: var(--brand-ink);
}
.ans-missing li { color: var(--ink-3); font-size: var(--t-sm); }
@media (prefers-reduced-motion: reduce) {
  .think-mark, .think-bar::after { animation: none; }
  .think-mark { opacity: 1; }
}

/* ------------------------------------------------------------------ competitor catalogue (channel sheet) */
.month-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; height: 120px; }
.month-col { display: grid; grid-template-rows: auto 1fr auto; align-items: end; justify-items: center; height: 100%; gap: 4px; min-width: 0; }
.month-bar { width: 100%; height: var(--h, 0%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--tan); align-self: end; }
.month-n { font-size: 10px; color: var(--ink-3); }
.month-l { font-size: 10px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px; border-radius: var(--r-control); color: inherit; text-decoration: none; }
.top-item:hover { background: var(--surface-2); }
.top-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (max-width: 899px) {
  .p-compare .panel-head { flex-wrap: wrap; }
  .p-compare .panel-tools { width: 100%; }
  .p-compare .seg-sm { display: flex; flex-wrap: wrap; width: 100%; }
  .p-compare .seg-sm button { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ episodes: ahead strip + earlier tag */
.ahead-strip { margin: 10px 12px 4px; padding: 10px 12px; border-radius: var(--r-control); background: color-mix(in srgb, var(--tan) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tan) 35%, var(--line)); }
.ahead-title { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--tan); margin-bottom: 6px; }
.ahead-strip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ahead-item { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-control); text-align: start; }
.ahead-item:has(> .avatar) { grid-template-columns: auto minmax(0, 1fr) auto; }
.ahead-item:hover { background: var(--surface-2); }
.ahead-text { display: flex; flex-direction: column; min-width: 0; }
.ahead-chan { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.ahead-ep { font-size: var(--t-sm); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahead-none { display: flex; align-items: center; gap: 6px; margin: 10px 16px 0; font-size: var(--t-xs); color: var(--ink-3); }
@media (max-width: 600px) {
  .ahead-strip li { min-width: 0; }
  .ahead-item, .ahead-item:has(> .avatar) { grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; }
  .ahead-item > :last-child { justify-self: start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
.badge-earlier { background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line-2); }

/* ------------------------------------------------------------------ live counter */
.live-views.ticking { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; }
.live-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-hi); animation: live-pulse 1.6s ease-out infinite; flex: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-hi) 55%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }

/* ------------------------------------------------------------------ network (graph) view */
.graph-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.graph-search { flex: 1 1 240px; min-width: 0; height: 40px; padding-inline: 12px; border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font-size: var(--t-ui); }
.graph-search:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.graph-bar .filter-row { margin: 0; }
.graph-tools { display: flex; align-items: center; gap: 6px; }
.graph-tools .icon-btn { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: var(--r-control); font-size: 18px; font-weight: 600; color: var(--ink); }
.graph-panel { position: relative; overflow: hidden; background: #141210; }
.graph-stage { position: relative; height: clamp(460px, calc(100dvh - 300px), 900px); touch-action: none; }
.graph-canvas { display: block; cursor: grab; }
.graph-tip { position: absolute; pointer-events: none; padding: 4px 8px; border-radius: var(--r-control); background: rgba(20,18,16,.92); border: 1px solid var(--line-2); color: var(--ink); font-size: var(--t-sm); white-space: nowrap; z-index: 2; }
.graph-legend { position: absolute; inset-block-end: 12px; inset-inline-start: 12px; list-style: none; margin: 0; padding: 8px 10px; display: grid; gap: 4px; background: rgba(20,18,16,.86); border: 1px solid var(--line); border-radius: var(--r-control); font-size: var(--t-xs); color: var(--ink-2); }
.graph-legend li { display: flex; align-items: center; gap: 8px; }
.lg { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.lg-own { background: #c42414; } .lg-channel { background: #cea06e; } .lg-shared { background: #cea06e; box-shadow: 0 0 0 2px #fff5ec; }
.lg-ownGuest { background: #ef5a4a; } .lg-guest { background: #a89c90; } .lg-topic { background: #ef5a4a; border-radius: 1px; transform: rotate(45deg) scale(.85); }
.graph-stats { margin-top: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.graph-list { margin-top: 8px; font-size: var(--t-sm); }
.graph-list summary { cursor: pointer; color: var(--ink-2); }
.graph-list ul { list-style: none; padding: 8px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.graph-show { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; }
.graph-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-shared { border-color: #cea06e; color: #cea06e; }
.sheet-lead { font-size: var(--t-md); line-height: var(--lh-ar); margin-bottom: 14px; }
@media (max-width: 899px) {
  .graph-stage { height: 68dvh; }
  .graph-legend { display: none; }
}

/* ------------------------------------------------------------------ competitors on Instagram and TikTok */
.chan-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.social-pill { display: inline-flex; align-items: center; height: 24px; padding-inline: 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: var(--t-xs); color: var(--ink-2); text-decoration: none; }
.social-pill:hover { border-color: var(--tan); color: var(--ink); }
.social-block { padding-block: 10px; border-top: 1px solid var(--line); }
.social-block:first-of-type { border-top: 0; padding-top: 0; }
.social-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 600; }
.social-name { color: var(--ink); text-decoration: none; }
.social-top { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.social-post { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: var(--r-control); color: inherit; text-decoration: none; background: var(--surface-2); }
.social-post:hover { background: color-mix(in srgb, var(--tan) 12%, var(--surface-2)); }
@media (max-width: 899px) { .p-compare .seg-sm button { flex: 1 1 30%; } }

/* ------------------------------------------------------------------ answer written live */
.think-partial { width: 100%; display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.think-partial .ans-summary { font-size: var(--t-md); }
.think-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--ink-2); }

.log-more {
  margin-top: 12px;
  align-self: center;
}

.entry-fold {
  font-size: 0.8125rem;
  font-weight: 400;
  white-space: nowrap;
}
