/*
 * Spark Pixel, the house UI standard, for RouteEngine.
 * Components rebuilt from the standard. Tokens are in tokens.css and the
 * sidebar in shell.css; templates/ui_base.html loads all three, no Bootstrap.
 * Append new components in a dated block at the end.
 */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
      stroke-linecap: round; stroke-linejoin: round; }
.ic.s16 { width: 16px; height: 16px; }
.ic.s20 { width: 20px; height: 20px; }
.ic.s14 { width: 14px; height: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

.topbar {
  position: sticky; top: 0; z-index: 1000; height: var(--bar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted); min-width: 0; white-space: nowrap; }
.crumbs a { color: var(--muted); }
.crumbs .here { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The hub, first in every breadcrumb */
.crumbs .crumb-home { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; flex: none;
                      border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.crumbs .crumb-home:hover { background: var(--surface-2); color: var(--ink); border-color: var(--accent); }
.bar-chips { display: flex; gap: 8px; margin: 0 auto; }
.bar-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.bar-chips + .bar-actions { margin-left: 0; }

.page { width: 100%; max-width: 1400px; margin: 0 auto; padding: 24px; font-size: calc(1rem + 1px); }

/* ------------------------------------------------------------ page head */
.head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.head-title { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 420px; }
.head h1 { font-size: calc(1.5rem + 1px); font-weight: 700; margin: 0 0 2px; line-height: 1.25; }
.head p { margin: 0; color: var(--muted); font-size: calc(0.9rem + 1px); }
.head-meta { margin-top: 6px; font-size: calc(0.78rem + 1px); color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.icon-tile { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none;
             background: var(--accent-soft); color: var(--accent-hover); }
.icon-tile.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-tile.good { background: var(--good-bg); color: var(--good-ink); }
.icon-tile.info { background: var(--info-bg); color: var(--info-ink); }
.icon-tile.fair { background: var(--fair-bg); color: var(--fair-ink); }
.icon-tile.poor { background: var(--poor-bg); color: var(--poor-ink); }
.icon-tile.grey { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------ stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
        border-top: 3px solid var(--accent); }
.stat:nth-child(2) { border-top-color: var(--good); }
.stat:nth-child(3) { border-top-color: var(--info); }
.stat:nth-child(4) { border-top-color: var(--fair); }
.stat:nth-child(n+5) { border-top-color: var(--grey); }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: calc(0.8rem + 1px); color: var(--ink-2); }
.stat-label .ic { width: 20px; height: 20px; color: var(--muted); }
.stat-value { font-size: calc(1.6rem + 1px); font-weight: 700; margin: 6px 0 2px; line-height: 1.2; }
.stat-note { font-size: calc(0.78rem + 1px); color: var(--muted); }

/* ------------------------------------------------------------ cards */
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card + .card { margin-top: 16px; }
.grid-2-1 > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: calc(1rem + 1px); font-weight: 600; margin: 0; }
.card-head .sub { font-size: calc(0.78rem + 1px); color: var(--muted); }
.card-head .ctrl { margin-left: auto; display: flex; gap: 8px; }

/* App launcher tiles inside a card */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.app { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
       color: var(--ink); background: var(--surface); transition: border-color .15s, background .15s; min-width: 0; }
a.app:hover { border-color: var(--accent); background: #fcfaff; color: var(--ink); }
.app-body { min-width: 0; }
.app-title { font-weight: 600; font-size: calc(0.92rem + 1px); display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.app-title .chip { flex: none; margin-top: 1px; }
.app-desc { font-size: calc(0.8rem + 1px); color: var(--muted); margin-top: 2px;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Compact list */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; font-size: calc(0.86rem + 1px); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.list .hint { font-size: calc(0.76rem + 1px); color: var(--muted); }
.list .num { font-size: calc(0.82rem + 1px); color: var(--ink-2); text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------ chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
        border: 1px solid var(--line); background: var(--surface); font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.chip b { font-weight: 700; color: var(--ink); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.chip.st { height: 22px; padding: 0 8px; font-size: 0.72rem; font-weight: 600; border: 0; }
.chip.st.good { background: var(--good-bg); color: var(--good-ink); }
.chip.st.fair { background: var(--fair-bg); color: var(--fair-ink); }
.chip.st.poor { background: var(--poor-bg); color: var(--poor-ink); }
.chip.st.info { background: var(--info-bg); color: var(--info-ink); }
.chip.st.grey { background: var(--surface-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ------------------------------------------------------------ buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h);
       padding: 0 14px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface);
       color: var(--ink); font-size: 0.88rem; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none;
       vertical-align: middle; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.danger { color: var(--poor-ink); }
.btn.danger.primary { background: var(--poor); border-color: var(--poor); color: #fff; }
.btn.small { height: 30px; padding: 0 10px; font-size: 0.8rem; }
.btn.icon { width: var(--control-h); padding: 0; }
.btn.icon.small { width: 30px; }
/* A secondary button in the accent's high contrast tints, never white (owner, 9 November 2026): the
   primary is filled accent, a second action takes .tone, a destructive one .tone.danger. */
.btn.tone { background: var(--accent-soft); border-color: #d9c8fb; color: var(--accent-hover); font-weight: 600; }
.btn.tone:hover { background: #e4d6fd; border-color: var(--accent); color: var(--accent-hover); }
.btn.tone.danger { background: var(--poor-bg); border-color: #f5c2c2; color: var(--poor-ink); }
.btn.tone.danger:hover { background: #fadada; border-color: var(--poor); color: var(--poor-ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.input, select.input, textarea.input { height: var(--control-h); padding: 0 12px; border: 1px solid var(--line-strong);
         border-radius: var(--radius-s); background: var(--surface); width: 100%; font-size: 0.9rem; }
textarea.input { height: auto; padding: 8px 12px; resize: vertical; }
.input:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; height: var(--control-h); }
.seg label { display: flex; align-items: center; padding: 0 12px; font-size: 0.84rem; cursor: pointer; border-left: 1px solid var(--line-strong); }
.seg label:first-of-type { border-left: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--accent-hover); font-weight: 600; }
.seg label:has(input:checked) { background: var(--accent-soft); }

.drop { display: block; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; text-align: center;
        color: var(--muted); font-size: 0.86rem; cursor: pointer; background: var(--surface-2); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.drop strong { color: var(--ink); display: block; margin-bottom: 4px; }

/* ------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; position: relative; }  /* holds a hidden header label, or it widens the page */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: calc(0.7rem + 1px); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; color: var(--muted);
          background: var(--surface-2); text-align: left; padding: 9px 12px; white-space: nowrap; }
.tbl th:first-child { border-top-left-radius: var(--radius-s); }
.tbl th:last-child { border-top-right-radius: var(--radius-s); }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line); font-size: calc(0.82rem + 1px); vertical-align: middle; }
.tbl tr:hover td { background: #fafbfc; }
.tbl .r { text-align: right; }
.tbl .name { font-weight: 600; color: var(--ink); display: inline-block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ------------------------------------------------------------ empty state, toast, modal */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .icon-tile { margin: 0 auto 12px; }
.empty-state h3 { font-size: calc(1rem + 1px); margin: 0 0 4px; }
.empty-state p { color: var(--muted); margin: 0 auto 16px; max-width: 460px; }

.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 3000; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 420px; padding: 12px 14px;
         background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--info);
         border-radius: var(--radius-s); box-shadow: 0 8px 24px rgba(17, 24, 39, .12); font-size: 0.86rem; }
.toast.good { border-left-color: var(--good); }
.toast.poor { border-left-color: var(--poor); }
.toast.fair { border-left-color: var(--fair); }
.toast .grow { flex: 1; }
.toast .bar { height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.toast .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--accent-soft); border-top-color: var(--accent);
           border-radius: 50%; animation: spin .8s linear infinite; flex: none; margin-top: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.sl-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: none; align-items: center;
              justify-content: center; z-index: 2500; padding: 16px; }
.sl-overlay.open { display: flex; }
.sl-modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 520px; padding: 22px;
            box-shadow: 0 24px 48px rgba(17, 24, 39, .2); max-height: calc(100vh - 32px);
            max-height: calc(100dvh - 32px); overflow-y: auto; }
.sl-modal h3 { font-size: 1.1rem; margin: 0 0 6px; }
.sl-modal > p { color: var(--muted); margin: 0 0 16px; font-size: 0.9rem; }
.sl-modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

[data-tip] { cursor: help; }
.tip { position: fixed; z-index: 4000; max-width: 280px; padding: 8px 10px; border-radius: var(--radius-s);
       background: var(--ink); color: #fff; font-size: 0.78rem; line-height: 1.4; pointer-events: none; }
/* Help (ui.js UI.help, UI.richTip): a question mark with a short tip on hover, or a rich tip on click. */
.help-q { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0;
          background: none; color: var(--muted); cursor: help; vertical-align: middle; flex: none; }
.help-q svg { width: 14px; height: 14px; }
.help-q:hover, .help-q:focus-visible { color: var(--accent); }
.rich-tip { position: fixed; z-index: 4000; width: 300px; max-width: calc(100vw - 16px); padding: 14px; background: var(--surface);
            border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(17, 24, 39, .18);
            font-size: 0.78rem; line-height: 1.45; color: var(--ink-2); }
.rich-tip h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 0.84rem; color: var(--ink); }
.rich-tip .rt-rows { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; font-variant-numeric: tabular-nums; }
.rich-tip .rt-rows b { color: var(--ink); text-align: right; white-space: nowrap; }
.rich-tip .rt-rows small { display: block; color: var(--muted); font-size: 0.72rem; }
.rich-tip .rt-total { border-top: 1px solid var(--line); padding-top: 7px; font-weight: 600; color: var(--ink); }
.rich-tip .rt-foot { margin-top: 10px; font-size: 0.72rem; color: var(--muted); }
/* Where a value comes from (8 November 2026): Standard, the organization's; Route and Building, set closer to the
   work, which win in that order. One look everywhere a value says its source. */
.src { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 0.68rem;
       font-weight: 600; white-space: nowrap; flex: none; }
.src .ic, .src svg { width: 12px; height: 12px; }
.src.std { background: #e8f7ee; color: #15803d; box-shadow: inset 0 0 0 1px #bfe6cd; }
.src.route { background: var(--accent-soft); color: #6d28d9; box-shadow: inset 0 0 0 1px #d9c8fb; }
.src.bld { background: var(--fair-bg); color: var(--fair-ink); box-shadow: inset 0 0 0 1px #fcd34d; }
.src.bld.proposed { background: var(--surface); }
/* The example box (8 November 2026): a worked example, made up, never live figures; one a view. A dashed slate
   border on a pale slate ground, an Example pill, the case in a line, the terms as chips, the result dark,
   at most one quiet line to compare. */
.example { border: 1px dashed #cbd5e1; background: #f8fafc; border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px;
           color: #334155; font-size: 0.8rem; }
.example-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.example-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
                background: #e2e8f0; color: #334155; font-size: 0.66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.example-pill svg { width: 12px; height: 12px; }
.example-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.example-term { padding: 3px 8px; border-radius: 6px; background: #fff; border: 1px solid #e2e8f0; }
.example-result { padding: 3px 10px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; }
.example-note { color: #64748b; font-size: 0.76rem; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .bar-chips { display: none; }
}
@media (max-width: 900px) {
  .crumbs a, .crumbs > svg { display: none; }
  .crumbs a.crumb-home { display: inline-flex; padding: 0 7px; }
  .crumbs .crumb-home span { display: none; }
  .tbl th:first-child, .tbl td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .tbl th:first-child { background: var(--surface-2); }
  .tbl .name { max-width: 180px; }
  .topbar { padding: 0 12px; }
  .page { padding: 16px; }
  .sl-modal { max-width: none; }
  .bar-actions .btn .label { display: none; }
}

/* A thin meter under a stat: how much of an allowance is used */
.meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.notes { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.6; }

/* 2026-10-25: Settings, roles and access */
.bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.bulk .input { width: auto; max-width: 280px; }
.tbl .hint { font-size: calc(0.76rem + 1px); color: var(--muted); }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.perm-group { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.perm-group legend { font-size: calc(0.7rem + 1px); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.perm-grid { max-width: 720px; }
.perm-grid .c { text-align: center; width: 76px; }
.cap-app .perm-grid { width: auto; table-layout: fixed; }
.cap-app .perm-grid th:first-child, .cap-app .perm-grid td:first-child { width: 200px; }
@media (max-width: 600px) {
  .cap-app .perm-grid th:first-child, .cap-app .perm-grid td:first-child { width: 120px; }
  .cap-app .perm-grid .c { width: 56px; }
}
.cap-note { margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); }
.perm-grid input { accent-color: var(--accent); }
/* The capability matrix of a role (access/role.html): an app a block, its
   grid of things by actions, then its capabilities. */
.cap-app { padding: 16px 0; border-top: 1px solid var(--line); }
.cap-app:first-of-type { border-top: 0; padding-top: 4px; }
.cap-title { font-size: 0.95rem; font-weight: 600; margin: 0 0 10px; }
.cap-none { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line); vertical-align: middle; }
.cap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 24px; margin-top: 12px; max-width: 980px; }
.cap-head { grid-column: 1 / -1; font-size: calc(0.7rem + 1px); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; color: var(--muted); }
.check.cap > span { display: flex; flex-direction: column; gap: 2px; }
.check.cap b { font-weight: 600; }

/* Members: roles as chips; a member's page: what roles allow by application. */
.roles-cell { white-space: normal; }
.roles-cell .chip, .list .title.wrap .chip { margin: 2px 4px 2px 0; }
.role-where { margin-left: 4px; font-weight: 500; opacity: 0.85; }
.list .title.wrap { white-space: normal; }
.by-app { margin-top: 12px; }
.by-app td { vertical-align: top; }
.by-app .hint { margin-top: 4px; font-size: calc(0.74rem + 1px); color: var(--muted); max-width: 420px; }
.by-app-note { margin: 10px 0 0; font-size: calc(0.76rem + 1px); color: var(--muted); }

/* The organization a hub page's data belongs to, beside its title. */
.head-title h1 .org-tag { vertical-align: middle; margin-left: 10px; }
.org-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
           border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-hover);
           font-size: calc(0.78rem + 1px); font-weight: 500; text-decoration: none; white-space: nowrap; }
.org-tag b { font-weight: 700; }
a.org-tag:hover { background: var(--accent); color: #fff; }
.org-tag-k { opacity: 0.85; }
@media (max-width: 600px) { .org-tag-k { display: none; } }

/* Shares: readers as chips with a remove button, a person added beside them. */
.chip-form { display: inline; }
.chip-x { display: inline-flex; align-items: center; margin: 0 -4px 0 2px; padding: 2px; border: 0; background: none;
          color: inherit; cursor: pointer; border-radius: 999px; }
.chip-x .ic { width: 12px; height: 12px; }
.chip-x:hover { background: rgba(0, 0, 0, 0.08); }
.reader-add { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.reader-add .input { max-width: 240px; height: 30px; }
.tbl tr.muted td { color: var(--muted); }
#new-share .kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }

/* Style card (.stylepop): a card of a layer's or a piece's look, opened
   from a style button. One component for every app: GIS Analysis builds it
   in editor.js, Territory planning through static/js/stylecard.js.
   Moved here from GIS Analysis's editor.css on 26 October 2026, unchanged. */
.stylepop { position: fixed; z-index: 2100; width: 300px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17, 24, 39, .16);
            padding: 14px 16px; font-size: 0.86rem; }
.stp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.stp-head .muted { font-size: 0.8rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stp-head .btn { margin-left: auto; }
.stp-sec { border-top: 1px solid var(--line); padding: 12px 0 2px; margin-top: 10px; }
.stp-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.stylepop .seg { height: 32px; width: 100%; }
.stylepop .seg label { flex: 1; justify-content: center; padding: 0 6px; font-size: 0.78rem; white-space: nowrap; }
.stp-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.78rem; color: var(--ink-2); cursor: pointer; }
.stp-row input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: none; cursor: pointer; flex: none; }
.stp-range { display: block; margin-top: 12px; }
.stp-range-top { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-2); margin-bottom: 2px; }
.stp-range input { width: 100%; accent-color: var(--accent); }
.stylepop .dim { opacity: .45; }
.stylepop .check { margin-bottom: 6px; }
/* A legend row whose swatch picks its colour (the Buildings layer's classes, in both map apps). */
.stylepop .bld-pick-row { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 0.78rem; color: var(--ink-2); cursor: pointer; }
.stylepop .stp-legend-row input.bld-pick { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; flex: none;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .25); }
.stylepop input.bld-pick::-webkit-color-swatch-wrapper { padding: 0; }
.stylepop input.bld-pick::-webkit-color-swatch { border: 0; border-radius: 4px; }
.stylepop input.bld-pick::-moz-color-swatch { border: 0; border-radius: 4px; }
.stylepop .bld-pick-row:hover .stp-legend-name { color: var(--ink); }
.stylepop .bld-reset { margin-top: 6px; }
.stylepop .hint { font-size: 0.74rem; color: var(--muted); }
.stp-reset { margin-top: 12px; width: 100%; }
.stp-note { margin: -4px 0 8px; font-size: 0.74rem; color: var(--muted); }
.stylepop .seg.grid2 { display: grid; grid-template-columns: 1fr 1fr; height: auto; }
.stylepop .seg.grid2 label { height: 30px; border-left: 0; }
.stylepop .seg.grid2 label:nth-child(even) { border-left: 1px solid var(--line-strong); }
.stylepop .seg.grid2 label:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
.stp-colour { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.8rem; color: var(--ink-2); }
.stp-colour input[type=color] { width: 36px; height: 26px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
/* Style card choices without boxed borders (26 October 2026): previews to
   pick from, and a plain list with the current one ticked. */
.stp-swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.stp-swatch { display: grid; justify-items: center; gap: 4px; width: 49px; padding: 4px 0 2px; border: 0; border-radius: 8px;
              background: none; cursor: pointer; font: inherit; color: var(--ink-2); }
.stp-swatch:hover { background: var(--surface-2); }
.stp-swatch-tile { display: block; width: 40px; height: 28px; border-radius: 6px; overflow: hidden; background: var(--surface);
                   box-shadow: inset 0 0 0 1px var(--line); }
.stp-swatch-tile canvas, .stp-swatch-tile svg { display: block; width: 100%; height: 100%; }
.stp-swatch-name { font-size: 0.72rem; line-height: 1.1; }
.stp-swatch[aria-checked="true"] { color: var(--accent-hover); font-weight: 600; }
.stp-swatch[aria-checked="true"] .stp-swatch-tile { box-shadow: 0 0 0 2px var(--accent); }
.stp-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stp-list { display: grid; gap: 2px; }
.stp-list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 32px; padding: 0 10px;
                border: 0; border-radius: 8px; background: none; cursor: pointer; font: inherit; font-size: 0.82rem;
                color: var(--ink-2); text-align: left; }
.stp-list-row:hover { background: var(--surface-2); color: var(--ink); }
.stp-list-row .ic { visibility: hidden; color: var(--accent); flex: none; }
.stp-list-row[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.stp-list-row[aria-checked="true"] .ic { visibility: visible; }
.stp-list-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.stp-foot { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.stp-foot .btn { flex: 1; justify-content: center; }
.stp-foot.asking { display: grid; gap: 8px; font-size: 0.8rem; color: var(--ink-2); }
.stp-foot.asking > div { display: flex; gap: 8px; }
.stp-foot.asking .btn { flex: 1; }

/* Map labels (names and FSA codes on a map), one look for every map app.
   Moved here from GIS Analysis's editor.css on 26 October 2026, unchanged. */
.leaflet-tooltip.map-label { background: rgba(255, 255, 255, .86); border: 0; border-radius: 4px; box-shadow: none; padding: 0 5px;
                             font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.leaflet-tooltip.map-label::before { display: none; }
.leaflet-tooltip.map-label.fsa { color: var(--info-ink); background: rgba(255, 255, 255, .72); font-family: var(--mono); font-size: 10.5px; }
.leaflet-tooltip.map-label.fsa.served { color: var(--info-ink); background: var(--info-bg); font-weight: 700; }
/* A building's name on record (BuildingLook.labels, both map apps; UAT, 10 November 2026): a callout as
   in-car navigation names streets, a slate pill ringed in white with a tail leaning down from its lower
   right, so it reads over satellite imagery as well as over street maps. The label is anchored left of
   its point (direction 'left') and the margins put the tail's tip on it; the label is one line, so its
   height, and with it the offset, stays the same. The tail is two triangles: white beneath, slate over
   it and over the pill's border, which opens the border where the tail leaves it. */
.leaflet-tooltip.map-label.bld-name { background: #3d4757; color: #fff; border: 1.5px solid #fff; border-radius: 8px;
                                      padding: 2px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
                                      box-shadow: 0 1px 4px rgba(17, 24, 39, .35); margin: -21px 0 0 12px; }
.leaflet-tooltip.map-label.bld-name::before,
.leaflet-tooltip.map-label.bld-name::after { display: block; content: ""; position: absolute; left: auto; margin: 0; border: 0;
                                             clip-path: polygon(0 0, 100% 0, 100% 100%); }
.leaflet-tooltip.map-label.bld-name::before { top: 100%; right: 9px; width: 13px; height: 12px; background: #fff; }
.leaflet-tooltip.map-label.bld-name::after { top: calc(100% - 1.5px); right: 11px; width: 8.5px; height: 9px; background: #3d4757; }


/* ---- The data calendar (static/js/datacal.js; UAT, 28 October 2026): days of data
   sets to choose, for GIS Analysis's hub layers and Territory planning. */
.dcal { display: flex; flex-direction: column; gap: 8px; }
.dcal-where, .dcal-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dcal-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-right: 2px; min-width: 72px; }
.dcal .chip { height: 26px; font-size: calc(0.76rem + 1px); cursor: pointer; }
.dcal-bar { display: flex; align-items: center; justify-content: center; gap: 8px; }
.dcal-prev svg { transform: rotate(180deg); }
.dcal-month { min-width: 150px; text-align: center; font-size: calc(0.92rem + 1px); }
.dcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
/* Weekday headings are buttons that look like it: a click chooses every such day of the month. */
.dcal-grid.loading { opacity: 0.45; pointer-events: none; transition: opacity 0.15s 0.1s; }
.dcal-wd { all: unset; box-sizing: border-box; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
           color: var(--accent); text-align: center; padding: 4px 0; border: 1px solid var(--line); border-radius: 999px;
           background: var(--surface); cursor: pointer; }
.dcal-wd:hover { color: var(--accent-hover); background: var(--accent-soft); border-color: var(--accent); }
.dcal-wd.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.dcal-wd.empty { color: var(--muted); background: none; border-color: transparent; cursor: default; }
.dcal-cell.has.col { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dcal-wd:focus-visible, .dcal-cell.has:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dcal-cell { all: unset; box-sizing: border-box; height: 54px; overflow: hidden; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius-s);
             display: flex; flex-direction: column; gap: 1px; font-size: 0.72rem; color: var(--muted); background: var(--surface-2); }
.dcal-cell.blank { border-color: transparent; background: none; }
.dcal-cell.has { cursor: pointer; color: var(--ink); background: var(--surface); }
.dcal-cell.has:hover { border-color: var(--accent); }
.dcal-cell.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dcal-n { font-weight: 600; font-size: 0.76rem; }
.dcal-c { font-variant-numeric: tabular-nums; font-weight: 600; }
.dcal-s { font-variant-numeric: tabular-nums; opacity: 0.8; }
.dcal .hint { font-size: calc(0.76rem + 1px); color: var(--muted); line-height: 1.4; }
.dcal-hint { margin: 0; }
.dcal-sum { font-size: calc(0.8rem + 1px); color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 20px; }
.dcal-sum .hint { margin-top: 2px; }
@media (max-width: 600px) {
  .dcal-cell { height: 40px; padding: 3px; }
  .dcal-s { display: none; }
  .dcal-label { min-width: 0; width: 100%; }
}

/* ------------------------------------------------------------ usage badge (5 November 2026)
 * The platform admin's badge at the right of the top bar: the free allowance
 * nearest its end, and a click opens this month's usage by provider
 * (static/js/usage-badge.js). A meter takes its status colour. */
.meter.good i { background: var(--good); }
.meter.fair i { background: var(--fair); }
.meter.poor i { background: var(--poor); }
.usage-badge { position: relative; flex: none; }
.usage-btn .chip { height: 20px; }
.usage-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 2100; width: 360px; max-width: calc(100vw - 24px);
             max-height: calc(100vh - var(--bar-h) - 24px); overflow-y: auto; background: var(--surface);
             border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17, 24, 39, .16);
             padding: 14px 16px; font-size: 0.84rem; }
.up-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.up-head .muted { font-size: 0.8rem; }
.up-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.up-title { display: flex; justify-content: space-between; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
            font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.up-row { padding: 4px 0; }
.up-top { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.up-top b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.up-row .meter { margin: 5px 0 3px; }
.up-note { font-size: 0.74rem; color: var(--muted); }
.up-foot { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.up-foot p { margin: 0 0 10px; font-size: 0.74rem; }
.up-links { display: flex; gap: 8px; }
/* Background jobs, above the usage (7 November 2026): every organization's, the platform admin's alone */
.usage-jobs { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; color: var(--accent); }
.usage-jobs[hidden] { display: none; }
.usage-jobs .spinner { width: 12px; height: 12px; margin: 0; }
.up-job + .up-job { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; }
.up-label { min-width: 0; overflow-wrap: anywhere; }
.up-job .up-top .chip { flex: none; }
.up-jfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.up-jfoot .btn { flex: none; }
.up-warn { color: var(--fair-ink); }
.up-none { margin: 2px 0 0; }
.up-sub { margin-top: 10px; }
/* A meter with its share beside it, in a table cell */
.meter-row { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.meter-row .meter { flex: 1; margin: 0; }
@media (max-width: 600px) {
  /* A phone's bar (7 November 2026): what the page's left menu also offers (`.in-menu`) waits there, the
   * usage badge is its share alone, and the bar's gaps narrow, so the bar keeps to the screen. */
  .topbar { gap: 8px; }
  .bar-actions { gap: 6px; }
  .bar-actions .in-menu, .bar-actions .bar-more { display: none; }
  .bar-actions .bar-more-btn { display: inline-flex; }
  .usage-btn { padding: 0 8px; gap: 4px; }
  .usage-btn > .ic { display: none; }
  .usage-word { display: none; }
  .usage-pop { position: fixed; left: 12px; right: 12px; top: calc(var(--bar-h) + 4px); width: auto; max-width: none; }
}

/* ------------------------------------------------------------ top bar search and account (6 November 2026)
 * The search (static/js/topbar.js) sits at the right, before the actions (11 November 2026):
 * a field shaped button that opens the palette, an icon alone on pages whose
 * bar carries chips and under 1100 px. The account menu is the avatar at the
 * far right. */
.kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid var(--line-strong);
       border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--muted);
       font: 600 0.68rem/1 var(--font); letter-spacing: 0.02em; white-space: nowrap; }
.bar-find { display: flex; align-items: center; gap: 10px; flex: 0 1 320px; min-width: 0; height: var(--control-h);
            margin: 0 0 0 auto; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px;
            background: var(--surface-2); color: var(--muted); font-size: 0.86rem; cursor: pointer; text-align: left;
            transition: border-color .15s, background .15s; }
.bar-find:hover { border-color: var(--line-strong); background: var(--surface); color: var(--ink-2); }
.bar-find:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar-find-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-find + .bar-actions { margin-left: 0; }
.bar-chips ~ .bar-find { flex: none; width: var(--control-h); margin: 0; padding: 0; justify-content: center; background: var(--surface); }
.bar-chips ~ .bar-find .bar-find-text, .bar-chips ~ .bar-find .kbd { display: none; }

/* Needs attention (11 November 2026): the bell, for everyone signed in (static/js/topbar.js). Its badge
 * counts what waits; a ring turns while the person's work runs in the background. */
.bell { position: relative; flex: none; }
.bell-btn { position: relative; }
.bell-n { position: absolute; top: -4px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
          background: var(--fair); color: #1c1917; font-size: 0.72rem; font-weight: 800; line-height: 19px; text-align: center;
          box-shadow: 0 0 0 2px var(--surface); }
.bell-n[hidden] { display: none; }
.bell.going .bell-btn::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 2px solid transparent;
                               border-top-color: var(--accent); animation: bell-spin 1s linear infinite; pointer-events: none; }
@keyframes bell-spin { to { transform: rotate(360deg); } }
.bell-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 2100; width: 380px; max-width: calc(100vw - 24px);
            max-height: calc(100vh - var(--bar-h) - 24px); overflow-y: auto; background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17, 24, 39, .16);
            padding: 8px; font-size: 0.94rem; line-height: 1.4; }
.bp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 8px 8px; }
.bp-head b { color: var(--ink); }
.bp-head .muted { font-size: 0.86rem; }
.bp-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: var(--radius-s); color: var(--ink); }
.bp-row + .bp-row { border-top: 1px solid var(--line); }
a.bp-row:hover { background: var(--surface-2); color: var(--ink); }
a.bp-row:hover, a.bp-row:hover + .bp-row { border-top-color: transparent; }
.bp-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bp-title { font-weight: 650; color: var(--ink); }
.bp-text { font-size: 0.88rem; color: var(--ink-2); }
.bp-cta { flex: none; align-self: center; font-size: 0.88rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.bp-row .meter { margin-top: 6px; }
.bp-row.running .spinner { width: 18px; height: 18px; flex: none; margin: 2px 4px 0; border: 2px solid var(--accent-soft);
                           border-top-color: var(--accent); border-radius: 50%; animation: bell-spin .8s linear infinite; }
.bp-empty { padding: 18px 8px; color: var(--muted); text-align: center; }
.bp-clear { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; padding: 12px; border-radius: var(--radius-s);
            background: var(--good-bg); color: var(--good-ink); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .bell.going .bell-btn::after, .bp-row.running .spinner { animation: none; } }

.acct { position: relative; flex: none; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line); }
.acct-btn { display: grid; place-items: center; width: var(--control-h); height: var(--control-h); padding: 0; border: 0;
            border-radius: 50%; background: none; cursor: pointer; }
.acct-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
          background: linear-gradient(135deg, #1c2b4d, #3b2388); color: #fff; font-size: 0.78rem; font-weight: 700;
          letter-spacing: 0.02em; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.acct-btn:hover .avatar, .acct-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.avatar.lg { width: 42px; height: 42px; font-size: 0.92rem; box-shadow: none; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 12px); z-index: 2100; width: 290px; background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17, 24, 39, .16);
            padding: 8px; font-size: 0.86rem; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.acct-who { min-width: 0; display: flex; flex-direction: column; }
.acct-who b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who span { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-org { display: flex; align-items: center; gap: 8px; margin: 0 2px 6px; padding: 9px 10px; border-radius: var(--radius-s);
            background: var(--surface-2); color: var(--ink-2); font-size: 0.82rem; }
.acct-org:hover { background: var(--accent-soft); color: var(--accent-hover); }
.acct-org span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-more { color: var(--accent); font-weight: 600; font-size: 0.78rem; }
.acct-links { display: flex; flex-direction: column; padding: 2px 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.acct-links a, .acct-out button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-s);
                                 color: var(--ink-2); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font-size: 0.86rem; }
.acct-links a:hover, .acct-out button:hover { background: var(--surface-2); color: var(--ink); }
.acct-links .ic, .acct-out .ic { color: var(--muted); }
.acct-out { margin: 4px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }

/* The search palette */
.finder { position: fixed; inset: 0; z-index: 3000; background: rgba(17, 24, 39, .32); display: flex; justify-content: center;
          align-items: flex-start; padding: 12vh 16px 16px; }
.finder-open { overflow: hidden; }
.finder-box { width: 640px; max-width: 100%; max-height: 76vh; display: flex; flex-direction: column; background: var(--surface);
              border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 64px rgba(17, 24, 39, .28); overflow: hidden; }
.finder-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--muted); }
.finder-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 1.02rem; color: var(--ink); }
.finder-input input::placeholder { color: var(--muted); }
.finder-list { overflow-y: auto; padding: 6px 8px 8px; min-height: 120px; }
.finder-group + .finder-group { margin-top: 4px; }
.finder-label { padding: 10px 10px 6px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.finder-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--ink); scroll-margin: 8px; }
.finder-item.on { background: var(--accent-soft); color: var(--ink); }
.finder-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none;
             background: var(--surface-2); color: var(--muted); }
