/* ============================================================================
   StrikeViews website — shared stylesheet (single source of truth).
   ----------------------------------------------------------------------------
   This is the central home for ALL site CSS. Sections 1–4 are the design
   system (tokens + components) used by index / decide / signin / app.
   Section 5 preserves the original secure-surface styles still used by
   admin.html and user.html — do not remove those classes while those pages
   reference them.

   Fonts are self-hosted (assets/fonts/*.woff2) so the CSP stays 'self'-only.
   ========================================================================== */

/* ============================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Palette — unchanged from the original site */
  --bg: #070b10;
  --bg-soft: #0e151d;
  --surface: #131c26;
  --surface-2: #18232f;
  --surface-hover: #1c2833;
  --border: #243140;
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #e6edf3;
  --muted: #95a3b3;
  --brand: #1faa59;
  --brand-2: #2bd07e;
  --accent: #4ea8ff;
  --danger: #ff5d5d;
  --radius: 14px;

  /* Semantic */
  --bull: var(--brand-2);
  --bear: var(--danger);
  --neutral: var(--muted);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 1000px;       /* legacy default (used by admin/user footer etc.) */
  --maxw-wide: 1320px;  /* feed 3-column */
  --header-h: 60px;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;           /* variable font file covers the range */
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* ============================================================================
   2. BASE
   ========================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-feature-settings: normal; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
button { font-family: inherit; }

/* ---- background particle canvas (decide / signin / app / 404 only) ----
   Fixed full-viewport constellation animation behind all content. Only pages
   that include <canvas id="bg-canvas"> + /js/bg-particles.js get it; the
   feed homepage (index.html) does NOT. pointer-events:none so clicks pass
   through; mouse tracking is wired to window in bg-particles.js. */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}
/* Raise the header (z-index 40, sticky) and all in-flow content above the
   fixed canvas so text/links stay fully interactive and readable. */
.site-header, main, section, .center { position: relative; z-index: 1; }

/* ============================================================================
   3. SHARED COMPONENTS
   ========================================================================== */

/* ---- header / nav (injected by common.js SV.chrome) ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 16, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
}
.site-header .nav {
  max-width: var(--maxw-wide);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  height: 100%;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); font-size: 15px; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 3px rgba(43, 208, 126, 0.12);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--surface); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-mid { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.nav-search { width: min(250px, 100%); margin-left: 8px; }
.nav-search-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; color: var(--text);
}
.nav-search-input::placeholder { color: var(--muted); }
.nav-search-input:focus { outline: none; border-color: var(--brand-2); }

/* language switcher (dropdown) */
.lang-switch { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 12.5px; font-weight: 600;
  padding: 6px 10px; cursor: pointer;
}
.lang-current:hover { border-color: var(--border-strong); }
.lang-code { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 4px; min-width: 140px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  display: none;
}
.lang-switch.open .lang-menu { display: block; }
.lang-opt {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--muted);
  font-size: 12.5px; font-weight: 500; padding: 7px 10px; border-radius: 7px; cursor: pointer;
}
.lang-opt:hover { background: var(--surface-hover); color: var(--text); }
.lang-opt.active { background: var(--surface); color: var(--text); font-weight: 600; }

