:root {
    --bg: #0b1210;
    --bg-soft: #111b17;
    --card: #15211c;
    --line: rgba(255, 255, 255, 0.09);
    --text: #e8f0ec;
    --muted: #9db0a6;
    --green: #2ecc71;
    --amber: #f1c40f;
    --ink: #0b1210;
    --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Nav (matches homepage) */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(11, 18, 16, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: -0.01em; }
.brand img { width: auto; height: 60px; background: #fff; border-radius: 12px; padding: 4px 14px; }
@media (max-width: 600px) { .brand img { height: 38px; padding: 3px 8px; } .nav .wrap { height: 64px; } }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 0.95rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

/* Page header */
.page-head { padding: 64px 0 40px; background: radial-gradient(800px 380px at 80% -20%, rgba(46, 204, 113, 0.16), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--green); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 14px; }
.updated { color: var(--muted); margin: 0; font-size: 0.95rem; }
.intro { color: var(--muted); font-size: 1.08rem; max-width: 720px; margin: 16px 0 0; }

/* Layout: sticky table of contents + content */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 24px; align-items: start; }
.toc { position: sticky; top: 88px; font-size: 0.92rem; }
.toc p { margin: 0 0 10px; color: var(--muted); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--muted); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--green); }

article section { padding: 0 0 8px; margin-bottom: 40px; scroll-margin-top: 88px; }
article h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin: 0 0 14px; line-height: 1.25; }
article h2 span { color: var(--green); margin-right: 8px; }
article p { margin: 0 0 14px; color: #c9d6cf; }
article ul { margin: 0 0 14px; padding-left: 22px; color: #c9d6cf; }
article li { margin-bottom: 8px; }
article strong { color: var(--text); }

/* Highlight boxes */
.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 14px; padding: 22px 24px; margin: 0 0 40px; }
.callout h3 { margin: 0 0 10px; font-size: 1.1rem; }
.callout p, .callout ul { margin-bottom: 8px; }
.callout.warn { border-left-color: var(--amber); }
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 44px; }
.glance div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.glance b { display: block; margin-bottom: 4px; }
.glance span { color: var(--muted); font-size: 0.92rem; line-height: 1.5; display: block; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); color: var(--muted); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
td:first-child { color: var(--text); font-weight: 600; min-width: 150px; }
td { color: #c9d6cf; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 0.88rem; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
footer p { margin: 0 0 10px; max-width: 820px; }

a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 900px) {
    .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
    table { min-width: 600px; }
    .toc { position: static; }
    .toc ol { display: flex; flex-wrap: wrap; gap: 6px 14px; border-left: none; }
    .toc a { padding: 2px 0; border-left: none; margin-left: 0; }
    .glance { grid-template-columns: minmax(0, 1fr); }
    .nav-links a:not(:last-child) { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
