:root {
  color-scheme: dark;
  --bg: #090d18;
  --surface: #111827;
  --surface-soft: #172033;
  --border: #263248;
  --text: #f8fafc;
  --muted: #aab6ca;
  --brand: #70e1a1;
  --brand-strong: #39c77b;
  --accent: #8ab4ff;
  --warning: #f8cf72;
  --danger: #ff9f9f;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top, #17223b 0, var(--bg) 38rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.container { width: min(calc(100% - 2rem), var(--max-width)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(9,13,24,.88); backdrop-filter: blur(16px); }
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: .75rem; background: linear-gradient(135deg,var(--brand),var(--accent)); color: #06110b; }
.nav-links { display: flex; flex-wrap: wrap; gap: .35rem; }
.nav-links a { padding: .55rem .85rem; border-radius: .65rem; color: var(--muted); text-decoration: none; }
.nav-links a:hover,.nav-links a:focus-visible { color: var(--text); background: rgba(255,255,255,.07); }
.hero { padding: 6rem 0 4rem; }
.eyebrow { display: inline-flex; gap: .45rem; align-items: center; margin: 0 0 1rem; color: var(--brand); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: .78rem; }
.hero h1 { max-width: 850px; margin: 0; font-size: clamp(2.6rem,7vw,5.4rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 720px; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1.05rem,2vw,1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 750; cursor: pointer; }
.button-primary { border-color: transparent; background: linear-gradient(135deg,var(--brand),var(--brand-strong)); color: #04130b; }
.button:hover { transform: translateY(-1px); }
.section { padding: 2.5rem 0 4.5rem; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-header h2 { margin: 0; font-size: clamp(1.75rem,4vw,2.5rem); letter-spacing: -.035em; }
.section-header p { max-width: 620px; margin: .55rem 0 0; color: var(--muted); }
.search-panel { padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: rgba(17,24,39,.84); margin-bottom: 1.2rem; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .7rem; }
.search-input { width: 100%; min-height: 46px; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg); color: var(--text); font: inherit; }
.search-input:focus { outline: 2px solid rgba(112,225,161,.4); border-color: var(--brand); }
.filters { display: flex; gap: .5rem; overflow-x: auto; padding-top: .8rem; scrollbar-width: thin; }
.filter-button { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); padding: .45rem .75rem; font: inherit; cursor: pointer; }
.filter-button[aria-pressed="true"] { border-color: var(--brand); color: var(--text); background: rgba(112,225,161,.11); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 1rem; }
.card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 1rem; background: linear-gradient(180deg,rgba(24,34,53,.96),rgba(15,22,36,.96)); overflow: hidden; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 1.1rem; }
.card-kicker { color: var(--brand); font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.card h3 { margin: .4rem 0 .55rem; font-size: 1.15rem; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.card-link { margin-top: auto; padding-top: 1rem; color: var(--accent); font-weight: 750; text-decoration: none; }
.card-link::after { content: " →"; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.feature { padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: rgba(17,24,39,.7); }
.feature h3 { margin-top: 0; }
.feature p { margin-bottom: 0; color: var(--muted); }
.guide-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 2rem; align-items: start; }
.article { padding: clamp(1.2rem,4vw,2.4rem); border: 1px solid var(--border); border-radius: 1rem; background: rgba(14,21,34,.92); }
.article h1 { margin-top: 0; font-size: clamp(2.2rem,6vw,4.3rem); line-height: 1; letter-spacing: -.05em; }
.article h2 { margin-top: 2.6rem; font-size: 1.65rem; letter-spacing: -.025em; }
.article h3 { margin-top: 1.8rem; }
.article p,.article li { color: #d5deec; }
.article strong { color: var(--text); }
.article code { padding: .15rem .35rem; border-radius: .35rem; background: #09111f; color: #b7f8d1; }
.article pre { overflow-x: auto; padding: 1rem; border-radius: .7rem; background: #07101d; }
.article table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .94rem; }
.article th,.article td { padding: .75rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.article th { background: var(--surface-soft); }
.callout { margin: 1.4rem 0; padding: 1rem 1.1rem; border: 1px solid rgba(248,207,114,.45); border-radius: .8rem; background: rgba(248,207,114,.08); }
.callout p { margin: 0; }
.toc { position: sticky; top: 90px; padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: rgba(17,24,39,.86); }
.toc h2 { margin: 0 0 .75rem; font-size: 1rem; }
.toc a { display: block; padding: .35rem 0; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.meta { display: flex; flex-wrap: wrap; gap: .65rem 1rem; color: var(--muted); font-size: .9rem; margin: 1rem 0 1.5rem; }
.source-list a { color: var(--accent); }
.empty-state { grid-column: 1/-1; padding: 2rem; border: 1px dashed var(--border); border-radius: 1rem; color: var(--muted); text-align: center; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--muted); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
@media (max-width:840px) { .feature-grid { grid-template-columns: 1fr; } .guide-layout { grid-template-columns: 1fr; } .toc { position: static; order: -1; } }
@media (max-width:680px) { .nav { align-items: flex-start; padding: .9rem 0; } .nav-links { justify-content: flex-end; } .hero { padding-top: 4.2rem; } .search-row { grid-template-columns: 1fr; } .article { border-radius: .75rem; } .article table { display: block; overflow-x: auto; } }
