/* ── COMPASS ──────────────────────────────────────────────────────────────────
 *
 * Loaded after styles.css. Two jobs:
 *
 *   1. Re-token. styles.css's component library is written against the custom
 *      properties in its :root, so redefining those converts the dark studio
 *      console to Compass's stone-and-blaze palette without rewriting ~5,000
 *      lines of working component CSS.
 *
 *   2. Re-lay-out. This is the part a re-skin alone can't do. The sandbox app
 *      is a dark canvas with floating, draggable windows over it; Compass is
 *      a three-pane workbench — layers docked left, map centre, site inspector
 *      docked right — with Export and Reports as full pages. Nothing floats
 *      over the map any more, because the map is the deliverable.
 *
 * Deliberately single-theme. These sheets get printed on white paper, and a
 * dark variant would fork every basemap and layer-contrast decision for no
 * user gain.
 */

:root {
  --bg:       #eeece3;
  --panel:    #ffffff;
  --panel-2:  #f7f6f0;
  --panel-3:  #eeece3;
  --border:   #dcd8c9;
  --border-2: #c7c2ae;

  /* One accent. Blaze carries selection, focus and the primary action;
     nothing else in the chrome is allowed to be saturated. */
  --accent:   #c74a1c;
  --accent-h: #a93d14;
  --orange:   #c74a1c;
  --orange-h: #a93d14;
  --blaze-soft: #fbe7db;

  /* Semantic only — never decoration. */
  --green:    #3f6b4a;
  --amber:    #b9790e;
  --red:      #b3271b;
  --purple:   #6b4f8a;
  --sky:      #3d6c8a;

  --text:     #23241d;
  --text-2:   #66655a;
  --text-3:   #98957f;

  --topbar-h:  52px;
  --sidebar-w: 0px;
  --dock-l:    258px;
  --dock-r:    306px;

  --display: "Big Shoulders Display", "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

body {
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ══ TOP BAR ═══════════════════════════════════════════════════════════════ */

#topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  gap: 14px;
  padding: 0 14px;
}
.topbar-left { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.compass-mark {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 2px solid var(--text);
  border-radius: 50%;
  position: relative;
}
.compass-mark::after {
  content: "";
  position: absolute;
  top: 2px; left: 50%;
  width: 2px; height: 9px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%) rotate(18deg);
}

.logo-text {
  font-family: var(--display);
  font-size: 18px; font-weight: 800;
  letter-spacing: .1em;
  color: var(--text);
}
.logo-sub {
  font-size: 8.5px; letter-spacing: .13em;
  color: var(--text-3);
  padding-left: 9px;
  border-left: 1px solid var(--border-2);
}

/* Tabs, not an icon rail. Four destinations don't need a column of glyphs. */
.topbar-tabs { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex-shrink: 0; }
.tab-btn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-2);
  background: none; border: none;
  padding: 7px 13px; border-radius: 8px;
  cursor: pointer;
  width: auto; height: auto;
  flex-direction: row; gap: 0;
}
.tab-btn span { font-size: inherit; letter-spacing: 0; text-transform: none; }
.tab-btn:hover { background: var(--panel-2); color: var(--text); }
.tab-btn.active { background: var(--text); color: var(--panel); }

.topbar-center { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.nav-btn.icon-only {
  width: 32px; height: 32px;
  padding: 0; border-radius: 8px;
  background: none; border: none;
  color: var(--text-2); cursor: pointer;
  display: grid; place-items: center;
}
.nav-btn.icon-only svg { width: 17px; height: 17px; }
.nav-btn.icon-only:hover { background: var(--panel-2); color: var(--text); }
.nav-btn.icon-only.active { background: var(--text); color: var(--panel); }

/* ══ TOWN SELECTOR ═════════════════════════════════════════════════════════
 * Chips for what's loaded, sitting to the LEFT of the box that adds more, all
 * inside one field so the chips read as its contents rather than as loose
 * buttons floating nearby. */

.town-selector {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  max-width: 560px; min-width: 250px;
  padding: 4px 5px 4px 6px;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  border-radius: 9px;
}
.town-selector:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199, 74, 28, .12);
}
.town-selector.loading { border-color: var(--accent); }
.town-selector.loading .town-search-icon { animation: compass-spin 1s linear infinite; }
@keyframes compass-spin { to { transform: rotate(360deg); } }

