:root {
  --ink: #10201f;
  --ink-2: #162827;
  --ink-3: #203331;
  --paper: #f3f0e7;
  --paper-2: #faf8f2;
  --paper-3: #eae8e0;
  --text: #1c2928;
  --text-soft: #5d6967;
  --text-faint: #87908e;
  --line: #d5d7d1;
  --line-strong: #b9bfba;
  --cyan: #277f7d;
  --cyan-bright: #45a09c;
  --cyan-soft: #dcecea;
  --positive: #38725e;
  --positive-soft: #dfeae4;
  --negative: #a64b43;
  --negative-soft: #f1e1de;
  --warning: #9b6c25;
  --warning-soft: #f1e7d3;
  --neutral: #66716f;
  --font-sans: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --font-serif: "Iowan Old Style", Georgia, "Songti SC", "STSong", serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar-width: 224px;
  --assistant-width: 352px;
  --topbar-height: 54px;
  --mobile-nav-height: 64px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select { cursor: pointer; }

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .58;
}

a { color: inherit; }

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

::selection {
  color: var(--paper-2);
  background: var(--cyan);
}

:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--assistant-width);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Header */
.topbar {
  grid-column: 2 / 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  height: var(--topbar-height);
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, .96);
  z-index: 30;
}

.topbar-menu,
.topbar-brand,
.assistant-toggle { display: none; }

.topbar-context {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--text-soft);
  font-size: 13px;
}

.topbar-context > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.eyebrow {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
}

.health-pill:hover { border-color: var(--line-strong); background: var(--paper-3); }

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neutral);
}

.status-dot.is-good { background: var(--positive); }
.status-dot.is-warn { background: var(--warning); }
.status-dot.is-bad { background: var(--negative); }
.status-dot.is-loading { background: var(--cyan); animation: status-pulse 1.4s ease-in-out infinite; }

@keyframes status-pulse { 50% { opacity: .32; } }

.freshness-text {
  max-width: 240px;
  overflow: hidden;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text-soft);
  background: transparent;
}

.icon-button:hover { color: var(--text); border-color: var(--line); background: var(--paper-3); }
.icon-button.is-spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sidebar */
.sidebar {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  color: #dfe8e5;
  border-right: 1px solid #263c39;
  background: var(--ink);
  z-index: 50;
}

.sidebar-head {
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 0 16px;
  border-bottom: 1px solid #293c3a;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: #e2eeea;
  border: 1px solid #51716d;
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: -.04em;
}

.brand b {
  display: block;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: #78908c;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .13em;
}

.sidebar-close { display: none; margin-left: auto; color: #9aafab; }

.nav-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 10px;
  overflow-y: auto;
}

.nav-caption {
  margin: 0;
  padding: 8px 10px 6px;
  color: #687e7a;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nav-caption-secondary { margin-top: 14px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 2px;
  color: #9eb0ad;
  background: transparent;
  text-align: left;
}

.nav-item::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -10px;
  width: 2px;
  background: transparent;
  content: "";
}

