:root {
  --ink: #19342f;
  --muted: #78817c;
  --line: #e4e8e1;
  --bg: #f8f9f5;
  --green: #27785c;
  --lime: #d8ed93;
  --amber: #da9e35;
  --white: #fff;
  --font: "DM Sans", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px var(--font);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  filter: brightness(0.96);
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #8dbb79;
  outline-offset: 3px;
}
button {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button.text-btn,
.tiny-link {
  border: 0;
  background: transparent;
}
.text-btn {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 550;
}
.tiny-link {
  font-size: 10px;
  padding: 0;
  color: #5e756b;
}
.dark-btn {
  background: var(--ink);
  color: white;
  border: 0;
  padding: 12px 17px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.outline-btn {
  background: #fff;
  border: 1px solid #dce3d8;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 550;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.65px;
  font-weight: 700;
  color: #7a897e;
}
header {
  height: 84px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 50px;
}
.brand {
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font:
    800 24px "Manrope",
    sans-serif;
  letter-spacing: -1px;
  align-items: center;
}
.brand small {
  display: block;
  font: 700 8px var(--font);
  letter-spacing: 2px;
  margin-top: 3px;
}
.brand-icon {
  width: 38px;
  height: 40px;
  background: var(--ink);
  color: var(--lime);
  border-radius: 12px;
  font-size: 34px;
  line-height: 34px;
  text-align: center;
  position: relative;
}
.brand-icon span {
  position: absolute;
  font: 14px var(--font);
  right: 1px;
  top: -4px;
}
.project {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.green-dot {
  display: inline-block;
  background: #488964;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip {
  font-size: 9px;
  background: #f0f3ec;
  border-radius: 4px;
  padding: 5px 7px;
  color: #7d887d;
  margin-left: 4px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
}
main {
  display: grid;
  grid-template-columns: 302px minmax(0, 1fr);
  min-height: calc(100vh - 84px);
}
aside {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 26px 23px 20px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
}
.panel-title .tiny-link {
  font-size: 8px;
}
h1 {
  font:
    650 25px "Manrope",
    sans-serif;
  letter-spacing: -1px;
  margin: 17px 0 5px;
}
.intro {
  font-size: 11px;
  line-height: 1.7;
  margin: 0 0 20px;
}
.muted {
  color: var(--muted);
}
.scenario-tabs {
  display: flex;
  background: #f3f5ef;
  padding: 4px;
  border-radius: 7px;
  gap: 2px;
}
.scenario-tabs button {
  flex: 1;
  padding: 7px 2px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 10px;
  color: #788278;
}
.scenario-tabs .active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #2334250d;
  font-weight: 650;
}
.config-section {
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font:
    650 13px "Manrope",
    sans-serif;
  margin: 0 0 14px;
}
h2 > span:first-child {
  font: 500 9px var(--font);
  color: #a5b09e;
  margin-right: 7px;
}
.network-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fbfcf8;
}
.file-icon {
  font-size: 24px;
  color: #508563;
}
.network-card strong {
  font-size: 11px;
  display: block;
}
.network-card small {
  font-size: 9px;
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.network-card button {
  margin-left: auto;
  background: none;
  border: 0;
  color: #7b8c7d;
}
.network-summary {
  display: flex;
  justify-content: space-between;
  margin: 13px 6px 0;
}
.network-summary strong {
  display: block;
  font-size: 15px;
  font-weight: 550;
}
.network-summary small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 10px 0;
  font-size: 11px;
}
.field em {
  font-style: normal;
  color: #99a196;
  font-size: 9px;
  margin-left: 3px;
}
.field input {
  width: 65px;
  min-width: 0;
  border: 1px solid #e0e5dc;
  border-radius: 5px;
  padding: 7px;
  text-align: right;
  background: #fbfcf9;
  color: var(--ink);
  font-size: 11px;
}
.expand-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  font-size: 10px;
  padding: 10px 0 0;
  color: #697f70;
}
.expand-btn span {
  font-size: 13px;
}
.select-field {
  display: block;
  font-size: 10px;
  color: #7a847a;
  margin-top: 12px;
}
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  color: var(--ink);
  font-size: 11px;
}
.select-field select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.check-field {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}
.help {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.assumption-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #f4f6ef;
  border-radius: 5px;
  padding: 10px;
  margin-top: 14px;
}
.assumption-note > span {
  font-size: 10px;
  border: 1px solid #a8b99b;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  line-height: 10px;
  text-align: center;
  flex-shrink: 0;
  color: #859576;
}
.assumption-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
  color: #7e8978;
}
.apply-wrap {
  padding-top: 18px;
}
.primary-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--lime);
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 550;
}
.apply-wrap small {
  display: block;
  font-size: 9px;
  color: #9aa291;
  text-align: center;
  margin-top: 9px;
}
.workspace {
  padding: 27px 28px 12px;
  min-width: 0;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 21px;
}
.workspace-heading h2 {
  font:
    650 20px "Manrope",
    sans-serif;
  letter-spacing: -0.6px;
  margin: 7px 0 0;
}
.workspace-heading h2 span {
  font: 400 10px var(--font);
  color: #8c958a;
  margin-left: 10px;
  letter-spacing: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 17px;
  padding: 17px 0;
}
.metric {
  padding: 0 20px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border: 0;
}
.metric > span {
  display: block;
  color: #7f897c;
  font-size: 10px;
}
.metric strong {
  font:
    550 28px "Manrope",
    sans-serif;
  letter-spacing: -1px;
  display: block;
  margin: 5px 0;
}
.metric small {
  display: block;
  font-size: 9px;
  color: #95a08c;
}
.map-wrap {
  height: 470px;
  min-height: 360px;
  border: 1px solid #dce2d5;
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  background: #edf0e7;
}
#map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#map:active {
  cursor: grabbing;
}
.map-top {
  position: absolute;
  top: 16px;
  left: 17px;
  right: 17px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.map-badge {
  background: #fffef8ef;
  border: 1px solid #dce3d5;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.map-layer {
  display: flex;
  background: #fffefa;
  padding: 3px;
  border: 1px solid #dce3d5;
  border-radius: 5px;
  pointer-events: auto;
}
.map-layer button {
  border: 0;
  background: none;
  font-size: 9px;
  padding: 5px 9px;
  border-radius: 3px;
  color: #8a9584;
}
.map-layer button.active {
  background: #e5ebdc;
  color: #426344;
}
.map-tools {
  position: absolute;
  right: 17px;
  top: 83px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px #183c1a13;
}
.map-tools button {
  border: 0;
  background: #fffefa;
  width: 29px;
  height: 29px;
  font-size: 17px;
}
.map-legend {
  position: absolute;
  left: 16px;
  bottom: 15px;
  background: #fffef9ed;
  border: 1px solid #dbe1d3;
  border-radius: 5px;
  padding: 9px 11px;
  display: flex;
  gap: 15px;
  font-size: 9px;
  color: #70816a;
}
.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.map-legend i {
  display: inline-block;
}
.legend-track {
  height: 3px;
  width: 13px;
  background: #6e8b65;
}
.legend-loaded {
  height: 7px;
  width: 10px;
  border-radius: 2px;
  background: #27785c;
}
.legend-empty {
  height: 7px;
  width: 10px;
  border: 1.5px solid #8a9c86;
  border-radius: 2px;
  background: white;
}
.legend-stop {
  height: 7px;
  width: 7px;
  background: white;
  border: 2px solid #426b46;
  border-radius: 50%;
}
.north {
  position: absolute;
  bottom: 65px;
  right: 24px;
  text-align: center;
  color: #8b9a81;
  font-size: 11px;
  line-height: 1.5;
}
.map-scale {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 65px;
  border-bottom: 2px solid #839678;
  padding-bottom: 4px;
  text-align: center;
  font-size: 9px;
  color: #7b8b70;
}
#tileAttribution {
  position: absolute;
  right: 5px;
  bottom: 0;
  background: #fffd;
  font-size: 8px;
  padding: 1px 3px;
}
#tileAttribution a {
  color: #4d6952;
}
.playback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0 20px;
  gap: 10px;
}
.play-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.play-btn {
  border: 0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: var(--lime);
  font-size: 11px;
}
.icon-btn {
  border: 0;
  background: none;
  font-size: 23px;
  color: #83917e;
  padding: 5px;
  line-height: 1;
}
.clock {
  margin-left: 5px;
}
.clock strong {
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.clock small {
  font-size: 7px;
  letter-spacing: 1px;
  color: #99a18e;
  display: block;
  margin-top: 3px;
}
.speed-control {
  display: flex;
  gap: 10px;
  align-items: center;
}
.speed-control label {
  font-size: 10px;
  color: #93a088;
}
.speed-control select {
  padding: 6px;
  font-size: 10px;
  background: transparent;
}
.playback > .text-btn {
  font-size: 10px;
  color: #73856b;
}
.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 1fr);
  gap: 18px;
}
.station-section,
.activity-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px 17px 8px;
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}
.section-heading h3 {
  font:
    650 12px "Manrope",
    sans-serif;
  margin: 0;
}
.section-heading > span {
  font-size: 9px;
  color: #98a18d;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 7px;
  letter-spacing: 0.6px;
  color: #a2aa98;
  font-weight: 550;
  padding: 0 8px 10px 0;
}
td {
  font-size: 9px;
  padding: 10px 8px 9px 0;
  border-top: 1px solid #f0f2eb;
  color: #76866d;
}
td:first-child {
  color: #415a3d;
  font-weight: 500;
}
td .stop-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #6e8f61;
  border-radius: 50%;
  margin-right: 7px;
}
.station-row {
  cursor: pointer;
}
.station-row:hover {
  background: #f7f9f2;
}
.queue-pill {
  display: inline-block;
  padding: 2px 6px;
  background: #edf3e2;
  color: #6d8b4e;
  border-radius: 3px;
  min-width: 23px;
  text-align: center;
}
.queue-pill.busy {
  background: #fff0cd;
  color: #ad7925;
}
.utilization > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8d9b82;
}
.utilization strong {
  font-weight: 600;
  color: #5d7950;
}
.util-bar {
  height: 5px;
  background: #eef2e7;
  border-radius: 3px;
  overflow: hidden;
  margin: 9px 0;
}
.util-bar i {
  display: block;
  background: #a4bd80;
  height: 100%;
  width: 0;
  transition: width 0.3s;
}
.utilization small {
  font-size: 8px;
  color: #a1ab94;
}
.activity-log {
  height: 205px;
  overflow: auto;
  margin-top: 13px;
}
.activity-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 5px;
  border-top: 1px solid #f1f3eb;
  padding: 10px 0;
  font-size: 9px;
  line-height: 1.5;
  color: #6e8364;
}
.activity-item time {
  font-size: 8px;
  color: #a0ab94;
}
.empty-message {
  color: #9aa68e;
  font-size: 10px;
  line-height: 1.8;
}
.table-scroll {
  overflow: auto;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 17px;
  color: #a0aa94;
  font-size: 8px;
}
footer span {
  display: flex;
  align-items: center;
  gap: 5px;
}
footer button {
  border: 0;
  background: none;
  font-size: 8px;
  color: #8d9d80;
}
dialog {
  border: 1px solid #dce3d5;
  border-radius: 14px;
  width: min(870px, 95vw);
  max-height: 90vh;
  padding: 26px;
  box-shadow: 0 30px 100px #0f291c44;
  color: var(--ink);
}
dialog::backdrop {
  background: #192f2b66;
  backdrop-filter: blur(4px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 18px;
}
.modal-header h2 {
  font:
    650 24px "Manrope",
    sans-serif;
  letter-spacing: -0.8px;
  margin: 6px 0 0;
}
#modalBody {
  font-size: 12px;
  line-height: 1.7;
}
#modalBody h3 {
  font-size: 14px;
  margin: 22px 0 8px;
}
#modalBody p {
  color: #74816d;
}
#modalBody ul,
#modalBody ol {
  padding-left: 20px;
  color: #74816d;
}
#modalBody .modal-note {
  padding: 13px 16px;
  background: #f0f4e9;
  border-radius: 7px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.modal-actions .primary-btn {
  width: auto;
  gap: 25px;
}
.modal-table {
  white-space: normal;
}
.modal-table td {
  font-size: 11px;
}
.modal-table th {
  font-size: 9px;
}
.modal-table input {
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 65px;
  padding: 6px;
  font-size: 11px;
  color: var(--ink);
}
.modal-table input[type="text"] {
  width: 180px;
}
.modal-table input[type="checkbox"] {
  width: auto;
}
.upload-zone {
  border: 1.5px dashed #a8b99b;
  background: #f5f8ef;
  border-radius: 10px;
  text-align: center;
  padding: 30px;
  cursor: pointer;
}
.upload-zone strong {
  font:
    600 18px "Manrope",
    sans-serif;
  display: block;
}
.upload-zone p {
  font-size: 11px;
}
.upload-zone input {
  margin-top: 10px;
  max-width: 100%;
}
.format-chip {
  display: inline-block;
  padding: 3px 8px;
  background: #e7eedc;
  border-radius: 4px;
  font-size: 9px;
  margin: 3px;
}
.od-table input {
  width: 50px !important;
}
.od-table th {
  min-width: 55px;
  max-width: 90px;
}
.od-table td {
  padding: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.result-card {
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 7px;
}
.result-card strong {
  display: block;
  font-size: 23px;
}
.result-card span {
  font-size: 10px;
  color: #8a977e;
}
.source-tag {
  font-size: 9px;
  background: #e8f0df;
  color: #70815c;
  padding: 3px 6px;
  border-radius: 3px;
}
.warning-tag {
  background: #fff0d4;
  color: #a08246;
}
.chart {
  width: 100%;
  height: 180px;
  background: #f7f9f2;
  border-radius: 7px;
}
.station-popup {
  position: absolute;
  background: #fffefb;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 6px 24px #1b2b1a22;
  max-width: 250px;
  pointer-events: none;
}
.station-popup strong {
  font-size: 12px;
}
.station-popup p {
  font-size: 10px;
  color: #7f8d72;
  margin: 6px 0 0;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #e2eccf;
  padding: 12px 22px;
  border-radius: 7px;
  font-size: 12px;
  box-shadow: 0 8px 30px #12291e33;
  z-index: 20;
  max-width: 90vw;
}
.error {
  color: #a7523a !important;
  background: #fff1e8;
  padding: 12px;
  border-radius: 6px;
}
.presentation header,
.presentation aside,
.presentation .lower-grid,
.presentation footer,
.presentation .workspace-heading,
.presentation .metrics {
  display: none;
}
.presentation main {
  display: block;
}
.presentation .workspace {
  padding: 16px;
}
.presentation .map-wrap {
  height: calc(100vh - 100px);
}
.presentation .playback {
  padding-bottom: 0;
}
.presentation .playback:after {
  content: "Esc to exit presentation";
  font-size: 10px;
  color: #8d9d80;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  .workspace {
    padding: 32px 40px;
  }
  .map-wrap {
    height: 540px;
  }
  aside {
    padding: 30px;
  }
}
@media (max-width: 1150px) {
  header {
    gap: 25px;
    padding: 0 22px;
  }
  .project .chip {
    display: none;
  }
  .workspace {
    padding: 24px 20px;
  }
  .metric {
    padding: 0 13px;
  }
  .metric > span {
    font-size: 9px;
  }
  .lower-grid {
    grid-template-columns: 1fr;
  }
  .activity-section {
    display: none;
  }
  .workspace-heading h2 span {
    display: block;
    margin: 5px 0 0;
  }
  .map-wrap {
    height: 440px;
  }
  .playback > .text-btn {
    display: none;
  }
}
@media (max-width: 850px) {
  header {
    height: 72px;
    padding: 0 16px;
  }
  .project {
    display: none;
  }
  .header-actions .text-btn {
    display: none;
  }
  .brand {
    font-size: 21px;
  }
  main {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  aside {
    padding: 22px 16px;
  }
  .panel-title .tiny-link {
    display: none;
  }
  .workspace {
    padding: 21px 15px;
  }
  .workspace-heading h2 {
    font-size: 16px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px;
  }
  .metric:nth-child(2) {
    border: 0;
  }
  .metric strong {
    font-size: 24px;
  }
  .map-legend {
    gap: 8px;
    font-size: 7px;
  }
  .map-legend span:first-child {
    display: none;
  }
  .speed-control label,
  .speed-control .outline-btn {
    display: none;
  }
  .map-wrap {
    height: 470px;
  }
  .network-summary small {
    font-size: 8px;
  }
  .field {
    font-size: 10px;
  }
  .field input {
    width: 55px;
  }
  .field em {
    display: block;
    margin: 3px 0;
  }
  .lower-grid {
    display: block;
  }
  th {
    font-size: 6px;
  }
  td {
    font-size: 8px;
  }
  .config-section {
    padding-top: 16px;
  }
  h1 {
    font-size: 22px;
  }
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  main {
    display: flex;
    flex-direction: column;
  }
  .workspace {
    order: 0;
  }
  .control-panel {
    order: 1;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 25px;
  }
  .map-wrap {
    height: 410px;
    min-height: 350px;
  }
  .workspace-heading h2 span {
    display: inline;
    margin-left: 5px;
  }
  .workspace-heading .outline-btn {
    font-size: 10px;
  }
  .metric strong {
    font-size: 24px;
  }
  .metrics {
    padding: 13px 0;
  }
  .map-top {
    left: 10px;
    right: 10px;
  }
  .map-legend {
    left: 10px;
    padding: 7px;
    gap: 10px;
  }
  .lower-grid {
    margin-top: 3px;
  }
  footer {
    font-size: 7px;
  }
  .playback {
    padding-bottom: 15px;
  }
  .scenario-tabs {
    max-width: 100%;
  }
  .config-section {
    padding: 20px 0;
  }
  .field input {
    width: 85px;
  }
  .field {
    font-size: 12px;
  }
  .field em {
    display: inline;
  }
  .panel-title .tiny-link {
    display: block;
  }
  .network-summary {
    justify-content: space-around;
  }
  .network-summary small {
    font-size: 10px;
  }
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
  dialog {
    padding: 19px;
  }
  .modal-table input[type="text"] {
    width: 125px;
  }
  .presentation .map-wrap {
    height: calc(100dvh - 110px);
  }
}
@media (max-width: 850px) {
  .speed-control .outline-btn {
    display: block;
    padding: 7px;
    font-size: 9px;
  }
  .playback {
    flex-wrap: wrap;
  }
  .speed-control {
    gap: 7px;
  }
  .clock {
    margin-left: 0;
  }
  .play-buttons {
    gap: 7px;
  }
}
@media (max-width: 600px) {
  .header-actions .text-btn#saveBtn {
    display: block;
    font-size: 9px;
    padding: 7px 3px;
  }
  .header-actions {
    gap: 4px;
  }
  .dark-btn {
    padding: 11px;
  }
  .map-legend {
    font-size: 7px;
  }
  .playback {
    row-gap: 12px;
  }
  .play-buttons {
    gap: 5px;
  }
  .clock strong {
    font-size: 12px;
  }
  .speed-control .outline-btn {
    font-size: 8px;
    padding: 7px 5px;
  }
}
.playback-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.playback-actions .text-btn {
  font-size: 9px;
  padding: 8px;
  color: #73856b;
}
@media (max-width: 1150px) {
  .playback-actions #snapshotBtn {
    display: none;
  }
  .playback-actions {
    margin-left: auto;
  }
}
@media (max-width: 600px) {
  .playback-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: -8px;
  }
  .playback-actions #snapshotBtn {
    display: block;
  }
}

