/* Research workspace. Signals' tokens (signals/static/index.html :root), plus the research ones:
   sides (Up/Down) in neutral colours, never green/red (AGENTS.md "Research wording" 9); amber is the agent's
   reading (Inferred, annotations); green/red only for gains and losses. */
@font-face { font-family: "Host Grotesk"; src: url(/static/fonts/HostGrotesk-latin-var.woff2) format("woff2"); font-weight: 300 600; font-display: swap; }
:root {
  /* dark is Signals' default; light only when the header's switch chose it (data-theme="light", signals.theme) */
  color-scheme: dark;
  --bg: #0e0e0f; --card: #161617; --fg: #ececec; --muted: #8f8f95; --faint: #838389; --line: #26262a; --soft: #1b1b1e;
  --accent: #ff4d1f; --accent-soft: #2a1610; --on-accent: #0e0e0f;
  --gain: #3ecf8e; --loss: #f0506e;
  --up: #3cc6cf; --down: #c792ea; --binance: #8b8f99; --ink: #f5a524; --ink-soft: #2b2110; --hatch: #838389;
  --shadow: none;
  --font: "Host Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf9; --card: #ffffff; --fg: #111112; --muted: #6c6c72; --faint: #6e6e73; --line: #ececea; --soft: #f3f3f1;
  --accent: #4b3fe0; --accent-soft: #eeedfc; --on-accent: #ffffff;
  --gain: #087f3d; --loss: #cf3426;
  --up: #0b7a83; --down: #8e44ad; --binance: #8b8f99; --ink: #a86200; --ink-soft: #fbf1df; --hatch: #a1a1a6;
  --shadow: 0 1px 2px rgba(17, 17, 18, .04), 0 2px 8px rgba(17, 17, 18, .03);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .gain { color: var(--gain); } .loss { color: var(--loss); }
.side-Up { color: var(--up); font-weight: 600; } .side-Down { color: var(--down); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* header: the Signals bar, with Investigations first */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .in { display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.tabs { display: flex; gap: 2px; }
.tabs a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); }
.tabs a.new { border: 1.5px dotted color-mix(in srgb, var(--accent) 75%, transparent); padding: 5.5px 10.5px; } /* a new feature's tab, as on the main page */
.top .acct { margin-left: auto; display: flex; gap: 10px; align-items: center; }
@media (max-width: 700px) { .tabs a:not(.on) { display: none; } .top .acct .chip { display: none; } .top .in { gap: 10px; } }
.tile .tf span:last-child { white-space: nowrap; }

.btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 11px; font-size: 13px; }
.btn.later { border-style: dashed; color: var(--muted); background: transparent; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13.5px; font-weight: 500; text-align: left; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 13px; background: var(--soft); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.35; }
.tag.observed { background: var(--soft); color: var(--fg); }
.tag.observed::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.tag.inferred { background: var(--ink-soft); color: var(--ink); border: 1px dashed color-mix(in srgb, var(--ink) 60%, transparent); }
.tag.plain { color: var(--muted); border: 1px solid var(--line); }
.tag.flag { background: var(--ink-soft); color: var(--ink); }
.av { --h: 212; flex: none; display: inline-grid; place-items: center; border-radius: 50%; width: 22px; height: 22px; font-size: 11px; font-weight: 600; background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 45% 66%); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.live { background: var(--accent); animation: breathe 1.4s ease-in-out infinite; }
.dot.ok { background: var(--fg); }
@keyframes breathe { 50% { opacity: .35; } }
.banner { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.banner.sample { border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); background: var(--ink-soft); }
.banner.err { border-color: var(--loss); }

