/*
 * Design tokens shared by the 3D explorer, the spectrum explorer and the wiki.
 * One source for the palette and the type, so the three surfaces cannot drift apart.
 * Fonts are served from this origin (assets/fonts); nothing is fetched from a font service.
 */
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  /* surfaces */
  --bg: #05070b; /* space */
  --surface: #0e1015; /* cards, reading surface */
  --panel: rgba(14, 16, 21, 0.9); /* panels floating over the 3D view */
  --line: #2a2d34;
  --hi: #1f2a3a; /* selected control */
  /* text */
  --ink: #f0efec;
  --ink2: #b9b7b0;
  --muted: #7d7b75;
  /* accents */
  --acc: #4f8fe0; /* links, focus rings */
  --acc-ink: #8fd0ff; /* live readouts, probes */
  --warn: #ffcf7a; /* caveats, pins */
  /* type */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  /* touch: minimum target size on coarse pointers */
  --touch-min: 44px;
}

:root {
  --bg: #05070b;
  --panel: rgba(14, 16, 21, 0.9);
  --ink: #f0efec;
  --ink2: #b9b7b0;
  --muted: #7d7b75;
  --line: #2a2d34;
  --acc: #4f8fe0;
  --hi: #1f2a3a;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font:
    13px/1.45 'IBM Plex Sans',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  overflow: hidden;
}
#c {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  outline: none;
}
#c.pick {
  cursor: pointer;
}
#labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.lbl {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 11px;
  color: var(--ink2);
  white-space: nowrap;
  text-shadow:
    0 0 3px #000,
    0 0 6px #000;
  pointer-events: auto;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 4px;
}
.lbl:hover {
  color: var(--ink);
  background: rgba(31, 42, 58, 0.8);
}
.lbl.focus {
  color: var(--ink);
}

.panel {
  position: fixed;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
#left {
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 340px;
  padding: 12px 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
#probe {
  right: 10px;
  top: 10px;
  width: 360px;
  max-height: calc(100vh - 20px);
  padding: 10px 12px;
  overflow-y: auto;
}
#probe.collapsed {
  width: auto;
}
#probe.collapsed .pbody {
  display: none;
}
body.hide-panels .panel,
body.hide-panels #legend,
body.hide-panels #nav {
  display: none;
}

.head {
  display: flex;
  align-items: center;
  gap: 8px;
}
h1 {
  font-size: 15px;
  margin: 0;
  flex: 1;
  letter-spacing: 0.01em;
}
.sub {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 6px;
}
.btn {
  background: #1a1e26;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  font: inherit;
  cursor: pointer;
}
.btn:hover {
  border-color: #4a4f5a;
  background: #20252f;
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.btn:focus-visible,
.chip:focus-visible,
.nav button:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
}
.btn.sm {
  padding: 3px 8px;
  font-size: 11.5px;
}
.btn.acc {
  background: #24476f;
  border-color: #3d6da6;
}
.btn.acc:hover {
  background: #2b5585;
}
.icon {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  font-weight: 600;
}

