:root {
  --ink: #1b1714;
  --paper: #f6f1e8;
  --panel: #fffdf8;
  --line: #d7cfc3;
  --muted: #5c564e;
  --gum: #2f5d45;
  --gum-soft: #dce8df;
  --amber: #c27812;
  --amber-soft: #f4e4c6;
  --warn: #8a2f24;
  --warn-soft: #f3d7d3;
  --shadow: 0 10px 30px rgba(27, 23, 20, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: radial-gradient(1200px 600px at 10% -10%, #fff, var(--paper));
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--gum); }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 12px; background: #fff; padding: 8px; }
.site-header, .site-footer, .caution, .page-shell {
  width: min(1100px, calc(100% - 28px));
  margin-left: auto;
  margin-right: auto;
}
.site-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 0 8px;
}
.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-family: system-ui, sans-serif; font-size: 12px; }
nav {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-family: system-ui, sans-serif; font-size: 14px;
}
nav a { text-decoration: none; color: var(--ink); border-bottom: 1px solid transparent; }
nav a[aria-current="page"], nav a:hover { border-bottom-color: var(--gum); }
.caution {
  background: var(--amber-soft);
  border: 1px solid #e8c888;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
}
.kicker {
  font-family: system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(32px, 6vw, 52px); margin: 10px 0 12px; }
h2 { font-size: 26px; margin-top: 36px; }
p.lead { font-size: 1.15rem; max-width: 46rem; }
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
  margin: 24px 0 10px;
}
.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gum-soft);
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.card { padding: 16px 16px 14px; }
.card h3 { margin: 8px 0; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card a { font-family: system-ui, sans-serif; font-size: 14px; }
.steps { counter-reset: step; display: grid; gap: 12px; }
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
}
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #efe8dc; font-weight: 600; }
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: system-ui, sans-serif;
  margin: 12px 0 16px;
}
.filters button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.packet {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  margin: 18px 0 40px;
}
.park-list { display: grid; gap: 8px; }
.park-list button {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
}
.park-list button.active { border-color: var(--gum); background: var(--gum-soft); }
.packet-form label { display: block; font-family: system-ui, sans-serif; font-size: 13px; margin: 10px 0 4px; }
.packet-form input, .packet-form select, .packet-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
}
.packet-form textarea { min-height: 90px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions button, .actions a.btn {
  font-family: system-ui, sans-serif;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
}
.actions button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.yaml {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: #171411;
  color: #f3eadc;
  padding: 14px;
  border-radius: 14px;
  overflow: auto;
}
.gate-yes { color: #cde8d4; }
.gate-no { color: #ffd0c8; }
.site-footer {
  padding: 12px 72px 28px 0;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 13px;
}
.page-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 32px 0 18px;
  padding: 14px;
  font-family: system-ui, sans-serif;
  background: #1b1714;
  border-radius: 18px;
}
.page-pager a {
  text-decoration: none;
  color: #f6f1e8;
  background: #2c2621;
  border: 2px solid #f6f1e8;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.page-pager a:hover,
.page-pager a:focus-visible {
  background: #2f5d45;
  border-color: #f6f1e8;
}
.page-pager .pager-next {
  background: #f6f1e8;
  color: #1b1714;
  border-color: #f6f1e8;
}
.page-pager .pager-spacer { display: none; }
.page-pager a:only-child,
.page-pager .pager-next:only-of-type { grid-column: 1 / -1; }
.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border: 2px solid #f6f1e8;
  border-radius: 50%;
  background: #1b1714;
  color: #f6f1e8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 23, 20, 0.35);
  opacity: 1;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.back-to-top:active { transform: scale(0.96); }
@media (max-width: 820px) {
  .hero, .packet { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; }
  .page-pager { grid-template-columns: 1fr; }
}