.finder-ic.maps { background: var(--accent-soft); color: var(--accent-hover); }
.finder-ic.plans, .finder-ic.terminals { background: var(--good-bg); color: var(--good-ink); }
.finder-ic.facilities { background: var(--info-bg); color: var(--info-ink); }
/* A map's own search (gis_analysis_app/js/mapfind.js): tints mark the kind found. */
.finder-ic.layers { background: var(--accent-soft); color: var(--accent-hover); }
.finder-ic.routes { background: var(--good-bg); color: var(--good-ink); }
.finder-ic.areas, .finder-ic.stops { background: var(--fair-bg); color: var(--fair-ink); }
.finder-words { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.finder-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-hint { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-go { color: var(--muted); opacity: 0; display: flex; }
.finder-item.on .finder-go { opacity: 1; color: var(--accent); }
.finder-empty, .finder-note { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 0.86rem; }
.finder-note { padding: 10px 12px 4px; font-size: 0.78rem; }
.finder-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2);
               font-size: 0.76rem; color: var(--muted); }
.finder-foot span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 1100px) {
  .bar-find { flex: none; width: var(--control-h); margin: 0 0 0 auto; padding: 0; justify-content: center; background: var(--surface); }
  .bar-find .bar-find-text, .bar-find .kbd { display: none; }
}
@media (max-width: 600px) {
  .acct { padding-left: 8px; margin-left: 0; border-left: 0; }
  .bell-pop { position: fixed; left: 12px; right: 12px; top: calc(var(--bar-h) + 4px); width: auto; max-width: none; }
  .finder { padding: 8px; }
  .finder-box { max-height: calc(100vh - 16px); }
  .finder-foot { display: none; }
}

