/* Z2H Retail SaaS — design tokens & shared styles */

:root {
  /* Fonts — landing site (zero2h.com z2h-shared.css) 와 통일 */
  --font-sans:    'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;
  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif:   'Instrument Serif', 'Times New Roman', Georgia, serif;

  /* Z2H light mode — landing 'paper' tone (cream surface on ink-text) */
  --bg:      #F5F2EC;          /* paper (landing --paper) */
  --bg-2:    #FFFFFF;
  --bg-3:    #EDE8DE;          /* paper-2 (landing --paper-2) */
  --surface: #FFFFFF;
  --line:    #E2E0D7;
  --line-2:  #C8C5B9;

  --ink:     #0A0E14;          /* landing --ink (near-black, slight navy) */
  --ink-2:   #2A3445;
  --ink-3:   #5A6478;
  --ink-4:   #8A92A0;

  --accent:    #C5B358;        /* landing --accent (aged gold) */
  --accent-2:  #8F7E2B;        /* gold darker (hover) */
  --accent-bg: #F7F2DC;        /* gold tint surface */
  --accent-ln: #DCC97D;

  --pos:      #6FB58A;         /* landing --signal (discreet green) */
  --pos-bg:   #DEF0E4;
  --neg:      #C66B6B;         /* landing --danger (discreet red) */
  --neg-bg:   #F5DCDC;
  --warn:     #D4A05B;         /* landing --warn (discreet amber) */
  --warn-bg:  #FBF0DC;
  --info:     #2B6FB5;
  --info-bg:  #E1ECF7;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-1: 0 1px 0 oklch(0.92 0.006 85);
  --shadow-2: 0 1px 2px rgba(20,20,30,0.04), 0 0 0 1px var(--line);
  --shadow-3: 0 10px 32px -8px rgba(20,20,30,0.10), 0 0 0 1px var(--line);
}

.theme-dark {
  /* Z2H dark mode — landing 사이트 (zero2h.com) 와 통일된 --ink palette */
  --bg:      #0A0E14;          /* landing --ink (primary surface) */
  --bg-2:    #11161E;          /* landing --ink-2 */
  --bg-3:    #1A2029;          /* landing --ink-3 */
  --surface: #11161E;
  --line:    rgba(255,255,255,0.08);
  --line-2:  rgba(255,255,255,0.14);

  --ink:     #E7E4DC;          /* landing --text (warm off-white) */
  --ink-2:   #9CA3AF;           /* landing --text-mute */
  --ink-3:   #5F6B7A;           /* landing --text-faint */
  --ink-4:   #44505E;

  --accent:    #C5B358;        /* landing --accent (aged gold) */
  --accent-2:  #E8DFAF;        /* landing --accent-2 (gold highlight) */
  --accent-bg: rgba(197,179,88,0.10);
  --accent-ln: rgba(197,179,88,0.32);

  --pos:      #6FB58A;         /* landing --signal */
  --pos-bg:   rgba(111,181,138,0.12);
  --neg:      #C66B6B;         /* landing --danger */
  --neg-bg:   rgba(198,107,107,0.14);
  --warn:     #D4A05B;         /* landing --warn */
  --warn-bg:  rgba(212,160,91,0.12);
  --info:     #4A90E2;
  --info-bg:  rgba(74,144,226,0.12);

  --shadow-1: 0 1px 0 oklch(0.27 0.010 260);
  --shadow-2: 0 1px 2px rgba(0,0,0,0.3), 0 0 0 1px var(--line);
  --shadow-3: 0 12px 36px -8px rgba(0,0,0,0.55), 0 0 0 1px var(--line);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
}

/* density */
.density-compact { --row-h: 26px; --pad-y: 6px; --pad-x: 10px; }
.density-cozy    { --row-h: 32px; --pad-y: 8px; --pad-x: 12px; }
.density-comfy   { --row-h: 40px; --pad-y: 12px; --pad-x: 16px; }

/* primitives */
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-3); font-weight: 500;
}
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-4); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 16px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: var(--bg-3); color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.ok   { background: var(--pos-bg);  color: var(--pos);  border-color: transparent; }
.pill.neg  { background: var(--neg-bg);  color: var(--neg);  border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.pill.solid { background: var(--ink); color: var(--bg); border-color: transparent; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 500; font-size: 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
}
.btn:hover { background: var(--bg-2); }
.btn.primary {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}
.btn.primary:hover { background: var(--ink-2); }
.btn.danger { background: var(--neg); color: white; border-color: var(--neg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-2); }

kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 5px; border-radius: 4px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--ink-2);
}

