/* Theme system, 2026-08-24 per Jake: two named directions from the theme-pitch artifact --
   "Daylight" as the light theme, "Telemetry" (dark instrument-panel/dashcam feel) as the dark
   theme. Same three-state pattern (system default, overridable) as the pitch artifact's own
   chrome used: bare :root is the light default; the media query covers "OS says dark and the
   user hasn't overridden to light"; the [data-theme="dark"] block covers an explicit user
   choice regardless of OS. base.html's toggle button sets/clears documentElement.dataset.theme
   and mirrors it to localStorage; a tiny inline script at the top of <head> re-applies it on
   every load before first paint so there's no flash of the wrong theme. */
:root{--bg:#f3f4fa;--surf:#fff;--surf2:#eceefa;--bdr:rgba(20,24,46,.09);--bdr2:rgba(20,24,46,.18);--tx:#15182b;--tx2:#666c8a;
--grn:#0f8f5f;--grn-bg:#dff5ea;--amb:#a8650a;--amb-bg:#faeed7;--red:#c23a4d;--red-bg:#fbe9ec;--blu:#0d7c82;--blu-bg:#dff4f3;
--r:10px;--font:'IBM Plex Sans',sans-serif;--mono:'IBM Plex Mono',monospace;--tbl-bdr:var(--bdr)}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#0d1013;--surf:#15191c;--surf2:#1b2023;--bdr:rgba(255,255,255,.09);--bdr2:rgba(255,255,255,.18);
--tx:#e8ece9;--tx2:#8a9599;--grn:#4fd9a8;--grn-bg:#0d2b23;--amb:#f2c14e;--amb-bg:#332405;--red:#ff6b6b;--red-bg:#391414;--blu:#ff9d3d;--blu-bg:#3a2408;
--r:4px;--mono:'JetBrains Mono',monospace;--tbl-bdr:rgba(255,157,61,.4)}}
:root[data-theme="dark"]{--bg:#0d1013;--surf:#15191c;--surf2:#1b2023;--bdr:rgba(255,255,255,.09);--bdr2:rgba(255,255,255,.18);
--tx:#e8ece9;--tx2:#8a9599;--grn:#4fd9a8;--grn-bg:#0d2b23;--amb:#f2c14e;--amb-bg:#332405;--red:#ff6b6b;--red-bg:#391414;--blu:#ff9d3d;--blu-bg:#3a2408;
--r:4px;--mono:'JetBrains Mono',monospace;--tbl-bdr:rgba(255,157,61,.4)}
/* Telemetry's instrument-panel grid, dark mode only -- subtle (drawn in --bdr, already a
   low-opacity line colour) so it reads as texture, not noise. */
:root[data-theme="dark"] body{background-image:linear-gradient(var(--bdr) 1px,transparent 1px),linear-gradient(90deg,var(--bdr) 1px,transparent 1px);background-size:28px 28px;background-position:-1px -1px}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) body{background-image:linear-gradient(var(--bdr) 1px,transparent 1px),linear-gradient(90deg,var(--bdr) 1px,transparent 1px);background-size:28px 28px;background-position:-1px -1px}}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;
  border:1px solid var(--bdr2);background:var(--surf2);color:var(--tx2);padding:0;margin-right:4px;vertical-align:middle;cursor:pointer}
.theme-toggle:hover{color:var(--tx);border-color:var(--tx2);background:var(--surf2)}
/* Dark/Telemetry's other big signature besides colour+radius: mono, uppercase, letter-spaced
   "instrument panel" chrome on titles/labels -- while body copy and table cells stay plain
   IBM Plex Sans (mono everywhere would risk exactly the width-driven horizontal-scroll problem
   fixed on people.html 2026-08-21). Scoped tight to a few structural elements, not a global
   font swap. */
