/* CLERS design system — folded from the EchoCAD dispatch-grade dark UI.
   Depth comes from surface tint + hairline borders, not shadows.
   IBM Plex Sans (UI) + IBM Plex Mono (request numbers, ORI, timestamps). */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/plex-sans-var.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('/assets/fonts/merriweather-var.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg-base: #07090c;
  --bg-sunken: #04050a;
  --surface-1: #0e1116;
  --surface-2: #151a21;
  --surface-3: #1b222b;
  --surface-inset: #0a0c10;

  --border-subtle: #1a212a;
  --border-default: #232c37;
  --border-strong: #36424f;

  --text-primary: #e8ecf2;
  --text-secondary: #97a2b2;
  --text-tertiary: #616d7d;
  --text-disabled: #424c59;
  --text-on-accent: #ffffff;

  --brand-blue: #2196f3;
  --brand-blue-dark: #1976d2;
  --brand-blue-light: #42a5f5;
  --brand-blue-soft: rgba(33, 150, 243, 0.14);
  --brand-green: #149e60;
  --brand-green-dark: #0f7d4b;
  --brand-red: #ed3b43;

  --priority-1: #ed3b43;
  --priority-2: #d98a2b;
  --priority-3: #2e73d6;
  --priority-4: #828b99;

  --success: #2ad06a;
  --success-soft: rgba(42, 208, 106, 0.16);
  --warning: #f7a91e;
  --warning-soft: rgba(247, 169, 30, 0.16);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.18);
  --info: #20c5e0;
  --info-soft: rgba(32, 197, 224, 0.14);
  --neutral-soft: rgba(130, 139, 153, 0.16);

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  --control-h: 42px;
  --control-h-lg: 46px;

  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 8px 28px rgba(0, 0, 0, 0.7);
  --ring-focus: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--brand-blue);

  --dur-fast: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font: 400 15px/1.45 var(--font-sans);
  min-height: 100vh;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-blue-light); }

h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--text-secondary); }
img { max-width: 100%; }

.mono { font-family: var(--font-mono); }