.nav-item svg { width: 17px; height: 17px; }
.nav-item span:nth-child(2) { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-item:hover { color: #e4ecea; background: var(--ink-2); }
.nav-item.is-active { color: #f0f4f2; background: var(--ink-3); }
.nav-item.is-active::before { background: var(--cyan-bright); }

.nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 5px;
  color: #d7efeb;
  border: 1px solid #456966;
  border-radius: 9px;
  background: #294541;
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: center;
}

.nav-count.quiet { color: #7f9490; border: 0; background: transparent; }

.nav-signal {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: transparent;
}
.nav-signal.is-good { background: var(--cyan-bright); }
.nav-signal.is-warn { background: #c3954c; }
.nav-signal.is-bad { background: #c66b62; }

.sidebar-status {
  flex: 0 0 auto;
  padding: 14px 16px 17px;
  border-top: 1px solid #293c3a;
  background: #0d1c1b;
}

.side-status-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 7px;
  color: #718682;
  font-size: 10px;
}

.side-status-line strong {
  overflow: hidden;
  color: #afbfbc;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-status p {
  margin: 12px 0 0;
  color: #5f7470;
  font-size: 9px;
  line-height: 1.55;
}

/* Workspace */
.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(rgba(16, 32, 31, .025) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--paper);
}

.page {
  width: min(100%, 1280px);
  min-height: calc(100vh - var(--topbar-height) - 88px);
  min-height: calc(100dvh - var(--topbar-height) - 88px);
  margin: 0 auto;
  padding: 30px clamp(22px, 2.5vw, 38px) 54px;
}

.page[hidden] { display: none !important; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.page-header h1 {
  margin: 6px 0 5px;
  font-family: var(--font-serif);
  font-size: clamp(27px, 2.4vw, 36px);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -.025em;
}

.page-intro {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--text);
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: .01em;
}

.button svg { width: 15px; height: 15px; }
.button:hover:not(:disabled) { border-color: #929b97; background: #fffefa; }
.button.primary { color: #f4f8f6; border-color: var(--ink); background: var(--ink); }
.button.primary:hover:not(:disabled) { border-color: #23413e; background: #23413e; }
.button.secondary { color: var(--text-soft); background: transparent; }
.button.danger { color: var(--negative); border-color: #d7b6b1; background: transparent; }
.button.danger:hover:not(:disabled) { background: var(--negative-soft); }
.button.wide { width: 100%; margin-top: 16px; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.text-button {
  padding: 2px 0;
  border: 0;
  color: var(--cyan);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}
.text-button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.section-block { margin-top: 28px; }

.section-heading,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
}

.section-heading { margin-bottom: 12px; }
.panel-head { min-height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.section-heading > div:first-child,
.panel-head > div:first-child { display: flex; align-items: baseline; min-width: 0; gap: 9px; }
.section-heading h2,
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 680; letter-spacing: .01em; }
.section-index { color: var(--cyan); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; }
.asof { color: var(--text-faint); font-family: var(--font-mono); font-size: 10px; }

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(250, 248, 242, .82);
}

.panel-foot {
  padding: 9px 14px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.data-alert {
  position: relative;
  margin: 0 0 20px;
  padding: 10px 12px 10px 34px;
  color: #704f19;
  border: 1px solid #d7c49e;
  border-left: 3px solid var(--warning);
  border-radius: 1px;
  background: var(--warning-soft);
  font-size: 12px;
}

.data-alert::before {
  position: absolute;
  top: 10px;
  left: 12px;
  content: "!";
  font-family: var(--font-mono);
  font-weight: 700;
}

.data-alert.error { color: #793b35; border-color: #dbb5b0; border-left-color: var(--negative); background: var(--negative-soft); }
.data-alert.neutral { color: var(--text-soft); border-color: var(--line); border-left-color: var(--neutral); background: var(--paper-3); }
.data-alert[hidden] { display: none; }

/* Overview */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.decision-card,
.skeleton-card {
  position: relative;
  min-width: 0;
  min-height: 196px;
  padding: 17px 18px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(250, 248, 242, .7);
}

.decision-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: left;
}

.decision-card:hover { background: var(--paper-2); }

.decision-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--neutral);
  content: "";
}

.decision-card.positive::before { background: var(--positive); }
.decision-card.negative::before { background: var(--negative); }
.decision-card.hold::before { background: var(--warning); }

.decision-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.decision-symbol {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -.03em;
}

.decision-market {
  display: block;
  margin-top: 2px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.rating-chip,
.rating-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  color: var(--neutral);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.rating-chip.positive,
.rating-badge.positive { color: var(--positive); border-color: #9bbbad; background: var(--positive-soft); }
.rating-chip.negative,
.rating-badge.negative { color: var(--negative); border-color: #d4aaa5; background: var(--negative-soft); }
.rating-chip.hold,
.rating-badge.hold { color: var(--warning); border-color: #cfbc91; background: var(--warning-soft); }

.decision-excerpt {
  display: -webkit-box;
  margin: 18px 0 14px;
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.decision-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
}

.decision-card-foot span:last-child { color: var(--cyan); }

.skeleton-card { overflow: hidden; background: var(--paper-3); }
.skeleton-card::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: skeleton 1.4s infinite;
  content: "";
}
@keyframes skeleton { to { transform: translateX(100%); } }

.overview-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr);
  gap: 16px;
  margin-top: 28px;
}

.checklist { min-height: 142px; padding: 4px 14px; }
.checklist-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}
.checklist-row:last-child { border-bottom: 0; }
.checklist-index { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.checklist-ticker { overflow: hidden; font-family: var(--font-mono); font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.checklist-row small { color: var(--text-faint); font-size: 9px; }

.compact-runs { min-height: 142px; padding: 4px 14px; }
.compact-run {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  gap: 9px;
  color: inherit;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.compact-run:last-child { border-bottom: 0; }
.compact-run time { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.compact-run b { overflow: hidden; font-size: 11px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }

.run-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--neutral);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}
.run-state::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.run-state.running { color: var(--cyan); }
.run-state.success { color: var(--positive); }
.run-state.failed { color: var(--negative); }
.run-state.queued { color: var(--warning); }

.coverage-table-wrap,
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); background: var(--paper-2); }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th,
.data-table td { padding: 9px 11px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { color: var(--text-faint); background: var(--paper-3); font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.data-table .mono { font-family: var(--font-mono); }
.coverage-mark { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: var(--line-strong); vertical-align: 1px; }
.coverage-mark.yes { background: var(--cyan); }

/* Forms and tasks */
.task-layout,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 16px;
}

.task-compose form,
.settings-panel { padding: 18px; }
.task-compose .panel-head,
.settings-panel .panel-head { margin: -18px -18px 18px; }

.field-label {
  display: block;
  margin: 14px 0 6px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}
.field-label:first-child { margin-top: 0; }

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  color: var(--text);
  background: var(--paper-2);
  outline: none;
}

input,
select { min-height: 38px; padding: 7px 10px; }
textarea { padding: 9px 10px; resize: vertical; }
input::placeholder,
textarea::placeholder { color: #9ca3a0; }
input:focus,
textarea:focus,
select:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }

.ticker-input {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  text-transform: uppercase;
}

.field-help,
.fine-print,
.panel-copy {
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.55;
}
.field-help { margin-top: 5px; }
.panel-copy { margin: 0 0 16px; color: var(--text-soft); font-size: 11px; }
.fine-print { margin: 12px 0 0; }

.secret-field { position: relative; }
.secret-field input { padding-right: 43px; font-family: var(--font-mono); }
.field-icon {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  padding: 0;
  color: var(--text-faint);
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
}
.field-icon svg { width: 16px; height: 16px; }
.field-icon:hover { color: var(--text); background: var(--paper-3); }

.check-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 10px;
  cursor: pointer;
}
.check-control input { width: 14px; min-height: 14px; height: 14px; margin: 0; accent-color: var(--cyan); }

.credential-state {
  min-height: 18px;
  margin-top: 7px;
  color: var(--text-faint);
  font-size: 10px;
}
.credential-state.is-good { color: var(--positive); }
.credential-state.is-bad { color: var(--negative); }

.form-notice { min-height: 20px; margin-top: 9px; color: var(--text-soft); font-size: 11px; }
.form-notice.is-good { color: var(--positive); }
.form-notice.is-bad { color: var(--negative); }

.pipeline-panel { padding-bottom: 12px; }
.pipeline {
  position: relative;
  margin: 5px 14px 0;
  padding: 4px 0 0;
  list-style: none;
}
.pipeline::before { position: absolute; top: 22px; bottom: 23px; left: 14px; width: 1px; background: var(--line-strong); content: ""; }
.pipeline li { position: relative; display: flex; align-items: center; gap: 11px; min-height: 48px; }
.pipeline li > span {
  display: grid;
  place-items: center;
  z-index: 1;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 9px;
}
.pipeline b { display: block; font-size: 11px; }
.pipeline small { display: block; color: var(--text-faint); font-size: 9px; }
.honesty-note { margin: 10px 14px 0; padding: 9px 10px; color: var(--text-soft); border-left: 2px solid var(--line-strong); background: var(--paper-3); font-size: 9px; line-height: 1.55; }

.run-section { margin-top: 28px; }
.run-list { border-top: 1px solid var(--line-strong); }
.run-row {
  display: grid;
  grid-template-columns: 118px minmax(170px, 1.4fr) minmax(170px, 1fr) 120px 28px;
  align-items: center;
  min-height: 61px;
  gap: 12px;
  padding: 8px 10px;
  color: inherit;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.run-row:hover { background: rgba(250, 248, 242, .72); }
.run-time { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.run-title { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.run-flow { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.run-phase { min-width: 0; }
.run-phase b { display: block; font-size: 10px; }
.run-phase small { display: block; overflow: hidden; color: var(--text-faint); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.run-row > svg { width: 15px; height: 15px; color: var(--text-faint); }

/* Archive and reader */
.archive-header { margin-bottom: 0; }
.archive-search { flex: 0 1 250px; }
.archive-search input { background: transparent; }

.archive-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 640px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(250, 248, 242, .72);
}

.archive-index { min-width: 0; border-right: 1px solid var(--line); }
.archive-index-head { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; color: var(--text-faint); border-bottom: 1px solid var(--line); font-size: 9px; }
.archive-list { max-height: 720px; overflow-y: auto; }
.archive-entry {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
}
.archive-entry:hover { background: var(--paper-3); }
.archive-entry.is-active { box-shadow: inset 2px 0 0 var(--cyan); background: var(--cyan-soft); }
.archive-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.archive-entry-date { font-family: var(--font-mono); font-size: 11px; font-weight: 650; }
.archive-entry-head small { color: var(--text-faint); font-family: var(--font-mono); font-size: 8px; }
.archive-entry-tickers { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.archive-entry-tickers span { padding: 1px 4px; color: var(--text-soft); border: 1px solid var(--line); border-radius: 1px; background: var(--paper-2); font-family: var(--font-mono); font-size: 8px; }

.report-reader { min-width: 0; padding: 0 22px 32px; }
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 88px; padding: 18px 0 13px; border-bottom: 1px solid var(--line); }
.report-kicker { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.report-head h2 { margin: 4px 0 0; font-family: var(--font-serif); font-size: 25px; font-weight: 560; line-height: 1.15; }
.ticker-strip { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); }
.ticker-tab {
  position: relative;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--text-soft);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
}
.ticker-tab:first-child { padding-left: 0; }
.ticker-tab.is-active { color: var(--text); font-weight: 650; }
.ticker-tab.is-active::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--cyan); content: ""; }
.ticker-tab:first-child.is-active::after { left: 0; }

.report-tabs { display: flex; max-width: 100%; gap: 16px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.report-tab {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-faint);
  background: transparent;
  font-size: 10px;
  white-space: nowrap;
}
.report-tab:hover { color: var(--text); }
.report-tab.is-active { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 650; }

.article {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 27px 0 10px;
  color: #273331;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.article h1 { margin: 0 0 18px; font-size: 28px; line-height: 1.25; }
.article h2 { margin: 30px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 21px; line-height: 1.3; }
.article h3 { margin: 23px 0 9px; color: var(--ink); font-size: 17px; }
.article h4 { margin: 18px 0 7px; font-size: 15px; }
.article p { margin: 9px 0; }
.article ul,
.article ol { margin: 9px 0; padding-left: 24px; }
.article li { margin: 4px 0; }
.article blockquote { margin: 14px 0; padding: 3px 14px; color: var(--text-soft); border-left: 2px solid var(--cyan); background: rgba(220, 236, 234, .4); }
.article hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.article code { padding: 1px 4px; border: 1px solid var(--line); border-radius: 1px; background: var(--paper-3); font-family: var(--font-mono); font-size: 12px; }
.article pre { max-width: 100%; padding: 12px; overflow-x: auto; border: 1px solid var(--line); background: var(--ink); color: #dfe8e5; font-family: var(--font-mono); font-size: 11px; line-height: 1.6; }
.article pre code { padding: 0; border: 0; background: transparent; color: inherit; }
.article a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article table { display: block; width: 100%; max-width: 100%; margin: 14px 0; overflow-x: auto; border-collapse: collapse; font-family: var(--font-sans); font-size: 11px; }
.article th,
.article td { padding: 7px 9px; border: 1px solid var(--line); text-align: left; white-space: nowrap; }
.article th { background: var(--paper-3); font-weight: 650; }

/* News */
.news-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.segmented { display: flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.segmented button { flex: 0 0 auto; min-height: 31px; padding: 5px 10px; border: 0; border-right: 1px solid var(--line); color: var(--text-soft); background: var(--paper-2); font-family: var(--font-mono); font-size: 9px; }
.segmented button:last-child { border-right: 0; }
.segmented button.is-active { color: #fff; background: var(--ink); }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.news-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(250, 248, 242, .8);
}
.news-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.news-source { overflow: hidden; color: var(--cyan); white-space: nowrap; text-overflow: ellipsis; }
.news-card h2 { margin: 10px 0 7px; font-family: var(--font-serif); font-size: 17px; font-weight: 600; line-height: 1.35; }
.news-card h2 a { color: inherit; text-decoration: none; }
.news-card h2 a:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.news-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-soft); font-size: 11px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.news-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--text-faint); font-family: var(--font-mono); font-size: 8px; }
.news-card.report-index { border-left: 2px solid var(--cyan); }

/* Options */
.options-actions { align-items: center; }
.countdown { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.option-signal {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 15px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}
.signal-rule { background: var(--neutral); }
.option-signal.is-good .signal-rule { background: var(--positive); }
.option-signal.is-warn .signal-rule { background: var(--warning); }
.option-signal.is-bad .signal-rule { background: var(--negative); }
.option-signal span { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.option-signal h2 { margin: 3px 0 2px; font-family: var(--font-serif); font-size: 22px; font-weight: 560; }
.option-signal p { margin: 0; color: var(--text-soft); font-size: 11px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.metric-card { min-width: 0; min-height: 92px; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(250, 248, 242, .65); }
.metric-label { color: var(--text-faint); font-family: var(--font-mono); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.metric-value { margin-top: 5px; overflow: hidden; font-family: var(--font-mono); font-size: 18px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.metric-value.positive { color: var(--positive); }
.metric-value.negative { color: var(--negative); }
.metric-value.warning { color: var(--warning); }
.metric-meta { margin-top: 2px; overflow: hidden; color: var(--text-faint); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }

.option-charts { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 14px; margin-top: 14px; }
.chart-panel { min-height: 310px; }
.chart-frame { height: 225px; padding: 11px 12px 4px; }
.chart-frame svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: #dfe0db; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-area { fill: rgba(39,127,125,.08); stroke: none; }
.chart-line { fill: none; stroke: var(--cyan); stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.chart-end { fill: var(--cyan); stroke: var(--paper-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-label { fill: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 14px 12px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }

.exposure-detail { padding: 14px; }
.exposure-pair { margin-bottom: 15px; }
.exposure-pair:last-child { margin-bottom: 0; }
.exposure-pair-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 10px; }
.exposure-pair-head b { font-family: var(--font-mono); font-size: 10px; }
.exposure-pair-head span { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.exposure-bar { display: grid; grid-template-columns: 1fr 1fr; height: 9px; background: var(--paper-3); }
.exposure-bar i { display: block; height: 100%; }
.exposure-bar .put { justify-self: end; background: #bb6d64; }
.exposure-bar .call { background: #4b8c77; }
.quality-list { margin: 16px 0 0; padding: 11px 0 0; border-top: 1px solid var(--line); }
.quality-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 25px; color: var(--text-soft); font-size: 9px; }
.quality-row b { color: var(--text); font-family: var(--font-mono); font-size: 9px; }

.chain-section { margin-top: 22px; }
.chain-heading { align-items: flex-end; }
.chain-controls { display: flex; flex: 0 1 340px; gap: 7px; }
.chain-controls select { flex: 0 0 105px; }
.chain-controls input { flex: 1 1 auto; }
.chain-controls input,
.chain-controls select { min-height: 32px; padding: 5px 8px; font-size: 10px; }
.option-table th,
.option-table td { text-align: right; }
.option-table th:first-child,
.option-table td:first-child,
.option-table th:nth-child(2),
.option-table td:nth-child(2) { text-align: left; }
.data-provenance { padding: 10px 0; color: var(--text-faint); font-size: 9px; line-height: 1.7; }
.data-provenance a { color: var(--cyan); }

/* Settings and health */
.settings-grid { align-items: stretch; }
.settings-panel { min-width: 0; }
.state-label { color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.health-card { min-width: 0; padding: 13px; border: 1px solid var(--line); background: rgba(250,248,242,.75); }
.health-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.health-card h3 { margin: 0; font-size: 11px; }
.health-card p { margin: 8px 0 0; overflow: hidden; color: var(--text-faint); font-family: var(--font-mono); font-size: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.health-latency { color: var(--text-faint); font-family: var(--font-mono); font-size: 8px; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.source-grid > div { min-height: 90px; padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(250,248,242,.65); }
.source-grid b { display: block; font-size: 11px; }
.source-grid span { display: block; margin-top: 6px; color: var(--text-soft); font-size: 10px; line-height: 1.6; }

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 24px;
  color: var(--text-faint);
  text-align: center;
}
.empty-state.compact { min-height: 110px; }
.empty-state b { color: var(--text-soft); font-size: 12px; }
.empty-state span { max-width: 420px; margin-top: 4px; font-size: 10px; }
.empty-line { padding: 18px 0; color: var(--text-faint); font-size: 10px; text-align: center; }

/* Assistant */
#assistant {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  color: #dbe6e3;
  border-left: 1px solid #2b403d;
  background: var(--ink);
  z-index: 45;
}

.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 10px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid #2b403d;
}
.assistant-head h2 { margin: 2px 0 0; font-size: 14px; font-weight: 620; }
.assistant-head .eyebrow { color: #75aaa5; }
.assistant-head-actions { display: flex; gap: 3px; }
.assistant .icon-button { color: #8da29e; }
.assistant .icon-button:hover { color: #e2ebe8; border-color: #35504c; background: var(--ink-2); }
.assistant-close { display: none; }

.thread-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
  border-bottom: 1px solid #2b403d;
}
.thread-bar select {
  flex: 1 1 auto;
  min-height: 31px;
  color: #bfceca;
  border-color: #354b48;
  background: var(--ink-2);
  font-size: 10px;
}
.thread-bar select:focus { border-color: #5d918c; box-shadow: none; }
.thread-bar .subtle { width: 31px; height: 31px; }

.context-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 15px;
  border-bottom: 1px solid #2b403d;
  background: #0d1c1b;
}
.context-strip .status-dot { background: var(--cyan-bright); }
.context-strip small { display: block; color: #617975; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.context-strip b { display: block; max-width: 270px; overflow: hidden; color: #b8c9c5; font-size: 10px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }

.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #3a524f transparent;
}

.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 20px 3px; color: #79908c; text-align: center; }
.chat-monogram { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 13px; color: #a9c1bd; border: 1px solid #45605c; font-family: var(--font-serif); }
.chat-empty b { color: #cbd9d5; font-size: 12px; }
.chat-empty p { max-width: 270px; margin: 6px 0 15px; font-size: 10px; line-height: 1.6; }
.prompt-suggestions { display: grid; width: 100%; gap: 6px; }
.prompt-suggestions button { width: 100%; padding: 8px 9px; color: #8fa5a1; border: 1px solid #314845; border-radius: 1px; background: transparent; font-size: 9px; text-align: left; }
.prompt-suggestions button:hover { color: #dbe6e3; border-color: #4d6b67; background: var(--ink-2); }

.chat-message { margin: 0 0 18px; }
.chat-message-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: #677d79; font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.chat-message.user .chat-message-meta { color: #7fa9a4; }
.chat-message-body { color: #c6d3d0; font-size: 11px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user .chat-message-body { color: #edf3f1; }
.chat-message.is-error .chat-message-body { color: #d9958e; }
.chat-caret::after { display: inline-block; width: 5px; height: 12px; margin-left: 3px; background: #63a9a3; animation: caret .9s step-end infinite; vertical-align: -2px; content: ""; }
@keyframes caret { 50% { opacity: 0; } }

.chat-compose { flex: 0 0 auto; padding: 11px; border-top: 1px solid #2b403d; background: #0d1c1b; }
.chat-compose textarea { min-height: 72px; max-height: 150px; resize: none; color: #e2ebe8; border-color: #354b48; background: var(--ink-2); font-size: 11px; }
.chat-compose textarea:focus { border-color: #5d918c; box-shadow: none; }
.chat-compose textarea::placeholder { color: #607773; }
.chat-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.chat-compose-foot span { color: #5f7470; font-family: var(--font-mono); font-size: 8px; }
.send-button { min-width: 58px; min-height: 30px; padding: 4px 10px; color: #d9e9e6; border: 1px solid #4c716c; border-radius: 1px; background: #24413e; font-size: 10px; }
.send-button:hover:not(:disabled) { background: #2e504c; }

/* Footer / overlays */
.workspace-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 18px;
  min-height: 50px;
  margin: 0 clamp(22px, 2.5vw, 38px);
  padding: 13px 0;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  font-size: 9px;
}
.workspace-footer span:nth-child(2) { margin-left: auto; }
.workspace-footer a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-soft); text-decoration: none; }
.workspace-footer a:hover { color: var(--cyan); }
.workspace-footer svg { width: 11px; height: 11px; }

.drawer-backdrop { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(6, 15, 14, .48); backdrop-filter: blur(1px); }
.drawer-backdrop.is-open { display: block; }
.mobile-nav { display: none; }

.toast-region {
  position: fixed;
  z-index: 100;
  top: 66px;
  right: 16px;
  display: grid;
  width: min(340px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}
.toast { padding: 10px 12px; color: #e2ece9; border: 1px solid #3d5652; border-left: 3px solid var(--cyan-bright); border-radius: 1px; background: #142624; box-shadow: 0 8px 24px rgba(5, 12, 11, .2); font-size: 10px; pointer-events: auto; }
.toast.is-bad { border-left-color: #cf6f66; }

.noscript { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; color: #fff; background: var(--ink); text-align: center; }

/* Professional workstation revision: dense, neutral, content-first. */
:root {
  --ink: #172033;
  --ink-2: #202a3b;
  --ink-3: #2b3547;
  --paper: #f4f6f8;
  --paper-2: #ffffff;
  --paper-3: #edf0f3;
  --text: #20242b;
  --text-soft: #626b78;
  --text-faint: #8b94a1;
  --line: #dde2e8;
  --line-strong: #c9d0d8;
  --cyan: #3265a5;
  --cyan-bright: #4c7fbe;
  --cyan-soft: #e8f0fa;
  --font-serif: var(--font-sans);
  --sidebar-width: 208px;
  --assistant-width: 336px;
  --topbar-height: 48px;
}

body { background: var(--paper); font-size: 13px; }
.workspace { background: var(--paper); }
.topbar { padding: 0 14px; background: #fff; }
.topbar .brand-mark { color: #172033; border-color: #8791a2; }
.eyebrow { color: #6b7480; font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.health-pill { height: 28px; border-radius: 3px; background: #fff; }
.icon-button { width: 32px; height: 32px; border-radius: 3px; }

.sidebar { color: #e7eaf0; border-right-color: #263044; background: #172033; }
.sidebar-head { padding: 0 14px; border-bottom-color: #2b3548; }
.brand-mark { width: 27px; height: 27px; color: #fff; border-color: #657187; border-radius: 3px; font-family: var(--font-sans); font-size: 11px; font-weight: 700; }
.brand b { font-family: var(--font-sans); font-size: 14px; font-weight: 650; }
.brand small { color: #8994a8; font-family: var(--font-sans); font-size: 9px; letter-spacing: 0; }
.nav-list { padding: 10px 8px; }
.nav-caption { padding: 9px 9px 5px; color: #778197; font-family: var(--font-sans); font-size: 10px; letter-spacing: 0; text-transform: none; }
.nav-item { min-height: 38px; padding: 7px 9px; border-radius: 3px; color: #aeb6c5; }
.nav-item::before { left: -8px; }
.nav-item:hover { background: #202a3b; }
.nav-item.is-active { color: #fff; background: #2a3548; }
.nav-item.is-active::before { background: #6f9bd0; }
.nav-count { border-color: #51617b; background: #334158; }
.sidebar-status { padding: 12px 14px 14px; border-top-color: #2b3548; background: #131b2a; }
.sidebar-status p { color: #778197; }

.page { width: min(100%, 1220px); padding: 22px clamp(18px, 2vw, 30px) 42px; }
.page-header { align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom-color: var(--line); }
.page-header h1 { margin: 3px 0 4px; font-family: var(--font-sans); font-size: clamp(22px, 2vw, 28px); font-weight: 650; letter-spacing: -.02em; }
.page-intro { font-size: 12px; }
.button { min-height: 34px; padding: 7px 12px; border-radius: 3px; font-weight: 600; }
.button.primary { border-color: #284f82; background: #3265a5; }
.button.primary:hover:not(:disabled) { border-color: #244872; background: #2a568e; }
.section-block { margin-top: 22px; }
.section-heading { margin-bottom: 9px; }
.section-heading h2, .panel-head h2 { font-size: 13px; font-weight: 650; }
.section-index { display: none; }
.panel-head > div:first-child, .section-heading > div:first-child { gap: 0; }
.panel { border-radius: 0; background: #fff; }
.panel-head { min-height: 40px; }
.data-alert { border-radius: 0; background: #fff9ed; }

.decision-grid { display: block; border: 1px solid var(--line); background: #fff; }
.decision-card, .skeleton-card { min-height: 94px; padding: 13px 15px; border: 0; border-bottom: 1px solid var(--line); background: #fff; }
.decision-card:last-child { border-bottom: 0; }
.decision-card { display: grid; grid-template-columns: 180px minmax(0, 1fr) 105px; align-items: center; gap: 18px; }
.decision-card:hover { background: #f8fafc; }
.decision-card::before { top: 0; right: auto; bottom: 0; left: 0; width: 3px; height: auto; }
.decision-symbol { font-size: 17px; }
.decision-market { font-family: var(--font-sans); font-size: 10px; }
.rating-chip, .rating-badge { min-height: 22px; border-radius: 3px; font-family: var(--font-sans); font-size: 10px; letter-spacing: 0; text-transform: none; }
.decision-excerpt { margin: 0; font-family: var(--font-sans); font-size: 12px; line-height: 1.6; -webkit-line-clamp: 2; }
.decision-card-foot { align-items: flex-end; flex-direction: column; margin: 0; padding: 0; border: 0; font-family: var(--font-sans); font-size: 10px; }

.news-grid { display: block; border-top: 1px solid var(--line); }
.news-card { width: 100%; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.news-card h2 { margin: 6px 0 5px; font-family: var(--font-sans); font-size: 15px; font-weight: 600; }
.news-card-head, .news-card-foot { font-family: var(--font-sans); font-size: 10px; }
.news-card-foot { margin-top: 8px; padding-top: 0; border-top: 0; }
.news-card.report-index { border-left: 0; }

.option-signal { grid-template-columns: 3px minmax(0, 1fr); gap: 12px; padding: 11px 13px; border-color: var(--line); background: #fff; }
.option-signal span { font-family: var(--font-sans); font-size: 10px; letter-spacing: 0; text-transform: none; }
.option-signal h2 { display: inline; margin: 0 10px 0 0; font-family: var(--font-sans); font-size: 14px; font-weight: 650; }
.option-signal p { display: inline; font-size: 11px; }
.metric-grid { margin-top: 10px; background: #fff; }
.metric-card { min-height: 76px; padding: 10px 12px; background: #fff; }
.metric-label { font-family: var(--font-sans); font-size: 10px; letter-spacing: 0; text-transform: none; }
.metric-value { margin-top: 3px; font-size: 16px; }
.metric-meta { font-size: 9px; }
.option-charts { gap: 10px; margin-top: 10px; }
.chart-panel { min-height: 286px; }

.health-grid { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.health-card { border-top: 0; border-left: 0; background: #fff; }
.health-card p, .health-card-head, .health-latency { font-family: var(--font-sans); }
.source-grid > div { min-height: 76px; background: #fff; }

#assistant { color: var(--text); border-left-color: var(--line-strong); background: #fff; }
.assistant-head { min-height: 52px; border-bottom-color: var(--line); }
.assistant-head h2 { margin-top: 0; color: var(--text); }
.assistant-head .eyebrow { color: var(--text-faint); }
.assistant .icon-button { color: var(--text-soft); }
.assistant .icon-button:hover { color: var(--text); border-color: var(--line); background: var(--paper-3); }
.thread-bar { border-bottom-color: var(--line); }
.thread-bar select { color: var(--text); border-color: var(--line); background: #fff; }
.context-strip { min-height: 46px; border-bottom-color: var(--line); background: #f6f8fb; }
.context-strip small { color: var(--text-faint); letter-spacing: 0; text-transform: none; }
.context-strip b { color: var(--text-soft); }
.chat-log { padding: 14px; scrollbar-color: #c2c9d2 transparent; }
.chat-empty { color: var(--text-faint); }
.chat-monogram { color: #3265a5; border-color: #b8c8db; font-family: var(--font-sans); }
.chat-empty b { color: var(--text); }
.prompt-suggestions button { color: var(--text-soft); border-color: var(--line); border-radius: 3px; background: #fff; }
.prompt-suggestions button:hover { color: var(--text); border-color: #b7c3d2; background: #f6f8fb; }
.chat-message { margin-bottom: 15px; }
.chat-message-meta { color: var(--text-faint); font-family: var(--font-sans); font-size: 9px; text-transform: none; }
.chat-message.user .chat-message-meta { color: #587aa7; }
.chat-message-body { color: var(--text); font-size: 12px; line-height: 1.65; }
.chat-message.user .chat-message-body { padding: 8px 10px; color: #263b55; border-left: 2px solid #7da0ca; background: #f2f6fb; }
.chat-message.is-error .chat-message-body { color: var(--negative); }
.chat-compose { border-top-color: var(--line); background: #f6f8fb; }
.chat-compose textarea { color: var(--text); border-color: var(--line-strong); background: #fff; }
.chat-compose textarea::placeholder, .chat-compose-foot span { color: var(--text-faint); }
.send-button { color: #fff; border-color: #284f82; border-radius: 3px; background: #3265a5; }
.send-button:hover:not(:disabled) { background: #2a568e; }
.workspace-footer { font-size: 10px; }
.toast { color: var(--text); border-color: var(--line-strong); border-left-color: var(--cyan); border-radius: 3px; background: #fff; box-shadow: 0 8px 24px rgba(23, 32, 51, .14); }
.toast.is-bad { border-left-color: var(--negative); }

@media (max-width: 700px) {
  .page { padding: 18px 13px 32px; }
  .page-header h1 { font-size: 22px; }
  .decision-card { display: grid; grid-template-columns: 1fr; min-height: 0; gap: 10px; padding: 13px 12px; }
  .decision-card-foot { align-items: center; flex-direction: row; }
  .decision-excerpt { font-size: 12px; }
  .metric-card { min-height: 72px; }
}

/* Medium desktop: assistant becomes drawer */
@media (max-width: 1280px) {
  .app-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .topbar { grid-column: 2; }
  .assistant-toggle { display: inline-grid; }
  #assistant {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    width: min(var(--assistant-width), calc(100vw - 36px));
    height: auto;
    transform: translateX(101%);
    box-shadow: -15px 0 34px rgba(5, 14, 13, .18);
    transition: transform .2s ease;
  }
  #assistant.is-open { transform: translateX(0); }
  .assistant-close { display: inline-grid; }
}

@media (max-width: 1040px) {
  .decision-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-columns,
  .task-layout,
  .settings-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-charts { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --topbar-height: 50px; }
  body { overflow: hidden; }
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
  .topbar { grid-column: 1; padding: 0 10px; }
  .topbar-menu { display: inline-grid; margin-right: 4px; }
  .topbar-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .topbar-brand .brand-mark { width: 27px; height: 27px; font-size: 12px; }
  .brand-mobile-title { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
  .topbar-context { display: none; }
  .health-pill { width: 30px; padding: 0; justify-content: center; border: 0; }
  .health-pill span:last-child { display: none; }
  .freshness-text { display: none; }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, calc(100vw - 48px));
    height: auto;
    transform: translateX(-101%);
    box-shadow: 15px 0 34px rgba(5, 14, 13, .22);
    transition: transform .2s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .nav-item { min-height: 43px; }
  .sidebar-status { padding-bottom: calc(17px + env(safe-area-inset-bottom)); }

  .workspace { grid-column: 1; grid-row: 2; padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
  .page { min-height: calc(100dvh - var(--topbar-height) - var(--mobile-nav-height)); padding: 22px 16px 38px; }
  .page-header { align-items: flex-start; margin-bottom: 21px; padding-bottom: 17px; }
  .page-header h1 { font-size: 27px; }
  .page-intro { font-size: 11px; line-height: 1.55; }
  .page-actions { flex-direction: column; align-items: stretch; }
  .page-actions .button { min-height: 33px; }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line-strong);
    background: rgba(250, 248, 242, .97);
    box-shadow: 0 -8px 20px rgba(20, 34, 32, .05);
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    gap: 2px;
    padding: 4px 1px 2px;
    color: var(--text-faint);
    border: 0;
    border-top: 2px solid transparent;
    background: transparent;
    font-size: 9px;
  }
  .mobile-nav button svg { width: 17px; height: 17px; }
  .mobile-nav button.is-active { color: var(--ink); border-top-color: var(--cyan); }

  .archive-page { padding-right: 0; padding-left: 0; }
  .archive-page .archive-header { padding-right: 16px; padding-left: 16px; }
  .archive-layout { grid-template-columns: 215px minmax(0, 1fr); border-left: 0; border-right: 0; }
  .archive-index { min-width: 0; }
  .report-reader { padding: 0 16px 28px; }
  .report-head h2 { font-size: 21px; }
  .article { font-size: 14px; }

  .workspace-footer { margin: 0 16px; }
  .workspace-footer span:nth-child(2) { margin-left: 0; }
}

@media (max-width: 620px) {
  .page-header { display: block; }
  .page-actions { flex-direction: row; margin-top: 14px; }
  .page-actions .button { flex: 1 1 auto; }
  .options-actions { align-items: center; }
  .countdown { margin-right: auto; }

  .decision-grid { grid-template-columns: 1fr; }
  .decision-card,
  .skeleton-card { min-height: 166px; }
  .decision-excerpt { margin-top: 13px; -webkit-line-clamp: 2; }
  .news-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
  .source-grid { grid-template-columns: 1fr; }

  .run-row {
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 8px;
  }
  .run-flow,
  .run-row > svg { display: none; }
  .run-phase { grid-column: 2 / 4; padding-bottom: 4px; }

  .archive-header .archive-search { margin-top: 14px; }
  .archive-layout { display: block; min-height: 0; }
  .archive-index { border-right: 0; border-bottom: 1px solid var(--line); }
  .archive-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .archive-entry { flex: 0 0 190px; min-height: 86px; border-right: 1px solid var(--line); border-bottom: 0; }
  .archive-entry.is-active { box-shadow: inset 0 2px 0 var(--cyan); }
  .report-reader { min-height: 520px; }
  .report-head { min-height: 78px; }
  .ticker-tab { padding: 0 10px; }

  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 10px; }
  .metric-value { font-size: 15px; }
  .chart-panel { min-height: 280px; }
  .chart-frame { height: 196px; }
  .chain-heading { display: block; }
  .chain-controls { width: 100%; margin-top: 10px; }

  .news-toolbar { align-items: flex-start; flex-direction: column; }
  .segmented { width: 100%; }

  #assistant { top: 0; width: 100%; max-width: 100%; z-index: 70; }
  .assistant-head { padding-top: env(safe-area-inset-top); min-height: calc(58px + env(safe-area-inset-top)); }
  .assistant-backdrop { display: none !important; }
  .toast-region { top: 58px; }
}

@media (max-width: 390px) {
  .topbar { padding: 0 7px; }
  .topbar-tools { gap: 1px; }
  .icon-button { width: 32px; height: 32px; }
  .brand-mobile-title { max-width: 86px; }
  .page { padding-right: 13px; padding-left: 13px; }
  .page-header h1 { font-size: 25px; }
  .page-actions .button { padding-right: 8px; padding-left: 8px; font-size: 10px; }
  .overview-columns { gap: 12px; }
  .panel-head { padding: 0 11px; }
  .checklist,
  .compact-runs { padding-right: 11px; padding-left: 11px; }
  .archive-page .archive-header { padding-right: 13px; padding-left: 13px; }
  .report-reader { padding-right: 13px; padding-left: 13px; }
  .report-head h2 { font-size: 19px; }
  .article { font-size: 13.5px; line-height: 1.82; }
  .metric-card { min-height: 82px; }
  .option-signal { padding: 13px; }
  .option-signal h2 { font-size: 19px; }
  .workspace-footer { margin-right: 13px; margin-left: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 700px) {
  .page { padding: 18px 13px 32px; }
  .page-header h1 { font-size: 22px; }
  .decision-card { grid-template-columns: 1fr; min-height: 0; gap: 10px; padding: 13px 12px; }
  .decision-card-foot { align-items: center; flex-direction: row; }
  .decision-excerpt { margin: 0; }
  .skeleton-card { min-height: 110px; }
  .mobile-nav { background: rgba(255, 255, 255, .98); box-shadow: 0 -4px 14px rgba(23, 32, 51, .07); }
  .metric-card { min-height: 72px; }
  .option-signal h2 { display: block; margin: 2px 0; font-size: 15px; }
  .option-signal p { display: block; }
}

/* Enterprise console shell: neutral navigation and on-demand assistant drawer. */
.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.topbar { grid-column: 2; }
.workspace { grid-column: 2; }
.assistant-toggle { display: inline-grid; }

.sidebar {
  color: #1f2329;
  border-right-color: #e5e6eb;
  background: #f7f8fa;
}
.sidebar-head { border-bottom-color: #e5e6eb; }
.sidebar .brand-mark { display: none; }
.sidebar .brand b { color: #1f2329; font-size: 15px; }
.sidebar .brand small { display: none; }
.sidebar-close { color: #646a73; }
.nav-caption { color: #8f959e; }
.nav-item { color: #4e5969; border-radius: 0; }
.nav-item::before { display: none; }
.nav-item:hover { color: #1f2329; background: #eef0f3; }
.nav-item.is-active { color: #165dff; background: transparent; font-weight: 600; }
.nav-item.is-active svg { stroke-width: 2; }
.nav-count { color: #4e5969; border: 0; background: #e5e8ed; }
.nav-count.quiet { color: #86909c; }
.sidebar-status { color: #4e5969; border-top-color: #e5e6eb; background: #f7f8fa; }
.side-status-line { color: #86909c; }
.side-status-line strong { color: #4e5969; }
.sidebar-status p { color: #86909c; }

.decision-card::before { display: none; }
.decision-card { padding-left: 16px; }
.decision-card:hover { background: #f7f8fa; }

#assistant {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  left: auto;
  width: min(400px, calc(100vw - 48px));
  height: auto;
  transform: translateX(102%);
  box-shadow: -8px 0 28px rgba(31, 35, 41, .12);
  transition: transform .18s ease;
  z-index: 70;
}
#assistant.is-open { transform: translateX(0); }
.assistant-close { display: inline-grid; }
.assistant-backdrop { z-index: 60; background: rgba(31, 35, 41, .28); backdrop-filter: none; }
.button.primary, .send-button { border-color: #165dff; background: #165dff; }
.button.primary:hover:not(:disabled), .send-button:hover:not(:disabled) { border-color: #0e4ed8; background: #0e4ed8; }

@media (max-width: 700px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .topbar, .workspace { grid-column: 1; }
  .sidebar { box-shadow: 10px 0 30px rgba(31, 35, 41, .14); }
  .topbar .brand-mark { display: none; }
  .topbar-brand { gap: 0; }
  #assistant { top: 0; width: 100%; max-width: 100%; }
}

/* Restrained depth and motion: no decorative cards or neon effects. */
.workspace {
  background:
    radial-gradient(circle at 18% -8%, rgba(22, 93, 255, .065), transparent 30rem),
    linear-gradient(180deg, #f8fafe 0, #f4f6f9 340px, #f5f6f8 100%);
}
.topbar {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1px 0 rgba(31, 35, 41, .05), 0 5px 18px rgba(31, 35, 41, .035);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}
.sidebar {
  background: rgba(248, 249, 251, .94);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}
.sidebar-status { background: rgba(248, 249, 251, .78); }
.panel,
.decision-grid,
.option-signal,
.metric-card,
.health-card,
.source-grid > div {
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 1px 2px rgba(31, 35, 41, .025);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page.is-active { animation: page-enter .24s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-item,
.button,
.icon-button,
.health-pill,
.text-button,
.decision-card,
.news-card,
.prompt-suggestions button,
.send-button {
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .18s ease, transform .18s ease;
}
.button.primary,
.send-button {
  background: linear-gradient(135deg, #1d67f2 0%, #1454d8 100%);
  box-shadow: 0 4px 12px rgba(22, 93, 255, .16), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.button.primary:hover:not(:disabled),
.send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #155de8 0%, #0e49c6 100%);
  box-shadow: 0 6px 16px rgba(22, 93, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}
.button:active:not(:disabled),
.send-button:active:not(:disabled) { transform: translateY(0); }
.health-pill:hover,
.icon-button:hover { box-shadow: 0 3px 10px rgba(31, 35, 41, .07); }
.decision-card:hover { box-shadow: inset 0 0 0 1px rgba(22, 93, 255, .12); }
.news-card:hover { transform: translateX(2px); }
#assistant {
  background: rgba(255, 255, 255, .92);
  box-shadow: -16px 0 44px rgba(31, 35, 41, .14);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.assistant-backdrop.is-open { animation: backdrop-in .2s ease both; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.metric-card { animation: metric-enter .32s cubic-bezier(.22, 1, .36, 1) both; }
.metric-card:nth-child(2n) { animation-delay: .018s; }
.metric-card:nth-child(3n) { animation-delay: .036s; }
@keyframes metric-enter {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.chart-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: chart-draw .75s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
.exposure-bar i {
  transform: scaleX(0);
  animation: exposure-grow .48s .08s cubic-bezier(.22, 1, .36, 1) forwards;
}
.exposure-bar .put { transform-origin: right center; }
.exposure-bar .call { transform-origin: left center; }
@keyframes exposure-grow { to { transform: scaleX(1); } }
.mobile-nav {
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
