/* GPX Lab shared system: black stem, white stickers, one signal orange. */

@font-face { font-family: "Sofia Sans"; src: url(/fonts/sofia-sans-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; src: url(/fonts/sofia-sans-latin-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans XC"; src: url(/fonts/sofia-sans-xc-latin.woff2) format("woff2"); font-weight: 600 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans XC"; src: url(/fonts/sofia-sans-xc-latin-ext.woff2) format("woff2"); font-weight: 600 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --stem: #0d0d0b;
  --on: #f4f6f7;
  --on-2: rgba(244, 246, 247, .68);
  --on-3: rgba(244, 246, 247, .52);
  --hair: rgba(244, 246, 247, .13);
  --hair-2: rgba(244, 246, 247, .28);
  --sticker: #f4f6f7;
  --ink: #0d0d0b;
  --ink-2: #4a4a45;
  --ink-3: #6e6e67;
  --rule: rgba(13, 13, 11, .16);
  --signal: #ff5a1f;
  --signal-hi: #ff7a47;
  --bad: #ffb49e;
  --fd: "Sofia Sans XC", "Arial Narrow", sans-serif;
  --fb: "Sofia Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 56px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: rgba(244, 246, 247, .22) transparent; }
body {
  background: var(--stem); color: var(--on);
  font: 400 16px/1.5 var(--fb); font-variant-numeric: tabular-nums;
  min-height: 100vh; -webkit-font-smoothing: antialiased; caret-color: var(--signal);
}
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ---------- nav: the three tools as stations on one line ---------- */
.nav {
  position: sticky; top: 0; z-index: 1000; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 20px; background: var(--stem); border-bottom: 1px solid var(--hair);
}
.nav__brand {
  justify-self: start; font: 800 24px/1 var(--fd); text-transform: uppercase;
  letter-spacing: .01em; text-decoration: none; white-space: nowrap;
}
.nav__line { list-style: none; padding: 0; display: flex; position: relative; }
.nav__stop {
  position: relative; display: flex; align-items: center; gap: 8px; height: 40px;
  padding: 0 20px 0 8px; text-decoration: none; color: var(--on-2);
  font: 700 16px/1 var(--fd); text-transform: uppercase; letter-spacing: .05em;
}
.nav__stop span { background: var(--stem); padding-right: 6px; transition: color .15s; }
.nav__stop i {
  width: 2px; height: 22px; background: var(--on-3); position: relative; z-index: 1;
  transform: scaleY(.55); transition: transform .25s var(--ease), background .15s;
}
.nav__line li:last-child .nav__stop { padding-right: 0; }
.nav__stop:hover { color: var(--on); }
.nav__stop:hover i { transform: scaleY(.75); background: var(--on); }
.nav__stop[aria-current="page"] { color: var(--on); }
.nav__stop[aria-current="page"] i { transform: none; width: 3px; background: var(--signal); }
.nav__end { justify-self: end; display: flex; align-items: center; gap: 16px; }
.nav__link {
  font: 700 16px/1 var(--fd); text-transform: uppercase; letter-spacing: .05em; color: var(--on-2);
  text-decoration: none; padding: 6px 0; white-space: nowrap;
}
.nav__link:hover { color: var(--on); }
.nav__link[aria-current="page"] { color: var(--on); box-shadow: inset 0 -2px 0 var(--signal); }
.nav__fb svg { display: none; width: 16px; height: 16px; }
.nav__fb {
  display: inline-flex; align-items: center; background: none; border: 1px solid var(--hair-2); border-radius: 6px;
  height: 32px; padding: 0 12px; color: var(--on-2);
  font: 700 14px/1 var(--fd); text-transform: uppercase; letter-spacing: .06em;
}
.nav__fb:hover { color: var(--on); border-color: var(--on-2); }
@media (max-width: 600px) {
  .nav { grid-template-columns: auto 1fr auto; padding: 0 12px; gap: 8px; }
  .nav__line { justify-self: center; }
  .nav__stop { padding: 8px 9px 8px 4px; gap: 5px; font-size: 14px; letter-spacing: .03em; }
  .nav__stop span { padding-right: 2px; }
  .nav__brand { font-size: 17px; }
  .nav__stop { padding: 0 7px 0 3px; gap: 4px; font-size: 13px; }
  .nav__end { gap: 10px; }
  .nav__link { font-size: 13px; letter-spacing: .03em; }
  .nav__fb { height: 30px; width: 30px; padding: 0; justify-content: center; }
  .nav__fb span { display: none; }
  .nav__fb svg { display: block; }
}

/* ---------- type ---------- */
.display {
  font: 800 clamp(56px, 9vw, 96px)/.86 var(--fd); text-transform: uppercase;
  letter-spacing: -.005em; text-wrap: balance;
}
.h2 { font: 800 clamp(30px, 4vw, 44px)/.95 var(--fd); text-transform: uppercase; text-wrap: balance; }
.h3 { font: 800 26px/1 var(--fd); text-transform: uppercase; }
.lede { color: var(--on-2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; max-width: 54ch; text-wrap: pretty; }
.label { font: 700 13px/1 var(--fd); text-transform: uppercase; letter-spacing: .07em; color: var(--on-3); }
.note { font-size: 14px; color: var(--on-3); }
.num { font-family: var(--fd); font-weight: 800; }

.page { max-width: 1200px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) 20px 88px; }
.page--narrow { max-width: 960px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 6px; border: 1px solid transparent;
  font: 800 18px/1 var(--fd); text-transform: uppercase; letter-spacing: .05em;
  text-decoration: none; white-space: nowrap; background: none;
  transition: background .15s, border-color .15s, color .15s, transform .2s var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn--go { background: var(--signal); color: var(--ink); }
.btn--go:hover:not(:disabled) { background: var(--signal-hi); }
.btn--line { border-color: var(--hair-2); color: var(--on); }
.btn--line:hover:not(:disabled) { border-color: var(--on); }
.btn--ink { background: var(--ink); color: var(--sticker); }
.btn--ink:hover:not(:disabled) { background: #2a2a26; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.link {
  background: none; border: 0; padding: 0; color: var(--on-2);
  text-decoration: underline; text-decoration-color: var(--hair-2);
}
.link:hover { color: var(--on); text-decoration-color: var(--signal); }

.field {
  height: 40px; padding: 0 12px; min-width: 0; background: transparent;
  border: 1px solid var(--hair-2); border-radius: 6px; font-size: 15px;
  transition: border-color .15s;
}
.field:hover { border-color: rgba(244, 246, 247, .45); }
.field:focus { outline: none; border-color: var(--signal); }
.field::placeholder { color: var(--on-3); }
textarea.field { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
select.field {
  appearance: none; padding-right: 32px; background-repeat: no-repeat; background-position: right 10px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23f4f6f7' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}
select.field option { background: var(--stem); color: var(--on); }
input[type="checkbox"] { accent-color: var(--signal); width: 16px; height: 16px; }
input[type="range"] { accent-color: var(--signal); }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 3px;
  border: 1px solid currentColor; font: 800 12px/1 var(--fd); letter-spacing: .07em;
  text-transform: uppercase; white-space: nowrap;
}
.tag--solid { background: var(--on); border-color: var(--on); color: var(--ink); }

/* ---------- drop zone ---------- */
.drop {
  display: grid; place-items: center; align-content: center; gap: 8px; min-height: 220px;
  padding: 36px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--hair-2); border-radius: 10px;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--signal); background: rgba(255, 90, 31, .05); outline: none; }
.drop__h { font: 800 clamp(34px, 5vw, 52px)/.9 var(--fd); text-transform: uppercase; }
.drop__s { color: var(--on-3); font-size: 15px; }
.drop svg { width: 28px; height: 28px; color: var(--signal); }

.file {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.file__name { font: 800 24px/1.05 var(--fd); text-transform: uppercase; overflow-wrap: anywhere; }
.file__meta { color: var(--on-3); font-size: 14px; }
.file__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- state ---------- */
.spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--hair-2); border-top-color: var(--signal); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.err {
  color: var(--bad); border: 1px solid rgba(255, 90, 31, .45); border-radius: 6px;
  padding: 10px 12px; font-size: 15px;
}
.status { display: flex; align-items: center; gap: 10px; color: var(--on-2); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th {
  position: sticky; top: 0; z-index: 1; background: var(--stem); text-align: left; white-space: nowrap;
  padding: 10px 12px; border-bottom: 1px solid var(--hair-2); color: var(--on-3);
  font: 700 13px/1 var(--fd); text-transform: uppercase; letter-spacing: .07em;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl .n { text-align: right; }
.tbl tbody tr:hover { background: rgba(244, 246, 247, .035); }

/* ---------- sticker ---------- */
.sticker {
  position: relative; background: var(--sticker); color: var(--ink);
  border-radius: 18px; box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(13, 13, 11, .08);
  /* label-roll cut: rounded ends with a punched notch left and right */
  -webkit-mask: radial-gradient(circle 7px at left 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at right 50%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 7px at left 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at right 50%, #0000 97%, #000) right / 51% 100% no-repeat;
}
.sticker ::selection { background: var(--ink); color: var(--sticker); }
.stk { width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stk text { font-family: var(--fd); fill: var(--ink); }
.stk--print { animation: print 1.4s var(--ease) both; }
.stk-m { cursor: pointer; }
.stk-m:hover circle:nth-child(2) { stroke: var(--ink); stroke-width: 2; }
.stk-m:focus { outline: none; }
.stk-m:focus-visible circle:nth-child(2) { stroke: var(--ink); stroke-width: 3; }
.stk-pop {
  position: absolute; z-index: 5; min-width: 190px; max-width: 280px; overflow: auto;
  padding: 10px 12px 8px; background: var(--ink); color: var(--sticker); border-radius: 8px;
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .55); font-size: 14px; line-height: 1.35;
}
.stk-pop__h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 800 15px/1 var(--fd); text-transform: uppercase; letter-spacing: .04em; }
.stk-pop__r { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(244, 246, 247, .14); }
.stk-pop__r b { flex: none; font: 800 14px/1.3 var(--fd); color: var(--signal); white-space: nowrap; }
.sticker .stk-pop .gl { color: var(--signal); }
@keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.readout {
  display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; min-height: 24px;
  font: 700 16px/1.2 var(--fd); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2);
}
.readout b { color: var(--ink); font-weight: 800; }
.readout .hot { color: var(--signal); }
.gl { display: inline-block; flex: none; vertical-align: -2px; color: var(--signal); }
.sticker .gl { color: var(--ink); }
.stk-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 20px; margin-top: 10px;
  font: 700 15px/1 var(--fd); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2);
}
.stk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stk-legend i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--signal); }
.stk-legend b { color: var(--ink); font-weight: 800; }
@media (max-width: 640px) { .stk-legend { padding: 0 12px; } }

