/* ===========================================================================
   Portfolio Manager — marketing site
   Design tokens mirror the app (src/App.css) and the Portfolio Manager icon: Inter,
   navy #0a1b33, blue #2d6cec, gold #fbbf24 accent, rounded 20px cards, soft
   shadows. Light product surface on a calm slate page, with a deep-navy hero
   that echoes the app's sidebar and icon.
   =========================================================================== */

:root {
  /* Brand / primary — Portfolio Manager icon palette */
  --blue: #2d6cec;
  --blue-strong: #1b57d6;
  --blue-bright: #4a8efa;
  --cyan: #38bdf8;
  --green: #16a34a;
  --green-bright: #22c55e;

  /* Gold — the signature "balance point" accent */
  --gold: #fbbf24;
  --gold-bright: #fdd860;

  /* Navy (app sidebar / icon) */
  --navy-950: #06121f;
  --navy-900: #0a1b33;
  --navy-800: #0c2240;
  --navy-700: #14284e;

  /* Ink & slate */
  --ink: #172033;
  --slate-700: #41506a;
  --slate-600: #607086;
  --slate-500: #718096;
  --slate-400: #94a3b8;

  /* Surfaces */
  --page: #eef1f6;
  --card: #ffffff;
  --card-border: #dfe6f1;
  --line: #e6ebf2;
  --line-soft: #edf1f6;
  --thead: #f8fafc;

  /* Status */
  --good-text: #15803d;
  --good-bg: #ecfdf3;
  --good-border: #bbf7d0;
  --warn-text: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;

  --shadow-card: 0 12px 32px rgba(16, 24, 39, 0.06);
  --shadow-pop: 0 24px 60px rgba(16, 24, 39, 0.16);
  --shadow-blue: 0 18px 40px rgba(45, 108, 236, 0.28);

  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1200px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue);
}
.eyebrow.on-dark { color: #8fb4ff; }

.section { padding: 92px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 14px 0 14px; }
.section-head p { font-size: 18px; color: var(--slate-600); }

.gradient-text {
  background: linear-gradient(100deg, var(--blue) 0%, var(--cyan) 55%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: 13px;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-strong); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.18); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--card-border); box-shadow: var(--shadow-card); }