/* rows */
.row {
  display: grid; align-items: center;
  height: var(--row-h, 32px); padding: 0 var(--pad-x, 12px);
  border-bottom: 1px solid var(--line); font-size: 12px;
}
.row:last-child { border-bottom: none; }
.row.hover:hover { background: var(--bg-2); cursor: default; }
.row .h { color: var(--ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* app shell — retail SaaS top-nav */
.app {
  display: grid;
  grid-template-rows: 56px 40px 1fr;
  grid-template-areas:
    "top"
    "tabs"
    "main";
  height: 100vh;
  overflow: hidden;
}

.topbar {
  grid-area: top;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 22px;
  gap: 16px;
}
.tabs {
  grid-area: tabs;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
  display: flex; align-items: stretch;
  gap: 0;
}
.tab {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
  border: none;
  background: transparent;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  position: relative;
  font-family: inherit;
  white-space: nowrap;
}
.btn { white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 8px; right: 8px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-3);
  padding: 0 5px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex; align-items: center;
  color: var(--ink-3);
}
.tab.active .badge { background: var(--accent-bg); color: var(--accent); }

.main {
  grid-area: main;
  overflow: auto;
  background: var(--bg);
}

/* sections */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }

/* utility */
.row-flex { display: flex; align-items: center; gap: 8px; }
.col-flex { display: flex; flex-direction: column; gap: 4px; }
.gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.grow { flex: 1; }
.txt-pos { color: var(--pos); } .txt-neg { color: var(--neg); } .txt-warn { color: var(--warn); }
.txt-info { color: var(--info); } .txt-3 { color: var(--ink-3); } .txt-4 { color: var(--ink-4); }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.fs-10 { font-size: 10px; } .fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-22 { font-size: 22px; }

/* animations */
@keyframes pulse-soft { 0%,100% { opacity: 1 } 50% { opacity: 0.55 } }
.pulse { animation: pulse-soft 1.6s ease-in-out infinite; }
@keyframes slide-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.slide-in { animation: slide-in 0.25s ease-out both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fade-in 0.2s ease-out both; }

/* ── Print / "Save as PDF" — make the printed Reports page clean ─────────
   Strategy: hide everything except the report body + meta. Force light tones
   so the PDF reads in monochrome too. */
@media print {
  /* ── 1. colour tokens → print-safe values ──────────────────────────── */
  :root, body.theme-dark, body.theme-light {
    --bg: white; --bg-2: white; --bg-3: #fafafa; --surface: white;
    --ink: #111; --ink-2: #333; --ink-3: #555; --ink-4: #888;
    --line: #ddd; --line-2: #ccc;
    --accent: #8a7a2a; --accent-2: #6a5e2b; --accent-bg: #fff8e0;
    --pos: #2a8060; --neg: #8a3030; --warn: #8a6a20; --info: #2a5a8a;
  }
  body { background: white !important; color: black !important; }

  /* ── 2. unlock the fixed-height app shell so full content renders ───── */
  /* .app is 100vh + overflow:hidden — this is why only the viewport printed */
  .app {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  /* All scrollable inner containers must also be unlocked */
  .analysis-workspace,
  .analysis-inner,
  .fr-inner,
  .operating-layer,
  .report-body,
  .section-body,
  [style*="overflow"] {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  /* ── 3. hide chrome, sidebars, interactive elements ────────────────── */
  .topbar, .tabs, .ambient, .grain,
  .report-archive-rail, .timeline-rail,
  button, [data-print-hide] { display: none !important; }

  /* ── 4. cosmetic cleanup ─────────────────────────────────────────────── */
  .card { background: white !important; box-shadow: none !important; border: 1px solid #ddd !important; }
  .pill { border: 1px solid #ccc !important; background: white !important; }

  /* ── 5. page layout ─────────────────────────────────────────────────── */
  .report-section, .fr-section, .analysis-panel { break-inside: avoid; page-break-inside: avoid; }
  @page { size: A4; margin: 14mm; }
}


/* Market state operating layer — checked, not read */
.analysis-workspace {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
}
.analysis-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 22px 28px 64px;
}
.state-hero {
  min-height: 30vh;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 14px;
}
.state-hero.state-danger { border-left: 8px solid var(--neg); }
.state-hero.state-watch { border-left: 8px solid var(--warn); }
.state-hero.state-prepare { border-left: 8px solid var(--info); }
.state-hero.state-tradeable { border-left: 8px solid var(--pos); }
.state-hero-topline,
.state-hero-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.state-symbol-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.state-symbol {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  color: var(--ink);
}
.state-price {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.state-price.pos { color: var(--pos); }
.state-price.neg { color: var(--neg); }
.state-price.neutral { color: var(--ink-3); }
.state-time {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-4);
  text-align: right;
}
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--neg);
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.03em;
}
.state-tradeable .state-badge { background: rgba(34, 197, 94, 0.12); color: var(--pos); }
.state-watch .state-badge { background: rgba(245, 158, 11, 0.14); color: var(--warn); }
.state-prepare .state-badge { background: rgba(59, 130, 246, 0.12); color: var(--info); }
.state-hero h1 {
  margin: 18px 0 0;
  max-width: 760px;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.state-action-card {
  width: min(380px, 34vw);
  min-width: 300px;
  padding: 18px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.state-action-card strong {
  display: block;
  margin-top: 9px;
  font-size: 24px;
  line-height: 1.16;
  font-weight: 850;
  color: var(--ink);
}
.state-action-card p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}
.analysis-eyebrow {
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  font-weight: 750;
}
.awareness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.awareness-tile {
  min-height: 98px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.awareness-tile > span {
  display: block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 10px;
}
.awareness-tile strong,
.mini-state strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  color: var(--ink);
}
.awareness-tile em,
.mini-state em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-4);
}
.awareness-tile.neg { border-top: 4px solid var(--neg); }
.awareness-tile.warn { border-top: 4px solid var(--warn); }
.awareness-tile.pos { border-top: 4px solid var(--pos); }
.awareness-tile.neutral { border-top: 4px solid var(--line-2); }
.operating-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.analysis-panel {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.analysis-title {
  margin: 6px 0 16px;
  font-size: 20px;
  line-height: 1.16;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.priority-panel .analysis-title { font-size: 26px; }
.change-feed,
.risk-stack,
.scenario-compact-list,
.source-compact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.change-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.change-row span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  background: var(--surface);
  color: var(--ink-3);
}
.change-row.neg span { color: var(--neg); }
.change-row.pos span { color: var(--pos); }
.change-row.warn span { color: var(--warn); }
.change-row p {
  margin: 1px 0 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 14px;
}
.why-primary {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.why-primary strong {
  font-size: 20px;
  line-height: 1.25;
}
.why-primary p,
.risk-card p,
.scenario-compact p,
.source-compact-list p,
.structure-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}
.why-actions {
  display: grid;
  gap: 10px;
}
.mini-state {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.mini-state > span { font-size: 18px; line-height: 1; }
.risk-card,
.scenario-compact {
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
}
.risk-card.neg { border-left-color: var(--neg); }
.risk-card.warn { border-left-color: var(--warn); }
.risk-card strong,
.scenario-compact strong {
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
}
.structure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.structure-grid div {
  min-height: 112px;
  padding: 13px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.structure-grid span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 800;
}
.structure-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.25;
  color: var(--ink);
}
.structure-grid p {
  margin: 7px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink-3);
}
.analysis-muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}
.analysis-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
}