.flag-stripe {
  height: 3px;
  background: linear-gradient(90deg, #b22234 0 33%, #e8ecf2 33% 40%, #2196f3 40% 100%);
}

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

.microlabel {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.badge-blue { color: var(--brand-blue-light); background: var(--brand-blue-soft); }
.badge-navy { color: var(--info); background: var(--info-soft); }
.badge-amber { color: var(--warning); background: var(--warning-soft); }
.badge-red { color: var(--danger); background: var(--danger-soft); }
.badge-green { color: var(--success); background: var(--success-soft); }
.badge-gray { color: var(--text-secondary); background: var(--neutral-soft); }

.urgency-critical { color: #fff; background: var(--priority-1); animation: pulse 2s ease-in-out infinite; }
.urgency-high { color: #fff; background: var(--priority-2); }
.urgency-medium { color: #fff; background: var(--priority-3); }
.urgency-low { color: #fff; background: var(--priority-4); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot-green { background: var(--success); }
.dot-amber { background: var(--warning); }
.dot-red { background: var(--danger); }
.dot-gray { background: var(--priority-4); }
.dot-blue { background: var(--brand-blue); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 13.5px/1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--brand-blue); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--brand-blue-dark); color: var(--text-on-accent); }
.btn-go { background: var(--brand-green); color: var(--text-on-accent); }
.btn-go:hover { background: var(--brand-green-dark); color: var(--text-on-accent); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-secondary { background: var(--surface-3); border-color: var(--border-strong); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border-strong); color: var(--text-primary); }
.btn-ghost { background: transparent; border-color: var(--border-default); color: var(--text-secondary); }
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text-primary); }

.btn-lg { height: var(--control-h-lg); font-size: 14.5px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Forms ---------- */

.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font: 500 12px/1 var(--font-sans);
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.field .hint { font-size: 11.5px; color: var(--text-tertiary); margin-top: 5px; line-height: 1.4; }
.field .error-text { font-size: 12px; color: var(--danger); margin-top: 5px; }
.req { color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-sunken);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: 400 14.5px/1.4 var(--font-sans);
  padding: 0 12px;
  height: var(--control-h);
  transition: border-color var(--dur-fast) var(--ease);
}
.textarea { padding: 10px 12px; height: auto; min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--text-disabled); }
.input.mono { font-family: var(--font-mono); font-size: 13.5px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2397a2b2' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
select.select option { background: var(--surface-2); }

.checkline { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.checkline input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand-blue); flex: none; }
.checkline label { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

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

fieldset.fset {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 18px 6px;
  margin: 0 0 20px;
}
fieldset.fset legend {
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue-light);
  padding: 0 8px;
}

.otp-input {
  font: 700 28px/1 var(--font-mono);
  letter-spacing: 0.5em;
  text-align: center;
  height: 62px;
  text-indent: 0.5em;
}

/* ---------- Cards / panels ---------- */

.card {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.card-head .microlabel { flex: none; }
.card-head .spacer, .row .spacer { flex: 1; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 6px 18px 12px; }

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 0 18px 10px; }
.kv { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--border-subtle); min-width: 0; }
.kv .k { font: 500 9.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.kv .v { font-size: 13.5px; color: var(--text-primary); margin-top: 5px; line-height: 1.4; overflow-wrap: break-word; }
.kv .v.mono { font-size: 12.5px; }

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.alert-info { background: var(--brand-blue-soft); border-color: rgba(33, 150, 243, 0.35); color: var(--brand-blue-light); }
.alert-success { background: var(--success-soft); border-color: rgba(42, 208, 106, 0.35); color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: rgba(247, 169, 30, 0.35); color: var(--warning); }
.alert-danger { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.4); color: #f87171; }

/* ---------- Public layout ---------- */

.pub-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 9, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-default);
}
.pub-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.wordmark { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.wordmark .wm-main { font: 700 19px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--text-primary); }
.wordmark .wm-sub { font: 500 8px/1 var(--font-mono); letter-spacing: 0.09em; color: var(--text-tertiary); margin-top: 4px; text-transform: uppercase; }
.pub-nav { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.pub-nav a:not(.btn) {
  color: var(--text-secondary);
  font: 500 13.5px/1 var(--font-sans);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
}
.pub-nav a:not(.btn):hover { color: var(--text-primary); background: var(--surface-2); }
.pub-nav .btn { margin-left: 8px; }

.pub-main { max-width: 1120px; margin: 0 auto; padding: 36px 20px 70px; }
.pub-main.narrow { max-width: 640px; }

.hero { text-align: center; padding: 64px 0 30px; }
.hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--brand-blue-light);
  background: var(--brand-blue-soft);
  border: 1px solid rgba(33, 150, 243, 0.3);
  padding: 7px 13px;
  border-radius: 999px;
  text-transform: uppercase;
}
.hero h1 { font-size: 42px; letter-spacing: -0.02em; margin: 22px 0 14px; }
.hero .sub { font-size: 17px; color: var(--text-secondary); max-width: 620px; margin: 0 auto 30px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 44px 0; }
.feature {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
}
.feature .f-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-blue-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature .f-icon svg { width: 18px; height: 18px; color: var(--brand-blue); }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { font-size: 13px; margin: 0; line-height: 1.55; }

.step-list { counter-reset: step; display: grid; gap: 0; margin: 30px 0; }
.step-item { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border-subtle); }
.step-item::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font: 700 17px/1 var(--font-mono);
  color: var(--brand-blue);
  padding-top: 2px;
}

.pub-footer { border-top: 1px solid var(--border-default); background: var(--surface-inset); }
.pub-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.pub-footer-inner a { color: var(--text-tertiary); }
.pub-footer-inner a:hover { color: var(--text-secondary); }
.pub-footer .foot-logo { height: 18px; opacity: 0.55; }

/* ---------- Console shell (strip + sidebar + main) ---------- */

.shell { display: flex; flex-direction: column; min-height: 100vh; }

.strip {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-default);
  font: 400 11px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
}
.strip .s-brand { font-weight: 700; color: var(--text-primary); }
.strip .s-sep { color: var(--border-strong); }
.strip .s-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.strip .s-secure { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-green); }
.strip .s-clock { color: var(--text-primary); font-weight: 600; }

.shell-body { display: flex; flex: 1; min-height: 0; }

.sidebar {
  width: 216px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border-right: 1px solid var(--border-default);
}
.sidebar-head { padding: 18px 16px 14px; border-bottom: 1px solid var(--border-subtle); }
.sidebar-head img { height: 22px; display: block; opacity: 0.9; }
.sidebar-head .wm-main { font: 700 19px/1 var(--font-mono); letter-spacing: 0.12em; margin-top: 10px; }
.sidebar-head .wm-sub { font: 500 9px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--text-tertiary); margin-top: 4px; text-transform: uppercase; }

