/* Dustline layout on top of the Win9x skin. The skin supplies the chrome;
   this file places it the way the map expects and folds it on phones. */

html, body { margin: 0; height: 100%; }
body.dl { min-height: 100vh; display: flex; flex-direction: column; background: var(--w9-face, #c0c0c0); font-size: 13px; }
.dl-mono { font-family: var(--font-mono, "Courier New", monospace); }
.dl-muted { opacity: .75; font-size: 11px; }

/* ---------- chrome ---------- */
.dl-notice { display: flex; gap: 14px; align-items: center; padding: 3px 10px; font-size: 12px; flex-wrap: wrap; justify-content: center; }
.dl-tag { pointer-events: none; }
.dl-close { margin-left: auto; }
.dl-shell { flex: 1; display: flex; flex-direction: column; margin: 0; min-height: 0; }
.dl-shell > .w9-titlebar { display: flex; align-items: center; gap: 8px; }
.dl-logo { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #111 0 38%, #f5b800 40% 62%, #111 64%); }
.dl-winbtns { margin-left: auto; display: flex; gap: 2px; }
.dl-nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.dl-nav .is-active { box-shadow: inset 0 -2px 0 #000080; }
.dl-theme { margin-left: 6px; }
.dl-main { flex: 1; min-height: 0; overflow: auto; padding: 10px; }
.dl-main--map { padding: 0; overflow: hidden; }

.dl-taskbar { display: flex; align-items: center; gap: 4px; padding: 2px 4px; }
.dl-start { font-weight: 700; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: inherit; }
.dl-start-ico { width: 14px; height: 12px; background: linear-gradient(90deg, #f33 0 50%, #3c3 50%), linear-gradient(90deg, #36f 0 50%, #fc0 50%);
  background-size: 100% 50%; background-repeat: no-repeat; background-position: top, bottom; }
.dl-tasks { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.dl-tasks a { text-decoration: none; color: inherit; white-space: nowrap; }
.dl-tray { margin-left: auto; white-space: nowrap; }

/* ---------- map frame ---------- */
.dl-map-wrap { position: relative; height: 100%; min-height: 480px; }
#map { position: absolute; inset: 0; background: #ececec; }
.leaflet-container { font: inherit; }
.leaflet-control-attribution { font-size: 10px; }
.dl-ico { background: none; border: 0; }
.dl-ico svg { display: block; }
.dl-glow-1 svg { filter: drop-shadow(0 0 3px rgba(150, 0, 0, .75)); }
.dl-glow-2 svg { filter: drop-shadow(0 0 5px rgba(150, 0, 0, .9)) drop-shadow(0 0 3px rgba(150, 0, 0, .8)); }
.dl-glow-3 svg { filter: drop-shadow(0 0 8px rgba(130, 0, 0, 1)) drop-shadow(0 0 5px rgba(130, 0, 0, .9)); }

.dl-panel { position: absolute; z-index: 700; font-size: 13px; }
.is-hidden { display: none !important; }
.is-focus .dl-panel, .is-focus .dl-tools, .is-focus .dl-rbtns { display: none !important; }

.dl-tools { position: absolute; z-index: 700; left: 10px; top: 60px; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.dl-tool { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; position: relative; }
.dl-tool.is-on::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 6px; height: 6px; background: #1c2e8c; }
.dl-tool-sep { height: 1px; background: #808080; margin: 3px 2px; }

.dl-filters { left: 56px; top: 12px; width: 300px; max-height: calc(100% - 330px); overflow: auto; padding: 0; }
.dl-sec { padding: 10px 12px; border-bottom: 2px groove #fff; }
.dl-sec h3 { font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.dl-list { display: flex; flex-direction: column; gap: 3px; }
.dl-opt { text-align: left; font-family: var(--font-mono, monospace); font-size: 12px; }
.dl-opt.is-sel, .dl-win .is-sel, #online-btn.is-sel { box-shadow: inset 1px 1px #000, inset -1px -1px #fff; font-weight: 700; }
.dl-win button { font-family: var(--font-mono, monospace); }
.dl-actor { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.dl-dia { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; }
.dl-groove { display: flex; gap: 6px; padding: 5px 6px; margin-bottom: 6px; }
.dl-sec label { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.dl-shown { font-size: 12px; border-bottom: 0; }
select.dl-mono { width: 100%; }
.dl-row { display: flex; align-items: center; gap: 6px; }

.dl-redzones { left: 56px; bottom: 150px; width: 380px; background: var(--w9-face, #c0c0c0); }
.dl-rz-title { background: linear-gradient(90deg, #c00000, #e53030); color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; font-size: 12px; }
.dl-rz-body { padding: 6px 8px; }
.dl-rz-legend { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.dl-rz-legend .sw { display: inline-block; width: 11px; height: 11px; margin-right: 4px; vertical-align: -1px; border: 1px solid #600; }
.sw-3 { background: #9e1a1a; } .sw-2 { background: #d9534f; } .sw-1 { background: #f0a1a1; }
.dl-rz-on { margin-left: auto; }
.dl-rz-ctl { margin-top: 6px; }
.dl-rz-ctl input[type=range] { flex: 1; accent-color: #c00000; }

.dl-playback { left: 56px; bottom: 12px; width: 560px; }
.dl-playback .w9-titlebar { display: flex; justify-content: space-between; }
.dl-pb-date { font-weight: 700; }
.dl-pb-row { gap: 8px; }
.dl-pb-play { width: 34px; height: 30px; }
.dl-pb-track { flex: 1; display: flex; flex-direction: column; }
#pb-hist { width: 100%; height: 26px; display: block; }
#pb-range { width: 100%; margin: 0; accent-color: #000080; }
.dl-pb-ends { justify-content: space-between; font-size: 11px; padding: 2px 0 0 42px; }

.dl-topbar { position: absolute; z-index: 700; left: 50%; transform: translateX(-50%); top: 12px; display: flex; gap: 10px; align-items: center; padding: 4px 10px; font-size: 12px; }
.dl-rbtns { position: absolute; z-index: 700; right: 10px; top: 110px; display: flex; flex-direction: column; gap: 6px; }
.leaflet-top.leaflet-right { margin-top: 2px; }

.dl-stats { right: 10px; bottom: 12px; width: 330px; }
.dl-stats .w9-titlebar { display: flex; justify-content: space-between; }
.dl-stats .w9-window-body { padding: 10px; }
.dl-st-head { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 8px; }
.dl-cap { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.dl-big { font-size: 30px; font-weight: 700; letter-spacing: .02em; }
.dl-split { font-size: 12px; }
.c-mil { color: #1f5fd6; font-weight: 700; } .c-ins { color: #d9860b; font-weight: 700; }
.dl-bar { display: flex; height: 4px; margin-top: 6px; background: #ddd; }
.dl-bar span { display: block; height: 100%; }
.b-mil { background: #1f5fd6; } .b-civ { background: #777; } .b-ins { background: #d9860b; }
.dl-st-box { padding: 6px 8px; margin-top: 8px; }
.dl-frow { display: flex; justify-content: space-between; gap: 8px; margin: 3px 0; }
.dl-st-note { padding: 6px 8px; margin-top: 8px; font-size: 11px; font-style: italic; }

.dl-route { right: 10px; top: 190px; width: 300px; }
.dl-route .w9-titlebar { display: flex; justify-content: space-between; }
.dl-route label { display: block; margin: 6px 0; }
.dl-route select { width: 100%; }

.dl-popup h4 { margin: 0 0 4px; font-size: 13px; }
.dl-popup .dl-cite { font-size: 11px; margin-top: 6px; max-height: 160px; overflow: auto; padding-left: 16px; }

/* ---------- document pages ---------- */
.dl-doc { max-width: 1100px; margin: 0 auto; }
.dl-card { margin-bottom: 14px; }
.dl-card .w9-window-body { padding: 12px 14px; }
.dl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dl-kpi .dl-big { font-size: 34px; }
table.dl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dl-table th, .dl-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--w9-shadow, #808080); vertical-align: top; }
.dl-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.dl-table td.num { text-align: right; font-family: var(--font-mono, monospace); white-space: nowrap; }
.dl-event { margin-bottom: 12px; }
.dl-event .dl-meta { font-size: 11px; opacity: .8; }
.dl-chart { width: 100%; height: auto; display: block; }
.dl-scroll { overflow-x: auto; }
.dl-swatch { width: 10px; height: 10px; display: inline-block; border: 1px solid #000; }

/* ---------- phones: panels start hidden, the tool strip brings them back ---------- */
@media (max-width: 760px) {
  .dl-notice { font-size: 11px; justify-content: flex-start; }
  .dl-nav { font-size: 12px; }
  .dl-map-wrap { min-height: 0; height: calc(100svh - 150px); }
  .dl-tools { top: 54px; left: 6px; }
  .dl-tool { width: 32px; height: 32px; }
  .dl-filters, .dl-redzones, .dl-playback, .dl-stats, .dl-route { left: 46px; right: 6px; width: auto; }
  .dl-filters { top: 54px; max-height: calc(100% - 70px); }
  .dl-redzones { bottom: 110px; }
  .dl-playback { bottom: 6px; }
  .dl-stats { bottom: 6px; }
  .dl-topbar { top: 6px; font-size: 10px; padding: 2px 6px; }
  .dl-rbtns { top: 96px; }
  .dl-rbtns .w9-btn { font-size: 11px; padding: 2px 6px; }
  .dl-tasks { display: none; }
}

/* ---------- fidelity fixes ---------- */
.leaflet-marker-icon.dl-ico, .leaflet-marker-icon.dl-ico svg { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.dl-filters .dl-sec { padding: 7px 10px; }
.dl-filters .dl-sec h3, .dl-redzones h3 { font: 400 11px/1.2 var(--font-mono, "Courier New", monospace) !important; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 6px; }
.dl-list .w9-btn.dl-opt { text-align: left !important; justify-content: flex-start !important; font: 12px/1.3 var(--font-mono, "Courier New", monospace) !important; padding: 3px 8px; font-weight: 400; }
.dl-list .w9-btn.dl-opt.is-sel { font-weight: 700 !important; }
.dl-win .w9-btn { font: 12px var(--font-mono, "Courier New", monospace) !important; }
.dl-filters { max-height: calc(100% - 245px); }
.dl-redzones { bottom: 128px; }
.dl-actor { margin: 1px 0; }
