:root {
  /* surfaces — cool near-black ink */
  --bg:        #0B0C0E;
  --panel:     #121317;
  --panel-2:   #181A1F;
  --line:      #262A31;
  --line-2:    #1D2026;
  --ink:       #ECEEF2;
  --ink-mute:  #8A909C;
  --ink-dim:   #474E59;

  /* AlphaBlock brand tokens v1.0 — buy(blue) + sell(red) = orchid */
  --brand:     #BF4342;  /* oxblood — identity / wordmark / CTAs */
  --accent:    #CE94C1;  /* orchid lavender — highlight accent */
  --up:        #1F7FB4;  /* electric blue — bullish / inflow */
  --up-bright: #A9D7EC;  /* ice cyan */
  --up-soft:   #4B88A2;  /* mid blue */
  --down:      #9F414B;  /* rose red — bearish / outflow */
  --neutral:   #3C5365;  /* steel blue — flat / dim */
  --status:    #689689;  /* sage — machine status only */

  /* legacy aliases → remapped to the new system */
  --orange:    var(--brand);
  --orange-2:  var(--accent);
  --green:     var(--up);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 40px 36px 60px;
  position: relative;
  z-index: 2;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
header::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 84px; height: 1px;
  background: var(--orange);
}
.brand {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.doc-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.doc-title em { color: var(--orange); font-style: italic; }
.doc-sub {
  margin-top: 12px;
  color: var(--ink-mute);
  font-size: 13px;
  max-width: 640px;
  font-family: 'DM Mono', monospace;
}
.doc-meta {
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.9;
  white-space: nowrap;
}
.doc-meta strong { color: var(--ink); font-weight: 500; }
.doc-meta .stamp {
  display: inline-block;
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 4px 10px;
  margin-top: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 9.5px;
}

/* STAT ROW */
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 2px;
  background: var(--orange);
}
.stat-card.green::before { background: var(--status); }
.stat-card.blue::before  { background: var(--up); }
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-value.orange { color: var(--orange); }
.stat-value.green  { color: var(--status); }
.stat-value.up     { color: var(--up-bright); }
.stat-value.small  { font-size: 22px; }
.stat-sub {
  margin-top: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* STATUS BANNER */
.status-banner {
  background: linear-gradient(90deg, rgba(104,150,137,0.10) 0%, rgba(104,150,137,0.02) 100%);
  border: 1px solid rgba(104,150,137,0.45);
  border-left: 3px solid var(--status);
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.status-banner .pb-left { display: flex; align-items: center; gap: 14px; }
.status-banner .pb-dot {
  width: 8px; height: 8px;
  background: var(--status);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(104,150,137,0.15);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(104,150,137,0.15); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(104,150,137,0.05); }
}
.status-banner .pb-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--status);
  margin-bottom: 4px;
}
.status-banner .pb-msg { font-size: 16px; color: var(--ink); }
.status-banner .pb-msg strong { color: var(--accent); font-weight: 600; }
.status-banner .pb-msg .dim { color: var(--ink-mute); font-size: 13px; }
.status-banner .pb-right {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--ink-mute);
  text-align: right;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.status-banner .pb-right strong {
  color: var(--orange);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

/* MAIN GRID */
.main-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px 24px;
  position: relative;
}
.panel-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title .ruler { flex: 1; height: 1px; background: var(--line); margin-left: 8px; }

/* DONUT */
.donut-wrap {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.donut-center { position: absolute; text-align: center; pointer-events: none; }
.donut-center .dc-value {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 32px;
  color: var(--orange);
  line-height: 1;
}
.donut-center .dc-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 8px;
}

/* LEGEND */
.legend { display: grid; gap: 9px; font-size: 12.5px; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-dot.pending { border-radius: 2px; opacity: 0.8; }
.legend-name { color: var(--ink); flex: 1; }
.legend-pct {
  font-family: 'DM Mono', monospace;
  color: var(--ink-mute);
  font-size: 11px;
}
.legend-pct.none { color: var(--ink-dim); }

/* VENUE TABLE */
table.venue-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}
table.venue-table th {
  text-align: left;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0 12px 14px;
  border-bottom: 1px solid var(--line);
}
table.venue-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  vertical-align: middle;
}
table.venue-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.venue-table tr.venue-row:hover td { background: rgba(206,148,193,0.05); }