:root[data-theme="dark"] .tt,:root[data-theme="dark"] h1,:root[data-theme="dark"] .nav-sec,:root[data-theme="dark"] .badge{font-family:var(--mono)}
:root[data-theme="dark"] .tt,:root[data-theme="dark"] h1{text-transform:uppercase;letter-spacing:.03em}
:root[data-theme="dark"] .badge{text-transform:uppercase;letter-spacing:.03em;border-radius:2px}
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .tt,:root:not([data-theme="light"]) h1,:root:not([data-theme="light"]) .nav-sec,:root:not([data-theme="light"]) .badge{font-family:var(--mono)}
  :root:not([data-theme="light"]) .tt,:root:not([data-theme="light"]) h1{text-transform:uppercase;letter-spacing:.03em}
  :root:not([data-theme="light"]) .badge{text-transform:uppercase;letter-spacing:.03em;border-radius:2px}
}
.theme-toggle .icon-moon{display:none}
:root[data-theme="dark"] .theme-toggle .icon-sun{display:none}
:root[data-theme="dark"] .theme-toggle .icon-moon{display:block}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .theme-toggle .icon-sun{display:none}
:root:not([data-theme="light"]) .theme-toggle .icon-moon{display:block}}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:var(--font);background:var(--bg);color:var(--tx);font-size:14px;line-height:1.5}
.wrap{max-width:1200px;margin:0 auto;padding:1.25rem}
h1{font-size:19px;margin-bottom:.75rem;padding-left:.6rem;border-left:4px solid var(--blu)}
h2{font-size:14px;margin-bottom:.5rem}
.topbar{background:var(--surf);border-bottom:3px solid var(--blu);padding:.5rem 1.25rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px}
.tt{font-weight:600;color:var(--blu)}.topbar nav{display:flex;gap:2px;flex-wrap:wrap}
.topbar a{color:var(--tx2);text-decoration:none;padding:4px 9px;border-radius:var(--r);font-size:13px}
.topbar a:hover{background:var(--surf2);color:var(--tx)}
.banner{background:var(--blu-bg);border:1px solid var(--blu);border-radius:var(--r);padding:.6rem 1rem;margin:0 1.25rem;margin-top:.75rem;font-size:13px}
.banner.warn{background:var(--amb-bg);border-color:var(--amb)}
.banner.ok{background:var(--grn-bg);border-color:var(--grn)}
/* 2026-08-18: toasts for ajax-form's in-place submits (base.html) -- same color rules as
   .banner (default/warn/ok) so a toast reads the same way a full-page flash message always
   has, just transient and stacked bottom-right instead of pinned under the topbar. */
#toast-host{position:fixed;right:1.25rem;bottom:1.25rem;display:flex;flex-direction:column;gap:.5rem;z-index:999;max-width:360px}
.toast{background:var(--blu-bg);border:1px solid var(--blu);border-radius:var(--r);padding:.6rem 1rem;font-size:13px;
  box-shadow:0 4px 14px rgba(0,0,0,.18);opacity:0;transform:translateY(6px);transition:opacity .2s,transform .2s}
.toast.show{opacity:1;transform:translateY(0)}
.toast.warn{background:var(--amb-bg);border-color:var(--amb)}
.toast.ok{background:var(--grn-bg);border-color:var(--grn)}
/* 2026-08-24: was a hardcoded 12px, same in both themes -- meant --r's per-theme value (set up
   for exactly this) never actually reached the single most dominant surface on the page, so
   dark/Telemetry never got its tight, hard-edged corners and read softer/more Daylight-ish than
   intended. lcard/guide-card below had the identical hardcoded-12px miss. */