.timeline-rail {
  width: 330px;
  flex: 0 0 330px;
  padding: 16px 14px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.timeline-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}
.timeline-head h3 {
  margin: 5px 0 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.timeline-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.timeline-filters button {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.timeline-filters button.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--ink);
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.timeline-root-block {
  position: relative;
  padding-left: 13px;
}
.timeline-root-block::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  bottom: 6px;
  width: 2px;
  background: var(--line-2);
}

.timeline-root-shell { display: contents; }
.timeline-root-block.collapsed::before { bottom: 18px; }
.timeline-card { background: var(--surface); }

.timeline-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.timeline-symbol-badge,
.timeline-type-badge,
.timeline-session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.timeline-symbol-badge {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.timeline-type-badge {
  background: var(--bg-3);
  color: var(--ink-2);
}
.timeline-type-weekly,
.timeline-type-daily,
.timeline-type-full {
  background: var(--accent-bg);
  color: var(--accent-2);
  border-color: color-mix(in oklab, var(--accent) 30%, var(--line));
}
.timeline-type-update {
  background: color-mix(in oklab, var(--info) 12%, var(--bg-2));
  color: var(--info);
  border-color: color-mix(in oklab, var(--info) 25%, var(--line));
}
.timeline-type-alert {
  background: color-mix(in oklab, var(--warn) 14%, var(--bg-2));
  color: var(--warn);
  border-color: color-mix(in oklab, var(--warn) 30%, var(--line));
}
.timeline-session-badge {
  background: transparent;
  color: var(--ink-4);
  font-weight: 650;
}

.timeline-root,
.timeline-child {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.timeline-root {
  padding: 13px;
}
.timeline-root::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-2);
}
.timeline-root-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.timeline-root-top strong {
  font-size: 14px;
  line-height: 1.2;
}
.timeline-root-top span {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--ink-4);
}
.timeline-root-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.timeline-toggle {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}
.timeline-toggle:hover,
.timeline-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--ink);
  outline: none;
}
.timeline-root p { display: none; }
.timeline-children {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
  padding-left: 10px;
}
.timeline-child {
  display: block;
  padding: 11px 12px;
}
.timeline-child-mark {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  color: var(--info);
}
.timeline-child-mark.alert { color: var(--neg); }
.timeline-child-mark.update { color: var(--pos); }
.timeline-child-text {
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}
.timeline-child-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.timeline-child-copy strong {
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 750;
}
.timeline-child-copy em {
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-3);
  font-style: normal;
}
.timeline-child-alert .timeline-child-copy strong {
  color: var(--neg);
}
.timeline-child-alert .timeline-child-copy em {
  color: var(--ink-2);
}
.timeline-empty,
.timeline-empty-child {
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  color: var(--ink-4);
  background: var(--surface);
}
.timeline-empty {
  padding: 16px;
}
.timeline-empty strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.timeline-empty p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.timeline-empty-child {
  padding: 10px;
  font-size: 11px;
  line-height: 1.35;
}
.empty-timeline-state {
  min-height: 54vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: var(--surface);
}
.empty-timeline-state h1 {
  margin: 10px 0 0;
  max-width: 720px;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.empty-timeline-state p {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
}
.empty-timeline-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}
.empty-timeline-rules span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 12px;
  font-weight: 750;
  color: var(--ink);
}