.town-chips {
  display: flex; align-items: center; gap: 5px;
  overflow-x: auto; max-width: 360px;
  scrollbar-width: thin;
}
.town-chips.empty { display: none; }
.town-chips::-webkit-scrollbar { height: 4px; }
.town-chips::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.town-chip {
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 4px 4px 4px 9px;
  font-size: 11.5px; font-weight: 600;
  color: var(--text); white-space: nowrap;
}
.town-chip-x {
  border: none; background: none;
  color: var(--text-3);
  font-size: 14px; line-height: 1;
  padding: 1px 4px; border-radius: 4px; cursor: pointer;
}
.town-chip-x:hover { background: var(--accent); color: #fff; }

.town-search-wrap {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 110px; padding-left: 4px;
}
.town-search-icon { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; }
.town-search {
  flex: 1; min-width: 0;
  border: none; outline: none; background: none;
  font: inherit; font-size: 12.5px; color: var(--text);
  padding: 4px 0;
}
.town-search::placeholder { color: var(--text-3); }

.town-selector .boundaries-dropdown {
  top: calc(100% + 6px); right: 0; left: auto;
  min-width: 300px; max-height: 400px;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: 0 16px 38px -16px rgba(35, 36, 29, .38);
  overflow: hidden;
  display: flex; flex-direction: column;
  z-index: 400;
}
.town-selector .boundaries-dropdown-list { overflow-y: auto; padding: 5px; flex: 1; }
.town-selector .boundaries-dropdown-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 6px;
  font-size: 12.5px; cursor: pointer;
}
.town-selector .boundaries-dropdown-row:hover { background: var(--panel-2); }

.town-dropdown-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
}
.town-dropdown-foot .btn-request-town-link {
  font-size: 11px; color: var(--text-2);
  background: none; border: none;
  text-decoration: underline; cursor: pointer; padding: 0;
}
.town-dropdown-foot .btn-request-town-link:hover { color: var(--accent); }
.town-dropdown-foot .btn-confirm-project {
  font: inherit; font-size: 11.5px; font-weight: 700;
  background: var(--text); color: var(--panel);
  border: none; border-radius: 6px;
  padding: 6px 14px; cursor: pointer;
  width: auto; height: auto;
}

.account-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  border: none; border-radius: 50%;
  background: var(--text); color: var(--panel);
  font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.account-avatar:hover { background: var(--accent); }

/* ══ THREE-PANE SHELL ══════════════════════════════════════════════════════ */

#app { display: flex; min-height: 0; flex: 1; }
#sidebar { display: none; }

#dock-left {
  width: var(--dock-l); flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  min-height: 0;
}
.dock-search {
  display: flex; align-items: center; gap: 7px;
  margin: 11px 11px 7px;
  padding: 7px 9px;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text-3);
}
.dock-search svg { width: 14px; height: 14px; flex-shrink: 0; }
.dock-search input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: none;
  font: inherit; font-size: 11.5px; color: var(--text);
}
.dock-search input::placeholder { color: var(--text-3); }

/* The layers list itself keeps every id app.js binds to; only the frame
   around it changed, so its own component CSS in styles.css still applies. */
#dock-left .dock-body {
  flex: 1; overflow-y: auto; min-height: 0;
  position: static; width: auto; height: auto;
  background: none; border: none; box-shadow: none;
  padding: 0 0 8px;
}
#dock-left .layers-panel-empty {
  padding: 22px 14px; font-size: 11.5px; line-height: 1.5;
  color: var(--text-3); text-align: center;
}
.dock-foot {
  border-top: 1px solid var(--border);
  padding: 8px 10px;
  display: flex; gap: 6px; flex-shrink: 0;
}
.dock-foot-btn {
  flex: 1;
  font: inherit; font-size: 10.5px; font-weight: 600;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 7px;
  padding: 7px 0; cursor: pointer;
}
.dock-foot-btn:hover { border-color: var(--accent); color: var(--accent); }

