/* Boundaries page: a map that fills the page, a small toolbar and a side panel. */
.desk.bd-desk { padding:0; overflow:hidden; }
.desk > .bd { max-width:none; }
.bd { position:absolute; inset:0; background:var(--paper); }
.bd-map { position:absolute; inset:0; }
.bd-map:focus-visible, .bd-map canvas:focus-visible { outline:3px solid var(--due); outline-offset:-3px; }
.bd button, .bd .bd-link, .bd select, .bd input[type=text] { min-height:44px; }
.bd .quiet, .bd .primary { padding:8px 14px; font-size:15px; }
.bd-link { display:inline-flex; align-items:center; text-decoration:none; }

.bd-bar { position:absolute; top:12px; left:12px; z-index:2; display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; max-width:calc(100% - 420px); padding:8px 12px; border:2px solid var(--ink); background:var(--card); box-shadow:4px 4px 0 rgba(34,41,31,.3); }
.bd .check { display:flex; align-items:center; gap:7px; min-height:44px; font-size:15px; cursor:pointer; }
.bd .check input { width:22px; height:22px; min-height:0; margin:0; padding:0; accent-color:var(--ink); }

.bd-panel { position:absolute; top:12px; right:12px; bottom:12px; z-index:2; width:376px; overflow-y:auto; padding:0 18px 26px; border:2px solid var(--ink); background:var(--card); box-shadow:7px 7px 0 rgba(34,41,31,.35); }
.bd-panel > * { margin-top:14px; margin-bottom:0; }
.bd-panel h2 { font-size:28px; }
.bd-panel .eyebrow { margin-top:18px; }
.bd-panel .eyebrow + h2 { margin-top:2px; }
.bd-panel > h2:first-child { margin-top:18px; }
.bd-panel p { margin-left:0; margin-right:0; }
.bd-head { position:relative; display:grid; grid-template-columns:auto 1fr; gap:14px; align-items:center; margin:0 -18px; padding:14px 48px 14px 18px; border-top:9px solid var(--s); border-bottom:2px solid var(--ink); }
.bd-head .numeral { font-size:52px; }
.bd-head .sub { margin:6px 0 0; white-space:normal; }
.bd-head .pill { padding:2px 8px; background:var(--s); color:#fff; font:700 14px var(--slab); }
.bd-head[data-state=due] .pill, .bd-head[data-state=never] .pill { color:var(--ink); }
.bd-head .close { width:44px; height:44px; top:4px; right:2px; }
.bd-title { display:block; font:700 20px var(--slab); }
.bd-draft { display:inline-block; padding:4px 10px; background:var(--due); color:var(--ink); font-weight:700; }
.bd-message { padding:10px 12px; border:2px solid var(--ink); font-weight:700; }
.bd-flash { background:#e4ecd7; }
.bd-message.error { background:#f7dfd8; border-color:var(--overdue); color:#7b2a1b; }

.bd-stats { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.bd-stat { padding:7px 0; border-bottom:1px solid var(--rule); }
.bd-stat dt { font-size:13px; color:var(--soft); }
.bd-stat dd { margin:0; font:700 21px var(--slab); }
.bd-was { font:400 13px var(--text); color:var(--soft); }

.bd-card { padding:12px 14px; border:1.5px solid var(--ink); background:var(--paper); }
.bd-card h3 { margin:0 0 6px; font-size:18px; }
.bd-card p { margin:8px 0 0; }
.bd-effects { margin:0; padding-left:18px; display:grid; gap:7px; font-size:15px; }
.bd-effects select { margin-top:6px; }
.bd-effects .bd-warn { list-style:none; margin-left:-18px; padding:8px 10px; border-left:6px solid var(--overdue); background:#f7dfd8; }
.bd-alert { display:block; margin-top:6px; color:#7b2a1b; font-weight:700; }
.bd-check { font-size:14px; color:var(--soft); }
.bd-check b { color:#3d5a24; }
.bd-hint { font-size:14px; }

.bd-field { display:grid; gap:4px; font-size:14px; color:var(--soft); }
.bd-save { display:grid; gap:10px; }
.bd .buttons { margin-top:0; }
.bd-save .buttons, .bd-corner .buttons { margin-top:2px; }
.bd-column { flex-direction:column; align-items:stretch; }
.bd-column button { text-align:left; }
.bd-confirm { padding:12px 14px; border:2px solid var(--overdue); background:#f7dfd8; }
.bd-confirm p { margin:0 0 10px; font-weight:700; }
.bd-corner { padding:10px 12px; border:1.5px solid var(--rule); }
.bd-corner p { margin:0 0 8px; }
.bd-tools { padding-top:14px; border-top:1px solid var(--rule); }
.bd-parts { margin-left:0; padding:0; list-style:none; display:grid; gap:6px; }
.bd-parts li { padding:8px 10px; border-left:6px solid var(--ink); background:var(--paper); }
.bd-parts li.part { border-left-color:var(--due); }
.bd-keep { margin-left:0; margin-right:0; padding:8px 12px; border:1.5px solid var(--rule); }
.bd-keep legend { padding:0 4px; font-size:14px; color:var(--soft); }

.bd-versions { padding-top:12px; border-top:1px solid var(--rule); }
.bd-versions summary { min-height:44px; display:flex; align-items:center; font:700 18px var(--slab); list-style-position:inside; }
.bd-versions summary::before { content:"+"; width:22px; font-size:22px; }
.bd-versions[open] summary::before { content:"\2212"; }
.bd-versions summary::-webkit-details-marker { display:none; }
.bd summary:focus-visible, .bd-stamp:focus-visible { outline:3px solid var(--due); outline-offset:1px; }
.bd-foot { padding-top:12px; border-top:1px solid var(--rule); font-size:14px; }
.bd-foot a { display:inline-block; padding:10px 2px; color:var(--ink); font-weight:700; }
.bd-version-list { margin:8px 0 0; padding:0; list-style:none; }
.bd-version-list li { padding:10px 0 12px 12px; border-left:4px solid var(--rule); border-bottom:1px solid var(--rule); }
.bd-version-list li.shown { border-left-color:#7b2a8a; }
.bd-version-list p { margin:0 0 6px; }
.bd-note { padding:3px 8px; background:#efe7d0; }

.bd-stamp { min-width:28px; height:28px; padding:0 5px; border:1.5px solid var(--ink); border-radius:2px; background:var(--card); color:var(--ink); font:700 14px/22px var(--slab); cursor:pointer; box-shadow:2px 2px 0 var(--s,#888); }
.bd button.bd-stamp { min-height:28px; }
.bd-stamp:hover, .bd-stamp.on { background:var(--ink); color:var(--card); z-index:5; }
.bd-map.far .bd-stamp.town:not(.on) { display:none; }

@media (max-width:1180px) { .bd-panel { width:330px; } .bd-bar { max-width:calc(100% - 372px); } }
@media (max-width:820px) {
  .bd-bar { right:12px; max-width:none; }
  .bd-panel { top:auto; left:0; right:0; bottom:0; width:auto; max-height:52%; border-width:2px 0 0; box-shadow:none; }
}
