:root {
  --bg: #080a0c;
  --surface: rgba(13, 16, 20, 0.94);
  --surface-2: rgba(19, 24, 32, 0.86);
  --surface-3: rgba(13, 20, 28, 0.78);
  --border: #1a2230;
  --border-hi: #243040;
  --text: #d8e4f0;
  --muted: #8ea2b5;
  --dim: #536678;
  --danger: oklch(64% 0.20 22);
  --danger-bg: oklch(14% 0.07 22);
  --danger-border: oklch(28% 0.12 22);
  --warning: oklch(73% 0.17 62);
  --warning-bg: oklch(15% 0.06 62);
  --warning-border: oklch(32% 0.10 62);
  --ok: oklch(66% 0.17 150);
  --ok-bg: oklch(14% 0.06 150);
  --ok-border: oklch(28% 0.10 150);
  --info: oklch(67% 0.14 242);
  --info-bg: oklch(14% 0.06 242);
  --info-border: oklch(27% 0.09 242);
  --ticker: oklch(73% 0.17 62);
  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;
  --r: 4px;
  --r-lg: 10px;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(180, 90, 35, 0.18), transparent 28%),
    radial-gradient(circle at left center, rgba(48, 95, 150, 0.16), transparent 30%),
    linear-gradient(180deg, #07090c 0%, #0a1016 100%);
}

.seo-snapshot {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.js .seo-snapshot {
  display: none;
}

.seo-snapshot h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.seo-snapshot h2 {
  margin: 20px 0 8px;
  font-size: 1.05rem;
}

.seo-snapshot p,
.seo-snapshot li {
  color: var(--muted);
  line-height: 1.6;
}

.seo-snapshot a {
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.topbar,
.cost-ticker,
.status-ribbon,
.archive-banner {
  width: min(1600px, calc(100% - 24px));
  margin: 12px auto 0;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
}

.topbar-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
}

.topbar-brand span {
  color: var(--danger);
}

.topbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border-hi);
  flex-shrink: 0;
}

