:root {
  --ink: #1e2428;
  --muted: #65717a;
  --panel: #ffffff;
  --paper: #f3f6fa;
  --line: #cfd8e3;
  --charcoal: #071a33;
  --navy: #06152d;
  --royal: #1557c0;
  --royal-dark: #0b3474;
  --royal-light: #4f8de8;
  --silver: #d8e2ec;
  --brand: #1557c0;
  --brand-strong: #0b3474;
  --accent: #c7a96b;
  --teal: #1557c0;
  --teal-dark: #0b3474;
  --copper: #8b6f2d;
  --amber: #c7a96b;
  --green: #1557c0;
  --blue: #1557c0;
  --red: #a43f3f;
  --shadow: 0 18px 45px rgba(31, 36, 40, 0.14);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body.dark-mode {
  --ink: #edf4f8;
  --muted: #aebeca;
  --panel: rgba(10, 24, 39, 0.92);
  --paper: #06111f;
  --line: rgba(161, 178, 191, 0.22);
  --charcoal: #07111f;
  --navy: #040b16;
  --royal: #2e7bf0;
  --royal-dark: #1a4fb2;
  --royal-light: #75a8ff;
  --silver: #bdcad7;
  --brand: #2e7bf0;
  --brand-strong: #75a8ff;
  --accent: #c7a96b;
  --teal: #2e7bf0;
  --teal-dark: #75a8ff;
  --copper: #c7a96b;
  --amber: #d8a047;
  --green: #75a8ff;
  --blue: #65a9d7;
  --red: #d76b6b;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

body.dark-mode::before {
  content: "";
  position: fixed;
  right: -3vw;
  bottom: -4vh;
  z-index: 0;
  pointer-events: none;
  width: min(74vw, 1060px);
  height: min(72vh, 760px);
  background: url("assets/pci12-logo-transparent.png") center / contain no-repeat;
  opacity: 0.095;
  filter: saturate(0.9) contrast(1.08);
}

.login-screen,
.app-shell,
.modal-root,
.toast {
  position: relative;
}

.login-screen,
.app-shell {
  z-index: 1;
}

body.dark-mode .login-panel,
body.dark-mode .modal,
body.dark-mode .modal-header,
body.dark-mode .topbar {
  background: rgba(8, 20, 34, 0.94);
  border-color: var(--line);
}

body.dark-mode .topbar {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .search-box,
body.dark-mode .source-filter-box,
body.dark-mode .ghost-button,
body.dark-mode .stat-card,
body.dark-mode .panel,
body.dark-mode .claim-card,
body.dark-mode .record-card,
body.dark-mode .claim-detail-header,
body.dark-mode .metric,
body.dark-mode .pipeline-summary-card,
body.dark-mode .pipeline-phase,
body.dark-mode .stage-column,
body.dark-mode .stage-card,
body.dark-mode .source-card,
body.dark-mode .source-stage-strip span,
body.dark-mode .photo-card,
body.dark-mode .document-card,
body.dark-mode .document-tile,
body.dark-mode .photo-tile,
body.dark-mode .duplicate-card,
body.dark-mode .photo-thumb,
body.dark-mode .template-button,
body.dark-mode .tab-button,
body.dark-mode .field-readout,
body.dark-mode .import-summary,
body.dark-mode .table-wrap,
body.dark-mode .checkbox-label,
body.dark-mode .upload-dropzone,
body.dark-mode .import-dropzone,
body.dark-mode .storm-load-status,
body.dark-mode .state-tile,
body.dark-mode .sync-master-toggle,
body.dark-mode .sync-service-row,
body.dark-mode .official-storm-map-wrap,
body.dark-mode .storm-date-index,
body.dark-mode .state-map-selector,
body.dark-mode .storm-date-index-row,
body.dark-mode .storm-date-callout,
body.dark-mode .property-map-frame,
body.dark-mode .empty-state {
  background: rgba(4, 13, 24, 0.88);
  border-color: var(--line);
  color: var(--ink);
}

body.dark-mode .ai-command-panel,
body.dark-mode .ai-command-header,
body.dark-mode .ai-command-form {
  background: rgba(5, 16, 29, 0.98);
  border-color: var(--line);
  color: var(--ink);
}

body.dark-mode .ai-command-scope,
body.dark-mode .ai-message.assistant,
body.dark-mode .ai-command-prompts button,
body.dark-mode .ai-command-dropzone,
body.dark-mode .ai-command-attachment {
  background: rgba(13, 34, 56, 0.96);
  border-color: var(--line);
  color: var(--ink);
}

body.dark-mode .ai-message.user {
  background: #174d9d;
  color: #ffffff;
}

body.dark-mode .stage-card,
body.dark-mode .record-card,
body.dark-mode .template-button,
body.dark-mode .claim-card {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

body.dark-mode .template-button strong,
body.dark-mode .record-card h4,
body.dark-mode .stage-card strong,
body.dark-mode .field-readout strong,
body.dark-mode .claim-card h3,
body.dark-mode .source-card h4,
body.dark-mode .document-tile strong,
body.dark-mode .photo-tile strong,
body.dark-mode .metric strong,
body.dark-mode .sync-service-row strong,
body.dark-mode .tab-button,
body.dark-mode label {
  color: var(--ink);
}

body.dark-mode .template-button span,
body.dark-mode .record-card p,
body.dark-mode .stage-card span,
body.dark-mode .stage-card em,
body.dark-mode .stage-overflow-note,
body.dark-mode .upload-dropzone span,
body.dark-mode .panel-subtitle,
body.dark-mode .claim-meta,
body.dark-mode .source-card p,
body.dark-mode .source-stage-strip,
body.dark-mode .document-tile p,
body.dark-mode .photo-tile p,
body.dark-mode .metric span,
body.dark-mode .sync-service-row span,
body.dark-mode .sync-service-row em,
body.dark-mode .sync-service-row small,
body.dark-mode .muted {
  color: var(--muted);
}

body.dark-mode .ghost-button:hover {
  background: rgba(46, 123, 240, 0.14);
  border-color: rgba(117, 168, 255, 0.62);
}

body.dark-mode .compliance-note {
  background: rgba(199, 169, 107, 0.12);
  color: #d7cdbb;
}

body.dark-mode th {
  background: rgba(46, 123, 240, 0.14);
  color: #d8e8ec;
}

body.dark-mode td {
  border-bottom-color: rgba(161, 178, 191, 0.16);
}

body.dark-mode .kpi-pill,
body.dark-mode .chip,
body.dark-mode .nav-count {
  background: rgba(199, 169, 107, 0.14);
  color: #e4d4aa;
}

body.dark-mode .chip.high,
body.dark-mode .stage-card small {
  background: rgba(215, 107, 107, 0.2);
  color: #ffc6c6;
}

body.dark-mode .chip.medium {
  background: rgba(216, 160, 71, 0.2);
  color: #ffe0a4;
}

body.dark-mode .chip.low {
  background: rgba(96, 165, 107, 0.2);
  color: #c8f4cd;
}

body.dark-mode .chip.legal {
  background: rgba(132, 100, 190, 0.23);
  color: #ddcff8;
}

body.dark-mode .chip.appraisal {
  background: rgba(101, 169, 215, 0.22);
  color: #cae9ff;
}

body.dark-mode .stage-column h4 span:last-child {
  background: rgba(199, 169, 107, 0.16);
  color: #e4d4aa;
}

body.dark-mode .stage-column.drop-ready,
body.dark-mode .upload-dropzone.drag-hover,
body.dark-mode #tabPanel.drag-hover,
body.dark-mode .state-tile:hover,
body.dark-mode .state-tile.active,
body.dark-mode .storm-date-index-row:hover,
body.dark-mode .storm-date-index-row.active {
  background: rgba(46, 123, 240, 0.16);
  border-color: rgba(117, 168, 255, 0.65);
}

body.dark-mode .storm-load-status.error {
  background: rgba(180, 35, 24, 0.13);
}

body.dark-mode .storm-load-status.loading {
  background: rgba(183, 121, 31, 0.15);
}

body.dark-mode .storm-load-status.ready {
  background: rgba(46, 123, 240, 0.16);
}

body.dark-mode .storm-load-status.warning {
  background: rgba(199, 169, 107, 0.14);
}

body.dark-mode .source-feed-strip a {
  background: rgba(4, 13, 24, 0.9);
  border-color: rgba(117, 168, 255, 0.24);
  color: var(--ink);
}

body.dark-mode .source-feed-strip strong {
  color: var(--brand-strong);
}

body.dark-mode .source-feed-strip span,
body.dark-mode .source-feed-strip em {
  color: var(--muted);
}

body.dark-mode .link-button {
  color: var(--brand-strong);
}

body.dark-mode .sidebar,
body.dark-mode .app-shell::before {
  background: linear-gradient(180deg, #050b14, #0a1827 44%, #07111f);
}

body.dark-mode .primary-button {
  background: linear-gradient(135deg, #0b3474, #1557c0 54%, #4f8de8);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(46, 123, 240, 0.2);
}

body.dark-mode .danger-button {
  background: #b94d4d;
  color: #ffffff;
}

body.dark-mode .login-screen {
  background:
    linear-gradient(rgba(6, 17, 31, 0.9), rgba(6, 17, 31, 0.92)),
    url("assets/pci12-logo-transparent.png") center / min(78vw, 980px) auto no-repeat;
}

body.dark-mode .brand-logo,
body.dark-mode .brand-logo-login,
body.dark-mode .brand-logo-sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}

body.dark-mode .state-tile.spacer {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dark-mode .tab-button.active {
  background: linear-gradient(135deg, #0b3474, #1557c0);
  color: #ffffff;
  border-color: rgba(117, 168, 255, 0.62);
}

body.dark-mode .source-stage-strip span {
  background: rgba(117, 168, 255, 0.12);
  color: #d6e5ff;
}

body.dark-mode .official-storm-map-header,
body.dark-mode .official-storm-legend,
body.dark-mode .modal-header {
  border-color: var(--line);
}

body.dark-mode .official-storm-map-header strong {
  color: var(--ink);
}

body.dark-mode .go-live-item.pending,
body.dark-mode .go-live-item.blocked,
body.dark-mode .go-live-item.ready,
body.dark-mode .sync-service-row.fresh,
body.dark-mode .sync-service-row.stale,
body.dark-mode .sync-service-row.warning,
body.dark-mode .sync-service-row.blocked,
body.dark-mode .sync-service-row.error,
body.dark-mode .sync-service-row.running {
  background: rgba(4, 13, 24, 0.88);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

body.navigation-busy,
body.navigation-busy * {
  cursor: progress !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(245, 243, 238, 0.92), rgba(245, 243, 238, 0.92)),
    url("data:image/svg+xml,%3Csvg width='1200' height='800' viewBox='0 0 1200 800' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='800' fill='%23f5f3ee'/%3E%3Cg stroke='%23c9bda9' stroke-width='2' fill='none' opacity='.55'%3E%3Cpath d='M110 680 400 210 612 540 760 302 1090 680Z'/%3E%3Cpath d='M182 620h220M470 620h234M760 620h240M242 540h110M810 540h148M550 472h100'/%3E%3Cpath d='M116 681h970'/%3E%3C/g%3E%3Cg fill='%231557c0' opacity='.3'%3E%3Crect x='118' y='126' width='118' height='16'/%3E%3Crect x='118' y='156' width='210' height='10'/%3E%3Crect x='118' y='180' width='178' height='10'/%3E%3C/g%3E%3Cg fill='%23c7a96b' opacity='.28'%3E%3Crect x='820' y='116' width='210' height='14'/%3E%3Crect x='820' y='148' width='154' height='10'/%3E%3Crect x='820' y='172' width='244' height='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.login-panel {
  width: min(620px, 100%);
  padding: 34px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-lockup,
.sidebar-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-logo {
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}

.brand-logo-login {
  width: 116px;
  height: 86px;
  padding: 4px;
  border: 1px solid var(--line);
}

.brand-logo-sidebar {
  width: 58px;
  height: 44px;
  padding: 3px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: white;
  font-weight: 900;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  margin-bottom: 0;
  font-size: 1.85rem;
}

h3 {
  font-size: 1.08rem;
}

.login-copy {
  margin: 24px 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 52ch;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--charcoal);
  font-size: 0.86rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 87, 192, 0.18);
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 40px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--royal-dark), var(--royal));
}

.primary-button:hover {
  background: linear-gradient(135deg, #082a62, var(--brand-strong));
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.ghost-button:hover {
  border-color: #b9ad9a;
  background: #fbfaf7;
}

.danger-button {
  color: white;
  background: var(--red);
}

.link-button {
  display: inline;
  border: 0;
  padding: 0;
  min-height: auto;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.link-button:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.small-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.compliance-note {
  margin: 0;
  padding: 13px;
  border-left: 4px solid var(--copper);
  background: #fbf7f0;
  color: #5b4d43;
  font-size: 0.83rem;
  line-height: 1.5;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(216px, 248px) minmax(0, 1fr);
  max-width: 100vw;
  overflow-x: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 248px;
  background: #2f3437;
}

.sidebar {
  z-index: 1;
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #2f3437;
  color: #f8f5ee;
}

.sidebar-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand strong {
  display: block;
}

.sidebar-brand .brand-mark {
  background: #f5f3ee;
  color: #2f3437;
}

.sidebar-brand span {
  display: block;
  color: #c9c7c1;
  font-size: 0.82rem;
}

.main-nav {
  display: grid;
  gap: 6px;
  margin: 18px 0;
}

.nav-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 10px 11px;
  background: transparent;
  color: #ece7dc;
  text-align: left;
  font-weight: 760;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-count {
  color: #cdbb9a;
  font-size: 0.78rem;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: #d7d1c6;
  font-size: 0.86rem;
}

.workspace {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 24px;
  background: rgba(245, 243, 238, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.theme-toggle {
  white-space: nowrap;
}

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

.persistence-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 86px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.persistence-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #7a8795;
}

.persistence-indicator[data-status="saving"] .persistence-dot,
.persistence-indicator[data-status="loading"] .persistence-dot {
  background: #2667c9;
  box-shadow: 0 0 0 4px rgba(38, 103, 201, 0.14);
}

.persistence-indicator[data-status="saved"] {
  color: #174f36;
  border-color: #8fc7ad;
}

.persistence-indicator[data-status="saved"] .persistence-dot {
  background: #21875d;
}

.persistence-indicator[data-status="retrying"] {
  color: #75520d;
  border-color: #d9bc70;
}

.persistence-indicator[data-status="retrying"] .persistence-dot {
  background: #c18a17;
}

.persistence-indicator[data-status="conflict"],
.persistence-indicator[data-status="failed"] {
  color: #8a2222;
  border-color: #d89696;
}

.persistence-indicator[data-status="conflict"] .persistence-dot,
.persistence-indicator[data-status="failed"] .persistence-dot {
  background: #bb3535;
}

body.dark-mode .persistence-indicator {
  background: #111d2d;
  border-color: #3b4c63;
  color: #dce7f5;
}

body.dark-mode .persistence-indicator[data-status="saved"] {
  color: #9fe0bf;
  border-color: #3d8062;
}

body.dark-mode .persistence-indicator[data-status="retrying"] {
  color: #f1d486;
  border-color: #826a2b;
}

body.dark-mode .persistence-indicator[data-status="conflict"],
body.dark-mode .persistence-indicator[data-status="failed"] {
  color: #ffb0b0;
  border-color: #8a4444;
}

.search-box {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: min(420px, 44vw);
  padding-left: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.search-box input {
  border: 0;
  padding-left: 0;
  box-shadow: none;
}

.source-filter-box {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.source-filter-box span {
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.source-filter-box select {
  min-width: 150px;
  border: 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.sync-readiness-banner {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 8px;
}

.sync-readiness-banner.ready {
  color: #174f36;
  background: #edf8f2;
  border-color: #8fc7ad;
}

.sync-readiness-banner.blocked {
  color: #75520d;
  background: #fff8e7;
  border-color: #d9bc70;
}

body.dark-mode .sync-readiness-banner.ready {
  color: #9fe0bf;
  background: #12271f;
  border-color: #3d8062;
}

body.dark-mode .sync-readiness-banner.blocked {
  color: #f1d486;
  background: #2a2415;
  border-color: #826a2b;
}

.view {
  padding: 24px;
  min-width: 0;
  max-width: 100%;
}

.section-grid {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stat-card,
.panel,
.claim-card,
.record-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-card {
  padding: 16px;
  min-height: 108px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.stat-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.panel {
  padding: 16px;
  min-width: 0;
  max-width: 100%;
}

#tabPanel {
  min-width: 0;
  max-width: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-header h3,
.panel-header p {
  margin: 0;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.86rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.three-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.claim-list {
  display: grid;
  gap: 12px;
}

.claim-card {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(140px, 0.85fr) minmax(140px, 0.85fr) auto;
  gap: 14px;
  align-items: center;
}

.claim-card h3 {
  margin-bottom: 4px;
}

.muted,
.claim-meta {
  color: var(--muted);
}

.claim-meta {
  font-size: 0.84rem;
  line-height: 1.45;
}

.chip-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.mini-stack {
  display: grid;
  gap: 3px;
}

.mini-stack small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eee8dc;
  color: #4a4037;
  font-size: 0.76rem;
  font-weight: 850;
}

.chip.high {
  background: #f6d7d1;
  color: #8f302d;
}

.chip.medium {
  background: #f3e2bd;
  color: #7a4c09;
}

.chip.low {
  background: #dfeeda;
  color: #2f642f;
}

.chip.legal {
  background: #e4d8ef;
  color: #5b3f79;
}

.chip.appraisal {
  background: #d8e9f1;
  color: #22556f;
}

.pipeline-command {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.pipeline-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pipeline-summary-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.pipeline-summary-card span,
.pipeline-summary-card em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.pipeline-summary-card strong {
  font-size: 1.35rem;
}

.pipeline-groups {
  display: grid;
  gap: 14px;
}

.pipeline-phase {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f5ef;
}

.pipeline-phase-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.pipeline-phase-header h4,
.pipeline-phase-header p {
  margin: 0;
}

.pipeline-phase-header h4 {
  font-size: 0.95rem;
}

.pipeline-phase-header p {
  color: var(--muted);
  font-size: 0.8rem;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
  gap: 9px;
  max-width: 100%;
}

.stage-column {
  min-height: 142px;
  max-height: 430px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.stage-column.drop-ready {
  border-color: var(--accent);
  background: #edf4ff;
  box-shadow: inset 0 0 0 2px rgba(21, 87, 192, 0.16);
}

.stage-column h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  margin: 0 0 7px;
  font-size: 0.78rem;
  line-height: 1.15;
}

.stage-column h4 span:last-child {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #eee8dc;
  color: #4a4037;
  font-size: 0.72rem;
}

.stage-card-stack {
  display: grid;
  gap: 6px;
  min-height: 78px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.stage-card {
  width: 100%;
  min-height: 0;
  padding: 8px;
  border-radius: 8px;
  background: white;
  border: 1px solid #e8e0d4;
  color: var(--ink);
  cursor: grab;
  text-align: left;
  box-shadow: 0 4px 12px rgba(20, 24, 28, 0.05);
}

.stage-card.high-priority {
  border-color: rgba(164, 63, 63, 0.42);
  box-shadow: inset 3px 0 0 rgba(164, 63, 63, 0.75), 0 4px 12px rgba(20, 24, 28, 0.05);
}

.stage-card:active {
  cursor: grabbing;
}

.stage-card.dragging {
  opacity: 0.48;
  transform: rotate(1deg);
}

.stage-card strong {
  display: block;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-card span {
  display: block;
  color: var(--muted);
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-card em {
  display: block;
  margin-top: 4px;
  color: var(--brand-strong);
  overflow: hidden;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-card small {
  display: inline-flex;
  margin-top: 5px;
  padding: 2px 5px;
  border-radius: 8px;
  background: #f6d7d1;
  color: #8f302d;
  font-size: 0.64rem;
  font-weight: 900;
}

.stage-overflow-note {
  margin: 7px 0 0;
  font-size: 0.72rem;
}

.source-grid,
.storm-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.source-card,
.matrix-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(21, 87, 192, 0.045), rgba(255, 255, 255, 0.96)),
    var(--panel);
  box-shadow: 0 10px 24px rgba(7, 26, 51, 0.06);
}

.source-card h4,
.source-card p,
.matrix-card p {
  margin: 0;
}

.source-card h4 {
  font-size: 0.98rem;
}

.source-card p,
.matrix-card p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.source-stage-strip {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
}

.source-stage-strip span {
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(21, 87, 192, 0.14);
  background: #eef4ff;
  color: var(--brand-strong);
  font-weight: 800;
}

.thread-command-panel {
  overflow: hidden;
}

.thread-command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}

.thread-button {
  min-height: 74px;
  text-align: left;
}

.matrix-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.matrix-card strong {
  display: block;
  font-size: 1rem;
}

.duplicate-card {
  border-color: #e7c6c0;
  background: #fff9f7;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar select,
.toolbar input {
  width: auto;
  min-width: 170px;
}

.claim-detail-header {
  display: grid;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.claim-detail-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  min-width: 0;
}

.claim-detail-title > div:first-child {
  min-width: 0;
  flex: 1 1 340px;
}

.claim-detail-title h3 {
  margin-bottom: 3px;
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.metric {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f7f4ee;
  min-height: 58px;
}

.metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tabbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow-x: visible;
  max-width: 100%;
  padding-bottom: 0;
  margin-bottom: 12px;
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: white;
  color: var(--ink);
  white-space: normal;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.tab-button.active {
  background: var(--charcoal);
  color: white;
  border-color: var(--charcoal);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.field-readout {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.field-readout span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-readout strong,
.muted,
.claim-meta {
  overflow-wrap: anywhere;
}

.record-list {
  display: grid;
  gap: 10px;
}

.ar-aging-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-form {
  margin-bottom: 14px;
}

.ar-filters {
  grid-template-columns: repeat(2, minmax(180px, 260px));
}

.money-cell {
  text-align: right;
  white-space: nowrap;
}

.record-card {
  padding: 12px;
  min-width: 0;
}

.record-card h4 {
  margin: 0 0 5px;
}

.record-card p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.report-actions {
  margin: 8px 0 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.review-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.review-gate-grid label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.review-gate-grid input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
}

.wide-label {
  margin-top: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.inline-form .wide-label,
.inline-form textarea {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  grid-template-columns: auto 1fr;
  grid-auto-flow: column;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.checkbox-label input {
  width: auto;
}

.import-dropzone {
  padding: 16px;
  border: 1px dashed #b9ad9a;
  border-radius: 8px;
  background: #fbfaf7;
}

.upload-dropzone {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 18px;
  border: 2px dashed #a89b86;
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--charcoal);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.upload-dropzone strong {
  font-size: 0.98rem;
}

.upload-dropzone span {
  color: var(--muted);
  font-size: 0.84rem;
}

.upload-dropzone.drag-hover {
  border-color: var(--brand);
  background: #edf4ff;
  box-shadow: inset 0 0 0 2px rgba(21, 87, 192, 0.14);
}

#tabPanel.drag-hover {
  outline: 2px dashed var(--brand);
  outline-offset: 6px;
  background: rgba(21, 87, 192, 0.04);
}

.import-preview {
  display: grid;
  gap: 12px;
}

.import-summary {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.warning-list {
  margin: 0;
  padding-left: 22px;
  color: #7a4c09;
  font-size: 0.86rem;
}

.import-table {
  min-width: 760px;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e9e2d7;
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}

th {
  color: #51473e;
  background: #f8f5ef;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:last-child td {
  border-bottom: 0;
}

.task-table {
  min-width: 1040px;
}

.claim-touch-table {
  min-width: 980px;
}

.claim-touch-queue-table {
  min-width: 900px;
}

.task-table th:first-child {
  width: 25%;
}

.task-table th:last-child {
  width: 220px;
}

.task-row-detail,
.timeline-record p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-line;
}

.task-actions {
  min-width: 190px;
}

.task-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
}

.task-status-pending {
  border-color: rgba(21, 87, 192, 0.28);
  background: rgba(21, 87, 192, 0.1);
  color: var(--royal-dark);
}

.task-status-progress {
  border-color: rgba(79, 141, 232, 0.38);
  background: rgba(79, 141, 232, 0.16);
  color: #0b438e;
}

.task-status-waiting {
  border-color: rgba(139, 111, 45, 0.38);
  background: rgba(199, 169, 107, 0.18);
  color: #6f551b;
}

.task-status-completed {
  border-color: rgba(21, 87, 192, 0.48);
  background: #0b3474;
  color: #ffffff;
}

.task-status-archived {
  border-color: #aeb8c2;
  background: #e7ebef;
  color: #4c5863;
}

.task-row-completed td {
  background: rgba(21, 87, 192, 0.025);
}

.task-row-archived td {
  opacity: 0.78;
}

.task-archive-button {
  color: var(--muted);
}

body.dark-mode .task-status-pending,
body.dark-mode .task-status-progress {
  border-color: rgba(117, 168, 255, 0.46);
  background: rgba(46, 123, 240, 0.18);
  color: #c8dcff;
}

body.dark-mode .task-status-waiting {
  border-color: rgba(199, 169, 107, 0.48);
  background: rgba(199, 169, 107, 0.16);
  color: #f0dcae;
}

body.dark-mode .task-status-completed {
  border-color: #75a8ff;
  background: #1a4fb2;
  color: #ffffff;
}

body.dark-mode .task-status-archived {
  border-color: rgba(174, 190, 202, 0.36);
  background: rgba(174, 190, 202, 0.12);
  color: #c2ced8;
}

body.dark-mode .task-row-completed td {
  background: rgba(46, 123, 240, 0.045);
}

.generator-output {
  width: 100%;
  max-width: 100%;
  min-height: 150px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.template-button {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  text-align: left;
}

.template-button strong {
  color: var(--ink);
}

.template-button span {
  color: var(--muted);
  font-size: 0.82rem;
}

.go-live-item {
  border-left: 5px solid #9ca3af;
}

.go-live-item.ready {
  border-left-color: var(--brand);
}

.go-live-item.pending {
  border-left-color: #b7791f;
}

.go-live-item.blocked {
  border-left-color: #b42318;
}

.go-live-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sync-command-panel {
  border-top: 4px solid var(--brand);
}

.compact-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sync-service-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.sync-master-toggle {
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7fbff;
}

.sync-service-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(130px, 0.32fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid #9ca3af;
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.sync-service-row strong,
.sync-service-row span,
.sync-service-row em,
.sync-service-row small {
  display: block;
}

.sync-service-row strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.sync-service-row span,
.sync-service-row em,
.sync-service-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.sync-service-row em {
  font-style: normal;
  font-weight: 800;
}

.sync-service-row label {
  margin: 0;
}

.sync-service-row select {
  width: 100%;
  min-height: 38px;
}

.sync-service-row.fresh,
.sync-mini-card.fresh {
  border-left-color: #1557c0;
}

.sync-service-row.stale,
.sync-mini-card.stale {
  border-left-color: #b7791f;
}

.sync-service-row.warning,
.sync-mini-card.warning {
  border-left-color: #d97706;
}

.sync-service-row.error,
.sync-mini-card.error {
  border-left-color: #b42318;
}

.sync-service-row.blocked,
.sync-mini-card.blocked {
  border-left-color: #64748b;
}

.sync-service-row.running,
.sync-mini-card.running {
  border-left-color: #2e7bf0;
  background: #f0f7ff;
}

.sync-kpi-strip {
  margin-top: 0;
}

.sync-mini-list {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.sync-mini-card {
  border-left: 5px solid var(--line);
}

.property-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.property-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.property-map-panel {
  overflow: hidden;
}

.property-map-frame {
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.official-storm-panel {
  gap: 16px;
}

.state-tile-map {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238, 244, 247, 0.92), rgba(247, 250, 252, 0.96)),
    repeating-linear-gradient(135deg, rgba(47, 102, 144, 0.08) 0 1px, transparent 1px 12px);
}

.state-tile {
  min-height: 32px;
  border: 1px solid #cfd9e2;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.state-tile:hover,
.state-tile.active {
  border-color: var(--brand);
  background: #edf4ff;
  color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px rgba(21, 87, 192, 0.22);
}

.state-tile.spacer {
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.storm-browser-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(135px, 1fr));
  gap: 10px;
  align-items: end;
}

.risk-weather-discovery {
  background:
    linear-gradient(135deg, rgba(7, 26, 50, 0.035), rgba(21, 87, 192, 0.075)),
    var(--panel);
}

.risk-discovery-form {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) minmax(120px, 0.55fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto auto;
  gap: 10px;
  align-items: end;
}

.risk-discovery-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.risk-discovery-form input,
.risk-discovery-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.risk-coordinate-drawer {
  margin-top: 10px;
}

.risk-coordinate-controls {
  grid-template-columns: repeat(2, minmax(160px, 0.55fr)) minmax(260px, 1.4fr);
}

.risk-coordinate-controls > span {
  align-self: center;
  line-height: 1.4;
}

.risk-discovery-map-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(280px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.storm-primary-controls {
  grid-template-columns: minmax(210px, 1.15fr) minmax(110px, 0.55fr) minmax(165px, 0.8fr) minmax(280px, 1.5fr) auto;
}

.storm-browser-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.storm-browser-controls select,
.storm-browser-controls input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.storm-browser-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.weather-range-drawer,
.source-audit-drawer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.weather-range-drawer > summary,
.source-audit-drawer > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.weather-range-drawer > summary strong,
.source-audit-drawer > summary strong {
  color: var(--brand-strong);
  font-size: 0.8rem;
}

.weather-range-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.weather-range-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-range-controls input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.storm-load-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--muted);
  font-size: 0.9rem;
}

.storm-load-status strong {
  color: var(--ink);
}

.storm-load-status.error {
  border-left-color: #b42318;
  background: #fff7f5;
}

.storm-load-status.loading {
  border-left-color: #b7791f;
  background: #fffaf0;
}

.storm-load-status.ready {
  border-left-color: var(--brand);
  background: #edf4ff;
}

.storm-load-status.warning {
  border-left-color: var(--accent);
  background: #fff8eb;
}

.source-feed-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.source-feed-strip a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(21, 87, 192, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 255, 0.92));
  color: var(--ink);
  text-decoration: none;
}

.source-feed-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.source-feed-strip strong {
  color: var(--brand-strong);
  font-size: 1rem;
}

.source-feed-strip em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.source-intelligence-bar {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(0, 2.7fr);
  overflow: hidden;
  margin: 12px 0 0;
  border: 1px solid rgba(117, 168, 255, 0.3);
  border-radius: 8px;
  background: #071a32;
  color: #f4f8ff;
  box-shadow: 0 14px 28px rgba(5, 22, 45, 0.16);
}

.compact-source-audit {
  margin-top: 10px;
}

.compact-source-audit > summary {
  min-height: 40px;
  padding: 8px 12px;
}

.source-audit-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.source-intelligence-lead {
  display: grid;
  gap: 5px;
  align-content: center;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.source-intelligence-lead > span,
.source-intelligence-metric > span {
  overflow: hidden;
  color: #9fb5ce;
  font-size: 0.68rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-intelligence-lead > strong {
  display: flex;
  gap: 8px;
  align-items: center;
  color: white;
  font-size: 1rem;
}

.source-intelligence-lead i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #39d98a;
  box-shadow: 0 0 0 4px rgba(57, 217, 138, 0.14);
}

.source-intelligence-lead small,
.source-intelligence-metric small {
  overflow: hidden;
  color: #9fb5ce;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-intelligence-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  min-width: 0;
}

.source-intelligence-metric {
  position: relative;
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
  min-height: 82px;
  padding: 12px 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

.source-intelligence-metric::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #aebdca;
  content: "";
}

.source-intelligence-metric.hail::before {
  background: #38bdf8;
}

.source-intelligence-metric.wind::before {
  background: #f2c45c;
}

.source-intelligence-metric.tornado::before {
  background: #ef6b73;
}

.source-intelligence-metric:hover {
  background: rgba(117, 168, 255, 0.11);
}

.source-intelligence-metric > strong {
  color: white;
  font-size: 1.22rem;
}

.source-audit-drawer {
  margin-top: 8px;
}

.source-audit-list {
  display: grid;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.source-audit-list a {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 110px minmax(170px, 0.8fr);
  gap: 14px;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  text-decoration: none;
}

.source-audit-list a:hover {
  background: #edf4ff;
}

.source-audit-list strong {
  color: var(--brand-strong);
}

.source-audit-list em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-storm-map-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7fafc;
}

.state-sweep-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 0;
  min-height: 430px;
}

.state-satellite-panel {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: #06111f;
}

.state-satellite-panel iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.98) contrast(1.05);
}

.state-satellite-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 17, 31, 0.04), rgba(6, 17, 31, 0.46)),
    radial-gradient(circle at 50% 50%, transparent 0 48%, rgba(46, 123, 240, 0.18) 49% 50%, transparent 51% 100%);
}

.state-satellite-hud {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(5, 11, 20, 0.72);
  color: white;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.state-satellite-hud span {
  font-size: 0.78rem;
  color: #c7a96b;
  font-weight: 900;
}

.state-satellite-hud strong {
  font-size: 1.35rem;
}

.state-satellite-hud em {
  color: #c7d8df;
  font-style: normal;
  font-size: 0.84rem;
}

.official-storm-map-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.official-storm-map-header strong {
  color: var(--ink);
}

.official-storm-map {
  display: block;
  width: 100%;
  height: 430px;
}

.official-storm-map rect {
  fill: #eef4f7;
  stroke: #d3dde5;
}

.official-storm-map .storm-water {
  fill: #0d2030;
  stroke: #d3dde5;
}

.official-storm-map .storm-land {
  fill: #d8e4dc;
  stroke: #6d817b;
  stroke-width: 2;
}

.official-storm-map .storm-radar-glow {
  fill: url("#stormRadarGlow");
}

.official-storm-map .storm-grid-lines path,
.official-storm-map .storm-grid-lines circle {
  fill: none;
  stroke: rgba(174, 214, 223, 0.16);
  stroke-width: 1;
}

.official-storm-map .storm-scan-lines path {
  fill: none;
  stroke: rgba(117, 168, 255, 0.34);
  stroke-width: 1.5;
}

.official-storm-map .storm-state-label {
  fill: rgba(237, 244, 248, 0.13);
  font-size: 112px;
  font-weight: 900;
  letter-spacing: 0;
}

.official-storm-map .storm-state-subtitle {
  fill: rgba(237, 244, 248, 0.58);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.official-storm-map-empty {
  margin-top: 12px;
}

.official-storm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.official-storm-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.official-storm-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.official-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
}

.official-selected-date:empty {
  display: none;
}

.storm-date-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(21, 87, 192, 0.28);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #edf4ff;
}

.storm-date-callout div {
  display: grid;
  gap: 4px;
}

.storm-date-callout span {
  color: var(--muted);
  font-size: 0.86rem;
}

.storm-date-index,
.state-map-selector {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.storm-date-index > summary,
.state-map-selector > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.storm-date-index > summary::marker,
.state-map-selector > summary::marker {
  color: var(--brand);
}

.storm-date-index > summary strong {
  color: var(--brand-strong);
  font-size: 0.82rem;
}

.storm-date-index-list {
  display: grid;
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.storm-date-index-row {
  display: grid;
  grid-template-columns: 130px 100px minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.storm-date-index-row:hover,
.storm-date-index-row.active {
  background: #edf4ff;
  color: var(--ink);
}

.storm-date-index-row strong {
  color: var(--brand-strong);
}

.state-map-selector .state-tile-map {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.official-date-card {
  align-content: start;
}

.official-date-card h4,
.official-date-card p {
  margin: 0;
}

.storm-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.storm-card {
  align-content: start;
}

.storm-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.storm-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.storm-card details {
  margin-top: 8px;
}

.storm-card summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
}

.storm-source-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 10px;
}

.weather-command-center {
  background:
    linear-gradient(135deg, rgba(6, 21, 45, 0.04), rgba(21, 87, 192, 0.08)),
    var(--panel);
}

.weather-command-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(280px, 0.85fr);
  gap: 14px;
  min-width: 0;
}

.weather-risk-map {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #06111f;
}

.weather-risk-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.weather-risk-map.empty-map {
  display: grid;
  place-items: center;
  gap: 6px;
  color: white;
  text-align: center;
}

.risk-map-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 12px;
  border: 1px solid rgba(216, 226, 236, 0.38);
  border-radius: 8px;
  background: rgba(4, 13, 24, 0.78);
  color: white;
  backdrop-filter: blur(8px);
}

.risk-map-hud span,
.risk-map-hud em {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-map-hud strong {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.radius-ring,
.risk-pin {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  pointer-events: none;
}

.radius-ring {
  border: 2px solid rgba(46, 123, 240, 0.55);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(46, 123, 240, 0.25);
}

.ring-1 {
  width: 84px;
  height: 84px;
}

.ring-2 {
  width: 150px;
  height: 150px;
}

.ring-3 {
  width: 230px;
  height: 230px;
}

.risk-pin {
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 7px rgba(164, 63, 63, 0.24);
}

.weather-command-stack,
.weather-evidence-grid {
  display: grid;
  gap: 10px;
}

.weather-question-card,
.weather-evidence-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.weather-question-card span,
.weather-evidence-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.weather-question-card strong,
.weather-evidence-card strong {
  color: var(--brand-strong);
  line-height: 1.35;
}

.weather-evidence-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.weather-evidence-card p,
.weather-evidence-card small {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.weather-timeline-panel {
  margin-top: 14px;
}

.dol-discovery-panel {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(21, 87, 192, 0.26);
  border-radius: 8px;
  background: var(--panel);
}

.dol-discovery-panel.empty {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-style: dashed;
}

.dol-discovery-panel.empty div,
.dol-discovery-summary > div:first-child {
  display: grid;
  gap: 3px;
}

.dol-discovery-panel.empty span,
.dol-discovery-summary > div:first-child > span {
  color: #9fb5ce;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dol-discovery-panel.empty strong,
.dol-discovery-summary > div:first-child > strong {
  font-size: 1.35rem;
}

.dol-discovery-panel.empty p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.dol-discovery-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2.3fr);
  gap: 18px;
  align-items: center;
  padding: 15px 16px;
  background: #071a32;
  color: white;
}

.dol-discovery-summary small {
  color: #aebfd1;
}

.dol-discovery-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(115px, 1fr));
  min-width: 0;
}

.dol-discovery-kpis > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: #aebfd1;
  font-size: 0.72rem;
}

.dol-discovery-kpis strong {
  overflow: hidden;
  color: white;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dol-ranking-list {
  display: grid;
  max-height: 620px;
  overflow: auto;
}

.dol-candidate-row {
  display: grid;
  grid-template-columns: 96px 142px 68px 68px 68px minmax(280px, 1fr) 110px;
  gap: 10px;
  align-items: center;
  min-height: 102px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid #8a98a8;
  background: var(--panel);
}

.dol-candidate-row.primarydol {
  border-left-color: var(--royal);
  background: #f2f7ff;
}

.dol-candidate-row.secondarydol {
  border-left-color: #38a8d8;
}

.dol-candidate-row.alternatedol {
  border-left-color: var(--accent);
}

.dol-rank,
.dol-date,
.dol-score,
.dol-actions {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dol-rank > span,
.dol-date > span,
.dol-score > span,
.dol-evidence small {
  color: var(--muted);
  font-size: 0.7rem;
}

.dol-rank > strong {
  color: var(--brand-strong);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.dol-date > strong,
.dol-score > strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.dol-score > strong {
  font-size: 1.08rem;
}

.dol-evidence {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dol-evidence p,
.dol-evidence small {
  margin: 0;
  line-height: 1.35;
}

.dol-evidence p {
  color: var(--ink);
  font-size: 0.78rem;
}

.dol-candidate-audit {
  margin-top: 3px;
  border-top: 1px solid var(--line);
}

.dol-candidate-audit > summary {
  padding: 7px 0 2px;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
}

.dol-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.dol-score-grid > span {
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.dol-score-grid em,
.dol-time-audit dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.dol-score-grid strong {
  color: var(--ink);
  font-size: 0.74rem;
}

.dol-time-audit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 9px 0 6px;
}

.dol-time-audit > div {
  min-width: 0;
}

.dol-time-audit dd {
  overflow-wrap: anywhere;
  margin: 1px 0 0;
  color: var(--ink);
  font-size: 0.7rem;
}

.dol-lineage-list {
  display: grid;
  gap: 4px;
  margin: 7px 0;
}

.dol-lineage-list > span {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 5px 7px;
  border-left: 3px solid var(--royal);
  background: var(--soft);
}

.dol-lineage-list strong,
.dol-lineage-list em,
.dol-lineage-list small {
  overflow-wrap: anywhere;
  font-size: 0.66rem;
  font-style: normal;
}

.dol-lineage-list em,
.dol-lineage-list small {
  color: var(--muted);
}

.rejected-event-drawer {
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.rejected-event-drawer > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 15px;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 850;
}

.rejected-event-drawer > summary strong {
  color: var(--muted);
}

.rejected-list {
  max-height: 460px;
  border-top: 1px solid var(--line);
}

.dol-actions .ghost-button {
  width: 100%;
  min-width: 0;
}

.compact-header {
  margin-bottom: 8px;
}

.weather-timeline-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.weather-timeline-more {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.weather-timeline-more > summary {
  padding: 10px 12px;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.weather-timeline-list {
  display: grid;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.weather-timeline-list p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

.weather-timeline-list strong {
  color: var(--ink);
}

.timeline-node {
  min-height: 126px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--royal);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.timeline-node.dol {
  border-top-color: var(--accent);
}

.timeline-node.high {
  border-top-color: var(--red);
}

.timeline-node.gap {
  border-top-color: var(--muted);
}

.timeline-node span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-node strong {
  display: block;
  margin: 5px 0;
  color: var(--brand-strong);
}

.timeline-node p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.forensic-feed-strip {
  margin-top: 14px;
}

body.dark-mode .weather-question-card,
body.dark-mode .weather-evidence-card,
body.dark-mode .timeline-node,
body.dark-mode .weather-range-drawer,
body.dark-mode .source-audit-drawer,
body.dark-mode .weather-timeline-more,
body.dark-mode .rejected-event-drawer,
body.dark-mode .dol-discovery-panel,
body.dark-mode .dol-candidate-row {
  background: rgba(4, 13, 24, 0.74);
}

body.dark-mode .dol-candidate-row.primarydol,
body.dark-mode .source-audit-list a:hover {
  background: rgba(21, 87, 192, 0.16);
}

body.dark-mode .weather-range-controls input {
  background: rgba(4, 13, 24, 0.9);
  color: white;
}

body.dark-mode .risk-discovery-form input,
body.dark-mode .risk-discovery-form select {
  background: rgba(4, 13, 24, 0.9);
  color: white;
}

body.dark-mode .dol-date > strong,
body.dark-mode .dol-score > strong,
body.dark-mode .dol-score-grid strong,
body.dark-mode .dol-time-audit dd,
body.dark-mode .dol-evidence p,
body.dark-mode .weather-timeline-list strong {
  color: #f4f8ff;
}

@media (max-width: 1320px) {
  .dol-candidate-row {
    grid-template-columns: 88px 132px 64px 64px 64px minmax(240px, 1fr);
  }

  .dol-actions {
    grid-column: 2 / -1;
    grid-template-columns: repeat(2, minmax(0, 150px));
  }
}

@media (max-width: 1120px) {
  .storm-primary-controls {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .storm-primary-controls .storm-browser-actions {
    justify-content: stretch;
  }

  .source-intelligence-bar,
  .dol-discovery-summary,
  .risk-discovery-map-layout {
    grid-template-columns: 1fr;
  }

  .risk-discovery-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .risk-address-field {
    grid-column: 1 / -1;
  }

  .source-intelligence-lead {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .dol-discovery-kpis > span:first-child {
    border-left: 0;
  }

  .dol-candidate-row {
    grid-template-columns: 88px 132px repeat(3, 64px) minmax(220px, 1fr);
  }
}

@media (max-width: 760px) {
  .state-tile-map {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .storm-browser-controls {
    grid-template-columns: 1fr;
  }

  .storm-primary-controls,
  .risk-discovery-form,
  .weather-range-controls,
  .source-intelligence-bar,
  .dol-discovery-summary,
  .dol-candidate-row {
    grid-template-columns: 1fr;
  }

  .source-intelligence-metrics,
  .dol-discovery-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-intelligence-metric:nth-child(odd),
  .dol-discovery-kpis > span:nth-child(odd) {
    border-left: 0;
  }

  .source-audit-list a {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .dol-score-grid,
  .dol-time-audit,
  .dol-lineage-list > span {
    grid-template-columns: 1fr;
  }

  .weather-range-drawer > summary,
  .source-audit-drawer > summary,
  .dol-discovery-panel.empty {
    align-items: stretch;
    flex-direction: column;
  }

  .dol-candidate-row {
    gap: 8px;
    padding: 13px;
  }

  .dol-rank,
  .dol-date,
  .dol-score {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .dol-actions {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storm-load-status {
    display: grid;
  }
}

.empty-state {
  padding: 28px;
  border: 1px dashed #c7baa7;
  border-radius: 8px;
  background: #fbfaf7;
  text-align: center;
  color: var(--muted);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(30, 36, 40, 0.58);
}

.ai-command-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1090;
  width: 62px;
  height: 62px;
  padding: 5px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: var(--royal-dark);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(6, 21, 45, 0.34);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.ai-command-launcher > img:not(.ai-command-brand-badge) {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ai-command-launcher .ai-command-brand-badge {
  position: absolute;
  top: -7px;
  left: -7px;
  width: 28px;
  height: 28px;
  padding: 2px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
}

.ai-command-launcher span {
  position: absolute;
  right: -4px;
  bottom: -2px;
  min-width: 34px;
  height: 22px;
  padding: 2px 5px;
  border: 2px solid #ffffff;
  border-radius: 11px;
  background: var(--accent);
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  line-height: 14px;
}

.ai-command-launcher:hover,
.ai-command-launcher:focus-visible {
  transform: translateY(-2px);
  outline: 3px solid rgba(46, 123, 240, 0.28);
}

.ai-command-launcher.dragging {
  transform: scale(1.04);
  cursor: grabbing;
  outline: 3px solid rgba(46, 123, 240, 0.34);
}

.ai-command-panel {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 1085;
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto auto;
  width: min(430px, calc(100vw - 32px));
  height: min(690px, calc(100vh - 118px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(6, 21, 45, 0.28);
}

.ai-command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.ai-command-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.ai-command-identity div {
  min-width: 0;
}

.ai-command-identity strong,
.ai-command-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-command-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.ai-command-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--royal-light);
  border-radius: 50%;
  background: var(--navy);
  object-fit: cover;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ai-command-scope {
  display: grid;
  gap: 2px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: #f5f8fc;
}

.ai-command-scope span,
.ai-command-scope small {
  color: var(--muted);
  font-size: 11px;
}

.ai-command-scope strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-command-scope small.connected {
  color: var(--royal);
  font-weight: 800;
}

.ai-command-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.ai-message {
  width: fit-content;
  max-width: 92%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ai-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.ai-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ai-message.assistant {
  margin-right: auto;
  background: #f5f8fc;
}

.ai-message.user {
  margin-left: auto;
  border-color: var(--royal);
  background: var(--royal);
  color: #ffffff;
}

.ai-command-prompts {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
  overflow-x: auto;
}

.ai-command-prompts button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--royal-dark);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ai-command-form {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.ai-command-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.ai-command-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  padding: 9px 10px;
  border: 1px dashed var(--royal-light);
  border-radius: 7px;
  background: #f5f8fc;
  cursor: pointer;
}

.ai-command-dropzone.drag-over {
  border-style: solid;
  border-color: var(--royal);
  background: #eaf2ff;
  box-shadow: inset 0 0 0 2px rgba(23, 77, 157, 0.14);
}

.ai-command-dropzone > div:first-of-type {
  min-width: 0;
}

.ai-command-dropzone strong,
.ai-command-dropzone small {
  display: block;
}

.ai-command-dropzone strong {
  font-size: 12px;
}

.ai-command-dropzone small,
.ai-command-attachment small,
.ai-command-attachment-status {
  color: var(--muted);
  font-size: 10px;
}

.ai-command-attachment-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.ai-command-attachments {
  display: grid;
  max-height: 116px;
  margin-bottom: 7px;
  overflow-y: auto;
  gap: 5px;
}

.ai-command-attachments[hidden] {
  display: none;
}

.ai-command-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.ai-command-attachment > div {
  min-width: 0;
}

.ai-command-attachment strong,
.ai-command-attachment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-command-attachment strong {
  font-size: 11px;
}

.ai-command-attachment .icon-button {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  font-size: 17px;
}

.ai-command-attachment-status {
  display: block;
  min-height: 14px;
  margin: -2px 0 6px;
}

.ai-command-form textarea {
  width: 100%;
  min-height: 74px;
  max-height: 150px;
  resize: vertical;
}

.ai-command-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .ai-command-launcher {
    right: 14px;
    bottom: 14px;
  }

  .ai-command-panel {
    right: 8px;
    bottom: 84px;
    width: calc(100vw - 16px);
    height: min(720px, calc(100vh - 98px));
  }

  .ai-command-dropzone {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-command-attachment-actions {
    width: 100%;
  }

  .ai-command-attachment-actions button {
    flex: 1 1 0;
  }
}

.modal {
  width: min(980px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: 16px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--charcoal);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.restricted {
  border-left: 4px solid var(--red);
}

.document-tile,
.photo-tile {
  display: grid;
  content-visibility: auto;
  contain-intrinsic-size: auto 190px;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #ece7dc;
}

.photo-grid,
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-evidence-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(11, 37, 69, 0.08);
}

.photo-tile {
  position: relative;
}

.photo-tile.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(21, 87, 192, 0.18);
}

.photo-select-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.photo-select-control input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.compact-photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mitigation-actions {
  margin-top: 14px;
}

.photo-markup-workspace {
  display: grid;
  gap: 12px;
}

.photo-markup-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.photo-markup-toolbar label {
  min-width: 150px;
}

.photo-markup-stage {
  display: grid;
  place-items: center;
  overflow: auto;
  max-height: 68vh;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

#photoMarkupCanvas {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: crosshair;
}

.photo-report-picker {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.photo-report-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.photo-report-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.thread-lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.thread-lane-card {
  min-height: 190px;
}

.thread-lane-card.active {
  border-color: rgba(21, 87, 192, 0.45);
  box-shadow: 0 0 0 1px rgba(21, 87, 192, 0.12);
}

.thread-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.thread-latest {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.thread-latest span {
  color: var(--muted);
  font-size: 0.82rem;
}

.kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-pill {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1eadf;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell::before {
    display: none;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
  }

  .main-nav {
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions,
  .search-box,
  .source-filter-box {
    width: 100%;
    min-width: 0;
  }

  .source-filter-box select {
    width: 100%;
  }

  .detail-metrics,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .claim-card,
  .two-column,
  .three-column,
  .sync-service-row,
  .state-sweep-layout,
  .weather-command-layout {
    grid-template-columns: 1fr;
  }

  .weather-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storm-browser-controls {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .storm-date-index-row {
    grid-template-columns: 120px 90px minmax(220px, 1fr);
  }

  .storm-date-index-row span:last-child {
    display: none;
  }

  .photo-evidence-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .state-satellite-panel,
  .official-storm-map {
    min-height: 340px;
    height: 340px;
  }
}

@media (max-width: 760px) {
  .view {
    padding: 12px;
  }

  .storm-browser-controls {
    grid-template-columns: 1fr;
  }

  .weather-evidence-grid {
    grid-template-columns: 1fr;
  }

  .storm-browser-actions,
  .storm-date-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .storm-browser-actions .primary-button,
  .storm-browser-actions .ghost-button,
  .storm-date-callout .primary-button {
    width: 100%;
  }

  .storm-date-index-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .topbar {
    padding: 12px;
  }

  .login-panel {
    padding: 22px;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions {
    display: grid;
  }

  .detail-metrics,
  .stats-grid,
  .pipeline-summary-strip,
  .form-grid,
  .review-gate-grid,
  .inline-form,
  .detail-grid,
  .template-grid,
  .photo-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .claim-detail-title,
  .panel-header {
    display: grid;
  }

  table {
    min-width: 560px;
  }
}