details {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 6px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: '▸';
  font-size: 10px;
  transition: transform 0.15s;
}
details[open] > summary::before {
  transform: rotate(90deg);
}
summary .badge {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink2);
}
.sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink2);
  font-size: 12px;
}
.row {
  display: flex;
  gap: 8px;
  align-items: end;
}
.row > * {
  flex: 1;
}
select,
input[type='datetime-local'] {
  background: #12151b;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 6px;
  font: inherit;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--acc);
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
}
.checks label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.val {
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.hint {
  color: var(--muted);
  font-size: 11.5px;
}

#presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 4px;
}
#matrix .sect {
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-top: 8px;
}
#matrix .mrow {
  padding: 4px 4px 5px;
  border-radius: 7px;
}
#matrix .mrow.on {
  background: rgba(255, 255, 255, 0.03);
}
#matrix .nm {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
#matrix .nm .name {
  font-size: 12.5px;
  color: var(--ink);
  cursor: pointer;
  flex: 1;
}
#matrix .nm .name:hover {
  text-decoration: underline;
  text-decoration-color: #555;
  text-underline-offset: 3px;
}
.info {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font:
    600 11px/16px 'IBM Plex Sans',
    sans-serif;
  padding: 0;
  cursor: pointer;
}
.info:hover {
  color: var(--ink);
  border-color: #4a4f5a;
}
#matrix .bands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-left: 17px;
}
.sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}
.chip {
  width: 100%;
  background: #12151b;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 2px;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover {
  color: var(--ink2);
  border-color: #3e434d;
}
.chip[aria-pressed='true'] {
  color: var(--ink);
  background: var(--hi);
  border-color: var(--rc, #4f7cb8);
  box-shadow: inset 0 -2px 0 var(--rc, #4f7cb8);
}

#rate {
  width: 110px;
  accent-color: #8fd0ff;
}
/* population groups (collapsed by default) */
.grp {
  border-top: 1px solid var(--line);
}
.grp:first-child {
  border-top: 0;
}
.gh {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  padding: 7px 4px;
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
}
.gh:hover {
  background: #161a21;
}
.gh .car {
  color: var(--muted);
  font-size: 10px;
  width: 10px;
  transition: transform 0.15s;
}
.gh[aria-expanded='true'] .car {
  transform: rotate(90deg);
}
.gh .gdots {
  display: flex;
  gap: 3px;
  margin-left: 4px;
}
.gh .gdots i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.gh .gn {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.gh .run {
  background: #3a2414;
  border: 1px solid #7a4520;
  color: #ffb88c;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 10.5px;
}
.gh .gsub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.gb {
  display: none;
  padding: 0 0 6px;
}
.grp.open .gb {
  display: block;
}
.evctl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #13100d;
  border: 1px solid #3a2a1a;
  border-radius: 7px;
  padding: 8px;
  margin: 2px 4px 6px;
}
.evctl .eh {
  color: #d9b48f;
  font-size: 11.5px;
}
/* top navigation */
#nav {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
#nav button {
  background: transparent;
  color: var(--ink2);
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
#nav button:hover {
  background: #1c2129;
  color: var(--ink);
}
#nav button[aria-current='true'] {
  background: #e9e8e4;
  color: #0b0b0b;
}
#nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
#scale {
  position: fixed;
  top: 104px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink2);
  font-size: 11.5px;
  text-shadow: 0 0 4px #000;
  pointer-events: none;
  white-space: nowrap;
}

/* transport bar (clock), under the navigation */
#bar {
  position: fixed;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
#bar .btn {
  min-width: 34px;
}
#clock {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 14px;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 6px;
}
#clock:hover {
  background: #1c2129;
}
#speed {
  color: var(--ink2);
  font-size: 12px;
  min-width: 70px;
  text-align: center;
}
#evbadge {
  display: none;
  align-items: center;
  gap: 6px;
  background: #3a2414;
  border: 1px solid #7a4520;
  color: #ffb88c;
  border-radius: 8px;
  padding: 2px 4px 2px 8px;
  font-size: 12px;
}
#evbadge.on {
  display: flex;
}
#evbadge button {
  background: transparent;
  color: #ffb88c;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
}
#datepop {
  position: fixed;
  top: 102px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  padding: 8px;
}
#datepop.open {
  display: flex;
  gap: 6px;
}

#legend {
  position: fixed;
  left: 362px;
  top: 124px;
  max-width: 400px;
  max-height: 40vh;
  overflow-y: auto;
  background: rgba(10, 12, 16, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11.5px;
}
#legend {
  min-width: 340px;
}
#legend .li {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 1px 3px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
#legend .bd {
  overflow: hidden;
  text-overflow: ellipsis;
}
#legend .li:hover {
  background: #1a1e26;
}
#legend .bd {
  color: var(--ink2);
  font-size: 11px;
}
#legend .q {
  color: var(--muted);
  margin-left: auto;
  padding-left: 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  white-space: nowrap;
}
#legend .note {
  color: var(--muted);
  margin-top: 3px;
}
#legend:empty {
  display: none;
}

/* cards: tour, spotlight, welcome */
#card {
  position: fixed;
  left: calc(50% - 10px);
  bottom: 18px;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 760px));
  min-width: 380px;
  display: none;
  padding: 14px 16px 12px;
  border-color: #3a4150;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
#card.open {
  display: block;
  animation: rise 0.25s ease-out;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
#card .ct {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  padding-right: 22px;
}
#card .ct .sw {
  width: 12px;
  height: 12px;
}
#card .ck {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}
#card p {
  margin: 0 0 8px;
  color: var(--ink2);
}
#card .num {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 8px;
}
#card .acts {
  display: flex;
  gap: 6px;
  align-items: center;
}
#card .dots {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
#card .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a3f48;
}
#card .dots i.on {
  background: var(--ink);
}
#card .x {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.pulse {
  animation: pulse 1.6s ease-in-out 3;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 143, 224, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(79, 143, 224, 0.55);
  }
}