.full-report-inner { max-width: 1280px; }
.full-report-hero {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
  margin-bottom: 14px;
}
.full-report-hero.state-danger { border-left: 8px solid var(--neg); }
.full-report-hero.state-watch { border-left: 8px solid var(--warn); }
.full-report-hero.state-prepare { border-left: 8px solid var(--info); }
.full-report-hero.state-tradeable { border-left: 8px solid var(--pos); }
.full-report-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}
.full-report-heading h1 {
  margin: 0;
  max-width: 880px;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.full-report-heading p {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
}
.full-report-market {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.full-report-market span,
.full-report-market em {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-4);
}
.full-report-market strong {
  display: block;
  margin: 7px 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  color: var(--ink);
}
.full-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.full-report-summary div {
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.full-report-summary span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 800;
}
.full-report-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
}
.full-report-grid .analysis-panel { min-height: 0; }

@media (max-width: 980px) {
  .full-report-heading,
  .full-report-summary { grid-template-columns: 1fr; }
  .full-report-heading h1 { font-size: 32px; }
  .timeline-rail { width: 280px; flex-basis: 280px; padding: 12px; }
  .timeline-head h3 { font-size: 18px; }
  .empty-timeline-state { min-height: 46vh; padding: 26px; }
  .empty-timeline-state h1 { font-size: 32px; }
  .analysis-inner { padding: 16px 14px 52px; }
  .state-hero { min-height: auto; padding: 20px; }
  .state-hero-topline,
  .state-hero-grid { display: grid; grid-template-columns: 1fr; }
  .state-time { text-align: left; }
  .state-action-card { width: auto; min-width: 0; }
  .state-hero h1 { font-size: 30px; }
  .awareness-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operating-grid { grid-template-columns: 1fr; }
  .analysis-panel { grid-column: span 1 !important; }
  .why-grid,
  .structure-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .timeline-rail { display: none; }
  .awareness-strip { grid-template-columns: 1fr; }
  .state-symbol-line { flex-wrap: wrap; }
  .state-hero h1 { font-size: 26px; }
}


/* ── Full Report (Session Preview) narrative layout ── */
.fr-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 32px 80px;
  font-family: var(--font-body);
}

/* header */
.fr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.fr-kicker {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-weight: 650;
  margin-bottom: 6px;
}
.fr-price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.fr-price {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.fr-price-arrow { font-size: 18px; }
.fr-price-arrow.pos { color: var(--pos); }
.fr-price-arrow.neg { color: var(--neg); }
.fr-price-arrow.neutral { color: var(--ink-3); }
.fr-price-delta { font-size: 13px; color: var(--ink-3); font-feature-settings: "tnum"; }
.fr-price-delta.pos { color: var(--pos); }
.fr-price-delta.neg { color: var(--neg); }

.fr-header-right { flex-shrink: 0; }
.fr-session-times {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 14px;
  text-align: right;
  font-size: 12px;
}
.fr-session-times span { color: var(--ink-3); }
.fr-session-times strong { color: var(--ink); font-feature-settings: "tnum"; }

.fr-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.fr-subtitle {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 20px;
  line-height: 1.5;
}
.fr-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 32px;
}

/* sections */
.fr-section {
  margin-bottom: 36px;
}
.fr-section-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--ink-3);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.fr-body-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}

/* macro driver list */
.fr-driver-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fr-driver-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.fr-driver-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  flex-shrink: 0;
  margin-top: 3px;
  font-weight: 600;
}
.fr-driver-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}

/* key event */
.fr-event-block {
  background: var(--surface);
  border-left: 3px solid var(--warn);
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
}
.fr-event-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.fr-event-note {
  font-size: 13px;
  color: var(--ink-2);
  margin: 4px 0 0;
}
.fr-event-warn {
  font-size: 13px;
  color: var(--warn);
  margin: 8px 0 0;
  font-weight: 600;
}

/* structural conditions */
.fr-condition-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fr-condition {
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--surface);
  border-left: 3px solid var(--ink-4);
}
.fr-condition.neg { border-left-color: var(--neg); }
.fr-condition.warn { border-left-color: var(--warn); }
.fr-condition.pos { border-left-color: var(--pos); }

/* model approach section */
.fr-model-section { border-top: 2px solid var(--line); padding-top: 28px; }
.fr-model-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
  background: var(--surface);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.fr-model-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.fr-model-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0 16px;
  align-items: baseline;
}
.fr-model-row span { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; padding-top: 2px; }
.fr-model-row strong { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--ink); }
.fr-model-row p { grid-column: 2; font-size: 13px; color: var(--ink-2); margin: 2px 0 0; line-height: 1.5; }
.fr-model-note {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 20px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 6px;
}

/* scenarios */
.fr-scenarios { margin-top: 20px; }
.fr-subsection-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  font-weight: 700;
  margin: 0 0 12px;
}
.fr-scenario-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.fr-scenario-row:last-child { border-bottom: none; }
.fr-scenario-row strong { font-size: 13px; color: var(--ink); display: block; margin-bottom: 3px; }
.fr-scenario-row p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.55; }

/* footer */
.fr-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--ink-4);
}

