:root {
  --bg: #050b13;
  --bg-soft: #07111f;
  --panel: #0b1726;
  --panel-2: #0f1e31;
  --panel-3: #13263c;
  --line: #213750;
  --line-soft: rgba(130, 159, 190, 0.16);
  --text: #f3f6f8;
  --muted: #9aabbc;
  --muted-2: #71859a;
  --gold: #e3bb6b;
  --gold-bright: #f1d394;
  --gold-dark: #8f6e35;
  --teal: #66d7c1;
  --blue: #76a9ff;
  --green: #72d9a7;
  --amber: #f4c56d;
  --red: #ff8790;
  --red-dark: #792f3b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --radius-sm: 11px;
  --sidebar: 270px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 88% -10%, rgba(44, 91, 128, 0.22), transparent 32rem),
    radial-gradient(circle at 8% 110%, rgba(168, 126, 52, 0.11), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: var(--gold-bright); }

button { color: inherit; }

::selection { background: rgba(227, 187, 107, 0.28); color: #fff; }

:focus-visible {
  outline: 3px solid rgba(118, 169, 255, 0.92);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #07111f;
  font-weight: 800;
  transition: transform 150ms ease;
}

.skip-link:focus { transform: none; }

.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;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 24px 18px 20px;
  border-right: 1px solid var(--line-soft);
  background: rgba(6, 14, 24, 0.96);
  box-shadow: 14px 0 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 7px 20px;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(227, 187, 107, 0.5);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(227, 187, 107, 0.18), rgba(227, 187, 107, 0.03));
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
}

.brand-lockup strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-lockup span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.privacy-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 19px;
  padding: 8px 10px;
  border: 1px solid rgba(102, 215, 193, 0.19);
  border-radius: 999px;
  background: rgba(102, 215, 193, 0.055);
  color: #a5e9db;
  font-size: 11px;
  font-weight: 800;
}

.privacy-chip span { color: var(--teal); font-size: 8px; }

.primary-nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.nav-button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transform: translateX(2px);
}

.nav-button.is-active {
  border-color: rgba(227, 187, 107, 0.19);
  background: linear-gradient(90deg, rgba(227, 187, 107, 0.13), rgba(227, 187, 107, 0.025));
  color: #fff;
}

.nav-button.is-active span { background: rgba(227, 187, 107, 0.13); color: var(--gold-bright); }

.sidebar-footer {
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 11px;
}

.sidebar-footer p { margin: 0 0 6px; }
.sidebar-footer strong { color: var(--muted); }
.sidebar-footer a { color: var(--gold); text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 69px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(22px, 4vw, 54px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 11, 19, 0.84);
  backdrop-filter: blur(18px);
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(102, 215, 193, 0.08), 0 0 16px rgba(102, 215, 193, 0.42);
}

