:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --warn-bg: #fffbeb;
  --warn-border: #f59e0b;
  --radius: 10px;
  --max-width: 780px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
.main-nav a:hover { color: var(--accent); }

.main-cta-wrap {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-main:hover { background: var(--accent-hover); color: #ffffff; transform: translateY(-1px); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--muted); margin: 0 0 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }

.article-wrap { padding-top: 22px; padding-bottom: 48px; }
.eyebrow { margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }

h1 { margin: 0 0 12px; font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.22; letter-spacing: -0.025em; }
h2 { margin: 38px 0 14px; font-size: clamp(1.3rem, 3vw, 1.65rem); line-height: 1.3; letter-spacing: -0.015em; scroll-margin-top: 74px; }
h3 { margin: 24px 0 10px; font-size: 1.15rem; line-height: 1.35; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 8px; }
code { background: var(--surface-alt); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

.meta-bar { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; color: var(--muted); margin-bottom: 22px; }
.callout { padding: 16px 18px; border-radius: var(--radius); margin: 20px 0; font-size: 0.96rem; }
.callout-primary { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.callout-warn { background: var(--warn-bg); border-left: 4px solid var(--warn-border); }

.hero-figure { margin: 22px 0 26px; }
.hero-figure img { border-radius: var(--radius); border: 1px solid var(--border); background: #0f172a; }
.hero-figure figcaption { margin-top: 8px; font-size: 0.84rem; color: var(--muted); text-align: center; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin: 24px 0 30px; }
.toc summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.toc[open] summary::after { content: "−"; }
.toc ol { margin: 12px 0 4px; padding-left: 20px; font-size: 0.94rem; }
.toc li { margin-bottom: 6px; }

.table-wrap { width: 100%; overflow-x: auto; margin: 20px 0 10px; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 580px; font-size: 0.92rem; }
thead th { background: var(--surface-alt); text-align: left; font-weight: 700; padding: 12px 14px; border-bottom: 2px solid var(--border); }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--surface); }
.table-note { font-size: 0.83rem; color: var(--muted); }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin: 20px 0 10px; }
.guide-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.guide-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.card-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.guide-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.guide-card p { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: var(--bg); }
.faq-item summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.25rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 2px; color: var(--muted); font-size: 0.95rem; }

.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 34px 0 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.share-label { font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.author-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 24px; font-size: 0.92rem; }
.author-title { font-weight: 700; margin: 0 0 6px; }
.author-box p:last-child { margin-bottom: 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0; font-size: 0.88rem; color: var(--muted); }
.footer-disclaimer { margin-bottom: 16px; line-height: 1.6; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 16px; }
.footer-nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.copyright { margin: 0; font-size: 0.82rem; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-inner { min-height: 54px; }
  .btn-main { width: 100%; }
}