/* ------------------------------------------------------------ data sources (6 November 2026)
 * Settings, Data sources (datahub/data_sources.html). .seg.tabs: the segmented control made of
 * links, for two to five pages of one section (Sources, Provider accounts); the page shown is
 * .on. Not for views inside one page (a plain .seg). .src: a source's card, its facts as two
 * columns of label and value. */
.seg.tabs { margin-bottom: 16px; }
.seg.tabs a { display: flex; align-items: center; padding: 0 14px; font-size: calc(0.84rem + 1px); color: var(--ink-2);
              border-left: 1px solid var(--line-strong); }
.seg.tabs a:first-child { border-left: 0; }
.seg.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.seg.tabs a.on { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
@media (max-width: 600px) {
  .seg.tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg.tabs::-webkit-scrollbar { display: none; }
  .seg.tabs a { flex: none; white-space: nowrap; padding: 0 12px; }
}
.src-tbl .src-group td { background: var(--surface-2); font-size: calc(0.7rem + 1px); text-transform: uppercase;
                         letter-spacing: 0.04em; font-weight: 600; color: var(--muted); padding: 7px 12px; }
.src-tbl .src-sum { font-size: calc(0.76rem + 1px); color: var(--muted); max-width: 300px; overflow: hidden;
                    text-overflow: ellipsis; white-space: nowrap; }
.src-tbl td.r .src-sum { max-width: none; }
.src-tbl .src-lic { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-tbl .meter-row { justify-content: flex-end; min-width: 120px; }
.card.src { scroll-margin-top: calc(var(--bar-h) + 16px); }
.card.src:target { border-color: var(--accent); }
.src-note { margin: -4px 0 16px; padding: 10px 12px; border-radius: var(--radius-s); font-size: calc(0.82rem + 1px);
            background: var(--surface-2); color: var(--ink-2); }
.src-note.fair { background: var(--fair-bg); color: var(--fair-ink); }
.src-note.poor { background: var(--poor-bg); color: var(--poor-ink); }
.src-note.good { background: var(--good-bg); color: var(--good-ink); }
.src-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; }
.src-facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0; align-content: start; }
.src-facts dt { font-size: calc(0.72rem + 1px); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
                color: var(--muted); padding-top: 2px; }
