@font-face { font-family: "DM Sans"; src: url("/dm-sans.woff2") format("woff2"); font-display: swap; }
:root {
  color-scheme: light;
  --page: #f7f8fa; --sheet: #fff; --ink: #222832; --muted: #525b67;
  --rule: #acb3be; --key: #08636b; --on: #fff; --gps-tint: #e5f3f1; --bad: #8c2435;
  font: 1rem/1.45 "DM Sans", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #1c2026; --sheet: #282e37; --ink: #f2f4f7; --muted: #c4ccd6;
  --rule: #737b88; --key: #94d7d4; --on: #102e31; --gps-tint: #233f42; --bad: #ffb4c3;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: var(--key); text-underline-offset: .16em; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: default; }
:focus-visible { outline: 2px solid var(--key); outline-offset: 3px; }
body > :is(header, footer) { border-bottom: 1px solid var(--rule); background: var(--sheet); }
body > footer { border-top: 1px solid var(--rule); border-bottom: 0; }
body > :is(header, footer) > div:not(.app-meta) {
  max-width: 71rem; padding: .65rem 1.2rem; margin: auto; display: flex;
  align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem;
}
body > :is(header, footer) nav { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
body > :is(header, footer) nav a { display: inline-flex; min-height: 2.25rem; align-items: center; font-size: .88rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 750; }
.brand img { width: 1.85rem; height: 1.85rem; border-radius: 3px; }
main { max-width: 71rem; margin: auto; padding: 1.8rem 1.2rem 2.8rem; }

.gps-heading { margin-bottom: 1.25rem; }
.gps-heading h1 { margin: 0 0 .4rem; font-size: clamp(1.64rem,5vw,2.58rem); line-height: 1.1; }
.gps-heading p, #gps-empty, .gps-export-note { color: var(--muted); margin: .52rem 0; }
#tool { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.15rem; align-items: start; }
#tool section { min-width: 0; border: 1px solid var(--rule); background: var(--sheet); padding: 1.1rem; border-radius: .58rem; }
#tool h2 { font-size: 1.21rem; margin: 0 0 .7rem; }
#tool label, #tool figcaption { font-weight: 700; }
#tool button, #tool input::file-selector-button, #install { color: var(--ink); background: var(--sheet); font: inherit; border: 1px solid var(--rule); min-height: 2.64rem; padding: .35rem .68rem; border-radius: .35rem; }
#tool button.gps-primary { background: var(--key); border-color: var(--key); color: var(--on); font-weight: 750; }
#tool .gps-quiet { border-color: transparent; color: var(--key); text-decoration: underline; text-underline-offset: .15em; }
.gps-file-row { padding: .6rem .75rem; border-left: .22rem solid var(--key); background: var(--gps-tint); }
.gps-file-row label { display: block; margin-bottom: .35rem; }
#gps-file { display: block; width: 100%; cursor: pointer; }
.gps-paste-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: .52rem; }
#gps-text, #gps-preview { width: 100%; min-width: 0; padding: .6rem .7rem; border: 1px solid var(--rule); border-radius: .35rem; font: .84rem/1.5 ui-monospace, monospace; }
#gps-text { display: block; resize: vertical; min-height: 7rem; color: var(--ink); background: var(--sheet); margin: .1rem 0 .75rem; }
#gps-error { color: var(--bad); margin: .35rem 0 .75rem; }
#gps-summary { color: var(--key); font-weight: 750; margin: 0 0 .7rem; }
#gps-types { display: flex; flex-wrap: wrap; list-style: none; gap: .4rem; margin: 0; padding: 0; }
#gps-types li { font: .78rem/1.5 ui-monospace, monospace; border: 1px solid var(--rule); padding: .22rem .38rem; border-radius: .25rem; }
#tool figure { margin: .9rem 0; }
#gps-preview { background: var(--gps-tint); overflow: auto; margin: .3rem 0 0; max-height: 10rem; }
.gps-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.gps-export-note { margin: .8rem 0 0; }
@media (max-width: 760px) {
  main { padding: .9rem .8rem 1.5rem; }
  .gps-heading { margin-bottom: .85rem; }
  #tool { display: block; }
  #tool section { padding: .8rem; }
  #gps-text { min-height: 5.75rem; height: 7rem; font-size: 1rem; }
}
