/* LP Autopilot site — shared styles.
   Palette: dataviz reference instance (validated); tokens by role. */
:root {
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --series-1: #2a78d6; /* strategy (pessimistic edge) */
  --series-2: #1baf7a; /* strategy (optimistic edge) */
  --good: #006300;
  --bad: #d03b3b;
  --accent: #2a78d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --series-1: #3987e5;
    --series-2: #199e70;
    --good: #0ca30c;
    --bad: #e66767;
    --accent: #3987e5;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 18px; color: var(--ink); }
.logo .dot { color: var(--series-2); }
nav a { margin-left: 22px; color: var(--ink-2); font-size: 14px; }
nav a.active { color: var(--ink); font-weight: 600; }

.hero { padding: 72px 0 28px; max-width: 760px; }
.hero h1 { font-size: 42px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.5px; }
.hero p.lede { font-size: 19px; color: var(--ink-2); margin: 0 0 26px; }
.cta { display: inline-block; background: var(--accent); color: #fff; padding: 12px 22px; border-radius: 8px; font-weight: 600; }
.cta:hover { text-decoration: none; filter: brightness(1.08); }
.cta.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); margin-left: 10px; }

.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.4px;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--ink-2); margin-bottom: 18px;
}
.badge .live { color: var(--series-2); }

section { padding: 34px 0; }
h2 { font-size: 24px; margin: 0 0 6px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
}
.card h3 { margin: 0 0 2px; font-size: 15px; }
.card .status { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.card .status .exited { color: var(--bad); font-weight: 600; }

.stat-row { display: flex; gap: 22px; margin-bottom: 10px; }
.stat .v { font-size: 22px; font-weight: 700; }
.stat .l { font-size: 11.5px; color: var(--muted); }
.pos { color: var(--good); }
.neg { color: var(--bad); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.tile { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.tile .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.tile .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.zeroline { stroke: var(--baseline); stroke-width: 1; }
.axis-label { fill: var(--muted); font-size: 10px; font-family: inherit; }
.line-pess { stroke: var(--series-1); stroke-width: 2; fill: none; }
.line-opti { stroke: var(--series-2); stroke-width: 2; fill: none; }
.band { fill: var(--series-1); opacity: 0.10; }
.legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-2); margin-top: 8px; }
.legend .key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }

.tooltip {
  position: absolute; pointer-events: none; display: none;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  white-space: nowrap; z-index: 5;
}
.tooltip .t { color: var(--muted); font-size: 11px; }
.tooltip .row { display: flex; align-items: center; gap: 6px; }
.tooltip .num { font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 12px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table.data th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--grid); }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: none; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.step .n { font-size: 12px; font-weight: 700; color: var(--accent); }
.step h3 { margin: 6px 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-2); }

.input-row { display: flex; gap: 10px; margin: 18px 0; }
.input-row input {
  flex: 1; padding: 12px 14px; font-size: 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-1); color: var(--ink);
  font-family: ui-monospace, monospace;
}
.input-row button {
  padding: 12px 22px; border-radius: 8px; border: none; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
}
.note { font-size: 13px; color: var(--muted); }
.err { color: var(--bad); font-size: 14px; }

footer.site { border-top: 1px solid var(--border); margin-top: 40px; padding: 26px 0 40px; font-size: 13px; color: var(--muted); }
footer.site .disc { max-width: 760px; }