#map-wrap { flex: 1; min-width: 0; position: relative; }

/* ══ RIGHT DOCK — SITE INSPECTOR ═══════════════════════════════════════════ */

#dock-right {
  width: var(--dock-r); flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
body.reports-open #dock-right,
body.export-open  #dock-right,
body.reports-open #dock-left,
body.export-open  #dock-left { display: none; }

.dock-empty { padding: 46px 24px; text-align: center; }
.dock-empty-mark { font-size: 26px; color: var(--border-2); margin-bottom: 12px; }
.dock-empty-t { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.dock-empty-d { font-size: 11.5px; line-height: 1.55; color: var(--text-3); }

.sd-head { padding: 15px 16px 12px; border-bottom: 1px solid var(--border); }
.sd-title { font-size: 14px; font-weight: 700; }
.sd-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.sd-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.sd-stat { padding: 11px 16px; border-right: 1px solid var(--border); }
.sd-stat:nth-child(even) { border-right: none; }
.sd-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
.sd-stat .k {
  font-size: 9px; font-weight: 700; letter-spacing: .07em;
  color: var(--text-3); text-transform: uppercase;
}
.sd-stat .v {
  font-family: var(--display);
  font-size: 21px; font-weight: 700;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.sd-sec { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sd-sec-t {
  display: flex; align-items: baseline;
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-3); text-transform: uppercase;
  margin-bottom: 11px;
}
.sd-sec-t .note {
  margin-left: auto; font-weight: 500;
  text-transform: none; letter-spacing: 0;
}
.sd-bar {
  display: grid; grid-template-columns: 92px 1fr 46px;
  align-items: center; gap: 8px; margin-bottom: 9px;
}
.sd-bar .nm { font-size: 11px; color: var(--text-2); }
.sd-bar .tr {
  height: 6px; border-radius: 3px;
  background: var(--panel-3); overflow: hidden; display: block;
}
.sd-bar .fl { height: 100%; border-radius: 3px; background: var(--sky); display: block; }
.sd-bar .vv {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  text-align: right; font-variant-numeric: tabular-nums;
}
.sd-note { font-size: 10px; line-height: 1.5; color: var(--text-3); font-style: italic; }

.sd-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sd-chip {
  font-size: 10px; font-weight: 600;
  border: 1px solid var(--border-2); border-radius: 20px;
  padding: 3px 9px; color: var(--text-2);
}

.sd-actions { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.sd-btn {
  font: inherit; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--border-2); border-radius: 9px;
  background: var(--panel); color: var(--text);
  padding: 10px 0; cursor: pointer;
}
.sd-btn:hover { border-color: var(--accent); color: var(--accent); }
.sd-btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.sd-btn.primary:hover { background: var(--accent-h); color: #fff; }
.sd-btn.ghost { border: none; color: var(--text-2); font-weight: 600; }

/* ══ MAP CHROME ════════════════════════════════════════════════════════════ */

#map-toolbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: static;
  border-radius: 0;
  box-shadow: none;
  padding: 0 12px;
  height: 42px;
  gap: 3px;
}
.map-tool-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 11.5px; font-weight: 600;
  padding: 6px 10px;
}
.map-tool-btn:hover { background: var(--panel-2); color: var(--text); }
.map-tool-btn.active {
  background: var(--blaze-soft); color: var(--accent);
  border-color: #eabfa9;
}
.toolbar-sep { background: var(--border); }
.map-style-select {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 7px;
  font-size: 11.5px; padding: 5px 7px;
}
.layers-badge { background: var(--accent); color: #fff; }

#area-banner {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  box-shadow: 0 6px 18px -10px rgba(35, 36, 29, .4);
  color: var(--text);
}
.maplibregl-ctrl-attrib { background: rgba(255,255,255,.85) !important; }
.maplibregl-ctrl-attrib a { color: var(--text-2) !important; }

/* Floating panels that remain (regions, inspector, chat) sit on paper now. */
#regions-panel, #inspector, #chat-panel, #panel {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 11px;
  box-shadow: 0 16px 40px -18px rgba(35, 36, 29, .4);
  color: var(--text);
}
.layers-panel-head, .insp-head, .chat-head, .panel-header {
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.region-view-btn {
  font: inherit; font-size: 10.5px; font-weight: 600;
  border: 1px solid var(--border-2); border-radius: 5px;
  background: var(--panel); color: var(--text-2);
  padding: 3px 9px; cursor: pointer;
}
.region-view-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.region-view-btn:disabled {
  background: var(--accent); border-color: var(--accent);
  color: #fff; cursor: default;
}

/* ══ EXPORT WORKSPACE ══════════════════════════════════════════════════════ */

#export-page {
  position: absolute;
  inset: var(--topbar-h) 0 0 0;
  background: var(--bg);
  z-index: 220;
  display: flex; flex-direction: column;
  overflow: hidden;
}
#export-page.hidden { display: none; }

