:root {
  --bg: #0b1020;
  --bg-soft: #111730;
  --panel: #171e3a;
  --panel-2: #1c2446;
  --border: #263056;
  --text: #e7ebf8;
  --muted: #9aa6c8;
  --accent: #7c5cff;
  --accent-2: #4c8dff;
  --good: #34d399;
  --warn: #ecb45a;
  --warn-faint: rgba(236, 180, 90, 0.07);
  --warn-soft: rgba(236, 180, 90, 0.16);
  --warn-ring: rgba(236, 180, 90, 0.45);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --danger-ring: rgba(239, 68, 68, 0.6);
  --accent-soft: rgba(124, 92, 255, 0.12);
  --accent-ring: rgba(124, 92, 255, 0.38);
  --float-shadow: 0 12px 30px rgba(3, 6, 22, 0.8), 0 0 0 1px rgba(148, 163, 220, 0.09);
  --float-shadow-hover: 0 16px 40px rgba(124, 92, 255, 0.38);
  --bg-glow: #1a2150;
  --header-bg: rgba(11, 16, 32, 0.8);
  --track: #232c55;
--sol: #2c3560;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(4, 8, 28, 0.45);
  --section-band: rgba(76, 141, 255, 0.05);
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Bricolage Grotesque", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f8ff;
  --bg-soft: #eef1fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #5b6b8c;
  --accent: #6d4aff;
  --accent-2: #3b82f6;
  --good: #059669;
  --warn: #b45309;
  --warn-faint: rgba(180, 83, 9, 0.07);
  --warn-soft: rgba(180, 83, 9, 0.1);
  --warn-ring: rgba(180, 83, 9, 0.38);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.07);
  --danger-ring: rgba(220, 38, 38, 0.5);
  --accent-soft: rgba(109, 74, 255, 0.1);
  --accent-ring: rgba(109, 74, 255, 0.32);
  --float-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
  --float-shadow-hover: 0 14px 36px rgba(124, 92, 255, 0.45);
  --bg-glow: #dfe6ff;
  --header-bg: rgba(246, 248, 255, 0.88);
  --track: #e2e8f0;
  --sol: #b6c1e4;
  --shadow: 0 20px 50px rgba(30, 41, 99, 0.12);
  --section-band: #edf0f7;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

@keyframes page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

body {
  font-family: var(--font-body);
  background: radial-gradient(1200px 800px at 80% -10%, var(--bg-glow) 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  animation: page-fade 0.5s ease both;
}

/* Fade elements that reveal dynamically instead of flashing in */
/* #alerts-panel is intentionally absent: the floating pill animates itself
   (.alert-float.is-new) so it only nudges when an alert is actually unseen. */
#plan-banner, .price-monthly, .price-yearly, .app-menu.open { animation: page-fade 0.3s ease both; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

.brand, .app-title, .kpi-value, .plan-price, .stat b, .watch-price {
  font-family: var(--font-heading);
}

.kpi-value, .plan-price, .watch-price {
  font-variant-numeric: tabular-nums;
}

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand-logo { height: 24px; width: auto; display: block; filter: brightness(0) invert(1); }
:root[data-theme="light"] .brand-logo { filter: none; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; font-weight: 600; cursor: pointer; border: none; transition: transform 0.15s ease, box-shadow 0.2s ease; font-family: inherit; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; padding: 12px 22px; font-size: 15px;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(124, 92, 255, 0.45); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 11px 22px; font-size: 15px; }
:root[data-theme="light"] .btn-outline { background: #ffffff; border-color: #cdd7ea; box-shadow: 0 1px 3px rgba(30, 41, 99, 0.16); }
.btn-outline:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.btn-ghost:hover { color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  cursor: pointer; transition: transform 0.15s ease, border-color 0.2s ease; font-family: inherit;
}
.btn-icon:hover { border-color: var(--accent); transform: translateY(-1px); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-toggle { font-size: 20px; padding: 0; }
#nav-toggle { display: none; }
.app-menu .menu-primary { text-align: center; color: var(--accent); font-weight: 700; border-bottom: none; padding: 12px 0 2px; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 70px; text-align: left; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 36px;
}
.hero h1 { font-size: clamp(32px, 5.4vw, 60px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--danger); font-weight: 800; }
.hero p { color: var(--muted); font-size: 17px; font-weight: 400; line-height: 1.65; max-width: none; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 20px; justify-content: flex-start; flex-wrap: wrap; }
.hero-stats { display: flex; flex-wrap: wrap; margin-top: 48px; }
.stat { flex: 1 1 0; min-width: 150px; padding: 4px 28px 4px 0; }
.stat + .stat { border-left: 1px solid var(--border); padding-left: 28px; }
.stat b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.stat span { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }

.hero-preview { margin-top: 54px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); overflow: hidden; box-shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.45); }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.browser-bar .addr { font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); padding: 5px 14px; border-radius: 999px; }
.preview-body { padding: 22px 22px 8px; }
.preview-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.preview-kpi { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.preview-kpi span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.preview-kpi b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.preview-kpi b.warn { color: var(--danger); }
.preview-alert { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--panel-2); }
.pa-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: rgba(124, 92, 255, 0.14); flex: 0 0 auto; }
.preview-alert .pa-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.preview-alert .pa-msg { font-size: 13px; color: var(--muted); line-height: 1.45; }
.preview-alert .badge { margin-left: auto; flex: 0 0 auto; }

