:root {
  --bg: #070a09;
  --bg-soft: #0a0f0d;
  --panel: #0e1512;
  --panel-2: #121b16;
  --line: #1d2923;
  --line-strong: #2a3a32;
  --text: #e9f1ec;
  --muted: #93a69b;
  --muted-2: #6d8077;
  --green: #3ee08c;
  --green-soft: #123526;
  --red: #ff6b6b;
  --red-soft: #351819;
  --amber: #ffc857;
  --amber-soft: #352a12;
  --blue: #6dc1ff;
  --blue-soft: #122835;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1000px 500px at 12% -10%, rgba(62, 224, 140, 0.08), transparent 60%),
    radial-gradient(800px 400px at 95% 0%, rgba(109, 193, 255, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, svg { max-width: 100%; }

a { color: var(--green); text-decoration: none; }
a:hover { color: #7ff0b6; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }

::selection { background: rgba(62, 224, 140, 0.28); color: #fff; }

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #04140c;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 9, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 66px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}
.brand:hover { color: var(--text); }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--green), #1a9e63);
  color: #04140c;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-right: auto;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: var(--green); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-user {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-check { display: none; }
.nav-toggle { display: none; }

.inline-form { display: inline; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green); color: #04140c; }
.btn-primary:hover { background: #6fecaa; color: #04140c; }

.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); }

.btn-danger { background: var(--red-soft); color: #ffb3b3; border-color: #5a2527; }
.btn-danger:hover { background: #4a2022; color: #fff; }

.btn-sm { padding: 8px 13px; font-size: 0.82rem; }
.btn-block { width: 100%; }

button.btn { appearance: none; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--panel-2);
  white-space: nowrap;
}

.tone-critical { background: var(--red-soft); color: #ff9a9a; border-color: #5a2527; }
.tone-high { background: #351d12; color: #ffab7a; border-color: #5a3220; }
.tone-medium { background: var(--amber-soft); color: var(--amber); border-color: #5a4a1f; }
.tone-low { background: var(--blue-soft); color: var(--blue); border-color: #1d4457; }
.tone-info { background: var(--panel-2); color: var(--muted); border-color: var(--line-strong); }
.tone-accepted, .tone-resolved { background: var(--green-soft); color: var(--green); border-color: #1d5c40; }
.tone-submitted { background: #1b2433; color: #9cc4ff; border-color: #2b3d5c; }
.tone-triaged { background: #231f35; color: #c0a8ff; border-color: #3b3158; }
.tone-needs_info { background: var(--amber-soft); color: var(--amber); border-color: #5a4a1f; }
.tone-closed, .tone-draft { background: var(--panel-2); color: var(--muted-2); border-color: var(--line); }

.verified {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- cards */

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.05rem; }

.program-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.program-card:hover { border-color: #2f6a4f; transform: translateY(-2px); }
.program-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.program-card h3 a { color: var(--text); }
.program-card h3 a:hover { color: var(--green); }

.program-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.program-tagline {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.program-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.bounty { color: var(--text); font-weight: 650; }

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  margin-top: auto;
}

/* ------------------------------------------------------------------ hero */

.hero { padding: 74px 0 44px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(62, 224, 140, 0.05);
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(62, 224, 140, 0.12); }

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 15ch;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--green); }

.hero-lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.16rem); max-width: 58ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 21, 18, 0.7);
  overflow: hidden;
}
.hero-stat { padding: 22px; border-right: 1px solid var(--line); }
.hero-stat:last-child { border-right: 0; }
.hero-stat strong { display: block; font-size: clamp(1.25rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; }
.hero-stat span { color: var(--muted); font-size: 0.8rem; }

/* --------------------------------------------------------------- sections */

.section { padding: 58px 0; }
.section-tight { padding: 34px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.section-head h2 { margin: 0 0 6px; }
.section-head p { color: var(--muted); margin: 0; max-width: 60ch; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 26px; align-items: start; }

/* ------------------------------------------------------------------ stats */

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.09em; }
.stat .value { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 650; letter-spacing: -0.02em; margin-top: 6px; }
.stat .value small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* ----------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.table thead th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-weight: 650;
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.015); }
.table a { color: var(--text); font-weight: 550; }
.table a:hover { color: var(--green); }
.table .mono { color: var(--muted); font-size: 0.82rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ forms */

form.form { display: block; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field .hint { font-size: 0.78rem; color: var(--muted); margin: 0; }
.field .error { font-size: 0.8rem; color: #ff9a9a; margin: 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  background: #0a100d;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #5d6f66; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(62, 224, 140, 0.12);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
textarea.short { min-height: 84px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #7a3033; }
.field.has-error > label { color: #ffb3b3; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 0.86rem; color: var(--muted); }
.check input { width: auto; margin-top: 3px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 650; margin-bottom: 12px; padding: 0; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ flash */

.flash {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-size: 0.9rem;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  transition: opacity 0.4s ease;
}
.flash-ok { border-color: #1d5c40; background: var(--green-soft); color: #b9ffd8; }
.flash-error { border-color: #5a2527; background: var(--red-soft); color: #ffc4c4; }
.flash-hide { opacity: 0; }
.flash-close { background: none; border: 0; color: inherit; font-size: 1.1rem; cursor: pointer; padding: 0 4px; }

.alert {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.alert strong { color: var(--text); }
.alert-warn { border-color: #5a4a1f; background: var(--amber-soft); color: #ffe0a3; }
.alert-error { border-color: #5a2527; background: var(--red-soft); color: #ffc4c4; }

/* ------------------------------------------------------------- page heads */

.page-head { padding: 40px 0 8px; }
.page-head h1 { margin-bottom: 10px; }
.page-head .lead { color: var(--muted); max-width: 68ch; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted-2); font-size: 0.82rem; margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { color: var(--muted-2); }

.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.title-row h1 { margin: 0; }

.meta-row { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 0.85rem; margin-top: 12px; }
.meta-row strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------- misc */

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.tiny { font-size: 0.74rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; border: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

.pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  line-height: 1.65;
  color: #cddcd4;
  margin: 0;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.01);
}
.empty h3 { color: var(--text); margin-bottom: 8px; }
.empty p { max-width: 52ch; margin: 0 auto 16px; }

.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; text-align: right; font-weight: 550; }

.pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--bg-soft); border-radius: 999px; padding: 4px 10px; font-size: 0.74rem; color: var(--muted); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 0.82rem;
  flex: 0 0 auto;
  border: 1px solid #1d5c40;
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs a { padding: 9px 13px; color: var(--muted); font-size: 0.88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--text); border-bottom-color: var(--green); }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filter-row input, .filter-row select { width: auto; min-width: 160px; }

.list { display: grid; gap: 12px; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .body { min-width: 0; flex: 1; }
.list-item .title { font-size: 0.9rem; font-weight: 550; }

.scope-asset { font-family: var(--mono); font-size: 0.84rem; color: var(--text); word-break: break-all; }

.steps, .rules { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.9rem; }
.steps li, .rules li { margin-bottom: 10px; padding-left: 4px; }
.steps li::marker { color: var(--green); font-weight: 700; }
.steps strong, .rules strong { color: var(--text); }

.safe-band { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.safe-band h2 { margin-bottom: 8px; }
.safe-band p { max-width: 62ch; }

.justify-center { justify-content: center; }

@media (max-width: 640px) {
  .safe-band { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------- comments */

.comment { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .body { min-width: 0; flex: 1; }
.comment .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 0.82rem; }
.comment .head strong { color: var(--text); }
.comment .head time { color: var(--muted-2); }
.comment.internal { background: rgba(255, 200, 87, 0.04); border-left: 2px solid #5a4a1f; padding-left: 14px; margin-left: -14px; }

/* ---------------------------------------------------------------- sidebar */

.sticky { position: sticky; top: 88px; }

.triage-actions form + form { margin-top: 12px; }

/* --------------------------------------------------------------- auth page */

.auth-wrap { display: grid; place-items: center; padding: 48px 0 64px; }
.auth-card { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); font-size: 0.94rem; margin-bottom: 22px; }
.auth-footer { margin-top: 20px; text-align: center; color: var(--muted); font-size: 0.86rem; }

.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.role-tab { display: block; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--muted); font-size: 0.88rem; text-align: center; font-weight: 600; }
.role-tab:hover { border-color: var(--green); color: var(--text); }
.role-tab.active { border-color: var(--green); background: var(--green-soft); color: var(--green); }

/* ------------------------------------------------------------- report view */

.report-title { font-size: clamp(1.4rem, 2.6vw, 2.1rem); margin: 8px 0 12px; }
.report-section { margin-bottom: 28px; }
.report-section h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--muted); font-size: 0.82rem; }

.payout-box { border: 1px solid #1d5c40; background: var(--green-soft); border-radius: var(--radius-sm); padding: 16px; }
.payout-box strong { font-size: 1.2rem; }

/* ----------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 48px 0 24px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 34px; }
.footer-grid h4 { margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--muted); font-size: 0.86rem; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--green); }
.footer-note { font-size: 0.86rem; max-width: 40ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 34px; padding-top: 18px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: -20px;
    right: -20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 18px;
    box-shadow: var(--shadow);
  }
  .nav-links a { padding: 9px 0; font-size: 0.95rem; width: 100%; }
  .nav-check { display: block; position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: auto;
    padding: 10px;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
  .nav-check:checked ~ .nav-links { display: flex; }
  .nav-check:focus-visible ~ .nav-toggle { outline: 2px solid var(--green); outline-offset: 2px; }
  .nav-actions { margin-left: 0; }
  .nav-user { display: none; }

  .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: 0; }
  .hero-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 46px 0 30px; }
  .hero h1 { max-width: none; }
  .hero-stats { margin-top: 36px; }
  .section { padding: 40px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .card, .panel { padding: 18px; }
  .auth-card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-actions .btn-ghost { display: none; }
  .meta-row { gap: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
