:root {
  --ink: #0a0a0a;
  --paper: #f5f5f0;
  --muted: #5a5a52;
  --line: #c9c8bd;
  --accent: #c8102e;
  --safe: #116b4f;
  --info: #0f4c81;
  --font-head: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(16px, 3vw, 40px);
  background: rgba(245, 245, 240, 0.94);
  border-bottom: 1px solid var(--ink);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); font-family: var(--font-mono); font-size: 12px; }
.brand__text { font-family: var(--font-mono); text-transform: uppercase; font-size: 12px; letter-spacing: 0; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; font-family: var(--font-mono); font-size: 12px; }
.nav a { text-decoration: none; border-bottom: 1px solid transparent; padding: 5px 0; }
.nav a:hover, .nav .is-active { border-color: var(--accent); color: var(--accent); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--scroll-progress, 0) * 100%); background: var(--accent); }
.hero {
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: clamp(28px, 6vw, 72px);
  align-items: end;
  padding: clamp(54px, 8vw, 112px) clamp(16px, 5vw, 72px) 30px;
  border-bottom: 1px solid var(--ink);
}
.hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.94;
  font-weight: 700;
}
.deck { max-width: 760px; color: var(--muted); font-size: clamp(17px, 2vw, 22px); }
.kicker { margin: 0 0 10px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; }
.metric { border: 1px solid var(--ink); padding: 18px; background: #fffdf5; }
.metric span { display: block; font-family: var(--font-head); font-size: clamp(54px, 8vw, 112px); line-height: 0.9; }
.metric p { margin: 10px 0 0; color: var(--muted); font-family: var(--font-mono); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 12px/1 var(--font-mono);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button--quiet { border-color: var(--line); color: var(--muted); }
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 880px) minmax(220px, 320px);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 70px) clamp(16px, 4vw, 44px);
}
.article { min-width: 0; }
.block, .related, .callout, .admin-panel { border-top: 1px solid var(--ink); padding-top: 22px; margin-bottom: 34px; }
h2 { font-family: var(--font-head); font-size: clamp(27px, 3vw, 42px); line-height: 1; margin: 0 0 14px; }
p { margin: 0 0 14px; }
.checklist { display: grid; gap: 10px; padding: 0; list-style: none; }
.checklist li { border-left: 3px solid var(--safe); padding: 8px 0 8px 14px; background: rgba(17, 107, 79, 0.06); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { min-height: 126px; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--ink); text-decoration: none; background: #fffdf5; }
.card:hover { border-color: var(--accent); color: var(--accent); }
.card strong { font-family: var(--font-head); font-size: 22px; line-height: 1.05; color: var(--ink); }
.card span { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; background: #fffdf5; }
td { padding: 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.callout { border: 1px solid var(--ink); border-left: 6px solid var(--accent); padding: 16px; background: #fffdf5; }
.callout--danger { border-left-color: var(--accent); }
.toc {
  position: sticky;
  top: 76px;
  border: 1px solid var(--ink);
  padding: 14px;
  background: #fffdf5;
}
.toc a { display: block; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.toc__warning { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ink); color: var(--accent); font-family: var(--font-mono); font-size: 12px; }
.faq-list article { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-list h2 { font-size: clamp(22px, 2.4vw, 32px); }
.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  gap: 24px;
  padding: 30px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.footer p { color: #d7d7ce; max-width: 680px; }
.footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.admin-panel { max-width: 980px; margin: 40px auto; padding: 20px; border: 1px solid var(--ink); background: #fffdf5; }
.admin-panel label, .admin-panel dt { display: block; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.admin-panel select, textarea { width: 100%; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 10px; font: 13px/1.4 var(--font-mono); }
textarea { min-height: 150px; margin-top: 12px; }
.status { color: var(--info); font-family: var(--font-mono); }
@media (max-width: 860px) {
  .topbar, .hero, .content-grid, .footer { grid-template-columns: 1fr; }
  .nav { justify-content: flex-start; }
  .hero { min-height: auto; }
  .toc { position: static; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .brand__text { display: none; }
  .hero h1 { font-size: 42px; }
  .footer nav { grid-template-columns: 1fr; }
}