:root {
  --bg: #0a0d12;
  --panel: #11161f;
  --panel-strong: #161c27;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --text: #f3f6fb;
  --text-muted: #9aa3b5;
  --muted: #7f8798;
  --border: rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.12);
  --accent: #6c93ff;
  --accent-soft: rgba(108, 147, 255, 0.14);
  --success: #88d890;
  --success-soft: rgba(136, 216, 144, 0.12);
  --warning: #f3b248;
  --danger: #ff7070;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, 0.28);
  --shadow-xl: 0 26px 64px rgba(0, 0, 0, 0.34);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(108, 147, 255, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(136, 216, 144, 0.05), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
  opacity: 0.35;
  pointer-events: none;
}

.app-shell {
  position: relative;
  width: min(1320px, 100% - 32px);
  margin: 0 auto;
  padding: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-shell-glow {
  display: none; /* Replaced by body gradients */
}

.app-topbar,
.overview-strip,
.controls-pane,
.results-pane,
.job-state,
.summary-panel,
.history-panel,
.report-overview,
.report-summary-card,
.report-reader,
.section-list article {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.app-topbar,
.overview-strip,
.controls-pane,
.results-pane {
  position: relative;
  z-index: 1;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-bright);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 4.8vw, 4.1rem);
  line-height: 0.98;
}

h2 {
  font-size: 1.75rem;
  line-height: 1.2;
}

.lede,
.muted,
.hero-panel-body,
.section-list p,
.report-links span,
small {
  color: var(--muted);
}

.lede {
  max-width: 44ch;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.idle {
  background: rgba(255, 255, 255, 0.08);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-line,
.rating-strip,
.report-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  align-items: end;
  padding: 28px 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    var(--panel);
}

.overview-copy {
  max-width: 760px;
}

.launch-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.instrument-browser-header span:first-child,
.rating-strip span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.rating-strip strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.controls-pane,
.results-pane {
  padding: 22px;
}

.controls-pane {
  display: grid;
  align-content: start;
  gap: 18px;
}

.results-pane {
  display: grid;
  align-content: start;
  gap: 18px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.control-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

.mode-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.mode-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.mode-panel {
  display: grid;
  gap: 14px;
}

.mode-panel-active {
  animation: entry 0.35s var(--ease) both;
}

.control-stack {
  display: grid;
  gap: 14px;
}

.mode-note {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.mode-note p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.ticker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.control-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.ticker-field input {
  min-height: 64px;
  padding: 0 18px;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--panel-strong);
  border-color: var(--border-bright);
}

.ticker-field-hero input {
  min-height: 74px;
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.03);
}

.instrument-browser {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
}

.scan-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(108, 147, 255, 0.08), transparent 34%),
    var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.scan-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.scan-panel-header h3 {
  margin: 4px 0 0;
  font-size: 1rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.03em;
}

.scan-kicker {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.scan-action {
  margin-top: 0;
  min-width: 88px;
}

.scan-board {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.scan-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  animation: entry 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 0.05s);
}

@keyframes entry {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.scan-rank,
.scan-score {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scan-rank {
  background: var(--success-soft);
  color: var(--success);
}

.scan-score {
  background: var(--accent-soft);
  color: var(--accent);
}

.scan-card:hover,
.scan-card.active {
  border-color: var(--accent);
  background: rgba(108, 147, 255, 0.08);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.scan-card h4 {
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.scan-thesis {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.scan-metrics {
  margin-top: 14px;
}

.scan-metrics span,
.scan-signals span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.scan-signals {
  margin-top: 12px;
}

.scan-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.scan-loading span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(112, 225, 161, 0.9), rgba(75, 139, 255, 0.38));
  animation: scan-pulse 0.9s ease-in-out infinite;
}

.scan-loading span:nth-child(2) {
  animation-delay: 0.12s;
}

.scan-loading span:nth-child(3) {
  animation-delay: 0.24s;
}

.instrument-browser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.instrument-browser-header span:first-child {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.instrument-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
}

@keyframes scan-pulse {
  0%, 100% { transform: translateY(0) scale(0.82); opacity: 0.45; }
  50% { transform: translateY(-4px) scale(1); opacity: 1; }
}

.instrument-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}

.instrument-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.instrument-item span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.instrument-item:hover,
.instrument-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: none;
}

label,
fieldset {
  display: grid;
  gap: 8px;
}

label span,
legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input:not([type="checkbox"]),
select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  background: var(--panel-strong);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--duration) var(--ease), ring var(--duration) var(--ease);
}

