:root {
  color-scheme: light;
  --ink: #102338;
  --muted: #5b6b7c;
  --paper: #f4f7f8;
  --surface: #ffffff;
  --line: #d8e1e7;
  --navy: #0b3155;
  --blue: #1769aa;
  --cyan: #42b8c7;
  --amber: #f0a33b;
  --green: #227a5b;
  --red: #a23a47;
  --shadow: 0 16px 46px rgba(16, 35, 56, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 105, 170, .045) 1px, transparent 1px),
    linear-gradient(rgba(23, 105, 170, .045) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font: 16px/1.65 "Segoe UI", Tahoma, sans-serif;
}

a { color: var(--blue); }
a:hover { color: var(--navy); }
code, .mono { font-family: Consolas, "Courier New", monospace; }
code { color: #164e79; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--blue);
  border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 64px);
  color: #fff;
  background: rgba(8, 41, 71, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
}
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { color: #b8d3e5; font-size: 11px; letter-spacing: .12em; }
.menu-button {
  display: none;
  padding: 8px 11px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
}
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.nav a {
  padding: 7px 9px;
  color: #d8eaf5;
  text-decoration: none;
  border-radius: 7px;
  font-size: 13px;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(66, 184, 199, .22); }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(54px, 8vw, 100px) clamp(20px, 7vw, 110px) 60px;
  color: #fff;
  background: linear-gradient(128deg, #092a49 0%, #0d4779 58%, #137c8c 100%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  right: -110px;
  top: -210px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255,255,255,.04), 0 0 0 96px rgba(255,255,255,.025);
}
.eyebrow { margin: 0 0 12px; color: #8fe3eb; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 920px; margin: 0; font-size: clamp(38px, 6vw, 74px); line-height: 1.03; letter-spacing: -.035em; }
.hero .lede { max-width: 830px; margin: 24px 0 0; color: #dcebf3; font-size: clamp(17px, 2.1vw, 22px); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

.badge, .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
}
.badge { color: #e9f8fa; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.status.active, .status.pass { color: #155c43; background: #e0f3e9; }
.status.disabled, .status.conflict { color: #8d2938; background: #f9e3e6; }
.status.unknown, .status.pending { color: #7a4c09; background: #fff0d4; }
.status.info { color: #174d78; background: #e0eef8; }

.page { width: min(1440px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0 80px; }
.page.narrow { width: min(980px, calc(100% - 36px)); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 20px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 4vw, 42px); line-height: 1.1; letter-spacing: -.025em; }
.section-head p { max-width: 680px; margin: 8px 0 0; color: var(--muted); }
.section { margin-top: 52px; }

.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.card {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(16,35,56,.06);
}
a.card { color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: var(--shadow); }
.card .index { color: var(--blue); font: 700 12px/1 Consolas, monospace; letter-spacing: .12em; }
.card h3 { margin: 15px 0 7px; font-size: 21px; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); }
.card .arrow { display: block; margin-top: 18px; color: var(--blue); font-weight: 700; }
.metric { padding-left: 20px; border-left: 4px solid var(--cyan); }
.metric strong { display: block; font-size: 34px; line-height: 1.05; color: var(--navy); }
.metric span { color: var(--muted); }

.notice {
  padding: 18px 20px;
  background: #fff8e7;
  border: 1px solid #efd59f;
  border-left: 5px solid var(--amber);
  border-radius: 10px;
}
.notice.danger { background: #fff0f1; border-color: #ecc7cd; border-left-color: var(--red); }
.notice.info { background: #edf7fb; border-color: #b8dce7; border-left-color: var(--cyan); }
.notice p { margin: 0; }

.table-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.filter-input {
  width: min(420px, 100%);
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9c7d0;
  border-radius: 8px;
  font: inherit;
}
.filter-input:focus { outline: 3px solid rgba(66,184,199,.25); border-color: var(--cyan); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(16,35,56,.05); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid #e4eaee; }
th { position: sticky; top: 62px; z-index: 3; color: #fff; background: var(--navy); font-size: 12px; letter-spacing: .035em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f2f9fb; }
td code { white-space: nowrap; }

.flow { display: grid; gap: 10px; margin: 18px 0; }
.flow-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.flow-row strong { color: var(--navy); }
.flow-row span { color: var(--muted); }
.flow-row + .flow-row::before { content: "↓"; position: absolute; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.toc a { padding: 6px 10px; background: #e7f1f7; border: 1px solid #c9dce8; border-radius: 7px; text-decoration: none; font-size: 13px; }
.doc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-links a { padding: 7px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }

.footer { padding: 28px clamp(20px, 7vw, 110px); color: #b9cfde; background: #071f35; }
.footer a { color: #8fe3eb; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer p { margin: 0; }

@media (max-width: 900px) {
  .topbar { align-items: flex-start; }
  .menu-button { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 63px; padding: 12px 18px; background: #082947; box-shadow: var(--shadow); }
  .nav.open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .nav a { padding: 10px; }
  th { top: 62px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .brand small { display: none; }
  .hero { padding-top: 44px; }
  .page { width: min(100% - 24px, 1440px); }
  .section-head { align-items: start; flex-direction: column; }
  .flow-row { grid-template-columns: 1fr; gap: 4px; }
  .nav.open { grid-template-columns: 1fr; }
}

@media print {
  .topbar, .table-tools, .footer { display: none; }
  .hero { color: #000; background: none; padding: 20px 0; }
  .hero .lede { color: #333; }
  .page { width: 100%; padding: 0; }
  .card, .table-wrap { box-shadow: none; }
  th { position: static; color: #000; background: #eee; }
}
