/* ============================================================================
   Master Plan — prop-firm extraction campaign console
   Shared design system. Dark-first, offline, no external assets.
   Identity: operator's war-room. Gold = campaign chrome, green = realized cash,
   red = deaths/danger, cool slate = the "degraded x0.5" honesty tone.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../assets/space-grotesk-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../assets/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('../assets/jetbrains-mono-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg:        #0a0c11;
  --bg-2:      #0d1017;
  --panel:     #10131a;   /* validated chart surface */
  --panel-2:   #151a24;
  --panel-3:   #1a2130;
  --border:    #1c2230;
  --border-2:  #2a3243;
  --ink:       #e8ecf3;
  --ink-dim:   #9aa4b6;
  --ink-faint: #626c80;
  --ink-ghost: #444d60;

  --gold:      #e0a83e;   /* extraction chrome accent */
  --gold-soft: #f0c477;
  --gold-deep: #b8712e;
  --profit:    #34d399;   /* realized cash / positive */
  --profit-dim:#1f8f68;
  --loss:      #f87171;   /* deaths / danger */
  --loss-dim:  #b04a4a;
  --warn:      #fbbf24;   /* caveat flags */
  --degraded:  #8492ab;   /* the deliberately-sober x0.5 tone */

  /* chart categorical — validated set (dark, surface #10131a), do not reorder */
  --s-mff:     #3987e5;
  --s-tpt:     #199e70;
  --s-tradeify:#c98500;
  --s-flex:    #9085e9;
  --s-pro:     #d55181;

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --maxw: 1120px;
  --nav-h: 54px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(1200px 560px at 82% -8%, rgba(224,168,62,0.055), transparent 62%),
    radial-gradient(900px 500px at 8% 4%, rgba(52,211,153,0.035), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--mono); font-feature-settings: 'tnum' 1; font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }
.dim { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.gold { color: var(--gold); }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------- honesty banner */
.banner {
  background: rgba(251,191,36,0.06);
  border-bottom: 1px solid rgba(251,191,36,0.16);
  color: var(--warn);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 6px 16px;
}
.banner b { color: var(--gold-soft); font-weight: 600; }

/* ------------------------------------------------------------------- navbar */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 22px;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em; color: var(--ink); white-space: nowrap;
  display: flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .tick { color: var(--gold); font-family: var(--mono); }
.brand .v { font-family: var(--mono); font-size: 10px; color: var(--gold);
  border: 1px solid rgba(224,168,62,0.4); border-radius: 4px; padding: 1px 5px; letter-spacing: 0.08em; }
.nav-links { display: flex; gap: 3px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--ink-dim); padding: 6px 10px; border-radius: 6px; white-space: nowrap;
  transition: color 140ms ease, background-color 140ms ease;
}
.nav-links a:hover { color: var(--ink); background: var(--panel-2); text-decoration: none; }
.nav-links a.active { color: var(--gold); background: rgba(224,168,62,0.08); }
.nav-toggle { display: none; }

/* ------------------------------------------------------------- typography */
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em;
  color: var(--gold); text-transform: uppercase; margin: 0;
}
.eyebrow.muted { color: var(--ink-faint); }
h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 5.6vw, 62px); line-height: 1.03;
  letter-spacing: -0.028em; margin: 16px 0 16px;
}
h1 .thin { color: var(--ink-dim); font-weight: 500; }
h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em;
  margin: 0 0 6px;
}
h3 { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; margin: 0; }
.lede { max-width: 660px; color: var(--ink-dim); font-size: 16.5px; margin: 0; }
.section-lead { max-width: 680px; color: var(--ink-dim); font-size: 15px; margin: 4px 0 0; }

section { padding: 44px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }
.section-head { margin-bottom: 24px; }
.section-head .eyebrow { margin-bottom: 8px; }

/* --------------------------------------------------- the signature: twin */
/* optimistic (green) vs degraded x0.5 (cool slate), side by side */
.twin {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden;
  background: var(--panel);
}
.twin > div { padding: 16px 18px; }
.twin .opt { background: linear-gradient(180deg, rgba(52,211,153,0.06), transparent 70%); }
.twin .deg { border-left: 1px solid var(--border); background: linear-gradient(180deg, rgba(132,146,171,0.05), transparent 70%); }
.twin .t-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
}
.twin .opt .t-label { color: var(--profit-dim); }
.twin .deg .t-label { color: var(--degraded); }
.twin .t-val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600;
  font-size: clamp(22px, 3.4vw, 30px); line-height: 1.1; }
