:root {
  --ink: #10242a;
  --muted: #61767d;
  --line: #cfdbdc;
  --panel: #fbfefe;
  --panel-strong: #ffffff;
  --deep: #082631;
  --sea: #0f5b64;
  --teal: #159a8c;
  --safe: #2a9d75;
  --warn: #c99726;
  --risk: #bf3d3d;
  --amber-soft: #fff5dc;
  --mist: #edf4f4;
  --steel: #3f5861;
  --shadow: 0 18px 44px rgba(9, 31, 37, 0.13);
  --shadow-soft: 0 10px 24px rgba(9, 31, 37, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(12, 72, 80, 0.12) 0%, transparent 34%),
    linear-gradient(180deg, #f3f7f6 0%, #e7eeee 50%, #f8faf9 100%);
}

button,
a {
  font: inherit;
}

button {
  border: 1px solid #0e6c6a;
  background: #0e6c6a;
  color: #ffffff;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button:hover {
  border-color: #159a8c;
  box-shadow: 0 10px 22px rgba(14, 108, 106, 0.22);
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(21, 154, 140, 0.32);
  outline-offset: 2px;
}

.ghost-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.app-frame {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100vh;
}

.command-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px;
  background: #092a34;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f6fbfa;
  color: #092a34;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.command-rail nav {
  display: grid;
  gap: 10px;
  width: 100%;
}

.command-rail a:not(.brand-mark) {
  display: block;
  text-align: center;
  color: #c3d7d9;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.command-rail a:not(.brand-mark):hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.app-shell {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.title-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
}

h3 {
  font-size: 13px;
  margin-bottom: 8px;
}

.mission-line {
  color: var(--muted);
  margin: 7px 0 0;
  max-width: 760px;
  line-height: 1.4;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.live-clock {
  min-width: 88px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: var(--shadow-soft);
}

.live-clock span,
.status-strip span,
.metric-stack span,
.signal-row span,
.feed-pills span,
.panel-chip,
.vault-chip {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.live-clock strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.hero-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid #bfcfd1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 242, 0.92)),
    linear-gradient(90deg, rgba(42, 157, 117, 0.16), transparent);
  box-shadow: var(--shadow);
}

.hero-copy h2 {
  max-width: 840px;
  font-size: 24px;
  line-height: 1.15;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.signal-row span,
.feed-pills span,
.panel-chip,
.vault-chip {
  border: 1px solid #c8d8d9;
  background: #f8fbfb;
  border-radius: 8px;
  padding: 7px 9px;
}

.status-strip,
.metric-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.status-strip div,
.metric-stack div {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.status-strip strong,
.metric-stack strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
}

.research-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.research-card {
  position: relative;
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.research-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.research-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.research-card strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 26px;
}

.research-card p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.4;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.35fr) minmax(340px, 0.75fr);
  grid-template-areas:
    "map risk"
    "map routes"
    "engine engine"
    "services ledger"
    "paid paid"
    "pilot pilot"
    "world world"
    "deploy deploy"
    "chokes chokes"
    "build build";
  gap: 14px;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
  box-shadow: var(--shadow);
}

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

.map-panel {
  grid-area: map;
  min-height: 0;
}

.intelligence-panel {
  grid-area: risk;
}

.control-panel {
  grid-area: routes;
}

.engine-panel {
  grid-area: engine;
}

.execution-panel {
  grid-area: ledger;
}

.service-panel {
  grid-area: services;
}

.paid-panel {
  grid-area: paid;
}

.pilot-panel {
  grid-area: pilot;
}

.chokepoint-panel {
  grid-area: chokes;
}

.world-panel {
  grid-area: world;
}

.deployment-panel {
  grid-area: deploy;
}

.build-panel {
  grid-area: build;
}

.feed-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ocean-map {
  position: relative;
  overflow: hidden;
  border: 1px solid #1c7180;
  border-radius: 8px;
  background: var(--sea);
  aspect-ratio: 900 / 520;
  min-height: 460px;
}

.ocean-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.continent {
  fill: #d4c18d;
  opacity: 0.82;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 2;
}

.route {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
  opacity: 0.92;
  filter: url(#glow);
}

.route.safe {
  stroke: #62d59f;
}

.route.warning {
  stroke: #f4c765;
}

.route.risk {
  stroke: #f0655b;
}

.radar-ring {
  fill: none;
  stroke: rgba(240, 101, 91, 0.7);
  stroke-width: 2;
  stroke-dasharray: 6 8;
}

.radar-ring.delay {
  stroke: rgba(98, 213, 159, 0.65);
}

.marker {
  cursor: pointer;
}

.marker circle {
  stroke: #ffffff;
  stroke-width: 3;
  filter: url(#glow);
}

.marker text {
  fill: #ffffff;
  font-size: 14px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.52);
  stroke-width: 4px;
}

.marker .pulse {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.45;
}

.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 38, 49, 0.78);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

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

.map-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.map-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.map-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.map-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.legend-safe {
  background: var(--safe);
}

.legend-warn {
  background: var(--warn);
}

.legend-risk {
  background: var(--risk);
}

.risk-badge {
  border-radius: 8px;
  color: #ffffff;
  min-width: 64px;
  text-align: center;
  padding: 10px;
  background: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.risk-low {
  background: var(--safe);
}

.risk-medium {
  background: var(--warn);
}

.risk-high {
  background: var(--risk);
}

.reason-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfb;
}

