/* ---- theming: dark is the fixed site-wide default, regardless of the
 * visitor's OS/browser preference — a deliberate choice (2026-09-07),
 * superseding the earlier system-preference-follows behavior, because
 * dev/preview/production were rendering inconsistently for no reason
 * visible to whoever's looking (different origins' localStorage +
 * different machines' system theme settings never agreed). An explicit
 * `data-theme` from the toggle (public/theme.js, persisted in
 * localStorage) still overrides this in either direction, so visitors who
 * want light mode can still have it. Up/down/warn are deliberately
 * different hex values per theme, not just reused — the dark-mode ones are
 * bright/light (readable on a near-black panel) and would fail contrast as
 * text on a white one, so light mode uses darker, more saturated versions
 * of the same hues. Fixed-dark-background chips (badge-aws, status-
 * pill.connected, etc.) are untouched by this — they're deliberately dark
 * regardless of site theme, only the site-theme tokens embedded in them
 * (var(--down) etc.) shift, and they were already picked to read fine
 * against a near-black chip background either way. */
:root {
  --bg: #0f1420;
  --panel: #161d2e;
  --panel-2: #1c2540;
  --border: #26314d;
  --text: #e6ecf7;
  --muted: #8b97b3;
  --accent: #4f8cff;
  --up: #ff5c6c;   /* spend up = red */
  --down: #3ddc97; /* spend down = green */
  --warn: #ffb454;
  --rail-w: 200px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef1f7;
  --panel: #ffffff;
  --panel-2: #f3f5fa;
  --border: #dde3ee;
  --text: #1a2130;
  --muted: #5c6478;
  --accent: #3568d9;
  --up: #d43f52;
  --down: #16915f;
  --warn: #b3760a;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* Inter, Google-hosted (see the marketing/legal pages' <head>) — not
 * loaded on the app shell, so this gracefully falls through to the old
 * system stack there instead of silently mismatching a font it never
 * fetched. Space Grotesk is reserved for the handful of display/heading
 * spots below (.mkt h1, .mkt-logo, .mkt-price-amount, .mkt-calc-value). */
html, body {
  margin: 0; height: 100%; font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.45;
}

/* ---- app shell: left rail + main column ---------------------------- */
.app-shell { display: flex; min-height: 100vh; }
.rail {
  width: var(--rail-w); flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 16px 12px; gap: 4px;
}
.rail-brand { font-size: 18px; font-weight: 700; padding: 4px 8px 16px; }
.rail-brand span { color: var(--accent); }
.rail-item {
  display: flex; align-items: center; gap: 10px; background: none; border: none;
  color: var(--muted); text-align: left; border-radius: 8px; padding: 9px 10px;
  font-size: 14px; cursor: pointer; width: 100%;
}
.rail-item:hover { background: var(--panel-2); color: var(--text); }
.rail-item.active { background: var(--panel-2); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.rail-icon { width: 18px; text-align: center; flex-shrink: 0; opacity: .85; }
.rail-spacer { flex: 1; }

.app-main { flex: 1; min-width: 0; }
.view-topbar {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.view-topbar h1 { font-size: 18px; margin: 0; }
.view-topbar .view-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
main.view { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* ---- top-right account cluster (theme toggle + company + logout) ------ */
.topbar-account { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar-company {
  color: var(--muted); font-size: 12px; line-height: 1.4; text-align: right;
  max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; width: 30px; height: 30px; font-size: 14px; line-height: 1;
  cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--muted); background: var(--panel-2); }
.currency-select {
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; height: 30px; padding: 0 6px; font-size: 12px; cursor: pointer; flex-shrink: 0;
}
.currency-select:hover { border-color: var(--muted); }
.currency-select:disabled { opacity: .6; cursor: default; }
#logoutBtn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 6px; padding: 6px 10px; font-size: 12px; cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
#logoutBtn:hover { color: var(--text); border-color: var(--muted); }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .rail { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 12px; gap: 2px; }
  .rail-brand { padding: 4px 12px 4px 0; }
  .rail-item { width: auto; white-space: nowrap; }
  .rail-spacer { display: none; }
  .topbar-company { display: none; }
}

/* ---- generic layout primitives -------------------------------------- */
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card .label { color: var(--muted); font-size: 12px; }
.card .value { font-size: 26px; font-weight: 700; margin: 4px 0; }
.card .delta { font-size: 13px; }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
.one { grid-template-columns: 1fr; }
.two { grid-template-columns: 1fr 1fr; }
.three { grid-template-columns: 1fr 1fr 1fr; }
.provider-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.badge-aws { background: #2d1f0f; color: #ffb454; }
.badge-gcp { background: #10233d; color: #6cb2ff; }
.badge-azure { background: #10233d; color: #4fd1ff; }
.row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.row .name { width: 130px; flex-shrink: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .bar-track { flex: 1; background: var(--panel-2); border-radius: 4px; height: 12px; overflow: hidden; }
.row .bar { height: 100%; border-radius: 4px; }
.row .amt { width: 70px; text-align: right; color: var(--muted); }
.row .share { width: 44px; text-align: right; color: var(--muted); }
.legend { font-size: 12px; color: var(--muted); margin-top: 4px; }
svg { width: 100%; height: auto; display: block; }
.trend-chart { cursor: crosshair; }
@media (max-width: 760px) { .two, .three { grid-template-columns: 1fr; } .row .name { width: 100px; } }

/* ---- recommendations / outcomes -------------------------------------- */
.rec { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--panel-2); margin-bottom: 10px; }
.rec .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rec .title { font-weight: 600; }
.rec .saving { color: var(--down); font-weight: 700; white-space: nowrap; }
.rec .detail { color: var(--muted); font-size: 13px; margin-top: 6px; }
.rec-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rec-actions button { border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--panel); color: var(--text); }
.rec-actions button:hover { border-color: var(--muted); }
.rec-actions button.dismiss { color: var(--up); }
.rec-actions button.actioned { background: var(--accent); border-color: var(--accent); color: #fff; }
.note-form { margin-top: 10px; }
.note-form textarea { width: 100%; min-height: 60px; padding: 7px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 13px; font-family: inherit; resize: vertical; }
.rec-preview { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rec-preview .title { font-size: 13px; }
.rec-preview .saving { color: var(--down); font-weight: 700; font-size: 13px; white-space: nowrap; }
.view-all-link { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 13px; cursor: pointer; text-decoration: none; background: none; border: none; padding: 0; font-family: inherit; }
.view-all-link:hover { text-decoration: underline; }
.outcome-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--panel-2); margin-bottom: 10px; }
.outcome-card .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.outcome-card .title { font-weight: 600; }
.outcome-card .detail { color: var(--muted); font-size: 13px; margin-top: 6px; }
.outcome-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.outcome-pill.pending { background: var(--panel); color: var(--muted); border: 1px solid var(--border); }
.outcome-pill.confirmed { background: #10331f; color: var(--down); }
.outcome-pill.no_change { background: #332210; color: var(--warn); }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-left: 8px; background: var(--panel); color: var(--muted); border: 1px solid var(--border); }
.health-banner { border-color: var(--warn); margin-bottom: 16px; }
.health-banner h3 { color: var(--warn); margin: 0 0 8px; font-size: 13px; }
.health-banner .item { font-size: 13px; margin-bottom: 4px; }
.health-banner .item:last-child { margin-bottom: 0; }
.health-banner a { color: var(--accent); cursor: pointer; }
.demo-banner { border-color: var(--accent); margin-bottom: 16px; font-size: 13px; padding: 12px 16px; }
.demo-banner a { color: var(--accent); cursor: pointer; font-weight: 600; }
.danger-zone { border-color: var(--up); }
.danger-zone h3 { color: var(--up); margin: 0 0 8px; font-size: 13px; text-transform: none; letter-spacing: normal; }

/* ---- date range picker (shared by Dashboard + Explorer) -------------- */
.range-picker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 16px; }
.range-presets { display: flex; gap: 4px; }
.range-presets button { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.range-presets button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.range-custom { display: flex; align-items: center; gap: 6px; }
.range-custom input[type=date] { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 12px; }
.range-custom span { color: var(--muted); font-size: 12px; }
.range-custom button { border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); }
.range-label { color: var(--muted); font-size: 12px; margin-left: auto; }
@media (max-width: 760px) { .range-label { margin-left: 0; width: 100%; } }
.range-exports { display: flex; gap: 8px; }
.export-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--panel-2); border: 1px solid var(--accent); color: var(--accent);
  border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.export-btn:hover { background: var(--accent); color: #fff; }

/* ---- Explorer filters -------------------------------------------------- */
.explore-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 16px; }
.explore-filters label { font-size: 12px; color: var(--muted); margin-right: 6px; }
.explore-filters select {
  padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 13px; min-width: 140px;
}
.explore-filters .clear-filters { color: var(--accent); font-size: 12px; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.explore-filters .clear-filters:hover { text-decoration: underline; }
.explore-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.explore-total .value { font-size: 22px; font-weight: 700; }
.explore-total .delta { font-size: 13px; color: var(--muted); }

/* ---- panel header actions (View all / CSV), pagination, fixed sizing --- */
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-header h3 { margin: 0; }
.panel-actions { display: flex; gap: 6px; flex-shrink: 0; }
.panel-action {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 6px; padding: 3px 8px; font-size: 11px; cursor: pointer; white-space: nowrap;
}
.panel-action:hover { color: var(--text); border-color: var(--muted); }
/* Reserves the same vertical space whether a panel has 1 row or 100 —
 * roughly 10 rows' worth (~30px each) plus the legend line, so the grid
 * of panels lines up and never reflows page-to-page. */
.panel-fixed [id$="PanelBody"] { min-height: 320px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.pagination button { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.pagination button:disabled { color: var(--muted); cursor: default; opacity: .5; }
.pagination .page-indicator { font-size: 12px; color: var(--muted); }

/* ---- modal (Explorer "view all" + CSV export scope choice) ------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(6, 9, 16, .65); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; width: 100%; max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-head h3 { margin: 0; font-size: 15px; }
#modalClose { background: none; border: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; }
#modalClose:hover { color: var(--text); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-body .row { margin-bottom: 10px; }
.modal-choice { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.modal-choice button {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 10px 14px; font-size: 13px; cursor: pointer; text-align: left;
}
.modal-choice button:hover { border-color: var(--accent); }
.modal-choice button .choice-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---- connections / plan banner ---------------------------------------- */
.plan-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-banner .upgrade-btn { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.conn-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--panel-2); }
.conn-card + .conn-card { margin-top: 12px; }
.conn-card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.conn-card .head-left { display: flex; align-items: center; gap: 10px; }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.status-pill.connected { background: #10331f; color: var(--down); }
.status-pill.not-connected { background: var(--panel); color: var(--muted); border: 1px solid var(--border); }
.status-pill.locked { background: #332210; color: var(--warn); }
.status-pill.warn { background: #332210; color: var(--warn); }
.status-pill.over { background: #331515; color: var(--up); }
.conn-card .meta { font-size: 12px; color: var(--muted); }
.budget-bar-track { background: var(--panel); border-radius: 4px; height: 8px; overflow: hidden; margin-top: 12px; }
.budget-bar-fill { height: 100%; border-radius: 4px; background: var(--down); }
.budget-bar-fill.warn { background: var(--warn); }
.budget-bar-fill.over { background: var(--up); }
.conn-actions { display: flex; gap: 8px; }
.conn-actions button { border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--panel); color: var(--text); }
.conn-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.conn-actions button.danger { color: var(--up); }
.conn-form { margin-top: 14px; display: grid; gap: 10px; max-width: 480px; }
.conn-form label { font-size: 12px; color: var(--muted); }
.conn-form input, .conn-form textarea, .conn-form select { width: 100%; padding: 7px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 13px; font-family: inherit; }
.conn-form select { cursor: pointer; }
.conn-form select:disabled { opacity: .6; cursor: default; }
.conn-form textarea { min-height: 70px; resize: vertical; }
.conn-form .hint { font-size: 12px; color: var(--muted); margin: -4px 0 0; }
.auth-method-tabs { display: flex; gap: 4px; margin-bottom: -2px; }
.auth-method-tabs button { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.auth-method-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.conn-guide { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px; background: var(--panel); }
.conn-guide summary { cursor: pointer; padding: 6px 0; color: var(--accent); user-select: none; }
.conn-guide p { margin: 8px 0; }
.conn-guide code { color: var(--text); background: var(--panel-2); padding: 1px 4px; border-radius: 3px; font-size: 11px; }
.conn-guide pre { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 10px; overflow-x: auto; margin: 8px 0; }
.conn-guide pre code { background: none; padding: 0; color: var(--text); }
.conn-guide table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12px; }
.conn-guide th, .conn-guide td { text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.conn-result { font-size: 13px; margin-top: 10px; padding: 8px 10px; border-radius: 6px; }
.conn-result.ok { background: #10331f; color: var(--down); }
.conn-result.error { background: #331515; color: var(--up); }

/* ---- auth gate ---------------------------------------------------------- */
[hidden] { display: none !important; }
#authGate { max-width: 380px; margin: 60px auto; padding: 0 24px; }
#authGate .panel { padding: 24px; }
#authGate h2 { margin: 0 0 4px; font-size: 18px; }
#authGate p.hint { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
#authGate label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 4px; }
#authGate input { width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 14px; }
#authGate input:focus { outline: 1px solid var(--accent); }
#authGate button[type="submit"] { width: 100%; margin-top: 20px; padding: 10px; border: none; border-radius: 6px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
#authGate .switch { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
#authGate .switch a { color: var(--accent); cursor: pointer; text-decoration: none; }
#authGate .terms-field { margin: 16px 0 4px; }
#authGate .terms-field label { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; cursor: pointer; }
#authGate .terms-field input[type="checkbox"] { width: auto; margin: 3px 0 0; flex: none; cursor: pointer; }
#authGate .terms-field span { padding-top: 1px; }
#authGate .terms-field a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
#authError { color: var(--up); font-size: 13px; margin-top: 12px; }

/* ================================================================
   Marketing site (public/index.html, public/support/index.html) —
   warmer, rounder, more tactile than the app's own utilitarian
   dashboard chrome, but built from the exact same --bg/--panel/
   --accent tokens so the two never feel like different products.
   Warmth comes from interaction (hover lift, smooth transitions),
   generous rounding, soft accent-tinted icon badges, and alternating
   section backgrounds for rhythm — not from changing the brand
   palette. Shared across every marketing/support page rather than
   duplicated inline per-page, so a design tweak happens once.
   ================================================================ */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.mkt { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; }
.mkt h1 { font-family: "Space Grotesk", "Inter", -apple-system, sans-serif; font-weight: 600; letter-spacing: -0.01em; }
.mkt h2, .mkt h3 { font-weight: 700; letter-spacing: -0.01em; }
.mkt-section-alt { background: var(--panel); }
.mkt-narrow { max-width: 720px; }

.icon-badge { width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); display: flex; align-items: center; justify-content: center; color: var(--accent); flex: none; }
.icon-badge svg { width: 22px; height: 22px; }

.mkt-nav { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); z-index: 10; }
.mkt-nav-row { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.mkt-logo { font-size: 19px; font-weight: 700; font-family: "Space Grotesk", "Inter", -apple-system, sans-serif; text-decoration: none; color: var(--text); }
.mkt-logo span { color: var(--accent); }
.mkt-nav-links { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.mkt-nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.15s ease; white-space: nowrap; }
.mkt-nav-links a:hover { color: var(--text); }
/* Small glow/lift matching .mkt-btn-primary — the sticky nav is the one CTA
   that's always on screen no matter how far down the page you've scrolled,
   so it needs to actually read as a button, not just a colored link. */
.mkt-nav-links .mkt-cta { background: var(--accent); color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; display: inline-block; flex-shrink: 0; white-space: nowrap; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.mkt-nav-links .mkt-cta:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent); }

.mkt-hero { padding-top: 56px; padding-bottom: 80px; overflow: hidden; }
.mkt-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.mkt-hero h1 { font-size: 44px; line-height: 1.14; margin: 0 0 22px; }
.mkt-hero p.lede { font-size: 18px; color: var(--muted); margin: 0 0 30px; line-height: 1.6; }
.mkt-hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.mkt-btn-primary { background: var(--accent); color: #fff; padding: 14px 26px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; display: inline-block; transition: transform 0.15s ease, box-shadow 0.15s ease; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); border: none; cursor: pointer; }
.mkt-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.mkt-btn-primary:disabled { opacity: 0.6; cursor: default; transform: none; }
.mkt-trust-line { color: var(--muted); font-size: 13px; }
.mkt-pill {
  display: block; width: fit-content; margin-bottom: 10px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}
.mkt-founder-note { margin: 22px 0 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 0 10px 10px 0; }
.mkt-founder-note p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--text); font-style: italic; }
.mkt-founder-note cite { font-size: 13px; color: var(--muted); font-style: normal; }

/* Real product screenshots in a browser-chrome frame — the actual app
   with demo data, not a mockup. The hero copy of this used to tilt in 3D
   (perspective + rotateY/rotateX) but that read as dated and hurt
   legibility, so it now renders flat (see .mkt-hero-visual below). */
.browser-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); box-shadow: 0 30px 70px -24px rgba(0,0,0,0.5); }
.browser-frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.browser-frame-dot { width: 10px; height: 10px; border-radius: 50%; }
.browser-frame-dot.red { background: #ff5f57; }
.browser-frame-dot.yellow { background: #febc2e; }
.browser-frame-dot.green { background: #28c840; }
.browser-frame img { display: block; width: 100%; height: auto; }
.mkt-hero-cycle { position: relative; }
.mkt-hero-cycle-frame:not(:first-child) { position: absolute; top: 0; left: 0; }
/* Base opacity:0 is what shows during each frame's own animation-delay
   (default fill-mode is "none", so the delay period uses this rule, not
   the keyframe's 0%) — without it every frame would render fully opaque,
   stacked, before its turn. Once the delay elapses the keyframe takes
   over and the crossfade runs as normal. */
.mkt-hero-cycle-frame { opacity: 0; animation: mktHeroCycle 12s infinite; }
@keyframes mktHeroCycle {
  0%, 2% { opacity: 1; }
  22% { opacity: 1; }
  25%, 100% { opacity: 0; }
}
.mkt-hero-visual { position: relative; }
.mkt-hero-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 130%; height: 130%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 68%); filter: blur(30px); pointer-events: none; z-index: 0; }
/* Flat, not tilted — the 3D rotateY/rotateX "floating browser window" look
 * read as dated and cost legibility on the screenshot text. */
.mkt-hero-visual .browser-frame { position: relative; z-index: 1; transform: none; }

.mkt-section { padding-top: 64px; padding-bottom: 64px; }
.mkt-section h2 { font-size: 30px; margin: 0 0 12px; }
.mkt-section .section-lede { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 0 40px; line-height: 1.6; }

.mkt-showcase-tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.mkt-showcase-tab { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.mkt-section-alt .mkt-showcase-tab { background: var(--panel-2); }
.mkt-showcase-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mkt-showcase-tab:not(.active):hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); color: var(--text); }
.mkt-showcase-frame { display: none; }
.mkt-showcase-frame.active { display: block; }
.mkt-showcase-caption { margin-top: 18px; color: var(--muted); font-size: 15px; text-align: center; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .mkt-hero-cycle-frame { animation: none; opacity: 0; }
  .mkt-hero-cycle-frame:first-child { opacity: 1; }
}

.card { border-radius: 16px; background: var(--bg); border: 1px solid var(--border); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.mkt-section-alt .card { background: var(--panel-2); }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(0,0,0,0.35); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

.mkt-gap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.mkt-gap-card { padding: 24px; }
.mkt-gap-card .icon-badge { margin-bottom: 14px; }
.mkt-gap-card h3 { font-size: 16px; margin: 0 0 8px; }
.mkt-gap-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.mkt-gap-verdict { font-size: 16px; line-height: 1.65; max-width: 640px; padding: 20px 24px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.mkt-gap-verdict strong { color: var(--text); }

.mkt-slice-grid { display: grid; gap: 18px; }
.mkt-slice { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 24px; }
.mkt-slice h3 { font-size: 19px; margin: 6px 0 8px; }
.mkt-slice p { font-size: 15px; color: var(--muted); line-height: 1.65; margin: 0; max-width: 640px; }

/* The calculator card is a single centered widget (like .mkt-final-cta
   below), not a left-aligned reading column — its heading/lede need to
   match that centering, or the section reads as misaligned (flush-left
   text sitting above a card floating in the middle of the page). Scoped
   to this one section; every other .mkt-section keeps the default
   left-aligned heading. */
.mkt-section-centered h2 { text-align: center; }
.mkt-section-centered .section-lede { text-align: center; margin-left: auto; margin-right: auto; }
.mkt-calc { max-width: 560px; margin: 0 auto; padding: 32px; text-align: center; }
.mkt-calc-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.mkt-calc-value { font-family: "Space Grotesk", "Inter", -apple-system, sans-serif; font-size: 34px; margin-bottom: 16px; }
.mkt-calc-slider { width: 100%; margin-bottom: 24px; accent-color: var(--accent); cursor: pointer; }
.mkt-calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.mkt-calc-result-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.mkt-calc-result-value { display: block; font-size: 20px; font-weight: 700; color: var(--down); }
.mkt-calc-caveat { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 22px; }

.mkt-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mkt-trust-item { padding: 24px; }
.mkt-trust-item .icon-badge { margin-bottom: 14px; }
.mkt-trust-item h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.mkt-trust-item p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

.mkt-pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mkt-price-card { padding: 30px; position: relative; }
.mkt-price-card.featured { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.mkt-section-alt .mkt-price-card.featured { background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); }
.mkt-price-badge { position: absolute; top: -12px; right: 24px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.mkt-price-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.mkt-price-amount { font-family: "Space Grotesk", "Inter", -apple-system, sans-serif; font-size: 42px; margin: 0 0 4px; }
.mkt-price-amount span { font-size: 15px; color: var(--muted); font-family: "Inter", -apple-system, sans-serif; }
.mkt-price-note { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.mkt-price-list { list-style: none; padding: 0; margin: 0 0 28px; font-size: 14px; }
.mkt-price-list li { padding: 8px 0; display: flex; gap: 10px; align-items: flex-start; }
.mkt-price-list li::before { content: "✓"; color: var(--accent); font-weight: 700; flex: none; }
.mkt-price-btn { display: block; text-align: center; padding: 12px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.mkt-price-card.featured .mkt-price-btn { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.mkt-price-card:not(.featured) .mkt-price-btn { border: 1px solid var(--border); color: var(--text); }
.mkt-price-btn:hover { transform: translateY(-2px); }

.mkt-faq-item { border-radius: 14px; padding: 4px 22px; margin-bottom: 10px; transition: background 0.15s ease; }
.mkt-faq-item:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.mkt-faq-item summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 600; }
.mkt-faq-item summary::-webkit-details-marker { display: none; }
.mkt-faq-item summary .chev { flex: none; width: 20px; height: 20px; color: var(--accent); transition: transform 0.2s ease; }
.mkt-faq-item[open] summary .chev { transform: rotate(180deg); }
.mkt-faq-item p { font-size: 14px; color: var(--muted); margin: 0 0 20px; line-height: 1.65; max-width: 640px; }

/* Contact/support forms (public/index.html enquiry section,
   public/support/index.html support-request form) */
.mkt-form { max-width: 560px; }
.mkt-form label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.mkt-form label:first-child { margin-top: 0; }
.mkt-form input, .mkt-form textarea { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit; }
.mkt-section-alt .mkt-form input, .mkt-section-alt .mkt-form textarea { background: var(--panel-2); }
.mkt-form input:focus, .mkt-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; }
.mkt-form textarea { min-height: 120px; resize: vertical; }
.mkt-form button[type="submit"] { margin-top: 20px; }
.mkt-form-message { margin-top: 14px; font-size: 14px; }
.mkt-form-message.success { color: var(--down); }
.mkt-form-message.error { color: var(--up); }

.mkt-final-cta { text-align: center; padding-top: 80px; padding-bottom: 80px; position: relative; overflow: hidden; }
.mkt-final-cta h2 { font-size: 32px; margin: 0 0 12px; }
.mkt-final-cta p { color: var(--muted); font-size: 16px; margin: 0 0 30px; }

.mkt-footer { border-top: 1px solid var(--border); padding: 36px 0; }
.mkt-footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.mkt-footer-links { display: flex; gap: 20px; }
.mkt-footer-links a { color: var(--muted); font-size: 13px; text-decoration: none; transition: color 0.15s ease; }
.mkt-footer-links a:hover { color: var(--text); }
.mkt-footer p { color: var(--muted); font-size: 13px; margin: 0; max-width: 520px; line-height: 1.5; }

.mkt-page-header { padding-top: 56px; padding-bottom: 8px; }
.mkt-page-header h1 { font-size: 36px; margin: 0 0 12px; }
.mkt-page-header p { color: var(--muted); font-size: 16px; max-width: 620px; line-height: 1.6; }

@media (max-width: 900px) {
  .mkt-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .mkt-hero h1 { font-size: 32px; }
  .mkt-gap-grid, .mkt-trust-grid, .mkt-pricing-grid { grid-template-columns: 1fr; }
  .mkt-slice { grid-template-columns: 40px 1fr; padding: 20px; }
  .mkt-calc { padding: 24px 20px; }
  .mkt-calc-result { grid-template-columns: 1fr; gap: 12px; }
}
/* Below ~480px (most phones) the full nav — logo + 3 section links + Log in
   + the Start free pill — no longer fits on one line; .mkt-nav-row has no
   wrap, so it was quietly compressing everything into an overlapping mess
   instead of breaking cleanly. Dropping the in-page section links (Pricing/
   FAQ/Contact — all reachable by scrolling anyway) keeps Logo + Log in +
   Start free comfortably on one line down to the narrowest common phones,
   and keeps the CTA button legible instead of wrapping its own text. */
@media (max-width: 640px) {
  .mkt-nav-section-link { display: none; }
  .mkt-nav-links { gap: 14px; }
}

/* Honeypot — off-screen, not display:none (some bots skip obviously-
   hidden fields but not off-screen ones), unreachable by tab order, never
   announced to screen readers. Any value in it on submit means non-human;
   server/contact.js checks this, not the client. */
.mkt-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
