/* ============================================================================
   Command Fleet — SaaS marketing + blog + account site.
   One design system, dark "mission-control" theme. No build step; strict CSP
   (no inline styles/scripts) — everything is class-based here, behavior in /js.
   ============================================================================ */

/* ----------------------------- design tokens ----------------------------- */
:root {
  --bg: #070a12;
  --bg-2: #0a0f1c;
  --surface: #0e1424;
  --surface-2: #121a2e;
  --surface-3: #16203a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.22);

  --text: #e9eefb;
  --text-2: #a7b3cc;
  --text-3: #6f7d99;

  --blue: #4b8bff;
  --blue-2: #6aa6ff;
  --cyan: #34e0e6;
  --violet: #9a7bff;
  --green: #34d399;
  --red: #fb6f6f;

  --accent: #4b8bff;
  --accent-soft: rgba(75, 139, 255, 0.14);
  --grad: linear-gradient(120deg, #4b8bff 0%, #34e0e6 100%);
  --grad-soft: linear-gradient(120deg, rgba(75, 139, 255, 0.18), rgba(52, 224, 230, 0.14));
  --grad-text: linear-gradient(110deg, #7cb0ff 0%, #5be0e6 60%, #9a7bff 100%);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 0 1px rgba(75, 139, 255, 0.25), 0 22px 60px -20px rgba(33, 92, 214, 0.6);

  --maxw: 1440px;
  --gap: clamp(1rem, 3vw, 2rem);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Consolas", monospace;
}

/* ------------------------------- base ------------------------------------ */
body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(75, 139, 255, 0.12), transparent 60%),
    radial-gradient(900px 560px at 8% 0%, rgba(52, 224, 230, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 700; }
p { margin: 0 0 1rem; color: var(--text-2); }
a { color: var(--blue-2); text-decoration: none; }
a:hover { color: #fff; }
ul { color: var(--text-2); }
strong { color: var(--text); font-weight: 700; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.4em;
  color: #cfe0ff;
}

::selection { background: rgba(75, 139, 255, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------ layout ----------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }
/* Fixed gap between the sticky header and the first block on every page
   (top only — spacing between later sections is unchanged). */
#main > .section:first-child,
#main > .hero:first-child { padding-top: 60px; }
.narrow { margin-inline: auto; }
.center { text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.center .eyebrow::before { display: none; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); }
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-3); }
.section-head { max-width: 680px; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.section-head.center { text-align: center; }

/* ------------------------------ buttons ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.35rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--grad);
  color: #04101f;
  font-weight: 700;
  box-shadow: 0 10px 30px -12px rgba(75, 139, 255, 0.8);
}
.btn-primary:hover { color: #04101f; box-shadow: 0 16px 40px -12px rgba(75, 139, 255, 0.9); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-strong); color: #fff; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.02rem; }
.btn-sm { padding: 0.6rem 1rem; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.center .btn-row, .btn-row.center { justify-content: center; }

/* ------------------------------ badges ----------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.pill-accent { border-color: rgba(75, 139, 255, 0.4); color: #bcd4ff; background: var(--accent-soft); }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.62rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
}

/* ------------------------------- header ---------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: 67px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-size: 1.12rem; }
/* Wrapper that holds nav-links + nav-actions. On desktop it's transparent to
   layout (display:contents), so the flex row is identical to having them as
   direct children; on mobile it becomes the single dropdown panel. */
.nav-menu { display: contents; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; margin-left: 0.5rem; }
.nav-links a {
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.nav-links a.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: #fff;
  width: 42px;
  height: 38px;
  cursor: pointer;
}
.nav-toggle svg { margin: auto; width: 20px; height: 20px; }

/* ------------------------------- hero ------------------------------------ */
.hero { position: relative; padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: center;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { margin-bottom: 1.4rem; }
.hero-meta { margin-top: 1.3rem; font-size: 0.86rem; color: var(--text-3); }
.hero-meta b { color: var(--text-2); font-weight: 600; }
.agent-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.5rem; }
.agent-chips .lbl { font-size: 0.78rem; color: var(--text-3); margin-right: 0.2rem; }
.chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

/* product frame */
.shot-frame {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.shot-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.shot-frame .bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.shot-frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3550; display: block; }
.shot-frame img { width: 100%; height: auto; }
/* Hero screenshot carousel: two stacked shots that cross-fade on an endless
   loop. aspect-ratio holds the frame height steady while the slides sit
   absolutely on top of each other. Pure CSS so it runs under the strict CSP
   (no inline scripts) on both desktop and mobile. */
.shot-carousel { position: relative; aspect-ratio: 1348 / 884; }
.shot-carousel .shot-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot-carousel .shot-slide:nth-child(1) { animation: shot-fade-a 12s infinite; }
.shot-carousel .shot-slide:nth-child(2) { animation: shot-fade-b 12s infinite; }
@keyframes shot-fade-a {
  0%, 42%  { opacity: 1; }
  50%, 92% { opacity: 0; }
  100%     { opacity: 1; }
}
@keyframes shot-fade-b {
  0%, 42%  { opacity: 0; }
  50%, 92% { opacity: 1; }
  100%     { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shot-carousel .shot-slide { animation: none; opacity: 0; }
  .shot-carousel .shot-slide:nth-child(1) { opacity: 1; }
}
.hero-mock { position: relative; }
.hero-mock .glow {
  position: absolute;
  inset: -12% -8% -18% -8%;
  background: radial-gradient(60% 60% at 60% 30%, rgba(75, 139, 255, 0.35), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

/* logos / trust strip */
.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-item { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.88rem; color: var(--text-2); }
.trust-item svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }

/* ------------------------------- cards ----------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; font-size: 0.95rem; }
.card-ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--accent-soft);
  border: 1px solid rgba(75, 139, 255, 0.3);
  margin-bottom: 1rem;
  color: var(--blue-2);
}
.card-ico svg { width: 24px; height: 24px; }
.card.feature-lead { grid-column: span 2; }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; padding: 1.2rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat .num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.stat .lbl { font-size: 0.84rem; color: var(--text-3); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; counter-reset: step; }
.step { position: relative; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.step .n {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #04101f;
  font-weight: 800;
  margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.9rem; margin: 0; }

/* split feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split.reverse .split-media { order: -1; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.7rem; }
.check-list li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.96rem; color: var(--text-2); }
.check-list li::before {
  content: "";
  flex: none;
  margin-top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(75, 139, 255, 0.5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236aa6ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* callout band */
.band {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(90% 130% at 50% -25%, rgba(75, 139, 255, 0.22), transparent 60%),
    var(--surface);
  padding: clamp(2.25rem, 5vw, 3.75rem);
  text-align: center;
}
.band h2 { margin-bottom: 0.6rem; }
.band .lead { max-width: 46ch; margin: 0 auto; }
.band .btn-row { margin-top: 1.7rem; }

/* ------------------------ positioning map (SVG) -------------------------- */
.mapwrap {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: clamp(1rem, 3vw, 1.8rem);
  box-shadow: var(--shadow);
}
.mapwrap svg { width: 100%; height: auto; }

/* ------------------------------ compare ---------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 640px; }
table.cmp th, table.cmp td { padding: 0.95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
table.cmp thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; }
table.cmp tbody td { color: var(--text-2); }
table.cmp tbody td:first-child { color: var(--text); font-weight: 500; }
table.cmp .col-us { background: var(--accent-soft); color: #fff; font-weight: 600; }
table.cmp thead .col-us { color: #bcd4ff; }
table.cmp tr:last-child td { border-bottom: none; }
.yes { color: var(--green); font-weight: 700; }
.no { color: var(--text-3); }
.partial { color: var(--blue); }

/* ------------------------------ pricing ---------------------------------- */
.bill-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  margin: 0 auto 2.2rem;
}
.bill-toggle button {
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.bill-toggle button.active { background: var(--grad); color: #04101f; }
.save { font-size: 0.72rem; padding: 0.15rem 0.45rem; border-radius: var(--r-pill); background: rgba(52, 211, 153, 0.18); color: var(--green); font-weight: 700; }
.bill-toggle button.active .save { background: rgba(4,16,31,0.22); color: #04101f; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plans-2 { grid-template-columns: repeat(2, 1fr); max-width: 800px; margin-inline: auto; }
.plan {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 1.7rem;
}
.plan.featured {
  border-color: rgba(75, 139, 255, 0.55);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(75, 139, 255, 0.18), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-glow);
  position: relative;
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.3rem 0.85rem; border-radius: var(--r-pill);
  background: var(--grad); color: #04101f;
}
.plan h3 { font-size: 1.25rem; }
.plan-for { font-size: 0.86rem; color: var(--text-3); margin-bottom: 1rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 0.2rem; }
.plan-price .amt { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.plan-price .per { font-size: 0.9rem; color: var(--text-3); }
.plan-note { font-size: 0.8rem; color: var(--text-3); min-height: 1.1rem; margin-bottom: 1.2rem; }
.plan .btn { margin-bottom: 1.3rem; }
.plan-feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.plan-feats li { display: flex; gap: 0.55rem; font-size: 0.9rem; color: var(--text-2); align-items: flex-start; }
.plan-feats li svg { width: 17px; height: 17px; color: var(--green); flex: none; margin-top: 2px; }

/* ------------------------------- FAQ ------------------------------------- */
.faq { display: grid; gap: 0.7rem; margin-inline: auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0 1.2rem;
  overflow: hidden;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 0;
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1.1rem; font-size: 0.94rem; }

/* ------------------------------- blog ------------------------------------ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { border-color: rgba(75, 139, 255, 0.35); transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--grad-soft);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card:hover .thumb img { transform: scale(1.03); }
.post-card .thumb img { transition: transform 0.3s ease; }
.post-card .thumb svg { width: 46px; height: 46px; color: var(--blue-2); opacity: 0.8; }
.post-card .body { padding: 1.35rem; display: flex; flex-direction: column; flex: 1; gap: 0.55rem; }
/* card category: a lightweight accent label, not a boxed pill (blog + compare cards) */
.post-card .tag, .card .tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--blue-2);
}
.post-card .tag::before, .card .tag::before {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
/* .card isn't a flex column with gap like .post-card .body, so space the label manually */
.card .tag { margin-bottom: 0.8rem; }
.post-card h3 { font-size: 1.1rem; margin: 0; line-height: 1.3; }
.post-card h3 a { color: #fff; transition: color 0.15s ease; }
.post-card:hover h3 a { color: var(--blue-2); }
.post-card .excerpt { font-size: 0.9rem; line-height: 1.55; color: var(--text-2); flex: 1; margin: 0; }
.post-meta { display: flex; gap: 0.5rem; align-items: center; font-size: 0.78rem; color: var(--text-3); margin-top: 0.9rem; }
.blog-more { margin-top: 2rem; }
.cat-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }
.cat-btn {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cat-btn:hover { color: #fff; border-color: var(--line-strong); }
.cat-btn.active { background: var(--grad); color: #04101f; border-color: transparent; }

/* article */
.article { margin-inline: auto; }
.article-head { margin-bottom: 2.2rem; }
.article-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.article-head .post-meta { justify-content: flex-start; font-size: 0.86rem; }
.article-body { font-size: 1.06rem; line-height: 1.8; color: var(--text-2); }
.article-body h2 { font-size: 1.6rem; margin: 2.4rem 0 1rem; color: #fff; }
.article-body h3 { font-size: 1.25rem; margin: 1.8rem 0 0.8rem; color: #fff; }
.article-body p { margin: 0 0 1.2rem; }
.article-body ul, .article-body ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
  margin: 1.6rem 0;
  padding: 0.4rem 1.3rem;
  border-left: 3px solid var(--blue);
  color: var(--text);
  font-style: italic;
}
.article-body .callout {
  margin: 1.8rem 0;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--accent-soft);
}
.article-body .callout p:last-child { margin: 0; }
.article-cta {
  margin-top: 2.5rem;
  padding: 1.8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 90% -10%, rgba(75, 139, 255, 0.2), transparent 60%),
    var(--surface);
  text-align: center;
}

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.8rem; color: var(--text-3); margin-bottom: 1.1rem; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs .sep { color: var(--text-3); }
.crumbs [aria-current] { color: var(--text); }

/* article hero image */
.article-hero {
  margin: 0.3rem 0 2rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.article-hero img { display: block; width: 100%; height: auto; }
.article-hero figcaption { padding: 0.7rem 1rem; font-size: 0.8rem; color: var(--text-3); border-top: 1px solid var(--line); }

/* related reading */
.related { margin-top: 2.6rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.related h2 { font-size: 1.15rem; margin-bottom: 1rem; color: #fff; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.related-list a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.related-list a:hover { border-color: var(--line-2); transform: translateY(-2px); }
.related-list .r-tag { font-size: 0.72rem; font-weight: 600; color: var(--blue-2); text-transform: uppercase; letter-spacing: 0.04em; }
.related-list .r-title { display: block; margin-top: 0.3rem; color: #fff; font-weight: 600; font-size: 0.96rem; line-height: 1.3; }

/* table of contents (in-article index) */
.toc {
  margin: 1.6rem 0 2.2rem;
  padding: 1.15rem 1.5rem 1.3rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(75, 139, 255, 0.07), transparent 55%),
    var(--surface);
}
.toc-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin: 0 0 0.7rem; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2.4rem; font-size: 0.95rem; }
.toc li { margin: 0 0 0.45rem; break-inside: avoid; color: var(--text-3); }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.article-body h2[id], .article-body h3[id] { scroll-margin-top: 84px; }

/* ------------------------------- forms ----------------------------------- */
.auth-wrap { display: grid; place-items: center; min-height: 70vh; padding-block: 3rem; }
.auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; }
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.input, input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: #fff;
}
.input:focus, input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, input::placeholder { color: var(--text-3); }
/* Kill the browser's yellow autofill background AND its focus highlight/glow.
   The UA autofill style is high-priority, so these need !important to win.
   WebKit/Blink (Chrome, Edge) use :-webkit-autofill; kept in their own block so
   a browser that doesn't grok the prefix doesn't drop the standard rule below. */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:active,
.input:-webkit-autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:active,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus,
select:-webkit-autofill {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  border: 1px solid var(--line-2) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset !important;
  box-shadow: 0 0 0 1000px var(--bg-2) inset !important;
  transition: background-color 9999s ease-in-out 0s;
}
.input:-webkit-autofill:focus,
input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus {
  border-color: var(--blue) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset, 0 0 0 3px var(--accent-soft) !important;
  box-shadow: 0 0 0 1000px var(--bg-2) inset, 0 0 0 3px var(--accent-soft) !important;
}
/* Standard pseudo, separate block for Firefox and other non-WebKit engines. */
.input:autofill,
input:autofill,
textarea:autofill {
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 0 0 1000px var(--bg-2) inset !important;
  border: 1px solid var(--line-2) !important;
}
.form-error { color: var(--red); font-size: 0.86rem; min-height: 1rem; margin: 0.2rem 0 0.6rem; }
.form-note { font-size: 0.82rem; color: var(--text-3); text-align: center; margin-top: 1rem; }
.tabs { display: flex; gap: 0.3rem; padding: 0.3rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); margin-bottom: 1.4rem; }
.tabs a, .tabs button { flex: 1; text-align: center; padding: 0.55rem; border-radius: var(--r-pill); font-weight: 600; font-size: 0.88rem; color: var(--text-2); border: none; background: transparent; cursor: pointer; font-family: inherit; }
.tabs a.active, .tabs button.active { background: var(--grad); color: #04101f; }

/* checkout */
/* Two plan cards side by side (reuses the .plan pricing-card styling). */
.checkout-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 820px; margin-inline: auto; align-items: stretch; }
.checkout-plans .plan .btn { margin-top: auto; }
/* Lift the whole card on hover: rise, deepen the shadow, brighten the border. */
.checkout-plans .plan { transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease; }
.checkout-plans .plan:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.7); }
.checkout-plans .plan.featured:hover { border-color: rgba(75, 139, 255, 0.85); box-shadow: var(--shadow-glow), 0 26px 55px -20px rgba(33, 92, 214, 0.5); }
@media (prefers-reduced-motion: reduce) { .checkout-plans .plan { transition: box-shadow 0.25s ease, border-color 0.2s ease; } .checkout-plans .plan:hover { transform: none; } }
/* Transient confirming / success states, shown as a centered single card. */
.state-card { max-width: 480px; margin-inline: auto; text-align: center; border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--surface); padding: 1.9rem; box-shadow: var(--shadow); }
/* The success badge is a fixed-width block, so text-align:center can't center it
   (only inline content centers). Center it horizontally like the spinner above. */
.state-card .card-ico { margin-inline: auto; }
#co-error { text-align: center; margin-top: 1rem; }
.form-error.is-info { color: var(--text-3); }
.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 820px;
  margin: 0 auto 1.4rem;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--r);
  padding: 0.85rem 1.1rem;
  font-size: 0.86rem;
}
.demo-banner svg { flex: none; width: 16px; height: 16px; color: var(--text-3); }

/* account */
.acct-card { max-width: 560px; margin-inline: auto; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); padding: 2rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.5rem; margin: 1.4rem 0; }
.kv dt { color: var(--text-3); font-size: 0.9rem; }
.kv dd { margin: 0; color: #fff; font-weight: 500; }
.badge { display: inline-block; padding: 0.25rem 0.7rem; border-radius: var(--r-pill); font-size: 0.78rem; font-weight: 700; }
.badge.premium { background: rgba(52, 211, 153, 0.18); color: var(--green); }
.badge.free { background: rgba(75, 139, 255, 0.16); color: var(--blue); }
.dl-block { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); padding: 1.4rem; margin-top: 1.2rem; }

/* ------------------------------ footer ----------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 3rem 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer .brand { margin-bottom: 0.8rem; }
.footer-about { font-size: 0.9rem; color: var(--text-3); max-width: 32ch; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; margin-bottom: 0.9rem; }
.footer-col a { display: block; color: var(--text-2); font-size: 0.9rem; padding: 0.28rem 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--text-3); }
.footer-bottom a { color: var(--text-3); }

/* ----------------------------- animation --------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
/* If scripting is unavailable, never leave reveal content hidden. */
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ----------------------------- responsive -------------------------------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mock { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .plans { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  /* When stacked, give the featured card's top badge room to clear the card above. */
  .plans .plan.featured { margin-top: 0.9rem; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-menu { display: none; }
  .nav-toggle { display: grid; }
  .nav.open .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.7rem 0.8rem 0.9rem;
    gap: 0.1rem;
  }
  .nav.open .nav-menu .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    margin-left: 0;
  }
  .nav.open .nav-menu .nav-links a { padding: 0.7rem 0.75rem; border-radius: var(--r-sm); }
  .nav.open .nav-menu .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
    padding-top: 0.7rem;
    border-top: 1px solid var(--line);
  }
  .nav.open .nav-menu .nav-actions .btn { width: 100%; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card.feature-lead { grid-column: span 1; }
  .steps, .stats { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-list { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  /* Footer on phones: brand + blurb centered up top, then Product and Resources
     as two opposed columns (left / right), and Company alone on its own
     centered row. */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
  .footer-grid > div:first-child { grid-column: 1 / -1; text-align: center; }
  .footer-grid > div:first-child .brand { justify-content: center; }
  .footer-about { margin-inline: auto; }
  .footer-col:nth-child(2) { text-align: left; }
  .footer-col:nth-child(3) { text-align: right; }
  .footer-col:nth-child(4) { grid-column: 1 / -1; text-align: center; }
}

/* Phone: stack CTA button groups full-width so they're clean and tappable,
   and center the footer's bottom row. */
@media (max-width: 560px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* The positioning map and build-loop diagrams carry small text labels that
   become unreadable when the SVG scales down on a phone. Keep them at a legible
   minimum width and let the panel scroll horizontally instead (contained — no
   page-level scroll), the same way wide tables behave. */
@media (max-width: 640px) {
  .mapwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mapwrap svg { min-width: 600px; }
}

/* ===================== nav account menu (signed in) ====================== */
.nav-account { position: relative; }
.acct-trigger {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.55rem 0.3rem 0.35rem;
  border-radius: var(--r-pill); border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03); color: #fff; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 0.85rem; max-width: 230px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.acct-trigger:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.acct-trigger-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; color: var(--text-2); }
.acct-caret { width: 16px; height: 16px; color: var(--text-3); flex: none; transition: transform 0.2s ease; }
.nav-account.open .acct-caret { transform: rotate(180deg); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 0.4rem; z-index: 60;
  display: none;
}
.nav-account.open .acct-menu { display: block; animation: acctMenuIn 0.15s ease; }
@keyframes acctMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.acct-menu-head { padding: 0.5rem 0.6rem 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.acct-menu-email { display: block; color: #fff; font-weight: 600; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu-sub { font-size: 0.78rem; }
.acct-menu a { display: block; padding: 0.5rem 0.6rem; border-radius: var(--r-sm); color: var(--text-2); font-size: 0.88rem; font-weight: 500; }
.acct-menu a:hover { background: var(--bg-2); color: #fff; }
.acct-menu-sep { height: 1px; background: var(--line); margin: 0.3rem 0; }

/* ========================= account dashboard ============================= */
.acct-shell { display: grid; grid-template-columns: 248px 1fr; gap: 1.6rem; align-items: start; max-width: 1000px; margin-inline: auto; }
.acct-side { position: sticky; top: 90px; display: grid; gap: 1rem; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); padding: 1.1rem; }
.acct-id { display: flex; gap: 0.7rem; align-items: center; }
.acct-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #04101f; font-weight: 800; font-size: 1.05rem; flex: none; }
.acct-avatar.sm { width: 26px; height: 26px; font-size: 0.78rem; }
.acct-id strong { display: block; font-size: 0.95rem; color: #fff; line-height: 1.25; word-break: break-word; }
.acct-id .muted { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.acct-nav { display: grid; gap: 0.15rem; }
.acct-nav a { padding: 0.6rem 0.75rem; border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; font-size: 0.9rem; }
.acct-nav a:hover { background: var(--bg-2); color: #fff; }
.acct-nav a.active { background: var(--accent-soft); color: #fff; }
.acct-main { min-width: 0; }
.acct-panel { display: none; }
.acct-panel.active { display: block; animation: acctFade 0.25s ease; }
@keyframes acctFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.acct-title { font-size: 1.55rem; margin: 0 0 0.2rem; }
.acct-subtitle { margin: 0 0 1.4rem; }

.plan-hero {
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 1.6rem; margin-bottom: 1.2rem;
  background: radial-gradient(120% 140% at 0% 0%, rgba(75, 139, 255, 0.1), transparent 55%), var(--surface);
}
.plan-hero .badge { margin-bottom: 0.8rem; }
.plan-hero h2 { font-size: 1.45rem; margin: 0 0 0.3rem; }
.plan-hero p { color: var(--text-2); margin: 0; }
.plan-hero .btn-row { margin-top: 1.3rem; }

.acct-block { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); padding: 1.5rem; margin-bottom: 1.2rem; }
.acct-block h2 { font-size: 1.15rem; margin: 0 0 0.3rem; }
.acct-block h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.acct-block > p.muted { margin-top: 0; margin-bottom: 1rem; }
.acct-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.acct-block-head h3 { margin-bottom: 0.15rem; }
.acct-block-head p { margin: 0; }
.acct-note { text-align: left; margin-top: 0.8rem; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.28rem 0.7rem; border-radius: var(--r-pill); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.active { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.pill.warn { background: rgba(75, 139, 255, 0.16); color: var(--blue); }
.pill.muted { background: var(--bg-2); color: var(--text-3); }
.pill.danger { background: rgba(251, 111, 111, 0.15); color: var(--red); }

/* billing detail rows */
.bill-rows { display: grid; gap: 0; margin: 0.4rem 0 1.2rem; }
.bill-rows .row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.bill-rows .row:last-child { border-bottom: none; }
.bill-rows .row span:first-child { color: var(--text-3); }
.bill-rows .row span:last-child { color: #fff; font-weight: 500; text-align: right; }

/* billing history table */
.table-wrap { overflow-x: auto; }
table.history { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.history th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 700; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line-2); }
table.history td { padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); color: var(--text-2); }
table.history tr:last-child td { border-bottom: none; }
.empty-state { text-align: center; color: var(--text-3); padding: 1.6rem; font-size: 0.9rem; }

/* account forms */
.acct-form { display: block; max-width: 440px; }
.acct-form .form-note, .acct-form .form-error { text-align: left; }
.field-msg { font-size: 0.84rem; margin: 0.1rem 0 0.7rem; min-height: 1rem; color: var(--text-3); }
.field-msg.ok { color: var(--green); }
.field-msg.err { color: var(--red); }

/* inline confirmation boxes */
.confirm-box { border: 1px solid rgba(75, 139, 255, 0.4); background: rgba(75, 139, 255, 0.07); border-radius: var(--r); padding: 1rem 1.1rem; margin-top: 1rem; }
.confirm-box.danger { border-color: rgba(251, 111, 111, 0.4); background: rgba(251, 111, 111, 0.07); }
.confirm-box p { margin: 0 0 0.8rem; font-size: 0.9rem; color: var(--text-2); }
.confirm-box .acct-form { margin-top: 0.5rem; }

/* danger zone */
.danger-zone { border-color: rgba(251, 111, 111, 0.3); }
.danger-zone h3 { color: var(--red); }

/* extra button variants */
.btn-secondary { background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); color: #fff; font-weight: 600; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line-strong); }
.btn-danger { background: rgba(251, 111, 111, 0.14); border-color: rgba(251, 111, 111, 0.4); color: var(--red); font-weight: 600; }
.btn-danger:hover { background: rgba(251, 111, 111, 0.22); color: #fff; }

/* toggle switch */
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; }
.toggle-row .t-label strong { display: block; color: #fff; font-size: 0.95rem; }
.toggle-row .t-label span { display: block; color: var(--text-3); font-size: 0.85rem; margin-top: 0.15rem; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; transition: background 0.2s ease, border-color 0.2s ease; }
.switch .track::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform 0.2s ease, background 0.2s ease; }
.switch input:checked + .track { background: var(--grad); border-color: transparent; }
.switch input:checked + .track::before { transform: translateX(20px); background: #04101f; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

.acct-block code { font-family: var(--mono, "JetBrains Mono", monospace); font-size: 0.82rem; color: var(--text-2); word-break: break-all; }

@media (max-width: 860px) {
  .acct-shell { grid-template-columns: 1fr; }
  .acct-side { position: static; }
  .acct-id .muted { max-width: none; }
  .acct-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 0.3rem; padding-bottom: 0.2rem; }
  .acct-nav a { white-space: nowrap; }
}

@media (max-width: 720px) {
  .nav-account { width: 100%; }
  .acct-trigger { width: 100%; max-width: none; justify-content: flex-start; }
  .acct-trigger-email { max-width: none; margin-right: auto; }
  .acct-menu { position: static; width: 100%; box-shadow: none; margin-top: 0.4rem; border-color: var(--line); }
  .nav-account.open .acct-menu { animation: none; }
}

/* receipt links inside the billing history table */
table.history td a { color: var(--blue); font-weight: 600; }
table.history td a:hover { color: #fff; text-decoration: underline; }

/* ===================== cross-section notice banner ====================== */
.notice {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text-2);
  padding: 0.85rem 1.05rem; margin-bottom: 1.2rem; font-size: 0.92rem;
}
.notice.ok { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); color: #d3f5e7; }
.notice.info { border-color: rgba(75, 139, 255, 0.4); background: var(--accent-soft); color: #cfe0ff; }
.notice.pending { border-color: rgba(75, 139, 255, 0.45); background: rgba(75, 139, 255, 0.08); color: #cfe0ff; }
/* small inline spinner for the pending state */
.notice.pending::before {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(75, 139, 255, 0.35); border-top-color: var(--blue);
  animation: cfspin 0.8s linear infinite;
}

/* ============================ modal dialog ============================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
  background: rgba(4, 8, 16, 0.72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: cffade 0.18s ease;
}
.modal-card {
  width: 100%; max-width: 440px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow);
  padding: 1.8rem; text-align: center;
  animation: cfpop 0.2s ease;
}
.modal-ico {
  display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--accent-soft); color: var(--blue);
}
.modal-ico svg { width: 24px; height: 24px; }
.modal-card h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.modal-card > p { color: var(--text-2); font-size: 0.92rem; margin: 0 0 1.3rem; line-height: 1.5; }
.modal-actions { display: grid; gap: 0.6rem; }
.modal-actions .btn { width: 100%; }
.modal-card .form-note { margin-top: 1rem; }
body.modal-open { overflow: hidden; }

/* spinner for the checkout "confirming payment" card */
.card-spinner {
  width: 40px; height: 40px; margin: 0 auto 1rem; border-radius: 50%;
  border: 3px solid var(--line-2); border-top-color: var(--blue);
  animation: cfspin 0.8s linear infinite;
}

@keyframes cfspin { to { transform: rotate(360deg); } }
@keyframes cffade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cfpop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-card { animation: none; }
  .card-spinner, .notice.pending::before { animation-duration: 1.6s; }
}

/* ===================== screenshot lightbox ====================== */
/* Click any product screenshot to expand it over a dimmed backdrop;
   click off it (or press Escape) to close. CSP-safe: the overlay is
   built and wired in js/components.js, no inline scripts/handlers. */
.shot-frame.is-zoomable { cursor: zoom-in; }
.shot-frame.is-zoomable:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(4, 8, 16, 0.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lightbox.open { display: flex; animation: cffade 0.18s ease; }
.lightbox-inner { position: relative; width: 100%; max-width: 1100px; animation: cfpop 0.2s ease; }
.lightbox-img {
  display: block; width: 100%; height: auto; max-height: 86vh; object-fit: contain;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow); cursor: default;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text);
  font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.lightbox-close:hover { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .lightbox.open, .lightbox-inner { animation: none; } }