.card{background:var(--surf);border:1px solid var(--bdr);border-radius:var(--r);padding:1rem 1.15rem;margin-bottom:.85rem}
a{color:var(--blu)}a:hover{text-decoration:underline}
/* Most links already have a more specific rule (.rt a, .topbar a, .pt, .pc-link, .guide-*, etc)
   that wins over this on specificity -- this only catches the bare, unclassed <a> tags scattered
   through templates (task links, "Sync now", "Reconsider", banner links...) that were otherwise
   falling through to the browser's default link blue, unrelated to either theme and doing "a
   horrible contrast" against Telemetry's dark background. */
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:.85rem;margin-bottom:.85rem}
.grid2 .card{margin:0}
.mg{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-bottom:.5rem}
.met{background:var(--surf2);border-radius:var(--r);padding:.55rem .8rem}
.met-l{font-size:11px;color:var(--tx2)}.met-v{font-size:20px;font-weight:600}.met-s{font-size:11px;color:var(--tx2)}
.muted{color:var(--tx2);font-size:12px}.ok{color:var(--grn)}.small{font-size:11px}.mono{font-family:var(--mono);font-size:12px}
input,select,button{font-family:var(--font);font-size:13px;padding:6px 9px;border:1px solid var(--bdr2);border-radius:var(--r);background:var(--surf);color:var(--tx)}
input:focus,select:focus{outline:none;border-color:var(--tx)}
input.short{width:64px}input.hin{width:56px;text-align:center;font-family:var(--mono)}
/* 2026-08-21, per Jake: select.short was never actually a rule (only input.short existed), so
   people.html's reassign <select multiple> boxes had no width cap at all -- sized to whatever
   the longest display_name in the option list happened to be, one of the real contributors to
   that page needing a horizontal scrollbar it was never supposed to have. */
select.short{width:130px}
/* 2026-08-01, per Jake: the old class="short" note fields on admin review were unreadably
   narrow (64px, ~6 characters). textarea.note-box starts at a sane width/height and is
   natively resizable (drag the corner) -- browsers do this for free on <textarea>, just don't
   fight it with resize:none. */
textarea.note-box{font-family:var(--font);font-size:13px;padding:6px 9px;border:1px solid var(--bdr2);
  border-radius:var(--r);background:var(--surf);color:var(--tx);width:260px;min-height:36px;
  resize:vertical;vertical-align:top}
