/* Evidge — calm, evidence-first. Warm white, near-black text, one deep-blue accent. */
:root {
  --bg: #f9f8f5;
  --surface: #ffffff;
  --text: #15171b;
  --muted: #5f646d;
  --faint: #8b9099;
  --line: #e6e4de;
  --line-strong: #d6d3cb;
  --accent: #23409a;
  --accent-soft: #eceff8;
  --good: #2f7a57;
  --good-soft: #e8f2ec;
  --bad: #b04a3b;
  --bad-soft: #f6e9e6;
  --warn-bg: #fbf3e4;
  --warn-text: #7d5612;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101113;
    --surface: #17191c;
    --text: #ecebe8;
    --muted: #a3a6ad;
    --faint: #777b83;
    --line: #26292e;
    --line-strong: #33363c;
    --accent: #8ea3ea;
    --accent-soft: #1b2135;
    --good: #5fb88d;
    --good-soft: #15261d;
    --bad: #e38a7a;
    --bad-soft: #2c1a17;
    --warn-bg: #2a2214;
    --warn-text: #e9c37f;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- header */
nav.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand .logo { width: 30px; height: 30px; flex: 0 0 30px; color: var(--accent); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text b { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.brand-text small { font-size: 11.5px; color: var(--faint); letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand > span:not(.brand-text) { color: var(--faint); font-size: 13px; }
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-link { font-size: 14px; color: var(--muted); }
.lang { font-size: 14px; color: var(--faint); white-space: nowrap; }
.lang a { color: var(--muted); padding: 4px 2px; }
.lang a.on { color: var(--text); font-weight: 650; }
.lang i { font-style: normal; margin: 0 6px; color: var(--line-strong); }

/* ---------- type */
.hero { padding: 40px 0 28px; }
.eyebrow { font-size: 13px; color: var(--accent); font-weight: 650; letter-spacing: 0.02em;
  margin: 18px 0 8px; }
h1 { font-size: 32px; line-height: 1.22; letter-spacing: -0.025em; margin: 12px 0 16px;
  font-weight: 700; }
h2 { font-size: 23px; line-height: 1.3; letter-spacing: -0.015em; margin: 0 0 10px; font-weight: 680; }
h3 { font-size: 18px; line-height: 1.4; margin: 22px 0 8px; font-weight: 640; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.body { font-size: 16px; line-height: 1.7; margin: 10px 0; }
.muted { color: var(--muted); }
.sub { font-size: 13px; color: var(--faint); margin: 0 0 8px; letter-spacing: 0.01em; }
.fine { font-size: 13px; color: var(--faint); margin-top: 12px; text-align: center; line-height: 1.6; }
.fine.left { text-align: left; }
h1, h2, h3, .btn, .rule, .body { overflow-wrap: anywhere; }

/* ---------- layout */
.section { padding: 28px 0; border-top: 1px solid var(--line); }
.block { padding: 36px 0 32px; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; margin: 16px 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  border: 0; border-radius: 12px; padding: 14px 20px; font: inherit; font-weight: 620;
  background: var(--text); color: var(--bg); cursor: pointer; width: 100%; line-height: 1.35;
}
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost { background: transparent; color: var(--accent); padding: 10px 0; width: auto; }
.btn:disabled { opacity: 0.5; cursor: default; }
button.link { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 15px;
  color: var(--accent); cursor: pointer; font-weight: 560; }
.actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; }

/* ---------- tags */
.tag { display: inline-block; font-size: 12.5px; font-weight: 620; padding: 3px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap;
  line-height: 1.5; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.neutral { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.tag.muted { background: transparent; border: 1px dashed var(--line-strong); color: var(--faint); }

/* ---------- numbers */
.neg { color: var(--bad); }
.pos { color: var(--good); }
.hero-stat { padding: 6px 0 14px; }
.hero-stat .big { display: block; font-family: var(--mono); font-size: 32px; font-weight: 650;
  letter-spacing: -0.03em; line-height: 1.2; margin: 2px 0; }
.hero-stat small { color: var(--faint); font-size: 13px; }
.stat-label { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line);
  margin: 4px 0 8px; }
.stats .stat { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.stats .stat:nth-child(odd) { padding-right: 12px; }
.stats .stat:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.stat-value { display: block; font-family: var(--mono); font-size: 20px; font-weight: 620;
  letter-spacing: -0.02em; line-height: 1.35; overflow-wrap: anywhere; }
.stat small { display: block; color: var(--faint); font-size: 12.5px; }
.stats.compact .stat-value { font-size: 17px; }
.stats.compact.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi b { display: block; font-size: 20px; font-family: var(--mono); letter-spacing: -0.02em; }
.kpi small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.headline { font-family: var(--mono); font-size: 22px; letter-spacing: -0.02em; margin: 2px 0 4px;
  font-weight: 620; }

/* ---------- methods & breakdown */
.method { padding: 20px 0; border-bottom: 1px solid var(--line); }
.method:last-child { border-bottom: 0; }
.method-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.method-head h3 { margin: 0; }
details.breakdown { margin-top: 6px; }
details summary { cursor: pointer; color: var(--accent); font-size: 15px; font-weight: 560;
  padding: 8px 0; list-style-position: inside; }
.grow { padding: 12px 0; border-bottom: 1px solid var(--line); }
.grow-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.grow-name { font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.grow-stats { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 14px; color: var(--muted);
  margin-top: 4px; font-variant-numeric: tabular-nums; }
.grow .link { padding: 4px 0 0; font-size: 14px; }

/* ---------- refinement */
.card.refine { border-color: var(--line-strong); }
.rule { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; margin: 16px 0;
  font-weight: 620; font-size: 16.5px; line-height: 1.6; }
table.ev { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 6px; }
table.ev td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ev td:last-child { text-align: right; font-family: var(--mono); padding-left: 12px; white-space: nowrap; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0;
  font-variant-numeric: tabular-nums; }
table.grid th { font-weight: 560; color: var(--muted); font-size: 13px; text-align: right;
  padding: 6px 0 6px 10px; border-bottom: 1px solid var(--line-strong); vertical-align: bottom; }
table.grid td { padding: 9px 0 9px 10px; border-bottom: 1px solid var(--line); text-align: right;
  font-family: var(--mono); white-space: nowrap; }
table.grid th:first-child, table.grid td:first-child { text-align: left; padding-left: 0;
  font-family: var(--font); white-space: normal; color: var(--muted); }

/* ---------- trades */
.filters { display: grid; gap: 8px; margin: 8px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 14px; cursor: pointer;
  line-height: 1.4; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.trades { border-top: 1px solid var(--line); }
.trade { display: block; width: 100%; text-align: left; background: transparent; border: 0;
  border-bottom: 1px solid var(--line); padding: 12px 0; font: inherit; color: inherit; }
.trade.has-replay { cursor: pointer; }
.trade.has-replay:hover { background: var(--accent-soft); }
.trade-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.trade-when { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.trade-net { font-family: var(--mono); font-size: 16px; font-weight: 620; }
.trade-sym { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.trade-meta { font-size: 13.5px; color: var(--muted); font-family: var(--mono); margin-top: 2px;
  overflow-wrap: anywhere; }
.trade-tags { font-size: 13px; color: var(--faint); margin-top: 2px; }

/* ---------- replay */
.replay-title { font-weight: 640; font-size: 17px; margin: 4px 0 6px; }
.chart { margin: 12px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 4px 0 0; }
.chart canvas { display: block; width: 100%; height: 320px; }
.rp-status { font-size: 15px; margin: 8px 0; padding: 0; }
.rp-status.skipped { color: var(--bad); padding: 10px 12px; background: var(--bad-soft); border-radius: 10px; }
.rp-status.kept { color: var(--good); padding: 10px 12px; background: var(--good-soft); border-radius: 10px; }
ol.events { list-style: none; padding: 0; margin: 8px 0; font-size: 14.5px; }
ol.events li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; }
.ev-n { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--text); color: var(--bg);
  font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden;
  margin-top: 6px; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 9px 14px; font: inherit; font-size: 14.5px;
  color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--text); color: var(--bg); }

/* ---------- landing / connect (kept) */
.foot-note { font-size: 12px; color: var(--faint); font-family: var(--mono); margin-top: 10px; }
.checks { list-style: none; padding: 0; margin: 12px 0; }
.checks li { padding: 6px 0; display: flex; gap: 10px; align-items: baseline; }
.checks .y { color: var(--good); font-weight: 700; }
.checks .n { color: var(--bad); font-weight: 700; }
.steps { display: grid; gap: 10px; counter-reset: s; }
.step { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.step::before { counter-increment: s; content: counter(s); flex: 0 0 26px; height: 26px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700;
  font-size: 13px; display: flex; align-items: center; justify-content: center; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=email] {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; font-family: var(--mono); font-size: 15px; background: var(--surface);
  color: var(--text);
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted);
  margin: 16px 0; }
.alert { background: var(--warn-bg); color: var(--warn-text); border-radius: 12px; padding: 12px 14px;
  font-size: 14.5px; margin: 12px 0; }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.hidden { display: none !important; }
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 14px 0; }
.progress > div { height: 100%; width: 10%; background: var(--accent); transition: width 0.6s ease; }
.fact { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.principle { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); letter-spacing: 0.01em;
  text-align: center; }
.modal { position: fixed; inset: 0; background: rgba(10, 10, 14, 0.45); display: flex;
  align-items: flex-end; justify-content: center; z-index: 10; }
.modal .sheet { background: var(--surface); width: 100%; max-width: 520px; border-radius: 18px 18px 0 0;
  padding: 22px 20px 28px; }
.badge-ok { font-size: 14px; color: var(--good); }
.demo-banner { background: var(--accent-soft); color: var(--accent); font-size: 14px; padding: 12px 14px;
  border-radius: 10px; margin: 4px 0 0; line-height: 1.6; }
footer { padding: 40px 0 60px; color: var(--faint); font-size: 13px; line-height: 1.7; }

@media (min-width: 720px) {
  h1 { font-size: 44px; }
  .btn { width: auto; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats .stat { padding: 12px 12px; border-left: 1px solid var(--line); }
  .stats .stat:first-child { padding-left: 0; border-left: 0; }
  .stats.compact.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chart canvas { height: 360px; }
}
@media (max-width: 440px) {
  .nav-link { display: none; } /* privacy stays in the footer; room for the tagline */
}
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.three .stat { padding-left: 10px; padding-right: 6px; border-left: 1px solid var(--line); }
.stats.three .stat:first-child { padding-left: 0; border-left: 0; }

/* ===================== final pass: brand, hierarchy, disclosure ===================== */
:root { --brand: #1d2a44; --line: #ece9e2; --line-strong: #dcd8cf; }
@media (prefers-color-scheme: dark) { :root { --brand: #c9d3ee; --line: #24272c; --line-strong: #30333a; } }
.wrap { max-width: 820px; }
.brand .logo { width: 30px; height: 30px; flex: 0 0 30px; color: var(--brand); fill: currentColor; }
.brand-text b { font-size: 21px; font-weight: 680; }

/* typography: bold only for headings, conclusions and core numbers */
h3 { font-weight: 600; }
.grow-name, .trade-sym, .replay-title { font-weight: 560; }
.stat-value { font-weight: 600; }
.trade-net { font-weight: 600; }
.rule { font-weight: 600; }
.eyebrow { font-weight: 600; color: var(--muted); letter-spacing: 0.01em; margin: 18px 0 6px; }

/* section rhythm: more air between sections, tighter inside */
.block { padding: 44px 0 36px; }
.block h2 { margin-bottom: 6px; }
#leverage, #capital { margin-top: 30px; }

/* sticky section nav */
.secnav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); }
.secnav .wrap { display: flex; gap: 4px; height: 42px; align-items: center; }
.secnav a { flex: 1; text-align: center; font-size: 14.5px; color: var(--muted); padding: 8px 0;
  border-radius: 8px; }
.secnav a.on { color: var(--text); font-weight: 600; background: var(--accent-soft); }
section.block { scroll-margin-top: 52px; }

/* small helpers */
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-head h3 { margin: 0; }
.status { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.status.neg { color: var(--bad); }
.insight { font-size: 16px; line-height: 1.65; margin: 14px 0 4px; padding-left: 12px;
  border-left: 2px solid var(--line-strong); }
.row-label { font-size: 14px; color: var(--muted); margin: 14px 0 2px; }
details.more { margin-top: 8px; }
details.more > summary { font-size: 14.5px; }
details.more[open] { padding-bottom: 6px; }
.hero-stat .big { font-size: 32px; font-weight: 640; }

/* methods: compact summary rows */
.method { padding: 18px 0; }
.method h3 { margin: 0 0 4px; }
.method-line { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 15px; color: var(--muted);
  margin: 0; font-variant-numeric: tabular-nums; }
.method-line span:first-child { color: var(--text); }
.method-focus { font-size: 15.5px; margin: 8px 0 0; }
.method-focus b { font-weight: 600; }

/* refinement card */
.card.refine { padding: 20px 18px 14px; }
.card.refine .rule { margin: 14px 0 8px; }

/* trades preview + full sheet (Level 3) */
.trade-link { font-size: 14px; color: var(--accent); white-space: nowrap; }
.trade-meta { font-family: var(--font); font-variant-numeric: tabular-nums; }
#trades-open { margin-top: 12px; }
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(10, 10, 14, 0.35);
  display: flex; justify-content: center; }
.sheet-full { background: var(--bg); width: 100%; max-width: 820px; height: 100%; overflow-y: auto;
  padding: 0 16px 40px; -webkit-overflow-scrolling: touch; }
.sheet-head { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center;
  justify-content: space-between; padding: 14px 0 10px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-head h3 { margin: 0; }
body.no-scroll { overflow: hidden; }

/* replay */
.replay-block { margin-top: 34px; }
.rp-status.on { font-size: 15px; color: var(--muted); padding: 2px 0 0; }
ol.events li { border-bottom-color: var(--line); }
.ev-n { background: var(--muted); }

/* tags: only primary / stable / key labels are coloured */
.tag { font-weight: 600; }

@media (min-width: 720px) {
  .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .secnav a { flex: 0 0 auto; padding: 8px 16px; }
}
@media (min-width: 1024px) {
  .wrap { padding: 0 24px; }
  .hero { padding-top: 56px; }
}
.stats.three .stat-value { font-size: 18px; }

/* ===================== value + hierarchy pass ===================== */
:root { --focus-bg: #fbf1ee; --focus-line: #ecd3cc; }
@media (prefers-color-scheme: dark) { :root { --focus-bg: #231816; --focus-line: #3a2621; } }

/* fewer dividers: structure from spacing and type */
.stats, .stats .stat, .stats.three .stat, .stats .stat:nth-child(even) { border: 0 !important; }
.stats { margin: 6px 0 4px; gap: 6px 0; }
.stats .stat { padding: 6px 12px 6px 0 !important; }
.grow { border-bottom: 0; padding: 10px 0; }
.method { border-bottom: 0; padding: 14px 0; }
.trades { border-top: 0; }
.trade { border-bottom: 1px solid var(--line); }
table.ev td { border-bottom-color: var(--line); }
.block { border-top: 1px solid var(--line); }

/* LEVEL 1: style label */
#style { margin: 6px 0 22px; }
.style-label { font-size: 13.5px; color: var(--muted); margin: 0; }
.style-name { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin: 2px 0 10px; }
.chips.static .chip { cursor: default; background: transparent; color: var(--text); border-color: var(--line-strong);
  font-size: 13.5px; padding: 4px 11px; }

/* LEVEL 2: supporting profile blocks */
.support { margin-top: 30px; }
.support h3 { margin: 0 0 2px; font-size: 16px; color: var(--muted); font-weight: 560; }
.conclusion { font-size: 19px; font-weight: 640; margin: 0 0 6px; line-height: 1.4; }

/* status words: plain text unless it is the one top issue */
.status { font-size: 13.5px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.status.strong { color: var(--bad); font-weight: 650; }
.status.good { color: var(--good); }
.method.top h3 { color: var(--text); }

/* THE visual focus: the one thing to improve */
#sec-refine { border-top: 0; padding-top: 18px; }
.focus-card { background: var(--focus-bg); border: 1px solid var(--focus-line); border-radius: 18px;
  padding: 22px 18px 18px; margin: 0; }
.focus-eyebrow { font-size: 13.5px; font-weight: 650; color: var(--bad); letter-spacing: 0.02em; margin: 0 0 6px; }
.focus-eyebrow.muted { color: var(--muted); }
.focus-title { font-size: 23px; line-height: 1.35; margin: 0 0 12px; }
.focus-card .stats .stat-value { font-size: 22px; }
.focus-part { margin: 16px 0 0; }
.focus-part p { margin: 0; line-height: 1.65; }
.focus-label { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 2px !important; }
.focus-part.rule-part { border-left: 3px solid var(--accent); padding-left: 12px; }
.focus-part.rule-part p:last-child { font-weight: 640; font-size: 16.5px; }
.focus-actions { display: grid; gap: 10px; margin: 18px 0 4px; }
.focus-actions .btn { width: 100%; }
.focus-actions .btn:not(.secondary) { background: var(--accent); color: #fff; }
.second-card { margin-top: 22px; padding: 16px 0 0; border-top: 1px solid var(--line); }
.second-card h3 { margin: 2px 0 6px; font-size: 17px; }

/* replay: history vs rule, side by side on wide screens */
.compare { display: grid; gap: 10px; margin: 10px 0 12px; }
.compare-col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.compare-col p { margin: 0; }
.compare-col.rule-col { border-color: var(--accent-soft); background: var(--accent-soft); }
@media (min-width: 560px) { .compare { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .focus-actions { grid-template-columns: 1fr 1fr; } .focus-card { padding: 28px 28px 22px; } }

/* ===================== final report dashboard ===================== */
:root {
  --bg: #f6f7f9; --surface: #fffdfa; --text: #17233d; --muted: #667085; --faint: #8b95a7;
  --line: #e7eaf0; --line-strong: #d9dee8; --accent: #2f5fa7; --accent-soft: #edf4fc;
  --brand: #172c52; --good: #39745a; --good-soft: #edf6f0; --bad: #a94d45;
  --bad-soft: #faeeeb; --focus-bg: #fff5f1; --focus-line: #edcec6; --radius: 16px;
}
.wrap { max-width: 1180px; padding-left: 24px; padding-right: 24px; }
#report { padding-bottom: 28px; }
.block { border-top: 0; padding: 56px 0 40px; }
.block + .block { margin-top: 6px; }
.section-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 28px; }
.section-no { color: #9ec2eb; font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.section-bar { width: 4px; height: 34px; border-radius: 4px; background: var(--brand); flex: 0 0 4px; }
.section-head h2 { color: var(--brand); font-size: 26px; line-height: 1.1; margin: 0 0 7px; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.report-window { margin: -16px 0 18px 58px; }
.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  align-items: start; }
.profile-metrics { display: contents; }
.summary-card, .support-card, .method-card, .evidence-summary, .evidence-trade {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(23, 44, 82, 0.055);
}
.summary-card { min-height: 0; padding: 18px 19px; }
#style.style-card { margin: 0; }
.style-name { color: var(--brand); font-size: 27px; }
.style-card .body { display: none; } /* the one-line sentence is dropped for card height; the "why this type" disclosure stays (collapsed) */
.style-card .chips.static { flex-wrap: nowrap; gap: 5px; }
.style-card .chips.static .chip { padding: 2px 7px; font-size: 12.5px; }
.style-card details summary { color: var(--muted); font-size: 12.5px; font-weight: 500; padding: 7px 0 0; }
.summary-card .card-number { display: block; color: var(--brand); font-family: var(--mono); font-size: 25px;
  line-height: 1.28; margin: 14px 0 7px; letter-spacing: -0.03em; }
.summary-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.result-card.hero-stat { padding: 18px 19px; }
.result-card.hero-stat .big { font-size: 30px; margin-top: 14px; }
.asset-ratio { display: flex; width: 100%; max-width: 100%; height: 6px; overflow: hidden;
  border-radius: 999px; margin-top: 10px; background: #e8edf4; }
.asset-ratio > span { display: block; height: 100%; flex: 0 0 auto; }
.asset-ratio-major { background: #7898bd; }
.asset-ratio-alt { background: #c8d7e9; }
#pnl-details { margin-top: 12px; }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.support-card { margin: 0; padding: 24px; }
.support-card h3 { color: var(--brand); font-size: 17px; margin: 0 0 4px; }
.support-card .conclusion { font-size: 20px; margin: 8px 0 12px; }
#methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.methods-column { display: flex; min-width: 0; flex-direction: column; gap: 16px;
  align-self: start; height: auto; }
.method-card { padding: 18px 20px; min-height: 0; height: auto; flex: 0 0 auto; }
.method-card.top { border-color: var(--focus-line); background: var(--focus-bg); }
.method-card .row-head h3 { color: var(--brand); font-size: 18px; }
.method-card:not(.top) .row-head .status { font-size: 12.5px; font-weight: 500; }
.method-card:not(.top) .row-head .status.good { color: #5d806c; }
.method-card:not(.top) .method-net.pos { color: #587966; }
.method-findings { display: grid; gap: 8px; margin: 16px 0 8px; }
.method-finding { background: rgba(237, 244, 252, 0.65); border-radius: 11px; padding: 10px 12px; }
.method-finding b, .method-finding small { display: block; }
.method-finding b { font-size: 14px; margin: 2px 0; }
.method-finding small { color: var(--muted); font-size: 12.5px; }
.finding-label, .evidence-kicker { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.focus-card { max-width: none; padding: 34px; box-shadow: 0 14px 40px rgba(117, 52, 42, 0.07); }
.focus-title { color: var(--brand); font-size: 28px; max-width: 780px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0; }
.focus-card .stats.four .stat-value { font-size: 24px; }
.focus-part { max-width: 900px; }
.second-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.evidence-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.45fr); gap: 18px; align-items: start; }
.evidence-summary { padding: 24px; position: sticky; top: 62px; }
.evidence-headline { display: grid; gap: 14px; margin: 16px 0 18px; }
.evidence-headline-item { border-left: 3px solid var(--accent); padding-left: 12px; }
.evidence-headline-item small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.evidence-headline-item strong { color: var(--brand); display: block; font-family: var(--mono); font-size: 22px;
  line-height: 1.25; letter-spacing: -0.025em; }
.evidence-headline-item strong.neg { color: var(--bad); }
.evidence-secondary { border-top: 1px solid var(--line); padding-top: 7px; }
.evidence-summary table.ev td { padding: 9px 0; font-size: 13.5px; }
.evidence-note { background: var(--accent-soft); color: var(--brand); border-radius: 10px; padding: 12px;
  font-size: 13.5px; line-height: 1.55; margin: 16px 0 0; }
.evidence-trades { display: grid; gap: 12px; }
.evidence-trade { padding: 15px 17px 7px; }
.evidence-trade-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.percentile { color: var(--muted); font-size: 12.5px; }
.evidence-trade .trade { padding: 9px 0; border: 0; }
#why-open { margin-top: 14px; }
.replay-head { margin-bottom: 12px; }
.replay-layout { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(0, 1.5fr); gap: 18px; align-items: start; }
.replay-story, .replay-visual { min-width: 0; }
.compare { grid-template-columns: 1fr; margin-top: 0; }
.compare-col { padding: 16px; min-height: 104px; }
.compare-col > p:last-child { font-size: 15px; line-height: 1.65; }
.chart { margin: 0; border-radius: var(--radius); box-shadow: 0 8px 28px rgba(23, 44, 82, 0.05); }
.chart canvas { height: 390px; }
.rp-status.on { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.replay-fact { color: var(--brand); font-size: 13.5px; line-height: 1.55; margin: 10px 4px 0; }
.secnav .wrap { overflow-x: auto; scrollbar-width: none; }
.secnav a { white-space: nowrap; }

@media (max-width: 800px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .block { padding: 42px 0 30px; }
  .section-head { gap: 11px; margin-bottom: 20px; }
  .section-no { font-size: 27px; }
  .section-bar { height: 29px; width: 3px; flex-basis: 3px; }
  .section-head h2 { font-size: 22px; }
  .report-window { margin-left: 43px; }
  .profile-grid, .support-grid, .evidence-layout, .replay-layout { grid-template-columns: 1fr; }
  #methods { display: flex; flex-direction: column; }
  .methods-column { display: contents; }
  .method-card { order: var(--method-order); height: auto; flex: 0 0 auto; }
  .summary-card { min-height: 0; padding: 18px; }
  .summary-card, .support-card, .method-card, .focus-card, .second-card,
  .evidence-summary, .evidence-trade, .replay-story, .replay-visual { min-width: 0; max-width: 100%; }
  .style-card .chips { margin-bottom: 0; }
  .style-card .chips.static { flex-wrap: wrap; }
  .method-card { min-height: 0; padding: 18px; }
  .focus-card { padding: 22px 18px; }
  .focus-title { font-size: 22px; overflow-wrap: break-word; }
  .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-card > .focus-part:not(.rule-part), .focus-card > .fine, .focus-card > .more { display: none; }
  .focus-card .focus-actions { margin-top: 14px; }
  .evidence-summary { position: static; }
  .chart canvas { height: 350px; }
  .secnav .wrap { padding: 0 10px; }
  .secnav a { font-size: 12px; padding: 8px 9px; }
}

/* sticky nav: numbered labels on wide screens, short labels that all fit on phones */
.nav-short { display: none; }
@media (max-width: 800px) {
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .secnav .wrap { overflow-x: visible; gap: 2px; }
  .secnav a { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: 13px; text-align: center; }
  /* core numbers stay on one line: amounts are never split mid-number */
  .stat-value, .card-number, .big, .trade-net { white-space: nowrap; }
}
/* opening "why this type" must not stretch the neighbouring headline cards into empty boxes */
.profile-grid:has(.style-card details[open]) { align-items: start; }

/* ===================== connect trust + report feedback ===================== */
:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid rgba(47, 95, 167, 0.28); outline-offset: 3px;
}
.connect-layout {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  grid-template-areas: "hero security" "demo security" "form security" "guide security";
  column-gap: 34px; align-items: start; padding: 48px 0 28px;
}
.connect-hero { grid-area: hero; max-width: 740px; }
.connect-hero .eyebrow { margin-top: 0; color: var(--accent); }
.connect-hero h1 { color: var(--brand); margin-top: 4px; }
.connect-hero .lead { max-width: 720px; margin-bottom: 18px; }
.connect-demo { grid-area: demo; display: flex; flex-wrap: wrap; gap: 5px 12px;
  align-items: baseline; color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.connect-demo a { font-weight: 650; }
.security-card { grid-area: security; position: sticky; top: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  box-shadow: 0 12px 34px rgba(23, 44, 82, 0.07); }
.security-card h2 { color: var(--brand); font-size: 20px; }
.trust-list { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 10px; }
.trust-list li { position: relative; padding-left: 26px; color: var(--text); font-size: 14.5px; }
.trust-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--good);
  font-weight: 800; }
.security-note { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 0; }
.connect-form-card { grid-area: form; max-width: 740px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  box-shadow: 0 10px 30px rgba(23, 44, 82, 0.055); }
.connect-form-card h2 { color: var(--brand); margin-bottom: 16px; }
.sensitive-field { position: relative; }
.sensitive-field input { padding-right: 78px; }
.visibility-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px;
  font-weight: 650; padding: 8px 9px; border-radius: 8px; cursor: pointer; }
.inline-help { margin-top: 3px; }
.inline-help summary { font-size: 13px; padding: 7px 0 2px; }
.inline-help p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 4px 0 8px; }
.read-only-confirm { display: flex; align-items: flex-start; gap: 11px; margin: 20px 0 16px;
  padding: 13px 14px; color: var(--text); background: var(--accent-soft);
  border: 1px solid rgba(47, 95, 167, 0.14); border-radius: 12px; cursor: pointer;
  font-size: 13.5px; line-height: 1.55; }
.read-only-confirm input, .feedback-interview input { width: 18px; height: 18px; flex: 0 0 18px;
  margin: 2px 0 0; accent-color: var(--accent); }
.connect-submit { width: 100%; background: var(--brand); color: white; }
.credential-note { color: var(--faint); text-align: left; font-size: 12.5px; line-height: 1.55;
  margin: 11px 0 0; }
.api-guide { grid-area: guide; max-width: 740px; margin: 16px 0 0; padding: 0 4px; }
.api-guide summary { font-size: 14px; }
.api-guide ol { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; padding-left: 24px; }
.api-guide li { padding: 3px 0; }

.feedback-block { padding-top: 22px; }
.feedback-card { max-width: 780px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  box-shadow: 0 8px 28px rgba(23, 44, 82, 0.045); }
.feedback-card h2 { color: var(--brand); font-size: 21px; margin-bottom: 14px; }
.feedback-mode { display: inline-block; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 650; margin: 0 0 8px; }
.feedback-helpful { display: flex; gap: 10px; margin: 0 0 18px; }
.feedback-choice { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.feedback-choice.selected, .feedback-choice[aria-pressed="true"] { border-color: var(--accent);
  color: var(--accent); background: var(--accent-soft); }
.feedback-card > label:not(.feedback-interview) { color: var(--text); font-weight: 600; }
.feedback-card textarea { width: 100%; resize: vertical; min-height: 104px; max-height: 260px;
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; line-height: 1.6; }
.feedback-interview { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 4px;
  color: var(--muted); cursor: pointer; font-size: 14px; }
.feedback-contact { margin-top: 8px; }
.feedback-contact input { font-family: var(--font); }
.feedback-submit { margin-top: 16px; width: auto; padding: 11px 18px; }
.feedback-status { color: var(--good); font-size: 14px; margin: 12px 0 0; }

@media (max-width: 760px) {
  .connect-layout { grid-template-columns: 1fr;
    grid-template-areas: "hero" "security" "demo" "form" "guide";
    gap: 0; padding: 28px 0 18px; }
  .connect-hero h1 { font-size: 32px; }
  .connect-hero .lead { font-size: 15.5px; margin-bottom: 16px; }
  .security-card { position: static; padding: 17px 18px; margin: 0 0 15px; }
  .security-card h2 { font-size: 17px; margin-bottom: 8px; }
  .trust-list { grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 8px 0 10px; }
  .trust-list li { font-size: 12.5px; padding-left: 20px; }
  .security-note { display: none; }
  .connect-demo { margin-bottom: 13px; }
  .connect-form-card { padding: 20px 17px; }
  .feedback-card { padding: 20px 17px; }
  .feedback-helpful { display: grid; grid-template-columns: 1fr 1fr; }
  .feedback-choice { padding: 10px 8px; }
  .feedback-submit { width: 100%; }
}

@media (max-width: 390px) {
  .trust-list { grid-template-columns: 1fr; }
}