/* signed-in identity chip in header */
.who-chip { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 5px 3px 3px; }
.who-name { font-size: 12.5px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout-btn { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 0 4px; line-height: 1; }
.signout-btn:hover { color: var(--danger); }

/* ---- session countdown (time remaining until auto sign-out) ----
   A slim progress bar pinned to the top edge of the sticky header shows how
   much idle-budget remains before the user is signed out. It resets to full
   on every interaction and turns amber then red as time runs low. A compact
   mm:ss clock chip sits in the header nav until the session ends. */
.session-timer {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.session-timer-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.5s linear;
}
.session-timer.warn .session-timer-fill { background: #f5bf42; }
.session-timer.low .session-timer-fill { background: var(--danger); }
.session-count {
  display: inline-block;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 8px; line-height: 1; white-space: nowrap;
}
.session-count.warn { color: #f5bf42; border-color: rgba(245, 191, 66, 0.35); }
.session-count.low { color: var(--danger); border-color: rgba(255, 93, 93, 0.4); }
.session-timer[hidden], .session-count[hidden] { display: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 9px;
  font-weight: 600; font-size: 13.5px;
  background: var(--brand); color: #04130a; border: none; cursor: pointer;
  transition: background 0.12s ease;
}
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.lg { padding: 14px 26px; font-size: 15px; }
.btn.danger { background: var(--danger); color: #1a0606; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- chips (filter pills) ---- */
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: all 0.12s ease;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--surface-2); border-color: var(--brand-2); color: var(--text); }
.chip.active.bull { border-color: var(--bull); color: var(--bull); }
.chip.active.bear { border-color: var(--bear); color: var(--bear); }

/* ---- verified switch ---- */
.verified-toggle { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.switch { width: 30px; height: 17px; border-radius: 999px; background: var(--border); position: relative; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--text); transition: left 0.15s; }
.verified-toggle.on .switch { background: var(--brand); }
.verified-toggle.on .switch::after { left: 15px; background: #04130a; }

/* ---- auth popover / cards ---- */
.auth-pop {
  position: absolute; top: calc(100% + 10px); right: 0; width: 300px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  display: none; z-index: 50;
}
.auth-pop.open { display: block; }
.auth-pop h4 { margin: 0 0 4px; font-size: 14px; }
.auth-pop p { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-size: 13px; font-family: var(--font);
}
.field input:focus { outline: none; border-color: var(--brand); }
.auth-switch {
  width: 100%; text-align: center; background: none; border: none; color: var(--accent);
  font-size: 12px; margin-top: 8px; cursor: pointer; padding: 4px;
}
.auth-switch:hover { text-decoration: underline; }

/* ---- generic card / notice ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.notice {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--brand);
  padding: 14px 18px; border-radius: 10px; color: var(--muted); font-size: 14px; margin: 20px 0;
}

/* ---- feed 3-column layout ---- */
.app-feed {
  max-width: var(--maxw-wide); margin: 0 auto; padding: 20px 20px 60px;
  display: grid; grid-template-columns: 260px minmax(0, 1fr) 296px; gap: 20px; align-items: start;
}
.rail { position: sticky; top: calc(var(--header-h) + 20px); }
.rail-section { margin-bottom: 22px; }
.rail-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px; padding: 0 4px;
}
.feed-col { min-width: 0; }

/* banner for sample/draft content (not-real-post convention) */
.sample-banner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 190, 92, 0.1); border: 1px solid rgba(255, 190, 92, 0.3);
  border-radius: 10px; padding: 9px 13px; margin-bottom: 14px;
}
.sample-banner span { font-size: 12px; font-weight: 600; color: #ffd28a; letter-spacing: 0.1px; }

/* empty-state on-ramp (founder-journal / feed-unavailable) */
.feed-empty-state {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
}
.feed-empty-title {
  font-size: 15px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 6px;
}
.feed-empty-note { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.feed-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* founder-journal cards are read-only seed content: no action row, softer edge */
article.post.founder-post { border-left: 3px solid rgba(255, 190, 92, 0.45); }
article.post.founder-post .post-name::after {
  content: "· founder"; font-size: 11px; font-weight: 600; color: #ffd28a; margin-left: 6px;
}

/* cold-start value prop (anonymous visitors only; hidden on signed-in) */
.value-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(160deg, rgba(31, 170, 89, 0.12), rgba(78, 168, 255, 0.06));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px;
}
.value-banner[hidden] { display: none; }
.value-banner-main { min-width: 0; }
.value-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--brand-2);
}
.value-title { margin: 6px 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.value-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.value-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 720px) {
  .value-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* compose bar */
.compose-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; cursor: text;
}
.compose-bar.expanded { cursor: default; }
.compose-row { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.compose-placeholder {
  flex: 1; color: var(--muted); font-size: 13.5px; background: none; border: none; outline: none;
}
.compose-expand { display: none; margin-top: 12px; }
.compose-bar.expanded .compose-expand { display: block; }
.compose-textarea {
  width: 100%; min-height: 64px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px; color: var(--text); font-size: 13.5px; font-family: var(--font);
  resize: vertical; margin-bottom: 10px;
}
.compose-textarea:focus { outline: none; border-color: var(--brand); }
.compose-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pill-select {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted);
  font-size: 12px; padding: 6px 10px; border-radius: 999px; font-family: var(--font);
}
.compose-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.filter-sep { width: 1px; height: 20px; background: var(--border); flex: none; }

