/* ==========================================================================
   Screen Studio Coupon — Design System
   Independent editorial site. Design tokens per build brief.
   ========================================================================== */

:root {
  --ink: #111318;
  --ink-soft: #323845;
  --muted: #667085;
  --surface: #ffffff;
  --surface-soft: #f6f7fb;
  --surface-dark: #171923;
  --line: #e5e7eb;
  --brand: #6d4aff;
  --brand-dark: #4a2bd6;
  --brand-bright: #8b6bff;
  --brand-soft: #c4b5fd;
  --accent: #d946ef;
  --black: #0a0a0c;
  --charcoal: #141418;
  --charcoal-2: #1c1c22;
  --line-dark: rgba(255, 255, 255, 0.10);
  --ink-on-dark: #f4f4f6;
  --muted-on-dark: #a3a8b4;
  --deal: #157f3b;
  --deal-soft: #ecfdf3;
  --warning: #9a6700;
  --warning-soft: #fff8db;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 18px 50px rgba(17, 19, 24, 0.10);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --article-width: 760px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { body { font-size: 16px; } }

img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); letter-spacing: -0.01em; margin-top: 2.2em; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.3rem); margin-top: 1.8em; }
p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.3em; padding-left: 1.4em; }
li { margin-bottom: 0.45em; }
a { color: var(--brand-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-dark); color: #fff; padding: 10px 18px;
  z-index: 200; border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Disclosure bar ---------- */
.disclosure-bar {
  background: var(--black);
  border-bottom: 1px solid var(--line-dark);
  color: #c8cdd8;
  font-size: 0.82rem;
  text-align: center;
  padding: 7px 16px;
  line-height: 1.4;
}
.disclosure-bar a { color: var(--brand-soft); }

/* ---------- Header (dark, matches screen.studio chrome) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 66px;
}
.site-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.06rem; color: #fff;
  text-decoration: none; letter-spacing: -0.01em; white-space: nowrap;
}
.site-logo .logo-mark {
  width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: 9px; font-size: 15px; font-weight: 800;
}
.site-logo .logo-sub { color: var(--brand-soft); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: #c4c8d2; text-decoration: none; font-weight: 600;
  font-size: 0.95rem; padding: 10px 12px; border-radius: 8px;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.main-nav a[aria-current="page"] { color: var(--brand-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; text-decoration: none; border-radius: 12px;
  padding: 12px 22px; font-size: 0.98rem; line-height: 1.2;
  min-height: 44px; border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 8px 24px rgba(109,74,255,0.35); }
.btn-primary:hover { background: var(--brand-bright); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-deal { background: var(--deal); color: #fff; }
.btn-deal:hover { background: #0e6330; color: #fff; }
.header-cta { white-space: nowrap; padding: 10px 18px; font-size: 0.9rem; }

/* Mobile menu */
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line-dark);
  border-radius: 10px; padding: 10px; cursor: pointer;
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center; color: #fff;
}
.menu-toggle svg { display: block; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--black); border-bottom: 1px solid var(--line-dark);
    padding: 10px 16px 16px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 12px; font-size: 1rem; }
  .main-nav .nav-cta { margin-top: 8px; text-align: center; background: var(--brand); color: #fff; border-radius: 12px; }
  .main-nav .nav-cta:hover { background: var(--brand-dark); color: #fff; }
}
@media (min-width: 901px) { .main-nav .nav-cta { display: none; } }

/* ---------- Hero (dark, matches screen.studio) ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 78% -20%, rgba(109, 74, 255, 0.30), transparent 62%),
    radial-gradient(760px 380px at 8% 118%, rgba(217, 70, 239, 0.14), transparent 58%),
    var(--black);
  border-bottom: 1px solid var(--line-dark);
  padding: 60px 0 54px;
  color: var(--ink-on-dark);
}
.hero .eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-soft);
  background: rgba(139, 107, 255, 0.16); border: 1px solid rgba(139, 107, 255, 0.28);
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { max-width: 820px; color: #fff; }
.hero .lede { font-size: 1.13rem; max-width: 720px; color: #c2c6d1; }
.hero .lede strong { color: #fff; }
.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.06); color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
.hero .btn-secondary:hover { border-color: var(--brand-bright); color: var(--brand-soft); }
.hero .price-check-badge { color: var(--muted-on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.price-check-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.85rem; color: var(--muted);
}
.price-check-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--deal); flex: none;
}

/* Hero with illustration */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 44px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.hero-art img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  border: 1px solid rgba(109, 74, 255, 0.14);
}