.sidebar-nav { padding: 10px 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.snav {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  margin: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font: 500 13px/1 var(--font-sans);
}
.snav svg { width: 16px; height: 16px; color: var(--text-tertiary); flex: none; }
.snav:hover { background: var(--surface-2); color: var(--text-primary); }
.snav.active {
  background: var(--brand-blue-soft);
  color: var(--text-primary);
  box-shadow: inset 2px 0 0 var(--brand-blue);
}
.snav.active svg { color: var(--brand-blue); }
.snav.snav-sub {
  height: 30px;
  padding-left: 38px;
  font-size: 12px;
}
.snav.snav-sub.active { box-shadow: inset 2px 0 0 var(--brand-blue); }

.snav .count {
  margin-left: auto;
  font: 600 10.5px/1 var(--font-mono);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
}

.sidebar-section { padding: 14px 16px 4px; }

.sidebar-foot {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font: 600 11px/1 var(--font-mono);
  color: var(--brand-blue);
  flex: none;
}
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who .nm { font: 600 12.5px/1.2 var(--font-sans); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .who .rl { font: 400 10px/1 var(--font-mono); letter-spacing: 0.05em; color: var(--text-tertiary); margin-top: 3px; text-transform: uppercase; }

.main { flex: 1; min-width: 0; padding: 20px 24px 48px; overflow-x: hidden; }
.main-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.main-head h1 { font-size: 20px; margin: 0; }
.main-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); margin-bottom: 12px; flex-wrap: wrap; }
.crumbs .mono { font-size: 11px; }

.menu-toggle { display: none; }

/* ---------- Stat tiles ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.stat .s-label { font: 500 9.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.stat .s-value { font: 700 30px/1.1 var(--font-mono); margin-top: 8px; }
.stat .s-meta { font-size: 11.5px; color: var(--text-tertiary); margin-top: 5px; }
.stat.hot { border-color: rgba(237, 59, 67, 0.5); }
.stat.hot .s-value { color: var(--priority-1); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-1); margin-bottom: 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left;
  font: 600 9.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-inset);
  white-space: nowrap;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td a.rowlink { color: var(--text-primary); font-weight: 600; }
table.tbl td .mono { font-size: 11.5px; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 150px; height: 36px; font-size: 13px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font: 500 12px/1 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
}
.chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.chip.on { background: var(--brand-blue-soft); border-color: var(--brand-blue); color: var(--brand-blue-light); }

.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font: 500 12px/1 var(--font-mono); color: var(--text-tertiary); }
.pager a { padding: 7px 11px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-secondary); }
.pager a:hover { border-color: var(--border-strong); color: var(--text-primary); }

/* ---------- Stepper (request progress) ---------- */