.src-facts dd { margin: 0; font-size: calc(0.82rem + 1px); color: var(--ink); min-width: 0; }
.src-facts dd > ul:not(.src-list) { margin: 0; padding-left: 18px; }
.src-facts dd > ul:not(.src-list) li + li { margin-top: 2px; }
.src-list { list-style: none; margin: 6px 0 0; padding: 0; }
.src-facts dd > .src-list:first-child { margin-top: 0; }
.src-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0;
               border-top: 1px solid var(--line); }
.src-list li:first-child { border-top: 0; }
.src-list li > span:first-child { min-width: 0; }
.src-list .src-use { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.src-list .src-use .meter-row { min-width: 0; }
.src-list .src-use .meter { width: 60px; flex: none; }
.src-more { margin-top: 6px; font-size: calc(0.78rem + 1px); }
@media (max-width: 1100px) {
  .src-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .src-facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .src-facts dd { margin-bottom: 8px; }
  .src-list li { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ service pills and provider tiles (6 November 2026)
 * Settings, Data sources and Provider accounts. .svc: what a source serves, one icon and colour
 * a kind wherever it shows (sources.SERVICE_LOOK through datahub/_svc.html): addresses, routing,
 * map tiles, open data. These tints mark a kind of service, never a state; state stays with the
 * status chips. .svc.only is the icon alone, its name on hover, for table cells. .prov: a
 * provider's tile, its first letter on a neutral square, the same on both tabs. .bar-c: the bar
 * column of the standard, relative size across rows. */
:root {
  --svc-addr: #0e7490; --svc-addr-bg: #e3f4f8;
  --svc-route: #4338ca; --svc-route-bg: #eceefd;
  --svc-tiles: #0f766e; --svc-tiles-bg: #e2f4f1;
  --svc-data: #475569; --svc-data-bg: #eef1f5;
}
.svc { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px;
       font-size: calc(0.72rem + 1px); font-weight: 600; white-space: nowrap; line-height: 1; }
.svc .ic { width: 14px; height: 14px; flex: none; }
.svc.addr { background: var(--svc-addr-bg); color: var(--svc-addr); }
.svc.route { background: var(--svc-route-bg); color: var(--svc-route); }
.svc.tiles { background: var(--svc-tiles-bg); color: var(--svc-tiles); }
.svc.data { background: var(--svc-data-bg); color: var(--svc-data); }
.svc.only { width: 26px; padding: 0; justify-content: center; }
.prov { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px;
        border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
        font-weight: 700; font-size: 1rem; }
.prov.sm { width: 24px; height: 24px; border-radius: 6px; font-size: 0.72rem; }
.svc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; }
.svc-row-label { font-size: calc(0.7rem + 1px); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
                 color: var(--muted); margin-right: 4px; }
.svc-row-link { margin-left: auto; font-size: calc(0.78rem + 1px); }
.pa-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.bar-c { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.bar-c > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* Provider accounts */
.stat-of { font-size: calc(0.9rem + 1px); font-weight: 600; color: var(--muted); }
.pa-serve .pa-svc { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pa-serve .pa-does { font-size: calc(0.74rem + 1px); color: var(--muted); }
.pa-serve .pa-who { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pa-serve .pa-src { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pa-serve .pa-src-name { font-weight: 500; }
.pa-serve th.pa-bar-h, .pa-serve td.pa-bar { width: 150px; }
.pa-serve tr.pa-missing td:first-child { box-shadow: inset 3px 0 0 var(--poor); }
.pa-prov .card-head .ctrl { display: flex; align-items: center; gap: 8px; }
.pa-prov .btn.add { color: var(--accent-hover); border-color: var(--accent); }
.pa-prov .btn.add:hover { background: var(--accent-soft); }
.pa-prov.retired { background: var(--surface-2); }
.pa-accts .pa-meta { display: flex; align-items: center; gap: 4px; font-size: calc(0.74rem + 1px); color: var(--muted); }
.pa-accts .pa-key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.pa-accts tr.pa-off td { color: var(--muted); }
.pa-accts tr.pa-off .svc { opacity: 0.55; }
.pa-actions { white-space: nowrap; }
.pa-actions form { display: inline; }
.pa-actions .btn { vertical-align: middle; }
.pa-empty, .pa-keyless { display: flex; align-items: center; gap: 8px; margin: 0; font-size: calc(0.82rem + 1px); color: var(--ink-2); }
.pa-empty { padding: 12px; border-radius: var(--radius-s); background: var(--fair-bg); color: var(--fair-ink); }
.pa-keyless { margin: 4px 0 16px; color: var(--muted); }
.pa-choose { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pa-choose .check { display: inline-flex; align-items: center; gap: 6px; }
.src-id { display: flex; align-items: center; gap: 10px; }
.src-id .pa-pills { margin-top: 3px; }
@media (max-width: 900px) {
  .pa-serve th.pa-bar-h, .pa-serve td.pa-bar { display: none; }
  .pa-prov .card-head { flex-wrap: wrap; }
  .pa-prov .card-head .ctrl { width: 100%; justify-content: flex-start; }
}
/* One set of columns for every provider's accounts table, so they line up card under card. */
.pa-accts { table-layout: fixed; min-width: 820px; }
.pa-accts th:nth-child(1) { width: 26%; }
.pa-accts th:nth-child(2) { width: 22%; }
.pa-accts th:nth-child(3) { width: 14%; }
.pa-accts th:nth-child(4) { width: 7%; }
.pa-accts th:nth-child(5) { width: 8%; }
.pa-accts td:first-child .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A loader's list on its source's card (the ODB's provinces, docs/BUILDINGS.md). */
.src-load { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.src-load-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.src-load-head h3 { margin: 0; font-size: calc(0.9rem + 1px); font-weight: 600; }
.src-load-head .muted { font-size: calc(0.78rem + 1px); }
.src-prov td .chip { margin-left: 4px; }
.src-prov .src-acts { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.src-prov .src-fit { white-space: nowrap; }
.src-load-head .fsa-acts { margin-left: auto; display: flex; gap: 6px; }
.fsa-rows { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fsa-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px; }
.fsa-row + .fsa-row { border-top: 1px solid var(--line); }
.fsa-row.waiting { background: var(--accent-soft); }
.fsa-k { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.fsa-v { font-size: 0.86rem; line-height: 1.5; min-width: 0; }
.fsa-v .muted { font-size: 0.8rem; }
.fsa-diff { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.fsa-codes { margin-top: 4px; font-size: 0.8rem; }
.fsa-codes code { display: inline-block; margin: 2px 3px 0 0; padding: 0 5px; border-radius: 4px; background: var(--panel, #fff); border: 1px solid var(--line); font-size: 0.75rem; }
.fsa-row .src-acts { display: flex; gap: 6px; white-space: nowrap; }
@media (max-width: 700px) { .fsa-row { grid-template-columns: 1fr; } .src-load-head .fsa-acts { margin-left: 0; } }

/* ------------------------------------------------------------ correcting a building (7 November 2026)
 * static/js/buildingfix.js, from a building's card in both map apps. */
.bfix .field { margin-bottom: 12px; }
.bfix textarea.input { padding: 8px 12px; resize: vertical; }
.bfix-error { color: var(--poor-ink); font-size: 0.85rem; margin: 4px 0 0; }
.bfix .actions .bfix-back { margin-right: auto; }
.bfix-btn { margin: 0 0 12px; }

/* The More button of a phone's bar and its menu (static/js/ui.js, barMore) */
.bar-more-btn { display: none; }
.bar-more-pop { position: fixed; z-index: 2100; min-width: 200px; padding: 6px; background: var(--surface);
                border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17, 24, 39, .16); font-size: 0.86rem; }
.bar-more-pop button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0;
                       border-radius: var(--radius-s); background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.bar-more-pop button:hover, .bar-more-pop button:focus-visible { background: var(--surface-2); color: var(--ink); }
.bar-more-pop .ic { color: var(--muted); }

/* A building with a stop time of its own on both map apps (BuildingLook.badges, roadmap step 4d). */
.bld-clock { display: flex; align-items: center; justify-content: center; border-radius: 50%;
             background: var(--surface); box-shadow: 0 1px 4px rgba(17, 24, 39, .35); }
.bld-clock svg { width: 14px; height: 14px; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.bld-clock.approved svg { stroke: var(--accent); }
.bld-clock.pending { background: var(--fair-bg); }
.bld-clock.pending svg { stroke: var(--fair-ink); }
/* A building's stop profile on its card (static/js/stopprofile.js). */
.sp-box { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
          display: flex; flex-direction: column; gap: 6px; font-size: calc(0.78rem + 1px); color: var(--ink-2); }
.sp-head b { color: var(--ink); font-weight: 600; }
.sp-own { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--ink); font-weight: 600; }
.sp-clock { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sp-clock.approved { background: var(--accent); }
.sp-clock.pending { background: var(--fair); }
.sp-who { color: var(--muted); font-size: calc(0.72rem + 1px); }
.sp-who.pending { color: var(--fair-ink); }
.sp-note { font-style: italic; }
.sp-model { color: var(--ink-2); }
.sp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sp-modal .hint { display: block; }
/* Its words 15% larger (owner, 9 November 2026): zoom scales the whole dialog, so its width here is
   1.15 times that on screen; its icons a further 13%, 30% in all. 820 px here are 943 on screen, 17% wider
   than before (UAT, 10 November 2026), so a week of hours fits a MacBook Pro 14 (1512 by 820) unscrolled. */
.sp-modal { max-width: 820px; zoom: 1.15; max-height: calc((100vh - 32px) / 1.15); }
.sp-modal .sflow-dot { width: 36px; height: 36px; }
.sp-modal .sflow-dot svg { width: 18px; height: 18px; }
.sp-modal .ic.s16, .sp-modal .sp-tabs .ic { width: 18px; height: 18px; }
.sp-modal .help-q svg { width: 14px; height: 14px; }
.sp-modal .sflow { margin: 4px 0 4px; }
.sp-flabel { display: flex; align-items: center; gap: 5px; }
.unit-in.sp-src .input::-webkit-inner-spin-button, .unit-in.sp-src .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.unit-in.sp-src .input { -moz-appearance: textfield; }
.unit-in.sp-src .input { padding-right: 116px; }
.unit-in.sp-src .src { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); }
.unit-in > span.unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.82rem; color: var(--muted); pointer-events: none; }
.sp-modal .example { margin: 2px 0 12px; }
/* A number field with its unit written inside it, at the right. */
.unit-in { position: relative; display: block; }
.unit-in .input { padding-right: 44px; }
.unit-in > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.82rem; color: var(--muted); pointer-events: none; }

/* How a stop's time is made (static/js/stopflow.js): the courier's way in four steps, each with its minutes
   and a question mark. The parts keep the hub charts' categorical slots: the walk 3, to the door 1, at the
   door 2. A part something closer to the work set (a building's time) is ringed in amber. */
.sflow { display: flex; align-items: flex-start; padding: 12px 4px 10px; border-radius: 10px; background: var(--bg); }
.sflow-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.sflow-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e5e7eb; color: var(--ink-2); }
.sflow-dot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sflow-step.walk .sflow-dot { background: #e3f6ee; color: #11845a; }
.sflow-step.door .sflow-dot { background: #e6effb; color: #1f5fae; }
.sflow-step.at .sflow-dot { background: #fdece4; color: #b94a1c; }
.sflow-step.set .sflow-dot { box-shadow: 0 0 0 2px #fbbf24; }
.sflow-step.empty .sflow-dot { opacity: .55; }
.sflow-title { display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.sflow-title .help-q { width: 13px; height: 13px; }
.sflow-title .help-q svg { width: 12px; height: 12px; }
.sflow-min { font-size: 0.82rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sflow-min.word { font-size: 0.74rem; font-weight: 500; color: var(--muted); }

/* A building's dialog in two tabs and its service hours (stopprofile.js, 9 November 2026). */
.sp-tabs { display: flex; gap: 4px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.sp-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0;
  background: none; color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sp-tabs button:hover { color: var(--ink); }
.sp-tabs button.on { color: var(--accent-hover); border-bottom-color: var(--accent); }
.sp-lead { color: var(--muted); margin: 0 0 12px; font-size: 0.88rem; }
.sp-hours { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }
.sp-hours-head { display: flex; align-items: center; gap: 6px; }
.sp-hours-head b { color: var(--ink); font-weight: 600; }
.sp-hours-warn { display: flex; gap: 6px; align-items: flex-start; padding: 6px 8px; border-radius: var(--radius-s);
  background: var(--fair-bg); color: var(--fair-ink); }
.sp-hours-warn .ic { flex: none; margin-top: 1px; }
.hr-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.hr-presets .chip { height: 28px; font-size: 0.8rem; font-weight: 600; cursor: pointer; background: var(--accent-soft);
  border-color: #d9c8fb; color: var(--accent-hover); }
.hr-presets .chip:hover { background: #e4d6fd; border-color: var(--accent); }
.hr-lbl { font-size: 0.8rem; color: var(--ink-2); margin-right: 2px; }
/* Each day on one line (UAT, 10 November 2026): its name, its choice, its windows, its bar and copy. A day
   leaving no time for a commit is marked by its name, the line under the week saying which. A day of more
   windows than fit wraps them, and only that day grows. */
.hr-week { --hr-cols: 46px 168px 288px minmax(0, 1fr) 26px; }
.hr-scale { display: grid; grid-template-columns: var(--hr-cols); gap: 0 6px; margin-bottom: 2px; }
.hr-scale .hr-ticks { grid-column: 4; }
.hr-ticks { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hr-rows { display: flex; flex-direction: column; }
.hr-row { display: grid; grid-template-columns: var(--hr-cols); gap: 6px 6px; align-items: center; min-height: 40px; padding: 4px 0;
  border-top: 1px solid var(--line); }
.hr-row:first-child { border-top: 0; }
.hr-head { display: contents; }
.hr-head .hr-day { grid-column: 1; grid-row: 1; }
.hr-head .hr-seg { grid-column: 2; grid-row: 1; }
.hr-row > .hr-wins { grid-column: 3; grid-row: 1; }
.hr-row > .hr-track { grid-column: 4; grid-row: 1; }
.hr-head .hr-copy { grid-column: 5; grid-row: 1; justify-self: end; }
.hr-day.clash { display: inline-flex; align-items: center; gap: 4px; color: var(--fair-ink); }
.hr-day.clash .ic { width: 14px; height: 14px; }
.hr-day { font-size: 0.86rem; color: var(--ink); }
.hr-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; height: 26px; flex: none; }
.hr-seg button { border: 0; background: none; padding: 0 8px; white-space: nowrap; font: inherit; font-size: 0.76rem; color: var(--ink-2); cursor: pointer; }
.hr-seg button + button { border-left: 1px solid var(--line-strong); }
.hr-seg button.on { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.hr-row.closed .hr-seg button.on { background: var(--poor-bg); color: var(--poor-ink); }
.hr-track { position: relative; height: 18px; border-radius: 9px; background: var(--surface-2); cursor: copy;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); }
.hr-track.any { background-color: var(--good-bg); cursor: default; }
.hr-track.closed { cursor: default; background-image: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--line) 6px 7px); }
.hr-fill { position: absolute; top: 2px; bottom: 2px; border-radius: 7px; background: var(--accent); }
.hr-closed { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 1px 8px; border-radius: 999px;
  background: var(--poor-bg); color: var(--poor-ink); font-size: 0.7rem; font-weight: 600; white-space: nowrap; z-index: 1; }
.hr-due { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--fair); }
.hr-wins { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.hr-win { display: inline-flex; align-items: center; gap: 3px; padding: 2px 2px 2px 2px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--surface); }
.hr-win .input { height: 28px; width: 104px; padding: 0 4px 0 6px; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.hr-to, .hr-onward { font-size: 0.74rem; color: var(--muted); }
.hr-x { border: 0; background: none; padding: 2px; border-radius: 4px; color: var(--muted); cursor: pointer; display: inline-flex; }
.hr-x:hover { background: var(--poor-bg); color: var(--poor-ink); }
.hr-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 4px; font: inherit;
  font-size: 0.76rem; color: var(--accent-hover); cursor: pointer; border-radius: 4px; }
.hr-link:hover { background: var(--accent-soft); }
.hr-link:disabled { color: var(--muted); background: none; cursor: default; }
.hr-copy, .hr-add { padding: 4px; }
.hr-rule { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-s);
  background: var(--fair-bg); color: var(--fair-ink); font-size: 0.8rem; }
.hr-rule .ic { flex: none; margin-top: 1px; }
.hr-summary { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--radius-s); background: var(--surface-2);
  font-size: 0.82rem; color: var(--ink-2); }
.hr-summary b { color: var(--ink); }
@media (max-width: 600px) {
  .sp-modal { zoom: 1; }
  .hr-scale { display: none; }
  .hr-week { --hr-cols: 50px minmax(0, 1fr) 26px; }
  .hr-head .hr-seg { justify-self: start; }
  .hr-head .hr-copy { grid-column: 3; }
  .hr-row > .hr-wins { grid-column: 1 / -1; grid-row: 2; }
  .hr-row > .hr-track { grid-column: 1 / -1; grid-row: 3; }
  .hr-actions { flex-wrap: wrap; }
  .hr-actions .hr-note { flex-basis: 100%; }
}
/* The service hours' note, one line in the buttons' bar. */
.hr-actions .hr-note { flex: 1 1 auto; min-width: 0; height: 36px; margin-right: 8px; font-size: 0.82rem; }
/* The dialog's buttons stay in view as a long week scrolls. */
.sp-modal .sp-pane > .actions { position: sticky; bottom: -22px; margin: 14px -22px -22px; padding: 12px 22px;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); z-index: 3; }

/* 14 November 2026: on a phone every box takes 16 px type. iOS, in Safari and Chrome alike, zooms the
   page in when a box under 16 px is focused, and a dialog opened that way ran off the right of the
   screen until zoomed out by hand. */
@media (max-width: 600px) {
  .input, select.input, textarea.input { font-size: 16px; }
  .sl-modal:focus { outline: none; }
}

/* The data calendar's days older than the application reads (17 November 2026, Data retention). */
.dcal-cell.old { cursor: not-allowed; color: var(--muted); opacity: 0.7;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
.dcal-limit { display: flex; gap: 6px; align-items: flex-start; }