/* ---------- Hero offer card (conversion box, charcoal) ----------
   All rules scoped under .hero-offer to avoid clashing with the
   in-article .offer-card / .offer-price component defined later. */
.hero-offer { min-width: 0; }
.hero-offer .offer-card {
  position: relative;
  background: linear-gradient(160deg, var(--charcoal-2), var(--charcoal));
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 80px rgba(109, 74, 255, 0.12);
  padding: 26px 26px 22px;
  margin: 0;
  overflow: hidden;
}
.hero-offer .offer-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.hero-offer .offer-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.hero-offer .offer-badge {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--brand-soft);
  background: rgba(139, 107, 255, 0.16); border: 1px solid rgba(139, 107, 255, 0.28);
  padding: 5px 11px; border-radius: 999px;
}
.hero-offer .offer-save {
  font-size: 0.8rem; font-weight: 800; color: #4ade80;
  background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(74, 222, 128, 0.28);
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.hero-offer .offer-plan {
  margin: 0 0 2px; font-size: 0.92rem; font-weight: 600; color: var(--muted-on-dark);
}
.hero-offer .offer-price {
  margin: 0; display: flex; align-items: baseline; gap: 4px;
  font-size: 1rem; font-weight: 400; color: inherit; letter-spacing: normal;
}
.hero-offer .offer-amount {
  font-size: 3.1rem; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.02em; color: #fff;
}
.hero-offer .offer-per { font-size: 1.05rem; font-weight: 600; color: var(--muted-on-dark); }
.hero-offer .offer-billed { margin: 4px 0 0; font-size: 0.88rem; color: var(--muted-on-dark); }
.hero-offer .offer-points {
  list-style: none; margin: 16px 0 18px; padding: 14px 0 0;
  border-top: 1px dashed var(--line-dark);
  display: grid; gap: 9px;
}
.hero-offer .offer-points li {
  position: relative; padding-left: 26px;
  font-size: 0.93rem; line-height: 1.5; color: #d3d6de;
}
.hero-offer .offer-points li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(34, 197, 94, 0.14); color: #4ade80;
  font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 3px;
}
.hero-offer .offer-cta { width: 100%; text-align: center; justify-content: center; }
.hero-offer .offer-meta {
  margin: 12px 0 0; font-size: 0.78rem; line-height: 1.55; color: #8f95a3;
}
.hero-offer .offer-alt {
  margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line-dark);
  font-size: 0.85rem; color: #c2c6d1;
}
.hero-offer .offer-alt a { color: var(--brand-soft); }
.hero-offer .offer-alt a:hover { color: #fff; }
@media (max-width: 900px) {
  .hero-offer .offer-card { padding: 22px 20px 18px; }
  .hero-offer .offer-amount { font-size: 2.6rem; }
}

/* ---------- Featured article image ---------- */
.article-figure { margin: 1.8rem 0 2rem; }
.article-figure img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(17, 19, 24, 0.07);
}
.article-figure figcaption {
  font-size: 0.82rem; color: var(--muted); margin-top: 10px; text-align: center;
}

