/* Windage. Themes are token sets on <html data-theme>; every component reads the tokens. */
:root {
  /* Dusk (default): deep navy night, apricot crosshair */
  --bg: #0f1220;
  --surface: #161a2c;
  --surface-2: #1d2238;
  --surface-3: #262c47;
  --line: #2a3050;
  --ink: #eef0fa;
  --ink-2: #c6cae2;
  --mute: #8b91b1;
  --faint: #5d6385;
  --accent: #ffad80;
  --accent-2: #ff7fa6;
  --accent-ink: #2a1206;
  --profit: #4fdba8;
  --loss: #ff6577;
  --warn: #ffc95c;
  --loss-ink: color-mix(in srgb, var(--loss) 62%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --profit-soft: color-mix(in srgb, var(--profit) 14%, transparent);
  --loss-soft: color-mix(in srgb, var(--loss) 14%, transparent);
  --glow: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%), radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%);
  color-scheme: dark;

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;

  --r-panel: 16px;
  --r-ctl: 10px;
  --side-w: 232px;
  --gutter: clamp(16px, 3vw, 32px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="sakura"] {
  --bg: #161118; --surface: #1f1722; --surface-2: #281e2c; --surface-3: #332637; --line: #3a2c3f;
  --ink: #fbeff6; --ink-2: #e3cbd9; --mute: #a98fa0; --faint: #765f6e;
  --accent: #ff9cc9; --accent-2: #c9a2ff; --accent-ink: #2b0a1b;
  --profit: #6be3b9; --loss: #ff7a5c; --warn: #ffd06b;
}
:root[data-theme="lagoon"] {
  --bg: #0a1619; --surface: #102024; --surface-2: #16292e; --surface-3: #1e353b; --line: #23393f;
  --ink: #e9f7f7; --ink-2: #c0dcdc; --mute: #7fa3a5; --faint: #557476;
  --accent: #5fd9e8; --accent-2: #9be08a; --accent-ink: #032024;
  --profit: #8be38f; --loss: #ff7b72; --warn: #ffcf66;
}
:root[data-theme="lavender"] {
  --bg: #121020; --surface: #1a172c; --surface-2: #221e38; --surface-3: #2c2747; --line: #322c50;
  --ink: #f1eefc; --ink-2: #cdc6ea; --mute: #9189b6; --faint: #625b86;
  --accent: #b9a6ff; --accent-2: #7fd6ff; --accent-ink: #160d33;
  --profit: #5ee0b0; --loss: #ff6f8e; --warn: #ffd36e;
}
:root[data-theme="brass"] {
  --bg: #121419; --surface: #1a1d24; --surface-2: #22262f; --surface-3: #2a2f3a; --line: #2c313c;
  --ink: #e9ebf0; --ink-2: #c3c8d3; --mute: #8d94a5; --faint: #626a7a;
  --accent: #d8a43a; --accent-2: #d8a43a; --accent-ink: #1d1505;
  --profit: #3cc283; --loss: #ee5d55; --warn: #f0a33a;
}
:root[data-theme="daylight"] {
  --bg: #f6f3ef; --surface: #ffffff; --surface-2: #f2eee8; --surface-3: #e7e1d8; --line: #e3ddd3;
  --ink: #1e1b26; --ink-2: #44404f; --mute: #77727f; --faint: #a39ea8;
  --accent: #e0603f; --accent-2: #d94f86; --accent-ink: #ffffff;
  --profit: #0f9a63; --loss: #d73b45; --warn: #c27a0a;
  --loss-ink: var(--loss);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font);
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }
.muted { color: var(--mute); }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 16px; text-align: center; color: var(--mute); }
.boot-mark { margin: 0 auto; }
.boot-mark, .brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font: 700 15px/1 var(--font-num); letter-spacing: 0.02em;
}
.boot .boot-mark { width: 52px; height: 52px; font-size: 21px; border-radius: 14px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--mute); color: var(--ink); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--loss) 40%, transparent); color: var(--loss); }
.btn-danger:hover { background: var(--loss-soft); }
.btn-block { width: 100%; height: 46px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: progress; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctl); background: transparent; border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--mute); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; color: var(--mute); font-weight: 500; }
.field small { font-size: 12px; color: var(--mute); }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-ctl);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  font: 400 15px/1.4 var(--font); font-feature-settings: 'tnum' 1;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
:root:not([data-theme=daylight]) input[type=date]::-webkit-calendar-picker-indicator, :root:not([data-theme=daylight]) input[type=time]::-webkit-calendar-picker-indicator { filter: invert(0.7); }
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23888ea8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 18px; }
input[readonly] { color: var(--accent); background: var(--accent-soft); border-color: transparent; font-weight: 600; }
.form-error { color: var(--loss); font-size: 14px; }
.form-note { color: var(--profit); font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

/* Segmented + chips */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 3px; gap: 3px; width: 100%; }
.seg button { flex: 1; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--mute); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--surface-3); color: var(--ink); }
.seg button[aria-pressed=true][data-v=Long] { background: var(--profit-soft); color: var(--profit); }
.seg button[aria-pressed=true][data-v=Short] { background: var(--loss-soft); color: var(--loss); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.chip:hover { border-color: var(--mute); }
.chip[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.warn[aria-pressed=true] { background: var(--loss-soft); border-color: var(--loss); color: var(--loss); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-intro { padding: clamp(32px, 7vw, 96px); display: flex; flex-direction: column; justify-content: center; gap: 24px; border-right: 1px solid var(--line); background: radial-gradient(ellipse at 0% 100%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%); }
.auth-intro h1 { font: 600 clamp(32px, 4.4vw, 52px)/1.08 var(--font-num); max-width: 14ch; letter-spacing: -0.02em; }
.auth-intro > p { color: var(--ink-2); max-width: 46ch; font-size: 17px; }
.auth-intro blockquote { margin: 16px 0 0; padding-left: 16px; border-left: 2px solid var(--accent); color: var(--mute); font-style: italic; max-width: 46ch; }
.auth-intro cite { display: block; margin-top: 8px; font-style: normal; font-size: 14px; color: var(--ink-2); }
.auth-card { align-self: center; justify-self: center; width: min(400px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 16px; padding: 32px 0; }
.auth-card h2 { font-size: 24px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.demo-link { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; text-decoration: none; }
.demo-link:hover { color: var(--accent); }
.brand-lockup { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 28px; }
.sidebar .brand-lockup { padding: 0 8px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: var(--r-ctl); color: var(--mute); text-decoration: none; font-weight: 500; }
.side-nav a:hover { color: var(--ink); background: var(--surface); }
.side-nav a[aria-current=page] { color: var(--ink); background: var(--surface-2); }
.side-nav a[aria-current=page] svg { color: var(--accent); }
.side-foot { margin-top: auto; padding: 0 8px; }
.side-quote { font-size: 13px; color: var(--mute); font-style: italic; line-height: 1.45; }
.side-handle { display: inline-block; margin-top: 8px; font-size: 13px; text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 { font-size: 20px; white-space: nowrap; }
.account-picker select { height: 40px; min-width: 180px; max-width: 240px; font-weight: 600; background-color: var(--surface); }
.demo-banner { padding: 10px var(--gutter); background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.view { padding: 24px var(--gutter) 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1360px; width: 100%; outline: none; }
.mobile-only { display: none !important; }
.bottom-nav { display: none; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 16px; }
.panel-head .sub { font-size: 13px; color: var(--mute); }
.panel-head a, .panel-head .link { font-size: 14px; text-decoration: none; }
.row-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.row-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.empty { padding: 40px 20px; text-align: center; color: var(--mute); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h3 { color: var(--ink); font-size: 18px; }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-ctl); background: var(--loss-soft); color: var(--loss-ink); border: 1px solid color-mix(in srgb, var(--loss) 30%, transparent); font-weight: 500; }
.alert.calm { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ---------- Account ladder (signature element) ---------- */
.ladder { padding: 24px 24px 20px; position: relative; overflow: hidden; }
.ladder-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ladder-name { font-size: 14px; color: var(--mute); }
.ladder-name strong { color: var(--ink-2); font-weight: 600; }
.ladder-balance { font: 600 clamp(40px, 6vw, 64px)/1 var(--font-num); letter-spacing: -0.02em; margin-top: 6px; }
.ladder-delta { font: 600 18px/1 var(--font-num); margin-left: 10px; vertical-align: 0.6em; }
.ladder-facts { display: flex; gap: 28px; flex-wrap: wrap; }
.ladder-facts div { display: flex; flex-direction: column; gap: 2px; }
.ladder-facts span { font-size: 13px; color: var(--mute); }
.ladder-facts strong { font: 600 22px/1.1 var(--font-num); }
.ladder-track { position: relative; height: 72px; margin: 28px 8px 0; }
.ladder-rail { position: absolute; left: 0; right: 0; top: 30px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--loss) 0%, color-mix(in srgb, var(--loss) 35%, transparent) var(--danger, 12%), var(--surface-3) calc(var(--danger, 12%) + 6%), var(--surface-3) 80%, color-mix(in srgb, var(--accent) 50%, transparent) 100%); }
.ladder-fill { position: absolute; top: 30px; height: 8px; border-radius: 4px; background: var(--profit); opacity: 0.85; }
.ladder-fill.neg { background: var(--loss); }
.ladder-tick { position: absolute; top: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.ladder-tick::before { content: ''; width: 2px; height: 24px; background: var(--mute); border-radius: 1px; }
.ladder-tick span { margin-top: 6px; font-size: 12px; color: var(--mute); white-space: nowrap; }
.ladder-tick b { font: 600 13px/1.2 var(--font-num); color: var(--ink-2); white-space: nowrap; }
.ladder-tick.liq::before { background: var(--loss); }
.ladder-tick.liq b { color: var(--loss); }
.ladder-tick.tgt::before { background: var(--accent); }
.ladder-tick.tgt b { color: var(--accent); }
.ladder-tick.edge-l { transform: none; align-items: flex-start; }
.ladder-tick.edge-r { transform: translateX(-100%); align-items: flex-end; }
.ladder-now { position: absolute; top: 18px; width: 18px; height: 32px; transform: translateX(-50%); border-radius: 6px; background: var(--ink); box-shadow: 0 0 0 4px var(--bg); }
.ladder-status { position: absolute; right: 24px; top: 24px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ladder-status.passed { background: var(--accent); color: var(--accent-ink); }
.ladder-status.blown { background: var(--loss); color: #fff; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.kpi { background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 13px; color: var(--mute); }
.kpi strong { font: 600 26px/1.1 var(--font-num); }
.kpi small { font-size: 12px; color: var(--mute); }

/* Chart */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { font-size: 16px; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav .icon-btn { width: 32px; height: 32px; }
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.05fr); gap: 4px; }
.cal-dow { font-size: 12px; color: var(--mute); padding: 0 6px 4px; }
.cal-cell { min-height: 56px; border-radius: 8px; background: var(--surface-2); padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid transparent; text-align: left; cursor: default; }
.cal-cell .d { font-size: 12px; color: var(--mute); }
.cal-cell .v { font: 600 13px/1.1 var(--font-num); }
.cal-cell .c { font-size: 11px; color: var(--mute); }
.cal-cell.out { background: transparent; }
.cal-cell.has { cursor: pointer; }
.cal-cell.has:hover { border-color: var(--mute); }
.cal-cell.win { background: var(--profit-soft); }
.cal-cell.win .v { color: var(--profit); }
.cal-cell.loss { background: var(--loss-soft); }
.cal-cell.loss .v { color: var(--loss); }
.cal-cell.today { border-color: var(--accent); }
.cal-week { background: transparent; border: 1px dashed var(--line); }
.cal-week .d { color: var(--ink-2); }

/* ---------- Trade list ---------- */
.trade-list { display: flex; flex-direction: column; }
.trade-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 12px 8px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%;
}
.trade-row:first-child { border-top: 0; }
.trade-row:hover { background: var(--surface-2); }
.trade-row .when { font-size: 13px; color: var(--mute); line-height: 1.3; }
.trade-row .when b { display: block; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.trade-row .what { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.trade-row .what .sess { font-weight: 500; }
.trade-row .r { font: 500 14px/1 var(--font-num); color: var(--mute); text-align: right; min-width: 56px; }
.trade-row .pnl { font: 600 17px/1 var(--font-num); text-align: right; min-width: 84px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.tag.long { background: var(--profit-soft); color: var(--profit); }
.tag.short { background: var(--loss-soft); color: var(--loss); }
.tag.grade { background: var(--accent-soft); color: var(--accent); }
.tag.mistake { background: transparent; border: 1px solid color-mix(in srgb, var(--loss) 40%, transparent); color: var(--loss-ink); font-weight: 500; }
.tag.img { background: transparent; color: var(--mute); padding: 0 2px; }
.tag.img svg { width: 16px; height: 16px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { flex: 1 1 140px; }
.filters .field.grow { flex: 3 1 220px; }
.filter-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--mute); font-size: 14px; }
.filter-summary strong { color: var(--ink); font-family: var(--font-num); font-size: 16px; }

/* ---------- Coach ---------- */
.coach-hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; }
.coach-hero h2 { font: 600 clamp(20px, 2.4vw, 26px)/1.3 var(--font); max-width: 46ch; }
.coach-hero p { color: var(--mute); margin-top: 8px; font-size: 14px; }
.score { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.score-ring { --v: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring, var(--accent)) calc(var(--v) * 1%), var(--surface-3) 0); position: relative; }
.score-ring::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.score-ring b { position: relative; z-index: 1; font: 700 40px/1 var(--font-num); }
.score span { font-size: 13px; color: var(--mute); }
.score-parts { display: flex; flex-direction: column; gap: 10px; }
.score-part { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; }
.score-part .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.score-part .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.score-part b { font-family: var(--font-num); text-align: right; }

.insights { display: flex; flex-direction: column; gap: 12px; }
.insight { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 16px; padding: 16px 16px 16px 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.insight::before { content: ''; background: var(--loss); }
.insight.edge::before { background: var(--profit); }
.insight.warn::before, .insight.info::before { background: var(--warn); }
.insight h3 { font-size: 16px; line-height: 1.35; }
.insight p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.insight .do { margin-top: 10px; font-size: 14px; color: var(--ink); }
.insight .do b { color: var(--accent); font-weight: 600; }
.insight .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.insight .impact { font: 600 18px/1 var(--font-num); }
.badge { font-size: 12px; color: var(--mute); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.badge.solid { color: var(--ink-2); border-color: var(--mute); }

.whatif { width: 100%; border-collapse: collapse; font-size: 14px; }
.whatif th { text-align: left; font-weight: 500; color: var(--mute); padding: 0 8px 10px 0; font-size: 13px; }
.whatif td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.whatif td.n { font-family: var(--font-num); text-align: right; white-space: nowrap; }
.whatif th.n { text-align: right; }
.whatif .bar-cell { width: 28%; }
.mini-bar { height: 8px; border-radius: 4px; background: var(--profit); min-width: 2px; }
.mini-bar.neg { background: var(--loss); }

.dim-picker { margin-bottom: 16px; }
.bucket-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bucket-table th { text-align: right; font-weight: 500; color: var(--mute); font-size: 13px; padding: 0 0 8px 12px; }
.bucket-table th:first-child { text-align: left; padding-left: 0; }
.bucket-table td { padding: 9px 0 9px 12px; border-top: 1px solid var(--line); text-align: right; font-family: var(--font-num); white-space: nowrap; }
.bucket-table td:first-child { text-align: left; padding-left: 0; font-family: var(--font); white-space: normal; }
.bucket-table tr.low td { color: var(--mute); }

.week-compare { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.week-compare div span { display: block; font-size: 13px; color: var(--mute); }
.week-compare div strong { font: 600 22px/1.2 var(--font-num); }
.week-compare div small { font-size: 13px; color: var(--mute); }
.week-notes { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }

/* ---------- Prep ---------- */
.prep-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.prep-form { display: flex; flex-direction: column; gap: 14px; }
.bias-seg button[aria-pressed=true][data-v=Bullish] { background: var(--profit-soft); color: var(--profit); }
.bias-seg button[aria-pressed=true][data-v=Bearish] { background: var(--loss-soft); color: var(--loss); }
.prep-day { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; cursor: pointer; }
.prep-day:first-child { border-top: 0; }
.prep-day .dt { font-weight: 500; }
.prep-day .sm { font-size: 13px; color: var(--mute); grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Accounts & settings ---------- */
.acct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.acct-card { display: flex; flex-direction: column; gap: 14px; }
.acct-card.active { border-color: var(--accent); }
.acct-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.acct-card header h3 { font-size: 17px; }
.acct-card header p { font-size: 13px; color: var(--mute); }
.acct-meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.acct-meter i { display: block; height: 100%; background: var(--profit); }
.acct-meter.buf i { background: var(--loss); }
.acct-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; color: var(--mute); }
.acct-figs b { display: block; font: 600 16px/1.2 var(--font-num); color: var(--ink); }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; }
.settings-sec + .settings-sec { margin-top: 0; }
.help { font-size: 14px; color: var(--mute); max-width: 62ch; }

/* ---------- Sheet (trade editor & details) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(5, 6, 8, 0.6); z-index: 40; }
.sheet {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(620px, 100%);
  background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  animation: slide-in .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide-in { from { transform: translateX(32px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 22px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.sheet-foot .btn { flex: 1; }
.fs { display: flex; flex-direction: column; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.fs > legend, .fs-title { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 2px; display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.fs-title .grade-pill { font: 700 16px/1 var(--font-num); color: var(--accent); }
.calc-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--mute); }
.calc-line b { color: var(--ink); font-family: var(--font-num); }
.checks { display: flex; flex-direction: column; gap: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.check:hover { background: var(--surface); }
.check input { width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check:has(input:checked) { color: var(--ink); }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--mute); font-size: 14px; cursor: pointer; }
.drop:focus, .drop.over { border-color: var(--accent); color: var(--accent); outline: none; background: var(--accent-soft); }
.drop img { max-width: 100%; max-height: 220px; border-radius: 6px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-grid div { background: var(--surface); padding: 10px 12px; font-size: 13px; color: var(--mute); }
.detail-grid b { display: block; color: var(--ink); font: 600 15px/1.3 var(--font-num); margin-top: 2px; }
.detail-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.detail-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.detail-hero .big { font: 600 40px/1 var(--font-num); }
.note-box { background: var(--surface); border-radius: 10px; padding: 14px; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }

/* Toast */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: calc(100% - 32px); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row-2, .prep-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-grid !important; }
  .brand-mark.mobile-only { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }
  .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar h1 { font-size: 18px; }
  .account-picker select { min-width: 0; max-width: 150px; height: 38px; font-size: 14px; }
  .view { padding: 16px 16px calc(96px + var(--safe-b)); gap: 16px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 8px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--mute); text-decoration: none; font-size: 11px; font-weight: 500; }
  .bottom-nav a[aria-current=page] { color: var(--accent); }
  .bottom-log { justify-self: center; width: 52px; height: 52px; border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; margin-top: -18px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
  .bottom-log svg { width: 26px; height: 26px; }
  .row-even { grid-template-columns: minmax(0, 1fr); }
  .coach-hero { grid-template-columns: minmax(0, 1fr); }
  .score { flex-direction: row; justify-content: flex-start; }
  .score-ring { width: 96px; height: 96px; }
  .score-ring b { font-size: 30px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-intro { border-right: 0; border-bottom: 1px solid var(--line); padding: 40px 20px 32px; }
  .auth-intro h1 { font-size: 32px; }
  .auth-intro blockquote { display: none; }
  .sheet { width: 100%; border-left: 0; animation-name: slide-up; }
  @keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
  .sheet-head { padding-top: max(16px, env(safe-area-inset-top)); }
  .toast { bottom: calc(92px + var(--safe-b)); }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi strong { font-size: 22px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 16px; }
  .ladder { padding: 18px 16px 16px; }
  .ladder-facts { gap: 18px; }
  .ladder-facts strong { font-size: 18px; }
  .ladder-status { right: 16px; top: 18px; }
  .trade-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; padding: 12px 4px; }
  .trade-row .r { display: none; }
  .trade-row .pnl { font-size: 16px; min-width: 0; }
  .cal { gap: 3px; }
  .cal-cell { min-height: 48px; padding: 4px 5px; }
  .cal-cell .v { font-size: 11px; }
  .cal-cell .c { display: none; }
  .insight { grid-template-columns: 4px minmax(0, 1fr); }
  .insight .meta { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
  .week-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .whatif .bar-cell { display: none; }
  .account-picker select { max-width: 132px; }
  #copyLastBtn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Fixes after visual review */
a.cal-cell { text-decoration: none; color: inherit; }
.row-2, .row-even { align-items: start; }
.trade-row .what .sess { white-space: nowrap; }
.trade-list.compact .trade-row { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; }
.trade-list.compact .r { display: none; }
.week-compare div strong, .week-compare div small { display: block; }
@media (max-width: 640px) {
  .ladder-status { position: static; display: inline-block; margin-bottom: 10px; }
  .cal-week .d { display: none; }
  .cal-week { justify-content: flex-end; }
}

/* ---------- Windage v3 ---------- */
body { background: var(--glow), var(--bg); background-attachment: fixed; }
.sidebar { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.brand-mark, .boot-mark { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.brand-mark .mark, .boot-mark .mark { width: 62%; height: 62%; }
.brand-lockup > span:last-child { letter-spacing: 0.01em; }
.btn-primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2))); }
.btn-primary:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent)); }
.bottom-log { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; }
.ladder { background-image: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 60%); }
.auth-intro { background: var(--glow); }
.tag.model { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); }
:root[data-theme=daylight] .tag.model, :root[data-theme=brass] .tag.model { color: var(--ink-2); }

/* Mobile sub-tabs for Coach / Playbook */
.subtabs { gap: 6px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; align-self: flex-start; }
.subtabs a { padding: 6px 16px; border-radius: 999px; text-decoration: none; color: var(--mute); font-weight: 600; font-size: 14px; }
.subtabs a[aria-current=page] { background: var(--surface-3); color: var(--ink); }
@media (max-width: 960px) { .subtabs.mobile-only { display: flex !important; } .bottom-nav { grid-template-columns: repeat(5, 1fr); } }

/* Playbook */
.play-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.play-hero h2 { font: 600 clamp(19px, 2.2vw, 24px)/1.3 var(--font); max-width: 52ch; text-wrap: balance; }
.play-hero p { color: var(--mute); margin-top: 6px; font-size: 14px; max-width: 70ch; }
.play-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.play-card { display: flex; flex-direction: column; gap: 14px; }
.play-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.play-card h3 { font-size: 17px; }
.play-net { font: 600 34px/1 var(--font-num); letter-spacing: -0.01em; }
.play-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.play-figs div { background: var(--surface); padding: 9px 12px; font-size: 12px; color: var(--mute); }
.play-figs b { display: block; font: 600 17px/1.3 var(--font-num); color: var(--ink); }
.play-strip { display: flex; gap: 4px; flex-wrap: wrap; min-height: 10px; }
.play-strip i { width: 14px; height: 10px; border-radius: 3px; background: var(--surface-3); }
.play-strip i.w { background: var(--profit); }
.play-strip i.l { background: var(--loss); }
.play-note { font-size: 13px; color: var(--mute); line-height: 1.6; }
.play-note b { color: var(--ink-2); font-weight: 600; }
.play-link { font-size: 14px; font-weight: 600; text-decoration: none; margin-top: auto; }
.play-untagged { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-style: dashed; }
.play-untagged h3 { font-size: 16px; }

/* Daily review */
.rating { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rating button { background: none; border: 0; padding: 2px 3px; font-size: 30px; line-height: 1; color: var(--surface-3); cursor: pointer; transition: transform .1s, color .1s; }
.rating button.on { color: var(--accent); }
.rating button:hover { transform: scale(1.12); }
.rating-word { margin-left: 10px; font-size: 14px; color: var(--mute); }
.stars { color: var(--accent); letter-spacing: 1px; font-size: 14px; }
.stars.sm { font-size: 12px; }
.rate-rows { display: flex; flex-direction: column; }
.rate-rows div { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rate-rows div:first-child { border-top: 0; }
.rate-rows b { font-weight: 600; }

/* Theme picker */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.theme-opt:hover { border-color: var(--mute); }
.theme-opt[aria-checked=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--ink); }
.theme-sw { position: relative; height: 54px; border-radius: 8px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.theme-sw i { position: absolute; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; }
.theme-sw i:first-child { left: 12px; }
.theme-sw i:last-child { left: 32px; mix-blend-mode: normal; opacity: 0.92; }

/* Share card + import */
.share-canvas { width: 100%; max-width: 420px; aspect-ratio: 1080 / 1350; height: auto; align-self: center; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.table-scroll { overflow-x: auto; margin-top: 10px; }
.imp-table th, .imp-table td, .imp-table td:first-child { white-space: nowrap; }
.imp-map summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
label.drop input[type=file] { display: none; }

/* Repeat mistakes + reflection reader */
.tag.mistake.noted { border-style: dashed; }
.watch { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.watch b { color: var(--warn); font-weight: 600; }
.note-hints:empty { display: none; }
.note-hints { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--mute); }
.hint-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hint-row .link { font-size: 13px; font-weight: 600; }
.hint-row .link.muted { color: var(--mute); }
.noted { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.noted-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.noted-row p { font-size: 13px; color: var(--mute); margin-top: 6px; }
.noted-row q { color: var(--ink-2); }
.noted-act { display: flex; gap: 8px; }
.repeat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.repeat { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.repeat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.repeat-top h3 { font-size: 16px; color: var(--ink); }
.repeat-cost { font: 600 26px/1 var(--font-num); }
.repeat b { color: var(--ink); font-weight: 600; }
.repeat .do b { color: var(--accent); }
.trend { font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; }
.trend.worse { color: var(--loss); }
.trend.better { color: var(--profit); }
.echo { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.echo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; gap: 12px; align-items: center; padding: 8px 0; font-size: 14px; }
.echo-row q { color: var(--ink); }
.echo-row b { text-align: right; font-weight: 600; }
.noted-row > div:first-child { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1 1 220px; }

/* Plans */
.plan-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.plan-chip.ended { border-color: color-mix(in srgb, var(--loss) 50%, transparent); background: var(--loss-soft); color: var(--loss); }
.plan-now { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.plan-state { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.plan-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.plan-card.best { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-top h3 { font-size: 16px; }
.plan-price b { font: 700 34px/1 var(--font-num); }
.plan-price span { color: var(--mute); font-size: 14px; }
.plan-card .btn-block { margin-top: auto; }
.plan-feats { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.plan-feats li::before { content: '✓'; color: var(--profit); font-weight: 700; margin-right: 8px; }
.activate { padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.activate-row { display: flex; gap: 8px; }
.activate-row input { flex: 1; min-width: 0; font-family: var(--font-num); letter-spacing: 0.03em; }
.paywall { max-width: 640px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.paywall-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.paywall-head .brand-mark { width: 56px; height: 56px; border-radius: 16px; }
.paywall-head h2 { font-size: 24px; }
.paywall-head p { color: var(--mute); max-width: 44ch; }
@media (max-width: 560px) { .plan-cards { grid-template-columns: minmax(0, 1fr); } .plan-chip { padding: 0 10px; font-size: 12px; } }

.trial-note { font-size: 13px; color: var(--mute); text-align: center; }
.install-box { display: flex; flex-direction: column; gap: 8px; }
.brand-mark { flex: none; }
.topbar-left { flex: 1 1 auto; } .topbar-left h1 { overflow: hidden; text-overflow: ellipsis; }
.topbar-right { flex: none; }
@media (max-width: 400px) { .plan-chip { height: 30px; padding: 0 8px; } }

/* ---------- Homepage (signed out) ---------- */
.landing { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.lp-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: max(18px, env(safe-area-inset-top, 0px)) 0 18px; }
.lp-links { display: flex; align-items: center; gap: 10px; }
.lp-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; padding: 0 8px; }
.lp-links a:hover { color: var(--ink); }
.lp-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(24px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.lp-eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.lp-hero h1 { font: 700 clamp(38px, 5.6vw, 66px)/1.02 var(--font-num); letter-spacing: -0.025em; max-width: 12ch; text-wrap: balance; }
.lp-lead { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; max-width: 52ch; margin-top: 20px; }
.lp-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.lp-big { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.lp-small { color: var(--mute); font-size: 14px; margin-top: 14px; }
.lp-card { justify-self: stretch; width: 100%; max-width: 420px; margin-left: auto; padding: 26px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); scroll-margin: 24px; }
.lp-shot { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.lp-shot img, .lp-row img { display: block; width: 100%; height: auto; }
.lp-section { padding: clamp(48px, 8vw, 96px) 0 0; }
.lp-section h2 { font: 700 clamp(26px, 3.4vw, 38px)/1.12 var(--font-num); letter-spacing: -0.02em; text-wrap: balance; }
.lp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 64px); align-items: center; margin-bottom: clamp(40px, 7vw, 80px); }
.lp-row.flip .lp-text { order: 2; }
.lp-row img { border-radius: 14px; border: 1px solid var(--line); }
.lp-text p:last-child { color: var(--ink-2); font-size: 16px; line-height: 1.6; margin-top: 14px; max-width: 46ch; }
.lp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-grid div { padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lp-grid h3 { font-size: 16px; margin-bottom: 6px; }
.lp-grid p { color: var(--mute); font-size: 14px; line-height: 1.55; }
.lp-center { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.lp-center p:last-child { color: var(--ink-2); margin-top: 10px; }
.lp-plans { max-width: 720px; margin: 0 auto; }
.lp-faq details { max-width: 720px; margin: 0 auto; border-top: 1px solid var(--line); padding: 16px 4px; }
.lp-faq details:last-of-type { border-bottom: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq details p { color: var(--ink-2); margin-top: 10px; line-height: 1.6; }
.lp-final { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.lp-final blockquote { margin: 0; font: 600 clamp(22px, 3vw, 32px)/1.25 var(--font-num); max-width: 22ch; }
.lp-final cite { display: block; margin-top: 10px; font: 400 14px var(--font); color: var(--mute); font-style: normal; }
.lp-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
.lp-foot a { color: var(--mute); }
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: minmax(0, 1fr); }
  .lp-card { max-width: none; margin: 0; }
  .lp-row, .lp-row.flip { grid-template-columns: minmax(0, 1fr); }
  .lp-row.flip .lp-text { order: 0; }
  .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lp-hide-sm { display: none; }
  .lp-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-ctas .btn { flex: 1 1 100%; }
}
