/* ============================================================
   Consolidation & Synergy — Wusool Capital / EPCA
   Brand tokens are fixed (CLAUDE.md). Light-blue is reserved
   exclusively as the "you can edit this" signal — nothing
   decorative uses it.
   ============================================================ */

:root {
  --navy: #000523;
  --edit: #c6e1ee;   /* editable fields only */
  --cream: #f7f5f0;
  --ink: #1a1a1a;
  --gray: #f5f5f5;

  --edit-tint: #eaf4fa;      /* softened light-blue for input fills */
  --edit-ring: #7fb9d8;      /* focus ring derived from --edit */
  --line: #e3e0d8;           /* hairlines on cream */
  --ink-quiet: #6d6a63;      /* muted labels / computed captions */

  --font: "IBM Plex Sans", Arial, sans-serif;
  --tnum: "tnum" 1, "cv05" 1;

  --pad: clamp(20px, 3.5vw, 48px);
  --radius: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: clamp(18px, 3vw, 30px) var(--pad) 0;
  border-top: 3px solid var(--navy);
}

.masthead__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.wordmark {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--navy);
  line-height: 1.05;
}

/* ---------- Masthead right (tabs + reset) ---------- */
.masthead__right {
  display: flex;
  align-items: center;
  gap: 20px;
  align-self: flex-end;
}

.reset-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-quiet);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.reset-btn:hover { color: var(--navy); border-color: var(--ink-quiet); background: var(--gray); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  align-self: flex-end;
}

.tab {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-quiet);
  padding: 10px 18px;
  cursor: pointer;
  position: relative;
  letter-spacing: -0.005em;
  transition: color 0.16s ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tab:hover { color: var(--ink); }

.tab.is-active {
  color: var(--navy);
  font-weight: 600;
}

.tab.is-active::after { transform: scaleX(1); }

/* ---------- Main / panels ---------- */
.main {
  flex: 1;
  padding: var(--pad);
  border-top: 1px solid var(--line);
  margin-top: clamp(14px, 2vw, 22px);
}

.panel { display: none; }
.panel.is-active { display: block; }

/* ---------- Zones (slice-1 placeholders) ---------- */
.matrix-grid {
  display: grid;
  grid-template-columns: minmax(250px, 300px) 1fr;
  grid-template-rows: minmax(360px, auto) auto;
  grid-template-areas:
    "rail chart"
    "table table";
  gap: clamp(16px, 2vw, 28px);
}

.zone--rail  { grid-area: rail; }
.zone--chart { grid-area: chart; position: relative; }
.zone--table { grid-area: table; }

.zone {
  min-height: 120px;
}

/* Placeholder styling only until real content lands per slice */
.zone:empty::after {
  content: "";
  display: block;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 11px,
      rgba(0, 5, 35, 0.02) 11px,
      rgba(0, 5, 35, 0.02) 12px
    );
}

.zone-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

/* ============================================================
   Matrix — rating rail
   ============================================================ */
.rail {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rail-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.rail-legend {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-quiet);
}

/* Shared column template so the header labels line up with every row */
.rail-colhead,
.rail-row {
  display: grid;
  grid-template-columns: 1fr 58px 58px 20px;
  align-items: center;
  gap: 8px;
}