.stepper {
  display: flex;
  align-items: flex-start;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.stepper .st { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: none; min-width: 64px; }
.stepper .st .st-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.stepper .st .st-dot svg { width: 9px; height: 9px; color: #fff; }
.stepper .st .st-label { font: 600 9.5px/1.2 var(--font-mono); letter-spacing: 0.07em; color: var(--text-disabled); text-transform: uppercase; text-align: center; }
.stepper .st .st-time { font: 400 9px/1 var(--font-mono); color: var(--text-disabled); }
.stepper .st.done .st-dot { border-color: var(--brand-green); background: var(--brand-green); }
.stepper .st.done .st-label { color: var(--text-secondary); }
.stepper .st.now .st-dot { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.stepper .st.now .st-label { color: var(--brand-blue-light); }
.stepper .st.bad .st-dot { border-color: var(--danger); background: var(--danger-soft); }
.stepper .st.bad .st-label { color: var(--danger); }
.stepper .st-line { flex: 1; height: 1px; background: var(--border-default); margin: 9px 10px 0; min-width: 18px; }
.stepper .st-line.done { background: var(--brand-green); }

/* ---------- Detail layout ---------- */

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }

.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-row h1 { font-size: 20px; margin: 0; }
.meta-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.meta-row .mono { font-size: 11px; color: var(--text-tertiary); }

.sla-chip {
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--warning);
  background: var(--warning-soft);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.sla-chip.overdue { color: #fff; background: var(--priority-1); animation: pulse 2s ease-in-out infinite; }

/* ---------- Documents / attachments ---------- */

.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: var(--surface-2); }
.doc-ico {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--brand-blue-soft);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.doc-ico svg { width: 15px; height: 15px; color: var(--brand-blue); }
.doc-row .d-name { font: 500 12px/1.3 var(--font-mono); color: var(--text-primary); overflow-wrap: anywhere; }
.doc-row .d-meta { font: 400 9.5px/1 var(--font-mono); letter-spacing: 0.05em; color: var(--text-tertiary); margin-top: 3px; text-transform: uppercase; }
.doc-row .d-main { flex: 1; min-width: 0; }
.doc-row .d-actions { display: flex; gap: 10px; align-items: center; flex: none; }
.doc-row .d-actions a { color: var(--text-tertiary); display: flex; }
.doc-row .d-actions a:hover { color: var(--brand-blue); }
.doc-row .d-actions svg { width: 15px; height: 15px; }

/* ---------- Activity timeline ---------- */

.tl { padding: 14px 18px 4px; }
.tl-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-rail .dot { margin-top: 4px; width: 8px; height: 8px; }
.tl-rail .line { width: 1px; flex: 1; background: var(--border-subtle); margin: 4px 0; }
.tl-body { padding-bottom: 16px; }
.tl-body .t-text { font-size: 12.5px; color: var(--text-primary); line-height: 1.4; }
.tl-body .t-meta { font: 400 9.5px/1 var(--font-mono); letter-spacing: 0.05em; color: var(--text-tertiary); margin-top: 3px; text-transform: uppercase; }

/* ---------- Chat ---------- */

.chat-panel { display: flex; flex-direction: column; min-height: 320px; max-height: 560px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; }
.msg .m-bubble {
  padding: 9px 13px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg .m-meta { font: 400 9.5px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--text-tertiary); margin-top: 4px; text-transform: uppercase; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .m-bubble { background: var(--brand-blue-soft); border: 1px solid rgba(33, 150, 243, 0.3); text-align: left; }
.msg.theirs { align-self: flex-start; }
.msg.theirs .m-bubble { background: var(--surface-3); border: 1px solid var(--border-default); }
.msg.internal .m-bubble { background: var(--warning-soft); border: 1px solid rgba(247, 169, 30, 0.35); }
.msg.system { align-self: center; text-align: center; max-width: 100%; }
.msg.system .m-bubble { background: transparent; border: 0; font: 500 11px/1.4 var(--font-mono); color: var(--text-tertiary); letter-spacing: 0.04em; }
.chat-compose { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border-subtle); align-items: flex-end; }
.chat-compose .textarea { min-height: 42px; max-height: 140px; flex: 1; }

/* ---------- Media browser ---------- */

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.media-card {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
}
.media-card:hover { border-color: var(--border-strong); }
.media-thumb {
  aspect-ratio: 4 / 3;
  background: var(--surface-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb svg { width: 34px; height: 34px; color: var(--text-disabled); }
.media-card .m-info { padding: 9px 11px; }
.media-card .m-name { font: 500 11px/1.3 var(--font-mono); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card .m-meta { font: 400 9.5px/1 var(--font-mono); color: var(--text-tertiary); margin-top: 4px; text-transform: uppercase; }

/* ---------- Upload dropzone ---------- */

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-inset);
  padding: 26px 18px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand-blue); background: var(--brand-blue-soft); color: var(--brand-blue-light); }
.dropzone input[type="file"] { display: none; }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font: 500 12px/1 var(--font-mono);
  color: var(--text-secondary);
}
.file-pill .x { margin-left: auto; cursor: pointer; color: var(--text-tertiary); background: none; border: 0; font-size: 15px; line-height: 1; padding: 2px; }
.file-pill .x:hover { color: var(--danger); }

/* ---------- Auth screens ---------- */

.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px; }
.auth-logo { height: 28px; opacity: 0.85; }
.auth-wordmark { font: 700 38px/1 var(--font-mono); letter-spacing: 0.18em; margin-top: 18px; text-indent: 0.18em; }
.auth-sub { font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--text-tertiary); margin-top: 8px; text-transform: uppercase; }
.auth-card {
  width: 100%;
  max-width: 420px;
  margin-top: 32px;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 22px 20px;
}
.auth-foot { font-size: 12px; color: var(--text-secondary); margin-top: 22px; text-align: center; }
.auth-legal { font: 400 10px/1.6 var(--font-mono); letter-spacing: 0.08em; color: var(--text-disabled); margin-top: 14px; text-transform: uppercase; text-align: center; }

/* ---------- Misc ---------- */

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.muted { color: var(--text-tertiary); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border-subtle); margin: 16px 0; border: 0; }

.prose { color: var(--text-secondary); line-height: 1.65; font-size: 14px; }
.prose h1, .prose h2, .prose h3 { margin-top: 22px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose blockquote { border-left: 3px solid var(--border-strong); margin: 12px 0; padding: 2px 14px; color: var(--text-tertiary); }
.prose code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 5px; border-radius: 3px; }

