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

:root {
  --bg: #ffffff;
  --text: #0F172A;
  --text-muted: #64748B;
  --accent: #1D4ED8;
  --accent-hover: #1E40AF;
  --border: #E2E8F0;
  --surface: #F8FAFC;
  --cta-bg: #EFF6FF;
  --cta-border: #BFDBFE;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --border: #1E293B;
    --surface: #1E293B;
    --cta-bg: #172554;
    --cta-border: #1E3A8A;
  }
}

:root[data-theme="light"] {
  --bg: #ffffff; --text: #0F172A; --text-muted: #64748B;
  --border: #E2E8F0; --surface: #F8FAFC; --cta-bg: #EFF6FF; --cta-border: #BFDBFE;
}
:root[data-theme="dark"] {
  --bg: #0F172A; --text: #F1F5F9; --text-muted: #94A3B8;
  --border: #1E293B; --surface: #1E293B; --cta-bg: #172554; --cta-border: #1E3A8A;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.site-nav {
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.back-link:hover { text-decoration: underline; }
.back-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s;
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-cta svg { width: 14px; height: 14px; }

/* ── ARTICLE ── */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
  text-wrap: balance;
}

.article-meta {
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 32px;
  font-weight: 400;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 14px;
  line-height: 1.3;
}

h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}

p { margin-bottom: 18px; }

ul, ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
li { margin-bottom: 6px; }
li::marker { color: var(--accent); }

strong { font-weight: 700; }

/* Highlight box */
.info-box {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.info-box p { margin: 0; font-size: 15px; }
.info-box strong { color: var(--accent); }

/* Warning box */
.warn-box {
  background: #FEF9C3;
  border-left: 3px solid #CA8A04;
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.warn-box p { margin: 0; font-size: 15px; color: #713F12; }

@media (prefers-color-scheme: dark) {
  .warn-box { background: #422006; border-color: #92400E; }
  .warn-box p { color: #FDE68A; }
}
:root[data-theme="dark"] .warn-box { background: #422006; border-color: #92400E; }
:root[data-theme="dark"] .warn-box p { color: #FDE68A; }

/* ── CTA BOX ── */
.cta-box {
  background: var(--cta-bg);
  border: 1px solid var(--cta-border);
  border-radius: 14px;
  padding: 36px 32px;
  text-align: center;
  margin: 48px 0 40px;
}
.cta-box h2 {
  margin-top: 0;
  font-size: 22px;
  margin-bottom: 10px;
}
.cta-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 15px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  padding: 15px 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  transition: background .15s, transform .1s;
}
.cta-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cta-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── RELATED ── */
.related {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 48px;
}
.related-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.related-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.related-list li a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.related-list li a::before {
  content: '→';
  font-size: 13px;
  opacity: .7;
}
.related-list li a:hover { text-decoration: underline; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .article-wrap { padding: 32px 18px 64px; }
  .cta-box { padding: 28px 20px; }
  .nav-cta span { display: none; }
}
