/* High Plains GIS — compact utility bar for full-screen tools, maps and games.
   Everything is prefixed hpgx- so it cannot collide with an app's own styles. */
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root { --hpgx-h: 44px; }
.hpgx-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 9500; height: var(--hpgx-h); display: flex; align-items: center; gap: 10px; padding: 0 10px 0 8px; background: #09121a; color: #eaf1f3; border-bottom: 1px solid #263d4a; font: 500 12px/1 "IBM Plex Mono", ui-monospace, Consolas, monospace; letter-spacing: 0.06em; box-sizing: border-box; }
.hpgx-bar.hpgx-flow { position: static; flex: none; }
.hpgx-bar * { box-sizing: border-box; }
.hpgx-bar a, .hpgx-bar button { color: inherit; font: inherit; letter-spacing: inherit; }
.hpgx-home { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; flex: none; }
.hpgx-home svg { width: 26px; height: 26px; display: block; }
.hpgx-back, .hpgx-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 1px solid #36505e; border-radius: 999px; background: transparent; text-decoration: none; text-transform: uppercase; white-space: nowrap; cursor: pointer; flex: none; transition: border-color 0.15s, background 0.15s; }
.hpgx-back:hover, .hpgx-btn:hover { border-color: #56d6e0; }
.hpgx-btn[aria-pressed="true"] { background: #56d6e0; color: #09121a; border-color: #56d6e0; }
.hpgx-bar :focus-visible { outline: 2px solid #56d6e0; outline-offset: 2px; }
.hpgx-title { font: 600 15px/1 "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hpgx-sub { color: #a7b8c2; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hpgx-sp { flex: 1; min-width: 0; }
.hpgx-tools { display: flex; gap: 6px; flex: none; }
@media (max-width: 720px) { .hpgx-sub { display: none; } .hpgx-back span.hpgx-lbl { display: none; } .hpgx-back { padding: 0 10px; } .hpgx-btn .hpgx-long { display: none; } }
@media (max-width: 420px) { .hpgx-title { font-size: 13px; } .hpgx-btn { padding: 0 8px; } }

.hpgx-dialog { position: fixed; inset: 0; margin: auto; width: min(40rem, calc(100vw - 24px)); height: fit-content; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #36505e; border-radius: 16px; background: #142431; color: #eaf1f3; font: 400 15px/1.6 "Space Grotesk", system-ui, sans-serif; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); }
.hpgx-dialog::backdrop { background: rgba(4, 9, 13, 0.66); }
.hpgx-dialog header, .hpgx-dialog .hpgx-dhead { all: unset; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid #263d4a; position: sticky; top: 0; background: #142431; }
.hpgx-dialog h2 { all: unset; font: 600 19px/1.2 "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.02em; color: #eaf1f3; }
.hpgx-dbody { padding: 16px 20px 20px; }
.hpgx-dbody h3 { margin: 18px 0 6px; font: 500 11px/1.3 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: #e0b88c; }
.hpgx-dbody h3:first-child { margin-top: 0; }
.hpgx-dbody p, .hpgx-dbody li { margin: 0 0 8px; color: #c3d0d7; }
.hpgx-dbody ul, .hpgx-dbody ol { margin: 0 0 8px; padding-left: 20px; }
.hpgx-dbody strong, .hpgx-dbody b { color: #eaf1f3; font-weight: 600; }
.hpgx-dbody a { color: #56d6e0; }
.hpgx-dbody code, .hpgx-dbody kbd { font: 500 12.5px "IBM Plex Mono", ui-monospace, monospace; padding: 1px 5px; border: 1px solid #36505e; border-radius: 4px; }
.hpgx-close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #36505e; border-radius: 10px; background: transparent; color: #eaf1f3; font-size: 16px; cursor: pointer; }
.hpgx-toast { position: fixed; left: 50%; top: calc(var(--hpgx-h) + 10px); transform: translateX(-50%); z-index: 9600; padding: 9px 14px; border: 1px solid #36505e; border-radius: 999px; background: #142431; color: #eaf1f3; font: 500 13px/1.3 "Space Grotesk", system-ui, sans-serif; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); max-width: calc(100vw - 24px); }
.hpgx-toast.hpgx-err { border-color: #e0795f; }
@media print { .hpgx-bar, .hpgx-toast { display: none !important; } }