.rail-colhead {
  padding: 0 8px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.rail-col-grade { text-align: center; }

.rail-body {
  display: flex;
  flex-direction: column;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 4px;
  margin: 4px -4px 0 0;
}

.rail-row {
  padding: 3px 8px;
  border-radius: var(--radius);
  transition: background 0.14s ease;
}
.rail-row:hover { background: var(--gray); }

.rail-name {
  min-width: 0;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
}
/* Rail names read as labels first; keep the edit tint subtle until focused. */
.rail-name:not(:focus) {
  background: transparent;
  border-color: transparent;
}
.rail-name:not(:focus):hover {
  background: var(--edit-tint);
  border-color: var(--edit);
}

.rail-grade {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 4px 20px 4px 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  /* chevron */
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%),
                    linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: right 8px center, right 4px center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.rail-grade::-ms-expand { display: none; }

/* Unrated grade: quiet, no edit-tint, so a set grade visibly "lights up" */
.rail-grade.is-unrated {
  background-color: transparent;
  border-color: var(--line);
  color: var(--ink-quiet);
  font-weight: 500;
}
.rail-grade.is-unrated:hover {
  background-color: var(--edit-tint);
  border-color: var(--edit);
}

.rail-remove {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-quiet);
  font-size: 16px;
  line-height: 1;
  width: 20px; height: 20px;
  padding: 0;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.rail-row:hover .rail-remove { opacity: 0.55; }
.rail-row:hover .rail-remove:hover { opacity: 1; }
.rail-remove:hover { color: #a4342b; background: #f3e4e2; }

.rail-add {
  margin-top: 12px;
  align-self: flex-start;
  appearance: none;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.rail-add:hover { background: var(--navy); color: var(--cream); }

/* ============================================================
   Matrix — reference table
   ============================================================ */
.table-scroll { overflow-x: auto; }

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ref-table th {
  text-align: left;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  padding: 8px 10px;
  border-bottom: 1.5px solid var(--navy);
  white-space: nowrap;
}
.ref-table th.num { text-align: right; }

.ref-table td {
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.ref-table td.num { text-align: right; }
.ref-table tbody tr:nth-child(even) { background: rgba(0, 5, 35, 0.015); }
.ref-table tbody tr:hover { background: var(--gray); }

.cell-name { font-weight: 600; white-space: nowrap; }
.muted { color: var(--ink-quiet); font-weight: 400; font-style: italic; }
.computed { color: var(--ink); }

.ref-table .editable {
  padding: 4px 7px;
  font-size: 12.5px;
}
.ref-table .cell-year { width: 62px; text-align: right; }
.ref-table .cell-raise { width: 84px; text-align: right; }
.ref-table .cell-text { width: 100%; min-width: 130px; }
.ref-table .cell-notes { width: 100%; min-width: 220px; }
.ref-table .cell-industry { width: 100%; min-width: 112px; }
.cell-triage { min-width: 210px; font-size: 12px; }
.cell-quadrant { white-space: nowrap; font-weight: 500; }

/* Hide number-input spinners so 4-digit years never get clipped */
.ref-table input[type="number"]::-webkit-outer-spin-button,
.ref-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ref-table input[type="number"] { -moz-appearance: textfield; }

/* Quadrant color coding (categorical, quiet) */
.q-double { color: #1f6f43; }
.q-hold   { color: #8a6d1a; }
.q-exit   { color: #9a4a1c; }
.q-offer  { color: #9a2f2f; }

/* Brief highlight when a computed value changes on live recalc */
@keyframes valFlash {
  0%   { background: rgba(31, 90, 122, 0.18); }
  100% { background: transparent; }
}
.val-flash { animation: valFlash 0.6s ease-out; }

/* ============================================================
   Matrix — scatter chart
   ============================================================ */
.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.chart-legend { display: flex; gap: 8px; flex-wrap: wrap; }

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.14s ease, border-color 0.14s ease;
}
.legend-chip:hover { border-color: var(--ink-quiet); }
.legend-chip.is-off { opacity: 0.4; }
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.chart-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-svg {
  width: 100%;
  height: auto;
  max-height: 88vh;
  display: block;
  overflow: visible;
}

.chart-empty {
  min-height: 300px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-quiet);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* SVG primitives */
.chart-svg .grid { stroke: rgba(0, 5, 35, 0.06); stroke-width: 1; }
.chart-svg .split {
  stroke: rgba(0, 5, 35, 0.28);
  stroke-width: 1.25;
  stroke-dasharray: 4 4;
}
.chart-svg .axis { stroke: var(--navy); stroke-width: 1.25; }

.chart-svg .tick-label {
  fill: var(--ink-quiet);
  font-family: var(--font);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chart-svg .axis-title {
  fill: var(--ink-quiet);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.chart-svg .quad-label {
  fill: rgba(0, 5, 35, 0.16);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-anchor: middle;
  text-transform: uppercase;
}

.chart-svg .bubble {
  fill-opacity: 0.82;
  stroke: var(--cream);
  stroke-width: 1.5;
  cursor: pointer;
  transition: cx 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              cy 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              r 0.35s ease, fill 0.3s ease, fill-opacity 0.15s ease;
}
.chart-svg .bubble-item:hover .bubble { fill-opacity: 1; }

/* Anchor candidates (Anchor Score ≥ threshold) get a darker navy ring */
.chart-svg .bubble.is-anchor { stroke: var(--navy); stroke-width: 2.5; }

.legend-anchor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-quiet);
}
.legend-anchor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1f5a7a;
  border: 2.5px solid var(--navy);
  box-sizing: border-box;
  display: inline-block;
}
.bubble-tip__badge {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--edit);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Bubble hover tooltip */
.bubble-tip {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  pointer-events: none;
  min-width: 156px;
  max-width: 230px;
  background: var(--navy);
  color: #fff;
  border-radius: 5px;
  padding: 9px 12px;
  font-size: 11.5px;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(0, 5, 35, 0.24);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.bubble-tip.is-visible { opacity: 1; transform: none; }
.bubble-tip__name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.bubble-tip__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 0;
}
.bubble-tip__grid dt { color: rgba(255, 255, 255, 0.58); }
.bubble-tip__grid dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-svg .bubble-label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 500;
  paint-order: stroke;
  stroke: var(--cream);
  stroke-width: 3;
  stroke-linejoin: round;
  transition: x 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), y 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chart-svg .bubble-item { animation: bubbleIn 0.4s ease-out; }
@keyframes bubbleIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .chart-svg .bubble,
  .chart-svg .bubble-label { transition: none; }
  .chart-svg .bubble-item { animation: none; }
  .val-flash { animation: none; }
}

/* ---------- Numeric convention ---------- */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--tnum);
}

/* ---------- Editable-field language (foundation) ---------- */
.editable {
  background: var(--edit-tint);
  border: 1px solid var(--edit);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

.editable:focus,
.editable:focus-visible {
  outline: none;
  border-color: var(--edit-ring);
  box-shadow: 0 0 0 3px rgba(127, 185, 216, 0.35);
}

/* ============================================================
   Synergy Calculator
   ============================================================ */
.syn-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.syn-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-quiet);
}

.syn-controls {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.syn-baseyear {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.syn-baseyear span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.syn-baseyear input {
  width: 82px;
  padding: 7px 9px;
  font-size: 13.5px;
}

.syn-add {
  appearance: none;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.syn-add:hover { background: var(--navy); color: var(--cream); }

.syn-footnote {
  margin: 14px 0 0;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-quiet);
}

.syn-companies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.syn-company {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 18px;
}

.syn-company__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.syn-name {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.syn-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--edit);
  padding: 3px 8px;
  border-radius: 999px;
}
.syn-remove {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-quiet);
  font-size: 18px;
  line-height: 1;
  width: 24px; height: 24px;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.syn-remove:hover { opacity: 1; color: #a4342b; background: #f3e4e2; }

/* Inputs */
.syn-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.syn-field { display: flex; flex-direction: column; gap: 4px; }
.syn-field label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.syn-inputwrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--edit);
  border-radius: var(--radius);
  background: var(--edit-tint);
  overflow: hidden;
}
.syn-inputwrap:focus-within {
  border-color: var(--edit-ring);
  box-shadow: 0 0 0 3px rgba(127, 185, 216, 0.35);
}
.syn-in {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 7px 9px;
  font-size: 13.5px;
  color: var(--ink);
}
.syn-in:focus { outline: none; box-shadow: none; }
.syn-adorn {
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-quiet);
  background: rgba(0, 5, 35, 0.04);
}
.syn-adorn--pre { border-right: 1px solid var(--edit); }
.syn-adorn--post { border-left: 1px solid var(--edit); }

