/* ============================================================================
   Command Fleet — SaaS marketing + account site.

   Dark, local-first product feel, drawn from the desktop app's design tokens
   (indigo accent, Inter, rounded surfaces). Built to be light and fast: no
   build step, no JS framework, system-driven layout, GPU-friendly effects only.

   The markup is driven by app.js, which toggles .hidden / .active and the
   .badge premium|free classes and reads element IDs. Those hooks must stay
   intact — restyle freely, but don't rename them.
   ========================================================================== */

:root {
  --bg-0: #070a12;
  --bg-1: #0a0f1c;
  --surface: rgba(255, 255, 255, 0.024);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2fb;
  --muted: #9aa7c4;
  --faint: #6b7795;
  --brand: #4f7bff;
  --brand-2: #86a8ff;
  --brand-3: #7c5cff;
  --brand-ink: #fff;
  --good: #46d39a;
  --warn: #e0a94a;
  --review: #5a9bd4;
  --bad: #fb7185;
  --radius: 18px;
  --radius-sm: 11px;
  --ring: 0 0 0 3px rgba(79, 123, 255, 0.32);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
::selection { background: rgba(79, 123, 255, 0.32); color: #fff; }
:root { accent-color: var(--brand); scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); background-clip: content-box; }

:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline-offset: 3px; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg-0);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A single fixed, GPU-composited gradient layer. Cheaper than
   `background-attachment: fixed` (which repaints on every scroll) and keeps the
   page fast on long scrolls. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1100px 620px at 8% -10%, rgba(79, 123, 255, 0.20), transparent 60%),
    radial-gradient(900px 600px at 96% -4%, rgba(124, 92, 255, 0.16), transparent 58%),
    radial-gradient(1200px 760px at 50% 118%, rgba(79, 123, 255, 0.08), transparent 60%);
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.grad {
  background: linear-gradient(100deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* =============================== top bar ================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-0) 70%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: none;
}
.brand-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(79, 123, 255, 0.30), rgba(79, 123, 255, 0.08));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand-logo.sm { width: 30px; height: 30px; border-radius: 9px; }
.brand-name { font-size: 16px; }

.nav {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* logged-in / logged-out visibility (driven by body[data-auth]) */
body[data-auth="out"] .only-in { display: none !important; }
body[data-auth="in"] .only-out { display: none !important; }
body[data-auth="in"] .nav { display: none; }

/* =============================== buttons ================================ */
.primary {
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: var(--brand-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 11px 18px;
  font-size: 14px;
  box-shadow: 0 12px 26px -12px rgba(79, 123, 255, 0.85);
  transition: transform 0.15s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}
.primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 18px 34px -12px rgba(79, 123, 255, 0.95); }
.primary:active { transform: translateY(0); }
.primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
.primary.sm { padding: 8px 15px; font-size: 13px; border-radius: 10px; }
.primary.lg { padding: 14px 26px; font-size: 15px; }
.primary.block { display: block; width: 100%; }

.ghost {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 8px 15px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.15s var(--ease);
}
.ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24); }
.ghost.lg {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

/* =============================== layout ================================= */
main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) 40px;
}
.view { width: 100%; }

.section {
  padding: clamp(56px, 9vw, 110px) 0 0;
}
.section-head {
  max-width: 640px;
  margin: 0 auto clamp(34px, 5vw, 56px);
  text-align: center;
}
.kicker {
  display: inline-block;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: clamp(15px, 1.6vw, 17px); }

/* ================================ hero ================================== */
.hero-wrap {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-top: clamp(20px, 4vw, 48px);
}
.hero-copy { animation: rise 0.6s var(--ease) both; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(70, 211, 154, 0.18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(70, 211, 154, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(70, 211, 154, 0); }
}
.hero-copy h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 15ch;
}
.tagline { font-size: clamp(16px, 2vw, 20px); color: var(--text); font-weight: 500; max-width: 40ch; }
.blurb { color: var(--muted); margin-top: 14px; max-width: 48ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-meta { color: var(--faint); font-size: 13px; margin-top: 16px; }

.agent-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 28px; }
.chips-label { color: var(--faint); font-size: 12.5px; font-weight: 600; margin-right: 2px; }
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }

/* ---- real app screenshots ---- */
.hero-mock { position: relative; animation: rise 0.6s var(--ease) 0.1s both; }
.showcase-mock { position: relative; }
.mock-glow {
  position: absolute;
  inset: -8% -4% -12%;
  z-index: -1;
  background: radial-gradient(60% 55% at 60% 30%, rgba(79, 123, 255, 0.28), transparent 70%);
  filter: blur(22px);
}
.mock-glow.soft { background: radial-gradient(60% 55% at 42% 42%, rgba(124, 92, 255, 0.22), transparent 70%); }
.app-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