.topbar-actions, .page-head-actions, .button-row, .hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 820;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.button:hover { transform: translateY(-1px); border-color: #375474; }
.button:active { transform: none; }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.button-primary {
  border-color: #c79e50;
  background: linear-gradient(135deg, #f0d18f, #c29142);
  color: #10151c;
  box-shadow: 0 12px 28px rgba(195, 146, 66, 0.13);
}

.button-primary:hover { border-color: var(--gold-bright); box-shadow: 0 14px 32px rgba(195, 146, 66, 0.22); }
.button-secondary { background: rgba(15, 30, 49, 0.88); }
.button-quiet { min-height: 38px; padding: 8px 12px; border-color: transparent; background: transparent; color: var(--muted); }
.button-quiet:hover { border-color: var(--line); background: var(--panel); color: var(--text); }
.button-danger { border-color: rgba(255, 135, 144, 0.32); background: rgba(121, 47, 59, 0.13); color: #ffabb1; }
.button-danger:hover { border-color: rgba(255, 135, 144, 0.62); background: rgba(121, 47, 59, 0.23); }
.button-large { min-height: 50px; padding: 13px 20px; border-radius: 12px; }
.button-small { min-height: 35px; padding: 7px 11px; border-radius: 8px; font-size: 12px; }

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.mobile-only { display: none; }

main { width: min(1480px, 100%); margin: 0 auto; padding: 54px clamp(22px, 4vw, 58px) 90px; }

.view { display: none; animation: view-in 220ms ease both; }
.view.is-active { display: block; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { color: var(--text); line-height: 1.12; }
h1 { margin: 12px 0 15px; font-size: clamp(36px, 5vw, 66px); letter-spacing: -0.046em; }
h2 { margin: 6px 0 10px; font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -0.026em; }
h3 { margin: 3px 0 7px; font-size: 17px; letter-spacing: -0.015em; }
p { color: var(--muted); }

.eyebrow, .micro-label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.micro-label { color: var(--muted-2); letter-spacing: 0.14em; }
.muted { color: var(--muted); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(390px, 0.83fr);
  gap: clamp(30px, 5vw, 74px);
  align-items: center;
  min-height: 510px;
  padding: 30px 0 58px;
}

.hero-copy { max-width: 790px; }
.hero-copy h1 { max-width: 740px; }
.hero-lede { max-width: 720px; margin: 0 0 26px; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.65; }
.trust-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 25px; color: var(--muted-2); font-size: 11px; font-weight: 750; }
.trust-row span::before { content: "✓"; margin-right: 7px; color: var(--teal); }

.card, .card-flat, .card-elevated {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(16, 33, 53, 0.91), rgba(8, 20, 34, 0.91));
}

.card { padding: 22px; }
.card-flat { background: rgba(11, 23, 38, 0.72); }
.card-elevated { background: linear-gradient(145deg, rgba(17, 35, 55, 0.98), rgba(7, 18, 31, 0.98)); box-shadow: var(--shadow); }

.posture-panel { position: relative; overflow: hidden; padding: 25px; }
.posture-panel::before { position: absolute; top: -120px; right: -110px; width: 260px; height: 260px; border: 1px solid rgba(227, 187, 107, 0.11); border-radius: 50%; box-shadow: 0 0 0 35px rgba(227, 187, 107, 0.018), 0 0 0 70px rgba(227, 187, 107, 0.012); content: ""; }
.posture-head, .card-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.posture-head { position: relative; }
.posture-head strong { display: block; margin-top: 4px; font-size: 19px; }

.pill, .local-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.score-layout { position: relative; display: grid; grid-template-columns: 156px 1fr; gap: 24px; align-items: center; padding: 28px 0; }
.score-ring { --score: 0; display: grid; width: 150px; height: 150px; place-items: center; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--score) * 1%), rgba(255, 255, 255, 0.065) 0); box-shadow: 0 15px 50px rgba(0, 0, 0, 0.22); }
.score-ring::before { grid-area: 1/1; width: 126px; height: 126px; border: 1px solid var(--line-soft); border-radius: 50%; background: #091522; content: ""; }
.score-ring div { z-index: 1; grid-area: 1/1; text-align: center; }
.score-ring strong { display: block; font-size: 43px; line-height: 0.9; letter-spacing: -0.06em; }
.score-ring span { color: var(--muted-2); font-size: 10px; font-weight: 800; }
.score-context p { margin: 0 0 14px; font-size: 14px; }

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.text-button:hover { text-decoration: underline; }

.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--line-soft); }
.signal-grid div { padding: 13px 12px; background: rgba(7, 17, 31, 0.9); }
.signal-grid span { display: block; color: var(--muted-2); font-size: 9px; font-weight: 750; }
.signal-grid strong { display: block; margin-top: 3px; font-size: 19px; }

.section-heading { margin: 50px 0 18px; }
.section-heading h2 { margin-bottom: 0; }

.priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.priority-card { position: relative; min-height: 190px; padding: 20px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 16px; background: linear-gradient(145deg, rgba(15, 31, 50, 0.9), rgba(8, 18, 30, 0.8)); }
.priority-card::after { position: absolute; right: -25px; bottom: -45px; width: 110px; height: 110px; border: 1px solid rgba(227, 187, 107, 0.08); border-radius: 50%; content: ""; }
.priority-index { color: var(--gold); font-size: 11px; font-weight: 950; letter-spacing: 0.1em; }
.priority-card h3 { margin: 25px 0 8px; font-size: 18px; }
.priority-card p { margin: 0; font-size: 12px; }
.priority-card .priority-meta { display: flex; gap: 8px; margin-top: 15px; color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: 0.09em; }
.empty-priority { grid-column: 1 / -1; padding: 30px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
.span-2 { grid-column: span 2; }
.card-header { margin-bottom: 18px; }
.card-header h2 { margin-bottom: 0; font-size: 21px; }
.card-header .muted { font-size: 10px; }

.pillar-bars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.pillar-row { display: grid; gap: 8px; }
.pillar-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; }
.pillar-head strong { color: var(--text); }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.055); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9b7437, var(--gold-bright)); transition: width 320ms ease; }

.metric-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--line-soft); }
.metric-stack div { min-height: 100px; padding: 15px; background: rgba(7, 17, 31, 0.82); }
.metric-stack strong { display: block; font-size: 28px; letter-spacing: -0.04em; }
.metric-stack span { color: var(--muted-2); font-size: 10px; line-height: 1.35; }

.emergency-card { background: linear-gradient(145deg, rgba(50, 28, 31, 0.74), rgba(15, 23, 34, 0.88)); }
.emergency-card p { max-width: 650px; font-size: 13px; }
.quick-launches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.quick-launches button { padding: 8px 11px; border: 1px solid rgba(255, 135, 144, 0.23); border-radius: 9px; background: rgba(121, 47, 59, 0.13); color: #ffb1b7; font-size: 11px; font-weight: 800; cursor: pointer; }
.quick-launches button:hover { border-color: rgba(255, 135, 144, 0.5); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.page-head > div:first-child { max-width: 880px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 60px); }
.page-head p { max-width: 790px; margin: 0; font-size: 16px; }
.page-head-stat { flex: 0 0 auto; padding: 16px 20px; border-left: 2px solid var(--gold-dark); }
.page-head-stat strong { display: block; font-size: 30px; letter-spacing: -0.04em; }
.page-head-stat span { color: var(--muted-2); font-size: 10px; }

.assessment-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; }
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-button, .subtab { padding: 8px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.filter-button:hover, .subtab:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.filter-button.is-active, .subtab.is-active { border-color: rgba(227, 187, 107, 0.24); background: rgba(227, 187, 107, 0.1); color: var(--gold-bright); }
.assessment-legend { display: flex; gap: 17px; flex-wrap: wrap; margin: 17px 4px; color: var(--muted-2); font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--muted-2); }
.legend-dot.yes { background: var(--green); }
.legend-dot.partial { background: var(--amber); }
.legend-dot.no { background: var(--red); }