#hint {
  position: fixed;
  left: calc(50% - 10px);
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(10, 12, 16, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--ink2);
  font-size: 12px;
  pointer-events: none;
  transition: opacity 0.8s;
  white-space: nowrap;
}
#hint.gone {
  opacity: 0;
}
#tip {
  position: fixed;
  z-index: 50;
  display: none;
  max-width: 300px;
  background: #f0efec;
  color: #121316;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
#tip b {
  color: #000;
}
#tip .m {
  color: #55534e;
}
#tip .k {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
}

#help {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
#help.open {
  display: flex;
}
#help .box {
  background: #12151b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  max-width: 560px;
}
#help h2 {
  font-size: 15px;
  margin: 0 0 10px;
}
#help table {
  border-collapse: collapse;
  font-size: 12.5px;
}
#help td {
  padding: 3px 14px 3px 0;
  color: var(--ink2);
  vertical-align: top;
}
#help td:first-child {
  color: var(--ink);
  white-space: nowrap;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
}
kbd {
  background: #1f232b;
  border: 1px solid #3a3f48;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
}

/* probe */
.ph {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.ph b {
  font-size: 13px;
}
.ph .loc {
  color: var(--ink2);
  font-size: 12px;
  flex: 1;
}
.ph .caret {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 3px;
  margin: 8px 0 4px;
  flex-wrap: wrap;
}
.tabs button {
  background: #12151b;
  color: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  background: #e9e8e4;
  color: #0b0b0b;
}
#p-chart {
  width: 100%;
  height: auto;
  display: block;
  background: #0b0d11;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.pleg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--ink2);
  margin: 4px 0 8px;
}
.pleg i {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.ptiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.pt {
  background: #0f1217;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
}
.pt .k {
  color: var(--muted);
  font-size: 11px;
}
.pt .v {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
}
.pt .u {
  color: var(--muted);
  font-size: 10.5px;
}
.pflags {
  color: #d4b06a;
  font-size: 11px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* dose panel */
#dose {
  left: calc(50% - 10px);
  bottom: 14px;
  transform: translateX(-50%);
  width: min(820px, calc(100vw - 770px));
  min-width: 560px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  display: none;
  padding: 10px 14px 10px;
  z-index: 20;
  border-color: #3a4150;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
#dose.open {
  display: block;
}
#dose .dh {
  display: flex;
  align-items: center;
  gap: 10px;
}
#dose .dh b {
  font-size: 14px;
}
#dose .dw {
  color: var(--ink2);
  font-size: 12px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#dose .dsel {
  flex-direction: row;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
}
#dose .dsel select {
  padding: 2px 4px;
  font-size: 11.5px;
}
#dose .x {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}
#dose .m {
  color: var(--muted);
}
.dleg {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  font-size: 11px;
  color: var(--ink2);
  margin: 8px 0 4px;
}
.dleg i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}
.drow {
  display: grid;
  grid-template-columns: 250px 1fr 150px;
  gap: 10px;
  align-items: center;
  padding: 3px 0;
  border-top: 1px solid #1d2027;
}
.dnote .meth {
  color: var(--ink2);
  text-decoration: underline dotted;
  cursor: help;
}
.drow .dn {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  line-height: 1.25;
}
.drow .dn .m {
  font-size: 10.5px;
}
.dk {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  border: 1.5px solid #8fd0ff;
}
.dk.human {
  background: #8fd0ff;
}
.dk.chip {
  border-radius: 2px;
  background: #8fd0ff;
}
.drow:nth-child(2) .dk,
.drow:nth-child(4) .dk {
  background: transparent;
}
.dbar {
  display: flex;
  gap: 2px;
  height: 14px;
}
.dbar .seg {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 2px;
  cursor: default;
}
.dbar .seg:first-child {
  border-radius: 4px 2px 2px 4px;
}
.dbar .seg:last-child {
  border-radius: 2px 4px 4px 2px;
}
.dv {
  text-align: right;
  font-size: 11px;
  line-height: 1.25;
}
.dv b {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
}
.dlad {
  margin-top: 6px;
}
.dlt {
  font-size: 11px;
  color: var(--ink2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.dlt .m {
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}
.dlad svg {
  width: 100%;
  display: block;
  overflow: visible;
}
.dlad .ax {
  stroke: #4a4f5a;
  stroke-width: 1;
}
.dlad .tl {
  fill: var(--muted);
  font-size: 10px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.dlad .rl {
  stroke: #3a3f48;
  stroke-width: 1;
}
.dlad .rt {
  fill: var(--ink2);
  font-size: 11px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  cursor: default;
}
.dlad .rt:hover {
  fill: var(--ink);
}
.dlad .mk {
  fill: #8fd0ff;
  stroke: #0e1015;
  stroke-width: 2;
}
.dlad .mk.h {
  fill: #0e1015;
  stroke: #8fd0ff;
  stroke-width: 2;
}
.dlad .ml {
  stroke: #8fd0ff;
  stroke-width: 1;
  opacity: 0.6;
}
.dlad .mt {
  fill: var(--ink);
  font-size: 11px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.dlad .ri {
  font-size: 15px;
  cursor: default;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
.dlad .ri:hover {
  font-size: 19px;
}
.dlad .tl,
.dlad .mt {
  paint-order: stroke;
  stroke: #0e1015;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.dlad .mk {
  cursor: default;
}
.dctx {
  font-size: 11.5px;
  color: var(--ink2);
  line-height: 1.45;
  margin: 6px 0 2px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #12151b;
  border: 1px solid #23272f;
}
.dctx b {
  color: var(--ink);
}
.dctx .btn {
  margin-left: 4px;
  padding: 1px 8px;
}
.dnote {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
  margin-top: 6px;
}
#pinmk {
  position: fixed;
  left: 0;
  top: 0;
  width: 20px;
  height: 26px;
  margin: -25px 0 0 -10px;
  pointer-events: none;
  display: none;
  filter: drop-shadow(0 0 4px rgba(255, 207, 122, 0.7)) drop-shadow(0 1px 2px #000);
  z-index: 5;
}
.pinbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b0d11;
  border: 1px solid #4a3d22;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.pinbox .m {
  color: var(--muted);
  font-size: 11px;
}
.pinbox #p-pin {
  flex: 1;
}
.pinico {
  width: 10px;
  height: 10px;
  border: 2px solid #ffcf7a;
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  flex: none;
}
.ph .btn.sm {
  padding: 1px 8px;
}
/* orbits: chips, live tracker, 3D marker */
.olab {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 6px 0 4px;
}
.olab .m {
  text-transform: none;
  letter-spacing: 0;
  color: #5f5d58;
  margin-left: 4px;
}
.ochips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.ochips .chip {
  --rc: #8fd0ff;
  font-size: 11px;
  padding: 3px 2px;
}
.trk {
  margin-top: 8px;
  background: #0b0d11;
  border: 1px solid #23364a;
  border-radius: 7px;
  padding: 7px 8px 6px;
}
.trk-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.trk-h .m {
  color: var(--ink2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
}
.trk .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fd0ff;
  box-shadow: 0 0 0 0 rgba(143, 208, 255, 0.6);
  animation: live 1.8s infinite;
  flex: none;
}
@keyframes live {
  0% {
    box-shadow: 0 0 0 0 rgba(143, 208, 255, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(143, 208, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(143, 208, 255, 0);
  }
}
.trk-v {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  align-items: baseline;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink2);
}
.trk-v i {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.trk-v b {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  color: var(--ink);
  font-size: 13px;
  margin-left: 3px;
}
.trk .m {
  color: var(--muted);
}
.trk-s {
  font-size: 11px;
  margin: 3px 0 4px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
#t-spark {
  width: 100%;
  height: 74px;
  display: block;
  cursor: crosshair;
}
.trk-n {
  font-size: 11px;
  color: var(--ink2);
  margin-top: 3px;
  line-height: 1.4;
}
.trk-n .warn {
  color: #ffcf7a;
}
.trk-n a {
  color: #8fd0ff;
}
#scmark {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 1.5px solid #8fd0ff;
  border-radius: 50%;
  pointer-events: none;
  display: none;
  box-shadow: 0 0 8px rgba(143, 208, 255, 0.6);
}
#scmark span {
  position: absolute;
  left: 26px;
  top: 1px;
  color: #cfe9ff;
  font-size: 11px;
  white-space: nowrap;
  text-shadow:
    0 0 3px #000,
    0 0 6px #000;
}
.olbl {
  color: #cfe9ff;
}
.olbl.hov {
  color: #fff;
  background: rgba(31, 42, 58, 0.85);
}
@media (prefers-reduced-motion: reduce) {
  .pulse,
  #card.open,
  .trk .live {
    animation: none;
  }
}
@media (max-width: 1250px) {
  #probe {
    width: 310px;
  }
  #legend {
    display: none;
  }
  #dose {
    min-width: 0;
    width: calc(100vw - 700px);
  }
  .drow {
    grid-template-columns: 170px 1fr 120px;
  }
}
/* links to the rest of the site, and the version footer */
.sitelinks {
  display: flex;
  gap: 6px;
  margin: 0 0 4px;
}
.sitelinks a {
  color: var(--ink2);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.sitelinks a:hover {
  color: var(--ink);
  border-color: #4a4f5a;
  background: #161a21;
}
.sitelinks a:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
}
.foot {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  margin: 12px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.foot .rev {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
}

/* small screens: the side panels become bottom sheets opened from a tab bar */
#mtabs {
  display: none;
}
@media (max-width: 760px) {
  #nav {
    left: 8px;
    right: 8px;
    top: calc(8px + env(safe-area-inset-top));
    transform: none;
    justify-content: flex-start;
    overflow-x: auto;
    border-radius: 12px;
    scrollbar-width: none;
  }
  #nav::-webkit-scrollbar {
    display: none;
  }
  #nav button {
    flex: none;
  }
  #scale {
    top: calc(58px + env(safe-area-inset-top));
    font-size: 11px;
  }
  #legend,
  #hint {
    display: none;
  }
  #bar {
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    right: 8px;
    transform: none;
    justify-content: space-between;
  }
  #bar #now,
  #bar #rate {
    display: none;
  }
  #clock {
    font-size: 12px;
    padding: 2px 4px;
  }
  #speed {
    min-width: 54px;
  }
  #datepop {
    top: auto;
    bottom: calc(66px + env(safe-area-inset-bottom));
  }
  #mtabs {
    display: flex;
    position: fixed;
    left: 8px;
    bottom: calc(62px + env(safe-area-inset-bottom));
    gap: 6px;
    z-index: 6;
  }
  #mtabs .btn {
    padding: 9px 14px;
    background: var(--panel);
    backdrop-filter: blur(6px);
  }
  #mtabs .btn[aria-pressed='true'] {
    background: #e9e8e4;
    color: #0b0b0b;
  }
  #left,
  #probe {
    display: none;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(112px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(62dvh, calc(100dvh - 190px));
    z-index: 7;
  }
  body[data-sheet='left'] #left,
  body[data-sheet='probe'] #probe {
    display: block;
  }
  /* a sheet is shown or hidden as a whole; it does not also collapse */
  #probe.collapsed {
    width: auto;
  }
  #probe.collapsed .pbody {
    display: block;
  }
  #probe .caret {
    display: none;
  }
  #card {
    left: 8px;
    right: 8px;
    bottom: calc(112px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    transform: none;
  }
  #card.open {
    animation: none;
  }
  #dose {
    left: 8px;
    right: 8px;
    bottom: calc(62px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    transform: none;
    max-height: calc(100dvh - 140px);
  }
  #dose .dh {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  #dose .dw {
    flex-basis: 100%;
    order: 5;
  }
  .drow {
    grid-template-columns: 1fr auto;
  }
  .drow .dn {
    grid-column: 1;
    grid-row: 1;
  }
  .drow .dv {
    grid-column: 2;
    grid-row: 1;
  }
  .drow .dbar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  #help .box {
    margin: 12px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  body.hide-panels #mtabs,
  body.hide-panels #bar {
    display: none;
  }
}
/* touch: targets large enough for a finger */
@media (pointer: coarse) {
  .btn,
  button.chip,
  .tabs button,
  #nav button,
  .gh,
  .sitelinks a {
    min-height: var(--touch-min);
  }
  .sitelinks a {
    display: inline-flex;
    align-items: center;
  }
  .info {
    width: 32px;
    height: 32px;
  }
}
/* links from a card or a panel to the wiki page that explains it */
.wikilink {
  display: inline-block;
  color: var(--acc-ink);
  font-size: 12px;
  margin: 0 0 8px;
  text-decoration-color: rgba(143, 208, 255, 0.35);
  text-underline-offset: 3px;
}
.wikilink:hover {
  text-decoration-color: currentColor;
}
.dnote .wikilink {
  margin: 0;
  font-size: inherit;
}