/* ---------- Offer card ---------- */
.offer-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 28px; margin: 2rem 0;
}
.offer-card .offer-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--deal); margin-bottom: 8px;
}
.offer-card h2, .offer-card h3 { margin-top: 0; }
.offer-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.offer-price { font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.offer-price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.offer-compare { color: var(--muted); font-size: 0.95rem; }
.offer-math {
  background: var(--deal-soft); border: 1px solid rgba(21, 127, 59, 0.2);
  color: #14532d; border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 0.93rem; margin: 14px 0;
}
.offer-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

/* Status callouts */
.callout {
  border-radius: var(--radius-md); padding: 18px 20px; margin: 1.6rem 0;
  border: 1px solid var(--line); background: var(--surface-soft);
  font-size: 0.97rem;
}
.callout.warning { background: var(--warning-soft); border-color: rgba(154, 103, 0, 0.25); color: #6b4a00; }
.callout.warning strong { color: #6b4a00; }
.callout.success { background: var(--deal-soft); border-color: rgba(21, 127, 59, 0.22); color: #14532d; }
.callout.success strong { color: #14532d; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- CTA box (from blockquote CTAs) ---------- */
.cta-box {
  background:
    radial-gradient(600px 260px at 85% -30%, rgba(109, 74, 255, 0.28), transparent 60%),
    linear-gradient(135deg, #16121f, var(--black));
  border: 1px solid var(--line-dark);
  color: #dfe3ee; border-radius: var(--radius-lg);
  padding: 30px 28px; margin: 2.2rem 0;
}
.cta-box h2, .cta-box h3, .cta-box strong { color: #fff; margin-top: 0; }
.cta-box p { color: #b9bfd0; }
.cta-box .btn-primary { margin-top: 6px; }
.cta-box .cta-fineprint { font-size: 0.82rem; color: #8f96ab; margin: 14px 0 0; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto; margin: 1.6rem 0;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.94rem; }
caption { text-align: left; padding: 12px 16px 4px; font-weight: 700; color: var(--ink); }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--surface-soft); color: var(--ink); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.table-note { font-size: 0.85rem; color: var(--muted); margin-top: -0.8rem; margin-bottom: 1.6rem; }

/* ---------- Article layout ---------- */
.article-layout {
  display: grid; grid-template-columns: minmax(0, var(--article-width)) 280px;
  gap: 56px; justify-content: center; padding: 40px 0 60px;
}
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, var(--article-width)); }
  .toc-aside { display: none; }
}
.article-main { min-width: 0; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin: 22px 0 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 4px; }
.breadcrumbs li + li::before { content: "›"; color: var(--line); padding: 0 4px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-dark); text-decoration: underline; }

.article-header { padding-top: 8px; }
.article-header .eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--brand-dark); margin-bottom: 10px; display: block;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: 0.86rem; color: var(--muted); margin: 14px 0 6px;
}
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }

.affiliate-note {
  font-size: 0.85rem; color: var(--muted);
  background: var(--surface-soft); border-left: 3px solid var(--brand);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 16px 0 8px;
}

/* TOC */
.toc-aside { position: relative; }
.toc {
  position: sticky; top: 92px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 18px 20px; background: var(--surface);
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.toc h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.toc li { margin: 0 0 2px; }
.toc a {
  display: block; color: var(--ink-soft); text-decoration: none;
  padding: 5px 8px; border-radius: 6px; line-height: 1.4;
}
.toc a:hover { background: var(--surface-soft); color: var(--brand-dark); }

/* Heading anchors */
.anchor-heading { position: relative; scroll-margin-top: 90px; }
.anchor-heading .anchor-link {
  text-decoration: none; color: var(--line); font-weight: 400;
  margin-left: 8px; font-size: 0.8em;
}
.anchor-heading:hover .anchor-link { color: var(--brand); }

/* Blockquote (editorial) */
blockquote {
  margin: 1.6rem 0; padding: 4px 22px;
  border-left: 4px solid var(--brand); background: var(--surface-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}

/* ---------- Verdict box ---------- */
.verdict-box {
  border: 2px solid var(--brand); border-radius: var(--radius-md);
  padding: 22px 24px; margin: 1.8rem 0; background: rgba(109, 74, 255, 0.04);
}
.verdict-box .verdict-label {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--brand-dark); display: block; margin-bottom: 8px;
}
.verdict-box p:last-of-type { margin-bottom: 0; }
.verdict-box .btn { margin-top: 14px; }

/* ---------- Pros / cons ---------- */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 1.8rem 0; }
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-cons > div { border-radius: var(--radius-md); padding: 20px 22px; border: 1px solid var(--line); }
.pros-cons .pros { background: var(--deal-soft); border-color: rgba(21, 127, 59, 0.2); }
.pros-cons .cons { background: #fef2f2; border-color: rgba(190, 30, 30, 0.15); }
.pros-cons h3 { margin-top: 0; font-size: 1.05rem; }
.pros-cons .pros h3 { color: var(--deal); }
.pros-cons .cons h3 { color: #b42318; }
.pros-cons ul { margin-bottom: 0; padding-left: 1.2em; }
.pros-cons li { margin-bottom: 0.5em; font-size: 0.95rem; }

/* ---------- Decision cards ---------- */
.decision-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 1.8rem 0; }
@media (max-width: 700px) { .decision-cards { grid-template-columns: 1fr; } }
.decision-card {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px; background: var(--surface);
}
.decision-card.highlight { border-color: var(--brand); box-shadow: 0 8px 30px rgba(109, 74, 255, 0.10); }
.decision-card h3 { margin-top: 0; font-size: 1.08rem; }
.decision-card ul { margin-bottom: 0; font-size: 0.94rem; }

/* ---------- Steps ---------- */
.step-list { list-style: none; padding: 0; counter-reset: step; margin: 1.6rem 0; }
.step-list > li {
  counter-increment: step; position: relative;
  padding: 0 0 1.6rem 58px; margin: 0;
}
.step-list > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.step-list > li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 46px; bottom: 6px;
  width: 2px; background: var(--line);
}
.step-list h3 { margin-top: 4px; }

/* Step pill navigator */
.step-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.4rem 0 2rem; padding: 0; list-style: none; }
.step-nav li { margin: 0; }
.step-nav a {
  display: inline-block; text-decoration: none; font-size: 0.84rem; font-weight: 600;
  background: var(--surface-soft); border: 1px solid var(--line);
  color: var(--ink-soft); border-radius: 999px; padding: 7px 14px;
}
.step-nav a:hover { border-color: var(--brand); color: var(--brand-dark); }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 1.4rem 0; }
.checklist li {
  padding: 9px 0 9px 34px; position: relative;
  border-bottom: 1px dashed var(--line); margin: 0;
}
.checklist li::before {
  content: "✓"; position: absolute; left: 4px; top: 8px;
  color: var(--deal); font-weight: 800;
}