.assessment-list { display: grid; gap: 13px; }
.assessment-card { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; padding: 20px; border: 1px solid var(--line-soft); border-radius: 15px; background: rgba(10, 23, 38, 0.82); }
.assessment-card[data-answer="yes"] { border-color: rgba(114, 217, 167, 0.22); }
.assessment-card[data-answer="partial"] { border-color: rgba(244, 197, 109, 0.24); }
.assessment-card[data-answer="no"] { border-color: rgba(255, 135, 144, 0.28); }
.assessment-question { max-width: 830px; }
.assessment-question h3 { margin: 4px 0 8px; font-size: 16px; }
.assessment-question p { margin: 0; font-size: 12px; }
.assessment-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.critical-tag { color: #ff9fa7; }
.answer-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; min-width: 292px; }
.answer-option { position: relative; }
.answer-option input { position: absolute; opacity: 0; pointer-events: none; }
.answer-option span { display: grid; min-height: 37px; place-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 13, 23, 0.7); color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.answer-option input:focus-visible + span { outline: 3px solid rgba(118, 169, 255, 0.9); outline-offset: 2px; }
.answer-option input:checked + span { color: #06110d; }
.answer-option.answer-yes input:checked + span { border-color: var(--green); background: var(--green); }
.answer-option.answer-partial input:checked + span { border-color: var(--amber); background: var(--amber); color: #171107; }
.answer-option.answer-no input:checked + span { border-color: var(--red); background: var(--red); color: #21070a; }
.answer-option.answer-na input:checked + span { border-color: var(--muted); background: var(--muted); }

.plan-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-bottom: 27px; background: var(--line-soft); }
.plan-summary > div { padding: 22px; background: linear-gradient(145deg, rgba(17, 35, 55, 0.98), rgba(7, 18, 31, 0.98)); }
.plan-summary strong { display: block; margin: 4px 0 1px; font-size: 34px; letter-spacing: -0.05em; }
.plan-summary > div > span:last-child { color: var(--muted-2); font-size: 10px; }
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.roadmap-column { min-width: 0; border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(9, 21, 35, 0.68); }
.roadmap-head { padding: 16px; border-bottom: 1px solid var(--line-soft); }
.roadmap-head strong { display: block; font-size: 14px; }
.roadmap-head span { color: var(--muted-2); font-size: 9px; }
.roadmap-items { display: grid; gap: 8px; padding: 11px; }
.roadmap-item { padding: 13px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(14, 29, 47, 0.76); }
.roadmap-item strong { display: block; margin-bottom: 6px; font-size: 12px; }
.roadmap-item p { margin: 0; font-size: 10px; line-height: 1.5; }
.roadmap-item footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted-2); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.roadmap-empty { padding: 22px 8px; color: var(--muted-2); font-size: 10px; text-align: center; }

.fortress-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.fortress-card { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 15px; background: linear-gradient(155deg, rgba(16, 33, 53, 0.86), rgba(7, 17, 29, 0.82)); }
.fortress-title { padding: 17px; border-bottom: 1px solid var(--line-soft); }
.fortress-number { color: var(--gold-dark); font-size: 10px; font-weight: 950; letter-spacing: 0.13em; }
.fortress-title h3 { margin-top: 12px; font-size: 15px; }
.fortress-tasks { display: grid; padding: 10px; }
.task-check { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 8px 5px; color: var(--muted); font-size: 10px; cursor: pointer; }
.task-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--gold); }
.task-check:has(input:checked) span { color: var(--muted-2); text-decoration: line-through; }