.ticker-field input {
  height: 62px;
  padding: 0 16px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

.primary-action {
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.primary-action-inline {
  min-width: 150px;
}

.primary-action-block {
  width: 100%;
  margin-top: 4px;
}

.primary-action:hover {
  background: hsl(217.2 91.2% 50%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.secondary-action {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.secondary-action:hover:not(:disabled) {
  background: var(--surface-strong);
  border-color: var(--text-muted);
}

.job-state,
.summary-panel {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  border: 1px solid var(--border-bright);
}

.job-state {
  position: relative;
  overflow: hidden;
}

.job-state::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan-line 2s linear infinite;
}

@keyframes scan-line {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.history-panel {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid var(--border);
}

.section-heading-compact {
  margin-bottom: 16px;
}

.history-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.history-search {
  display: grid;
  gap: 8px;
}

.history-search span {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-pagination .secondary-action {
  margin-top: 0;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.history-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--panel-strong);
  animation: entry 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 0.05s);
}

.history-card-bullish {
  border-color: rgba(112, 225, 161, 0.34);
  box-shadow: inset 0 3px 0 rgba(112, 225, 161, 0.42), var(--shadow);
}

.history-card-bearish {
  border-color: rgba(255, 110, 110, 0.34);
  box-shadow: inset 0 3px 0 rgba(255, 110, 110, 0.42), var(--shadow);
}

.history-card-neutral {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 3px 0 rgba(108, 147, 255, 0.22), var(--shadow);
}

.history-ticker {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.history-call {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding: 4px 8px;
  background: var(--accent-soft);
  border-radius: 4px;
}

.history-card-bullish .history-call {
  color: var(--success);
  background: var(--success-soft);
}

.history-card-bearish .history-call {
  color: #ff9f9f;
  background: rgba(255, 110, 110, 0.12);
}

.history-date {
  font-size: 12px;
  color: var(--text-muted);
}

.history-headline strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 12px;
}

.history-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--success);
  padding: 2px 6px;
  border: 1px solid var(--success-soft);
  border-radius: 4px;
}
/* History Rating & Actions */

.history-rating {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.history-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.history-view,
.history-run,
.history-delete,
.report-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.history-view {
  min-width: 132px;
  border: 1px solid rgba(75, 139, 255, 0.38);
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.history-view:hover {
  transform: translateY(-1px);
  background: hsl(217.2 91.2% 50%);
  border-color: hsl(217.2 91.2% 50%);
  box-shadow: var(--shadow-lg);
}

.history-run {
  border-radius: 999px;
  border: 1px solid rgba(112, 225, 161, 0.28);
  background: rgba(112, 225, 161, 0.08);
  color: var(--text);
}

.history-run:hover,
.history-delete:hover,
.report-delete-button:hover {
  transform: translateY(-1px);
  background: rgba(75, 139, 255, 0.16);
  border-color: rgba(75, 139, 255, 0.5);
}

.history-delete,
.report-delete-button {
  border: 1px solid rgba(255, 110, 110, 0.28);
  background: rgba(255, 110, 110, 0.08);
  color: #ffd4d4;
}

.shell-report {
  padding-top: 18px;
}

.report-topbar-shell,
.report-actions,
.report-pill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-topbar-shell {
  padding: 16px 24px;
  background: var(--panel-strong);
  border-radius: var(--radius);
}

.report-actions {
  justify-content: flex-end;
}

.report-backlink {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}

.report-backlink:hover {
  color: var(--text);
}

.report-overview,
.report-summary-card,
.report-reader {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.report-overview {
  margin-top: 16px;
  padding: 26px 28px;
  border-radius: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
}

.report-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-overview-grid article {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
}

.report-overview-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.report-overview-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.4;
}

.report-shell {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  align-items: start;
}

.report-main {
  display: grid;
  gap: 20px;
}

.report-summary-card,
.report-reader {
  border-radius: 24px;
}

.report-summary-card {
  padding: 28px;
  position: sticky;
  top: 24px;
}

.report-title {
  margin: 20px 0 12px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.report-thesis {
  margin: 0;
  color: #d9dfeb;
  line-height: 1.7;
  font-size: 1rem;
}

.report-meta-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-meta-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.report-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-meta-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.45;
}

.report-nav {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}

.report-nav span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.report-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.report-nav a:hover {
  color: var(--accent);
}

.report-brief-panel,
.report-lane-card,
.report-narrative-shell {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.report-brief-panel {
  padding: 28px;
}

.report-brief-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.report-call-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-brief-lede {
  margin: 18px 0 0;
  color: #dbe1ea;
  font-size: 1.05rem;
  line-height: 1.7;
}

.report-overview-grid-compact {
  margin-top: 18px;
}

.report-lane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-lane-card {
  padding: 22px;
}

.report-lane-card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.report-lane-card p {
  margin: 12px 0 0;
  color: #dbe1ea;
  line-height: 1.65;
}

.report-lane-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.report-lane-card li + li {
  margin-top: 8px;
}

.report-narrative-shell {
  overflow: hidden;
}

.report-details summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.report-details summary::-webkit-details-marker {
  display: none;
}

.report-details summary strong {
  font-size: 0.98rem;
}

.report-reader {
  padding: 48px;
  border-radius: var(--radius-xl);
  line-height: normal;
}

.report-reader-top {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.report-reader-top h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.report-reader h1,
.report-reader h2,
.report-reader h3,
.report-reader h4 {
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.report-reader h1:first-child,
.report-reader h2:first-child {
  margin-top: 0;
}

.report-reader p,
.report-reader li {
  color: hsl(240 5% 84%);
  line-height: 1.7;
  font-size: 16px;
  margin-bottom: 1.25em;
}

.report-reader table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-reader th,
.report-reader td {
  padding: 14px;
  border: 1px solid var(--border-bright);
  text-align: left;
}

.report-reader th {
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 600;
}

.report-reader blockquote {
  margin: 32px 0;
  padding: 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--panel-strong);
  font-style: italic;
  color: var(--text-muted);
}

.report-reader hr {
  border: 0;
  border-top: 1px solid var(--border-bright);
  margin: 48px 0;
}

.activity-shell {
  margin-top: 24px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-bright);
}

.activity-radar {
  position: relative;
  width: 72px;
  height: 72px;
}

.radar-ring,
.radar-core {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.radar-ring {
  border: 1px solid rgba(75, 139, 255, 0.32);
  animation: radar-pulse 2.4s ease-out infinite;
}

.radar-ring-b {
  animation-delay: 1.2s;
}

.radar-core {
  inset: 18px;
  background: radial-gradient(circle, rgba(112, 225, 161, 0.92), rgba(75, 139, 255, 0.36));
  box-shadow: 0 0 24px rgba(75, 139, 255, 0.38);
  animation: core-glow 1.8s ease-in-out infinite;
}

.activity-bars {
  height: 58px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.activity-bars span {
  width: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(112, 225, 161, 0.95), rgba(75, 139, 255, 0.35));
  animation: signal-bars 1.05s ease-in-out infinite;
  transform-origin: bottom;
}

.activity-bars span:nth-child(1) { height: 22px; animation-delay: 0s; }
.activity-bars span:nth-child(2) { height: 42px; animation-delay: 0.14s; }
.activity-bars span:nth-child(3) { height: 30px; animation-delay: 0.28s; }
.activity-bars span:nth-child(4) { height: 50px; animation-delay: 0.42s; }
.activity-bars span:nth-child(5) { height: 26px; animation-delay: 0.56s; }

.activity-copy {
  min-width: 0;
}

.activity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
}

.activity-phases {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.activity-phase {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}

.activity-phase strong {
  display: block;
  font-size: 0.9rem;
}

.activity-phase p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.activity-phase-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.activity-phase-complete .activity-phase-dot {
  background: var(--success);
}

.activity-phase-active {
  border-color: rgba(75, 139, 255, 0.35);
  background: rgba(75, 139, 255, 0.08);
}

.activity-phase-active .activity-phase-dot {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(75, 139, 255, 0.12);
}

.activity-phase-error .activity-phase-dot {
  background: #ff7b7b;
}

.activity-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

#activity-stage {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.summary-panel {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--panel-strong), var(--bg));
}

.summary-panel-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.summary-context {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  color: #d8deea;
}

.summary-state-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hidden {
  display: none;
}

.highlight-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.highlight-grid article {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.highlight-label {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.highlight-grid h3,
.section-list h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.report-links {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.report-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.section-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.section-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-list article {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.012));
}

.section-card-top,
.section-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.section-card-top {
  margin-bottom: 12px;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-preview {
  margin: 0;
  color: #dbe1ea;
  line-height: 1.65;
  font-size: 0.98rem;
}

.section-points {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.section-points li + li {
  margin-top: 8px;
}

.section-details {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 14px;
}

.section-details summary {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-details summary::-webkit-details-marker {
  display: none;
}

.section-detail-copy {
  margin-top: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  color: #dbe1ea;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 1200px) {
  .overview-strip {
    grid-template-columns: 1fr;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .report-shell {
    grid-template-columns: 1fr;
  }

  .report-summary-card {
    position: static;
  }

  .report-overview {
    grid-template-columns: 1fr;
  }

  .report-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .app-shell {
    width: 100%;
    padding: 20px 16px;
  }

  .app-topbar {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  
  .overview-strip {
    padding: 20px;
  }

  .launch-bar,
  .ticker-row,
  .control-split,
  .history-toolbar,
  .section-list-header {
    grid-template-columns: 1fr;
  }

  .mode-tabs {
    width: 100%;
  }

  .controls-pane,
  .results-pane,
  .job-state,
  .summary-panel,
  .history-panel {
    padding: 16px;
  }

  .report-topbar-shell,
  .report-overview,
  .report-summary-card,
  .report-reader,
  .report-brief-panel,
  .report-lane-card,
  .report-narrative-shell {
    border-radius: 20px;
  }

  .ticker-field input {
    font-size: 24px;
  }

  .ticker-field-hero input {
    min-height: 66px;
    font-size: 1.8rem;
  }

  .history-list {
    grid-template-columns: 1fr;
  }

  .history-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .history-view,
  .history-run,
  .history-delete {
    width: 100%;
  }

  .activity-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .activity-radar,
  .activity-bars {
    justify-self: start;
  }

  .report-topbar-shell {
    padding: 16px;
    align-items: stretch;
    gap: 16px;
  }

  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  .report-actions .secondary-action,
  .report-actions .history-delete,
  .report-actions .report-backlink {
    justify-content: center;
    width: 100%;
    min-height: 42px;
  }

  .report-backlink {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-bright);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
  }

  .report-overview {
    padding: 20px;
  }

  .report-title {
    margin: 14px 0 10px;
    font-size: clamp(1.7rem, 9vw, 2.3rem);
  }

  .report-thesis,
  .report-brief-lede {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .section-list-header,
  .section-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .report-lane-grid,
  .report-overview-grid,
  .report-meta-grid {
    grid-template-columns: 1fr;
  }

  .report-reader,
  .report-summary-card,
  .report-brief-panel,
  .report-lane-card {
    padding: 20px;
  }

  .report-details summary,
  .report-brief-head {
    align-items: stretch;
    flex-direction: column;
  }

  .report-details summary {
    padding: 16px 18px;
  }

  .report-reader {
    padding: 20px 18px;
  }

  .report-reader p,
  .report-reader li {
    font-size: 15px;
    line-height: 1.65;
  }

  .report-reader th,
  .report-reader td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .report-nav {
    gap: 8px;
  }

  .report-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
  }
}

@keyframes radar-pulse {
  0% {
    transform: scale(0.35);
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes core-glow {
  0%, 100% {
    transform: scale(0.94);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes signal-bars {
  0%, 100% {
    transform: scaleY(0.45);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1.1);
    opacity: 1;
  }
}