/* sleeve group header row */
tr.sleeve-row td {
  background: var(--panel-2);
  border-bottom: 1px solid var(--line) !important;
  padding: 11px 12px;
}
tr.sleeve-row .sleeve-name {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
tr.sleeve-row .sleeve-alloc {
  font-size: 11px;
  color: var(--ink-mute);
  text-align: right;
}
tr.sleeve-row .sleeve-alloc strong { color: var(--ink); font-weight: 500; }

.v-name { font-family: 'Instrument Sans', sans-serif; font-size: 13.5px; color: var(--ink); }
.v-ticker { color: var(--ink-dim); font-size: 10.5px; margin-left: 6px; font-family: 'DM Mono', monospace; }
.v-role { color: var(--ink-mute); }
.v-custody {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  white-space: nowrap;
}
.v-custody.cold  { border-color: var(--up-soft); color: var(--up-bright); }
.v-custody.pool  { border-color: var(--orange); color: var(--orange); }
.v-custody.venue { border-color: var(--neutral); color: var(--ink-mute); }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.dash { color: var(--ink-dim); }

/* TACTIC PILLARS */
.pillar {
  padding: 16px 0 16px 18px;
  border-left: 2px solid var(--line);
  border-bottom: 1px dashed var(--line-2);
  position: relative;
}
.pillar:last-child { border-bottom: none; padding-bottom: 0; }
.pillar:first-child { padding-top: 0; }
.pillar.is-active { border-left-color: var(--accent); }
.pillar .p-idx {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.pillar .p-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 6px;
}
.pillar.is-active .p-title { color: var(--accent); }
.pillar .p-body { color: var(--ink-mute); font-size: 13px; }
.pillar .p-body strong { color: var(--ink); font-weight: 500; }
.pillar .p-venues {
  margin-top: 9px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* BREAKDOWN */
.breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.breakdown-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px 24px;
}
.bd-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.bd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-2);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}
.bd-row:last-child { border-bottom: none; }
.bd-row .bd-label { color: var(--ink-mute); }
.bd-row .bd-value { color: var(--ink); font-size: 14px; text-align: right; white-space: nowrap; }
.bd-row.naked {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 6px;
  padding: 14px 0;
}
.bd-row.naked .bd-label {
  color: var(--ink);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10.5px;
}
.bd-row.naked .bd-value {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  color: var(--orange);
  font-size: 22px;
}
.bd-value .new   { color: var(--up); font-weight: 500; }
.bd-value .boost { color: var(--accent); }
.bd-value .stale { color: var(--ink-dim); text-decoration: line-through; }
.bd-value .down  { color: var(--down); }
.bd-mini {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-mute);
}

/* "LIVE" highlighted card */
.breakdown-card.forward {
  border-color: rgba(104,150,137,0.5);
  background: linear-gradient(180deg, rgba(104,150,137,0.06) 0%, var(--panel) 60%);
  position: relative;
}
.breakdown-card.forward::before {
  content: 'LIVE';
  position: absolute;
  top: 18px; right: 22px;
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--status);
  border: 1px solid var(--status);
  padding: 2px 7px;
}
.breakdown-card.forward .bd-title { color: var(--status); }

/* TIMELINE */
.timeline {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px 24px;
  margin-bottom: 24px;
}
.timeline-head {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.timeline-grid::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 50%, var(--line) 50%, var(--line) 100%);
}
.tl-step { position: relative; padding: 0 12px; text-align: center; }
.tl-marker {
  width: 14px; height: 14px;
  border: 2px solid var(--orange);
  background: var(--bg);
  border-radius: 50%;
  margin: 11px auto 14px;
  position: relative;
  z-index: 2;
}
.tl-step.done .tl-marker { background: var(--orange); }
.tl-step.active .tl-marker {
  background: var(--status);
  border-color: var(--status);
  box-shadow: 0 0 0 4px rgba(104,150,137,0.18);
}
.tl-step.future .tl-marker { border-color: var(--ink-dim); }
.tl-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.tl-title { font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.tl-step.future .tl-title { color: var(--ink-dim); }
.tl-sub { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--ink-mute); }
.tl-step.active .tl-sub { color: var(--status); }

/* NOTE STRIP */
.note-strip {
  border: 1px dashed var(--line);
  background: var(--panel);
  padding: 14px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.note-strip b {
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 9.5px;
  font-weight: 400;
}

/* FOOTER */
footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
footer .brand-stamp { color: var(--orange); }
footer .paws { color: var(--ink-mute); text-transform: none; letter-spacing: 0.04em; }
footer .paws strong { color: var(--orange); }

@media (max-width: 1100px) {
  .page { padding: 28px 20px 48px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .main-grid { grid-template-columns: 1fr; }
  .breakdown { grid-template-columns: 1fr; }
  .timeline-grid { grid-template-columns: 1fr; gap: 14px; }
  .timeline-grid::before { display: none; }
  header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .doc-title { font-size: 34px; }
  .doc-meta { text-align: left; }
  .status-banner { flex-direction: column; align-items: flex-start; }
  .status-banner .pb-right { text-align: left; }
  footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 620px) {
  .stat-row { grid-template-columns: 1fr; }
  table.venue-table { font-size: 11px; }
  table.venue-table th:nth-child(3), table.venue-table td:nth-child(3) { display: none; }
}

/* TACTIC PILLAR GRID — full-width panel variant */
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 22px; }
.pillar-grid .pillar { border-bottom: none; padding-top: 0; padding-bottom: 0; }
.tactic-summary {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-2);
}
@media (max-width: 1100px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .tactic-summary { font-size: 18px; }
}
@media (max-width: 620px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-grid .pillar { border-bottom: 1px dashed var(--line-2); padding-bottom: 16px; }
  .pillar-grid .pillar:last-child { border-bottom: none; }
}