.basemap-opacity {
  position: absolute;
  right: 17px;
  top: 60px;
  background: #fffefaed;
  border: 1px solid #dce3d5;
  border-radius: 5px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #78866e;
  font-size: 9px;
}
.basemap-opacity input {
  width: 75px;
  accent-color: #5a7f4e;
  height: 12px;
}
.basemap-opacity output {
  min-width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.map-tools {
  top: 103px;
}
#tileAttribution {
  font-size: 9px;
  max-width: 90%;
  text-align: right;
  padding: 3px 5px;
}
.map-scale {
  bottom: 24px;
}
@media (max-width: 600px) {
  .map-top {
    flex-wrap: wrap;
    gap: 6px;
  }
  .map-layer {
    margin-left: auto;
  }
  .map-layer button {
    padding: 5px 7px;
    font-size: 8px;
  }
  .basemap-opacity {
    right: 10px;
    top: 90px;
  }
  .map-tools {
    top: 135px;
  }
  .map-legend {
    bottom: 25px;
  }
  #tileAttribution {
    font-size: 7px;
  }
  .map-scale {
    bottom: 26px;
  }
}

.operations-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.operations-toolbar label {
  font-size: 10px;
  color: #7d8c72;
  display: flex;
  align-items: center;
  gap: 7px;
}
.operations-toolbar select {
  max-width: 215px;
  padding: 7px;
}
.operations-toolbar > span {
  margin-left: auto;
  font-size: 9px;
  color: #a38b56;
}
.detail-level {
  position: absolute;
  left: 18px;
  top: 58px;
  background: #fffef9eb;
  border: 1px solid #dce3d5;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 9px;
  color: #82916f;
  pointer-events: none;
}
.detail-panel {
  background: white;
  border: 1px solid #dae3d0;
  border-radius: 9px;
  padding: 18px;
  margin-bottom: 19px;
}
.detail-panel .section-heading {
  margin-bottom: 10px;
}
.detail-panel h3 {
  margin-top: 5px;
  font-size: 16px;
}
.inspector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr);
  gap: 18px;
}
#detailCanvas {
  width: 100%;
  height: 260px;
  border: 1px solid #e3e8da;
  border-radius: 7px;
  display: block;
  min-width: 0;
}
.inspector-copy {
  font-size: 11px;
  line-height: 1.6;
}
.inspector-copy p {
  color: #849078;
  font-size: 10px;
}
.inspector-status {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.status-tag {
  display: inline-block;
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 4px;
  background: #ebf1e2;
  color: #63814e;
}
.status-tag.red {
  background: #fae7dd;
  color: #b3604b;
}
.status-tag.amber {
  background: #fbefcd;
  color: #ae8e3d;
}
.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-footnote {
  font-size: 8px;
  color: #a0a88f;
  margin: 13px 0 0;
}
.operations-table input[type="number"] {
  width: 85px;
}
.operations-table th {
  min-width: 50px;
}
.operations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
}
.phase-sequence {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.phase-step {
  font-size: 9px;
  padding: 5px 8px;
  background: #f0f3e9;
  border: 1px solid #e1e7d8;
  border-radius: 4px;
  color: #97a28b;
}
.phase-step.active {
  background: #dce9b6;
  color: #49683b;
}
.presentation .operations-toolbar {
  position: absolute;
  z-index: 3;
  left: 185px;
  top: 33px;
  right: 240px;
  pointer-events: none;
}
.presentation .operations-toolbar label,
.presentation .operations-toolbar button {
  pointer-events: auto;
  background: #fffef9;
}
.presentation .operations-toolbar > span {
  display: none;
}
.presentation .operations-toolbar label {
  font-size: 0;
}
.presentation .operations-toolbar button {
  padding: 6px 8px;
  font-size: 9px;
}
.presentation .operations-toolbar select {
  font-size: 9px;
  max-width: 170px;
}
.presentation .detail-panel {
  position: absolute;
  bottom: 85px;
  left: 30px;
  right: 30px;
  z-index: 5;
  box-shadow: 0 8px 30px #233d2922;
  max-height: 46vh;
  overflow: auto;
}
.presentation .detail-panel #detailCanvas {
  height: 200px;
}
@media (max-width: 1150px) {
  .inspector-grid {
    grid-template-columns: 1fr;
  }
  .presentation .operations-toolbar {
    left: 190px;
    right: 250px;
    gap: 5px;
  }
  .presentation #operationsBtn {
    display: none;
  }
  .presentation #focusBtn {
    display: none;
  }
  .inspector-copy {
    display: block;
  }
  .presentation .detail-panel {
    max-height: 50vh;
  }
}
@media (max-width: 600px) {
  .operations-toolbar label {
    width: 100%;
    justify-content: space-between;
  }
  .operations-toolbar select {
    width: 76%;
    max-width: none;
  }
  .operations-toolbar .outline-btn {
    font-size: 9px;
  }
  .operations-toolbar > span {
    display: none;
  }
  .detail-level {
    top: 58px;
    left: 10px;
    font-size: 7px;
    max-width: 55%;
  }
  .operations-grid {
    grid-template-columns: 1fr;
  }
  .presentation .operations-toolbar {
    left: 25px;
    top: 105px;
    right: 75px;
  }
  .presentation .operations-toolbar label {
    width: auto;
  }
  .presentation .operations-toolbar select {
    width: auto;
  }
  .presentation .detail-panel {
    left: 18px;
    right: 18px;
    padding: 12px;
  }
  .presentation .detail-panel #detailCanvas {
    height: 150px;
  }
  .inspector-actions .outline-btn {
    font-size: 9px;
  }
}

.presentation .detail-panel {
  left: auto;
  right: 28px;
  bottom: 85px;
  width: min(410px, 42vw);
  max-height: 46vh;
  padding: 14px;
}
.presentation .inspector-grid {
  grid-template-columns: 1fr;
  gap: 9px;
}
.presentation .detail-panel #detailCanvas {
  height: 125px;
}
.presentation .inspector-copy {
  font-size: 10px;
}
.presentation .inspector-copy p {
  font-size: 9px;
  margin: 7px 0;
}
.presentation .phase-step {
  padding: 3px 5px;
  font-size: 8px;
}
.presentation .inspector-actions .outline-btn {
  font-size: 8px;
  padding: 6px 8px;
}
.presentation .detail-footnote {
  font-size: 7px;
}
.presentation .detail-panel h3 {
  font-size: 14px;
}
.presentation .detail-panel .section-heading {
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .presentation .detail-panel {
    left: 18px;
    right: 18px;
    width: auto;
    max-height: 43vh;
  }
  .presentation .detail-panel #detailCanvas {
    height: 110px;
  }
  .presentation .inspector-copy p {
    font-size: 8px;
  }
  .presentation .detail-panel .phase-sequence {
    padding: 5px 0;
  }
}