/* =============================== trust bar ============================== */
.trustbar {
  margin-top: clamp(34px, 6vw, 64px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px clamp(20px, 4vw, 44px);
  padding: 20px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}
.ti-ico { width: 18px; height: 18px; color: var(--brand-2); flex: none; }

/* ============================== features =============================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 50px -28px rgba(79, 123, 255, 0.5);
}
.f-ico {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(79, 123, 255, 0.24), rgba(124, 92, 255, 0.08));
  border: 1px solid var(--line-strong);
  color: var(--brand-2);
  margin-bottom: 16px;
}
.f-ico svg { width: 21px; height: 21px; }
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ============================= how it works ============================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-n {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 10px 22px -10px rgba(79, 123, 255, 0.8);
  margin-bottom: 16px;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 14px; }

/* =============================== showcase ============================== */
.showcase {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.showcase-copy { max-width: 44ch; }
.showcase-copy .kicker { margin-bottom: 12px; }
.showcase-copy h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.showcase-copy > p { color: var(--muted); margin-top: 14px; font-size: 16px; }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 11px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
  font-size: 14.5px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386a8ff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat,
    rgba(79, 123, 255, 0.16);
  border: 1px solid rgba(79, 123, 255, 0.34);
}
.check-list code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
}

/* =============================== pricing =============================== */
.billing-toggle {
  display: inline-flex;
  gap: 4px;
  margin: -18px auto clamp(30px, 4vw, 44px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  width: max-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.bt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.bt:hover { color: var(--text); }
.bt.active {
  background: linear-gradient(180deg, var(--brand), #3a63d8);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(79, 123, 255, 0.8);
}
.bt .save {
  font-size: 10.5px; font-weight: 700;
  color: var(--good);
  background: rgba(70, 211, 154, 0.16);
  padding: 2px 7px; border-radius: 999px;
}
.bt.active .save { color: #eafff5; background: rgba(255, 255, 255, 0.18); }

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  gap: 18px;
  justify-content: center;
  align-items: start;
}
.plan {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.plan.featured {
  border-color: rgba(79, 123, 255, 0.5);
  box-shadow: 0 30px 70px -34px rgba(79, 123, 255, 0.6);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(79, 123, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014));
}
.plan-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 22px -10px rgba(79, 123, 255, 0.9);
}
.plan-head h3 { font-size: 19px; font-weight: 800; }
.plan-for { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 4px; }
.plan-price .amount { font-size: 44px; font-weight: 900; letter-spacing: -0.04em; }
.plan-price .per { color: var(--muted); font-size: 14px; font-weight: 500; }
.plan-note { color: var(--faint); font-size: 12.5px; min-height: 1.2em; }
.plan .primary.block { margin: 18px 0 22px; }
.plan-feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.plan-feats li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: 14px;
}
.plan-feats li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386a8ff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat,
    rgba(79, 123, 255, 0.14);
}
.plan-feats.compact { margin: 16px 0 18px; gap: 9px; }
.plan-feats.compact li { font-size: 13.5px; }
.price-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 28px; }

/* ================================= FAQ ================================= */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.faq details[open] { border-color: var(--line-strong); background: var(--surface-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 20px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  margin-left: auto;
  width: 10px; height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex: none;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); font-size: 14.5px; }

/* ============================= final CTA =============================== */
.cta-final {
  margin-top: clamp(64px, 9vw, 120px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(34px, 5vw, 56px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(70% 120% at 0% 0%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(70% 120% at 100% 100%, rgba(79, 123, 255, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
}
.cta-final-copy h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; max-width: 16ch; }
.cta-final-copy > p { color: var(--muted); margin-top: 14px; font-size: 16px; max-width: 42ch; }

/* ============================== cards ================================== */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.016));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-card {
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(79, 123, 255, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.016));
}
.auth-card-head { margin-bottom: 20px; }
.auth-card-head h2 { font-size: 22px; margin-bottom: 4px; }

/* logged-in / logged-out swap inside the auth card */
.signed-in-panel { display: none; text-align: center; padding: 8px 4px; }
body[data-auth="in"] .auth-card .auth-form-wrap { display: none; }
body[data-auth="in"] .auth-card .signed-in-panel { display: block; }
.si-check {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin: 8px auto 16px;
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(70, 211, 154, 0.24), rgba(70, 211, 154, 0.06));
  border: 1px solid rgba(70, 211, 154, 0.4);
  color: var(--good);
}
.si-check svg { width: 26px; height: 26px; }
.signed-in-panel h2 { font-size: 21px; margin-bottom: 6px; }
.signed-in-panel .primary { margin-top: 20px; }