.empty {
  text-align: center;
  padding: 44px 18px;
  color: var(--text-tertiary);
  font-size: 13.5px;
}
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; color: var(--text-disabled); }

.honeytrap { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

::selection { background: rgba(33, 150, 243, 0.35); }

/* ---------- Print (chain of custody / packet) ---------- */

@media print {
  body { background: #fff; color: #111; font-size: 12px; }
  .pub-header, .pub-footer, .sidebar, .strip, .no-print, .btn { display: none !important; }
  .main { padding: 0; }
  .card, .table-wrap { border-color: #bbb; background: #fff; box-shadow: none; }
  .card-head, table.tbl th { background: #f2f2f2; color: #333; }
  h1, h2, h3, h4, .kv .v, table.tbl td, .tl-body .t-text { color: #111; }
  .kv .k, .microlabel, .tl-body .t-meta { color: #555; }
  a { color: #111; }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .hero { padding: 40px 0 20px; }
  .main { padding: 14px 14px 40px; }
  .main-head .actions { margin-left: 0; width: 100%; }

  .shell-body { position: relative; }
  .sidebar {
    position: fixed;
    inset: 30px auto 0 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 200ms var(--ease);
    box-shadow: var(--shadow-pop);
    height: calc(100vh - 30px);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    width: 30px; height: 24px;
    cursor: pointer;
    padding: 0;
  }
  .menu-toggle svg { width: 14px; height: 14px; }
  .scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 55;
    display: none;
  }
  .scrim.show { display: block; }
  .strip { position: sticky; top: 0; z-index: 50; }
  .strip .s-hide-m { display: none; }
}

/* ============================================================
   Civic theme — light public/portal/auth surfaces.
   White canvas, navy #1a4480 / #112e51, flag red #b31942,
   Merriweather display type. Scoped to body.civic so the dark
   console tokens above are untouched.
   ============================================================ */

body.civic {
  --bg-base: #ffffff;
  --bg-sunken: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #e7f1f9;
  --surface-inset: #f5f7fa;

  --border-subtle: #e9ebed;
  --border-default: #dfe1e2;
  --border-strong: #565c65;

  --text-primary: #1b1b1b;
  --text-secondary: #565c65;
  --text-tertiary: #757575;
  --text-disabled: #adadad;

  --brand-blue: #1a4480;
  --brand-blue-dark: #16386b;
  --brand-blue-light: #16386b;
  --brand-blue-soft: #e7f1f9;
  --brand-green: #0f7d4b;
  --brand-green-dark: #0a5c37;
  --brand-red: #b31942;

  --priority-1: #b31942;
  --priority-2: #b45309;
  --priority-3: #1a4480;
  --priority-4: #6b7480;

  --success: #0f7d4b;
  --success-soft: rgba(15, 125, 75, 0.1);
  --warning: #8a5700;
  --warning-soft: rgba(180, 131, 9, 0.12);
  --danger: #b31942;
  --danger-soft: rgba(179, 25, 66, 0.07);
  --info: #005ea2;
  --info-soft: #e7f1f9;
  --neutral-soft: #f0f0f0;

  --link: #005ea2;
  --navy-deep: #112e51;
  --navy-foot-text: #9aa8c0;
  --font-display: 'Merriweather', Georgia, serif;

  --shadow-md: 0 4px 14px rgba(17, 46, 81, 0.12);
  --shadow-pop: 0 8px 28px rgba(17, 46, 81, 0.18);
  --ring-focus: 0 0 0 2px #ffffff, 0 0 0 4px var(--brand-blue);
}

body.civic a:not(.btn) { color: var(--link); }
body.civic a:not(.btn):hover { color: var(--brand-blue-dark); }
body.civic .prose a, body.civic p a, body.civic .small a, body.civic .hint a { text-decoration: underline; }

body.civic a.btn-primary, body.civic a.btn-primary:hover,
body.civic a.btn-go, body.civic a.btn-go:hover { color: var(--text-on-accent); }
body.civic a.btn-ghost { color: var(--text-secondary); }
body.civic a.btn-ghost:hover { color: var(--text-primary); }

body.civic h1, body.civic h2 { font-family: var(--font-display); font-weight: 900; color: var(--navy-deep); }
body.civic h1 { font-size: 34px; }
body.civic h2 { font-size: 26px; }
body.civic h3, body.civic h4 { color: var(--navy-deep); font-weight: 700; }

body.civic ::selection { background: rgba(26, 68, 128, 0.2); }

/* Official-service banner + tricolor stripe */

body.civic .flag-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red) 0 33.4%, #ffffff 33.4% 66.7%, var(--brand-blue) 66.7%);
  border-top: 1px solid #d6d7d9;
  border-bottom: 1px solid #d6d7d9;
}

.gov-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 3px 20px;
  background: #f0f0f0;
  font-size: 12px;
  color: var(--text-primary);
}
.gov-banner a { color: var(--link); text-decoration: underline; }
.gov-flag {
  width: 16px;
  height: 11px;
  display: inline-block;
  position: relative;
  background: repeating-linear-gradient(180deg, var(--brand-red) 0 1.6px, #ffffff 1.6px 3.2px);
  border: 1px solid #d6d7d9;
  flex: none;
}
.gov-flag::before { content: ''; position: absolute; left: 0; top: 0; width: 7px; height: 6px; background: var(--brand-blue); }

/* Header */

body.civic .pub-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-default);
}
body.civic .pub-header-inner { height: 76px; gap: 28px; }
body.civic .wordmark { flex-direction: row; align-items: center; gap: 12px; }
body.civic .wordmark svg { width: 30px; height: 30px; color: var(--brand-blue); flex: none; }
body.civic .wordmark .wm-stack { display: flex; flex-direction: column; }
body.civic .wordmark .wm-main {
  font: 900 21px/1 var(--font-display);
  letter-spacing: 0.02em;
  color: var(--navy-deep);
}
body.civic .wordmark .wm-sub {
  font: 400 10.5px/1.2 var(--font-sans);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-top: 3px;
  text-transform: uppercase;
}
body.civic .pub-nav { gap: 18px; }
body.civic .pub-nav a:not(.btn) {
  color: var(--link);
  font: 400 14px/1 var(--font-sans);
  padding: 30px 2px;
  border-radius: 0;
}
body.civic .pub-nav a:not(.btn):hover { color: var(--navy-deep); background: transparent; }
body.civic .pub-nav a.active {
  font-weight: 700;
  color: var(--navy-deep);
  box-shadow: inset 0 -3px 0 var(--brand-red);
}
body.civic .pub-nav .btn { height: 40px; font-size: 14px; padding: 0 18px; }

body.civic .pub-nav-inline,
body.civic .pub-nav-inline.pub-nav {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-left: auto;
}
body.civic .pub-nav-inline a:not(.btn) { padding: 9px 12px; }
body.civic .pub-nav-inline .btn-sm { height: 34px; font-size: 12.5px; padding: 0 12px; }
body.civic .btn-secondary.btn-sm { border-width: 1px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--brand-blue);
  cursor: pointer;
  padding: 0;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Footer — navy, two tiers */

body.civic .pub-footer { background: var(--navy-deep); border-top: 0; }
body.civic .pub-footer-inner { font-size: 13px; color: #d6dbe4; }
body.civic .pub-footer-inner a { color: #ffffff; text-decoration: underline; }
body.civic .pub-footer-inner a:hover { color: #ffffff; }
body.civic .pub-footer .foot-logo { height: 20px; opacity: 0.95; }
.foot-tier2 { border-top: 1px solid rgba(255, 255, 255, 0.18); }
.foot-tier2 .pub-footer-inner { padding: 16px 20px; font-size: 12.5px; color: var(--navy-foot-text); }
.foot-tier2 .foot-mono {
  font: 400 11.5px/1 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--navy-foot-text);
}

/* Full-bleed band pages */

.pub-main.bleed { max-width: none; padding: 0; }
.pub-main.bleed > .alert { max-width: 1080px; margin: 16px auto; }
.cwrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Hero */

body.civic .hero { padding: 68px 0 56px; }
body.civic .hero .hero-badge {
  font: 600 12.5px/1 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
  border: 0;
  border-radius: var(--radius-md);
  padding: 7px 14px;
}
body.civic .hero h1 { font-size: 46px; line-height: 1.18; letter-spacing: 0; max-width: 820px; margin: 22px auto 0; }
.hero-rule { width: 64px; height: 4px; background: var(--brand-red); margin: 22px auto 0; border: 0; }
body.civic .hero .sub { margin-top: 20px; max-width: 720px; line-height: 1.65; }
body.civic .hero-actions { margin-top: 30px; }

/* Eyebrow + section headers */

.eyebrow {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-red);
}
.section-head { text-align: center; }
.section-head h2 { font-size: 30px; margin: 10px 0 0; }
.section-head .section-sub { font-size: 15px; color: var(--text-secondary); max-width: 640px; margin: 12px auto 0; line-height: 1.6; }

/* Navy promise bar */

.promise-bar { background: var(--navy-deep); }
.promise-bar .cwrap {
  padding-top: 24px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.promise {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.promise svg { width: 22px; height: 22px; color: #7fa6d9; flex: none; }
.promise .p-head { display: block; font-size: 15px; font-weight: 700; color: #ffffff; }
.promise .p-sub { display: block; font-size: 12.5px; color: var(--navy-foot-text); margin-top: 2px; }

/* Bands */

.band { padding: 56px 0; }
.band-gray { background: var(--surface-2); border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }
.cta-band { background: #eff6fb; border-top: 1px solid var(--border-default); }
.cta-band .cwrap { padding-top: 44px; padding-bottom: 44px; text-align: center; }
.cta-band p { font-size: 14.5px; }

/* Tiles */

body.civic .feature h3 { font-size: 16.5px; margin: 14px 0 0; }
body.civic .feature p { font-size: 14px; margin: 8px 0 0; line-height: 1.6; }
body.civic .feature .f-icon { width: 42px; height: 42px; border-radius: var(--radius-md); margin-bottom: 0; }
body.civic .feature .f-icon svg { width: 20px; height: 20px; }
.rail-top { border-top: 3px solid var(--brand-blue) !important; }
.tile-row { display: flex; align-items: center; gap: 10px; }
.tile-row svg { width: 20px; height: 20px; color: var(--brand-blue); flex: none; }
.tile-row h3 { font-size: 15.5px; margin: 0; }

/* Red-railed callout */

.callout-red {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--brand-red);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.callout-red svg { width: 17px; height: 17px; color: var(--brand-red); flex: none; margin-top: 2px; }

/* Compliance framework rows */

.comp-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-default);
}
.comp-row:last-child { border-bottom: 0; }
.comp-tag {
  font: 700 12px/1.3 var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--navy-deep);
  background: var(--brand-blue-soft);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  text-align: center;
}
.comp-row .comp-desc { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* Check bullets */

.check-bullets { display: flex; flex-direction: column; gap: 10px; }
.check-bullets .cb { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.check-bullets .cb svg { width: 15px; height: 15px; color: var(--brand-blue); flex: none; margin-top: 2px; }

/* Hash-chain chips */

.chain-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chain-chip {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background: var(--surface-2);
}
.chain-chip .c-n { display: block; font: 700 12px/1.3 var(--font-mono); color: var(--navy-deep); }
.chain-chip .c-e { display: block; font: 400 11px/1.3 var(--font-mono); color: var(--brand-red); margin-top: 3px; }
.chain-chip .c-h { display: block; font: 400 11px/1.3 var(--font-mono); color: var(--text-secondary); margin-top: 3px; }
.chain-strip > svg { width: 15px; height: 15px; color: var(--brand-blue); flex: none; }

/* Step numerals */

body.civic .step-item { gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--border-default); }
body.civic .step-item::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  font: 700 16px/36px var(--font-display);
  text-align: center;
  padding-top: 0;
}
body.civic .step-item h4 { font-size: 16px; }

/* Panels / cards */

body.civic .card-head { background: var(--surface-2); border-bottom-color: var(--border-default); padding: 12px 18px; }
body.civic .card-head .microlabel { font-size: 11px; letter-spacing: 0.1em; color: var(--navy-deep); }
body.civic .kv .k { color: var(--text-secondary); font-weight: 600; font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.04em; text-transform: none; }
body.civic .kv { border-bottom-color: var(--border-default); }

/* Buttons */

body.civic .btn-primary:focus-visible, body.civic .btn:focus-visible { box-shadow: var(--ring-focus); }
body.civic .btn-secondary {
  background: #ffffff;
  border: 2px solid var(--brand-blue);
  color: var(--brand-blue);
}
body.civic .btn-secondary:hover { background: var(--brand-blue-soft); color: var(--brand-blue); }
body.civic .btn-go { background: var(--brand-blue); }
body.civic .btn-go:hover { background: var(--brand-blue-dark); }
body.civic .btn-lg { font-size: 15px; }

/* Forms */

body.civic .input, body.civic .select, body.civic .textarea { border-color: var(--border-strong); }
body.civic .input:focus, body.civic .select:focus, body.civic .textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
body.civic .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23565c65' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
body.civic select.select option { background: #ffffff; }
body.civic .field > label { color: var(--text-primary); font-weight: 600; font-size: 13px; }
body.civic .field .hint { color: var(--text-secondary); font-size: 12.5px; }
body.civic .req { color: var(--brand-red); }
body.civic fieldset.fset { border-color: var(--border-default); }
body.civic fieldset.fset legend {
  font: 700 14px/1 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy-deep);
  padding: 0 8px;
}
body.civic .checkline input[type="checkbox"] { width: 18px; height: 18px; }
body.civic .checkline label { color: var(--text-secondary); font-size: 13.5px; }
body.civic .checkline label strong { color: var(--text-primary); }
body.civic .dropzone { border-color: var(--text-disabled); background: #fbfcfd; color: var(--text-secondary); }
body.civic .dropzone:hover, body.civic .dropzone.drag { border-color: var(--brand-blue); background: var(--brand-blue-soft); color: var(--brand-blue); }
body.civic .dropzone svg { color: var(--brand-blue); }

/* Alerts */

body.civic .alert-info { background: var(--brand-blue-soft); border-color: rgba(26, 68, 128, 0.3); color: var(--brand-blue); }
body.civic .alert-success { background: var(--success-soft); border-color: rgba(15, 125, 75, 0.35); color: var(--success); }
body.civic .alert-warning { background: var(--warning-soft); border-color: rgba(138, 87, 0, 0.35); color: var(--warning); }
body.civic .alert-danger { background: var(--danger-soft); border-color: rgba(179, 25, 66, 0.35); color: var(--danger); }

/* Portal strip */

body.civic .strip { background: var(--surface-2); border-bottom-color: var(--border-default); color: var(--text-secondary); }
body.civic .strip .s-brand { color: var(--navy-deep); }
body.civic .strip .s-secure { color: var(--brand-green); }
body.civic .strip .s-clock { color: var(--text-primary); }

/* Auth screens */

body.civic .auth-wrap svg.auth-shield { width: 44px; height: 44px; color: var(--brand-blue); }
body.civic .auth-wordmark {
  font: 900 34px/1 var(--font-display);
  letter-spacing: 0.02em;
  color: var(--navy-deep);
  text-indent: 0;
}
body.civic .auth-sub { font: 400 11px/1.4 var(--font-sans); letter-spacing: 0.08em; color: var(--text-secondary); }
body.civic .auth-card { border-top: 3px solid var(--brand-blue); border-radius: var(--radius-md); }
body.civic .auth-legal { font-size: 10.5px; color: var(--text-tertiary); }

/* Stat tiles on light */

body.civic .stat .s-value { color: var(--navy-deep); }
body.civic .stat.hot { border-color: rgba(179, 25, 66, 0.4); }
body.civic .stat.hot .s-value { color: var(--brand-red); }

/* Print */

@media print {
  .gov-banner, .nav-toggle { display: none !important; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Civic mobile */

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .promise-bar .cwrap { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .promise { justify-content: flex-start; }
  .comp-row { grid-template-columns: 1fr; gap: 8px; align-items: start; }
  .comp-tag { justify-self: start; }
}

@media (max-width: 768px) {
  body.civic .pub-header-inner { height: 60px; gap: 12px; }
  body.civic .wordmark svg { width: 24px; height: 24px; }
  body.civic .wordmark .wm-main { font-size: 17px; }
  body.civic .wordmark .wm-sub { font-size: 9.5px; }
  .nav-toggle { display: inline-flex; }
  body.civic .pub-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-default);
    box-shadow: var(--shadow-pop);
    padding: 6px 0 14px;
    margin-left: 0;
  }
  body.civic .pub-nav.open { display: flex; }
  body.civic .pub-nav a:not(.btn) { padding: 14px 20px; }
  body.civic .pub-nav a.active { box-shadow: inset 3px 0 0 var(--brand-red); }
  body.civic .pub-nav .btn { margin: 10px 20px 0; }
  body.civic .hero { padding: 36px 0 30px; }
  body.civic .hero h1 { font-size: 28px; line-height: 1.25; }
  body.civic .hero .sub { font-size: 14px; }
  body.civic .hero-actions { flex-direction: column; align-items: stretch; }
  body.civic h1 { font-size: 26px; }
  body.civic h2 { font-size: 21px; }
  .section-head h2 { font-size: 22px; }
  .band { padding: 32px 0; }
  .gov-banner { padding: 3px 14px; font-size: 11px; }
  body.civic .pub-footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot-tier2 .pub-footer-inner { flex-direction: row; }
}