/* ---------- FAQ ---------- */
.faq-section { margin: 2rem 0; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 10px; background: var(--surface);
}
.faq-item summary {
  cursor: pointer; font-weight: 700; color: var(--ink);
  padding: 15px 44px 15px 18px; list-style: none; position: relative;
  min-height: 44px; display: flex; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%); font-size: 1.3rem; color: var(--brand);
  font-weight: 400; transition: transform 0.15s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 18px 16px; color: var(--ink-soft); }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Related articles ---------- */
.related-section { margin: 2.6rem 0 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 1.2rem; }
.related-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 18px 20px; text-decoration: none; background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.related-card .card-thumb {
  display: block; width: calc(100% + 40px); height: auto;
  margin: -18px -20px 14px; border-bottom: 1px solid var(--line);
  aspect-ratio: 640 / 360; object-fit: cover;
}
.related-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(109, 74, 255, 0.09); }
.related-card .card-tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--brand-dark); display: block; margin-bottom: 6px;
}
.related-card .card-title { font-weight: 700; color: var(--ink); display: block; line-height: 1.4; margin-bottom: 6px; }
.related-card .card-desc { font-size: 0.86rem; color: var(--muted); display: block; }

/* ---------- Editorial note / sources ---------- */
.editorial-note {
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px 22px;
  font-size: 0.9rem; color: var(--muted); margin: 2.4rem 0;
}
.editorial-note h2 { font-size: 1rem; margin: 0 0 8px; color: var(--ink); }
.editorial-note p:last-child { margin-bottom: 0; }

/* ---------- Hub pages ---------- */
.hub-section { padding: 10px 0 30px; }
.hub-group { margin: 2.4rem 0; }
.hub-group h2 { margin-top: 0; }
.hub-group .group-desc { color: var(--muted); max-width: 700px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black); color: #a7adbd;
  border-top: 1px solid var(--line-dark);
  margin-top: 70px; padding: 50px 0 30px; font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c3c9d6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .site-logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: #8f96ab; font-size: 0.87rem; max-width: 300px; }
