:root {
  color-scheme: dark;
  --bg: #07110f;
  --bg-soft: #0a1512;
  --ink: #f7fbff;
  --muted: #b6c2cf;
  --faint: #8695a3;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(9, 17, 22, 0.9);
  --code: #050b0f;
  --green: #4ade80;
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --amber: #fbbf24;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% -10%, rgba(74, 222, 128, 0.08), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}
p code, li code, td code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  color: #e8eef6;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 15, 0.9);
  backdrop-filter: blur(12px);
}
.brand { color: var(--ink); font-size: 21px; font-weight: 850; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--violet); }
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.nav a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.nav a:hover, .nav a.active { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.4); text-decoration: none; }

.shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 72px 0 46px; border-bottom: 1px solid var(--line); }
.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.03em;
}
h1 strong { color: var(--green); }
.lede {
  max-width: 800px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.3vw, 23px);
  font-weight: 560;
}
.meta { margin-top: 18px; color: var(--faint); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 750;
}
.button:hover { text-decoration: none; background: rgba(255,255,255,0.05); }
.button.primary { color: #04120b; border-color: var(--green); background: var(--green); }

main { padding: 42px 0 80px; }
article { max-width: 820px; }
section { scroll-margin-top: 76px; margin-top: 42px; }
section:first-child { margin-top: 0; }
h2 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 29px;
  letter-spacing: -0.015em;
}
h3 { margin: 28px 0 8px; font-size: 19px; }
p, li { color: #dbe4ee; }
ul, ol { padding-left: 24px; }
li { margin: 6px 0; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 30px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}
.toc a { padding: 4px 8px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.toc a:hover { background: rgba(255,255,255,0.06); color: var(--ink); text-decoration: none; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: inherit;
}
.card:hover { border-color: rgba(74,222,128,0.5); transform: translateY(-2px); text-decoration: none; }
.card h2, .card h3 { margin: 0 0 8px; padding: 0; border: 0; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
.card .more { margin-top: auto; padding-top: 18px; color: var(--green); font-weight: 800; }

pre {
  position: relative;
  margin: 16px 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--code);
  color: #dce7f5;
  font-size: 13.5px;
  line-height: 1.6;
}
.out { color: var(--green); }
.comment { color: var(--faint); }

table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--ink); background: rgba(255,255,255,0.025); }
td { color: #d4dee8; }
.yes { color: var(--green); font-weight: 800; }
.partial { color: var(--amber); font-weight: 800; }

.callout {
  margin: 18px 0;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  background: var(--bg-soft);
}
.callout.warn { border-left-color: var(--amber); }
.callout strong:first-child { display: block; margin-bottom: 4px; color: var(--green); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.callout.warn strong:first-child { color: var(--amber); }
.callout p { margin: 4px 0; }

.flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}
.node { padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; font-weight: 750; }
.node.safe { color: var(--green); border-color: rgba(74,222,128,.4); }
.node.veil { color: var(--violet); border-color: rgba(167,139,250,.45); }
.arrow { color: var(--faint); font-weight: 800; }

.footer { margin-top: 60px; padding: 24px 0 50px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer a { margin-right: 12px; }

@media (max-width: 720px) {
  .topbar { align-items: flex-start; padding: 10px 16px; }
  .nav a:nth-child(n+4) { display: none; }
  .shell { width: min(100% - 30px, 1080px); }
  .hero { padding: 48px 0 34px; }
  section { scroll-margin-top: 120px; }
  .cards { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
  h1 { font-size: 38px; }
  pre { font-size: 12.5px; }
}
