:root {
  color-scheme: light;
  --ink: #122033;
  --muted: #66768a;
  --line: #dbe4ed;
  --surface: #ffffff;
  --canvas: #f3f7fa;
  --navy: #0d233b;
  --navy-soft: #163652;
  --blue: #1473e6;
  --blue-dark: #0758b9;
  --critical: #cc3652;
  --critical-dark: #a9233c;
  --critical-soft: #fff0f3;
  --high: #dc741f;
  --high-soft: #fff5e8;
  --medium: #2175b4;
  --medium-soft: #edf7fd;
  --low: #547087;
  --low-soft: #f1f5f8;
  --green: #1f876c;
  --green-soft: #e9f8f3;
  --shadow: 0 18px 50px rgb(19 45 73 / 9%);
  --shadow-strong: 0 24px 70px rgb(13 35 59 / 16%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 94% 2%, rgb(20 115 230 / 9%), transparent 28rem),
    radial-gradient(circle at 5% 42%, rgb(204 54 82 / 5%), transparent 25rem),
    var(--canvas);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - 1480px) / 2));
  color: white;
  background: var(--navy);
  border-bottom: 3px solid var(--critical);
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px;
  font-weight: 900; letter-spacing: -.04em; background: var(--critical);
  box-shadow: 0 0 0 4px rgb(255 255 255 / 10%);
}
.brand strong { display: block; font-size: 18px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: #b9c9d9; font-size: 11px; }

.mode-switch {
  display: flex;
  align-items: center;
  padding: 4px;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 12px;
}
.mode-button {
  min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 18px;
  color: #c7d4e1; background: transparent; border: 0; border-radius: 8px; font-weight: 780;
}
.mode-button > span:first-child { color: #6e879e; font-size: 9px; }
.mode-button.is-active { color: var(--navy); background: white; box-shadow: 0 4px 16px rgb(0 0 0 / 16%); }
.mode-button.is-active > span:first-child { color: var(--critical); }

.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.language-button {
  min-width: 58px; min-height: 40px; padding: 0 12px; color: white; background: transparent;
  border: 1px solid rgb(255 255 255 / 32%); border-radius: 9px; font-weight: 850;
}
.language-button:hover, .button-ghost:hover { background: rgb(255 255 255 / 12%); }

.demo-banner {
  min-height: 35px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 18px; color: #684d1a; background: #fff7dc; border-bottom: 1px solid #f0dfa4;
  font-size: 11px; font-weight: 650; text-align: center;
}
.demo-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #df9d16; box-shadow: 0 0 0 4px rgb(223 157 22 / 14%); }

main { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 38px 0 56px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.025em; }
.hero-copy { max-width: 780px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }

.report-hero, .node-hero, .manage-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.emergency-callout {
  max-width: 470px; display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  color: #74283a; background: var(--critical-soft); border: 1px solid #efc1ca; border-radius: 14px;
}
.callout-icon {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  color: white; background: var(--critical); border-radius: 50%; font-weight: 900;
}
.emergency-callout strong { display: block; font-size: 13px; }
.emergency-callout p { margin: 4px 0 0; color: #8b5160; font-size: 11px; line-height: 1.55; }

.quick-sos {
  width: 100%; min-height: 78px; display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding: 12px 20px;
  color: white; text-align: left; background: linear-gradient(115deg, var(--critical), #e24a45); border: 0;
  border-radius: 17px; box-shadow: 0 16px 38px rgb(204 54 82 / 24%); transition: transform .16s ease, box-shadow .16s ease;
}
.quick-sos:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgb(204 54 82 / 30%); }
.quick-sos:disabled, .mobile-sos-button:disabled { cursor: wait; opacity: .58; transform: none; }
.quick-sos-mark {
  width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  color: var(--critical); background: white; font-size: 14px; font-weight: 950; letter-spacing: -.03em;
  box-shadow: 0 0 0 7px rgb(255 255 255 / 14%);
}
.quick-sos-copy { flex: 1; }
.quick-sos-copy strong, .quick-sos-copy small { display: block; }
.quick-sos-copy strong { font-size: 20px; letter-spacing: -.02em; }
.quick-sos-copy small { margin-top: 3px; color: #ffe3e7; font-size: 11px; }
.quick-sos-arrow { font-size: 25px; font-weight: 800; }
.mobile-sos-dock { display: none; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 20px; align-items: start; }
.report-form { overflow: hidden; padding: 26px; }
.form-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 17px; }
.form-heading h2 { font-size: 19px; }
.form-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.step-number {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  color: white; background: var(--navy); border-radius: 9px; font-size: 12px; font-weight: 850;
}
.choice-grid, .check-grid { margin: 0; padding: 0; border: 0; }
.type-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.type-choice {
  position: relative; min-height: 126px; display: grid; align-content: start; gap: 9px; padding: 15px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 13px; cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.type-choice:hover { transform: translateY(-2px); border-color: #a9c7e5; }
.type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice:has(input:checked) { background: #eef6ff; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(20 115 230 / 10%); }
.choice-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--blue); font-size: 18px; font-weight: 900; }
.choice-icon.medical { background: var(--critical); }
.choice-icon.trapped { background: #d76c22; }
.choice-icon.supply { background: #4477a6; }
.choice-icon.shelter { background: var(--green); }
.choice-icon.other { background: #6b7280; }
.type-choice strong, .type-choice small { display: block; }
.type-choice strong { font-size: 13px; }
.type-choice small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-divider { height: 1px; margin: 26px 0; background: var(--line); }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check-grid label {
  min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  color: #3d5268; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12px; font-weight: 680; cursor: pointer;
}
.check-grid label:has(input:checked) { color: var(--critical-dark); background: var(--critical-soft); border-color: #e7a9b5; }
.vulnerability-grid label:has(input:checked) { color: #0758a7; background: #eef6ff; border-color: #a6c9ed; }
.check-grid input { width: 17px; height: 17px; accent-color: var(--critical); }
.vulnerability-grid input { accent-color: var(--blue); }
.submit-zone { display: grid; grid-template-columns: 1fr minmax(220px, 310px); align-items: center; gap: 20px; margin: 28px -26px -26px; padding: 20px 26px; background: #f7f9fb; border-top: 1px solid var(--line); }
.privacy-inline strong, .privacy-inline span { display: block; }
.privacy-inline strong { font-size: 12px; }
.privacy-inline span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.sos-button {
  min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 13px; padding: 9px 22px;
  color: white; background: var(--critical); border: 0; border-radius: 13px; box-shadow: 0 12px 28px rgb(204 54 82 / 25%);
  transition: transform .16s ease, background .16s ease;
}
.sos-button:hover { transform: translateY(-2px); background: var(--critical-dark); }
.sos-button:disabled { cursor: wait; opacity: .58; transform: none; }
.sos-button strong, .sos-button small { display: block; text-align: left; }
.sos-button strong { font-size: 16px; }
.sos-button small { margin-top: 2px; color: #ffdce3; font-size: 9px; }
.sos-pulse { width: 17px; height: 17px; border: 4px solid white; border-radius: 50%; box-shadow: 0 0 0 6px rgb(255 255 255 / 16%); }

.report-aside { position: sticky; top: 18px; display: grid; gap: 16px; }
.report-result, .score-guide { padding: 22px; }
.report-result { overflow: hidden; position: relative; border-color: #9ed9c7; background: linear-gradient(145deg, white, #f1fbf7); }
.result-check { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 18px; color: white; background: var(--green); border-radius: 50%; font-weight: 900; }
.report-result h2 { margin-bottom: 8px; }
.report-result > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
.result-score { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; margin: 18px 0 12px; padding: 14px; background: white; border: 1px solid #c9e8de; border-radius: 11px; }
.result-score span { color: var(--muted); font-size: 11px; }
.result-score strong { grid-row: 1 / 3; grid-column: 2; font-size: 34px; line-height: 1; }
.result-score small { font-weight: 850; text-transform: uppercase; }
.result-level.level-critical { color: var(--critical); }
.result-level.level-high { color: var(--high); }
.result-level.level-medium { color: var(--medium); }
.result-level.level-low { color: var(--low); }
.report-result code { display: block; overflow: hidden; margin-bottom: 14px; color: #738293; font-size: 10px; text-overflow: ellipsis; }
.report-result .button { width: 100%; }
.score-guide ol { display: grid; gap: 0; margin: 18px 0; padding: 0; list-style: none; }
.score-guide li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.score-guide li:last-child { border-bottom: 0; }
.score-guide li > span { color: var(--blue); font-size: 10px; font-weight: 900; }
.score-guide li strong { display: block; font-size: 12px; }
.score-guide li p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.level-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.level-legend span { padding: 7px 4px; border-radius: 7px; font-size: 9px; font-weight: 850; text-align: center; }
.level-legend .critical { color: var(--critical); background: var(--critical-soft); }
.level-legend .high { color: var(--high); background: var(--high-soft); }
.level-legend .medium { color: var(--medium); background: var(--medium-soft); }
.level-legend .low { color: var(--low); background: var(--low-soft); }

.button {
  min-height: 39px; padding: 0 15px; border: 0; border-radius: 9px; font-weight: 760;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--navy); background: #eaf0f5; }
.button-secondary:hover { background: #dbe6ef; }
.button-danger { color: white; background: var(--critical); }
.button-danger:hover { background: var(--critical-dark); }
.button-ghost { color: white; background: transparent; border: 1px solid rgb(255 255 255 / 24%); }

.connection-card { min-width: 218px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.connection-card strong, .connection-card small { display: block; }
.connection-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.connection-dot { width: 11px; height: 11px; border-radius: 50%; background: #e5a52e; box-shadow: 0 0 0 5px rgb(229 165 46 / 13%); }
.connection-dot.is-online { background: var(--green); box-shadow: 0 0 0 5px rgb(31 135 108 / 13%); }
.connection-dot.is-offline { background: var(--critical); box-shadow: 0 0 0 5px rgb(204 54 82 / 13%); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { position: relative; overflow: hidden; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.metric::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--blue); }
.metric-critical::after { background: var(--critical); }
.metric-task::after { background: var(--green); }
.metric span, .metric small { display: block; color: var(--muted); }
.metric span { font-size: 13px; font-weight: 700; }
.metric strong { display: block; margin: 2px 0; font-size: 32px; letter-spacing: -.04em; }
.metric small { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, .7fr); gap: 18px; align-items: start; }
.queue-panel { min-height: 520px; overflow: hidden; }
.task-panel { position: sticky; top: 18px; padding-bottom: 18px; }
.panel-heading { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { min-height: 32px; padding: 0 12px; color: var(--muted); background: #f6f8fa; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; }
.filter.is-active { color: white; background: var(--navy); border-color: var(--navy); }
.queue-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 12px 20px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.queue-toolbar label { display: grid; gap: 4px; }
.queue-toolbar label span { color: var(--muted); font-size: 10px; font-weight: 750; }
.queue-toolbar select { min-width: 180px; height: 34px; padding: 0 10px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.queue-toolbar p { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.request-list { display: grid; }
.request-card { display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.request-card:last-child { border-bottom: 0; }
.score { display: grid; place-items: center; align-content: center; min-height: 82px; border-radius: 12px; color: var(--low); background: var(--low-soft); border: 1px solid #d8e1e8; }
.score strong { font-size: 30px; line-height: 1; }
.score small { margin-top: 6px; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.level-critical .score { color: var(--critical); background: var(--critical-soft); border-color: #efbbc5; }
.level-high .score { color: var(--high); background: var(--high-soft); border-color: #f2d3ac; }
.level-medium .score { color: var(--medium); background: var(--medium-soft); border-color: #bcd8eb; }
.request-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.request-title { margin: 0; font-size: 17px; }
.status-badge, .tag, .danger-tag, .count-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.status-badge { color: #31516f; background: #edf3f8; }
.request-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-bottom: 9px; color: var(--muted); font-size: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { color: #435b72; background: #f0f4f7; }
.danger-tag { color: var(--critical); background: var(--critical-soft); border: 1px solid #f0c1ca; }
.request-actions { display: grid; gap: 8px; min-width: 130px; }
.request-actions .button { width: 100%; }
.request-id { margin-top: 8px; color: #8997a6; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.empty-state { padding: 70px 24px; text-align: center; }
.empty-state strong { font-size: 18px; }
.empty-state p { max-width: 540px; margin: 10px auto 20px; color: var(--muted); line-height: 1.6; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.count-badge { min-width: 30px; justify-content: center; color: white; background: var(--blue); }
.task-list { display: grid; padding: 8px 18px 0; }
.task-item { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.task-item strong { font-size: 12px; }
.task-item p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.task-empty { display: grid; place-items: center; padding: 36px 24px; text-align: center; color: var(--muted); }
.task-empty span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; font-weight: 900; }
.task-empty p { max-width: 250px; margin: 10px 0 0; font-size: 11px; line-height: 1.6; }
.privacy-note { margin: 16px 18px 0; padding: 14px; color: #476078; background: #f4f8fb; border: 1px solid var(--line); border-radius: 10px; }
.privacy-note strong { display: block; margin-bottom: 4px; font-size: 11px; }
.privacy-note p { margin: 0; font-size: 10px; line-height: 1.6; }

.node-mode-badge {
  min-width: 270px; display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  color: #1d6554; background: var(--green-soft); border: 1px solid #b8e2d4; border-radius: 14px;
}
.node-mode-badge > span {
  width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
  color: white; background: var(--green); border-radius: 11px; font-size: 19px; font-weight: 900;
}
.node-mode-badge strong, .node-mode-badge small { display: block; }
.node-mode-badge strong { font-size: 11px; letter-spacing: .08em; }
.node-mode-badge small { margin-top: 3px; color: #548378; font-size: 10px; }
.node-layout { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr); gap: 18px; align-items: start; }
.node-form { padding: 28px; }
.node-form h2 { margin-bottom: 24px; }
.node-field { display: grid; gap: 8px; margin-top: 17px; }
.node-field > span { color: #40566c; font-size: 11px; font-weight: 800; }
.node-field input {
  width: 100%; min-height: 48px; padding: 0 14px; color: var(--ink); background: #fbfdff;
  border: 1px solid #cbd8e3; border-radius: 10px; outline: none;
}
.node-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(20 115 230 / 12%); }
.node-create-button { width: 100%; min-height: 50px; margin-top: 24px; }
.node-form-hint { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.node-side { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr); gap: 18px; align-items: stretch; }
.node-empty, .node-status-card, .node-capabilities { min-height: 290px; padding: 26px; }
.node-empty { display: grid; place-items: center; align-content: center; text-align: center; }
.node-empty-mark {
  width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--blue); background: #edf6ff; border: 1px solid #cae2fa; border-radius: 18px; font-size: 25px;
}
.node-empty h2 { margin-bottom: 9px; }
.node-empty > p:last-child { max-width: 410px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.node-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.active-badge {
  min-height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px;
  color: #166c55; background: var(--green-soft); border-radius: 999px; font-size: 10px; font-weight: 850;
}
.active-badge i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgb(31 135 108 / 13%); }
.node-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 6px 0 0; }
.node-details > div { min-width: 0; padding: 14px 12px 12px 0; border-bottom: 1px solid #edf1f5; }
.node-details > div:first-child { grid-column: 1 / -1; }
.node-details dt { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.node-details dd { margin: 0; font-size: 11px; font-weight: 700; }
.node-details code { display: block; overflow: hidden; color: #31516f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.node-details .simulated { color: var(--high); }
.node-capabilities h2 { margin-bottom: 18px; }
.node-capabilities ul { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.node-capabilities li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.node-capabilities li > span {
  width: 26px; height: 26px; display: grid; place-items: center; color: var(--green);
  background: var(--green-soft); border-radius: 8px; font-size: 11px; font-weight: 900;
}
.node-capabilities li.is-simulated > span { color: var(--high); background: var(--high-soft); }
.node-capabilities p { margin: 2px 0 0; color: #425a70; font-size: 10px; line-height: 1.55; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(430px, calc(100vw - 48px)); padding: 13px 16px; color: white; background: var(--navy); border-radius: 10px; box-shadow: 0 16px 48px rgb(0 0 0 / 24%); font-size: 12px; }
.toast.is-error { background: #8f263a; }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 1fr auto; }
  .mode-switch { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .report-hero { align-items: stretch; }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
  .check-grid { grid-template-columns: repeat(2, 1fr); }
  .node-side { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .report-hero, .node-hero, .manage-hero { display: grid; }
  .emergency-callout { max-width: none; }
  .report-layout, .workspace { grid-template-columns: 1fr; }
  .node-mode-badge { min-width: 0; }
  .node-layout { grid-template-columns: 1fr; }
  .report-aside, .task-panel { position: static; }
  .report-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  body { padding-bottom: 84px; }
  .mobile-sos-dock {
    position: fixed; inset: auto 0 0; z-index: 18; display: block; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 94%); border-top: 1px solid var(--line); box-shadow: 0 -12px 32px rgb(13 35 59 / 13%);
    backdrop-filter: blur(12px);
  }
  .mobile-sos-button {
    width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 11px;
    color: white; background: var(--critical); border: 0; border-radius: 14px; box-shadow: 0 10px 24px rgb(204 54 82 / 28%);
  }
  .mobile-sos-button span {
    width: 34px; height: 34px; display: grid; place-items: center; color: var(--critical); background: white;
    border-radius: 50%; font-size: 10px; font-weight: 950;
  }
  .mobile-sos-button strong { font-size: 16px; }
  .toast { bottom: 94px; }
  .topbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .brand { flex: 1 1 220px; }
  .topbar-actions { order: 2; }
  .mode-switch { order: 3; width: 100%; }
  .mode-button { flex: 1; justify-content: center; padding: 0 10px; }
  .mode-button > span:last-child { font-size: 11px; }
  main { width: min(100% - 28px, 1480px); padding-top: 26px; }
  h1 { font-size: 34px; }
  .report-form { padding: 18px; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .submit-zone { grid-template-columns: 1fr; margin: 24px -18px -18px; padding: 18px; }
  .report-aside { grid-template-columns: 1fr; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .request-card { grid-template-columns: 82px 1fr; }
  .request-actions { grid-column: 1 / -1; }
  .quick-sos { min-height: 72px; padding: 10px 15px; }
  .quick-sos-mark { width: 46px; height: 46px; }
  .quick-sos-copy strong { font-size: 17px; }
  .quick-sos-copy small { font-size: 9px; }
}

@media (max-width: 480px) {
  .brand small { max-width: 200px; }
  .demo-banner { justify-content: flex-start; text-align: left; }
  .type-grid, .check-grid, .metrics { grid-template-columns: 1fr; }
  .type-choice { min-height: 96px; grid-template-columns: 34px 1fr; align-items: start; }
  .type-choice > span:last-child { align-self: center; }
  .request-card { grid-template-columns: 1fr; }
  .score { min-height: 64px; grid-auto-flow: column; gap: 8px; }
  .node-side { grid-template-columns: 1fr; }
  .node-details { grid-template-columns: 1fr; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
}