.topbar-meta {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-item {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.topbar-item strong {
  color: var(--text);
  font-weight: 400;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.btn,
.info-btn,
.archive-banner-link {
  appearance: none;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn {
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn:hover,
.info-btn:hover,
.archive-banner-link:hover {
  border-color: var(--info);
  background: var(--info-bg);
  color: var(--info);
}

.btn-alert {
  color: var(--warning);
  border-color: var(--warning-border);
}

.cost-ticker {
  position: relative;
  padding: 18px;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cost-ticker::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 48%, rgba(214, 153, 38, 0.16), transparent 22%),
    radial-gradient(circle at 82% 10%, rgba(176, 75, 48, 0.18), transparent 26%);
  pointer-events: none;
}

.ticker-label,
.section-kicker,
.metric-kicker,
.archive-banner-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.ticker-label {
  position: relative;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}

.ticker-number {
  position: relative;
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--ticker);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.ticker-range {
  position: relative;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.ticker-meta {
  position: relative;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.ticker-meta strong {
  color: var(--text);
  font-weight: 400;
}

.archive-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--warning-bg), rgba(38, 27, 9, 0.8));
}

.archive-banner-copy {
  font-size: 13px;
  color: var(--text);
}

.archive-banner-kicker {
  font-size: 9px;
  color: var(--warning);
  margin-bottom: 4px;
}

.archive-banner-link {
  padding: 8px 12px;
  font-size: 11px;
  white-space: nowrap;
}

.archive-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.archive-input {
  min-width: 0;
  flex: 1 1 180px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.archive-input::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
}

.archive-hint {
  width: 100%;
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.status-ribbon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--r-lg);
}

.status-ribbon.tone-danger {
  background: linear-gradient(90deg, var(--danger-bg), rgba(45, 16, 16, 0.85));
  border-color: var(--danger-border);
}

.status-ribbon.tone-warning {
  background: linear-gradient(90deg, var(--warning-bg), rgba(49, 34, 11, 0.85));
  border-color: var(--warning-border);
}

.status-ribbon.tone-ok {
  background: linear-gradient(90deg, var(--ok-bg), rgba(12, 40, 25, 0.82));
  border-color: var(--ok-border);
}

.status-ribbon.tone-neutral {
  background: var(--surface);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}

.tone-danger .status-dot {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(230, 60, 50, 0.6);
}

.tone-warning .status-dot {
  background: var(--warning);
  box-shadow: 0 0 12px rgba(240, 174, 51, 0.5);
}

.tone-ok .status-dot {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(60, 218, 124, 0.45);
}

.tone-neutral .status-dot {
  background: var(--dim);
  animation: none;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r);
}

.tone-danger .status-badge {
  background: rgba(255, 79, 79, 0.14);
  color: var(--danger);
}

.tone-warning .status-badge {
  background: rgba(255, 193, 79, 0.12);
  color: var(--warning);
}

.tone-ok .status-badge {
  background: rgba(83, 231, 123, 0.12);
  color: var(--ok);
}

.tone-neutral .status-badge {
  background: var(--surface-2);
  color: var(--muted);
}

.status-label-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.status-summary-text {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  flex: 1;
}

.dashboard-grid {
  width: min(1600px, calc(100% - 24px));
  margin: 12px auto;
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(10, 14, 19, 0.96), rgba(10, 14, 19, 0.88));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(11, 15, 20, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.section-header-static {
  position: static;
}

.section-kicker {
  font-size: 9px;
  color: var(--muted);
}

.section-title {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.section-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.feed-health-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.feed-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feed-dot.ok {
  background: var(--ok);
}

.feed-dot.err {
  background: var(--danger);
}

.headline-item,
.quote-item,
.incident-item,
.energy-item,
.archive-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.headline-item:last-child,
.quote-item:last-child,
.incident-item:last-child,
.energy-item:last-child,
.archive-item:last-child {
  border-bottom: 0;
}

.headline-top,
.quote-meta-row,
.incident-meta,
.energy-header,
.archive-meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.pill,
.country-tag,
.energy-status-tag,
.market-chip,
.archive-tone {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: var(--r);
  border: 1px solid var(--border-hi);
}

.pill-high,
.energy-status-past,
.market-danger,
.archive-tone-danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.pill-medium,
.energy-status-near,
.market-warning,
.archive-tone-warning {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.pill-info,
.market-info,
.archive-tone-ok {
  color: var(--info);
  background: var(--info-bg);
  border-color: var(--info-border);
}

.pill-ok,
.energy-status-safe,
.market-ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.headline-source,
.quote-date,
.incident-date,
.energy-note,
.archive-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.headline-title,
.quote-source,
.incident-link,
.energy-note a,
.archive-link,
.audit-panel a,
.market-source {
  color: var(--text);
  text-decoration: none;
}

.headline-title {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.headline-title:hover,
.quote-source:hover,
.incident-link:hover,
.energy-note a:hover,
.archive-link:hover,
.audit-panel a:hover,
.market-source:hover {
  color: var(--info);
}

.headline-desc,
.quote-means,
.incident-summary,
.energy-exposure,
.archive-summary,
.methodology-section,
.metric-detail,
.audit-panel,
.market-summary {
  color: var(--muted);
}

.headline-desc,
.incident-summary,
.energy-exposure,
.archive-summary,
.quote-means {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.quote-item blockquote,
.quote-excerpt {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--border-hi);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.quote-clash {
  margin-top: 6px;
  font-size: 11px;
  color: var(--warning);
}

.quote-source {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
}

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

.metric-box {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metric-box:nth-child(2n) {
  border-right: 0;
}

.metric-box:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.metric-kicker {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-value.high {
  color: var(--danger);
}

.metric-value.mixed {
  color: var(--warning);
}

.metric-detail {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.45;
}

.info-btn {
  margin-top: 10px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.audit-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--r);
  border: 1px solid var(--border-hi);
  background: rgba(20, 28, 38, 0.74);
  font-size: 11px;
  line-height: 1.6;
}

.audit-panel strong {
  color: var(--text);
}

.audit-panel a {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.casualties-table {
  width: 100%;
  border-collapse: collapse;
}

.casualties-table th,
.casualties-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.casualties-table th {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.casualties-table th:first-child,
.casualties-table td:first-child {
  text-align: left;
}

.casualties-table td {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}

.casualties-table td:first-child {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
}

.null-val {
  color: var(--dim);
  font-family: var(--font-ui);
  font-style: italic;
}

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

.market-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(15, 21, 29, 0.95), rgba(15, 21, 29, 0.8));
}

.market-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.market-label {
  font-size: 12px;
  font-weight: 600;
}

.market-value {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

.market-change {
  margin-top: 6px;
  font-size: 11px;
  color: var(--warning);
}

.market-summary {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.55;
}

.market-source {
  display: inline-block;
  margin-top: 10px;
  font-size: 10px;
}

.map-wrap {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.strait-map {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(38, 94, 144, 0.15), transparent 26%),
    linear-gradient(180deg, rgba(5, 12, 18, 0.95), rgba(8, 18, 28, 0.88));
}

.incident-label {
  font-family: var(--font-mono);
  font-size: 4px;
  fill: var(--muted);
}

.map-water {
  fill: rgba(19, 49, 80, 0.72);
  stroke: rgba(90, 140, 190, 0.18);
  stroke-width: 0.7;
}

.map-land {
  fill: rgba(84, 67, 47, 0.48);
}

.map-lane {
  fill: none;
  stroke: rgba(210, 225, 240, 0.18);
  stroke-width: 1.2;
  stroke-dasharray: 2.5 2.5;
}

.map-pin {
  stroke-width: 1.2;
}

.incident-item-title {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.energy-countdown {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 700;
}

.energy-projection {
  margin-top: 6px;
  font-size: 11px;
  color: var(--warning);
}

.energy-bar-wrap {
  height: 4px;
  margin: 10px 0 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.energy-bar {
  height: 100%;
  border-radius: inherit;
}

.archive-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.archive-item:hover {
  background: rgba(19, 24, 32, 0.65);
}

.archive-copy {
  margin-top: 8px;
}

.methodology-section {
  padding: 16px;
  font-size: 11px;
  line-height: 1.7;
}

.methodology-section p {
  margin: 0 0 10px;
}

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

  50% {
    opacity: 0.4;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(84, 101, 121, 0.5);
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar,
  .cost-ticker,
  .status-ribbon,
  .archive-banner,
  .dashboard-grid {
    width: min(100% - 16px, 100%);
  }

  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .topbar-divider {
    display: none;
  }

  .topbar-brand,
  .topbar-meta,
  .topbar-actions {
    width: 100%;
  }

  .topbar-item {
    flex: 1 1 130px;
    min-width: 0;
  }

  .topbar-actions {
    margin-left: 0;
  }

  .topbar-actions .btn {
    flex: 1 1 0;
  }

  .status-ribbon {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .status-summary-text {
    flex-basis: 100%;
  }

  .archive-banner {
    flex-wrap: wrap;
  }

  .market-grid,
  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .metric-box {
    border-right: 0;
  }
}