.twin .opt .t-val { color: var(--profit); }
.twin .deg .t-val { color: var(--degraded); }
.twin .t-sub { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ----------------------------------------------------------------- panels */
.panel {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--border); border-radius: 14px;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* stat tile */
.stat { padding: 16px 18px; }
.stat .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.stat .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.stat .v.pos { color: var(--profit); }
.stat .s { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 3px; }

/* --------------------------------------------------------------- chips */
.chip {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em;
  padding: 3px 9px 2px; border-radius: 5px; border: 1px solid var(--border-2);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-dim);
}
.chip.verified { color: var(--profit); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.07); }
.chip.sim      { color: var(--warn);   border-color: rgba(251,191,36,0.32);  background: rgba(251,191,36,0.06); }
.chip.warnflag { color: var(--warn);   border-color: rgba(251,191,36,0.32);  background: rgba(251,191,36,0.06); }
.chip.danger   { color: var(--loss);   border-color: rgba(248,113,113,0.32);  background: rgba(248,113,113,0.06); }
.chip.parked   { color: var(--ink-dim);border-color: var(--border-2);        background: rgba(151,161,182,0.05); }
.chip.gold     { color: var(--gold);   border-color: rgba(224,168,62,0.4);   background: rgba(224,168,62,0.07); }

/* route chips (execution taxonomy) — each a stable color */
.route { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em;
  padding: 3px 9px 2px; border-radius: 5px; border: 1px solid; white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.route::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.route.direct-pmt        { color: var(--profit); border-color: rgba(52,211,153,0.3); }
.route.copier-relay      { color: var(--gold);   border-color: rgba(224,168,62,0.35); }
.route.copier-assumed    { color: var(--warn);   border-color: rgba(251,191,36,0.32); }
.route.api-or-copier-gray{ color: var(--degraded);border-color: var(--border-2); }
.route.parked            { color: var(--ink-faint); border-color: var(--border-2); }

/* --------------------------------------------------------------- tooltip */
.tt { position: relative; border-bottom: 1px dotted var(--ink-ghost); cursor: help; }
.tt[data-tip] { position: relative; }
[data-tip] { cursor: help; }
.tip-pop {
  position: absolute; z-index: 60; max-width: 280px;
  background: #060810; border: 1px solid var(--border-2); border-radius: 8px;
  padding: 9px 12px; font-family: var(--body); font-size: 12.5px; line-height: 1.5; color: var(--ink-dim);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55); pointer-events: none;
}
.tip-pop b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------- buttons */
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-2);
  background: var(--panel-2); color: var(--ink-dim); cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.btn:hover { background: var(--panel-3); color: var(--ink); border-color: var(--gold-deep); }
.btn.on { color: var(--gold); border-color: rgba(224,168,62,0.5); background: rgba(224,168,62,0.09); }
.btn.copy.done { color: var(--profit); border-color: rgba(52,211,153,0.4); }

/* segmented toggle */
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 9px; padding: 3px; background: var(--panel); }
.seg button {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 6px 16px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-dim); cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.seg button.on { background: var(--gold); color: #16110a; font-weight: 600; }

/* --------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data thead th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); background: var(--panel); position: sticky; top: 0; font-weight: 500;
}
table.data tbody tr:hover { background: rgba(255,255,255,0.015); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
table.data .firm { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* --------------------------------------------------------------- checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel);
  transition: border-color 140ms ease, background-color 140ms ease; }
.checklist li.checked { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.035); }
.checklist input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; margin-top: 2px; border: 1.5px solid var(--border-2); border-radius: 6px;
  background: var(--bg); cursor: pointer; position: relative; transition: border-color 140ms, background-color 140ms; }
.checklist input[type=checkbox]:checked { background: var(--profit); border-color: var(--profit); }
.checklist input[type=checkbox]:checked::after { content: "✓"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; color: #06130d; font-size: 13px; font-weight: 800; }
.checklist .ci-body { flex: 1; }
.checklist .ci-body h4 { font-family: var(--display); font-size: 15.5px; font-weight: 600; margin: 0 0 3px; }
.checklist li.checked .ci-body h4 { color: var(--ink-dim); }
.checklist .ci-body p { margin: 0; font-size: 13.5px; color: var(--ink-dim); }
.checklist .ci-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

/* --------------------------------------------------------------- footer */
footer.foot { padding: 44px 0 68px; color: var(--ink-faint); font-size: 12.5px; border-top: 1px solid var(--border); margin-top: 24px; }
.foot .epigraph { font-family: var(--display); font-size: 16px; font-weight: 500; color: var(--ink-dim); letter-spacing: -0.005em; margin: 0 0 16px; }
.foot .epigraph .tick { color: var(--gold); }
.foot-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; font-family: var(--mono); font-size: 11px; border-top: 1px solid var(--border); padding-top: 16px; }

/* --------------------------------------------------------------- utility */
.caveat-box { border: 1px solid rgba(251,191,36,0.2); background: rgba(251,191,36,0.035); border-radius: 12px; padding: 16px 18px; }
.caveat-box .eyebrow { color: var(--warn); }
.hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
.spacer-s { height: 16px; } .spacer-m { height: 28px; } .spacer-l { height: 44px; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .twin { grid-template-columns: 1fr; }
  .twin .deg { border-left: 0; border-top: 1px solid var(--border); }
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 7px; font-size: 11px; }
  .brand .v { display: none; }
  h1 { font-size: clamp(30px, 8vw, 44px); }
}