.hero-trust { margin-top: 30px; font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }
.cta .hero-trust { margin-top: 26px; }

/* ---------- Sections ---------- */
section { padding: 70px 0; }
.section-band {
  background: var(--section-band);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-label { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--accent-2); text-align: left; margin-bottom: 12px; }
.section-title { text-align: left; font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-sub { text-align: left; color: var(--muted); max-width: 620px; margin: 0 0 46px; font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 16px; background: rgba(124, 92, 255, 0.14); }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; max-width: 760px; margin: 0; }
.plan {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; position: relative;
}
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.plan-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 19px; margin-bottom: 4px; }
.plan .plan-desc { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.plan-price { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.plan-price span { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan-save { color: var(--good); font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.plan ul { list-style: none; margin-bottom: 26px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--muted); font-size: 14px; }
.plan li::before { content: "✓"; color: var(--good); font-weight: 800; }
.plan .btn { width: 100%; justify-content: center; }
.billing-toggle { display: flex; justify-content: flex-start; gap: 10px; margin-bottom: 34px; }
.billing-toggle .btn-outline.is-active { border-color: var(--accent); color: var(--text); background: rgba(124, 92, 255, 0.12); }

/* ---------- Comparison / proof ---------- */
.compare-note { text-align: left; color: var(--muted); font-size: 15px; max-width: 620px; margin: 0 0 34px; }
.hk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; max-width: 980px; margin: 0 0 28px; }
.hk-stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.hk-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.hk-value { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.hk-value .hk-suffix { font-size: 16px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.hk-sub { font-size: 13px; color: var(--muted); }
.hk-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; max-width: 980px; }
.hk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hk-head-title { font-size: 16px; font-weight: 700; }
.hk-head-note { font-size: 12px; color: var(--muted); text-align: right; }
.hk-list { display: flex; flex-direction: column; }
.hk-row { display: grid; grid-template-columns: 200px 1fr 92px; align-items: center; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.hk-row:last-child { border-bottom: none; }
.hk-name { font-size: 14px; font-weight: 600; text-align: left; }
.hk-track { height: 12px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.hk-bar { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.hk-bar.hk-max { background: linear-gradient(90deg, var(--danger), var(--warn)); }
.hk-val { font-size: 14px; font-weight: 400; font-variant-numeric: tabular-nums; text-align: right; color: var(--accent-2); }
.hk-val.is-max { font-weight: 400; color: var(--warn); }
@media (max-width: 700px) {
  .hide-sm { display: none; }
  .hk-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hk-head-note { text-align: left; }
  .hk-row { grid-template-columns: 1fr auto; row-gap: 7px; }
  .hk-name { grid-column: 1; grid-row: 1; }
  .hk-val { grid-column: 2; grid-row: 1; }
  .hk-track { grid-column: 1 / -1; grid-row: 2; }
}
.region-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.region-table th, .region-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.region-table th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.region-table td { font-variant-numeric: tabular-nums; }
.region-table .tbl-service { text-align: left; font-weight: 700; letter-spacing: 0.01em; color: var(--text); }
.region-table tbody tr:last-child td { border-bottom: none; }
.region-table tbody tr:hover td { background: var(--bg-soft); }
.region-table .tbl-flag { width: 18px; height: 13px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }
.region-table .tbl-lowest { color: var(--good); font-weight: 700; }
.region-table .low-pill { display: inline-block; margin-left: 8px; background: rgba(52, 211, 153, 0.16); color: var(--good); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 800; padding: 3px 7px; border-radius: 999px; vertical-align: 1px; }
.region-table .listed-pill { display: inline-block; margin-left: 8px; background: rgba(124, 92, 255, 0.14); color: var(--accent); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 800; padding: 3px 7px; border-radius: 999px; vertical-align: 1px; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--panel); }
.faq-q { padding: 18px 22px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.faq-q::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform 0.2s ease; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 22px; color: var(--muted); font-size: 14px; }
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 20px; }

/* ---------- CTA ---------- */
.cta { text-align: left; background: linear-gradient(135deg, rgba(124, 92, 255, 0.14), rgba(76, 141, 255, 0.14)); border: 1px solid var(--border); border-radius: 22px; padding: 60px 30px; max-width: 900px; margin: 0; }
.cta h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.cta p { color: var(--muted); margin-bottom: 28px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 36px; margin-top: 40px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand img { height: 24px; margin-bottom: 12px; }
.footer-brand p { max-width: 280px; font-size: 13px; line-height: 1.6; margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-h { font-weight: 700; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.footer-col a { color: var(--muted); text-decoration: none; transition: color 0.15s ease, background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; }
.footer-col a:hover { color: var(--accent-2); }
.footer-muted { color: var(--muted); font-size: 12px; }
.footer-foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* ---------- Dashboard app page ---------- */
.app-shell { min-height: 100vh; }
.app-header { border-bottom: 1px solid var(--border); background: var(--header-bg); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 40; }
.app-title .brand-logo { height: 22px; }
.app-header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.app-header-actions { display: flex; gap: 12px; align-items: center; }
#nav-toggle-app { display: inline-flex; }
.region-picker { position: relative; display: inline-block; }
.region-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font-size: 13px; font-family: inherit; cursor: pointer; }
.region-flag { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; flex: 0 0 auto; }
.region-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16); padding: 6px; min-width: 190px; max-height: 320px; overflow-y: auto; z-index: 60; }
.region-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 14px; font-family: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.region-opt:hover { background: var(--bg-soft); }
.region-opt.is-selected { background: rgba(76, 141, 255, 0.12); }
.app-menu { display: none; flex-direction: column; align-items: stretch; gap: 2px; position: absolute; top: 58px; right: max(0px, calc((100vw - min(1120px, 92%)) / 2)); width: min(280px, 92vw); background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16); padding: 10px 16px 12px; z-index: 45; }
.app-menu.open { display: flex; animation: page-fade 0.25s ease both; }
.app-menu a, .app-menu .menu-link { width: 100%; padding: 9px 0; font-size: 15px; color: var(--muted); border-bottom: 1px solid var(--border); text-align: left; }
.app-menu .menu-link { background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; cursor: pointer; }
.app-menu a:hover, .app-menu .menu-link:hover { color: var(--text); }
.menu-identity { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 0 12px; background: none; border: none; border-bottom: 1px solid var(--border); font-family: inherit; cursor: pointer; text-align: left; }
.menu-avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.menu-id-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.menu-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-plan .badge { font-size: 11px; }
.compare-box { margin-top: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--bg); max-height: 240px; overflow-y: auto; }
.cmp-head { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cmp-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.cmp-row:first-of-type { border-top: none; }
.cmp-flag { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; flex: 0 0 auto; }
.cmp-name { color: var(--muted); flex: 1; }
.cmp-price { font-weight: 700; white-space: nowrap; }
.cmp-local { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.watch-fresh { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.app-title { font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.app-main { padding: 34px 0 80px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.kpi .kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.kpi .kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.highlight-kpi { border-color: var(--accent); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.kpi.highlight-kpi .kpi-value { color: var(--accent-2); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel h2 { font-size: 18px; margin-bottom: 6px; }
.panel .panel-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.subs-scroll { position: relative; }
.subs-scroll .scroll-fade { position: absolute; top: 0; right: 0; bottom: 0; width: 42px; background: linear-gradient(to right, rgba(0, 0, 0, 0), var(--panel)); pointer-events: none; border-radius: 0 var(--radius) var(--radius) 0; opacity: 0; transition: opacity 0.2s ease; }
.subs-scroll .scroll-fade.show { opacity: 1; }
.scroll-hint { display: none; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); user-select: none; }
.scroll-hint.show { display: inline-flex; }
.filter-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 7px 15px; font-size: 13px; cursor: pointer; font-family: inherit; }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid rgba(38, 48, 86, 0.6); vertical-align: middle; }
tr.row-waste td { background: var(--warn-faint); }
tr:hover td { background: rgba(124, 92, 255, 0.05); }
.empty-row { text-align: left; color: var(--muted); padding: 30px; }
.alerts-list .empty-row { padding-left: 0; }
.muted { color: var(--muted); }
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.panel-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.spend-total-amt { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-2); }
.spend-total-label { font-size: 12px; color: var(--muted); }
.delta-pill { display: inline-block; background: rgba(52, 211, 153, 0.14); color: var(--good); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 800; padding: 4px 9px; border-radius: 999px; margin-top: 4px; align-self: flex-end; }
.spend-bars { display: flex; flex-direction: column; }
.tip-float { position: absolute; display: none; max-width: min(260px, calc(100vw - 20px)); width: max-content; background: #0f172a; color: #fff; font-size: 12px; line-height: 1.4; font-weight: 500; font-family: inherit; padding: 8px 11px; border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); z-index: 70; pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity 0.15s ease, transform 0.15s ease; }
.tip-float.show { opacity: 1; transform: translateY(0); }
.tip-float::before { content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-bottom-color: #0f172a; }
.spend-empty { color: var(--muted); font-size: 14px; padding: 18px 2px; }
.spend-row { display: grid; grid-template-columns: 140px 1fr 175px; align-items: center; gap: 18px; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.spend-row:last-child { border-bottom: none; }
.spend-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-align: left; }
.spend-top .spend-name { color: var(--accent-2); }
.spend-top-tag { background: rgba(76, 141, 255, 0.14); color: var(--accent-2); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.spend-track { height: 7px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; max-width: 100%; }
.spend-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.spend-row.spend-top .spend-fill { box-shadow: 0 0 10px rgba(76, 141, 255, 0.35); }
.spend-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.spend-pct { font-size: 12px; font-weight: 400; color: var(--muted); }
@media (max-width: 640px) {
  .spend-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .spend-track { grid-column: 1 / -1; grid-row: 2; max-width: none; }
}

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.03em; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-good { background: rgba(52, 211, 153, 0.16); color: var(--good); }
.badge-neutral { background: rgba(154, 166, 200, 0.14); color: var(--muted); }
.badge-info { background: rgba(76, 141, 255, 0.16); color: var(--accent-2); }

.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--sol); border-radius: 999px; transition: 0.2s; }
.slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

.gap-box { position: relative; display: flex; flex-wrap: wrap; align-items: center; row-gap: 10px; column-gap: 10px; background: rgba(76, 141, 255, 0.09); border: 1px solid rgba(76, 141, 255, 0.3); border-radius: 12px; padding: 16px 18px; font-size: 15px; margin-bottom: 20px; }
.gap-label { color: var(--muted); }
.gap-field { display: inline-flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.gap-prefix { padding-left: 10px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gap-field input { width: 84px; background: transparent; border: none; color: var(--text); padding: 8px 10px 8px 4px; font-family: inherit; font-size: 14px; outline: none; }
.gap-field input:focus { outline: none; }
.gap-field:focus-within { border-color: var(--accent); }
.gap-suffix { color: var(--muted); }
.gap-line { color: var(--text); }

.savings-track { height: 12px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.savings-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s ease; }
.savings-note { font-size: 13px; color: var(--muted); }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 11px 12px; font-family: inherit; font-size: 14px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input:read-only { opacity: 0.55; }
.form-submit { min-height: 44px; }

/* ---------- Password show/hide ---------- */
.pw-field { position: relative; }
.pw-field input { padding-right: 46px; }
.btn-pw {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0; margin: 0;
  width: 20px; height: 20px; display: grid; place-items: center; line-height: 0;
  color: var(--muted); font-family: inherit;
  transition: color 0.15s ease;
}
.btn-pw:hover, .btn-pw:focus-visible { color: var(--text); background: none; outline: none; }
.btn-pw svg { display: block; }

/* ---------- Watchlist ---------- */
.watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.watch-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.watch-card.prio { border-color: var(--warn-ring); }
.watch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.watch-head strong { font-size: 14px; }
.watch-price { font-size: 20px; font-weight: 800; }
.watch-meta { font-size: 12px; color: var(--muted); margin: 4px 0; }
.watch-change { font-size: 12px; font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.watch-note { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; }
.watch-foot { margin-top: auto; padding-top: 6px; }
.watch-compare { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease; }
.watch-compare:hover { border-color: var(--accent); color: var(--accent); background: rgba(124, 92, 255, 0.06); transform: translateY(-1px); }
.watch-compare.open { border-color: var(--accent); color: var(--accent); background: rgba(124, 92, 255, 0.08); }
.watch-compare .wcmp-caret { display: inline-flex; transition: transform 0.18s ease; }
.watch-compare .wcmp-caret svg { width: 14px; height: 14px; }
.watch-compare.open .wcmp-caret { transform: rotate(180deg); }
:root[data-theme="light"] .watch-compare { border-color: #b9c5e0; background: #ffffff; color: #334180; box-shadow: 0 1px 3px rgba(30, 41, 99, 0.16); }
:root[data-theme="light"] .watch-compare:hover, :root[data-theme="light"] .watch-compare.open { border-color: var(--accent); color: var(--accent); background: rgba(124, 92, 255, 0.08); box-shadow: 0 1px 5px rgba(124, 92, 255, 0.22); }
.watch-add { width: 100%; }
.watch-added { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.watch-added .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--panel-2); border: 1px solid var(--accent); color: var(--text); padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: all 0.3s ease; z-index: 100; pointer-events: none; box-shadow: var(--shadow); }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.plan-banner { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; text-align: left; background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(34, 197, 94, 0.1)); border: 1px solid rgba(52, 211, 153, 0.4); border-radius: 14px; padding: 20px 24px; margin-bottom: 24px; font-size: 15px; }
.plan-banner strong { color: var(--good); }
.banner-user { display: flex; align-items: center; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.banner-name { font-weight: 700; }
.banner-sep { color: var(--muted); }
.plan-banner #plan-badge { background: var(--bg); border: 1px solid var(--border); }
.plan-banner #sync-badge { background: rgba(52, 211, 153, 0.22); border: 1px solid var(--good); color: var(--good); }
.plan-banner #plan-banner-text { display: block; width: 100%; text-align: left; }

.btn-link { background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--text); }
#landing-signin { text-decoration: none; }
.btn-link.danger-link { color: var(--danger); }
.btn-link.danger-link:hover { color: var(--danger); opacity: 0.85; }

.quick-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 26px; }
.quick-links .filter-btn { display: inline-flex; text-decoration: none; }
.quick-links .filter-btn:hover { border-color: var(--accent); color: var(--text); }
.quick-links .filter-btn.danger-link { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); }
.quick-links .filter-btn.danger-link:hover { border-color: var(--danger); }
#sec-profile, #sec-alerts, #sec-password, #sec-danger { scroll-margin-top: 28px; }
.form-submit-span { grid-column: 1 / -1; justify-self: start; min-height: 44px; margin-top: 8px; }

/* ---------- Auth modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 8, 28, 0.62); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-backdrop.open { display: flex; animation: fade-in 0.25s ease both; }
.modal-backdrop.open .modal { animation: modal-in 0.3s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop.open, .modal-backdrop.open .modal { animation: none; }
  body, #plan-banner, .price-monthly, .price-yearly, .app-menu.open { animation: none; }
  .alert-float.is-new, .alert-float.is-new .alert-float-head, .feed-in { animation: none; }
  .alert-float-track.marquee { animation: none; }
  .alert-float-track.marquee .cap + .cap { display: none; }
}
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; width: min(420px, 100%); position: relative; box-shadow: var(--shadow); }
.modal h3 { font-size: 22px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; font-family: inherit; }
.modal-close:hover { color: var(--text); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-form { display: grid; gap: 14px; }
.auth-error { color: var(--danger); font-size: 13px; min-height: 0; margin: 0; }
.pw-hints { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.pw-hint { font-size: 12px; color: var(--muted); transition: color 0.15s ease; }
.pw-hint.ok { color: var(--good); }
.pw-hint.pending { color: var(--muted); opacity: 0.65; }
.auth-form .btn-primary { justify-content: center; width: 100%; }

/* ---------- Alerts panel ---------- */
.alerts-list { display: grid; gap: 10px; }
.alert-item { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.alert-item.is-warn { border-color: var(--warn-ring); }
.alert-item.is-info { border-color: rgba(76, 141, 255, 0.35); }
.alert-item.is-urgent { border-color: var(--danger-ring); background: var(--danger-soft); }
.alert-icon { font-size: 18px; line-height: 1.2; }
.alert-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.alert-msg { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.alert-meta { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.alert-actions { margin-top: 8px; }

/* ---------- Floating alerts widget ---------- */
.alert-float { position: fixed; right: 20px; bottom: 108px; z-index: 65; width: min(170px, calc(100vw - 32px)); display: flex; flex-direction: column; }
.alert-float[hidden] { display: none; }
.alert-float-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px; color: var(--text); font-family: inherit; text-align: left; cursor: pointer; box-shadow: var(--float-shadow); transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.alert-float-head:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--float-shadow-hover); }
.alert-float-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alert-float-bell { font-size: 18px; line-height: 1; }
.alert-float-bellwrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.alert-float-count { position: absolute; top: -7px; left: 11px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent-2); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--panel-2); }
.alert-float-count[hidden] { display: none; }
.alert-float-txt { display: block; flex: 1; min-width: 0; }
.alert-float-ticker { position: relative; display: block; overflow: hidden; height: 19px; line-height: 19px; -webkit-mask-image: linear-gradient(to right, transparent, #000 10px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(to right, transparent, #000 10px, #000 calc(100% - 12px), transparent); }
.alert-float-track { display: inline-flex; align-items: center; height: 19px; white-space: nowrap; will-change: transform; }
.alert-float-track .cap { display: block; white-space: nowrap; line-height: 19px; }
.alert-float-track span { font-size: 13px; font-weight: 700; letter-spacing: 0.01em; }
.alert-float-track .sep { color: var(--accent-2); font-weight: 400; padding: 0 8px; }
.alert-float-track.marquee { animation: alert-marquee var(--dur, 22s) linear infinite; }
.alert-float-ticker:hover .alert-float-track.marquee { animation-play-state: paused; }
@keyframes alert-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.alert-float-chev { display: inline-flex; margin-left: auto; color: var(--muted); transition: transform 0.2s ease; }
.alert-float.is-open .alert-float-chev { transform: rotate(180deg); }
.alert-float.is-open { width: min(340px, calc(100vw - 32px)); }
/* At rest the bar stays neutral — the amber signal lives in the badge so a
   price-hike alert doesn't paint a permanent yellow outline. */
.alert-float.is-warn .alert-float-count { background: var(--warn); }
.alert-float.is-urgent .alert-float-head { border-color: var(--danger-ring); box-shadow: 0 0 0 3px var(--danger-soft), var(--float-shadow); }
.alert-float.is-urgent .alert-float-count { background: var(--danger); }
.alert-float.is-urgent .alert-float-bell { filter: saturate(1.35); }
.alert-float.is-new { animation: alert-enter 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.alert-float.is-new .alert-float-head { animation: alert-nudge 2.2s ease-in-out 0.35s 1; }
@keyframes alert-enter {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes alert-nudge {
  0%, 100% { transform: translateX(0); }
  28% { transform: translateX(-4px); }
  58% { transform: translateX(3px); }
  82% { transform: translateX(-1px); }
}
/* News-feed cascade: newly listed services fade up in sequence */
@keyframes feed-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.feed-in { animation: feed-in 0.38s cubic-bezier(0.22, 0.8, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.alert-float-body { margin-bottom: 10px; padding: 12px; background: linear-gradient(180deg, var(--accent-soft), transparent 140px), var(--panel-2); border: 1px solid var(--accent-ring); border-radius: 14px; box-shadow: 0 0 0 1px var(--accent-ring), var(--float-shadow); max-height: min(58vh, 440px); overflow-y: auto; }
.alert-float-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.alert-float-hd b { color: var(--text); font-size: 12px; letter-spacing: 0.04em; }
.alert-float .alerts-list { gap: 8px; }
.alert-float-foot { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.alert-float-pref { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-right: auto; }
.alert-float-foot .btn-sm { padding: 4px 10px; }

/* ---------- Alert cards (infographic) ---------- */
.alert-card { display: flex; gap: 12px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 12px; padding: 12px 14px; }
.alert-card.sev-info { border-left-color: var(--accent); }
.alert-card.sev-warn { border-left-color: var(--warn); }
.alert-card.sev-urgent { border-left-color: var(--danger); background: var(--danger-soft); }
.ac-stat { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(76, 141, 255, 0.12); color: var(--accent-2); }
.alert-card.sev-warn .ac-stat { background: var(--warn-soft); color: var(--warn); }
.alert-card.sev-urgent .ac-stat { background: var(--danger-soft); color: var(--danger); }
.ac-stat b { font-size: 18px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ac-stat span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px; opacity: 0.85; }
.ac-main { min-width: 0; flex: 1; }
.ac-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ac-bar { height: 5px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-bottom: 7px; }
.ac-bar i { display: block; height: 100%; border-radius: 999px; background: currentColor; color: var(--accent-2); }
.alert-card.sev-warn .ac-bar i { color: var(--warn); }
.alert-card.sev-urgent .ac-bar i { color: var(--danger); }
.ac-msg { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ac-meta { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-meta .btn-sm { text-transform: none; }

/* ---------- Renewal countdown ---------- */
.renew-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); cursor: pointer; white-space: nowrap; transition: transform 0.08s ease; }
.renew-pill:hover { transform: translateY(-1px); }
.renew-pill.tier-30 { border-color: rgba(76, 141, 255, 0.45); color: var(--accent); }
.renew-pill.tier-14 { border-color: var(--warn-ring); color: var(--warn); }
.renew-pill.tier-7 { border-color: var(--danger-ring); color: var(--warn); background: var(--danger-soft); }
.renew-pill.tier-1 { border-color: var(--danger-ring); background: var(--danger-soft); color: var(--danger); animation: renew-pulse 1.6s ease-in-out infinite; }
@keyframes renew-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- Account / settings ---------- */
.settings-stack { display: grid; gap: 16px; max-width: 640px; }
.settings-block { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.settings-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.settings-desc { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.settings-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.settings-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.plan-chip { font-weight: 700; color: var(--accent-2); }

/* ---------- Danger zone ---------- */
.panel.danger-zone {
  border-color: rgba(248, 113, 113, 0.55);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.panel.danger-zone h2 { color: var(--danger); }
.panel.danger-zone:hover {
  background: rgba(248, 113, 113, 0.06);
  border-color: rgba(248, 113, 113, 0.8);
}
.btn-danger {
  background: transparent; border: 1px solid var(--danger); color: var(--danger);
  border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.15s ease;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.14); color: var(--danger); }

canvas { width: 100%; height: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  #nav-toggle { display: inline-flex; }
  #landing-signup { display: none; }
  .app-header-actions { gap: 8px; }
  .container { width: min(1120px, 88%); }
  .hero { padding: 60px 0 50px; }
  section { padding: 50px 0; }
  .hero h1 { font-size: clamp(28px, 10.5vw, 40px); font-weight: 650; }
  .hero p { font-size: 16px; line-height: 1.7; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px 0; }
  .stat { flex: 1 1 50%; }
  .stat + .stat { border-left: 0; padding-left: 0; }
  .preview-kpis { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  html.theme-fading,
  html.theme-fading body,
  html.theme-fading *,
  html.theme-fading *::before,
  html.theme-fading *::after {
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
  }
}

/* ---------- Onboarding coach ---------- */
#coach { position: fixed; top: 320px; left: 50%; width: min(480px, calc(100vw - 48px)); transform: translateX(-50%); background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.45); box-sizing: border-box; color: var(--text); font-family: inherit; z-index: 2000; overflow-x: hidden; overflow-y: auto; animation: coach-in 0.5s cubic-bezier(0.22, 0.8, 0.32, 1) both; }
:root:not([data-theme="light"]) #coach { background: linear-gradient(180deg, #0c1330, #060b1e); border-color: #2c3a78; box-shadow: 0 26px 70px -20px rgba(0, 0, 0, 0.8); }
:root:not([data-theme="light"]) #coach .coach-body,
:root:not([data-theme="light"]) #coach .coach-count { color: #b7c3ea; }
:root:not([data-theme="light"]) #coach .btn-ghost { color: #a4b3de; border-color: #3a4786; }
@keyframes coach-in {
  from { opacity: 0; transform: translate(-50%, 16px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
#coach .coach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#coach h4 { margin: 0; font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif; font-size: 17px; font-weight: 700; color: var(--text); }
#coach .coach-body { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
#coach .coach-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
#coach .coach-dots { display: flex; gap: 6px; }
#coach .coach-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
#coach .coach-dot.on { background: var(--accent); box-shadow: 0 0 8px rgba(124, 92, 255, 0.7); }
#coach .coach-count { color: var(--muted); font-size: 12px; }
#coach .coach-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
#coach .btn-ghost { color: var(--muted); border-color: var(--border); }
#coach .btn-ghost:hover { color: var(--danger); border-color: var(--danger); }
#coach .btn-primary { box-shadow: 0 10px 24px rgba(124, 92, 255, 0.35); }
.coach-inner { height: 100%; display: flex; flex-direction: column; justify-content: center; will-change: transform, opacity; }
.coach-inner.coach-out-left { animation: coach-slide-left 0.23s ease-in forwards; }
.coach-inner.coach-in { animation: coach-slide-right 0.3s cubic-bezier(0.22, 0.8, 0.32, 1) both; }
.coach-inner.coach-out-right { animation: coach-back-out 0.23s ease-in forwards; }
.coach-inner.coach-in-left { animation: coach-back-in 0.3s cubic-bezier(0.22, 0.8, 0.32, 1) both; }
#coach.coach-out { animation: coach-out 0.26s ease forwards; }
@keyframes coach-slide-left {
  to { opacity: 0; transform: translateX(-46px); }
}
@keyframes coach-slide-right {
  from { opacity: 0; transform: translateX(46px); }
}
@keyframes coach-back-out {
  to { opacity: 0; transform: translateX(46px); }
}
@keyframes coach-back-in {
  from { opacity: 0; transform: translateX(-46px); }
}
@keyframes coach-out {
  to { opacity: 0; transform: translate(-50%, 14px) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  #coach, .coach-inner.coach-out-left, .coach-inner.coach-in, .coach-inner.coach-out-right, .coach-inner.coach-in-left, #coach.coach-out { animation: none; }
}

/* ---------- Edit modal keep switch ---------- */
#edit-modal .keep-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
#edit-modal .keep-row > span { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
#edit-modal .keep-row .toggle { display: inline-block; width: 40px; height: 22px; flex: 0 0 auto; margin: 0; font-size: inherit; color: inherit; }
#edit-modal .keep-row .toggle input:checked + .slider::before { transform: translateX(18px); }

@keyframes feemend-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow,
.hero h1,
.hero p,
.hero .hero-actions,
.hero .hero-trust,
.hero .hero-stats,
.hero .hero-preview {
  animation: feemend-fade-up 0.6s ease-out both;
}
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero p { animation-delay: 0.2s; }
.hero .hero-actions { animation-delay: 0.28s; }
.hero .hero-trust { animation-delay: 0.34s; }
.hero .hero-stats { animation-delay: 0.42s; }
.hero .hero-preview { animation-delay: 0.5s; }

.hero-preview { transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.35s ease, border-color 0.35s ease; }
.hero-preview:hover { transform: translateY(-6px); box-shadow: 0 40px 80px -38px rgba(0, 0, 0, 0.55); }

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow,
  .hero h1,
  .hero p,
  .hero .hero-actions,
  .hero .hero-trust,
  .hero .hero-stats,
  .hero .hero-preview {
    animation: none;
  }
}

.warn-alert { border-color: var(--warn-ring); background: var(--warn-faint), var(--panel); }
.spend-nudge { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--warn-faint); border: 1px solid var(--warn-ring); font-size: 13px; color: var(--text); line-height: 1.5; }

.report-body { background: var(--bg); color: var(--text); }
.report-shell { max-width: 880px; margin: 0 auto; padding: 28px 18px 60px; }
.report-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.report-head .brand-logo { height: 26px; }
.report-tag { background: rgba(76, 141, 255, 0.14); color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.report-region { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.report-main .report-hero h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; font-family: "Bricolage Grotesque", "Segoe UI", sans-serif; }
.report-sub { color: var(--muted); margin: 0 0 22px; max-width: 640px; font-size: 15px; }
.report-save { margin-top: 20px; padding: 18px 22px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.report-save .report-save-label { font-size: 13px; font-weight: 600; opacity: 0.85; }
.report-save b { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.report-save .btn { background: #fff; color: var(--accent); border: 0; }
.report-save .btn:hover { transform: translateY(-1px); }
.report-section { margin-top: 30px; }
.report-section h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 12px; font-family: "Bricolage Grotesque", "Segoe UI", sans-serif; }
.report-rows { display: flex; flex-direction: column; gap: 8px; }
.report-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.report-row .r-name { font-weight: 700; flex: 0 0 auto; }
.report-row .r-meta { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.report-row .r-price { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-row .r-slash { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.report-row.r-waste { border-color: var(--warn-ring); }
.report-row.r-waste .r-price { color: var(--warn); }
.report-row .hike-price { color: var(--warn); }
.report-empty { color: var(--muted); font-size: 14px; background: var(--panel); border: 1px dashed var(--border); border-radius: 12px; padding: 16px; }
.report-share { margin-top: 40px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; text-align: center; background: var(--panel); }
.report-share-title { font-size: 15px; font-weight: 700; }
.share-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.share-row .btn { text-decoration: none; display: inline-block; font-size: 14px; padding: 10px 18px; }
.report-footer-note { font-size: 12px; color: var(--muted); margin: 18px 0 0; }

.coach-fab { position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 12px 30px rgba(76, 92, 255, 0.45); z-index: 96; transition: transform 0.2s ease, opacity 0.2s ease; }
.coach-fab:hover { transform: translateY(-2px) scale(1.04); }
.coach-fab.coach-hidden { transform: scale(0); opacity: 0; pointer-events: none; }
.coach-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #1a1204; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.coach-panel { position: fixed; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px)); background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 80px rgba(10, 15, 40, 0.45); z-index: 97; display: flex; flex-direction: column; overflow: hidden; transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform 0.22s ease, opacity 0.22s ease; }
.coach-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.coach-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.coach-title { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; font-family: "Bricolage Grotesque", "Segoe UI", sans-serif; }
.coach-status { font-size: 12px; color: var(--muted); }
.coach-body { flex: 1; overflow-y: auto; padding: 16px 14px 6px; display: flex; flex-direction: column; gap: 10px; }
.coach-msg { display: flex; flex-direction: column; max-width: 86%; }
.coach-user { align-self: flex-end; align-items: flex-end; }
.coach-ai { align-self: flex-start; align-items: flex-start; }
.coach-txt { padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); }
.coach-user .coach-txt { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; border-bottom-right-radius: 4px; }
.coach-ai .coach-txt { border-bottom-left-radius: 4px; }
.coach-meta { font-size: 11px; color: var(--muted); margin-top: 4px; padding-left: 4px; }
.coach-typing { display: flex; gap: 4px; padding: 13px 15px; }
.coach-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: coach-blink 1.2s infinite ease-in-out; }
.coach-typing span:nth-child(2) { animation-delay: 0.18s; }
.coach-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes coach-blink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.coach-chips { display: flex; gap: 8px; padding: 8px 12px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.coach-chip { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.coach-chip:hover { border-color: var(--accent); color: var(--text); }
.coach-input-row { display: flex; gap: 8px; padding: 10px 12px 12px; }
.coach-input-row input { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; }
.coach-input-row input:focus { outline: none; border-color: var(--accent); }
.coach-send { padding: 10px 16px; font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .coach-fab, .coach-panel { transition: none; }
  .coach-typing span { animation: none; opacity: 0.5; }
}

.renew-check { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 18px; font-size: 13.5px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.renew-check input { margin-top: 2px; accent-color: var(--accent); width: 15px; height: 15px; flex: 0 0 auto; }
.renew-check input:checked ~ span { color: var(--text); }
.renew-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.go-pro-card { position: fixed; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: var(--shadow); cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 700; z-index: 60; transition: transform 0.15s ease, filter 0.15s ease; }
.go-pro-card:hover { transform: translateY(-1px); filter: brightness(1.06); }
.go-pro-icon { display: inline-flex; }
.pro-features { list-style: none; margin: 0 0 16px; padding: 0; }
.pro-features li { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.pro-features li::before { content: "\2713"; color: var(--accent); font-weight: 800; }
.promo-note { font-size: 13px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
@media (max-width: 640px) {
  .go-pro-card { left: 12px; bottom: 12px; font-size: 12.5px; padding: 10px 14px; }
  .alert-float { right: 20px; bottom: 104px; width: min(170px, calc(100vw - 28px)); }
}