.btn-light:hover { transform: translateY(-2px); border-color: #c7d3e8; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ===========================================================================
   Navbar
   =========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(238, 241, 246, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(16, 24, 39, 0.06);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 16px rgba(16,24,39,.18); }
.nav-links { display: flex; gap: 6px; margin-left: 14px; }
.nav-links a {
  font-size: 14.5px; font-weight: 600; color: var(--slate-700);
  padding: 8px 13px; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: rgba(45,108,236,0.08); color: var(--blue-strong); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* ===========================================================================
   Hero
   =========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(56,189,248,0.18), transparent 60%),
    radial-gradient(900px 500px at 8% 12%, rgba(45,108,236,0.30), transparent 60%),
    linear-gradient(170deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #eaf0fb;
  padding: 70px 0 90px;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1.12fr; gap: 50px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; margin: 18px 0; color: #fff; }
.hero-sub { font-size: 19px; color: #b6c4dd; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin: 30px 0 22px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; color: #9fb0cc; font-size: 14px; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.dot-green { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }

.pipeline-tag {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; color: #9fc0ff;
}
.pipeline-tag b { color: #fff; }
.pipeline-tag .sep { color: var(--blue-bright); }

/* ===========================================================================
   App window (faithful product frame)
   =========================================================================== */
.window, .frame { color: var(--ink); }
.window {
  border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-pop);
  border: 1px solid rgba(255,255,255,0.5);
}
.window-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  background: #0d1626; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.win-dot { width: 11px; height: 11px; border-radius: 50%; }
.win-dot.r { background: #ff5f57; } .win-dot.y { background: #febc2e; } .win-dot.g { background: #28c840; }
.win-title { margin-left: 10px; color: #8b9bb4; font-size: 12px; font-weight: 600; }

.app { display: grid; grid-template-columns: 188px 1fr; background: #f4f6f9; }
.app-side {
  background: linear-gradient(180deg, #101827 0%, #111c30 100%);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; min-height: 100%;
}
.app-brand { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.app-brand .logo { width: 30px; height: 30px; border-radius: 9px; }
.app-brand .t { color: #fff; font-weight: 800; font-size: 13.5px; line-height: 1.1; }
.app-brand .s { color: #95a4bd; font-size: 10px; }
.app-nav { display: flex; flex-direction: column; gap: 3px; }
.app-nav .item {
  display: flex; align-items: center; gap: 9px; color: #b8c4d6;
  font-size: 12.5px; font-weight: 600; padding: 8px 10px; border-radius: 9px;
}
.app-nav .item .ic { width: 15px; height: 15px; opacity: .85; }
.app-nav .item.active { background: var(--blue); color: #fff; box-shadow: 0 10px 20px rgba(45,108,236,0.25); }
.app-side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: #c6d3e4; font-size: 11px; }

.app-main { padding: 18px; min-width: 0; }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.app-top .eyebrow { font-size: 10px; letter-spacing: 0.08em; }
.app-top h3 { font-size: 22px; margin: 5px 0 2px; }
.app-top .desc { color: var(--slate-600); font-size: 12px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 7px; background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 700; padding: 9px 13px; border-radius: 11px; box-shadow: var(--shadow-blue);
  white-space: nowrap;
}

/* metric cards */
/* 2×2 in the mockup so a headline figure ($876,697 …) never overflows a narrow card. */
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.mcard { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 11px; box-shadow: var(--shadow-card); min-width: 0; }
.mcard .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.mcard .lab { color: var(--slate-600); font-size: 10px; font-weight: 700; line-height: 1.25; min-width: 0; }
.mcard .ic { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: #eff6ff; color: var(--blue); }
/* overflow-wrap is the belt-and-braces guard: even an unexpectedly long value stays inside the tile. */
.mcard .val { font-size: 19px; font-weight: 850; margin-top: 7px; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.mcard .note { color: var(--slate-500); font-size: 9.5px; margin-top: 4px; line-height: 1.3; overflow-wrap: anywhere; }
.mcard.good { border-color: var(--good-border); }
.mcard.good .ic { background: var(--good-bg); color: var(--good-text); }
.mcard.warn { border-color: var(--warn-border); }
.mcard.warn .ic { background: var(--warn-bg); color: var(--warn-text); }

/* Cost-basis summary strip (Holdings mockup). auto-fit wrapping + min-width:0 means a
   long figure like "+$117,583 (+49.3%)" wraps within its cell and never overflows. */
.cb-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 8px 12px; border: 1px solid var(--card-border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.cb-summary > div { min-width: 0; }
.cb-lab { font-size: 10px; font-weight: 700; color: var(--slate-500); }
.cb-val { font-size: 14px; font-weight: 850; margin-top: 2px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.cb-val.pos { color: var(--good-text); }
.cb-pct { font-size: 11px; font-weight: 700; }
.val.gain { color: var(--good-text); } .val.loss { color: var(--danger-text); }

/* panel */
.panel { background: #fff; border: 1px solid var(--card-border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-card); }
.panel + .panel { margin-top: 14px; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-h h4 { font-size: 15px; }
.panel-h .sub { color: var(--slate-500); font-size: 11.5px; }
.panel-grid { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 14px; }

/* value chart */
.chart-toolbar { display: flex; gap: 6px; margin-bottom: 10px; }
.seg { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font-size: 11px; font-weight: 700; color: var(--slate-600); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(16,24,39,.08); }

/* target vs actual bars */
.tva-row { margin-bottom: 13px; }
.tva-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.tva-name { font-weight: 700; }
.tva-pcts { color: var(--slate-600); }
.tva-track { position: relative; height: 9px; background: #eef2f7; border-radius: 999px; }
.tva-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue-bright), var(--blue)); }
.tva-fill.over { background: linear-gradient(90deg, #f6a93b, #ef7d2e); }
.tva-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; }
.drift-pos { color: var(--good-text); } .drift-neg { color: var(--danger-text); }

/* moves list */
.moves .move { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.moves .move:last-child { border-bottom: 0; }
.chip { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.chip.buy { background: #e0ecff; color: #1d4ed8; }
.chip.sell { background: #ffe4e6; color: #be123c; }
.chip.hold { background: #eef1f6; color: var(--slate-600); }
.move .m-main { flex: 1; min-width: 0; }
.move .m-tk { font-weight: 700; font-size: 12.5px; }
.move .m-sub { color: var(--slate-500); font-size: 11px; }
.move .m-amt { font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ===========================================================================
   Pipeline band
   =========================================================================== */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pstep { position: relative; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.pstep .num { width: 34px; height: 34px; border-radius: 10px; background: #eff6ff; color: var(--blue); font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.pstep h4 { font-size: 17px; margin-bottom: 6px; }
.pstep p { color: var(--slate-600); font-size: 14px; }
.pstep .arrow { position: absolute; right: -22px; top: 50%; transform: translateY(-50%); color: var(--blue-bright); z-index: 2; }
.pstep:last-child .arrow { display: none; }

/* ===========================================================================
   Feature rows
   =========================================================================== */
.feature { display: grid; grid-template-columns: 1fr 1.12fr; gap: 56px; align-items: center; }
.feature > * { min-width: 0; }
.feature.reverse { grid-template-columns: 1.12fr 1fr; }
.feature.reverse .feature-copy { order: 2; }
.feature + .feature { margin-top: 96px; }
.feature-copy h3 { font-size: clamp(24px, 3.2vw, 32px); margin: 14px 0 16px; }
.feature-copy > p { font-size: 17px; color: var(--slate-600); margin-bottom: 22px; }
.flist { display: flex; flex-direction: column; gap: 13px; }
.flist li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--slate-700); }
.flist .tick { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--good-bg); color: var(--good-text); display: grid; place-items: center; margin-top: 1px; }
.flist .tick svg { width: 13px; height: 13px; }
.flist b { color: var(--ink); }

/* mini app frame (feature panels) */
.frame { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-pop); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #0d1626; }
.frame-bar .win-title { margin-left: 8px; }

/* generic data table for recreations */
.dt { width: 100%; border-collapse: collapse; font-size: 12px; }
.dt th { text-align: left; color: var(--slate-600); font-size: 10.5px; font-weight: 800; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--thead); white-space: nowrap; }
.dt td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dt tr:last-child td { border-bottom: 0; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .tk { font-weight: 700; }
.dt-wrap { overflow-x: auto; }
.badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.badge.inst { background: var(--good-bg); color: var(--good-text); }
.badge.valid { background: var(--good-bg); color: var(--good-text); }
.badge.review { background: var(--warn-bg); color: var(--warn-text); }
.muted { color: var(--slate-400); }

.frame-pad { padding: 14px; }
.frame-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.mini-input { border: 1px solid var(--card-border); border-radius: 9px; padding: 6px 10px; font-size: 11.5px; color: var(--slate-600); background: #fff; }
.mini-chip { border: 1px solid var(--card-border); background: #fff; color: var(--slate-600); font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px; cursor: default; }
.mini-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.spacer { flex: 1; }
.count-chip { font-size: 11px; color: var(--slate-500); font-weight: 600; }

/* rank strip (screener) */
.rank-strip { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rank-card { flex: 1; border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 12px; background: #fbfdff; }
.rank-card .rk { font-size: 10px; font-weight: 800; color: var(--blue); }
.rank-card .sym { font-weight: 800; font-size: 14px; }
.rank-card .cat { font-size: 10.5px; color: var(--slate-500); }
.rank-card .sc { font-weight: 800; font-size: 13px; color: var(--ink); font-style: normal; }

/* backtest legend + svg */
.bt-legend { display: flex; gap: 16px; padding: 12px 14px 0; flex-wrap: wrap; }
.bt-legend .lg { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--slate-700); }
.bt-legend .sw { width: 12px; height: 4px; border-radius: 3px; }
.bt-legend .sw.dash { background: repeating-linear-gradient(90deg, #d99e06 0 5px, transparent 5px 8px); }
.bt-legend .dia { width: 7px; height: 7px; border: 2px solid #2563eb; background: #fff; border-radius: 1px; transform: rotate(45deg); margin: 0 2px; }

/* backtest honest-window banner */
.bt-banner {
  display: flex; align-items: flex-start; gap: 8px; margin: 12px 14px 0; padding: 8px 12px;
  background: #f0f6ff; border: 1px solid #d6e4ff; border-radius: 10px;
  font-size: 11px; line-height: 1.5; color: var(--slate-700);
}
.bt-banner svg { flex: none; width: 13px; height: 13px; color: var(--blue); margin-top: 2px; }
.bt-banner b { color: var(--ink); }

/* backtest monthly heat strip */
.heat-strip { padding: 2px 14px 14px; }
.hs-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; color: var(--slate-700); margin: 10px 0 8px; }
.hs-views { display: flex; gap: 6px; }
.heat-row { display: grid; grid-template-columns: 92px repeat(12, 1fr); gap: 3px; align-items: center; margin-bottom: 3px; }
.heat-row .hl { font-size: 10px; font-weight: 700; color: var(--slate-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.heat-cell { font-size: 8.5px; font-weight: 700; text-align: center; padding: 4px 0; border-radius: 4px; color: #166534; font-variant-numeric: tabular-nums; }
.heat-cell.n { color: #b91c1c; }
.heat-row.months .heat-cell { padding: 0; color: var(--slate-400); font-weight: 800; background: none; }

/* backtest secondary cards + copy footnote */
.bt-sub { margin-top: 64px; }
.feature-copy > p.fnote { font-size: 13.5px; color: var(--slate-500); margin: 18px 0 0; }

/* ===========================================================================
   Planning suite (flagship section)
   =========================================================================== */
.planning .feature + .feature { margin-top: 80px; }

/* planning hero (full-width projection frame) */
.plan-hero { margin-bottom: 72px; }
.plan-hero-grid { display: grid; grid-template-columns: 0.92fr 1.18fr; gap: 0; }
.plan-hero-grid > * { min-width: 0; }
.plan-hero-side { padding: 16px 14px 16px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.plan-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.plan-assume { background: #f7f9fd; border: 1px solid var(--card-border); border-radius: 12px; padding: 12px 13px; }
.plan-assume .pa-h { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.plan-assume p { font-size: 12px; color: var(--slate-600); line-height: 1.5; }
.plan-assume b { color: var(--ink); }
.plan-hero-chart { padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.demo-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; text-align: center; margin: 18px auto 0; max-width: 760px; font-size: 13px; color: var(--slate-500); }
.demo-tag { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #92590a; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); padding: 4px 10px; border-radius: 999px; }

/* life-stage strip (every stage, not just the last) */
.life-stages { margin-bottom: 72px; }
.ls-lead { max-width: 760px; margin: 0 auto 24px; text-align: center; }
.ls-lead h3 { font-size: clamp(22px, 3vw, 30px); margin: 10px 0 12px; }
.ls-lead p { font-size: 16px; color: var(--slate-600); line-height: 1.6; }
.stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stage-grid .mcard { display: flex; flex-direction: column; }
.ls-q { font-size: 11px; font-weight: 700; color: var(--slate-500); margin-top: 9px; }
.stage-grid .val { margin-top: 2px; }
.stage-grid .note { margin-top: auto; padding-top: 6px; }
@media (max-width: 860px) { .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stage-grid { grid-template-columns: 1fr; } }

/* tax engine panel */
.tax-block { margin-bottom: 14px; }
.tax-lab { font-size: 11px; font-weight: 700; color: var(--slate-700); margin-bottom: 8px; }
.tax-lab .muted { font-weight: 500; }
.tax-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { font-size: 11px; font-weight: 700; color: var(--slate-600); background: #f4f7fb; border: 1px solid var(--card-border); border-radius: 9px; padding: 5px 9px; }
.tchip b { color: var(--ink); font-weight: 800; margin-left: 2px; }
.tchip.on { background: #eff6ff; border-color: #bcd3ff; color: var(--blue-strong); }
.tchip.on b { color: var(--blue-strong); }
.tchip.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.tax-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.tax-mini { border: 1px solid var(--card-border); border-radius: 12px; padding: 11px 12px; background: #fff; min-width: 0; }
.tax-mini .tm-h { font-size: 11px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.tm-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--slate-600); padding: 3px 0; }
.tm-row b { color: var(--ink); font-weight: 700; }

/* guardrail cost box */
.cost-box { margin-top: 12px; background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 12px; padding: 11px 13px; }
.cost-box .cb-h { font-size: 11.5px; font-weight: 800; color: var(--warn-text); margin-bottom: 7px; }
.cost-box .cb-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--slate-700); padding: 2px 0; }
.cost-box .cb-row b { color: var(--ink); font-weight: 700; }

/* ===========================================================================
   Feature grid (small cards)
   =========================================================================== */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gcard { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); transition: transform .18s ease, box-shadow .18s ease; }
.gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.gcard .gi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #eff6ff, #e0edff); color: var(--blue); margin-bottom: 15px; }
.gcard .gi svg { width: 22px; height: 22px; }
.gcard h4 { font-size: 17px; margin-bottom: 8px; }
.gcard p { color: var(--slate-600); font-size: 14px; }

/* ===========================================================================
   Comparison table
   =========================================================================== */
.compare { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow-x: auto; overflow-y: hidden; }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 18px 24px; text-align: left; font-size: 15.5px; border-bottom: 1px solid var(--line-soft); }
.compare thead th { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-500); background: var(--thead); }
.compare thead th.bp { color: var(--blue); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td.them { color: var(--slate-600); }
.compare td.us { color: var(--ink); font-weight: 650; }
.compare td.us::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 9px; }
.compare td.them::before { content: "—"; color: var(--slate-400); margin-right: 9px; }
.compare col.col-bp { background: rgba(45,108,236,0.035); }

/* ===========================================================================
   Architecture
   =========================================================================== */
.arch {
  background:
    radial-gradient(800px 400px at 85% 0%, rgba(56,189,248,0.14), transparent 60%),
    linear-gradient(165deg, var(--navy-900), var(--navy-950));
  color: #e7eefb; border-radius: 28px; padding: 56px; position: relative; overflow: hidden;
}
.arch h2 { color: #fff; font-size: clamp(26px, 3.6vw, 36px); }
.arch .lead { color: #b6c4dd; font-size: 18px; max-width: 640px; margin: 14px 0 36px; }
.arch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.acard { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); border-radius: 16px; padding: 22px; }
.acard .ai { color: #8fb4ff; margin-bottom: 12px; }
.acard h4 { color: #fff; font-size: 16px; margin-bottom: 7px; }
.acard p { color: #a9b8d4; font-size: 13.5px; }
.arch-foot { margin-top: 30px; display: flex; align-items: center; gap: 10px; color: #9fb0cc; font-size: 14px; }

/* ===========================================================================
   FAQ
   =========================================================================== */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 4px 22px; box-shadow: var(--shadow-card); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 16.5px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 24px; height: 24px; border-radius: 7px; background: #eff6ff; color: var(--blue); display: grid; place-items: center; font-weight: 800; transition: transform .2s; }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq p { color: var(--slate-600); font-size: 15px; padding: 0 0 20px; }

/* ===========================================================================
   CTA + footer
   =========================================================================== */
.cta {
  text-align: center; color: #fff; border-radius: 28px; padding: 70px 32px; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 360px at 50% -20%, rgba(56,189,248,0.30), transparent 60%),
    linear-gradient(135deg, var(--blue) 0%, #1e3a8a 100%);
  box-shadow: var(--shadow-blue);
}
.cta h2 { font-size: clamp(28px, 4.4vw, 46px); margin-bottom: 16px; }
.cta p { font-size: 19px; color: #dbe7ff; max-width: 560px; margin: 0 auto 30px; }
.cta .hero-cta { justify-content: center; }
.cta .cta-by { margin: 26px auto 0; max-width: 560px; font-size: 13.5px; color: #b9cdf0; letter-spacing: .01em; }
.cta .cta-by strong { color: #fff; font-weight: 600; }

.footer { padding: 54px 0 40px; color: var(--slate-600); }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { color: var(--ink); margin-bottom: 12px; }
.footer .tag { max-width: 320px; font-size: 14px; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.fcol h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-500); margin-bottom: 12px; }
.fcol a { display: block; font-size: 14px; color: var(--slate-700); padding: 5px 0; }
.fcol a:hover { color: var(--blue); }
.footer-bottom { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--card-border); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ===========================================================================
   Reveal on scroll
   =========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 32px; }
  .feature.reverse .feature-copy { order: 0; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pstep .arrow { display: none; }
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .plan-hero-grid { grid-template-columns: 1fr; }
  .plan-hero-side { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-cta .btn-primary { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 14px; border-bottom: 1px solid var(--card-border); box-shadow: var(--shadow-card); }
  .nav-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--card-border); background: #fff; cursor: pointer; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .pipeline, .grid-cards, .arch-grid { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  .arch { padding: 34px 22px; }
  .hero-cta .btn, .cta .btn { flex: 1; }
  .app { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .heat-row { grid-template-columns: 64px repeat(12, 1fr); }
  .heat-row .hl { font-size: 9px; }
  .heat-cell { font-size: 7px; padding: 3px 0; }
  .bt-sub { margin-top: 40px; }
}

/* ============================================================================
   Real app screenshots (captured headless from the sample databases — see
   scripts/capture-screens.mjs). Framed in the existing .window / .frame chrome.
   ============================================================================ */
.shot { display: block; width: 100%; height: auto; }
/* A screenshot framed as a desktop-app window. The image already includes the
   app's own sidebar + header, so the title bar on top reads as the real app. */
.shot-window { border-radius: 14px; overflow: hidden; border: 1px solid var(--card-border); box-shadow: var(--shadow-lg, 0 24px 60px rgba(16,24,39,0.16)); background: #fff; }
.shot-window .window-bar { border-radius: 0; }
/* Tall full-page captures: show the top of the page in a fixed-height window
   (the whole page is reproducible by scrolling in the real app). */
.shot-scroll { max-height: 560px; overflow: hidden; position: relative; }
.shot-scroll.tall { max-height: 640px; }
.shot-scroll::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.92)); pointer-events: none; }
/* Clipped single-panel captures (projection charts): show in full, no fade. */
.shot-panel { border-radius: 12px; overflow: hidden; border: 1px solid var(--card-border); box-shadow: var(--shadow-card); }
.shot-cap { font-size: 12.5px; color: var(--slate-500); text-align: center; margin: 10px auto 0; max-width: 640px; }

/* ============================================================================
   Workflow step-strips (Rebalancing, Screener). A numbered sequence of framed
   captures — native to the existing system: same radii, borders, shadows,
   fonts and color tokens as .feature / .frame / .pstep. Used for the multi-step
   construction workflows the tour tells once.
   ============================================================================ */
/* The strip wrapper: an intro head, the numbered grid, and a closing flist. */
.strip-block { max-width: 1040px; margin: 0 auto; }
.strip-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.strip-head h3 { font-size: clamp(22px, 3vw, 30px); margin: 12px 0 12px; }
.strip-head p { font-size: 16px; color: var(--slate-600); line-height: 1.6; }

/* Three-up numbered steps. min-width:0 keeps the framed captures from overflowing. */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps > * { min-width: 0; }
.step { display: flex; flex-direction: column; gap: 12px; }
/* Header: the pipeline number-badge style, paired with a title + one-line caption. */
.step-h { display: flex; align-items: flex-start; gap: 11px; }
.step-num {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  background: #eff6ff; color: var(--blue); font-weight: 800; font-size: 15px;
  display: grid; place-items: center;
}
.step-h h4 { font-size: 16px; margin-bottom: 3px; letter-spacing: -0.02em; }
.step-cap { color: var(--slate-600); font-size: 13px; line-height: 1.45; }
/* The captures inside a step sit a touch smaller than full feature frames. */
.step .frame { margin-top: auto; }
.step .shot-scroll { max-height: 340px; }
.step .shot-panel { box-shadow: none; border: 0; border-radius: 0; }

/* The strip's closing highlight list reads centered under the three steps. */
.flist.strip-list { max-width: 820px; margin: 30px auto 0; }

@media (max-width: 1040px) {
  .steps { grid-template-columns: 1fr; gap: 26px; max-width: 560px; margin: 0 auto; }
  .step .frame { margin-top: 0; }
}
@media (max-width: 720px) {
  .strip-block { margin-top: 56px !important; }
  .steps { gap: 22px; }
}

/* ============================================================================
   Kalman Software company hub (index.html) — company/product brand lockup,
   centered navy hero, product cards, founder About, contact. Reuses the
   existing tokens, buttons, nav, footer and .reveal system.
   ============================================================================ */

/* Company-over-product brand lockup (used in the Portfolio Manager nav) */
.brand-stack { display: flex; flex-direction: column; line-height: 1.05; }
.brand-stack small { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--slate-500); }

/* Hero — centered, navy, echoes the app sidebar / icon */
.hub-hero {
  position: relative; overflow: hidden; color: #fff; padding: 112px 0 96px;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(45,108,236,0.30), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 58%, #0e2747 100%);
}
.hub-hero h1 { font-size: clamp(32px, 4.7vw, 54px); line-height: 1.06; color: #fff; max-width: 900px; margin: 16px 0 20px; }
.hub-sub { font-size: 19px; color: #b6c4dd; max-width: 660px; margin-bottom: 30px; }
.hub-h2 { font-size: clamp(26px, 3.4vw, 40px); margin-top: 10px; }

/* Products — two cards */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 32px 30px; box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: #c7d3e8; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pc-logo { width: 54px; height: 54px; border-radius: 14px; box-shadow: 0 8px 20px rgba(16,24,39,.16); }
.product-card h3 { font-size: 24px; margin-bottom: 10px; }
.product-card > p { color: var(--slate-600); font-size: 15.5px; line-height: 1.6; margin-bottom: 18px; }
.pc-tags { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.pc-tags li { font-size: 12px; font-weight: 600; color: var(--slate-700); background: var(--line-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.pc-cta { margin-top: auto; font-weight: 700; font-size: 15px; color: var(--blue); }
.product-card:hover .pc-cta { color: var(--blue-strong); }
.product-card.ct { border-color: #f3ddc4; }
.product-card.ct:hover { border-color: #ecc9a3; }
.product-card.ct .pc-cta { color: #c2410c; }
.product-card.ct:hover .pc-cta { color: #9a3412; }

/* Status pills */
.status-pill { font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.status-pill.ok { background: var(--good-bg); color: var(--good-text); border: 1px solid var(--good-border); }
.status-pill.soon { background: #fff4e6; color: #c2410c; border: 1px solid #f7d9b5; }

/* About — centered founder story */
.about-card { max-width: 820px; margin: 0 auto; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 44px 48px; box-shadow: var(--shadow-card); }
.about-body p { font-size: 18px; color: var(--slate-700); line-height: 1.65; margin-top: 16px; }
.about-close { font-weight: 600; color: var(--ink); }

/* Contact — centered */
.contact-card { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-card > p { color: var(--slate-600); font-size: 17px; margin: 8px auto 26px; max-width: 520px; }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: 1fr; }
  .about-card { padding: 34px 26px; }
  .about-body p { font-size: 16.5px; }
}
