:root {
  --ink: #061018;
  --ink-raised: #0a1822;
  --ink-panel: #0d1d28;
  --ink-soft: #122631;
  --line: #28404e;
  --line-bright: #3a5968;
  --text: #f1f7fa;
  --text-soft: #a8bbc5;
  --text-dim: #758d99;
  --azure: #35b8ed;
  --azure-dark: #0e526e;
  --azure-faint: rgba(53, 184, 237, 0.12);
  --danger: #ff6b5e;
  --danger-faint: rgba(255, 107, 94, 0.12);
  --warning: #f0b44c;
  --warning-faint: rgba(240, 180, 76, 0.12);
  --success: #72d6a1;
  --success-faint: rgba(114, 214, 161, 0.11);
  --font-body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --shadow: 0 24px 70px rgba(0, 8, 13, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 300px;
  color: var(--text);
  background:
    linear-gradient(rgba(53, 184, 237, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 184, 237, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 78% 5%, rgba(53, 184, 237, 0.12), transparent 28rem),
    var(--ink);
  background-size: 32px 32px, 32px 32px, auto, auto;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(53, 184, 237, 0.52);
  outline-offset: 3px;
}

button:active {
  transform: translateY(1px);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: relative;
  z-index: 10;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(22px, calc((100vw - 1600px) / 2 + 22px));
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 24, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--azure);
  background: var(--azure-faint);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--azure);
  opacity: 0.45;
}

.brand-mark::before {
  width: 1px;
  height: 42px;
}

.brand-mark::after {
  width: 42px;
  height: 1px;
}

.brand-mark span {
  width: 4px;
  height: 4px;
  margin: 1px;
  display: inline-block;
  background: var(--azure);
  box-shadow: 8px 0 0 var(--azure), -8px 0 0 var(--azure);
}