/* post card */
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; margin-bottom: 12px;
}
.post.reply-of { border-left: 2px solid var(--border-strong); }
.reply-label { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.post-head { display: flex; align-items: flex-start; gap: 11px; }
.post-head .avatar { width: 36px; height: 36px; font-size: 13px; }
.post-id { flex: 1; min-width: 0; }
.post-name-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.post-name { font-weight: 700; font-size: 13.5px; }
.verified-badge { color: var(--accent); flex: none; }
.post-sub { font-size: 12px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 6px; }
.ticker-chip {
  font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-family: var(--mono);
}
.ticker-chip.bull { background: rgba(43, 208, 126, 0.14); color: var(--bull); }
.ticker-chip.bear { background: rgba(255, 93, 93, 0.14); color: var(--bear); }
.ticker-chip.neutral { background: rgba(149, 163, 179, 0.14); color: var(--neutral); }
.kind-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; flex: none; margin-left: auto;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
}
.kind-chip.result { color: var(--brand-2); border-color: rgba(43, 208, 126, 0.3); }
.kind-chip.trade { color: var(--accent); border-color: rgba(78, 168, 255, 0.3); }
.post-body { margin: 10px 0 0; padding-left: 47px; }
.post-title { font-weight: 700; font-size: 14.5px; margin: 0 0 3px; }
.post-text { font-size: 13.5px; color: #c7d1db; margin: 0; line-height: 1.5; }

/* attachment grid */
.attach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.attach-grid.single { grid-template-columns: 1fr; }
.attach-tile {
  aspect-ratio: 16 / 10; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: 11px;
}
.attach-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.attach-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); }

/* stat strip (strategy / DTE / Δ / POP) */
.stat-strip {
  margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px;
  overflow: hidden; width: fit-content;
}
.stat { padding: 7px 12px; font-size: 11.5px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 1px; }
.stat:last-child { border-right: none; }
.stat .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.stat .v { font-family: var(--mono); font-weight: 600; font-size: 12.5px; }
.stat .v.pos { color: var(--bull); }
.stat .v.neg { color: var(--bear); }

.post-actions { display: flex; align-items: center; gap: 18px; margin-top: 12px; padding-left: 47px; }
.post-action { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; cursor: pointer; background: none; border: none; }
.post-action:hover { color: var(--text); }
.post-action.liked { color: var(--bear); }
.post-action .n { font-family: var(--mono); }

.load-sentinel { text-align: center; padding: 20px 0; color: var(--muted); font-size: 12.5px; }

/* ---- single-twit thread view (post.html) ---- */
.app-post {
  max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 60px;
}
.back-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 12.5px; text-decoration: none; margin-bottom: 16px;
}
.back-link:hover { color: var(--text); }
.thread-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--muted); margin: 22px 0 12px; padding: 0 4px;
}
.thread-replies { margin: 8px 0 0 40px; padding-left: 18px; border-left: 2px solid var(--border); }
.thread-reply { margin-bottom: 8px; }
.thread-reply .post { margin-bottom: 8px; }
.thread-replies .reply-composer { margin-left: 0; }
.load-sentinel .spin {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border);
  border-top-color: var(--brand-2); display: inline-block; margin-right: 8px; vertical-align: -3px;
  animation: svspin 0.7s linear infinite;
}
@keyframes svspin { to { transform: rotate(360deg); } }