.local-badge { border-color: rgba(102, 215, 193, 0.24); color: #9ce3d4; }
.tab-row { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.subtab { border-radius: 9px 9px 0 0; }
.subtab.is-active { border-bottom-color: transparent; }
.subview { display: none; }
.subview.is-active { display: block; }
.register-layout { display: grid; grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr); gap: 15px; align-items: start; }
.register-form { display: grid; gap: 13px; }
.register-form .button { width: 100%; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
input, select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #071421;
  color: var(--text);
}
input::placeholder { color: #52677d; }
input:hover, select:hover { border-color: #345371; }
.register-table-card { min-width: 0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; text-align: left; white-space: nowrap; }
.data-table th { color: var(--muted-2); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { color: var(--text); font-weight: 800; }
.status-chip { display: inline-block; padding: 4px 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.status-chip.good { background: rgba(114, 217, 167, 0.1); color: #8fe3bb; }
.status-chip.warn { background: rgba(244, 197, 109, 0.1); color: #f4cf89; }
.status-chip.bad { background: rgba(255, 135, 144, 0.11); color: #ff9ea6; }
.row-delete { padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted-2); font-size: 13px; cursor: pointer; }
.row-delete:hover { border-color: rgba(255, 135, 144, 0.25); color: var(--red); }
.empty-state { display: grid; min-height: 230px; place-items: center; align-content: center; padding: 30px; color: var(--muted-2); text-align: center; }
.empty-state > span { margin-bottom: 10px; color: var(--gold-dark); font-size: 32px; }
.empty-state strong { color: var(--muted); font-size: 14px; }
.empty-state p { max-width: 480px; margin: 7px 0 0; font-size: 10px; }

.incident-head { align-items: center; }
.emergency-note { flex: 0 0 auto; padding: 14px 17px; border: 1px solid rgba(255, 135, 144, 0.26); border-radius: 12px; background: rgba(121, 47, 59, 0.12); }
.emergency-note strong, .emergency-note span { display: block; }
.emergency-note strong { color: #ffabb1; font-size: 12px; }
.emergency-note span { color: var(--muted); font-size: 9px; }
.incident-principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--line-soft); }
.incident-principles div { display: flex; align-items: center; gap: 10px; padding: 13px; background: rgba(8, 20, 34, 0.9); }
.incident-principles strong { color: var(--gold-dark); font-size: 10px; }
.incident-principles span { color: var(--muted); font-size: 10px; font-weight: 750; }
.incident-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.incident-card { display: grid; min-height: 190px; align-content: space-between; padding: 17px; border: 1px solid var(--line-soft); border-radius: 15px; background: linear-gradient(145deg, rgba(14, 29, 47, 0.88), rgba(7, 17, 29, 0.8)); cursor: pointer; transition: border-color 150ms ease, transform 150ms ease; }
.incident-card { width: 100%; color: var(--text); text-align: left; }
.incident-card:hover { border-color: rgba(227, 187, 107, 0.32); transform: translateY(-2px); }
.incident-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: rgba(227, 187, 107, 0.09); color: var(--gold); font-weight: 950; }
.incident-card h3 { margin: 22px 0 6px; }
.incident-card p { margin: 0; font-size: 10px; }
.incident-open { margin-top: 17px; color: var(--gold); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.incident-workspace { margin-top: 18px; padding: 25px; scroll-margin-top: 95px; }
.incident-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.incident-workspace-head h2 { font-size: 30px; }
.incident-warning { max-width: 900px; margin: 17px 0; padding: 12px 14px; border-left: 3px solid var(--red); background: rgba(121, 47, 59, 0.1); color: #e5b9bd; font-size: 11px; }
.response-list { display: grid; gap: 8px; counter-reset: response-step; }
.response-step { display: grid; grid-template-columns: 28px 18px 1fr; gap: 10px; align-items: start; padding: 13px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(6, 16, 28, 0.62); }
.response-step::before { counter-increment: response-step; content: counter(response-step, decimal-leading-zero); color: var(--gold-dark); font-size: 9px; font-weight: 900; }
.response-step input { width: 15px; height: 15px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--gold); }
.response-step strong { display: block; margin-bottom: 4px; font-size: 12px; }
.response-step p { margin: 0; font-size: 10px; }
.response-step:has(input:checked) { opacity: 0.62; }
.response-step:has(input:checked) strong { text-decoration: line-through; }
.incident-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 17px; }

.travel-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 36px; }
.travel-hero > div:first-child { max-width: 800px; }
.travel-hero h1 { margin-bottom: 10px; font-size: clamp(40px, 5vw, 64px); }
.travel-hero p { margin: 0; max-width: 720px; }
.travel-toggle-wrap { display: grid; flex: 0 0 auto; place-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.switch { position: relative; width: 62px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 99px; background: #071421; cursor: pointer; transition: background 170ms ease, border-color 170ms ease; }
.switch > span:first-child { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform 170ms ease, background 170ms ease; }
.switch[aria-checked="true"] { border-color: rgba(102, 215, 193, 0.5); background: rgba(102, 215, 193, 0.15); }
.switch[aria-checked="true"] > span:first-child { transform: translateX(30px); background: var(--teal); }
.travel-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin: 15px 0; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--line-soft); }
.travel-metrics div { padding: 15px 20px; background: rgba(8, 20, 34, 0.88); }
.travel-metrics span, .travel-metrics strong { display: block; }
.travel-metrics span { color: var(--muted-2); font-size: 9px; text-transform: uppercase; }
.travel-metrics strong { margin-top: 2px; font-size: 20px; }
.travel-checklists { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.travel-group { border: 1px solid var(--line-soft); border-radius: 15px; background: rgba(10, 23, 38, 0.75); }
.travel-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px; border-bottom: 1px solid var(--line-soft); }
.travel-group-head strong { font-size: 15px; }
.travel-group-head span { color: var(--muted-2); font-size: 9px; }
.travel-tasks { display: grid; padding: 9px 13px; }
.travel-task { display: grid; grid-template-columns: 18px 1fr; gap: 9px; padding: 10px 4px; color: var(--muted); font-size: 11px; cursor: pointer; }
.travel-task + .travel-task { border-top: 1px solid rgba(130, 159, 190, 0.08); }
.travel-task input { width: 15px; height: 15px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--teal); }
.travel-task:has(input:checked) { color: var(--muted-2); text-decoration: line-through; }
.callout-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 15px; border-color: rgba(227, 187, 107, 0.2); }
.callout-card > div { min-width: 220px; }
.callout-card p { flex: 1; margin: 0; font-size: 12px; }

.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.resource-card { display: grid; min-height: 210px; align-content: space-between; padding: 20px; border: 1px solid var(--line-soft); border-radius: 16px; background: linear-gradient(145deg, rgba(15, 31, 50, 0.86), rgba(8, 18, 30, 0.78)); text-decoration: none; }
.resource-card:hover { border-color: rgba(227, 187, 107, 0.32); }
.resource-org { color: var(--gold); font-size: 9px; font-weight: 950; letter-spacing: 0.12em; }
.resource-card h3 { margin-top: 23px; }
.resource-card p { margin: 0; font-size: 11px; }
.resource-link { margin-top: 18px; color: var(--gold-bright); font-size: 10px; font-weight: 850; }
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.glossary details { border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(10, 23, 38, 0.72); }
.glossary summary { padding: 14px 16px; color: var(--text); font-size: 12px; font-weight: 850; cursor: pointer; }
.glossary p { margin: 0; padding: 0 16px 15px; font-size: 11px; }

.privacy-seal { display: grid; width: 88px; height: 88px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(102, 215, 193, 0.35); border-radius: 50%; color: var(--teal); font-size: 10px; font-weight: 950; letter-spacing: 0.12em; line-height: 1.35; text-align: center; box-shadow: inset 0 0 0 8px rgba(102, 215, 193, 0.025); }
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.privacy-grid .card { display: grid; align-content: start; }
.privacy-grid h2 { font-size: 21px; }
.static-list { margin: 8px 0 0; padding: 0; list-style: none; }
.static-list li { position: relative; padding: 6px 0 6px 22px; color: var(--muted); font-size: 11px; }
.static-list li::before { position: absolute; left: 0; color: var(--teal); content: "✓"; }
.file-button { position: relative; overflow: hidden; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.danger-zone { border-color: rgba(255, 135, 144, 0.2); }
.data-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 14px; padding: 0; overflow: hidden; background: var(--line-soft); }
.data-facts div { padding: 18px; background: rgba(8, 20, 34, 0.92); }
.data-facts strong, .data-facts span { display: block; }
.data-facts strong { font-size: 17px; }
.data-facts span { color: var(--muted-2); font-size: 9px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 22px clamp(22px, 4vw, 58px); border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 9px; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; width: min(360px, calc(100vw - 48px)); gap: 8px; }
.toast { padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #102238; color: var(--text); box-shadow: var(--shadow); font-size: 11px; animation: toast-in 180ms ease both; }
.toast.error { border-color: rgba(255, 135, 144, 0.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.confirm-dialog { width: min(470px, calc(100vw - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #0b1929; color: var(--text); box-shadow: var(--shadow); }
.confirm-dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); }
.confirm-dialog form { padding: 25px; }
.confirm-dialog h2 { margin-top: 10px; }
.confirm-dialog p { font-size: 12px; }
.button-row.end { justify-content: flex-end; margin-top: 22px; }

.print-protocol { display: none; }

@media (max-width: 1180px) {
  :root { --sidebar: 238px; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 900px; }
  .posture-panel { max-width: 720px; }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .fortress-grid { grid-template-columns: repeat(3, 1fr); }
  .incident-grid { grid-template-columns: repeat(3, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  body.nav-open { overflow: hidden; }
  .sidebar { transform: translateX(-101%); width: min(290px, calc(100vw - 50px)); transition: transform 190ms ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.62); content: ""; }
  .workspace { margin-left: 0; }
  .mobile-only { display: grid; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .topbar-actions .button-quiet { display: none; }
  main { padding-top: 36px; }
  .dashboard-grid, .register-layout { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .assessment-card { grid-template-columns: 1fr; }
  .answer-group { min-width: 0; }
  .fortress-grid { grid-template-columns: repeat(2, 1fr); }
  .incident-grid { grid-template-columns: repeat(2, 1fr); }
  .callout-card { display: grid; }
}

@media (max-width: 660px) {
  .topbar { min-height: 60px; padding: 9px 14px; }
  .topbar-context span:last-child { display: none; }
  .topbar-actions .button-primary { min-height: 37px; padding: 8px 10px; font-size: 10px; }
  main { padding: 30px 14px 65px; }
  h1 { font-size: 40px; }
  .hero-grid { gap: 22px; padding: 12px 0 36px; }
  .hero-lede { font-size: 16px; }
  .hero-actions .button { width: 100%; }
  .posture-panel { padding: 18px; }
  .score-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .signal-grid, .metric-stack, .plan-summary, .data-facts { grid-template-columns: 1fr; }
  .priority-grid, .pillar-bars, .travel-checklists, .privacy-grid, .resource-grid, .glossary { grid-template-columns: 1fr; }
  .dashboard-grid { gap: 12px; }
  .section-heading, .page-head, .travel-hero { display: grid; align-items: start; }
  .page-head-actions .button { width: 100%; }
  .assessment-toolbar { align-items: flex-start; }
  .assessment-toolbar, .incident-workspace-head { display: grid; }
  .answer-group { grid-template-columns: repeat(2, 1fr); }
  .roadmap, .fortress-grid, .incident-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .incident-principles { grid-template-columns: repeat(2, 1fr); }
  .travel-hero { padding: 24px 20px; }
  .travel-toggle-wrap { justify-items: start; }
  .travel-metrics { grid-template-columns: 1fr 1fr 1fr; }
  .tab-row { overflow-x: auto; }
  .subtab { white-space: nowrap; }
  .site-footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  @page { margin: 0.55in; }
  body { background: #fff !important; color: #111 !important; font-family: Arial, sans-serif; }
  .sidebar, .topbar, .site-footer, .page-head-actions, .assessment-toolbar, .toast-region, .confirm-dialog, .button, .text-button, .local-badge { display: none !important; }
  .workspace { margin: 0 !important; }
  main { width: 100%; max-width: none; padding: 0 !important; }
  .view { display: none !important; }
  body.print-plan #view-plan { display: block !important; }
  body.print-protocol-mode .view { display: none !important; }
  body.print-protocol-mode .print-protocol { display: block !important; }
  h1, h2, h3, p, .muted, .micro-label, .eyebrow { color: #111 !important; }
  h1 { font-size: 30pt !important; }
  .card, .card-elevated, .card-flat, .roadmap-column, .roadmap-item, .fortress-card { border-color: #bbb !important; background: #fff !important; box-shadow: none !important; break-inside: avoid; }
  .plan-summary { border: 1px solid #bbb; background: #ddd !important; }
  .plan-summary > div { background: #fff !important; }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .fortress-grid { grid-template-columns: repeat(3, 1fr); }
  .task-check { color: #222 !important; }
  .task-check input { appearance: none; width: 11px; height: 11px; border: 1px solid #333; }
  .task-check input:checked::after { display: block; content: "✓"; font-size: 9px; line-height: 9px; }
  .print-protocol h1 { margin-bottom: 24px; }
  .print-protocol p, .print-protocol li { color: #111 !important; font-size: 12pt; }
  .print-protocol li { margin: 12px 0; }
  .print-fields { display: grid; gap: 24px; margin: 40px 0; }
  .print-protocol .small { margin-top: 40px; font-size: 9pt; }
}