.reason-box p {
  color: var(--muted);
  line-height: 1.48;
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.timeline div,
.route-card,
.ledger li,
.service-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.timeline div {
  background: linear-gradient(90deg, #ffffff, #f4faf8);
}

.timeline span,
.route-card span,
.ledger span,
.service-grid span,
.chokepoint-card span,
.build-step span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.route-card {
  min-height: 132px;
  text-align: left;
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.route-card strong {
  display: block;
  margin: 7px 0;
  font-size: 22px;
}

.route-card.active {
  border-color: #0f6b7c;
  box-shadow: inset 0 0 0 2px rgba(15, 107, 124, 0.16), var(--shadow-soft);
}

.ledger {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  max-height: 302px;
  overflow: auto;
}

.ledger li {
  background: #ffffff;
}

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

.service-grid article {
  min-height: 104px;
  background:
    linear-gradient(180deg, #ffffff, #f5faf8);
}

.service-grid strong {
  display: block;
  margin-top: 8px;
  line-height: 1.25;
}

.pilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(150px, 0.5fr));
  gap: 10px;
}

.paid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(150px, 0.5fr));
  gap: 10px;
}

.deployment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(150px, 0.5fr));
  gap: 10px;
}

.pilot-card,
.paid-card,
.deployment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.pilot-card.feature,
.paid-card.feature,
.deployment-card.feature {
  background: linear-gradient(180deg, #ffffff, #f5faf8);
}

.pilot-card span,
.paid-card span,
.deployment-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pilot-card strong,
.paid-card strong,
.deployment-card strong {
  display: block;
  margin: 7px 0;
  line-height: 1.25;
}

.pilot-card p,
.paid-card p,
.deployment-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.deployment-card a {
  color: #0e6c6a;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.engine-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.engine-status article,
.briefing-box,
.signal-card,
.action-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.engine-status span,
.briefing-box span,
.signal-card span,
.action-list span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.engine-status strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1;
}

.briefing-box {
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff, #f5faf8);
}

.briefing-box strong {
  display: block;
  margin: 7px 0;
  font-size: 18px;
  line-height: 1.25;
}

.briefing-box p,
.signal-card p,
.action-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.38;
}

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

.adapter-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.adapter-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
  padding: 12px;
}

.adapter-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.adapter-card strong {
  display: block;
  margin: 7px 0;
  line-height: 1.25;
}

.adapter-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.signal-card {
  min-height: 158px;
}

.signal-card strong {
  display: block;
  margin: 6px 0;
  line-height: 1.25;
}

.signal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.signal-meta i {
  border-radius: 8px;
  background: #eef5f4;
  color: #31515a;
  padding: 5px 7px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.signal-critical {
  border-color: rgba(191, 61, 61, 0.45);
  box-shadow: inset 4px 0 0 rgba(191, 61, 61, 0.8);
}

.signal-high {
  border-color: rgba(201, 151, 38, 0.45);
  box-shadow: inset 4px 0 0 rgba(201, 151, 38, 0.86);
}

.action-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.impact-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(120px, 0.35fr));
  gap: 10px;
  margin-bottom: 10px;
}

.impact-summary article,
.impact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.impact-summary span,
.impact-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.impact-summary strong {
  display: block;
  margin-top: 6px;
  line-height: 1.2;
}

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

.impact-card {
  min-height: 136px;
  background: linear-gradient(180deg, #ffffff, #f6fbfa);
}

.impact-card strong {
  display: block;
  margin: 6px 0;
}

.impact-card p {
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 0;
}

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

.chokepoint-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  min-height: 186px;
  color: var(--ink);
  text-align: left;
}

.chokepoint-card:hover,
.chokepoint-card.active {
  border-color: #0f6b7c;
  box-shadow: inset 0 0 0 2px rgba(15, 107, 124, 0.13), var(--shadow-soft);
}

.chokepoint-card strong {
  display: block;
  margin: 6px 0;
}

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

.risk-meter {
  height: 8px;
  background: #dfe8e9;
  border-radius: 8px;
  overflow: hidden;
  margin: 9px 0;
}

.risk-meter i {
  display: block;
  height: 100%;
  background: var(--safe);
}

.risk-meter .high {
  background: var(--warn);
}

.risk-meter .critical {
  background: var(--risk);
}

.build-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.build-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 118px;
  background: #ffffff;
}

.build-step strong {
  display: block;
  margin: 6px 0;
}

.build-step p {
  color: var(--muted);
  line-height: 1.38;
  margin-bottom: 0;
}

.vault-chip {
  color: #31515a;
}

@media (max-width: 1180px) {
  .layout-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "map"
      "risk"
      "routes"
      "engine"
      "ledger"
      "services"
      "paid"
      "pilot"
      "world"
      "deploy"
      "chokes"
      "build";
  }

  .map-panel {
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .app-frame {
    display: block;
  }

  .command-rail {
    position: static;
    height: auto;
    padding: 10px;
    flex-direction: row;
    justify-content: space-between;
  }

  .command-rail nav {
    display: flex;
    width: auto;
    overflow-x: auto;
  }

  .app-shell {
    padding: 14px;
  }

  .topbar,
  .top-actions,
  .hero-board {
    display: block;
  }

  .top-actions {
    margin-top: 12px;
  }

  .top-actions > * {
    margin: 0 6px 8px 0;
  }

  .panel-title {
    display: block;
  }

  .feed-pills {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .status-strip,
  .metric-stack,
  .research-band,
  .route-options,
  .map-stats,
  .engine-status,
  .signal-list,
  .adapter-panels,
  .action-list,
  .paid-grid,
  .pilot-grid,
  .deployment-grid,
  .impact-summary,
  .impact-grid,
  .service-grid,
  .chokepoint-grid,
  .build-track {
    grid-template-columns: 1fr;
  }

  .hero-copy h2 {
    font-size: 21px;
  }

  h1 {
    font-size: 25px;
  }

  .ocean-map {
    min-height: 0;
  }
}
