:root {
  --ink: #173e35;
  --muted: #5c6e67;
  --paper: #f3f4ed;
  --line: #dce3db;
  --accent: #d45b36;
  --header: 76px;
  --nav: 76px;
  color-scheme: light;
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding-top: env(safe-area-inset-top);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #c78527;
  outline-offset: 3px;
}
a {
  color: var(--ink);
  text-underline-offset: 3px;
}
p {
  line-height: 1.55;
}
small {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin-bottom: 0;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}
.muted {
  font-size: 13px;
  color: var(--muted);
}
.app-header {
  height: var(--header);
  max-width: 1280px;
  margin: auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 750;
  font-size: 21px;
  letter-spacing: -0.5px;
  text-decoration: none;
}
.brand img {
  border-radius: 10px;
}
.brand small {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.7px;
  margin-top: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.connection {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  gap: 6px;
  align-items: center;
}
.connection:before {
  content: '';
  width: 7px;
  height: 7px;
  background: #a7b0a9;
  border-radius: 50%;
}
.connection[data-state='online']:before {
  background: #3c8a67;
}
.connection[data-state='offline']:before {
  background: var(--accent);
}
.connection[data-state='signin']:before {
  background: #b5892d;
}
.pilot-access {
  max-width: 1280px;
  margin: auto;
  padding: 14px 24px 0;
}
.pilot-sign-in {
  max-width: 460px;
  margin: 8px auto 16px;
}
.pilot-sign-in h2 {
  margin-top: 7px;
}
.pilot-sign-in-status {
  font-size: 13px;
  color: #795323;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.pilot-account {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}
.icon-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  width: 44px;
  height: 44px;
  font-size: 23px;
}
.connection-note {
  background: #fff0d9;
  color: #795323;
  padding: 10px 24px;
  font-size: 12px;
  margin: 0;
  text-align: center;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 0 24px calc(var(--nav) + env(safe-area-inset-bottom) + 18px);
}
.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 18px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.view-heading h1 {
  margin-top: 5px;
}
.tag {
  font-size: 11px;
  border: 1px solid #bfcfc2;
  background: #eaf0e6;
  border-radius: 6px;
  padding: 6px 9px;
  white-space: nowrap;
  font-weight: 650;
}
.tag.purple {
  background: #efe7f5;
  border-color: #d9cce6;
  color: #73498a;
}
.page-view {
  max-width: 760px;
  margin: auto;
}
.intro {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.card {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 3px 9px #183d3404;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-heading h2 {
  margin: 0;
}
.card p {
  font-size: 14px;
}
.card small {
  margin: 10px 0 0;
}
.card details {
  margin-top: 16px;
}
summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
  min-height: 26px;
  line-height: 1.6;
}
details[open] > summary {
  margin-bottom: 16px;
}
.raw-details summary {
  font-size: 13px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin: 16px 0 0;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #cdd7ce;
  border-radius: 9px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 12px;
  margin-top: 6px;
  font-size: 16px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #749e85;
  outline-offset: 1px;
}
input[type='checkbox'] {
  display: inline-block;
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 8px 7px 8px 0;
  vertical-align: middle;
  accent-color: #436f45;
}
.fuel-mosaic-legend { padding: 10px 12px; background: #f3f6ee; border-radius: 9px; font-size: 12px; }
.fuel-mosaic-legend-row { display: inline-flex; align-items: center; gap: 5px; margin: 3px 10px 3px 0; }
.fuel-mosaic-swatch { width: 12px; height: 12px; border: 1px solid #617263; display: inline-block; }
.fuel-mosaic-popup { max-width: 270px; font-size: 13px; line-height: 1.45; }
.fuel-mosaic-prerequisites { padding-left: 18px; margin: 8px 0; }
#weather-check-output { overflow-wrap: anywhere; }
#weather-check-output article { border-top: 1px solid #d7dfd4; padding: 10px 0; }
textarea,
pre {
  overflow: auto;
}
input[type='file'] {
  font-size: 12px;
  padding: 10px;
}
input[type='file']::file-selector-button {
  border: 0;
  background: #e8efe6;
  color: var(--ink);
  padding: 8px;
  border-radius: 5px;
  margin-right: 8px;
}
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.input-grid label {
  min-width: 0;
}
.primary,
.secondary {
  min-height: 48px;
  border-radius: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-top: 14px;
  font-weight: 650;
  font-size: 14px;
}
.primary {
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
}
.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #f8faf5;
}
.text-button {
  padding: 9px 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.compact {
  width: auto;
  white-space: nowrap;
  margin: 0;
  min-height: 44px;
}
.button-row {
  display: flex;
  gap: 10px;
}
.button-row > * {
  flex: 1;
  min-width: 0;
}
.duration-options {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.duration-options button {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7f1;
  color: var(--ink);
  font-size: 13px;
}
.duration-options button[aria-pressed='true'] {
  border-color: var(--ink);
  background: #e7f0e5;
  font-weight: 700;
}
.run-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  padding: 10px 0 18px;
  position: sticky;
  bottom: calc(var(--nav) + env(safe-area-inset-bottom));
  z-index: 2;
}
.run-bar .primary {
  width: auto;
  min-width: 150px;
  margin: 0;
}
.scope-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.source-link {
  font-size: 13px;
}
.source-link small {
  margin-top: 8px;
}
.map-view {
  min-height: max(570px, calc(
    100dvh - var(--header) - var(--nav) - env(safe-area-inset-top) -
      env(safe-area-inset-bottom) - 14px
  ));
  display: flex;
  flex-direction: column;
}
.map-heading {
  margin: 16px 0 12px;
}
.map-heading h1 {
  font-size: 21px;
}
.map-stage {
  position: relative;
  flex: 1;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #e4ece1;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  font-family: inherit;
}
.leaflet-container {
  background: #e4ece1;
}
.leaflet-control-attribution {
  font-size: 9px !important;
}
.leaflet-control-zoom a {
  min-width: 36px;
  min-height: 36px;
  line-height: 36px !important;
  color: var(--ink) !important;
}
.ignition-marker {
  color: #c33f2d;
  font-size: 30px;
  line-height: 24px;
  text-align: center;
  text-shadow: 0 0 4px white;
}
.map-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 500;
}
.map-actions button {
  background: #fffffff0;
  color: var(--ink);
  border: 1px solid #d4ded3;
  box-shadow: 0 2px 8px #173e3515;
  border-radius: 9px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 17px;
}
.map-actions span {
  font-size: 12px;
  font-weight: 600;
}
.map-caption {
  position: absolute;
  bottom: 28px;
  left: 12px;
  right: 12px;
  pointer-events: none;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: #274536;
  text-shadow: 0 0 4px white;
  background: #ffffffe5;
  border-radius: 7px;
  padding: 7px 9px;
  z-index: 500;
  width: fit-content;
}
.north {
  margin-left: 12px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot.ignition {
  background: #c33f2d;
}
.result-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 10px;
  padding: 17px 20px;
}
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.status {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  margin: 5px 0 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.metrics > div + div {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.metrics span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.metrics strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#result-context {
  margin: 10px 0 0;
  font-size: 11px;
}
.result-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  border-top: 1px solid #edf0e9;
  font-size: 11px;
}
#legend {
  flex: 1;
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
}
.swatch {
  display: inline-block;
  width: 14px;
  border-top: 3px solid;
  margin: 0 4px 2px 8px;
}
.swatch:first-child {
  margin-left: 0;
}
.result-footer a {
  font-size: 11px;
  white-space: nowrap;
}
.result-footer .text-button {
  font-size: 11px;
  white-space: nowrap;
}
.map-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  flex-wrap: wrap;
}
.map-tools button {
  flex-shrink: 0;
}
.map-tools small {
  font-size: 10px;
}
.map-view > .scope-note {
  margin-bottom: 2px;
}
.qfd-layer-tools {
  justify-content: space-between;
}
.qfd-layer-tools button[aria-pressed='true'] {
  color: #784a90;
}
.qfd-layer-panel {
  margin-top: 8px;
}
.qfd-layer-panel .card {
  padding: 12px 0;
  border: 0;
  box-shadow: none;
}
.qfd-incident-pin {
  display: grid;
  place-items: center;
  background: #784a90;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 5px #0005;
  font-size: 15px;
}
.qfd-incident-pin:focus {
  outline: 3px solid #173e73;
  outline-offset: 2px;
}
.qfd-incident-pin.qfd-expired {
  background: #a89aaf;
  border-style: dashed;
}
.map-stage:has(.qfd-popup) .map-actions {
  display: none;
}
.map-stage:has(.qfd-popup) .leaflet-control-zoom {
  visibility: hidden;
}
.qfd-popup details {
  font-size: 10px;
  margin-top: 9px;
}
.qfd-popup {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
}
.qfd-popup p {
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.qfd-popup .qfd-popup-times {
  white-space: pre-line;
  font-size: 10px;
}
.qfd-popup .qfd-popup-note {
  font-size: 10px;
  color: #506356;
}
.qfd-popup button {
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  font-size: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.5;
  max-height: 450px;
  background: #f6f8f2;
  border-radius: 8px;
  padding: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin-top: 16px;
}
th,
td {
  padding: 9px 5px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
#weather-timeline p {
  font-size: 12px;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav) + env(safe-area-inset-bottom));
  padding: 8px max(16px, calc((100vw - 900px) / 2))
    calc(8px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  background: #fbfcf7f5;
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 1100;
}
.bottom-nav button {
  flex: 1;
  max-width: 180px;
  background: transparent;
  color: #76867d;
  border: 0;
  border-radius: 12px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
}
.bottom-nav button[aria-current='page'] {
  color: var(--ink);
  background: #e8efe3;
}
.bottom-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bottom-nav svg circle {
  fill: #fbfcf7;
}
.bottom-nav button[aria-current='page'] svg circle {
  fill: #e8efe3;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  width: min(460px, calc(100% - 32px));
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 24px 100px #173e3533;
}
dialog::backdrop {
  background: #173e3560;
  backdrop-filter: blur(3px);
}
dialog p {
  font-size: 14px;
}
dialog a {
  display: block;
  font-size: 12px;
  margin-top: 16px;
}
dialog .card-heading {
  margin-bottom: 16px;
}
@media (min-width: 900px) {
  .map-view {
    min-height: 650px;
  }
  .result-card .result-heading {
    float: left;
    width: 42%;
    padding-right: 24px;
  }
  .result-card .metrics {
    margin-top: 0;
    margin-left: 42%;
  }
  .result-card #result-context {
    margin-left: 42%;
  }
  .result-footer {
    clear: both;
  }
  .page-view {
    padding-top: 8px;
  }
}
@media (max-width: 600px) {
  :root {
    --header: 68px;
    --nav: 70px;
  }
  .app-header {
    padding: 10px 16px;
  }
  .pilot-access {
    padding: 10px 14px 0;
  }
  .brand {
    font-size: 19px;
  }
  .header-actions {
    gap: 9px;
  }
  .connection {
    font-size: 10px;
  }
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .view-heading {
    margin-top: 20px;
  }
  .map-heading {
    margin-top: 12px;
  }
  .map-heading .eyebrow {
    font-size: 9px;
  }
  .map-heading h1 {
    font-size: 20px;
  }
  .card {
    padding: 18px;
    border-radius: 14px;
  }
  .result-card {
    padding: 13px 14px;
  }
  .status {
    font-size: 13px;
  }
  .result-heading .primary {
    font-size: 12px;
    padding: 10px;
    min-height: 42px;
  }
  .metrics {
    gap: 7px;
    margin-top: 12px;
  }
  .metrics > div + div {
    padding-left: 8px;
  }
  .metrics span {
    font-size: 9px;
  }
  .metrics strong {
    font-size: 12px;
    letter-spacing: -0.15px;
  }
  #result-context {
    font-size: 10px;
  }
  .result-footer {
    gap: 8px;
  }
  .result-footer #legend {
    font-size: 10px;
  }
  .result-footer a,
  .result-footer .text-button {
    font-size: 10px;
  }
  .map-tools {
    gap: 8px;
  }
  .map-tools button {
    font-size: 11px;
  }
  .map-view > .scope-note {
    font-size: 10px;
  }
  .map-actions button {
    padding: 0 9px;
  }
  .scope-note {
    margin-bottom: 16px;
  }
  .input-grid {
    gap: 0 10px;
  }
  .run-bar small {
    font-size: 10px;
  }
  .run-bar .primary {
    min-width: 140px;
  }
}
@media (max-width: 360px) {
  .connection {
    max-width: 65px;
  }
  .metrics strong {
    font-size: 11px;
  }
  .metrics span {
    font-size: 8px;
  }
  .result-footer {
    flex-wrap: wrap;
  }
  #legend {
    flex-basis: 100%;
  }
  .map-actions span {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .primary,
  .secondary,
  .duration-options button {
    transition:
      background 0.15s,
      opacity 0.15s;
  }
  .view {
    animation: appear 0.15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.7;
    }
    to {
      opacity: 1;
    }
  }
}