textarea.note-box:focus{outline:none;border-color:var(--tx)}
button{cursor:pointer}button:hover{background:var(--surf2)}
.btnp{background:var(--blu);color:#fff;border-color:var(--blu)}.btnp:hover{opacity:.85;background:var(--blu)}
.btn.mini{padding:2px 8px;font-size:11px}.btn.ok{border-color:var(--grn);color:var(--grn)}.btn.bad{border-color:var(--red);color:var(--red)}
/* 2026-08-18: browse.html's page-number pager -- .btn.mini.active marks the CURRENT page (a
   plain <span>, not a link) with the same blue-pill treatment .tab-btn.active/.fmt-btn.active
   already use elsewhere, since a bare .btn has no border/background of its own to build on. */
.btn.mini.active{background:var(--blu-bg);border:1px solid var(--blu);border-radius:var(--r);color:var(--blu);font-weight:600}
.fr{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:.65rem}
.inline{display:inline-flex;gap:4px;align-items:center}
.tw{overflow-x:auto}
table.rt{width:100%;border-collapse:collapse;font-size:12px}
.rt th{background:var(--surf2);padding:6px 8px;text-align:left;font-size:11px;font-weight:700;color:var(--tx2);border:1px solid var(--tbl-bdr);white-space:nowrap}
/* 2026-08-21, per Jake: "no horizontal scrollbar, ever, unless specified" -- .rt th's own
   white-space:nowrap above is fine for tables that already fit (most of them), but on a wide,
   many-column table like people.html it's one of the things that forces the table past its
   container's width, and .tw's overflow-x:auto (a real, deliberate pattern elsewhere for tables
   that DO need to scroll, e.g. counterpart_review.html's per-field columns) then hides that as
   a scrollbar instead of surfacing it as "this table doesn't fit". table.rt.wrap opts a
   specific table OUT of the nowrap/scroll pattern: headers wrap onto multiple lines instead,
   so the column shrinks to fit rather than forcing overflow.  */
table.rt.wrap th{white-space:normal}
.rt td{padding:6px 8px;border:1px solid var(--tbl-bdr);vertical-align:middle}
.rt a{color:var(--blu);text-decoration:none}.rt a:hover{text-decoration:underline}
tr.overdue td{background:var(--red-bg)}tr.archived td{opacity:.55}
tr.row-tot td{border-top:2px solid var(--bdr2)}
.mpf-yellow{background:var(--amb-bg)}
.mpf-red{background:var(--red-bg)}
.card.archived{opacity:.55}
.card.needs-action{border-left:4px solid var(--amb)}
h3.proj-group{margin:14px 0 4px;font-size:13px;font-weight:600}
.badge{display:inline-block;border-radius:4px;padding:1px 7px;font-size:10px;font-weight:500;text-decoration:none}
.badge.red{background:var(--red-bg);color:var(--red)}.badge.amb{background:var(--amb-bg);color:var(--amb)}
.badge.blu{background:var(--blu-bg);color:var(--blu)}.badge.gy{background:var(--surf2);color:var(--tx2)}
.ag{background:var(--grn-bg);font-weight:600}.aa{background:var(--amb-bg);font-weight:600}.ar{background:var(--red-bg);font-weight:600}
.pt{display:inline-block;background:var(--blu-bg);color:var(--blu);border-radius:3px;padding:2px 7px;font-size:11px;margin:2px;text-decoration:none}
a.pt:hover{text-decoration:underline}
.pt.ok{background:var(--grn-bg);color:var(--grn)}
.mini{font-size:10px;color:var(--tx2)}
.lcard{max-width:340px;margin:14vh auto;background:var(--surf);border:1px solid var(--bdr2);border-radius:var(--r);padding:2rem}
.lcard input{width:100%;margin-bottom:.6rem}.lcard button{width:100%}
.center{text-align:center}
/* trend charts */
.trend{width:100%;max-width:560px;height:auto;margin:.25rem 0 .5rem}
.trend .grid{stroke:rgba(128,128,128,.15);stroke-width:1}
.trend .ax{font-size:9px;fill:var(--tx2);font-family:var(--mono)}
.chart-h{font-size:12px;font-weight:600;color:var(--tx2);margin:.75rem 0 .1rem}
.leg{font-weight:400;font-size:10px;color:var(--tx2);margin-left:8px}
.leg i{display:inline-block;width:14px;height:3px;vertical-align:middle;margin:0 3px 0 8px}
.leg i.dash{background-image:linear-gradient(90deg,currentColor 60%,transparent 60%)!important;background-size:6px 3px}
/* sidebar layout */
.layout{display:flex;min-height:calc(100vh - 44px)}
.sidebar{width:180px;flex-shrink:0;background:var(--surf);border-right:1px solid var(--bdr);padding:.6rem 0}
.nav-sec{font-size:10px;font-weight:700;color:var(--blu);opacity:.85;padding:.9rem 1rem .2rem;text-transform:uppercase;letter-spacing:.06em}
.nav-item{display:flex;justify-content:space-between;align-items:center;padding:7px 1rem;font-size:13px;color:var(--tx2);text-decoration:none;border-left:3px solid transparent}
.nav-item:hover{background:var(--surf2);color:var(--tx)}
.nav-item.active{color:var(--blu);background:var(--blu-bg);border-left-color:var(--blu);font-weight:600}
/* 2026-08-03, per Jake: per-user counters next to sidebar tabs ("so they know how many of each
   they have popping up and they know where they have to check"). */
.nav-badge{background:var(--blu-bg);color:var(--blu);border-radius:9px;padding:1px 7px;font-size:10px;font-weight:700;margin-left:8px}
.nav-item.active .nav-badge{background:var(--blu);color:#fff}
.main{flex:1;padding:1.25rem;overflow-x:auto;max-width:1200px}
.tb-right{font-size:12px;color:var(--tx2)}
.tb-right a{color:var(--tx2);margin-left:10px}
@media(max-width:700px){.layout{flex-direction:column}.sidebar{width:100%;display:flex;flex-wrap:wrap;border-right:none;border-bottom:1px solid var(--bdr)}.nav-sec{display:none}.nav-item{border-left:none}}
/* print (2026-08-15, per Jake -- weekly report needs to print/PDF cleanly for sharing outside
   the tracker): hides the app chrome, lets the content fill the page width. Not report-specific
   -- any page benefits, but this is the first one that actually needs it. */
@media print{.topbar,.sidebar,.banner,.no-print{display:none!important}.layout{display:block}.main{max-width:none;padding:0}}
/* 2026-09-04, per Jake -- weekly report's monthly pay figures are currently unreliable ("not
   correct due to inconsistencies in hours"), and rather than block on fixing the underlying
   hours data, he wants a toggle to just leave them out of the shared PDF while still seeing them
   himself on screen. Print-only (no effect on the live page, hence its own @media print block
   rather than living inside the app-chrome one above) and persisted via localStorage rather than
   a real setting -- this is a "what I choose to send out today" call, not permanent site config.
   Toggle checkbox is in weekly_report.html. */
@media print{body.hide-month-pay .wr-month-pay{display:none!important}}
/* dashboard */
.mg.big .met-v{font-size:24px}
.met-v.warn{color:var(--red)}
.sect{margin:.9rem 0 .5rem;font-size:15px}
.proj-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.75rem}
.pcard .pc-head{margin-bottom:.5rem}
/* person bars (QA summary + dashboard) */
.person-bars{display:flex;flex-direction:column;gap:5px;margin:.4rem 0}
.pbar{display:flex;align-items:center;gap:8px;font-size:12px}
.pbar.click{cursor:pointer}.pbar.click:hover .pbar-name{color:var(--blu)}
.pbar-name{width:84px;text-align:right;color:var(--tx2);flex-shrink:0}
.pbar-track{flex:1;background:var(--surf2);border-radius:4px;height:15px;overflow:hidden}
.pbar-fill{height:100%;border-radius:4px;background:var(--blu)}
.pbar-fill.grn{background:var(--grn)}
.pbar-val{min-width:44px;font-weight:600;font-family:var(--mono);font-size:11px;flex-shrink:0}
.breakdown{margin:2px 0 6px 92px}
.rej-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:5px 0;border-bottom:1px solid var(--bdr)}
.rej-row:last-child{border-bottom:none}
.pc-link{color:var(--tx);text-decoration:none}.pc-link:hover{color:var(--blu);text-decoration:underline}
.mini-tbl{margin-top:6px}
.badge.grn2{background:var(--grn-bg);color:var(--grn)}
.acts{white-space:nowrap}
a.met{display:block;text-decoration:none;color:inherit;transition:background .1s}
a.met:hover{background:var(--blu-bg);outline:1px solid var(--blu)}
a.in-link{color:inherit;text-decoration:underline dotted}
a.in-link:hover{color:var(--blu)}
.fmt-toggle{display:flex;gap:6px;align-items:center;margin:.2rem 0 .6rem;flex-wrap:wrap}
.fmt-btn{padding:7px 14px;border-radius:var(--r);border:1.5px solid var(--bdr2);background:var(--surf);cursor:pointer;font-size:13px}
.fmt-btn.active{background:var(--blu-bg);border-color:var(--blu);color:var(--blu);font-weight:600}
.tab-btn.active{background:var(--blu-bg);border-color:var(--blu);color:var(--blu);font-weight:600}
.bd-line{line-height:1.7;border-top:1px dashed var(--bdr);padding-top:5px;margin-top:4px}
/* collapsible tables (dashboard/me/QA, 2026-07-29 per Jake) */
.collapsible-h{cursor:pointer;user-select:none;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:.6rem;font-size:14px;font-weight:400}
.collapsible-h:hover .chev{color:var(--blu)}
.chev{display:inline-block;transition:transform .15s;color:var(--tx2);font-size:11px;flex-shrink:0}
.chev.closed{transform:rotate(-90deg)}
/* Dropdown-styled collapsible triggers (2026-08-07, per Jake -- browse's Category/More fields/
   Clip flags panels "don't look like drop down boxes" next to the real <select> filters in the
   same row): same border/padding/font-size/background as input,select,button above, so a closed
   trigger reads as just another dropdown-style control at a glance, not a plain heading. */
