/* 15-Minute Life · Apogee Geospatial · build 15min-life-20260926d (architecture shared with the Virginia Broadband Gap Explorer) */
:root {
  --bg: #0B0F14; --panel: #141A20; --panel2: #10161c; --cream: #F7F4EE; --muted: #9AA3AD;
  --sage: #3D6B5A; --sage2: #8FBFA9; --line: #1e262e; --line2: #2a343e; --radius: 12px;
  --served: #5E9C84; --under: #E9A23B; --unserved: #C8423F; --gold: #E6D5A3;
  --header-h: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--cream); font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--sage2); text-decoration: none; }
a:hover { color: var(--cream); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 5000; background: var(--sage); color: var(--cream); padding: 6px 10px; border-radius: 6px; }
.skip:focus { left: 8px; }
.mono, .num { font-family: "IBM Plex Mono", ui-monospace, monospace; }
button { font: inherit; }
.linkish { background: none; border: 0; padding: 0; color: var(--sage2); cursor: pointer; font: inherit; }
.linkish:hover { color: var(--cream); }

/* Header */
header.app-bar {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: rgba(11,15,20,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
header.app-bar img.wordmark { height: 30px; width: auto; display: block; }
header.app-bar .sub { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
header.app-bar nav { margin-left: auto; display: flex; gap: 16px; align-items: center; }
header.app-bar nav a, header.app-bar nav .linkish { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
header.app-bar nav a:hover, header.app-bar nav .linkish:hover { color: var(--cream); }
header.app-bar nav a.cta { color: var(--cream); background: var(--sage); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(143,191,169,.4); }

/* Header ghost pills ("Home", "About the data"): same shape as the Contact pill (build 15min-life-20260926d) */
header.app-bar nav .hdr-ghost { display: inline-flex; align-items: center; color: var(--cream); font-weight: 500; font-size: 12px; letter-spacing: .04em; line-height: normal;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(247,244,238,.55); background: transparent; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease; }
header.app-bar nav .hdr-ghost:hover { color: var(--cream); background: rgba(247,244,238,.12); border-color: var(--cream); }
header.app-bar nav .hdr-ghost:focus { outline: none; }
header.app-bar nav .hdr-ghost:focus-visible { color: var(--cream); background: rgba(247,244,238,.12); border-color: var(--cream); outline: 2px solid var(--sage2); outline-offset: 2px; }
header.app-bar nav .hdr-ghost .lbl-short { display: none; }
/* Narrow phones: three pills (Home, About, Contact) fit on one line by shortening the About label */
@media (max-width: 400px) { header.app-bar nav .hdr-ghost .lbl-long { display: none; } header.app-bar nav .hdr-ghost .lbl-short { display: inline; } }

/* Workspace */
.workspace {
  display: grid; grid-template-columns: 410px minmax(0, 1fr);
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 560px;
  border-bottom: 1px solid var(--line);
}
html.embed .workspace { height: calc(100vh - var(--header-h)); }
.side { background: var(--panel2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-top { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.side-top h1 { margin: 0 0 4px; font-family: Syne, "IBM Plex Sans", sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.lede { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.side-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 16px 24px; min-height: 0; }
.loading { color: var(--muted); font-size: 13px; padding: 20px 0; }
.sheet-handle { display: none; }
body.has-sel .lede { display: none; }
body.has-sel .side-top h1 { font-size: 1.05rem; margin-bottom: 8px; }

.search { position: relative; }
input[type="search"], select {
  width: 100%; background: #0B0F14; border: 1px solid var(--line2); color: var(--cream);
  border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 13.5px;
}
input[type="search"]:focus, select:focus { outline: none; border-color: var(--sage2); box-shadow: 0 0 0 2px rgba(143,191,169,.2); }
.metric-lbl { display: block; margin: 10px 0 5px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1200;
  list-style: none; margin: 0; padding: 4px 0; background: #0B0F14; border: 1px solid var(--line2);
  border-radius: 8px; max-height: 300px; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.search-results li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 11px; font-size: 13px; cursor: pointer; }
.search-results li[aria-selected="true"], .search-results li:hover { background: rgba(61,107,90,.28); }
.search-results .meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.search-results .empty { color: var(--muted); cursor: default; }

/* Panel sections */
.sec { margin: 0 0 18px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--sage2); font-weight: 600; }
.sec-h .hint { font-size: 10px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 400; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 13px; }
.county-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.county-head h2 { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.2; }
.county-head .meta { display: block; margin-top: 3px; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--muted); }
.icon-btn { background: transparent; border: 1px solid var(--line2); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.icon-btn:hover { color: var(--cream); border-color: var(--muted); }
.headline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.headline .big { font-family: "IBM Plex Mono", monospace; font-size: 2rem; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.headline .big.bad { color: #F08A6A; }
.headline .lbl { font-size: 12.5px; color: var(--cream); line-height: 1.35; }
.headline .lbl small { display: block; color: var(--muted); font-size: 11.5px; }

.stack { display: flex; height: 16px; border-radius: 5px; overflow: hidden; margin: 10px 0 6px; background: #0B0F14; border: 1px solid var(--line); }
.stack span { display: block; height: 100%; min-width: 0; }
.stack .s-unserved { background: var(--unserved); }
.stack .s-under { background: var(--under); }
.stack .s-served { background: var(--served); }
.stack-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 11.5px; }
.stack-key div { line-height: 1.3; }
.stack-key .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.stack-key b { display: block; font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 13px; }
.stack-key small { color: var(--muted); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.stat .k { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .v { display: block; font-family: "IBM Plex Mono", monospace; font-size: 14.5px; margin-top: 2px; }
.stat .v small { color: var(--muted); font-size: 10.5px; }
.note { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 8px 0 0; }
.note b { color: var(--cream); font-weight: 500; }

.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 4px 8px; align-items: center; font-size: 12px; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; text-align: right; color: var(--cream); }
.bar-row .track { grid-column: 1 / -1; height: 6px; background: #0B0F14; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.bar-row .fill { display: block; height: 100%; background: var(--sage2); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { background: #0B0F14; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 9px; font-size: 11.5px; color: var(--muted); }
.chip b { display: block; font-family: "IBM Plex Mono", monospace; font-size: 15px; color: var(--cream); font-weight: 500; }

table.nb { width: 100%; border-collapse: collapse; font-size: 12px; }
table.nb th { text-align: right; font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 4px 6px; border-bottom: 1px solid var(--line); }
table.nb th:first-child, table.nb td:first-child { text-align: left; }
table.nb td { padding: 5px 4px; border-bottom: 1px solid rgba(30,38,46,.7); text-align: right; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; vertical-align: middle; }
table.nb td:first-child { font-family: "IBM Plex Sans", sans-serif; font-size: 12px; max-width: 150px; }
table.nb tr.sel td { background: rgba(61,107,90,.18); }
table.nb tr.sel td:first-child { font-weight: 600; }
table.nb tr.state td { color: var(--muted); font-style: italic; }
table.nb tr.click { cursor: pointer; }
table.nb tr.click:hover td { background: rgba(255,255,255,.04); }
table.nb .mini { display: block; height: 5px; margin-top: 3px; background: #0B0F14; border-radius: 3px; overflow: hidden; }
table.nb .mini i { display: block; height: 100%; }
table.nb .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bead-compare .bar-row .fill.fcc { background: var(--unserved); }
.bead-compare .bar-row .fill.elig { background: var(--gold); }
.bead-compare .bar-row .fill.award { background: var(--sage2); }
.explain { margin: 10px 0 0; padding-left: 1.05rem; font-size: 12px; line-height: 1.5; color: #D9D5CC; }
.explain li { margin: 0 0 6px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: #0B0F14; color: var(--cream); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 11px; font-size: 12px; cursor: pointer; }
.btn:hover { border-color: var(--sage2); }
.btn.primary { background: var(--sage); border-color: rgba(143,191,169,.45); }
.btn.primary:hover { background: #467a67; }

ol.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
ol.rank li button { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 8px; align-items: center; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 7px; color: var(--cream); font-size: 12.5px; padding: 6px 7px; cursor: pointer; }
ol.rank li button:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
ol.rank .r { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--muted); }
ol.rank .n { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--sage2); }
ol.rank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Map */
.map-wrap { position: relative; min-width: 0; background: #e6e6e6; }
.map-wrap.basemap-dark, .map-wrap.basemap-imagery { background: #11161b; }
#map { position: absolute; inset: 0; }
.layers-box { position: absolute; z-index: 20; left: 12px; top: 12px; background: rgba(11,15,20,.92); border: 1px solid var(--line2); border-radius: 10px; min-width: 176px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.layers-toggle { appearance: none; border: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: transparent; color: var(--cream); cursor: pointer; padding: 8px 11px 7px; }
.layers-toggle-lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.layers-toggle-chev { font-size: 10px; color: var(--muted); transition: transform .18s ease; }
.layers-box.is-collapsed .layers-toggle-chev { transform: rotate(-90deg); }
.layers-box.is-collapsed .layers-body { display: none; }
.layers-body { padding: 0 10px 9px; border-top: 1px solid var(--line); }
.layers-sec { margin-top: 8px; }
.layers-sec-lbl { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--sage2); margin-bottom: 4px; font-weight: 500; }
.layers-opt { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--cream); margin: 4px 0; cursor: pointer; user-select: none; }
.layers-opt input { accent-color: var(--sage2); width: 13px; height: 13px; margin: 0; cursor: pointer; }

.legend { position: absolute; z-index: 20; left: 12px; bottom: 62px; background: rgba(11,15,20,.92); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; min-width: 190px; max-width: 250px; font-size: 11px; color: var(--cream); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.legend .lg-title { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--sage2); margin-bottom: 6px; font-weight: 600; }
.legend .lg-sub { color: var(--muted); font-size: 10.5px; margin: -2px 0 6px; line-height: 1.35; }
.legend .lg-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.legend .lg-sw { width: 18px; height: 12px; border-radius: 2px; border: 1px solid rgba(255,255,255,.25); flex: 0 0 auto; }
.legend .lg-hex { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line2); }
.legend .lg-hex .lg-sw { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); border: 0; }
.legend .lg-dim { opacity: .5; }
.zoom-hint { position: absolute; z-index: 20; left: 50%; transform: translateX(-50%); top: 12px; background: rgba(11,15,20,.88); color: var(--cream); border: 1px solid var(--line2); border-radius: 999px; font-size: 11.5px; padding: 6px 12px; pointer-events: none; white-space: nowrap; }
.zoom-hint.hidden { display: none; }
.hover-card { position: absolute; z-index: 30; pointer-events: none; background: rgba(11,15,20,.95); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; min-width: 150px; max-width: 240px; font-size: 12px; color: var(--cream); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.hover-card .hc-name { font-weight: 600; margin-bottom: 2px; }
.hover-card .hc-v { font-family: "IBM Plex Mono", monospace; color: var(--gold); }
.hover-card .hc-m { color: var(--muted); font-size: 11px; }
.map-status { position: absolute; z-index: 25; right: 12px; bottom: 28px; max-width: 360px; background: rgba(120,30,30,.92); color: #fff; border-radius: 8px; padding: 8px 11px; font-size: 12px; }
.map-loading { position: absolute; z-index: 26; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(11,15,20,.92); color: var(--cream); border: 1px solid var(--line2); border-radius: 999px; padding: 9px 16px 9px 34px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.3); white-space: nowrap; }
.map-loading::before { content: ""; position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border: 2px solid var(--sage2); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.map-loading[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-group { background: rgba(11,15,20,.92); border: 1px solid var(--line2); }
.maplibregl-ctrl-group button + button { border-top-color: var(--line2); }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }

/* Footer */
.page-foot { padding: 18px 22px 36px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; max-width: 1400px; }
.page-foot b { color: var(--cream); font-weight: 600; }
.page-foot ul.sources { margin: 6px 0 0; padding-left: 1.1rem; }
.page-foot ul.sources li { margin: .35rem 0; }
.page-foot a, .page-foot .linkish { color: var(--sage2); text-decoration: underline; text-underline-offset: 2px; }
.page-foot p { margin: 6px 0 10px; }
.page-foot .build { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #6b7580; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: Syne, "IBM Plex Sans", sans-serif; font-size: 1.15rem; }
.modal-body { padding: 6px 18px 18px; overflow-y: auto; font-size: 13px; line-height: 1.55; color: #DDD9D0; }
.modal-body h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sage2); margin: 16px 0 4px; }
.modal-body ul { padding-left: 1.1rem; margin: 4px 0; }
.modal-body .muted { color: var(--muted); font-size: 12px; margin-top: 16px; }

/* Tablet */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 350px minmax(0, 1fr); }
  header.app-bar .sub { display: none; }
}

/* Mobile: map full, detail as bottom sheet */
@media (max-width: 720px) {
  :root { --header-h: 50px; }
  header.app-bar { padding: 0 12px; gap: 10px; }
  header.app-bar img.wordmark { height: 24px; }
  header.app-bar nav { gap: 12px; }
  header.app-bar nav a:not(.cta):not(.hdr-ghost) { display: none; }
  .workspace { display: block; position: relative; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 460px; }
  .map-wrap { position: absolute; inset: 0; }
  .side {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 40;
    height: 88%; transform: translateY(calc(100% - var(--peek, 168px)));
    transition: transform .25s ease; border-right: 0; border-top: 1px solid var(--line2);
    border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.4);
  }
  .side.sheet-half { transform: translateY(48%); }
  .side.sheet-full { transform: translateY(0); }
  .sheet-handle { display: flex; justify-content: center; width: 100%; background: transparent; border: 0; padding: 8px 0 4px; cursor: pointer; flex: 0 0 auto; }
  .sheet-handle .grip { width: 44px; height: 5px; border-radius: 999px; background: #4a5561; }
  .side-top { padding: 4px 14px 10px; }
  .side-top h1, .lede { display: none; }
  .metric-lbl { display: none; }
  #metric-select { margin-top: 8px; }
  .side-body { padding: 10px 14px 40px; }
  .layers-box { top: 10px; left: 10px; min-width: 0; }
  .zoom-hint { top: auto; bottom: calc(var(--peek, 168px) + 10px); font-size: 11px; }
  .legend { left: auto; right: 10px; top: 10px; bottom: auto; min-width: 0; max-width: 170px; padding: 8px 10px; font-size: 10.5px; }
  .legend .lg-sub { display: none; }
  .search-results { max-height: 40vh; }
  .foot-grid { grid-template-columns: 1fr; gap: 12px; }
  .page-foot { padding: 14px 14px 28px; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: var(--peek, 168px); }
  .maplibregl-ctrl-top-right { display: none; } /* pinch to zoom on phones */
  .legend .lg-row { font-size: 10px; margin: 2px 0; }
  .legend .lg-title { font-size: 9.5px; }
}

/* ---- 15-Minute Life additions ---- */
.muted { color: var(--muted); }
.search-status { min-height: 0; font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.35; }
.search-status:empty { display: none; }
.search-status.warn { color: #F0B36A; }
.search-results li .src { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sage2); white-space: nowrap; }
.search-results li.grp { cursor: default; padding: 6px 11px 3px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: transparent !important; }
.search-results li.osm { color: var(--sage2); }
.ctl-lbl { margin: 12px 0 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.cat-grid button { background: #0B0F14; border: 1px solid var(--line2); color: var(--muted); border-radius: 7px; font-size: 11.5px; padding: 6px 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; }
.cat-grid button .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.cat-grid button:hover { color: var(--cream); border-color: var(--muted); }
.cat-grid button[aria-checked="true"] { background: var(--sage); color: var(--cream); border-color: rgba(143,191,169,.5); }
.cat-grid button.overall { grid-column: span 1; font-weight: 600; }
.mode-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.seg { display: flex; gap: 3px; background: #0B0F14; border: 1px solid var(--line2); border-radius: 9px; padding: 3px; flex: 0 0 auto; }
.seg button { background: transparent; border: 0; color: var(--muted); font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--sage); color: var(--cream); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg.inactive button[aria-checked="true"] { background: #26323b; }
.mode-note { margin: 0; font-size: 11px; line-height: 1.35; color: var(--muted); }
.mode-note b { color: var(--gold); font-weight: 600; }

.scorebar { height: 10px; border-radius: 5px; background: #0B0F14; border: 1px solid var(--line); overflow: hidden; margin: 6px 0 4px; }
.scorebar i { display: block; height: 100%; background: linear-gradient(90deg, #41b6c4, #2c7fb8); }
.scale { display: flex; justify-content: space-between; font-family: "IBM Plex Mono", monospace; font-size: 9.5px; color: var(--muted); }
table.bd { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
table.bd th { font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 4px 4px 6px; border-bottom: 1px solid var(--line); }
table.bd th:first-child, table.bd td:first-child { text-align: left; }
table.bd td { padding: 5px 4px; border-bottom: 1px solid rgba(30,38,46,.7); text-align: right; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; vertical-align: middle; }
table.bd td:first-child { font-family: "IBM Plex Sans", sans-serif; font-size: 12px; white-space: nowrap; }
table.bd td .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
table.bd td.how { font-family: "IBM Plex Sans", sans-serif; font-size: 11px; color: var(--muted); text-align: left; }
table.bd .pts { display: inline-block; min-width: 46px; }
table.bd .mini { display: block; height: 4px; background: #0B0F14; border-radius: 2px; overflow: hidden; margin-top: 3px; }
table.bd .mini i { display: block; height: 100%; background: var(--sage2); }
table.bd td.ok { color: #9ED9C2; }
table.bd td.far { color: #F0B36A; }
table.bd tr.total td { font-weight: 600; border-bottom: 0; }
.near { display: flex; flex-direction: column; gap: 8px; }
.near-row { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 2px 8px; font-size: 12.5px; line-height: 1.35; }
.near-row .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; }
.near-row .cat { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.near-row .nm { font-weight: 500; }
.near-row .sub { color: var(--muted); font-size: 11.5px; }
.flag { display: inline-block; margin-top: 3px; font-size: 11px; line-height: 1.3; padding: 3px 7px; border-radius: 6px; background: rgba(240,179,106,.14); border: 1px solid rgba(240,179,106,.45); color: #F4C98E; }
.flag.info { background: rgba(143,191,169,.1); border-color: rgba(143,191,169,.4); color: #BFE0D1; }
.flags { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.flags .flag { display: block; }
details.how { margin-top: 8px; font-size: 12px; color: #D9D5CC; }
details.how summary { cursor: pointer; color: var(--sage2); font-size: 12px; }
details.how ul { margin: 6px 0 0; padding-left: 1.05rem; line-height: 1.5; }
table.cs { width: 100%; border-collapse: collapse; font-size: 12px; }
table.cs th { font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 4px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
table.cs th:first-child, table.cs td:first-child { text-align: left; }
table.cs td { padding: 6px 4px; border-bottom: 1px solid rgba(30,38,46,.7); text-align: right; font-family: "IBM Plex Mono", monospace; font-size: 12px; }
table.cs td:first-child { font-family: "IBM Plex Sans", sans-serif; }
.legend .lg-break { border-top: 2px solid var(--cream); margin: 4px 0 3px; position: relative; }
.legend .lg-break span { position: absolute; right: 0; top: -8px; background: rgba(11,15,20,.95); padding: 0 3px; font-size: 9px; color: var(--cream); letter-spacing: .06em; text-transform: uppercase; }
.legend .lg-note { color: var(--muted); font-size: 10px; line-height: 1.35; margin-top: 6px; }
.legend .lg-sw.light { opacity: .45; }
.legend .lg-sw.hatch { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.7) 0 2px, transparent 2px 5px) !important; }
.outside { padding: 12px; border: 1px dashed var(--line2); border-radius: 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-grid button { font-size: 11px; padding: 6px 2px; }
  .ctl-lbl { display: none; }
  .mode-note { font-size: 10.5px; }
}
@media (max-width: 720px) {
  .legend .lg-note, .legend .lg-hex { display: none; }
  .legend { max-width: 150px; }
}