/* rails content */
.trend-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; cursor: pointer; text-decoration: none; color: inherit; }
.trend-row:hover { background: var(--surface-hover); }
.recent-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
.recent-row.active .recent-sym { color: var(--brand-2); }
.recent-link { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 4px; border-radius: 8px; cursor: pointer; text-decoration: none; color: inherit; }
.recent-link:hover { background: var(--surface-hover); }
.recent-sym { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.recent-arrow { color: var(--muted); font-size: 13px; }
.recent-del {
  flex: none; width: 20px; height: 20px; line-height: 1; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; opacity: 0.7;
}
.recent-del:hover { background: var(--surface-hover); color: var(--danger); opacity: 1; }
.recent-add { padding: 6px 2px; }
.recent-add-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  padding: 6px 8px; font-size: 12.5px; color: var(--text);
}
.recent-add-input:focus { outline: none; border-color: var(--brand-2); }
.trend-sym { font-size: 13.5px; font-weight: 700; width: 46px; flex: none; }
.trend-bar { flex: 1; height: 5px; border-radius: 3px; overflow: hidden; display: flex; background: var(--border); }
.trend-pct { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 34px; text-align: right; flex: none; }
.watchlist-gate {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.watchlist-gate p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* reply composer (inline under a post) */
.reply-composer { margin: 10px 0 12px 47px; }
.post-action.reported { color: var(--brand-2); }
.post-action.reported:hover { color: var(--brand-2); }

/* flag/report dialog */
.flag-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 5, 8, 0.65); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.flag-dialog {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 18px; max-width: 400px; width: 100%; max-height: 88vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.flag-title { margin: 0 0 4px; font-size: 15px; }
.flag-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.flag-option {
  display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.flag-option:hover { background: var(--surface-hover); }
.flag-option input { margin-top: 3px; accent-color: var(--brand); }
.flag-desc { margin: 10px 0 0; }
.flag-status { font-size: 12.5px; color: var(--danger); margin: 8px 0 0; min-height: 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  font-size: 13px; padding: 10px 16px; border-radius: 10px; z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); max-width: min(90vw, 420px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sentiment-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.sentiment-sym { font-family: var(--mono); font-weight: 700; font-size: 12.5px; width: 42px; flex: none; }
.sentiment-track { flex: 1; height: 6px; border-radius: 3px; background: var(--border); display: flex; overflow: hidden; }
.sentiment-track .bull { background: var(--bull); }
.sentiment-track .bear { background: var(--bear); }
.sentiment-n { font-size: 10.5px; color: var(--muted); width: 38px; text-align: right; flex: none; font-family: var(--mono); }

.poster-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.poster-row .avatar { width: 28px; height: 28px; font-size: 11px; }
.poster-info { flex: 1; min-width: 0; }
.poster-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.poster-count { font-size: 11px; color: var(--muted); font-family: var(--mono); }

.cta-card {
  background: linear-gradient(160deg, rgba(31, 170, 89, 0.14), rgba(78, 168, 255, 0.06));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.cta-card h4 { margin: 0 0 5px; font-size: 13.5px; }
.cta-card p { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 14px; margin-top: 50px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-cols a { color: var(--muted); }
.footer-cols a:hover { color: var(--text); }

/* ============================================================================
   4. PAGE-SPECIFIC LAYOUTS
   ========================================================================== */

/* ---- decide / landing ---- */
.hero { padding: 96px 0 84px; }
.hero-grid { text-align: left; }
.hero h1 {
  font-size: clamp(28px, 5vw, 46px); margin: 0 0 16px; line-height: 1.1; letter-spacing: -0.5px;
}
.hero p.sub { color: var(--muted); max-width: 680px; margin: 0 auto 26px; font-size: 18px; }
.gradient-text { background: linear-gradient(135deg, var(--brand-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--brand-2); margin: 0 0 14px; }
.section-h { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 14px; letter-spacing: -0.4px; line-height: 1.15; }
.section-sub { font-size: 16px; color: var(--muted); max-width: 560px; margin: 0; }
section { padding: 88px 0; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--brand-2);
  background: rgba(43, 208, 126, 0.1); border: 1px solid rgba(43, 208, 126, 0.25);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; text-align: left; }
.trust-row { display: flex; flex-direction: column; gap: 9px; }
.trust-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.trust-item svg { flex: none; color: var(--brand-2); }
.disclaimer-inline {
  margin-top: 24px; background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 3px solid var(--brand); padding: 13px 16px; border-radius: 10px;
  color: var(--muted); font-size: 13px; max-width: 540px;
}
.disclaimer-inline strong { color: var(--text); }

.how-step { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; padding: 70px 0; border-bottom: 1px solid var(--border); }
.how-step:last-child { border-bottom: none; }
.how-step.reverse { grid-template-columns: 1.05fr 0.95fr; }
.how-step.reverse .how-visual { order: 2; }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--brand-2); font-weight: 700; margin-bottom: 10px; }
.how-step h3 { font-size: 24px; margin: 0 0 12px; letter-spacing: -0.3px; }
.how-step p { font-size: 15px; color: var(--muted); max-width: 460px; line-height: 1.6; }
.how-visual { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.mock-caption { text-align: center; font-size: 11px; color: var(--muted); margin-top: 14px; }
.mock-screen { background: var(--bg); border-radius: 14px; padding: 16px; border: 1px solid var(--border); }
.mock-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mock-symbol { font-weight: 700; font-size: 15px; }
.mock-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: rgba(43, 208, 126, 0.14); color: var(--brand-2); }
.mock-price { font-family: var(--mono); font-size: 20px; font-weight: 600; margin-bottom: 2px; }
.mock-change { font-family: var(--mono); font-size: 12px; color: var(--bull); margin-bottom: 16px; }
.mock-strikes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mock-strike { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.mock-strike .s { font-family: var(--mono); font-weight: 700; width: 52px; }
.mock-strike .d { font-family: var(--mono); color: var(--muted); width: 44px; }
.mock-strike .p { font-family: var(--mono); color: var(--muted); flex: 1; text-align: right; }
.mock-greeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mock-greek { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; }
.mock-greek .k { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.mock-greek .v { font-family: var(--mono); font-weight: 700; font-size: 13px; margin-top: 2px; }

.path-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.path-node { font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); }
.path-node.now { background: rgba(78, 168, 255, 0.14); border-color: rgba(78, 168, 255, 0.35); color: var(--accent); }
.path-arrow { color: var(--border-strong); font-size: 11px; }
.rationale-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.rationale-card .head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.rationale-card .head .tag { font-family: var(--mono); font-size: 11px; color: var(--bull); }
.rationale-card p { font-size: 12px; margin: 0; color: var(--muted); }

.pnl-mock-head { margin-bottom: 16px; }
.pnl-total { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--bull); }
.pnl-period { font-size: 12px; color: var(--muted); }
.pnl-bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; margin-bottom: 12px; }
.pnl-bars .bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--bull); }
.pnl-bars .bar.neg { background: var(--bear); align-self: flex-start; }
.pnl-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-family: var(--mono); }