.dd-toggle{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid var(--bdr2);
  border-radius:var(--r);background:var(--surf);color:var(--tx);font-size:13px;font-weight:400;
  cursor:pointer;user-select:none;margin-bottom:0}
.dd-toggle:hover{border-color:var(--tx)}
.dd-toggle:hover .chev{color:var(--blu)}
.dd-panel{border:1px solid var(--bdr2);border-radius:var(--r);background:var(--surf2);
  padding:.75rem .9rem .85rem;margin-bottom:.85rem}
/* AND/OR match-mode toggle (2026-08-07, per Jake: it "just looks like another checkbox" among
   the value checkboxes above it -- needs to read as a distinct control, not one more option). */
.mode-toggle{margin-top:.65rem;padding-top:.6rem;border-top:1px dashed var(--bdr2)}
.mode-toggle label{font-size:12px;color:var(--tx2);display:flex;align-items:center;gap:6px}
.mode-toggle b{color:var(--tx)}
.badge.also{background:var(--amb-bg);color:var(--amb)}
.tier2{border:2px solid var(--blu);background:linear-gradient(180deg,var(--blu-bg) 0%,var(--surf) 140px)}
.tier2 h2{color:var(--blu)}
.tier-label{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--tx2);font-weight:600}
/* headline stat -- the primary counterpart-agreement number, made deliberately bold/large */
.headline-row{display:flex;gap:1.1rem;align-items:center;flex-wrap:wrap;margin:.5rem 0 .7rem}
.headline-stat{border-radius:var(--r);padding:.7rem 1.1rem;min-width:190px;color:#fff;text-decoration:none;display:block;transition:transform .1s}
a.headline-stat:hover{transform:scale(1.02)}
.hs-v{font-size:40px;font-weight:600;line-height:1}
.hs-unit{font-size:16px;font-weight:500;opacity:.8}
.hs-l{font-size:12px;margin-top:.2rem;opacity:.92}
.hs-g{background:linear-gradient(135deg,#0F6E56,#14916F)}
.hs-a{background:linear-gradient(135deg,#854F0B,#B8720F)}
.hs-r{background:linear-gradient(135deg,#A32D2D,#C23F3F)}
.agr{font-weight:700}
.agr.ag{color:var(--grn)}.agr.aa{color:var(--amb)}.agr.ar{color:var(--red)}
/* guide: searchable admin-editable reference */
.guide-search-wrap{display:flex;gap:8px;margin-bottom:1rem}
.guide-search{flex:1;font-size:15px;padding:11px 14px;border-radius:10px;border:1.5px solid var(--bdr2)}
.guide-search:focus{border-color:var(--blu)}
.guide-search-wrap-sm{margin-bottom:.85rem}
.guide-search-wrap-sm .guide-search{font-size:13px;padding:7px 10px;border-radius:var(--r)}
.guide-section-h{font-size:11px;font-weight:700;color:var(--tx2);text-transform:uppercase;letter-spacing:.06em;margin:1.1rem 0 .5rem}
.guide-section-h:first-of-type{margin-top:0}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:.7rem;margin-bottom:.4rem}
.guide-card{display:flex;flex-direction:column;background:var(--surf);border:1px solid var(--bdr);border-radius:var(--r);padding:.85rem 1rem;transition:border-color .1s,transform .1s}
.guide-card:hover{border-color:var(--blu);transform:translateY(-1px)}
.guide-card-link{display:block;text-decoration:none;color:var(--tx)}
.guide-card-t{font-weight:600;margin-bottom:.3rem}
.guide-card-p{font-size:12px;color:var(--tx2);line-height:1.45}
.guide-card-move{display:flex;gap:4px;margin-top:.6rem;padding-top:.5rem;border-top:1px solid var(--bdr)}
.guide-card-move .btn.mini{min-width:24px}
.guide-card-move .btn.mini:disabled{opacity:.3;cursor:default}
.guide-result{padding:.6rem 0;border-bottom:1px solid var(--bdr)}
.guide-result:last-child{border-bottom:none}
.guide-snip{margin-top:.15rem}
.guide-snip mark{background:var(--amb-bg);color:var(--tx);border-radius:3px;padding:0 2px}
.grid-guide{display:grid;grid-template-columns:210px 1fr;gap:.85rem;align-items:start}
.guide-toc-card{position:sticky;top:.85rem}
.guide-back{display:block;font-size:12px;color:var(--tx2);text-decoration:none;margin-bottom:.7rem}
.guide-back:hover{color:var(--blu)}
.guide-toc-sec{font-size:10px;font-weight:700;color:var(--blu);opacity:.85;text-transform:uppercase;letter-spacing:.06em;margin:.7rem 0 .2rem}
.guide-toc-sec:first-of-type{margin-top:0}
.guide-toc{list-style:none}
.guide-toc li a{display:block;padding:4px 6px;border-radius:6px;font-size:12.5px;color:var(--tx2);text-decoration:none;border-left:2px solid transparent}
.guide-toc li a:hover{background:var(--surf2);color:var(--tx)}
.guide-toc li a.active{color:var(--blu);background:var(--blu-bg);border-left-color:var(--blu);font-weight:600}
.guide-content-head{justify-content:space-between;margin-bottom:.2rem}
.guide-content-head h1{border-left:none;padding-left:0;margin-bottom:0}
.guide-body{margin-top:.7rem;font-size:14px;line-height:1.65}
.guide-body h2{font-size:16px;margin:1.1rem 0 .4rem}
.guide-body h2:first-child{margin-top:0}
.guide-body h3{font-size:14px;margin:.9rem 0 .3rem;color:var(--tx2)}
.guide-body p{margin-bottom:.75rem}
.guide-body ul,.guide-body ol{margin:0 0 .75rem 1.3rem}
.guide-body li{margin-bottom:.25rem}
.guide-body table.rt{margin-bottom:.85rem}
.guide-tbl-divider{background:var(--surf2);color:var(--tx2);text-transform:uppercase;font-size:11px;letter-spacing:.04em}
.guide-body code{font-family:var(--mono);font-size:12px;background:var(--surf2);border-radius:4px;padding:1px 5px}
.guide-editor{width:100%;font-family:inherit;margin-top:.4rem;border-top-left-radius:0;border-top-right-radius:0}
.guide-toolbar{display:flex;gap:4px;align-items:center;flex-wrap:wrap;background:var(--surf2);border:1px solid var(--bdr2);border-bottom:none;border-radius:var(--r) var(--r) 0 0;padding:6px 8px}
.guide-toolbar .btn.mini{min-width:26px}
.guide-tb-sep{width:1px;align-self:stretch;background:var(--bdr2);margin:0 3px}
.guide-syntax-hint{margin:.4rem 0}
.guide-img{max-width:100%;border-radius:8px;border:1px solid var(--bdr);margin:.4rem 0;display:block}
.guide-delete-form{margin-top:1rem;padding-top:.85rem;border-top:1px solid var(--bdr)}
@media(max-width:700px){.grid-guide{grid-template-columns:1fr}.guide-toc-card{position:static}}

/* 2026-09-23, per Jake: "the various really long dropdowns ... easier to search through / use
   ... sort them alphabetically, and ... start typing and it will sort through them as I type" --
   progressive enhancement, see base.html's initSearchableSelect. The native <select> stays in
   the DOM (name/value/onchange/form-submit all untouched) just visually hidden -- this widget is
   purely a friendlier way to set its value. */
.ss-wrap{position:relative;display:inline-block}
select.ss-native{position:absolute;opacity:0;height:1px;width:1px;overflow:hidden;pointer-events:none}
.ss-input{width:100%}
.ss-list{position:absolute;top:calc(100% + 2px);left:0;z-index:40;min-width:100%;max-height:260px;overflow-y:auto;
  background:var(--surf);border:1px solid var(--bdr2);border-radius:var(--r);box-shadow:0 6px 20px rgba(0,0,0,.15)}
.ss-item{padding:6px 9px;font-size:13px;cursor:pointer;white-space:nowrap}
.ss-item:hover,.ss-item.ss-active{background:var(--surf2)}
.ss-item.ss-selected{font-weight:600;color:var(--blu)}
.ss-item.ss-empty{color:var(--tx2);cursor:default}
.ss-item.ss-empty:hover{background:none}