/* ---- tabs ---- */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  padding: 10px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(180deg, var(--brand), #3a63d8);
  color: var(--brand-ink);
  box-shadow: 0 6px 16px -6px rgba(79, 123, 255, 0.7);
}

/* ---- forms ---- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 16px 0 7px; }
.field { position: relative; display: flex; align-items: center; }
.field-icon { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--faint); pointer-events: none; transition: color 0.16s var(--ease); }
input {
  width: 100%;
  padding: 12px 13px 12px 40px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit; font-size: 15px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}
input::placeholder { color: var(--faint); }
input:hover { border-color: rgba(255, 255, 255, 0.2); }
input:focus { outline: none; border-color: var(--brand); background: rgba(0, 0, 0, 0.4); box-shadow: var(--ring); }
.field:focus-within .field-icon { color: var(--brand-2); }

#submit-btn { margin-top: 22px; }

/* Kill the browser's autofill tint. WebKit and standard pseudo-classes MUST
   stay in separate rules — an engine that doesn't know one selector throws out
   the whole comma list. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: inset 0 0 0 100px #0a0e18;
  box-shadow: inset 0 0 0 100px #0a0e18;
  caret-color: var(--text);
  border-color: var(--line-strong);
  transition: background-color 100000s ease-in-out 0s, border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
input:-webkit-autofill:focus {
  -webkit-box-shadow: inset 0 0 0 100px #0a0e18, var(--ring);
  box-shadow: inset 0 0 0 100px #0a0e18, var(--ring);
  border-color: var(--brand);
}
input:autofill,
input:autofill:hover,
input:autofill:focus,
input:autofill:active {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  box-shadow: inset 0 0 0 100px #0a0e18;
  caret-color: var(--text);
  border-color: var(--line-strong);
  transition: background-color 100000s ease-in-out 0s, border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
input:autofill:focus { box-shadow: inset 0 0 0 100px #0a0e18, var(--ring); border-color: var(--brand); }

.error { color: var(--bad); font-size: 13px; margin: 12px 0 0; min-height: 1em; font-weight: 500; }
.auth-foot { margin: 18px 0 0; text-align: center; }

/* ============================== account =============================== */
.account-card { max-width: 560px; margin: clamp(20px, 5vw, 56px) auto 0; animation: rise 0.5s var(--ease) both; }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar {
  flex: none;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(79, 123, 255, 0.26), rgba(79, 123, 255, 0.07));
  border: 1px solid var(--line-strong);
  color: var(--brand-2);
}
.avatar svg { width: 24px; height: 24px; }
.account-head h2 { font-size: 21px; }
.account-head .muted { margin-top: 2px; }

.kv {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px 16px;
  align-items: center;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kv dt { color: var(--faint); font-size: 13px; font-weight: 600; }
.kv dd { margin: 0; font-size: 15px; word-break: break-all; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.premium { background: rgba(70, 211, 154, 0.14); color: var(--good); border: 1px solid rgba(70, 211, 154, 0.4); }
.badge.free { background: rgba(154, 167, 196, 0.12); color: var(--muted); border: 1px solid var(--line-strong); }

.download-block, .upgrade-block { margin-top: 22px; }
.download-head, .upgrade-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.download-icon, .upgrade-icon {
  flex: none;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(79, 123, 255, 0.24), rgba(79, 123, 255, 0.06));
  border: 1px solid var(--line-strong);
  color: var(--brand-2);
}
.download-icon svg, .upgrade-icon svg { width: 21px; height: 21px; }
.download-block h3, .upgrade-block h3 { font-size: 17px; margin-bottom: 4px; }
.upgrade-block {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.status { margin-top: 12px; min-height: 1em; }

/* ============================== spinner =============================== */
#loading-view { display: flex; justify-content: center; padding: 110px 0; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* =============================== footer =============================== */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px clamp(16px, 4vw, 40px);
  margin-top: 40px;
}
.foot-top {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.foot-links { display: flex; gap: 6px; flex-wrap: wrap; }
.foot-links a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; transition: color 0.16s var(--ease), background 0.16s var(--ease); }
.foot-links a:hover { color: var(--text); background: var(--surface-2); }
.foot-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13px;
}

/* ============================ responsive ============================== */
@media (max-width: 980px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-mock { max-width: 560px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; }
  .cta-final { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: minmax(0, 1fr); }
  .mock-body { grid-template-columns: 120px 1fr; }
  .mock-board { grid-template-columns: repeat(2, 1fr); }
  .col-done { display: none; }
  .cta-meta { font-size: 12.5px; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