@media (max-width: 600px) {
  .fr-inner { padding: 20px 16px 60px; }
  .fr-header { flex-direction: column; gap: 12px; }
  .fr-header-right { align-self: flex-start; }
  .fr-session-times { text-align: left; }
  .fr-model-row { grid-template-columns: 1fr; gap: 2px; }
  .fr-model-row p { grid-column: 1; }
}


/* Mobile web layout — compact service window */
@media (max-width: 760px) {
  html, body { min-width: 0; overflow-x: hidden; }
  body { font-size: 12px; }

  .app {
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100dvh;
  }

  .topbar {
    min-height: 54px;
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: wrap;
    align-content: center;
  }
  .topbar .grow { display: none; }
  .topbar > button[title^="Search"] span,
  .topbar > button[title^="Search"] kbd { display: none; }
  .topbar > button[title^="Search"] {
    width: 32px !important;
    padding: 0 !important;
    justify-content: center;
  }
  .topbar > div:first-child { min-width: 112px; flex: 1 1 auto; }
  .topbar > div:first-child > div:last-child span:last-child { display: none; }
  .topbar > a {
    margin-left: auto;
    padding-left: 6px !important;
    gap: 4px !important;
  }
  .topbar > a > div:last-child { display: none !important; }
  .topbar .pill { display: none; }
  .topbar > span.mono { display: none; }
  .topbar > div[style*="width: 1px"] { display: none !important; }

  .tabs {
    min-height: 42px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 6px;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    flex: 0 0 auto;
    min-width: 74px;
    justify-content: center;
    padding: 0 10px;
    font-size: 12px;
  }
  .tab .badge { position: static; }

  .main { min-height: 0; overflow: hidden; }

  .reports-shell {
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0;
    overflow: hidden;
  }
  .reports-main-pane {
    min-height: 0;
    overflow: hidden;
  }
  .reports-toolbar {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .reports-toolbar .grow { flex: 1 1 auto; }

  .timeline-rail {
    display: block !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    max-height: 230px;
    padding: 10px 10px 8px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow-y: auto;
  }
  .timeline-head {
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
  }
  .timeline-head h3 { font-size: 17px; }
  .timeline-filters {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 2px;
  }
  .timeline-filters button {
    flex: 0 0 auto;
    min-width: 58px;
    height: 28px;
    padding: 0 8px;
  }
  .timeline-list { gap: 8px; }
  .timeline-root-block { padding-left: 0; }
  .timeline-root-block::before,
  .timeline-root::before { display: none; }
  .timeline-children { padding-left: 0; margin-top: 6px; }
  .timeline-root,
  .timeline-child { padding: 10px 11px; }
  .timeline-root-top strong { font-size: 13px; }

  .report-meta-rail { display: none !important; }

  .analysis-workspace {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .analysis-inner {
    max-width: none;
    padding: 12px 10px 72px;
  }
  .state-hero {
    padding: 16px;
    gap: 16px;
    border-left-width: 5px !important;
  }
  .state-hero-topline,
  .state-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .state-symbol-line { gap: 10px; flex-wrap: wrap; }
  .state-symbol,
  .state-price { font-size: 20px; }
  .state-time { text-align: left; font-size: 10px; }
  .state-badge { font-size: 13px; padding: 7px 9px; }
  .state-hero h1 { font-size: 23px; line-height: 1.13; margin-top: 12px; }
  .state-action-card {
    width: 100%;
    min-width: 0;
    padding: 14px;
  }
  .state-action-card strong { font-size: 18px; }

  .awareness-strip,
  .operating-grid,
  .why-grid,
  .structure-grid,
  .full-report-summary,
  .full-report-heading {
    grid-template-columns: 1fr !important;
  }
  .awareness-tile { min-height: 0; padding: 12px; }
  .analysis-panel { padding: 14px; grid-column: span 1 !important; }
  .analysis-title,
  .priority-panel .analysis-title { font-size: 19px; }
  .change-row { grid-template-columns: 24px 1fr; padding: 10px; }
  .change-row p { font-size: 13px; }
  .why-primary strong { font-size: 17px; }
  .mini-state { grid-template-columns: 24px 1fr; }
  .structure-grid div { min-height: 0; }

  .fr-inner {
    max-width: none;
    padding: 18px 12px 72px;
  }
  .fr-header { flex-direction: column; gap: 12px; }
  .fr-header-right { align-self: stretch; }
  .fr-session-times { text-align: left; grid-template-columns: auto 1fr; }
  .fr-title { font-size: 22px; line-height: 1.18; }
  .fr-section { padding: 18px 0; }
  .fr-section-head { font-size: 18px; }
  .fr-model-row { grid-template-columns: 1fr; gap: 2px; }
  .fr-model-row p { grid-column: 1; }
}

@media (max-width: 380px) {
  .tab { min-width: 66px; padding: 0 8px; }
  .timeline-rail { max-height: 205px; }
  .state-hero h1 { font-size: 21px; }
  .fr-price { font-size: 25px; }
}


/* Mobile overflow hardening — prevent text from escaping cards */
@media (max-width: 760px) {
  .reports-shell *,
  .analysis-workspace *,
  .timeline-rail *,
  .fr-inner * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .mono,
  .state-time,
  .timeline-root-top span,
  .fr-model-row strong,
  .structure-grid strong,
  .mini-state em,
  .awareness-tile em,
  .analysis-footer,
  .fr-footer {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .btn {
    max-width: 100%;
    white-space: nowrap;
  }
  .reports-toolbar .btn {
    flex: 0 0 auto;
  }

  .timeline-rail {
    max-height: 178px;
  }
  .timeline-root-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }
  .timeline-root-top strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
  }
  .timeline-root-top span {
    font-size: 10px;
    justify-self: end;
  }
  .timeline-child {
    font-size: 12px;
    line-height: 1.3;
  }

  .state-hero,
  .state-action-card,
  .analysis-panel,
  .awareness-tile,
  .risk-card,
  .scenario-compact,
  .why-primary,
  .mini-state,
  .structure-grid div,
  .fr-event-block,
  .fr-condition,
  .fr-model-note {
    overflow: hidden;
  }

  .state-action-card strong,
  .state-action-card p,
  .analysis-title,
  .why-primary strong,
  .why-primary p,
  .risk-card p,
  .scenario-compact p,
  .source-compact-list p,
  .structure-note,
  .fr-body-text,
  .fr-driver-item p,
  .fr-event-note,
  .fr-condition,
  .fr-model-row p,
  .fr-scenario-row p {
    overflow-wrap: anywhere;
    word-break: keep-all;
    line-break: auto;
  }

  .state-action-card strong {
    font-size: 16px;
    line-height: 1.25;
  }
  .state-action-card p,
  .why-primary p,
  .risk-card p,
  .scenario-compact p,
  .source-compact-list p,
  .structure-note {
    font-size: 12px;
    line-height: 1.45;
  }
  .analysis-title,
  .priority-panel .analysis-title {
    font-size: 17px;
    line-height: 1.22;
  }

  .change-row,
  .mini-state {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
  }
  .change-row span {
    width: 20px;
    height: 20px;
    font-size: 13px;
  }
  .change-row p {
    margin-top: 0;
    font-size: 12.5px;
    line-height: 1.35;
  }
  .mini-state > span {
    font-size: 15px;
  }
  .mini-state strong {
    font-size: 12.5px;
  }
  .mini-state em {
    font-size: 10.5px;
    line-height: 1.35;
  }

  .structure-grid strong {
    font-size: 14px;
    line-height: 1.25;
  }
  .structure-grid p {
    font-size: 11px;
    line-height: 1.35;
  }

  .fr-driver-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }
  .fr-driver-num {
    margin-top: 2px;
  }
  .fr-session-times {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .fr-session-times strong {
    margin-bottom: 4px;
    overflow-wrap: anywhere;
  }
  .fr-title {
    font-size: 20px;
  }
  .fr-body-text,
  .fr-driver-item p,
  .fr-condition,
  .fr-scenario-row p {
    font-size: 13px;
    line-height: 1.55;
  }
  .fr-model-row strong {
    font-size: 12px;
    line-height: 1.35;
  }
  .fr-footer,
  .analysis-footer {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 380px) {
  .timeline-rail { max-height: 155px; }
  .state-symbol,
  .state-price { font-size: 18px; }
  .state-badge { font-size: 12px; }
  .state-hero h1 { font-size: 19px; }
  .analysis-inner { padding-left: 8px; padding-right: 8px; }
  .fr-inner { padding-left: 10px; padding-right: 10px; }
}


/* Market Awareness OS report layout */
.awareness-os-workspace { background: var(--bg); }
.awareness-os-inner {
  max-width: 1240px;
  padding: 18px 24px 64px;
}
.awareness-os-hero,
.awareness-os-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.awareness-os-hero {
  padding: 18px 20px;
  margin-bottom: 12px;
  border-left: 6px solid var(--info);
}
.awareness-os-hero.state-tradeable { border-left-color: var(--pos); }
.awareness-os-hero.state-watch { border-left-color: var(--warn); }
.awareness-os-hero.state-danger { border-left-color: var(--neg); }
.awareness-os-hero.state-prepare { border-left-color: var(--info); }
.awareness-os-symbol-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.awareness-os-price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 6px;
}
.awareness-os-price-line strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.awareness-os-price-line span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}
.awareness-os-price-line .pos { color: var(--pos); }
.awareness-os-price-line .neg { color: var(--neg); }
.awareness-os-time {
  max-width: 220px;
  text-align: right;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-4);
  overflow-wrap: anywhere;
}
.awareness-os-top-grid,
.awareness-os-focus-grid,
.awareness-os-layer-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.awareness-os-top-grid { grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr) minmax(240px, 0.75fr); }
.awareness-os-focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.awareness-os-layer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.awareness-os-card {
  padding: 16px;
  overflow-wrap: anywhere;
}
.awareness-os-card.wide { min-height: 190px; }
.awareness-os-card.action { border-left: 5px solid var(--info); }
.awareness-os-card.action.state-tradeable { border-left-color: var(--pos); }
.awareness-os-card.action.state-watch { border-left-color: var(--warn); }
.awareness-os-card.action.state-danger { border-left-color: var(--neg); }
.awareness-os-card.disabled { opacity: 0.82; background: var(--bg-2); }
.awareness-os-card.risk { border-left: 5px solid var(--warn); }
.awareness-os-card h2 {
  margin: 7px 0 12px;
  font-size: 19px;
  line-height: 1.16;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.awareness-os-context-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.awareness-os-context-lines p,
.awareness-action-copy,
.awareness-muted,
.execution-status {
  margin: 0;
  font-size: 14px;
  line-height: 1.48;
  color: var(--ink-2);
}
.awareness-os-context-lines p:first-child {
  font-size: 16px;
  font-weight: 750;
  color: var(--ink);
}
.awareness-action-state {
  display: inline-flex;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.awareness-action-state.small { font-size: 16px; }
.awareness-action-copy { margin-top: 11px; font-weight: 700; color: var(--ink); }
.mental-grid,
.execution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.mental-grid div,
.execution-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.mental-grid span,
.execution-grid span,
.layer-kv span,
.layer-subhead {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 850;
}
.mental-grid strong,
.execution-grid strong,
.layer-kv strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.awareness-bullets,
.awareness-number-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.awareness-bullets { margin-top: 10px; }
.awareness-bullets li,
.awareness-number-list li {
  font-size: 13px;
  line-height: 1.42;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.awareness-number-list li {
  font-weight: 750;
  color: var(--ink);
}
.layer-kv {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  margin-bottom: 12px;
}
.layer-subhead { margin: 12px 0 0; }
.source-trail-card { margin-top: 4px; }
.source-trail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--ink-4);
}
.source-trail-row span { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .awareness-os-top-grid { grid-template-columns: 1fr 1fr; }
  .awareness-os-card.wide { grid-column: 1 / -1; min-height: 0; }
  .awareness-os-layer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .awareness-os-inner { padding: 12px 10px 46px; }
  .awareness-os-hero,
  .awareness-os-card { padding: 13px; border-radius: 8px; }
  .awareness-os-symbol-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .awareness-os-time { text-align: left; max-width: none; }
  .awareness-os-price-line strong { font-size: 23px; }
  .awareness-os-top-grid,
  .awareness-os-focus-grid,
  .awareness-os-layer-grid,
  .mental-grid,
  .execution-grid { grid-template-columns: 1fr; }
  .awareness-os-card h2 { font-size: 17px; }
  .awareness-action-state { font-size: 18px; }
  .awareness-os-context-lines p:first-child { font-size: 15px; }
  .awareness-bullets li,
  .awareness-number-list li,
  .awareness-os-context-lines p,
  .awareness-action-copy,
  .awareness-muted,
  .execution-status { font-size: 13px; }
}


/* Position Context Check — contextual lens, not a signal block */
.position-context-section {
  margin-bottom: 12px;
}
.position-context-section.compact {
  margin: 12px 0;
}
.position-context-section > h2 {
  margin: 7px 0 12px;
  font-size: 19px;
  line-height: 1.16;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}
.position-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.position-context-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  border-top: 4px solid var(--info-bg);
  overflow-wrap: anywhere;
}
.position-context-card > span {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--info-bg);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}
.position-context-card .awareness-bullets {
  margin-top: 10px;
}
.position-context-card .awareness-bullets li {
  color: var(--ink-2);
}
@media (max-width: 900px) {
  .position-context-grid { grid-template-columns: 1fr; }
}


