:root {
  --navy: #080e1c;
  --navy-mid: #0d1528;
  --card: #111c32;
  --card-soft: rgba(255,255,255,.035);
  --border: rgba(255,255,255,.1);
  --blue: #3b6bff;
  --blue-light: #7fa0ff;
  --text: #f0f4fc;
  --soft: #d8e2f0;
  --muted: #9fb1c8;
  --faint: #70839b;
  --green: #45d39c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: fixed; left: 14px; top: -80px; z-index: 3000; padding: 10px 14px; background: #fff; color: #050916; border-radius: 8px; }
.skip-link:focus { top: 14px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8,14,28,.9);
  backdrop-filter: blur(14px);
}
.nav-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { padding: 9px 13px; border: 1px solid rgba(85,128,255,.38); border-radius: 9px; color: #fff !important; background: rgba(59,107,255,.14); }

.hub-hero,
.article-hero {
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 82% 0%, rgba(59,107,255,.22), transparent 40%);
}
.hub-hero { padding: 96px 0 70px; }
.article-hero { padding: 82px 0 54px; }
.eyebrow { margin: 0 0 14px; color: var(--blue-light); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0 0 20px; font-size: clamp(40px, 7vw, 70px); line-height: 1.03; letter-spacing: -.045em; }
.article-hero h1 { max-width: 940px; font-size: clamp(38px, 6vw, 64px); }
.lead { max-width: 790px; margin: 0; color: var(--soft); font-size: clamp(18px, 2.3vw, 22px); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.meta a { color: var(--soft); text-decoration: none; }
.meta a:hover { text-decoration: underline; }

.hub-section { padding: 68px 0; border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -.035em; }
.section-head p { max-width: 560px; margin: 0; color: var(--muted); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-soft);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.article-card:hover { transform: translateY(-3px); border-color: rgba(92,132,255,.42); background: rgba(255,255,255,.052); }
.topic { display: inline-flex; width: fit-content; margin-bottom: 20px; padding: 5px 9px; border: 1px solid rgba(85,128,255,.3); border-radius: 999px; color: #a9beff; background: rgba(59,107,255,.09); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.article-card h2, .article-card h3 { margin: 0 0 12px; font-size: 23px; line-height: 1.22; letter-spacing: -.025em; }
.article-card p { margin: 0 0 22px; color: var(--muted); }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: auto; color: var(--faint); font-size: 12px; }
.card-link { color: var(--soft); font-weight: 800; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.related-link { padding: 18px; border: 1px solid var(--border); border-radius: 14px; color: var(--soft); background: rgba(255,255,255,.025); text-decoration: none; }
.related-link strong { display: block; margin-bottom: 5px; }
.related-link span { color: var(--muted); font-size: 13px; }
.related-link:hover { border-color: rgba(92,132,255,.36); }

.article-shell { display: grid; grid-template-columns: 220px minmax(0, 760px); justify-content: center; gap: 58px; padding: 58px 0 84px; }
.toc { position: sticky; top: 90px; align-self: start; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.025); }
.toc strong { display: block; margin-bottom: 10px; font-size: 13px; }
.toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.prose { min-width: 0; }
.prose section { margin-bottom: 48px; scroll-margin-top: 92px; }
.prose h2 { margin: 0 0 16px; font-size: clamp(27px, 4vw, 38px); line-height: 1.16; letter-spacing: -.03em; }
.prose h3 { margin: 28px 0 9px; font-size: 20px; line-height: 1.3; }
.prose p { margin: 0 0 16px; color: var(--muted); font-size: 16.5px; }
.prose strong { color: var(--soft); }
.prose a { color: #9bb3ff; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; color: var(--muted); }
.prose li { margin: 8px 0; }
.answer-box {
  margin-bottom: 38px;
  padding: 23px 25px;
  border: 1px solid rgba(85,128,255,.36);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(59,107,255,.15), rgba(255,255,255,.025));
}
.answer-box strong { display: block; margin-bottom: 7px; color: #b8c8ff; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.answer-box p { margin: 0; color: var(--soft); font-size: 18px; line-height: 1.55; }
.callout { margin: 26px 0; padding: 20px 22px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: rgba(255,255,255,.035); }
.callout p { margin: 0; color: var(--soft); }
.checklist { display: grid; gap: 10px; margin: 20px 0; padding: 0; list-style: none; }
.checklist li { position: relative; margin: 0; padding: 13px 14px 13px 42px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.025); }
.checklist li::before { content: '✓'; position: absolute; left: 15px; top: 12px; color: var(--green); font-weight: 900; }
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; min-width: 620px; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { color: var(--text); background: rgba(255,255,255,.04); font-size: 13px; }
td { color: var(--muted); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.example { margin: 24px 0; padding: 22px; border: 1px solid var(--border); border-radius: 15px; background: #060b17; }
.example-label { display: block; margin-bottom: 10px; color: var(--blue-light); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.example p:last-child { margin-bottom: 0; }
.author-box { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; margin-top: 54px; padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.author-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(59,107,255,.18); color: #b9c9ff; font-weight: 900; }
.author-box strong { display: block; }
.author-box p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.cta { margin-top: 58px; padding: 31px; border: 1px solid rgba(85,128,255,.35); border-radius: 20px; background: linear-gradient(135deg, rgba(59,107,255,.18), rgba(255,255,255,.025)); }
.cta h2 { margin: 0 0 10px; font-size: 28px; }
.cta p { margin: 0; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border-radius: 9px; font-weight: 800; text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { border: 1px solid rgba(255,255,255,.18); color: var(--text); background: transparent; }

.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a, .footer-links button { border: 0; padding: 0; color: var(--muted); background: transparent; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: var(--text); }

:focus-visible { outline: 2px solid #7fa8ff; outline-offset: 3px; border-radius: 4px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .article-grid, .related-grid { grid-template-columns: 1fr; }
  .article-shell { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 32px, 1120px); }
  .hub-hero { padding: 68px 0 50px; }
  .article-hero { padding: 60px 0 42px; }
  h1, .article-hero h1 { font-size: 40px; }
  .hub-section { padding: 50px 0; }
  .article-shell { padding: 38px 0 62px; }
  .answer-box, .cta { padding: 21px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