/* ---------- feedback sheet ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto; width: min(460px, calc(100vw - 24px));
  background: var(--sticker); color: var(--ink); border-radius: 12px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
}
dialog.sheet::backdrop { background: rgba(13, 13, 11, .75); }
dialog.sheet[open] { animation: sheet .35s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(12px); } }
.sheet form { padding: 24px; display: grid; gap: 14px; }
.sheet .label { color: var(--ink-3); display: block; margin-bottom: 6px; }
.sheet .field { width: 100%; border-color: var(--rule); color: var(--ink); background: #fff; }
.sheet .field:hover { border-color: var(--ink-3); }
.sheet .field:focus { border-color: var(--ink); }
.sheet .field::placeholder { color: var(--ink-3); }
.sheet select.field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230d0d0b' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
.sheet select.field option { background: #fff; color: var(--ink); }
.sheet__row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.sheet .btn--line { border-color: var(--rule); color: var(--ink); }
.sheet .btn--line:hover { border-color: var(--ink); }

/* ---------- running scan pill ---------- */
.scanpill {
  position: fixed; right: 16px; bottom: 16px; z-index: 2500; display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px; border-radius: 6px; background: var(--stem); color: var(--on);
  border: 1px solid var(--signal); text-decoration: none; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .8);
  font: 800 16px/1 var(--fd); text-transform: uppercase; letter-spacing: .05em;
}
.scanpill:hover { background: #1a1a17; }

/* ---------- credits ---------- */
.credits {
  margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--hair);
  color: var(--on-3); font-size: 14px; line-height: 1.75;
}
.credits a { color: var(--on-2); }
.credits a:hover { color: var(--on); }

/* ---------- maps (Route, Enrich) ---------- */
.tiles-mono { filter: grayscale(.8) contrast(1.06) brightness(1.03); }
.leaflet-control-layers-toggle {
  width: 36px !important; height: 36px !important; background-size: 20px 20px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230d0d0b' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M10 2.5l7.5 4-7.5 4-7.5-4z'/%3E%3Cpath d='M2.5 10l7.5 4 7.5-4M2.5 13.5l7.5 4 7.5-4'/%3E%3C/svg%3E") !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