.brand-copy,
.topbar-status > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand-copy strong,
.topbar-status strong {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.brand-copy small,
.topbar-status small {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: right;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(240, 180, 76, 0.1);
  animation: signal 2.4s ease-in-out infinite;
}

main {
  overflow: clip;
}

.mapper {
  width: min(1600px, 100%);
  min-height: calc(100svh - 64px);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.input-panel,
.briefing-rail {
  border: 1px solid var(--line);
  background: rgba(9, 24, 34, 0.92);
  box-shadow: var(--shadow);
}

.input-panel {
  min-width: 0;
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 17px;
}

.tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 36%);
  align-items: end;
  gap: 32px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 20ch;
  margin-bottom: 0;
  font-size: clamp(31px, 3.4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 650;
}

.tool-intro > p {
  max-width: 42ch;
  margin-bottom: 3px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.mode-switch {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
}

.mode-switch legend {
  margin-right: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mode-switch label {
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-switch span {
  min-width: 64px;
  height: 32px;
  padding: 0 14px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: rgba(6, 16, 24, 0.54);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.mode-switch input:checked + span {
  border-color: var(--azure);
  color: var(--text);
  background: var(--azure-faint);
}

.mode-switch input:focus-visible + span {
  outline: 3px solid rgba(53, 184, 237, 0.5);
  outline-offset: 3px;
}

.evidence-field {
  min-height: 0;
}

.field-label-row {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-soft);
  font-size: 12px;
}

.field-label-row label {
  font-weight: 600;
}

.field-label-row span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

textarea {
  width: 100%;
  height: clamp(250px, 34svh, 370px);
  min-height: 200px;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  color: #dcebf1;
  caret-color: var(--azure);
  background:
    linear-gradient(90deg, rgba(53, 184, 237, 0.05) 1px, transparent 1px),
    rgba(3, 12, 18, 0.86);
  background-size: 36px 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
  tab-size: 2;
}

textarea::selection {
  color: var(--ink);
  background: var(--azure);
}

.field-help {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 11px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.utility-actions,
.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.primary-action,
.secondary-action,
.text-action,
.copy-action {
  border-radius: 0;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
}

.icon-button:hover,
.secondary-action:hover,
.copy-action:hover {
  border-color: var(--azure);
  color: var(--azure);
  background: var(--azure-faint);
}

.icon-button svg,
.primary-action svg,
.secondary-action svg,
.copy-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.local-badge {
  margin-left: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.local-badge span {
  margin-right: 5px;
  color: var(--success);
}

.primary-action {
  min-height: 48px;
  min-width: 300px;
  padding: 0 18px 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--azure);
  color: #031018;
  background: var(--azure);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.primary-action:hover {
  background: #69caf1;
}

.briefing-rail {
  position: relative;
  padding: 27px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.briefing-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0 26px, rgba(53, 184, 237, 0.06) 26px 27px);
}

.rail-index {
  position: relative;
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.countdown-block {
  position: relative;
  margin: auto 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.countdown-block span {
  display: block;
  color: var(--text);
  font-size: clamp(74px, 7vw, 118px);
  line-height: 0.82;
  letter-spacing: -0.08em;
  font-weight: 620;
}

.countdown-block p {
  margin: 14px 0 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.route-diagram {
  position: relative;
  margin: 22px 0;
}

.route-diagram div {
  position: relative;
  min-height: 52px;
  padding: 6px 0 8px 42px;
  display: grid;
  grid-template-columns: 1fr;
  border-left: 1px solid var(--line-bright);
}

.route-diagram div::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 12px;
  width: 7px;
  height: 7px;
  background: var(--ink-panel);
  border: 1px solid var(--azure);
}

.route-diagram span {
  position: absolute;
  left: 12px;
  top: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.route-diagram strong {
  font-size: 13px;
  font-weight: 650;
}

.route-diagram small {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.rail-caveat {
  position: relative;
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 12px;
}

.source-link {
  position: relative;
  display: flex;
  justify-content: space-between;
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.results,
.method,
footer {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
}

.results {
  padding: 76px 0 90px;
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 620;
}

.analysis-state {
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.secondary-action,
.copy-action {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-bright);
  color: var(--text-soft);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.deadline-strip {
  margin: 34px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  border-top: 1px solid var(--azure);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--azure-faint), transparent 60%);
}

.deadline-strip > div {
  padding: 20px 22px;
}

.deadline-strip > div + div {
  border-left: 1px solid var(--line);
}

.strip-code,
.boundary-note span {
  display: block;
  margin-bottom: 4px;
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deadline-strip strong {
  display: block;
  font-size: 19px;
}

.deadline-strip p {
  max-width: 92ch;
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.metric-line {
  min-height: 110px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 19px 20px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 27px;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 10px;
}

.warning-band {
  margin-top: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid rgba(255, 107, 94, 0.5);
  background: var(--danger-faint);
}

.warning-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--danger);
  font-family: var(--font-mono);
  font-weight: 900;
}

.warning-band strong {
  color: #ffb0aa;
  font-size: 13px;
}

.warning-band p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.empty-state {
  margin-top: 26px;
  padding: 58px 34px;
  border: 1px dashed var(--line-bright);
  text-align: center;
  background: rgba(10, 24, 34, 0.45);
}

.empty-code {
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.empty-state h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.empty-state p {
  max-width: 60ch;
  margin: 0 auto 18px;
  color: var(--text-soft);
}

.text-action {
  border: 0;
  color: var(--azure);
  background: transparent;
  font-weight: 700;
}

.result-workspace {
  margin-top: 25px;
}

.tab-list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--line-bright);
}

.tab-list button {
  min-width: max-content;
  padding: 15px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tab-list button:hover {
  color: var(--text);
}

.tab-list button[aria-selected="true"] {
  border-bottom-color: var(--azure);
  color: var(--azure);
  background: linear-gradient(180deg, transparent, var(--azure-faint));
}

.tab-list button span {
  min-width: 22px;
  margin-left: 7px;
  padding: 2px 5px;
  display: inline-block;
  color: var(--text-soft);
  background: var(--ink-soft);
  text-align: center;
}

.tab-panel {
  padding-top: 22px;
  animation: panel-in 220ms ease both;
}

.table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.64);
}

table {
  width: 100%;
  min-width: 1760px;
  border-collapse: collapse;
  table-layout: fixed;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

th,
td {
  padding: 12px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

th:last-child,
td:last-child {
  border-right: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--text-dim);
  background: #0c1b25;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

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

tbody tr:hover td {
  background: rgba(53, 184, 237, 0.025);
}

td {
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.45;
}

td:first-child {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
}

th:nth-child(1), td:nth-child(1) { width: 130px; }
th:nth-child(2), td:nth-child(2) { width: 92px; }
th:nth-child(3), td:nth-child(3) { width: 130px; }
th:nth-child(4), td:nth-child(4) { width: 150px; }
th:nth-child(5), td:nth-child(5) { width: 130px; }
th:nth-child(6), td:nth-child(6) { width: 135px; }
th:nth-child(7), td:nth-child(7) { width: 150px; }
th:nth-child(8), td:nth-child(8) { width: 155px; }
th:nth-child(9), td:nth-child(9) { width: 115px; }
th:nth-child(10), td:nth-child(10) { width: 170px; }
th:nth-child(11), td:nth-child(11) { width: 210px; }
th:nth-child(12), td:nth-child(12) { width: 180px; }

.badge {
  max-width: 100%;
  padding: 3px 6px;
  display: inline-block;
  border: 1px solid var(--line-bright);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: normal;
}

.badge + .badge {
  margin: 3px 2px 0 0;
}

.badge-critical,
.badge-legacy,
.badge-sensitive {
  border-color: rgba(255, 107, 94, 0.55);
  color: #ffaaa3;
  background: var(--danger-faint);
}

.badge-warning,
.badge-gap,
.badge-sbmp {
  border-color: rgba(240, 180, 76, 0.55);
  color: #ffd68b;
  background: var(--warning-faint);
}

.badge-modern,
.badge-ready {
  border-color: rgba(114, 214, 161, 0.5);
  color: #a9ebc7;
  background: var(--success-faint);
}

.badge-amqp,
.badge-websockets,
.badge-target {
  border-color: rgba(53, 184, 237, 0.55);
  color: #8edafa;
  background: var(--azure-faint);
}

.section-intro {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-intro h3 {
  margin-bottom: 6px;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.section-intro p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.transport-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.transport-item {
  min-height: 190px;
  padding: 21px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 24, 34, 0.52);
}

.transport-item::before {
  content: "";
  width: 26px;
  height: 2px;
  margin-bottom: 24px;
  display: block;
  background: var(--azure);
}

.transport-item h4 {
  margin: 0 0 7px;
  font-size: 14px;
}

.transport-item .transport-count {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 27px;
}

.transport-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
}

.owner-table-shell table {
  min-width: 1120px;
}

.owner-table-shell th:nth-child(1), .owner-table-shell td:nth-child(1) { width: 125px; }
.owner-table-shell th:nth-child(2), .owner-table-shell td:nth-child(2) { width: 110px; }
.owner-table-shell th:nth-child(3), .owner-table-shell td:nth-child(3) { width: 125px; }
.owner-table-shell th:nth-child(4), .owner-table-shell td:nth-child(4) { width: 130px; }
.owner-table-shell th:nth-child(5), .owner-table-shell td:nth-child(5) { width: 135px; }
.owner-table-shell th:nth-child(6), .owner-table-shell td:nth-child(6) { width: 115px; }
.owner-table-shell th:nth-child(7), .owner-table-shell td:nth-child(7) { width: 120px; }
.owner-table-shell th:nth-child(8), .owner-table-shell td:nth-child(8) { width: 240px; }

.checklist {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  list-style: none;
  counter-reset: migration;
}

.checklist li {
  position: relative;
  min-height: 128px;
  padding: 22px 24px 20px 76px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  counter-increment: migration;
}

.checklist li::before {
  content: "0" counter(migration);
  position: absolute;
  left: 23px;
  top: 23px;
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 11px;
}

.checklist h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.checklist p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
}

.checklist .check-state {
  margin-top: 10px;
  display: inline-block;
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

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

.handoff {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.7);
}

.handoff-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.handoff-header h4 {
  margin: 0;
  font-size: 13px;
}

.handoff pre {
  min-height: 260px;
  max-height: 360px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: var(--text-soft);
  background: rgba(3, 12, 18, 0.58);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.method {
  padding: 82px 0 92px;
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 60px;
  border-top: 1px solid var(--line);
}

.method > div:first-child {
  position: sticky;
  top: 30px;
  align-self: start;
}

.method h2 {
  max-width: 12ch;
  font-size: clamp(38px, 4.4vw, 70px);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.method-grid article {
  min-height: 290px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.method-grid article:last-child {
  border-right: 0;
}

.method-grid span {
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 11px;
}

.method-grid h3 {
  margin: auto 0 9px;
  font-size: 18px;
}

.method-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
}

footer {
  min-height: 150px;
  padding: 30px 0 42px;
  display: flex;
  justify-content: space-between;
  gap: 34px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 11px;
}

footer strong {
  color: var(--text);
}

footer p {
  max-width: 62ch;
  margin: 5px 0 0;
}

footer > p {
  text-align: right;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid var(--azure);
  color: var(--text);
  background: #0c202c;
  box-shadow: var(--shadow);
  font-size: 12px;
  animation: toast-in 180ms ease both;
}

@keyframes signal {
  0%, 100% { box-shadow: 0 0 0 4px rgba(240, 180, 76, 0.08); }
  50% { box-shadow: 0 0 0 8px rgba(240, 180, 76, 0.02); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .mapper {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .briefing-rail {
    padding: 22px;
  }

  .tool-intro {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-intro > p {
    max-width: 64ch;
  }

  .local-badge {
    display: none;
  }

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

  .method {
    grid-template-columns: 1fr;
  }

  .method > div:first-child {
    position: static;
  }

  .method h2 {
    max-width: 16ch;
  }
}

@media (max-width: 820px) {
  .topbar {
    height: 56px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-copy small,
  .topbar-status small {
    display: none;
  }

  .topbar-status strong {
    font-size: 10px;
  }

  .mapper {
    min-height: calc(100svh - 56px);
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .input-panel {
    min-height: calc(100svh - 80px);
    padding: 18px;
    justify-content: flex-start;
    gap: 13px;
  }

  .briefing-rail {
    min-height: auto;
  }

  .countdown-block {
    margin: 22px 0;
  }

  .route-diagram {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .route-diagram div {
    min-height: 80px;
    padding: 28px 8px 8px;
    border-left: 0;
    border-top: 1px solid var(--line-bright);
  }

  .route-diagram div::before {
    left: 0;
    top: -4px;
  }

  .route-diagram span {
    left: 8px;
    top: 8px;
  }

  .results,
  .method,
  footer {
    width: calc(100% - 24px);
  }

  .results {
    padding: 58px 0 72px;
  }

  .results-heading,
  .results-actions {
    align-items: flex-start;
  }

  .results-heading {
    flex-direction: column;
  }

  .deadline-strip {
    grid-template-columns: 1fr;
  }

  .deadline-strip > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric:nth-child(3) {
    border-right: 0;
  }

  .metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .handoff-list {
    grid-template-columns: 1fr;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-grid article:last-child {
    border-bottom: 0;
  }

  footer {
    flex-direction: column;
  }

  footer > p {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .brand-copy strong {
    font-size: 10px;
  }

  .signal-dot {
    display: none;
  }

  .input-panel {
    min-height: calc(100svh - 80px);
    padding: 15px;
  }

  .tool-intro {
    gap: 6px;
  }

  h1 {
    max-width: none;
    font-size: clamp(29px, 9.6vw, 42px);
    line-height: 1;
  }

  .tool-intro > p {
    font-size: 12px;
  }

  .kicker {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mode-switch legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }

  .mode-switch span {
    width: 100%;
    min-width: 0;
    padding: 0 5px;
  }

  .field-label-row label {
    max-width: 73%;
    font-size: 11px;
  }

  textarea {
    height: min(29svh, 240px);
    min-height: 190px;
    padding: 13px;
    font-size: 10px;
  }

  .field-help {
    font-size: 9px;
    line-height: 1.4;
  }

  .action-row {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 9px;
  }

  .primary-action {
    width: 100%;
    min-width: 0;
  }

  .utility-actions {
    justify-content: flex-end;
  }

  .local-badge {
    margin-right: auto;
    display: inline;
  }

  .briefing-rail {
    padding: 18px;
  }

  .countdown-block span {
    font-size: 70px;
  }

  .route-diagram strong {
    font-size: 10px;
  }

  .route-diagram small {
    font-size: 8px;
  }

  .results-heading h2 {
    font-size: 38px;
  }

  .results-actions {
    width: 100%;
    flex-direction: column;
  }

  .secondary-action {
    width: 100%;
    justify-content: center;
  }

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

  .metric,
  .metric:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

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

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

  .metric strong {
    font-size: 23px;
  }

  .tab-list button {
    padding: 13px;
  }

  .table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  .owner-table-shell table {
    min-width: 0;
    table-layout: auto;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100% !important;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: rgba(8, 20, 28, 0.72);
  }

  tbody td {
    min-height: 39px;
    padding: 9px 0 9px 43%;
    position: relative;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 10px;
  }

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

  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 9px;
    width: 38%;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  tbody td[data-wide="true"] {
    padding-left: 0;
    padding-top: 30px;
  }

  tbody td[data-wide="true"]::before {
    width: 100%;
  }

  .transport-grid {
    grid-template-columns: 1fr;
  }

  .transport-item {
    min-height: 150px;
  }

  .checklist {
    grid-template-columns: 1fr;
  }

  .checklist li {
    border-right: 0;
  }

  .handoff-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .handoff pre {
    min-height: 220px;
  }

  .method {
    padding: 64px 0;
  }
}

@media (max-height: 760px) and (min-width: 821px) {
  .mapper {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .input-panel {
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 11px;
  }

  h1 {
    font-size: clamp(32px, 3vw, 47px);
  }

  textarea {
    height: 230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
