:root { font-family: system-ui, sans-serif; color: #142b34; background: #eef4f3; }
* { box-sizing: border-box; }
body { margin: 0; }
[v-cloak] { display: none; }
.login { display: block; max-width: 480px; }
.account { position: relative; margin-left: auto; display: flex; align-items: center; }
.account-menu-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid transparent; background: transparent; color: white; font-weight: 650; }
.account-menu-toggle:hover, .account-menu-toggle[aria-expanded="true"] { border-color: #496b70; background: #1a3d45; }
.account-menu { position: absolute; z-index: 1300; top: calc(100% + .4rem); right: 0; display: grid; min-width: 190px; padding: .35rem; border: 1px solid #d5e1df; border-radius: .65rem; background: white; box-shadow: 0 8px 24px #142b3433; }
.account-menu a, .account-menu button { display: block; width: 100%; padding: .6rem .7rem; border: 0; border-radius: .4rem; background: transparent; color: #142b34; text-align: left; text-decoration: none; font-size: .9rem; }
.account-menu a:hover, .account-menu button:hover, .account-menu a[aria-current="page"] { background: #edf4f2; color: #006359; }
.view-nav { display: flex; flex-wrap: wrap; gap: .4rem; }
.view-nav a { color: inherit; padding: .4rem .55rem; border-radius: .35rem; }
.view-nav a[aria-current="page"] { color: white; background: #27545c; }
.admin { display: block; max-width: 1000px; }
.admin .lookup { margin-bottom: 1rem; }
.admin-form { display: flex; align-items: end; flex-wrap: wrap; margin-top: .85rem; }
.admin-form label { flex: 1 1 13rem; }
.admin-list > li { border-top: 1px solid #d5e1df; padding: .65rem 0; }
.admin-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.admin-row > span { margin-right: auto; overflow-wrap: anywhere; }
.admin-row button, .key-reveal button, .admin dialog button { border: 1px solid #aebfbd; }
.key-reveal { display: grid; gap: .6rem; margin-top: 1rem; padding: .8rem; background: #def4ec; }
.key-reveal button { justify-self: start; }
.admin dialog { border: 1px solid #aebfbd; border-radius: .75rem; padding: 1.25rem; }
.admin dialog::backdrop { background: #142b3477; }
.admin-feedback { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  header { flex-wrap: wrap; gap: .6rem; }
  .account { width: 100%; margin-left: 0; flex-wrap: wrap; }
}
header { background: #102e36; color: #e1efef; display: flex; gap: 1.2rem; align-items: center; padding: 1rem 5vw; }
.brand { color: white; font-weight: 800; font-size: 1.25rem; }
main { display: grid; grid-template-columns: minmax(290px, 365px) 1fr; gap: 1.25rem; max-width: 1500px; margin: auto; padding: 1.5rem 4vw; }
main.map-layout { align-items: start; }
.lookup-drawer { min-width: 0; }
.lookup, .map-panel { background: white; border: 1px solid #d5e1df; border-radius: 1rem; overflow: hidden; }
.lookup { padding: 1.4rem; }
h1 { margin: 0 0 1.25rem; font-size: 1.65rem; }
h2 { font-size: 1rem; margin: 0; }
form, label { display: grid; gap: .5rem; }
form { gap: .9rem; }
label { font-size: .87rem; font-weight: 650; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
input, button { font: inherit; border-radius: .55rem; padding: .7rem; }
input { width: 100%; border: 1px solid #aebfbd; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #278a80; outline-offset: 2px; }
.submit { color: white; background: #006359; border: 1px solid #006359; font-weight: 700; }
.submit:disabled { opacity: .65; cursor: wait; }
.result-header { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.6rem; }
.list-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-top: 1.35rem; padding: .25rem; border-radius: .7rem; background: #edf4f2; }
.list-tab { display: flex; justify-content: center; gap: .45rem; align-items: center; padding: .6rem .5rem; border: 1px solid transparent; background: transparent; color: #426067; font-weight: 700; }
.list-tab span { min-width: 1.35rem; padding: .1rem .3rem; border-radius: 999px; background: #dce8e5; font-size: .75rem; }
.list-tab.active { color: #123c3a; border-color: #c4d8d3; background: white; box-shadow: 0 1px 3px #142b3414; }
.list-panel { min-height: 5rem; }
.list-panel .result-header { margin-top: .9rem; }
.list-panel > ul { max-height: min(45vh, 550px); overflow-y: auto; padding-right: .2rem; }
ul { margin: .8rem 0 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.result { display: grid; gap: .55rem; width: 100%; text-align: left; background: #f7faf9; color: inherit; border: 1px solid #d5e1df; overflow-wrap: anywhere; }
.result-copy { display: grid; gap: .3rem; min-width: 0; }
.result-badges { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.status-badge { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .25rem .45rem; border-radius: 999px; font-size: .7rem; line-height: 1.2; font-weight: 700; }
.status-swatch { width: .6rem; height: .6rem; flex: 0 0 .6rem; border: 1px solid #52636a; border-radius: 50%; }
.status-green { color: #123212; background: #dcf5dc; }
.status-lime { color: #123212; background: #e4f6d8; }
.status-orange { color: #543200; background: #fff0d8; }
.status-yellow { color: #514900; background: #fff9cc; }
.status-gray, .status-unknown { color: #303840; background: #e8eaed; }
.status-red { color: #651b1b; background: #fde2e2; }
.exact-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: .25rem .45rem; border-radius: 999px; color: #12384a; background: #dceef7; font-size: .7rem; line-height: 1.2; font-weight: 700; }
.result[aria-pressed="true"] { background: #def4ec; border-color: #006359; }
.structure-details { padding: 1rem 1.2rem 1.25rem; border-top: 1px solid #d5e1df; }
.structure-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.structure-details dl { display: grid; grid-template-columns: minmax(7rem, auto) minmax(0, 1fr); gap: .5rem .8rem; margin: 0; font-size: .88rem; }
.structure-details dt { color: #426067; }
.structure-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.copy-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.copy-row > span, .copy-row > a { min-width: 0; overflow-wrap: anywhere; }
.copy-row > a { color: #006359; }
.copy-button { flex: 0 0 auto; padding: .25rem .5rem; border: 1px solid #c4d8d3; background: #f7faf9; color: #24534f; font-size: .75rem; }
.copy-feedback { color: #426067; font-size: .78rem; }
.nearby-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.nearby-result { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; width: 100%; padding: .55rem .65rem; color: inherit; background: #f7faf9; border: 1px solid #d5e1df; text-align: left; }
.nearby-result span { overflow-wrap: anywhere; }
.nearby-result small { flex: 0 0 auto; }
.nearby-empty { color: #426067; font-size: .85rem; }
small, #status, #selection { color: #426067; font-size: .85rem; }
.map-panel { position: relative; min-width: 0; }
#map { height: max(50vh, 550px); background: #dce9e8; }
#selection { padding: .85rem 1rem; margin: 0; }
.map-expand { position: absolute; z-index: 600; top: .75rem; right: .75rem; padding: .5rem .75rem; border: 1px solid #aebfbd; background: #fff; box-shadow: 0 1px 5px #142b3426; font-size: .82rem; font-weight: 700; }
.drawer-toggle { padding: .65rem .8rem; border: 1px solid #c4d8d3; background: white; color: #123c3a; font-weight: 700; box-shadow: 0 2px 10px #142b3426; }
.details-drawer .drawer-toggle { border-radius: .65rem; }
main.map-expanded .drawer-toggle { cursor: grab; touch-action: none; user-select: none; }
main.map-expanded .drawer-toggle:active { cursor: grabbing; }
.site-popup { min-width: 230px; color: #142b34; font: 13px/1.4 system-ui, sans-serif; }
.site-popup-title { display: block; margin-bottom: .5rem; text-decoration: underline; }
.site-popup-table { width: 100%; border-collapse: collapse; }
.site-popup-table th { padding: .12rem .5rem .12rem 0; text-align: left; white-space: nowrap; }
.site-popup-table td { padding: .12rem 0; overflow-wrap: anywhere; }
@media (max-width: 730px) {
  main { grid-template-columns: 1fr; }
}
.lookup-drawer > .drawer-toggle { display: none; }
main.map-expanded {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}
main.map-expanded > .map-panel {
  position: fixed;
  inset: 0;
  border: 0;
  border-radius: 0;
}
main.map-expanded #map { height: 100vh; min-height: 0; }
main.map-expanded #selection { position: absolute; z-index: 500; bottom: .35rem; left: .4rem; padding: .45rem .65rem; border-radius: .4rem; background: #fff; }
main.map-expanded .map-expand { top: .8rem; right: .8rem; }
main.map-expanded > .lookup-drawer {
  position: fixed;
  z-index: 1100;
  top: .8rem;
  left: .8rem;
  width: min(365px, calc(100vw - 1.6rem));
  max-height: calc(100vh - 1.6rem);
  overflow: auto;
  border-radius: .8rem;
}
main.map-expanded > .lookup-drawer.drawer-front { z-index: 1200; }
main.map-expanded > .lookup-drawer > .drawer-toggle { display: block; width: 100%; text-align: left; border-radius: .65rem; }
main.map-expanded > .lookup-drawer.open > .drawer-toggle { border-radius: .65rem .65rem 0 0; }
main.map-expanded > .lookup-drawer > .lookup { max-height: calc(100vh - 4.7rem); overflow: auto; border-radius: 0 0 .8rem .8rem; box-shadow: 0 4px 18px #142b3433; }
main.map-expanded .details-drawer {
  position: fixed;
  z-index: 1100;
  bottom: .8rem;
  left: .8rem;
  width: min(430px, calc(100vw - 1.6rem));
  max-height: min(45vh, 400px);
  overflow: auto;
}
main.map-expanded .details-drawer.drawer-front { z-index: 1200; }
main.map-expanded .details-drawer .structure-details { margin-top: .4rem; border: 0; border-radius: .8rem; background: white; box-shadow: 0 4px 18px #142b3433; }
@media (max-width: 730px) {
  main.map-expanded > .lookup-drawer { top: .5rem; left: .5rem; width: min(365px, calc(100vw - 1rem)); max-height: calc(100vh - 1rem); }
  main.map-expanded .details-drawer { bottom: .5rem; left: .5rem; width: min(430px, calc(100vw - 1rem)); }
}
