/* ============================================================
   Public Safety Registry - site-wide stylesheet
   Converted from the approved design (federal / USWDS-inspired).
   ============================================================ */

:root {
  --navy: #112E51;
  --navy-deep: #0B1F38;
  --red: #B31942;
  --red-dark: #8F1435;
  --green: #2E8540;
  --ink: #1B1B1B;
  --body: #3D4551;
  --muted: #5B616B;
  --border: #D6D7D9;
  --bg-alt: #F8F9FA;
  --bg-section: #F0F2F5;
  --link: #005EA2;
  --link-hover: #1A4480;
  --hero-text: #D6DCE6;
  --focus: #2491FF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'IBM Plex Sans', Georgia, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

img { max-width: 100%; }

.msi {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  letter-spacing: normal;
  font-variation-settings: 'FILL' 1, 'wght' 500;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Header --- */
.site-header { background: #FFFFFF; border-bottom: 1px solid var(--border); }
.site-header .masthead {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.site-header .seal { width: 120px; height: 120px; flex-shrink: 0; }
.site-header .titles { display: flex; flex-direction: column; gap: 4px; }
.site-header .site-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.2px;
  text-decoration: none;
}
.site-header .site-subtitle { font-size: 15px; color: var(--muted); }
.site-header .spacer { flex: 1; }

.primary-nav { background: var(--navy); }
.primary-nav .nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.primary-nav a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 18px;
}
.primary-nav a:hover, .primary-nav a.active { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.primary-nav .mobile-only { display: none; }
.nav-toggle, .side-toggle {
  display: none;
  background: var(--navy);
  color: #FFFFFF;
  border: 0;
  border-radius: 3px;
  padding: 9px 11px;
  cursor: pointer;
  line-height: 1;
}
.nav-toggle .msi, .side-toggle .msi { font-size: 24px; }
.side-toggle { background: #FFFFFF; color: var(--navy); border: 1px solid var(--border); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 3px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.btn-red { background: var(--red); color: #FFFFFF; }
.btn-red:hover { background: var(--red-dark); color: #FFFFFF; }
.btn-navy { background: var(--navy); color: #FFFFFF; }
.btn-navy:hover { background: #0d2440; color: #FFFFFF; }
.btn-white { background: #FFFFFF; color: var(--navy); }
.btn-outline-white { background: transparent; border: 2px solid #FFFFFF; color: #FFFFFF; padding: 11px 24px; }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); padding: 11px 24px; }
.btn-green { background: var(--green); color: #FFFFFF; }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-danger { background: #C0392B; color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- Hero --- */
.hero { background: var(--navy); color: #FFFFFF; border-bottom: 4px solid var(--red); }
.hero .hero-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: end;
}
.hero .hero-copy { display: flex; flex-direction: column; gap: 18px; padding: 48px 0; align-self: center; }
.hero h1 { margin: 0; font-size: 42px; line-height: 1.15; font-weight: 700; text-wrap: pretty; }
.hero p.lede { margin: 0; font-size: 17.5px; line-height: 1.65; color: var(--hero-text); max-width: 56ch; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; }

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

/* --- Device previews (iPhone / Android caller-ID mockups) --- */
.device-preview { width: 100%; }
.dp-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dp-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #FFFFFF; }
.dp-seg-btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
  cursor: pointer;
}
.dp-seg-btn + .dp-seg-btn { border-left: 1px solid var(--border); }
.dp-seg-btn.active { background: var(--navy); color: #FFFFFF; }
.dp-stage { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }

[data-device-preview][data-device="ios"] .device-android { display: none; }
[data-device-preview][data-device="android"] .device-ios { display: none; }
[data-device-preview][data-state="incoming"] .dp-state-recents { display: none; }
[data-device-preview][data-state="recents"] .dp-state-incoming { display: none; }

.device {
  width: 300px;
  background: #101215;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}
.device .dp-screen {
  --dp-fg: #FFFFFF;
  --dp-muted: rgba(255, 255, 255, 0.65);
  --dp-faint: rgba(255, 255, 255, 0.55);
  --dp-card-bg: rgba(255, 255, 255, 0.07);
  --dp-card-border: rgba(255, 255, 255, 0.13);
  border-radius: 34px;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px 26px;
  color: var(--dp-fg);
}
.device-ios .dp-screen { background: linear-gradient(180deg, #2B3040 0%, #0C0E11 60%); }
.device-android .dp-screen { background: linear-gradient(180deg, #1B2027 0%, #0F1114 60%); }
[data-theme="light"] .device .dp-screen,
.device-preview[data-theme="light"] .device .dp-screen {
  --dp-fg: #14171C;
  --dp-muted: rgba(20, 23, 28, 0.65);
  --dp-faint: rgba(20, 23, 28, 0.55);
  --dp-card-bg: rgba(20, 23, 28, 0.05);
  --dp-card-border: rgba(20, 23, 28, 0.14);
}
.device-preview[data-theme="light"] .device-ios .dp-screen { background: linear-gradient(180deg, #F5F7FB 0%, #DBE2EC 70%); }
.device-preview[data-theme="light"] .device-android .dp-screen { background: linear-gradient(180deg, #F2F5F8 0%, #E1E7ED 70%); }

.dp-statusbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px 0;
  color: var(--dp-fg);
}
.dp-island { width: 88px; height: 25px; border-radius: 100px; background: #000000; }
.dp-camdot { width: 12px; height: 12px; border-radius: 50%; background: #000000; }

.dp-state { width: 100%; display: flex; flex-direction: column; align-items: center; flex: 1; }

.dp-avatar {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.dp-avatar img { width: 100%; height: 100%; object-fit: contain; }
.dp-avatar-ios { width: 104px; height: 104px; border-radius: 50%; }
.dp-avatar-android { width: 96px; height: 96px; border-radius: 26px; }
.dp-logo-fallback { font-size: 38px; font-weight: 700; color: var(--dp-muted); }

.dp-caller {
  margin-top: 13px;
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  font-family: -apple-system, 'SF Pro', 'Roboto', system-ui, sans-serif;
}
.dp-caller-sub { margin-top: 5px; font-size: 14.5px; color: var(--dp-muted); text-align: center; }

.dp-verify-pill {
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0A5DC2;
  border-radius: 6px;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #FFFFFF;
}
.dp-verify-pill.dp-unverified { background: #5B616B; letter-spacing: 0.6px; }

.dp-info-card {
  margin-top: 11px;
  width: 100%;
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-card-border);
  border-radius: 10px;
  padding: 11px 14px;
  text-align: center;
}
.dp-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; color: var(--dp-faint); }
.dp-value { margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--dp-fg); }
.dp-note { font-size: 12.5px; color: var(--dp-muted); line-height: 1.5; }
.dp-note strong { color: var(--dp-fg); }

.dp-android-incoming-label {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--dp-muted);
}
.dp-android-sheet {
  margin-top: 12px;
  width: 100%;
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-card-border);
  border-radius: 18px;
  padding: 12px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.dp-reason-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26, 115, 232, 0.18);
  border: 1px solid rgba(26, 115, 232, 0.45);
  border-radius: 100px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dp-fg);
}

.dp-call-actions, .dp-android-actions {
  margin-top: auto;
  padding-top: 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.dp-call-actions { padding-left: 18px; padding-right: 18px; }
.dp-android-actions { padding-left: 30px; padding-right: 30px; }
.dp-call-action { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.dp-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-android .dp-circle { border-radius: 20px; }
.dp-circle.dp-decline { background: #FF453A; }
.dp-circle.dp-accept { background: #30D158; }
.device-android .dp-circle.dp-accept { background: #1EA446; }
.dp-call-action span { font-size: 12px; color: var(--dp-muted); }

.dp-recents-title { margin-top: 20px; width: 100%; font-size: 21px; font-weight: 700; padding: 0 4px; }
.dp-recent-row {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-card-border);
  border-radius: 14px;
  padding: 12px;
}
.dp-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
}
.dp-avatar-sm img { width: 100%; height: 100%; object-fit: contain; }
.dp-avatar-sm .dp-logo-fallback { font-size: 18px; }
.dp-avatar-android-sm { border-radius: 12px; }
.dp-recent-main { flex: 1; min-width: 0; }
.dp-recent-name { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dp-recent-name.dp-missed { color: #FF453A; }
.dp-recent-sub { font-size: 12px; color: var(--dp-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-recent-time { font-size: 12.5px; color: var(--dp-muted); align-self: flex-start; }

/* Hero variant: bottom-cropped iPhone, as on the public homepage */
.hero .hero-device { justify-self: center; align-self: end; }
.hero .device-hero {
  margin-top: 44px;
  width: 330px;
  border-radius: 44px 44px 0 0;
  padding: 12px 12px 0;
  box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.45);
}
.hero .device-hero .dp-screen { border-radius: 34px 34px 0 0; min-height: 0; padding-bottom: 26px; }
.hero .device-hero .dp-call-actions { margin-top: 20px; }

/* --- Sections --- */
.section { border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1140px; margin: 0 auto; padding: 60px 24px; }
.section-alt { background: var(--bg-section); }
.section-navy { background: var(--navy); color: #FFFFFF; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--red); }
.section-navy .kicker { color: #FF8D9C; }
.section h2 { margin: 10px 0 0; font-size: 30px; font-weight: 700; color: var(--navy); text-wrap: pretty; }
.section-navy h2 { color: #FFFFFF; }
.section .intro { margin: 14px 0 0; font-size: 16px; line-height: 1.65; color: var(--body); max-width: 80ch; }
.section-navy .intro, .section-navy p { color: var(--hero-text); }

.card-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }

.info-tile {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: 4px solid var(--navy);
  border-radius: 3px;
  padding: 24px;
}
.info-tile.accent-red { border-top-color: var(--red); }
.info-tile .tile-icon { font-size: 34px; color: var(--navy); }
.info-tile.accent-red .tile-icon { color: var(--red); }
.info-tile h3 { margin: 10px 0 0; font-size: 18px; font-weight: 700; color: var(--navy); }
.info-tile p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--body); }

/* --- How it works flow --- */
.flow-panel { margin-top: 32px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 3px; padding: 34px 34px 28px; }
.flow { display: flex; align-items: flex-start; gap: 8px; }
.flow-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.flow-step .bubble {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow-step .bubble.green { background: var(--green); }
.flow-step .bubble .msi { font-size: 40px; color: #FFFFFF; }
.flow-step .step-label { font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.4; }
.flow-arrow { flex: 0.7; display: flex; align-items: center; margin-top: 38px; }
.flow-arrow .line { flex: 1; height: 3px; background: var(--red); }
.flow-arrow .head {
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--red);
}
.blocked-note {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FDF2F4;
  border: 1px solid #F0C4CC;
  border-radius: 3px;
  padding: 12px 16px;
  font-size: 14.5px;
  color: #6E2130;
  line-height: 1.5;
}
.blocked-note .msi { font-size: 24px; color: var(--red); flex-shrink: 0; }

.step-card { background: #FFFFFF; border: 1px solid var(--border); border-radius: 3px; padding: 22px; }
.step-card .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #FFFFFF;
  font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.step-card .num.green { background: var(--green); }
.step-card h3 { margin: 12px 0 0; font-size: 16px; font-weight: 700; color: var(--navy); }
.step-card p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--body); }

/* --- Role rows --- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; align-items: center; }
.role-rows { display: flex; flex-direction: column; gap: 14px; }
.role-row {
  display: flex;
  gap: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 3px;
  padding: 18px 20px;
}
.role-row.accent-red { border-left-color: var(--red); }
.role-row .msi { font-size: 28px; color: var(--navy); margin-top: 2px; flex-shrink: 0; }
.role-row.accent-red .msi { color: var(--red); }
.role-row h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--navy); }
.role-row p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--body); }

/* --- Public-know panel --- */
.know-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 26px 28px;
}
.know-panel .panel-title { font-size: 15px; font-weight: 700; letter-spacing: 0.5px; }
.know-panel ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.know-panel li { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--hero-text); }
.know-panel li .mark { font-weight: 700; flex-shrink: 0; }
.know-panel li .mark.good { color: #7EC08D; }
.know-panel li .mark.warn { color: #FF8D9C; }

/* --- Enroll CTA section --- */
.enroll-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.enroll-center .intro { max-width: 66ch; }
.enroll-tiles { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 880px; text-align: left; }
.enroll-tiles .tile-head { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--navy); }
.enroll-tiles .tile-head .msi { font-size: 26px; color: var(--navy); }
.enroll-tiles .info-tile.accent-red .tile-head .msi { color: var(--red); }
.fine-print { font-size: 13px; color: var(--muted); }

/* --- Footer --- */
.site-footer { background: var(--navy-deep); color: #AEB9C7; }
.site-footer .footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.site-footer .seal { width: 120px; height: 120px; flex-shrink: 0; }
.site-footer .footer-main { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.6; }
.site-footer .footer-title { color: #FFFFFF; font-weight: 700; font-size: 16px; }
.site-footer .footer-col { min-width: 260px; font-size: 13px; line-height: 1.7; }
.site-footer .footer-col .col-title { color: #FFFFFF; font-weight: 700; margin-bottom: 6px; }
.site-footer a { color: #C9D4E0; }
.site-footer .copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 24px;
  text-align: center;
  font-size: 12.5px;
}

/* --- Generic content pages / forms --- */
.page-head { background: var(--bg-section); border-bottom: 1px solid var(--border); }
.page-head-inner { max-width: 1140px; margin: 0 auto; padding: 34px 24px; }
.page-head h1 { margin: 6px 0 0; font-size: 30px; color: var(--navy); }
.content-narrow { max-width: 760px; margin: 0 auto; padding: 40px 24px 70px; }
.content-wide { max-width: 1140px; margin: 0 auto; padding: 40px 24px 70px; }

.form-card { background: #FFFFFF; border: 1px solid var(--border); border-radius: 3px; padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field { margin-bottom: 0; }
/* Pin controls to the bottom of each grid cell so paired columns align even
   when one field has hint text and the other does not. */
.form-grid > .field > input,
.form-grid > .field > select,
.form-grid > .field > textarea { margin-top: auto; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; color: var(--navy); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="tel"], .field input[type="url"], .field input[type="date"], .field input[type="file"],
.field select, .field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid #8B959E;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--body); margin-bottom: 16px; }
.checkbox-row input { margin-top: 3px; }

.alert { border-radius: 3px; padding: 13px 16px; font-size: 14.5px; margin-bottom: 18px; border: 1px solid; }
.alert-error { background: #FDF2F4; border-color: #F0C4CC; color: #6E2130; }
.alert-success { background: #EEF7EE; border-color: #B7DFB9; color: #1F5723; }
.alert-info { background: #EFF6FB; border-color: #BFD9EC; color: #1A4480; }
.alert-warn { background: #FEF6E7; border-color: #F2DBA5; color: #6B4E10; }

/* --- Status pills / tables (portal + admin) --- */
.pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-gray { background: #E9ECEF; color: #444B53; }
.pill-blue { background: #E1F0FA; color: #1A4480; }
.pill-green { background: #E3F3E5; color: #1F5723; }
.pill-yellow { background: #FEF3D0; color: #6B4E10; }
.pill-red { background: #FBE3E8; color: #8F1435; }
.pill-navy { background: var(--navy); color: #fff; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.data-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  padding: 10px 12px;
  white-space: nowrap;
}
.data-table td { padding: 12px; border-bottom: 1px solid #E6E8EA; vertical-align: top; }
.data-table tr:hover td { background: #FAFBFC; }
.data-table .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; }

/* --- Portal layout --- */
.app-shell { display: flex; min-height: calc(100vh - 0px); }
.app-side {
  width: 250px;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 0;
}
.app-side .side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 12px;
}
.app-side .side-brand img { width: 42px; height: 42px; }
.app-side .side-brand .b-title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.app-side .side-brand .b-sub { font-size: 11px; color: #AEB9C7; }
.app-side a.side-link {
  color: #D6DCE6;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-side a.side-link .msi { font-size: 20px; }
.app-side a.side-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.app-side a.side-link.active { background: rgba(255,255,255,0.14); color: #fff; border-left: 3px solid var(--red); padding-left: 15px; }
.app-side .side-section {
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: #8FA0B5; padding: 16px 18px 6px;
}
.app-main { flex: 1; background: var(--bg-section); min-width: 0; }
.side-backdrop { display: none; }
.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-topbar .who { margin-left: auto; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.app-content { padding: 28px; }
.app-content h1 { margin: 0 0 4px; font-size: 24px; color: var(--navy); }
.app-content .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: 3px; margin-bottom: 22px; }
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-head h2 { margin: 0; font-size: 16px; color: var(--navy); }
.panel-head .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--navy); border-radius: 3px; padding: 16px 18px; }
.stat-card.red { border-top-color: var(--red); }
.stat-card.green { border-top-color: var(--green); }
.stat-card .stat-num { font-size: 28px; font-weight: 700; color: var(--navy); }
.stat-card .stat-label { font-size: 13px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 220px 1fr; gap: 8px 18px; font-size: 14.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); }

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

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

/* --- Lookup result --- */
.lookup-result { margin-top: 26px; }
.lookup-hit {
  border: 1px solid var(--border);
  border-left: 5px solid var(--green);
  background: #fff;
  border-radius: 3px;
  padding: 22px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.lookup-hit img { width: 84px; height: 84px; object-fit: contain; }
.lookup-miss {
  border: 1px solid #F0C4CC;
  border-left: 5px solid var(--red);
  background: #FDF2F4;
  border-radius: 3px;
  padding: 22px 24px;
  color: #6E2130;
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .hero .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero .hero-device { display: none; }
  .card-grid, .card-grid.cols-4, .enroll-tiles { grid-template-columns: 1fr 1fr; }
  .split, .split.even, .evidence-compare { grid-template-columns: 1fr; gap: 28px; }
  .flow { flex-wrap: wrap; gap: 18px; }
  .flow-arrow { display: none; }
  .flow-step { flex: 1 1 40%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }

  /* App shell: sidebar becomes a slide-in drawer */
  .side-toggle { display: inline-flex; align-items: center; }
  .app-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 268px;
    max-width: 82vw;
    z-index: 60;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }
  .app-shell.side-open .app-side { transform: translateX(0); }
  .side-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(11, 31, 56, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .app-shell.side-open .side-backdrop { opacity: 1; pointer-events: auto; }
  .app-content { padding: 18px 14px; }
  .app-topbar { padding: 10px 14px; flex-wrap: wrap; }
  .who-name { display: none; }

  /* Tables scroll horizontally instead of breaking the layout */
  .panel-body.flush { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel-body.flush .data-table { min-width: 640px; }
}

@media (max-width: 760px) {
  /* Public header: compact masthead + hamburger menu */
  .site-header .masthead { padding: 12px 16px; gap: 12px; flex-wrap: nowrap; }
  .site-header .seal { width: 56px; height: 56px; }
  .site-header .site-title { font-size: 19px; }
  .site-header .site-subtitle { font-size: 12px; }
  .header-actions { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }

  .primary-nav .nav-inner { display: none; flex-direction: column; gap: 0; padding: 6px 0; }
  .site-header.nav-open .primary-nav .nav-inner { display: flex; }
  .primary-nav a { padding: 13px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .primary-nav a:last-child { border-bottom: 0; }
  .primary-nav .mobile-only { display: block; background: rgba(255, 255, 255, 0.06); }
  .primary-nav .nav-cta { background: var(--red); font-weight: 700; }

  .section-inner { padding: 40px 18px; }
  .page-head-inner { padding: 24px 18px; }
  .content-narrow, .content-wide { padding: 28px 18px 50px; }
  .form-card { padding: 18px; }
}

@media (max-width: 640px) {
  .card-grid, .card-grid.cols-4, .enroll-tiles, .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .hero .hero-copy { padding: 34px 0; }
  .hero p.lede { font-size: 16px; }
  .cta-row .btn { flex: 1 1 auto; text-align: center; }
  .section h2 { font-size: 24px; }
  .flow-step { flex: 1 1 100%; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .actions-row { gap: 8px; }
  .evidence-compare { gap: 0; }
}
