/* PhishGuard AI design system.
   Graphite surfaces, one ember accent, three typefaces with distinct jobs:
   Sora for headings, Manrope for reading, JetBrains Mono for numbers and evidence.
   All fonts are served from /static/fonts, so the app makes no outside requests. */

@font-face { font-family: "Sora"; font-weight: 400; font-display: swap; src: url("../fonts/sora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("../fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("../fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #141518;
  --surface: #1b1d21;
  --surface-2: #23262b;
  --surface-3: #2c3036;
  --line: #31353b;
  --line-soft: #26292e;
  --text: #ece8e2;
  --muted: #9b968e;
  --faint: #6f6b64;
  --ember: #f26a21;
  --ember-hover: #ff7d3a;
  --ember-ink: #1a0e07;
  --ember-soft: rgba(242, 106, 33, 0.14);
  --good: #52b788;
  --good-soft: rgba(82, 183, 136, 0.14);
  --bad: #e5534b;
  --bad-soft: rgba(229, 83, 75, 0.14);
  --warn: #e3a93c;
  --warn-soft: rgba(227, 169, 60, 0.14);
  --info: #6aa7e8;
  --info-soft: rgba(106, 167, 232, 0.13);
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sidebar: 252px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f1ec;
  --surface: #fdfcfa;
  --surface-2: #f0ece6;
  --surface-3: #e6e1d9;
  --line: #d9d3c9;
  --line-soft: #e8e3db;
  --text: #1d1b19;
  --muted: #625d55;
  --faint: #8a847a;
  --ember: #d9540f;
  --ember-hover: #bf4609;
  --ember-ink: #fff7f2;
  --ember-soft: rgba(217, 84, 15, 0.1);
  --good: #23704e;
  --good-soft: rgba(35, 112, 78, 0.1);
  --bad: #b4322b;
  --bad-soft: rgba(180, 50, 43, 0.09);
  --warn: #8a5d00;
  --warn-soft: rgba(138, 93, 0, 0.1);
  --info: #245f9e;
  --info-soft: rgba(36, 95, 158, 0.09);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; font-weight: 600; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--font-mono); }
small, .small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-variant-numeric: tabular-nums; }
input[type="hidden"] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 24px; height: 24px; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ app shell */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
}
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; padding: 2px 8px; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ember); color: var(--ember-ink); display: grid; place-items: center; }
.brand-mark .i { width: 18px; height: 18px; stroke-width: 2; }
.start-form { margin: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-s);
  color: var(--muted); font-weight: 600; font-size: 0.93rem;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--ember-soft); color: var(--ember); }