/* Standalone P&L table */
.syn-pnl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.syn-pnl th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  padding: 6px 8px;
  border-bottom: 1.5px solid var(--navy);
}
.syn-pnl th.num, .syn-pnl td.num { text-align: right; }
.syn-pnl td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--gray);
}
.syn-pnl .pnl-label { color: var(--ink); }
.syn-pnl .pnl-cost .pnl-label,
.syn-pnl .pnl-cost td { color: var(--ink-quiet); }
.syn-pnl .pnl-sub td { font-weight: 600; }
.syn-pnl .pnl-strong td {
  font-weight: 700;
  color: var(--navy);
  border-top: 1.5px solid var(--line);
  border-bottom: none;
}
.syn-pnl .pnl-strong:first-child td { border-top: none; }

/* Combined vs Consolidated: fixed layout so both tables' Yr columns align */
.syn-pnl--fixed { table-layout: fixed; }
.syn-pnl--fixed .pnl-col-label { width: 42%; }

/* ---- Synergy levers ---- */
.syn-levers-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.levers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 18px;
}

.lever {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lever-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.lever-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.lever-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.lever-note {
  font-size: 10.5px;
  color: var(--ink-quiet);
}
.lever--target .lever-note { color: #8a6d1a; }

.lever-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--edit);
  cursor: pointer;
  outline: none;
}
.lever-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px rgba(0, 5, 35, 0.25);
  transition: transform 0.12s ease;
}
.lever-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.lever-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px rgba(0, 5, 35, 0.25);
}
.lever-slider:focus-visible { box-shadow: 0 0 0 3px rgba(127, 185, 216, 0.4); }

