:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --card: #fffdf9;
  --ink: #1c1915;
  --muted: #5e564c;
  --line: #e4d9cb;
  --accent: #8a3d12;
  --accent-dark: #6d2f0c;
  --ok: #1f6b3a;
  --ok-bg: #e7f5ec;
  --bad: #9d2218;
  --bad-bg: #fdeceb;
  --warn: #8a5a12;
  --warn-bg: #fff6e5;
  --shadow: 0 1px 2px rgba(40, 24, 8, 0.05), 0 12px 28px rgba(40, 24, 8, 0.05);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

body::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--accent);
}

h1, h2, h3, p { margin: 0; }

a { color: var(--accent-dark); }

code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { top: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.top { padding: 16px 0 8px; }

.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
  font-size: 18px;
}

nav { display: flex; flex-wrap: wrap; gap: 14px; }

nav a { text-decoration: none; color: var(--muted); }

nav a:hover { color: var(--ink); }

main { padding-bottom: 48px; }

.hero { padding: 28px 0 8px; }

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

h1 { font-size: 40px; letter-spacing: -0.04em; line-height: 1.05; }

.lead { margin-top: 10px; font-size: 18px; max-width: 40rem; }

.disclaimer, .recorded, .tools { margin-top: 12px; color: var(--muted); max-width: 46rem; }

.recorded strong { color: var(--ink); }

section { margin-top: 36px; }

h2 { font-size: 24px; letter-spacing: -0.03em; margin-bottom: 8px; }

h3 { font-size: 16px; margin: 18px 0 8px; }

.diagrams {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

figure { margin: 0; }

figcaption { font-weight: 650; margin-bottom: 8px; }

svg {
  width: 100%;
  height: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

svg text {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  fill: var(--ink);
}

.box { fill: #fff8ef; stroke: #c47a45; stroke-width: 1.4; }

.panel { fill: #fffdf9; stroke: #d9c3ad; stroke-width: 1.4; }

.wire { fill: none; stroke: #8a3d12; stroke-width: 1.6; }

.table-wrap { overflow-x: auto; margin-top: 12px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th { background: #f3ebe3; font-weight: 650; }

tr:last-child td, tr:last-child th { border-bottom: 0; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.check {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.check header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.check h3 { margin: 0; }

.pill {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.check.pass .pill { background: var(--ok-bg); color: var(--ok); }

.check.fail .pill { background: var(--bad-bg); color: var(--bad); }

.meta { color: var(--muted); margin: 6px 0; }

.check ul { margin: 8px 0 0; padding-left: 18px; }

.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 8px;
  padding: 10px 12px;
}

.browser {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 420px;
  overflow: auto;
}

.file-list a { text-decoration: none; }

.file-list .current a { font-weight: 700; }

.viewer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}

.viewer pre {
  margin: 0;
  overflow: auto;
  max-height: 640px;
  line-height: 1.45;
}

.tok-c { color: #6b6258; }

.tok-s { color: #8a3d12; }

.tok-n { color: #1f6b3a; }

.tok-k { color: #1d4e89; font-weight: 650; }

.tok-i { color: #7a3e9d; }

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 18px 0 28px;
  font-size: 14px;
}

@media (min-width: 800px) {
  .diagrams { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .browser { grid-template-columns: 280px 1fr; align-items: start; }
  .checkov-span { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  h1 { font-size: 32px; }
  .wrap { padding: 0 14px; }
  svg text { font-size: 12px; }
}