.diff-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.diff-visual { background: linear-gradient(160deg, rgba(31, 170, 89, 0.08), rgba(78, 168, 255, 0.04)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.diff-section { border-bottom: 1px solid var(--border); }
.copilot-chat { display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 82%; padding: 10px 13px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; }
.chat-bubble.user { align-self: flex-end; background: var(--brand); color: #04130a; font-weight: 600; }
.chat-bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.threed-tile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.threed-tile div { aspect-ratio: 1; border-radius: 10px; background: radial-gradient(circle at 30% 30%, rgba(78, 168, 255, 0.25), transparent 60%), var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }

.pricing-card { max-width: 520px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 36px; text-align: center; }
.pricing-card .btn { width: 100%; }
.price-tag { font-family: var(--mono); font-size: 48px; font-weight: 700; margin: 8px 0 2px; }
.price-tag small { font-size: 16px; color: var(--muted); font-weight: 500; }
/* Pre-launch: .coming-soon is toggled by js/site-config.js when the price is
   hidden (PRICE_VISIBLE unset) — shows "Coming soon" instead of the number. */
.price-tag.coming-soon { font-size: 30px; letter-spacing: -0.5px; }
.price-tag.coming-soon [data-price-num],
.price-tag.coming-soon small { display: none; }
.price-tag.coming-soon::after { content: 'Coming soon'; }
.price-note { font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.price-list { list-style: none; margin: 0 0 26px; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.price-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: #c7d1db; }
.price-list li svg { flex: none; color: var(--brand-2); margin-top: 2px; }
.guarantee-box { margin-top: 22px; background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 14px 16px; text-align: left; font-size: 12.5px; color: var(--muted); }
.guarantee-box strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 13px; }

.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.quote-card p { font-size: 13.5px; color: #c7d1db; margin: 0 0 14px; line-height: 1.55; }
.quote-card .who { display: flex; align-items: center; gap: 9px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.quote-card .name { font-size: 12px; font-weight: 600; }
.quote-card .role { font-size: 11px; color: var(--muted); }
.final-cta { text-align: center; padding: 100px 0 70px; }
.final-cta h2 { font-size: clamp(28px, 3.8vw, 42px); max-width: 720px; margin: 0 auto 16px; letter-spacing: -0.5px; line-height: 1.15; }
.final-cta p { color: var(--muted); font-size: 15px; max-width: 480px; margin: 0 auto 30px; }

/* ---- signin / download (centered single column) ---- */
.center { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.auth-card h1 { font-size: 19px; margin: 0 0 5px; letter-spacing: -0.2px; }
.auth-card .hint { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.tab-row { display: flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 3px; margin-bottom: 20px; }
.tab-btn { flex: 1; padding: 8px 0; border-radius: 7px; border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.tab-btn.active { background: var(--surface-2); color: var(--text); }
.btn-block { display: flex; width: 100%; }
.divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.same-account-note { display: flex; gap: 9px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; font-size: 12px; color: var(--muted); margin-top: 18px; }
.same-account-note svg { flex: none; margin-top: 1px; color: var(--accent); }
.fine-print { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 18px; line-height: 1.6; }
.alert-box { padding: 9px 12px; border-radius: 9px; font-size: 12.5px; margin-bottom: 14px; display: none; }
.alert-box.error { display: block; background: rgba(255, 93, 93, 0.1); border: 1px solid var(--danger); color: #ffb3b3; }
.alert-box.ok { display: block; background: rgba(43, 208, 126, 0.12); border: 1px solid var(--brand-2); color: #b6f5d4; }

/* ---- OAuth (Google + Apple) ---- */
.oauth-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.oauth-row .oauth-google { min-height: 44px; }
.oauth-row .oauth-google iframe { border-radius: 9px; }
.btn.apple-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: #000; border: 1px solid #000; color: #fff;
}
.btn.apple-btn:hover { background: #1a1a1a; border-color: #1a1a1a; }
.btn.apple-btn:disabled { opacity: 0.6; cursor: default; }
.btn.apple-btn .apple-logo { width: 16px; height: 16px; fill: currentColor; flex: none; }
.btn.apple-btn span { font-weight: 500; }

.dl-card { width: 100%; max-width: 440px; text-align: center; }
.dl-icon { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-weight: 800; color: #04130a; font-size: 20px; }
.dl-card h1 { font-size: 22px; margin: 0 0 8px; letter-spacing: -0.3px; }
.dl-card .sub { color: var(--muted); font-size: 14px; margin: 0 auto 28px; max-width: 360px; }
.store-row { display: flex; gap: 12px; margin-bottom: 22px; }
.store-btn {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; color: var(--text);
}
.store-btn:hover { border-color: var(--border-strong); text-decoration: none; }
.store-btn.coming-soon { opacity: 0.55; cursor: default; pointer-events: none; }
.store-btn .top { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.store-btn .name { font-size: 14px; font-weight: 700; }
.qr-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; text-align: left; margin-bottom: 20px; }
.qr-placeholder { width: 76px; height: 76px; flex: none; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; }
.qr-box p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ============================================================================
   5. LEGACY SECURE SURFACES (admin.html / user.html)
   Keep intact — these pages still reference these classes.
   ========================================================================== */
.auth-wrap { max-width: 420px; margin: 70px auto; padding: 0 20px; }
.auth-card-legacy { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.auth-card-legacy h2 { margin: 0 0 6px; }
.auth-card-legacy .hint { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.grid2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stores { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.store-btn-lg { display: inline-flex; align-items: center; gap: 10px; background: #0d1117; border: 1px solid var(--border); color: var(--text); padding: 12px 18px; border-radius: 12px; font-weight: 600; }
.store-btn-lg small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.dash { display: none; max-width: 760px; margin: 50px auto; padding: 0 20px; }
.dash.active { display: block; }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.dash-head .who { color: var(--muted); font-size: 14px; }
.kpi { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 8px; }
.kpi .box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.kpi .box .n { font-size: 26px; font-weight: 800; color: var(--brand-2); }
.kpi .box .l { color: var(--muted); font-size: 13px; }

/* ============================================================================
   6. RESPONSIVE
   ========================================================================== */
@media (max-width: 1240px) {
  .app-feed { grid-template-columns: 260px minmax(0, 1fr); }
  .rail-right { display: none; }
}
@media (max-width: 980px) {
  .app-feed { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 60px; }
  .rail-left { display: none; }
  .hero-grid, .how-step, .how-step.reverse, .diff-grid { grid-template-columns: 1fr !important; gap: 34px; }
  .how-step .how-visual, .diff-section .diff-visual, .diff-visual { order: 0; }
  .proof-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0; }
}
@media (max-width: 640px) {
  .nav-links a:nth-child(n+4) { display: none; }
  .nav-mid { order: 5; flex-basis: 100%; margin: 0 0 6px; justify-content: stretch; }
  .nav-search { width: 100%; margin-left: 0; }
  .session-count { display: none; } /* bar alone is enough on narrow screens */
  .post-body, .post-actions, .reply-composer { padding-left: 0; margin-top: 8px; }
  .post-head .avatar { display: none; }
  .hero h1 { font-size: 32px; }
  .app-post { padding: 18px 14px 60px; }
  .thread-replies { margin-left: 16px; padding-left: 10px; }
  .thread-replies .reply-composer { margin-left: 0; }
}

/* ============================================================================
   7. TOOLS PAGE (free payoff calculator)
   ========================================================================== */
.tools-wrap { padding: 24px 20px 80px; }
/* The tools page is an app, not a long marketing section: neutralize the
   global "section { padding: 88px 0 }" rhythm so the controls start right
   under the header instead of stacking two huge empty bands. */
.tools-wrap section { padding: 0; }
.tools-hero { text-align: center; margin-bottom: 18px; }
.tools-hero h1 { font-size: 34px; letter-spacing: -0.4px; margin: 10px 0 0; }
.tools-hero .sub { color: var(--muted); max-width: 640px; margin: 9px auto 0; font-size: 15px; }
.tools-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 22px; align-items: start; }
.tools-card { display: flex; flex-direction: column; gap: 16px; }
.tools-chart-card { padding: 18px; }
.payoff-chart { width: 100%; height: auto; display: block; background: var(--surface-2); border-radius: 10px; }
.chart-note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.tool-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.tool-field select,
.tool-field input {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-size: 15px; width: 100%; box-sizing: border-box;
}
.tool-field select:focus, .tool-field input:focus { outline: none; border-color: var(--brand-2); }
.tool-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-ticker-row { display: flex; gap: 8px; align-items: center; }
.tool-ticker-row input { flex: 1; min-width: 0; }
.tool-ticker-row .btn { white-space: nowrap; flex-shrink: 0; }
.chain-status { font-size: 12px; margin: 0; padding: 8px 10px; border-radius: 8px; }
.chain-status.muted { color: var(--muted); background: var(--surface-2); }
.chain-status.warn { color: var(--danger); background: rgba(255, 93, 93, 0.12); }
.tool-leg-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 2px; }
.leg-panel { display: flex; flex-direction: column; gap: 7px; }
#leg-rows { display: flex; flex-direction: column; gap: 7px; }
/* shared 5-column grid → the single header row and every leg pill share the
   same column widths, so strike/premium stay perfectly aligned across legs */
.leg-head, .tool-leg-row {
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: center;
}
.leg-head {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 0 2px;
}
.tool-leg-row { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 5px 7px; min-height: 38px; }
/* segmented Long/Short + Call/Put toggles — the selected option fills solid so
   the leg's side/type is obvious at a glance; unused options stay muted */
.seg { display: flex; gap: 2px; padding: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.seg button {
  flex: 1 1 0; min-width: 0; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 800 10.5px var(--mono); line-height: 1; padding: 6px 0; border-radius: 6px;
  transition: background 0.1s ease, color 0.1s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on.leg-long { background: var(--brand-2); color: #04130a; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); }
.seg button.on.leg-short { background: var(--danger); color: #1a0606; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); }
.seg button.on.leg-call, .seg button.on.leg-put { background: #e3ebf2; color: #0b1220; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); }
/* strike / premium steppers (numeric spinners hidden — clean pill look) */
.stepper { display: flex; align-items: center; gap: 2px; min-width: 0; }
.stepper .step {
  flex: none; width: 20px; height: 26px; padding: 0; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13px; line-height: 1; cursor: pointer;
}
.stepper .step:hover { color: var(--text); border-color: var(--border-strong); }
.stepper input[type="number"] {
  min-width: 0; flex: 1 1 auto; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 4px 2px; font: 600 12px var(--mono);
  appearance: textfield; -moz-appearance: textfield;
}
.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-color: var(--brand-2); }
/* remove-leg */
.leg-del {
  width: 24px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
}
.leg-del:hover { color: var(--danger); background: rgba(255, 93, 93, 0.08); }
.leg-del.hidden { visibility: hidden; }
/* add-leg footer */
.leg-add {
  width: 100%; padding: 8px; border-radius: 10px; border: 1px dashed var(--border-strong);
  background: var(--bg-soft); color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.leg-add:hover { color: var(--text); border-color: var(--brand-2); background: var(--surface-2); }
@media (max-width: 560px) {
  .leg-head, .tool-leg-row { grid-template-columns: 36px 36px minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 5px; }
  .tool-leg-row { padding: 4px 6px; }
  .stepper .step { width: 17px; }
  .leg-premium-stepper .step { display: none; }
  .leg-del { width: 20px; }
}
/* daily quote snapshot (chart card, under the model sliders) */
.quote-panel {
  margin-top: 2px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.quote-panel[hidden] { display: none; }
.quote-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.quote-id { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.quote-id strong { font-size: 13.5px; font-weight: 700; letter-spacing: -0.2px; }
.quote-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.quote-price { font-family: var(--mono); font-size: 18px; font-weight: 700; line-height: 1.15; }
.quote-change { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.quote-change.pos { color: var(--bull); }
.quote-change.neg { color: var(--bear); }
.quote-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; }
.q { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.q .qk { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.q .qv { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-time { text-transform: none; letter-spacing: 0.02em; font-size: 10px; line-height: 1.5; white-space: normal; }
@media (max-width: 560px) {
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
}
.tool-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.metric .m { font-size: 11px; color: var(--muted); }
.metric strong { font-size: 17px; color: var(--text); }
.metric strong.pos { color: var(--brand-2); }
.metric strong.neg { color: var(--danger); }

/* model controls: DTE / IV / range sliders below the chart */
.tools-model {
  display: flex; flex-wrap: wrap; gap: 18px 26px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.tool-slider {
  display: grid; grid-template-columns: auto auto; gap: 4px 12px; align-items: center;
  font-size: 12px; color: var(--muted); flex: 1 1 180px; min-width: 0;
}
.tool-slider input[type="range"] { grid-column: 1 / -1; accent-color: var(--brand-2); cursor: pointer; }
.tool-slider-val { font-size: 12px; font-weight: 600; color: var(--text); text-align: right; }
@media (max-width: 980px) {
  .tools-layout { grid-template-columns: 1fr; }
}

/* ================= per-ticker page (stock.html) ================= */
.stock-error {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: center; color: var(--muted); font-size: 13px;
}
.stock-error p { margin: 0; }

.stock-head {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px;
}
.stock-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stock-name { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.stock-quote { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stock-price { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.1; }
.stock-change { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.stock-change.pos { color: var(--bull); }
.stock-change.neg { color: var(--bear); }
.stock-delayed { font-size: 11px; color: var(--muted); }

.chart-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px 12px; margin-bottom: 14px;
}
.chart-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-card-head .feed-head { margin: 0; }
.chart-options { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chart-options .chip-group { display: flex; align-items: center; gap: 4px; }
.chart-wrap {
  position: relative; border: 1px solid var(--border); border-radius: 8px;
  background: #0d131c; padding: 2px 2px 0; overflow: hidden;
}
.chart-wrap canvas { width: 100%; display: block; touch-action: none; }
.pc-resize {
  height: 12px; cursor: ns-resize; background: transparent;
  display: flex; align-items: center; justify-content: center; user-select: none;
}
.pc-resize::after {
  content: ''; width: 42px; height: 3px; border-radius: 3px;
  background: rgba(127,144,164,0.35);
}
.pc-resize:hover::after, .pc-resize[data-dragging="true"]::after { background: var(--accent, #4ea8ff); }
.chart-status {
  margin: 0; padding: 10px 0; text-align: center; color: var(--muted); font-size: 12.5px;
}
.chart-status.hidden { display: none; }
.stock-delayed-line {
  margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 10.5px; color: var(--muted);
}

.feed-sep { margin: 18px 0 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.feed-sep .feed-head { font-size: 15px; }
.feed-head { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 4px; }

/* Tools hub: an overview landing listing each tool as its own card/section,
   each linking to the tool's canonical slug page. */
.tools-hub {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; max-width: 1120px; margin: 20px auto 0;
}
.hub-card { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.hub-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hub-card h2 { font-size: 19px; letter-spacing: -0.2px; margin: 0; }
.hub-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0; }
.hub-feats { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.hub-card .btn { align-self: flex-start; margin-top: 6px; }
.hub-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.hub-badge.live { color: var(--brand); border-color: var(--brand); }
.hub-badge.soon { color: var(--muted); border-color: var(--border); }
.hub-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }
.crumbs { margin: 0 0 10px; }
.crumbs a { color: var(--muted); font-size: 13px; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* POP tool: read-only leg side/type labels + the results stat grid. */
.leg-fixed { font-size: 12px; font-weight: 700; color: var(--text); text-transform: capitalize; }
.pop-result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.pop-stat {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.pop-stat .m { font-size: 11px; color: var(--muted); }
.pop-pct { font-size: 24px; letter-spacing: -0.3px; color: var(--brand-2); }

/* GEX tool: signed-dollar results + the long/short-gamma regime line. */
.gex-num { font-size: 20px; letter-spacing: -0.3px; }
.gex-num.long { color: #1faa59; }
.gex-num.short { color: #ff5d5d; }
.gex-regime { font-size: 13px; margin: 0 0 10px; }
.gex-regime.long { color: #1faa59; }
.gex-regime.short { color: #ff5d5d; }
.gex-regime.neutral { color: var(--muted); }