.nav-gap { flex: 1; }
.rank-card { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius-m); padding: 12px; }
.rank-card .name { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: baseline; }
.rank-card .xp { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.rank-card .streak { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.82rem; color: var(--muted); }
.rank-card .streak .i { color: var(--ember); width: 15px; height: 15px; }
.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--ember); border-radius: 99px; transition: width 0.4s ease; }
.bar.good > span { background: var(--good); }
.side-tools { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn[aria-pressed="true"] { color: var(--ember); border-color: var(--ember); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px 0; border-top: 1px solid var(--line-soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-row .who { min-width: 0; flex: 1; font-size: 0.86rem; line-height: 1.3; }
.user-row .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row form { margin: 0; }

.topbar { display: none; }
.main { min-width: 0; padding: 34px 44px 70px; }
.page { max-width: 1120px; margin: 0 auto; }
.page-narrow { max-width: 760px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); }

/* ------------------------------------------------------------ components */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  font: 600 0.93rem var(--font-body); border-radius: var(--radius-s); border: 1px solid transparent;
  background: var(--ember); color: var(--ember-ink); cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--ember-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: 0.6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover { background: var(--surface-3); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #cf4139; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.83rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-flat { background: transparent; }

.grid { display: grid; gap: 16px; }
.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)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { justify-content: space-between; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 0.84rem; }
.kpi .value { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 500; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.kpi .sub { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); font-size: 0.92rem; margin-bottom: 14px; }
.notice .i { margin-top: 2px; }
.notice > div > :last-child { margin-bottom: 0; }
.notice-success { background: var(--good-soft); border-color: transparent; color: var(--text); }
.notice-success .i { color: var(--good); }
.notice-error, .notice-danger { background: var(--bad-soft); border-color: transparent; }
.notice-error .i, .notice-danger .i { color: var(--bad); }
.notice-warning { background: var(--warn-soft); border-color: transparent; }
.notice-warning .i { color: var(--warn); }
.notice-info { background: var(--info-soft); border-color: transparent; }
.notice-info .i { color: var(--info); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.chip-ember { background: var(--ember-soft); color: var(--ember); }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-info { background: var(--info-soft); color: var(--info); }

/* forms */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field .help { color: var(--muted); font-size: 0.82rem; margin-top: 5px; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-s); font: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
:root[data-theme="light"] input[type="text"], :root[data-theme="light"] input[type="password"], :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
textarea { resize: vertical; min-height: 76px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ember); width: 17px; height: 17px; flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--bad); font-size: 0.86rem; }
.field-ok { color: var(--good); font-size: 0.84rem; margin-top: 5px; }
.field-bad { color: var(--bad); font-size: 0.84rem; margin-top: 5px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.82rem; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.me td { background: var(--ember-soft); }
.tbl .num { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.table-wrap { overflow-x: auto; }

.tabs { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: var(--radius-s); gap: 2px; }
.tabs a { padding: 6px 14px; border-radius: 5px; color: var(--muted); font-weight: 600; font-size: 0.88rem; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--text); }
.tabs a:hover { text-decoration: none; color: var(--text); }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .i-lg { color: var(--faint); margin-bottom: 8px; }

/* ------------------------------------------------------------ dashboard */
.incident-list { display: grid; gap: 10px; }
.incident {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.incident.is-next { border-color: var(--ember); }
.incident .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.incident.is-next .ic { background: var(--ember-soft); color: var(--ember); }
.incident h3 { margin: 0; font-size: 0.98rem; }
.incident p { margin: 2px 0 0; font-size: 0.86rem; color: var(--muted); }
.incident .score { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); text-align: right; margin-right: 6px; }
.incident form { margin: 0; flex: none; }
.incident .end { display: flex; align-items: center; gap: 10px; }

.radar { width: 100%; max-width: 300px; margin: 0 auto; display: block; }
.radar .ring { fill: none; stroke: #31353b; stroke: var(--line); stroke-width: 1; }
.radar .spoke { stroke: #26292e; stroke: var(--line-soft); stroke-width: 1; }
.radar .shape { fill: rgba(242, 106, 33, 0.18); fill: var(--ember-soft); stroke: #f26a21; stroke: var(--ember); stroke-width: 2; stroke-linejoin: round; }
.radar text { fill: #9b968e; fill: var(--muted); font: 600 10.5px var(--font-body); }

.miss-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.miss-row:last-child { border-bottom: 0; }
.miss-row .count { font-family: var(--font-mono); color: var(--muted); font-size: 0.82rem; }
.miss-row .bar { grid-column: 1 / -1; margin-top: 2px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; align-items: center; }
.activity li:last-child { border-bottom: 0; }
.activity a { color: var(--text); font-weight: 600; }
.mission .mission-title { font-weight: 600; margin-bottom: 2px; }

/* ------------------------------------------------------------ auth + landing */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-stage { padding: 56px 56px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.auth-form { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; max-width: 520px; width: 100%; margin: 0 auto; }
.auth-form h1 { margin-bottom: 6px; }
.stage-title { font-size: 2.1rem; max-width: 18ch; line-height: 1.15; }
.stage-title + p { color: var(--muted); max-width: 46ch; font-size: 1.02rem; }
.boot { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); min-height: 5.4em; }
.boot div { white-space: pre-wrap; }
.boot .ok { color: var(--good); }

.demo-mail { background: #fdfcfa; color: #1d1b19; border-radius: var(--radius-m); border: 1px solid #d9d3c9; max-width: 560px; font-size: 0.9rem; overflow: hidden; }
.demo-mail header { padding: 12px 16px; border-bottom: 1px solid #e8e3db; background: #f4f1ec; }
.demo-mail .from { font-weight: 700; }
.demo-mail .subj { color: #625d55; }
.demo-mail .body { padding: 14px 16px; }
.demo-mail .body p { margin: 0 0 8px; }
.demo-mail a.fakebtn { display: inline-block; background: #2b6fd6; color: #fff; padding: 7px 14px; border-radius: 4px; font-weight: 600; margin-top: 4px; }
.flagmark { position: relative; border-bottom: 2px dotted transparent; transition: border-color 0.3s, background 0.3s; }
.flagmark.on { border-color: #d9540f; background: rgba(217, 84, 15, 0.12); }
.flagmark .n { position: absolute; top: -9px; right: -6px; width: 17px; height: 17px; border-radius: 50%; background: #d9540f; color: #fff; font: 700 10px var(--font-mono); display: grid; place-items: center; opacity: 0; transform: scale(0.6); transition: 0.25s; }
.flagmark.on .n { opacity: 1; transform: scale(1); }
.flag-legend { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.88rem; }
.flag-legend li { opacity: 0.35; transition: opacity 0.3s; display: flex; gap: 8px; }
.flag-legend li.on { opacity: 1; color: var(--text); }
.flag-legend b { font-family: var(--font-mono); color: var(--ember); }

.landing { max-width: 1100px; margin: 0 auto; padding: 0 28px 80px; }
.topnav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; gap: 12px; }
.topnav .row { flex-wrap: nowrap; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 0 56px; }
.hero h1 { font-size: 2.6rem; line-height: 1.12; max-width: 14ch; }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 44ch; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 8px; }
.type-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.type-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; }
.type-tile .ic { color: var(--ember); margin-bottom: 10px; }
.type-tile h3 { font-size: 0.95rem; margin-bottom: 4px; }
.type-tile p { font-size: 0.84rem; color: var(--muted); margin: 0; }
.site-foot { border-top: 1px solid var(--line); margin-top: 60px; padding-top: 22px; color: var(--muted); font-size: 0.86rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }

/* library cards */
.card-list { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; }
.kcard h3 { margin-bottom: 6px; font-size: 0.98rem; }
.kcard p { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.kcard .src { font-size: 0.8rem; }

/* overlay while an incident is being prepared */
.overlay { position: fixed; inset: 0; background: rgba(10, 10, 12, 0.72); display: none; place-items: center; z-index: 90; backdrop-filter: blur(3px); }
.overlay.on { display: grid; }
.overlay .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px 32px; max-width: 360px; text-align: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--ember); animation: spin 0.8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.err-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.err-page .code { font-family: var(--font-mono); font-size: 4rem; color: var(--ember); line-height: 1; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 60; transform: translateX(-102%); transition: transform 0.22s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5); }
  .main { padding: 22px 16px 60px; }
  .grid-2, .grid-3, .steps, .card-list { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-stage { padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-form { padding: 28px 20px 48px; }
  .stage-title { font-size: 1.6rem; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 12px; }
  .hero h1 { font-size: 2rem; }
  .incident { grid-template-columns: 40px minmax(0, 1fr); }
  .incident .end { grid-column: 1 / -1; justify-content: space-between; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 1.5rem; }
  .type-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