.xp-top {
  height: 50px; flex-shrink: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
}
.xp-back {
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: none; border: none; cursor: pointer;
}
.xp-back:hover { color: var(--accent); }
.xp-title { font-size: 14px; font-weight: 700; }
.xp-title .s { font-weight: 400; color: var(--text-3); }

.xp-body { flex: 1; display: flex; min-height: 0; }
.xp-main { flex: 1; overflow-y: auto; padding: 26px 28px 40px; min-width: 0; }
.xp-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 5px;
}
.xp-h {
  font-family: var(--display);
  font-size: 30px; font-weight: 800;
  text-transform: uppercase; letter-spacing: -.005em;
  margin-bottom: 22px;
}

.xp-packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
}
.xp-pkg {
  position: relative; text-align: left;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1.5px solid var(--border-2);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  font: inherit; color: var(--text);
}
.xp-pkg:hover { border-color: var(--text-3); }
.xp-pkg.sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--blaze-soft);
}
.xp-fmt {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--mono); font-size: 8.5px; font-weight: 600;
  letter-spacing: .06em;
  background: var(--panel-3); color: var(--text-3);
  padding: 3px 7px; border-radius: 5px;
}
.xp-thumb {
  height: 86px; margin-bottom: 12px;
  background: var(--panel-2); border-radius: 8px;
  display: grid; place-items: center;
}
.xp-thumb svg { height: 54px; width: auto; }
.xp-nm { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.xp-desc { font-size: 11px; line-height: 1.5; color: var(--text-2); }

.xp-side {
  width: 356px; flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  min-height: 0;
}
.xp-side-head { padding: 16px 18px 13px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.xp-side-head .t { font-size: 14px; font-weight: 700; }
.xp-side-head .s { font-size: 11px; color: var(--text-3); margin-top: 3px; line-height: 1.45; }
.xp-side-body { flex: 1; overflow-y: auto; padding: 4px 0 20px; min-height: 0; }

/* ══ REPORTS ═══════════════════════════════════════════════════════════════ */

#reports-page { background: var(--bg); color: var(--text); }

/* ══ SHARED ════════════════════════════════════════════════════════════════ */

.p-label, .layers-panel-title, .chat-kicker, .section-label {
  color: var(--text-3); letter-spacing: .08em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

@media (max-width: 1180px) {
  :root { --dock-l: 226px; --dock-r: 268px; }
}
@media (max-width: 980px) {
  #dock-right { display: none; }
}

/* Mobile "more" sheet trigger is desktop-hidden; the rail that used to hide it
   no longer exists, so the rule has to live on the button itself. */
#btn-nav-more { display: none; }
@media (max-width: 820px) { #btn-nav-more { display: grid; } }

/* ── ACCOUNT MENU ──────────────────────────────────────────────────────────── */
.account-menu {
  position: fixed; top: calc(var(--topbar-h) + 6px); right: 12px;
  width: 216px; z-index: 500;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: 0 16px 38px -16px rgba(35, 36, 29, .4);
  overflow: hidden;
}
.account-menu.hidden { display: none; }
.am-head { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.am-name { font-size: 12.5px; font-weight: 700; }
.am-mail { font-size: 10.5px; color: var(--text-3); margin-top: 2px; word-break: break-all; }
.am-row {
  display: block; width: 100%; text-align: left;
  font: inherit; font-size: 12.5px; font-weight: 500;
  background: none; border: none; color: var(--text);
  padding: 10px 14px; cursor: pointer;
}
.am-row:hover { background: var(--panel-2); }
.am-row.danger { color: var(--red); border-top: 1px solid var(--border); }

/* ── ACCOUNT WALL ────────────────────────────────────────────────────────────
   Shown when a signed-out visitor reaches for something that needs an account.
   It appears at the moment of the action, not at the door — see auth.js GATE. */
.account-wall {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(35, 36, 29, .45);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 24px;
}
.account-wall.hidden { display: none; }
.aw-card {
  position: relative;
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 30px 28px 24px;
  text-align: center;
  box-shadow: 0 30px 70px -28px rgba(35, 36, 29, .55);
}
.aw-x {
  position: absolute; top: 12px; right: 12px;
  border: none; background: none; cursor: pointer;
  font-size: 21px; line-height: 1; color: var(--text-3);
  padding: 5px 9px; border-radius: 7px;
}
.aw-x:hover { background: var(--panel-2); color: var(--text); }
.aw-mark {
  width: 26px; height: 26px; display: inline-block;
  border: 2px solid var(--text); border-radius: 50%;
  position: relative; margin-bottom: 14px;
}
.aw-mark::after {
  content: ""; position: absolute; top: 3px; left: 50%;
  width: 2px; height: 11px; background: var(--accent); border-radius: 2px;
  transform: translateX(-50%) rotate(18deg);
}
.aw-card h2 { font-size: 19px; font-weight: 700; margin-bottom: 9px; }
.aw-card p { font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.aw-actions { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 14px; }
.aw-btn {
  font: inherit; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-2); border-radius: 9px;
  padding: 11px 0; cursor: pointer; text-decoration: none;
  color: var(--text); background: var(--panel);
}
.aw-btn:hover { border-color: var(--text); }
.aw-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.aw-btn.primary:hover { background: var(--accent-h); }
.aw-fine { font-size: 11px; color: var(--text-3); }

/* ── MAPLIBRE CONTROLS ───────────────────────────────────────────────────────
   styles.css hardcodes rgba(13,15,20,.9) on the zoom/geolocate group rather
   than reading a token, so re-tokening the palette left these two buttons as
   the last dark object on a light map. Overridden here (matching !important,
   since that is what is being overridden) with the same paper-and-hairline
   treatment as every other floating control.

   MapLibre's own button icons are near-black SVGs designed for white
   controls, so they need no filter once the group stops being dark. */
.maplibregl-ctrl-group {
  background: var(--panel) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px -8px rgba(35, 36, 29, .45);
  backdrop-filter: none;
  overflow: hidden;
}
.maplibregl-ctrl-group button {
  background: transparent !important;
  color: var(--text) !important;
  width: 30px; height: 30px;
}
.maplibregl-ctrl-group button:hover { background: var(--panel-2) !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--border); }
.maplibregl-ctrl-group button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.maplibregl-ctrl-group button:disabled .maplibregl-ctrl-icon { opacity: .3; }

/* The wordmark is a link home now that the landing page IS the site root. */
a.topbar-left { text-decoration: none; color: inherit; }
a.topbar-left:hover .logo-text { color: var(--accent); }

/* Plan, in the account menu. Semantic colour, not decoration: free is neutral,
   a paid plan reads as the accent, and a lapsed one would show as free —
   planFor() already collapses past_due/canceled down, so the pill can never
   claim access the app is not actually granting. */
.am-plan { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.am-plan-pill {
  font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
  background: var(--panel-3); color: var(--text-2);
}
.am-plan-pill.plan-student,
.am-plan-pill.plan-pro,
.am-plan-pill.plan-team { background: var(--accent); color: #fff; }
.am-plan-note { font-size: 9.5px; color: var(--green); font-weight: 600; }