/* HN public no-login preview */
.public-preview {
  background: var(--bg);
}
.public-preview-shell {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}
.public-preview-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  min-width: 210px;
}
.public-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 750;
}
.public-brand strong,
.public-brand em {
  display: block;
  line-height: 1.12;
}
.public-brand strong {
  font-size: 14px;
  font-weight: 700;
}
.public-brand em {
  font-size: 11px;
  font-style: normal;
  color: var(--ink-3);
}
.public-preview-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink-3);
  font-size: 12px;
}
.public-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--pos);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--pos) 14%, transparent);
}
.public-lang-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.public-lang-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  border-radius: 5px;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
.public-lang-switch button.active {
  background: var(--ink);
  color: var(--bg);
}
.public-preview-main {
  padding: 16px 18px 28px;
}
.public-preview-main .reports-wrap {
  max-width: 1440px;
  margin: 0 auto;
}
.public-preview-main .report-toolbar,
.public-preview-main .reports-hero {
  display: none;
}
@media (max-width: 720px) {
  .public-preview-header {
    position: relative;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }
  .public-brand {
    min-width: 0;
    flex: 1;
  }
  .public-preview-meta {
    order: 3;
    flex-basis: 100%;
    font-size: 11px;
    flex-wrap: wrap;
  }
  .public-preview-main {
    padding: 10px;
  }
}