.footer-disclaimer {
  border-top: 1px solid var(--line-dark); margin-top: 36px; padding-top: 22px;
  font-size: 0.8rem; color: #7d8498; line-height: 1.6;
}

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 80px 20px; }
.error-page .error-code { font-size: 5rem; font-weight: 800; color: var(--brand); letter-spacing: -0.04em; margin-bottom: 0.1em; line-height: 1; }
.error-page .hero-actions { justify-content: center; }

/* ---------- Utility ---------- */
.text-muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Compatibility layer — second-generation page shell
   (tutorial, hub, trust and 404 pages use these class names)
   ========================================================================== */

/* Header shell without .container wrapper */
.header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* .logo = alias of .site-logo */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.06rem; color: #fff;
  text-decoration: none; letter-spacing: -0.01em; white-space: nowrap;
}
.logo .logo-mark {
  width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: 9px; font-size: 15px; font-weight: 800;
}
.logo:hover { color: var(--brand-soft); }
.logo .logo-text { color: inherit; }

/* Nav markup variant: <nav class="main-nav"><ul><li><a> */
.main-nav ul {
  list-style: none; display: flex; align-items: center;
  gap: 4px; margin: 0; padding: 0;
}
.main-nav ul li { margin: 0; }
@media (max-width: 900px) {
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav ul a { display: block; }
  .main-nav > .nav-cta, .main-nav ul + .nav-cta { display: inline-flex; }
}

/* Second-gen pages place the header CTA inside the nav (with .btn classes);
   show it on desktop since these pages have no separate .header-cta */
@media (min-width: 901px) {
  .main-nav .nav-cta.btn {
    display: inline-flex; margin-left: 10px;
    padding: 10px 18px; font-size: 0.9rem; white-space: nowrap;
  }
}

/* .kicker = alias of .eyebrow */
.kicker {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--brand-dark);
  margin: 0 0 10px; display: block;
}

/* .lead = alias of .lede */
.lead { font-size: 1.13rem; color: var(--ink-soft); }

/* Page shells without .container wrapper */
#main-content > .breadcrumbs {
  max-width: var(--max-width); margin-left: auto; margin-right: auto;
  padding-left: 20px; padding-right: 20px;
}
#main-content > .article-layout {
  max-width: var(--max-width); margin: 0 auto;
  padding-left: 20px; padding-right: 20px;
}
.hub-page {
  max-width: 980px; margin: 0 auto;
  padding: 34px 20px 60px;
}
.hub-page .article-header { margin-bottom: 1rem; }

/* Step list containing h2 headings */
.step-list > li h2 {
  margin-top: 0.15em; font-size: clamp(1.25rem, 2.4vw, 1.5rem);
}

/* Related cards with plain h3/p children */
.related-card h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--ink); }
.related-card p { margin: 0; font-size: 0.86rem; color: var(--muted); }

/* TOC with <ul> instead of <ol> */
.toc ul { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.toc ul li { margin: 0 0 2px; }

/* Larger CTA button */
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* .cta-note = alias of .cta-fineprint */
.cta-box .cta-note { font-size: 0.82rem; color: #8f96ab; margin: 14px 0 0; }
.cta-box a:not(.btn) { color: var(--brand-soft); }

/* Footer shell: .footer-inner = .container + .footer-grid */
.footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px;
}
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.site-footer > .footer-disclaimer {
  max-width: var(--max-width); margin: 36px auto 0; padding: 22px 20px 0;
}

/* .sr-only = alias of .visually-hidden */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Error page heading */
.error-page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.error-page .related-grid { max-width: 860px; margin: 2rem auto; text-align: left; }
.error-page .btn { margin-top: 1rem; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .disclosure-bar, .toc-aside, .cta-box, .hero-actions, .menu-toggle, .step-nav { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .checklist li::before { content: "☐"; color: #000; }
}