/* home */
.home { max-width: 860px; margin: 0 auto; padding: 40px max(16px, env(safe-area-inset-left, 0px)) 60px; display: flex; flex-direction: column; gap: 28px; }
.home h1 { font-size: 30px; letter-spacing: -0.025em; }
/* example questions under the ask box: four small cards in one row, two on a phone */
.examples { display: flex; flex-direction: column; gap: 6px; }
.ex-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 700px) { .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ex { text-align: left; font-size: 12.5px; line-height: 1.3; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.ex:hover { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ex.on { color: var(--fg); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
/* signed out: the teaser */
.tag.new { align-self: flex-start; color: var(--accent); border: 1.5px dotted color-mix(in srgb, var(--accent) 75%, transparent); }
.teaser .row { display: flex; gap: 10px; flex-wrap: wrap; }
.sample-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.sample-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.sample-card q { font-size: 16px; line-height: 1.5; quotes: "\201C" "\201D"; }
.sample-card .go { color: var(--accent); font-size: 14px; font-weight: 500; }
.compose-big { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.compose-big input, .compose-big textarea { border: 0; background: transparent; font: 16px/1.5 var(--font); color: var(--fg); outline: none; width: 100%; resize: none; }
.compose-big input { font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.compose-big .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.compose-big .foot .btn { flex: none; white-space: nowrap; }
.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.list a:first-child { border-top: 0; }
.list .t { font-weight: 600; } .list .s { font-size: 13px; color: var(--muted); } .list .r { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* investigation */
.inv { display: flex; height: calc(100vh - 59px); height: calc(100dvh - 59px); }
.main { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 22px 40px; display: flex; flex-direction: column; gap: 12px; }
.main > * { flex-shrink: 0; } /* a scrolling column: its parts keep their height */
.head { display: flex; flex-direction: column; gap: 6px; position: relative; }
.head h1 { font-size: 21px; letter-spacing: -0.02em; padding-right: 230px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13.5px; color: var(--muted); }
.head .acts { position: absolute; right: 0; top: 0; display: flex; gap: 8px; }
.later-pop { position: absolute; right: 0; top: 40px; z-index: 30; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.12); padding: 14px; font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; }
.stabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.stabs button { border: 0; background: none; padding: 8px 10px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.stabs button.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 500; }
.stabs button.later { margin-left: auto; color: var(--faint); }
.ghostbox { margin: 30px auto; max-width: 520px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 22px; color: var(--muted); font-size: 14px; text-align: center; }

/* plan */
.plan { max-width: 660px; width: 100%; margin: 12px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.plan h3 { font-size: 18px; }
.plan ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ps { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.ps .mk { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.ps.running .mk { border-color: var(--accent); color: var(--accent); }
.ps.done .mk { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.ps.warning .mk { background: var(--ink-soft); border-color: var(--ink); color: var(--ink); }
.ps.failed .mk { border-color: var(--loss); color: var(--loss); }
.ps .ti { font-weight: 500; font-size: 14.5px; }
.ps .src { font-size: 12.5px; color: var(--muted); }
.ps .sum { font-size: 13px; margin-top: 3px; }
.ps .warn { font-size: 13px; margin-top: 4px; color: var(--ink); }
.bar { height: 4px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.scope { font-size: 13.5px; background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.scope label { display: flex; gap: 8px; color: var(--muted); align-items: flex-start; }

/* tiles */
.ov { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.hl { display: flex; gap: 10px; align-items: center; font-size: 13.5px; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.hl .link { margin-left: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tile { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 9px 7px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tile.match { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tile.dim { opacity: .3; }
.tile .tt, .tile .tf { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); }
.tile svg { display: block; width: 100%; height: auto; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.badge.warn { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.res-Up { color: var(--up); font-weight: 600; } .res-Down { color: var(--down); font-weight: 600; }

/* replay */
.wv { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.wv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wv-head h3 { font-size: 17px; }
.wv-head .slug { font: 11.5px var(--mono); color: var(--faint); }
.wv-head .nav { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.icon { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: inline-grid; place-items: center; padding: 0; }
.sum { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.sum b { color: var(--fg); font-weight: 500; }
.cov { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 16px; height: 0; border-top: 2px solid; display: inline-block; }
.readout { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 12.5px; padding: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 32px; align-items: center; }
.readout .k { color: var(--muted); }
.chartbox { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding-top: 6px; }
.chartbox svg { display: block; }
.chartbox .hov { cursor: crosshair; }
.burst { cursor: pointer; }
.burst:hover .shape, .burst:focus .shape { stroke-width: 2.4; }
.burst:focus { outline: none; }
.burst:focus .shape { stroke: var(--accent); }
svg text { font-family: var(--font); }
.ax { fill: var(--muted); font-size: 10.5px; } .axs { fill: var(--faint); font-size: 10px; }
.gridl { stroke: var(--line); stroke-width: 1; }
.endl { font-size: 11px; font-weight: 500; }
.ann { stroke: var(--ink); fill: none; stroke-width: 1.4; }
.ann-t { fill: var(--ink); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.ann-rg { fill: var(--ink); opacity: .1; }
.pop { position: absolute; z-index: 20; width: 310px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.pop h4 { font-size: 14.5px; }
.pop table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.pop td, .pop th { padding: 2px 4px; text-align: left; } .pop th { color: var(--muted); font-weight: 500; }
.pop .rows { max-height: 140px; overflow-y: auto; }
.pop .acts { display: flex; gap: 6px; }
.stepbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dots button { min-width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 10.5px; color: var(--muted); padding: 0 5px; }
.dots button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.dots button.past { background: var(--soft); color: var(--fg); }
.stepbar label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.stepbar .opts { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.caption { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.caption .ct { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.caption h4 { font-size: 15px; }
.caption .when { font-size: 12.5px; color: var(--muted); }
.caption .ct .link { margin-left: auto; }
.line2 { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.line2 .tag { margin-top: 1px; }
.line2.inf p { color: color-mix(in srgb, var(--ink) 75%, var(--fg)); }
.src-note { font-size: 12px; color: var(--faint); }

/* trades */
.tablewrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table.tr { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tr th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
table.tr td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tr tr.click { cursor: pointer; } table.tr tr.click:hover td { background: var(--soft); }

/* agent column */
.agent { width: 390px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.agent-head { padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.agent-head .t { font-weight: 600; font-size: 14.5px; } .agent-head .s { font-size: 12.5px; color: var(--muted); }
.agent-head > div:last-child { flex: 1; min-width: 0; } /* room for the run clock's bar */
.runclock .el { font-variant-numeric: tabular-nums; }
/* the Windows tab: the count line, the filter chips, every buy on one chart; the record line in the header */
.tally { font-size: 14px; line-height: 1.5; margin: 0; } .tally .muted { display: block; font-size: 12.5px; }
.wfilter { display: flex; flex-wrap: wrap; gap: 6px; }
.wfilter button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.wfilter button.on { color: var(--fg); border-color: var(--fg); }
.wfilter button:disabled { opacity: .45; }
.wfilter.small button { font-size: 12px; padding: 3px 9px; }
.allwin { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.allwin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.allwin svg { display: block; max-width: 100%; height: auto; } .allwin circle { cursor: pointer; }
.allwin figcaption { display: flex; flex-direction: column; gap: 4px; }
.allwin .keys { display: flex; flex-wrap: wrap; gap: 14px; }
.allwin .key { display: inline-flex; align-items: center; gap: 6px; } .allwin .key i { width: 9px; height: 9px; border-radius: 50%; opacity: .7; display: inline-block; }
.recline { margin: 6px 0 0; }
.runclock .bar { display: block; height: 3px; margin-top: 6px; }
.runclock .bar i { transition: width 1s linear; }
.atabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.atabs button { border: 0; background: none; padding: 6px 8px 8px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.atabs button.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 500; }
.feed { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.note { display: flex; gap: 10px; font-size: 14px; padding: 2px 4px; align-items: flex-start; }
.note .dot { margin-top: 5px; }
.working { display: flex; gap: 10px; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.working .dot { margin-top: 4px; }
.working p.done { color: var(--muted); }
.ask { align-self: flex-end; max-width: 92%; background: var(--accent-soft); border-radius: 12px; padding: 9px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ask p, .card p, .card li, .card h4 { overflow-wrap: anywhere; }
.ask .k { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ctx { display: inline-flex; gap: 5px; align-items: center; background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 500; }
.ctx button { border: 0; background: none; padding: 0; color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; }
.card.inferred { border-style: dashed; border-color: color-mix(in srgb, var(--ink) 50%, var(--line)); }
.card.flagged { border-style: dashed; border-color: var(--ink); }
.card .top2 { display: flex; align-items: center; gap: 8px; }
.card .k { font-size: 12px; color: var(--muted); margin-left: auto; }
.card h4 { font-size: 14.5px; line-height: 1.35; }
.card p, .card li { font-size: 13.5px; }
.card ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 3px; }
.card details { font-size: 13px; color: var(--muted); }
.card details summary { cursor: pointer; font-size: 12.5px; }
.card details p { margin-top: 6px; }
.stat { align-self: flex-start; border: 0; background: none; padding: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 4px; text-decoration-thickness: 2px; text-align: left; }
.stat:hover { color: var(--accent); }
.stat small { font-size: 13px; font-weight: 500; color: var(--muted); }
.statrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.was { font-size: 12px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.waffle { display: flex; flex-wrap: wrap; gap: 3px; }
.waffle button { width: 14px; height: 14px; border-radius: 3px; padding: 0; border: 1.5px solid var(--accent); background: var(--accent); }
.waffle button.no { background: transparent; border-color: var(--faint); }
.acts2 { display: flex; gap: 12px; flex-wrap: wrap; }
.acts2 .fchip { white-space: normal; max-width: 100%; min-width: 0; border-radius: 10px; line-height: 1.35; padding: 4px 10px; } /* a finding's title wraps inside the column */
.check { font-size: 11.5px; color: var(--faint); }
.flagnum { text-decoration: line-through; text-decoration-color: var(--ink); text-decoration-thickness: 2px; color: var(--muted); }
.flagnote { font-size: 13px; color: var(--ink); background: var(--ink-soft); border-radius: 8px; padding: 7px 9px; }
.proposal { background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; padding: 12px 13px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.proposal .k { font-size: 12px; color: var(--accent); font-weight: 600; }
.proposal.done { opacity: .6; }
/* answer first, proof on demand: per question, its answer on top, each finding one line that opens to its proof */
.group { display: flex; flex-direction: column; gap: 10px; }
.asked { font-size: 13px; align-self: flex-end; max-width: 90%; background: var(--soft); border: 1px solid var(--line); border-radius: 12px 12px 3px 12px; padding: 7px 11px; }
.asked .clamp + .clamp { margin-top: 4px; } /* the plan it started, under the question */
.asked .clamp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; } /* clamp inside the padding: no half line */
/* the agent busy under the latest question, from the click until its own progress lines (owner, 11 Nov) */
.typing { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 2px 4px; }
.typing p + p { margin-top: 2px; overflow-wrap: anywhere; }
.dots { display: inline-flex; gap: 4px; flex: none; margin-top: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: hop 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-3px); opacity: 1; } }
/* earlier runs, one line each, open again on a click; the current run under a divider */
.runfold-wrap { display: flex; flex-direction: column; gap: 10px; }
.runfold { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 13px; color: var(--muted);
  background: none; border: 1px dashed color-mix(in srgb, var(--fg) 18%, var(--line)); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.runfold b { color: var(--fg); font-weight: 600; }
.runfold > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runfold > span:last-child { flex: none; }
.runpast { display: flex; flex-direction: column; gap: 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.rundiv { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.rundiv::before, .rundiv::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* the sample's end: a follow-up plan offered as the visitor's own breakdown to run */
.signincard { display: flex; flex-direction: column; gap: 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.signincard .btn { display: inline-block; }
/* the question switcher: one chip per question, the workspace shows the one picked (owner, 11 Nov) */
.qruns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qruns .lbl { font-size: 12px; color: var(--muted); }
.qrun { display: inline-flex; align-items: center; gap: 8px; max-width: min(100%, 360px); border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.qrun[aria-pressed="true"] { border-color: color-mix(in srgb, var(--fg) 55%, var(--line)); color: var(--fg); background: var(--soft); }
.qrun .qt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrun .st { flex: none; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.qrun .st.live { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
/* the day: one bar per 15-minute window of the question's range, filling in as windows are read */
.daystrip { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.daystrip .tally .muted { display: inline; font-size: 13px; }
.dsbox { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--card); overflow-x: auto; }
.dsbox svg { display: block; width: 100%; min-width: 520px; height: auto; }
.dsbar { cursor: pointer; } .dsbar:hover { opacity: .75; }
.daystrip .pending { animation: breathe 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .8; } }
.card.answer { gap: 10px; padding: 14px; border-color: color-mix(in srgb, var(--fg) 14%, var(--line)); }
.card.answer .k { margin-left: 0; font-weight: 600; }
.card.answer .line2 { display: block; font-size: 15px; line-height: 1.5; } /* the tag leads its sentence, not a column */
.card.answer .line2 .tag { margin-right: 6px; vertical-align: 1px; }
.card.answer .line2 p { display: inline; font-size: 15px; overflow-wrap: break-word; } /* never "−" / "$176.43" */
.frows { display: flex; flex-direction: column; }
.frows h5 { margin: 4px 2px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.frow { border-top: 1px solid var(--line); }
.frow.lit { background: var(--soft); box-shadow: inset 2px 0 0 var(--fg); margin: 0 -10px; padding: 0 10px; } /* a finding the opened reading rests on */
.frow:last-child { border-bottom: 1px solid var(--line); }
.fline { width: 100%; border: 0; background: none; padding: 10px 2px; min-height: 44px; display: flex; align-items: center; gap: 8px; text-align: left; font-size: 14px; }
.fline .ft { flex: 1; min-width: 0; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.frow.data .fline .ft { font-weight: 400; color: var(--muted); }
.fline .fs { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.fline .chev { flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin: -3px 4px 0 2px; transition: transform .15s; }
.frow.open .fline .chev { transform: rotate(225deg); margin-top: 3px; }
.fline:hover .ft { color: var(--accent); }
.fbody { padding: 0 2px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.fbody p, .fbody li { overflow-wrap: anywhere; }
.fbody ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 3px; }
/* the one next step: label, its words at full width, the button under them (never side by side: its text runs long) */
.next { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; font-size: 13.5px; background: var(--bg); }
.next .k { font-size: 12px; color: var(--muted); }
.next p { line-height: 1.45; overflow-wrap: break-word; }
.next .btn { margin-top: 4px; }
.compose { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--card); }
.sugg { display: flex; gap: 6px; flex-wrap: wrap; }
.sugg button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; text-align: left; }
.sugg button:hover { border-color: var(--accent); color: var(--accent); }
.cbox { border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.cbox textarea { border: 0; background: transparent; resize: none; font: 14px/1.45 var(--font); color: var(--fg); outline: none; width: 100%; }
.cbox .row { display: flex; align-items: center; gap: 8px; } .cbox .row .btn { margin-left: auto; }
.act { display: flex; flex-direction: column; gap: 8px; }
.act h5 { margin: 0; font-size: 13px; font-weight: 600; }
.act table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--card); }
.act td, .act th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.act th { font-weight: 500; color: var(--muted); }
.log { font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.log div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.log span { color: var(--muted); }
.log .flagged { color: var(--ink); }

/* a phone reads a saved investigation: one column, the agent's column under the workspace */
@media (max-width: 900px) {
  .inv { flex-direction: column; height: auto; }
  .main { overflow: visible; padding: 12px 14px 20px; }
  .head h1 { padding-right: 0; font-size: 19px; }
  .head .acts { position: static; }
  .agent { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .feed { overflow: visible; }
  .stepbar .opts { margin-left: 0; }
}

/* a Started plan's progress: "Step 2 of 4 · 1:42 · about 3 min left" over one bar segment per step (plan and agent
   header), and the note that the run keeps going if you leave */
.runline { margin-top: 4px; color: var(--muted); } .runprog b { color: var(--fg); font-weight: 600; }
.stepbar { display: flex; gap: 4px; margin-top: 8px; width: 100%; }
.stepbar i { flex: 1; height: 5px; border-radius: 3px; background: var(--soft); position: relative; overflow: hidden; }
.stepbar i.done { background: var(--accent); }
.stepbar i.run::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 35%); background: color-mix(in srgb, var(--accent) 55%, var(--soft)); transition: width 1s linear; }
.stepbar i.run.pulse::after { animation: breathe 1.4s ease-in-out infinite; }
.agent-head .stepbar { margin-top: 6px; } .agent-head .stepbar i { height: 3px; }
.leave { border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.leave .row { display: flex; flex-wrap: wrap; gap: 8px; }
/* the list: a running breakdown's row */
.list .r.run { color: var(--fg); display: inline-flex; align-items: center; gap: 7px; }
.list .r.ready { color: var(--accent); font-weight: 600; }
/* a Start that waits for your other breakdown */
.list .r.queued { color: var(--ink); }
.waitnote { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; background: var(--ink-soft); font-size: 14px; }
.waitnote .dot { margin-top: 6px; }