/* Report toolbar actions + How to use overlay */
.toolbar-action {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.discord-action {
  color: #4752c4 !important;
}
.howto-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}
.howto-panel {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-3);
}
.howto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.howto-head span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-3);
  letter-spacing: 0;
}
.howto-head strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
}
.howto-close {
  width: 30px;
  height: 30px;
  padding: 0 !important;
  justify-content: center;
  font-size: 18px;
}
.howto-steps {
  display: grid;
  gap: 0;
  padding: 6px 20px 4px;
}
.howto-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft, var(--line));
}
.howto-step:last-child { border-bottom: 0; }
.howto-step em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
}
.howto-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ink);
}
.howto-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
.howto-note {
  margin: 12px 20px 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .reports-toolbar {
    flex-wrap: wrap;
  }
  .toolbar-action {
    height: 30px;
    padding: 0 9px !important;
    font-size: 11px !important;
  }
  .howto-backdrop {
    align-items: end;
    padding: 10px;
  }
  .howto-panel {
    max-height: 86vh;
  }
  .howto-head {
    padding: 15px 15px 12px;
  }
  .howto-head strong {
    font-size: 17px;
  }
  .howto-steps {
    padding: 4px 15px 2px;
  }
  .howto-step {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    padding: 12px 0;
  }
  .howto-note {
    margin: 10px 15px 15px;
  }
}