/* ---- Uplift summary ---- */
.syn-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 26px 0 18px;
  padding: 14px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: 6px;
}
.syn-summary__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.syn-summary__flow {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.syn-arrow { color: rgba(255, 255, 255, 0.5); margin: 0 4px; }
.syn-summary__delta {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.syn-summary__delta.is-up { color: #7fd4a3; }
.syn-summary__delta.is-down { color: #f0a3a3; }

/* ---- Compare panels ---- */
.syn-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.pnl-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 16px 18px;
}
.pnl-panel--pop {
  border-color: var(--navy);
  box-shadow: 0 2px 14px rgba(0, 5, 35, 0.06);
}

/* ---- Returns + seller view ---- */
.syn-returns-section,
.syn-seller-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.returns-grid { margin-top: 4px; }

.blend-mult {
  margin: -4px 0 14px;
  font-size: 12px;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
}
.blend-mult strong { color: var(--navy); font-weight: 700; }
.blend-note { color: var(--ink-quiet); font-style: italic; }

/* Read-only inherited field (target exit multiple) — not editable, so no blue */
.syn-inputwrap--ro {
  background: var(--gray);
  border-color: var(--line);
}
.syn-inputwrap--ro .syn-in { color: var(--ink-quiet); cursor: not-allowed; }
.syn-inputwrap--ro .syn-adorn { background: transparent; border-color: var(--line); }

.ret-exit-delta td {
  border-top: 1.5px solid var(--line);
  border-bottom: none;
  font-weight: 700;
  padding-top: 8px;
}
.ret-exit-delta .pnl-label { color: var(--ink-quiet); font-weight: 600; }
.delta-up { color: #1f6f43; }
.delta-down { color: #9a2f2f; }

.seller-table { width: 100%; }
.seller-table .seller-grp {
  text-align: center;
  border-bottom: none;
  font-size: 9.5px;
  color: var(--ink-quiet);
}
.seller-table .seller-subhead th {
  border-bottom: 1.5px solid var(--navy);
  padding-top: 2px;
}
.seller-table tbody td { padding: 7px 8px; }
.seller-table tbody tr:nth-child(even) { background: rgba(0, 5, 35, 0.015); }
.seller-table tfoot td {
  padding: 8px;
  border-top: 1.5px solid var(--line);
  font-weight: 600;
}
.seller-table [data-own-total].is-bad { color: #9a2f2f; }

.syn-inputwrap--sm { display: inline-flex; width: 78px; }
.syn-inputwrap--sm .syn-in { padding: 5px 7px; font-size: 12.5px; }
.syn-inputwrap--sm .syn-adorn { padding: 0 7px; }

.syn-note {
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--gray);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 12px;
  color: var(--ink);
}
.syn-note strong { color: var(--navy); }

@media (max-width: 900px) {
  .matrix-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "rail"
      "chart"
      "table";
  }
  .syn-companies { grid-template-columns: 1fr; }
  .syn-compare { grid-template-columns: 1fr; }
  .seller-table { display: block; overflow-x: auto; }
}