/* Customizable Market Awareness Workspace */
.workspace-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.workspace-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.workspace-topline h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 6px;
}
.workspace-topline p,
.workspace-basis p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 6px 0 0;
}
.workspace-toolbar,
.workspace-empty-actions,
.workspace-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.workspace-toolbar select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 0 9px;
}
.workspace-layoutbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}
.workspace-layoutbar input {
  min-width: 220px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0 10px;
}
.workspace-empty {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 0;
  overflow: hidden;
}
.workspace-empty-copy {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.workspace-empty-copy h2 {
  font-size: 28px;
  letter-spacing: 0;
}
.workspace-empty-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}
.workspace-empty-presets {
  border-left: 1px solid var(--line);
  background: var(--bg-2);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.workspace-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.workspace-presets button,
.workspace-group-tabs button,
.workspace-library-card {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.workspace-presets button {
  border-radius: 8px;
  padding: 10px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}
.workspace-presets button:hover,
.workspace-library-card:hover,
.workspace-group-tabs button.active {
  background: var(--accent-bg);
  border-color: var(--accent-ln);
}
.workspace-presets small {
  color: var(--ink-3);
  font-size: 11px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.workspace-card {
  grid-column: span 4;
  min-height: 210px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.workspace-card.wide { grid-column: span 8; }
.workspace-card.compact { grid-column: span 3; min-height: 150px; }
.workspace-card-head {
  min-height: 58px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.workspace-card-titleline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.workspace-card-titleline h3 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.workspace-drag {
  width: 18px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--ink-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: grab;
}
.icon-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.workspace-card-body { padding: 14px; }
.workspace-card-body p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}
.workspace-card-body ul {
  margin: 0;
  padding-left: 17px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}
.workspace-safety-note {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.45;
}
.workspace-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 14, 20, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 22px;
}
.workspace-library {
  width: min(980px, 96vw);
  max-height: calc(100vh - 96px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.workspace-library-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.workspace-group-tabs {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.workspace-group-tabs button {
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 12px;
}
.workspace-library-body {
  overflow: auto;
  padding: 16px 18px 22px;
}
.workspace-library-body section + section { margin-top: 20px; }
.workspace-library-body h3 { font-size: 14px; margin-bottom: 8px; }
.workspace-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.workspace-library-card {
  min-height: 122px;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.workspace-library-card span:nth-child(2) {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}

.workspace-card-shows {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}
.workspace-library-card strong {
  margin-top: auto;
  color: var(--accent-2);
  font-size: 12px;
}
.workspace-library-card:disabled { opacity: 0.62; cursor: default; }
.workspace-basis {
  padding: 18px;
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 18px;
}
.workspace-basis-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.workspace-basis-table div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.workspace-basis-table span {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}
.workspace-report-note {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.workspace-report-note div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.workspace-report-note span {
  color: var(--ink-2);
  font-size: 12px;
}
@media (max-width: 980px) {
  .workspace-topline,
  .workspace-report-note { align-items: stretch; flex-direction: column; }
  .workspace-empty { grid-template-columns: 1fr; }
  .workspace-empty-presets { border-left: none; border-top: 1px solid var(--line); }
  .workspace-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-card,
  .workspace-card.wide,
  .workspace-card.compact { grid-column: span 12; }
  .workspace-library-grid,
  .workspace-basis,
  .workspace-basis-table { grid-template-columns: 1fr; }
}

.workspace-library-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.workspace-help {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-3);
  font: 700 12px var(--font-mono);
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.workspace-help:hover,
.workspace-help.open {
  color: var(--accent-2);
  border-color: var(--accent-ln);
  background: var(--accent-bg);
}
.workspace-help-tip {
  position: absolute;
  top: 28px;
  right: 0;
  width: min(270px, 70vw);
  z-index: 5;
  display: none;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: var(--shadow-3);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}
.workspace-help:hover + .workspace-help-tip,
.workspace-help-tip.open {
  display: block;
}
.workspace-add-card {
  margin-top: auto;
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}
.workspace-add-card:disabled {
  color: var(--ink-4);
  cursor: default;
}
.workspace-library-card.added {
  opacity: 0.68;
}
