/* ════════════════════════════════════════════════════════════════════════
   ourloris.com — shared stylesheet
   Design tokens, base/reset, site chrome (utility bar, header, footer),
   theme + dark mode. Loaded by every page; the per-page <style> block holds
   only that page's own components. Chrome markup lives in shared.js
   (<site-header> / <site-footer>).
   ════════════════════════════════════════════════════════════════════════ */

/* Cache-bust: pages load this as shared.css?v=N and shared.js?v=N. Bump N on
   every page when either shared asset changes materially. Current: v=4 (Material palette retune). */

:root{
  --ink:#15213d;
  --ink-soft:#45506b;
  --paper:#f5f7fa;            /* cool near-white — civic, not warm/beige */
  --card:#ffffff;
  --primary:#1e4fa3;          /* Lions royal, deepened for civic gravitas */
  --primary-dark:#15356c;
  --primary-soft:#e7edf9;
  --accent:#e4ae25;           /* Lions gold, cleaner and brighter; decorative, never body text */
  --accent-soft:#faf0d1;
  --accent-line:#e6cf8f;      /* borders on gold surfaces */
  --accent-ink:#86670a;       /* gold that must read as text/focus ring; >=4.5:1 on paper/card/soft */
  --line:#e3e7ee;
  --line-strong:#ccd3de;
  --good:#2e7d57;
  --bad:#b3402f;
  --shadow:0 1px 2px rgba(22,36,31,.05);
  --shadow-lift:0 2px 6px rgba(22,36,31,.08),0 18px 40px rgba(22,36,31,.12);
  --radius:4px;
  --radius-sm:2px;
  --maxw:1120px;
}

/* ── CANONICAL BREAKPOINTS — use ONLY these values in any @media ──────────
   900px  nav → hamburger; sidebar/2-col page layouts → single column
   700px  3-up card grids → 2-up; wide table→card transforms
   560px  everything → single column; compact chrome + tighter spacing
   (min-width:900px / :901px companions for desktop-only rules)
   ──────────────────────────────────────────────────────────────────────── */

/* base / reset */
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:90px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink);background:var(--paper);line-height:1.55;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:Fraunces,Georgia,serif;line-height:1.12;margin:0;color:var(--ink);letter-spacing:-.01em}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 24px}

/* breadcrumb nav — shared across subpages (markup: <nav class="crumb" aria-label="Breadcrumb">) */
.crumb{font-size:13px;color:var(--ink-soft);padding:18px 0 0}
.crumb a{color:var(--ink-soft);font-weight:500}
.crumb a:hover{color:var(--primary)}
.crumb span{margin:0 8px;color:var(--line-strong)}

.skip{position:absolute;left:-999px;top:0;background:var(--ink);color:#fff;padding:10px 16px;border-radius:0 0 8px 0;z-index:200}
.skip:focus{left:0}
:focus-visible{outline:3px solid var(--accent-ink);outline-offset:2px;border-radius:4px}

/* responsive safety net — media never overflows; long tokens/links wrap */
img,video,iframe{max-width:100%;height:auto}
svg{max-width:100%}
:where(p,li,dd,dt,figcaption,blockquote,.legible,.desc,.meta,.sec-body,.bar-explain,.doc-meta,.s-sub){overflow-wrap:break-word}
a{overflow-wrap:break-word}

/* custom-element wrappers generate no box so the sticky header still works */
site-header,site-footer{display:contents}

/* prototype badge */
.proto{position:fixed;right:14px;bottom:14px;z-index:120;background:var(--ink);color:#fff;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:8px 12px;border-radius:999px;box-shadow:var(--shadow-lift);opacity:.92}
.proto .proto-mark{margin-right:5px}

/* top disclosure banner — discloses non-official status site-wide, links to About */
.disclaimer-bar{background:var(--accent-soft);color:var(--ink);font-size:13px;border-bottom:1px solid var(--accent-line)}
.disclaimer-bar .wrap{min-height:34px;display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;padding-top:6px;padding-bottom:6px}
.disclaimer-bar b{font-weight:700}
.disclaimer-bar a{color:var(--primary);font-weight:600;white-space:nowrap}
.disclaimer-bar a:hover{text-decoration:underline}

/* site-wide notices banner */
.notices{display:block}
.notice{display:flex;align-items:flex-start;gap:12px;padding:11px 24px;border-bottom:1px solid var(--line);font-size:14px}
.notice .n-dot{flex:0 0 auto;width:9px;height:9px;border-radius:50%;margin-top:6px}
.notice .n-sev{flex:0 0 auto;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75;margin-top:3px}
.notice .n-body{flex:1 1 auto;min-width:0;margin:0;font-weight:500}
.notice .n-src{font-weight:600;white-space:nowrap}
.notice .n-help{font-weight:600}
.notice .n-help-row{display:block;margin-top:3px}
.notice .n-more{display:none}
.notice .n-x{flex:0 0 auto;background:none;border:0;color:inherit;font-size:20px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:var(--radius-sm)}
.notice .n-x:hover{background:rgba(0,0,0,.08)}
/* severity tints (light) */
.notice.n-info{background:#eef3fb;border-bottom-color:#cfdcf0;color:#243b5e}
.notice.n-info .n-dot{background:#3b6fb0}
.notice.n-info .n-src,.notice.n-info .n-help{color:#1f4f8f}
.notice.n-advisory{background:var(--accent-soft);border-bottom-color:var(--accent-line);color:var(--ink)}
.notice.n-advisory .n-dot{background:var(--accent);box-shadow:0 0 0 4px rgba(228,174,37,.20)}
.notice.n-advisory .n-src,.notice.n-advisory .n-help{color:var(--ink-soft)}
.notice.n-urgent{background:#fbecec;border-bottom-color:#efc9c9;color:#7a1f1f}
.notice.n-urgent .n-dot{background:#c0392b;box-shadow:0 0 0 4px rgba(192,57,43,.18)}
.notice.n-urgent .n-src,.notice.n-urgent .n-help{color:#9a2a20}
@media (max-width:700px){
  .notice{padding:10px 16px;font-size:13px}
}
@media (max-width:560px){
  /* Compact phone treatment: severity + title lead, body clamped to two
     lines behind a More/Less toggle, dismiss × pinned top-right (never
     stranded below a wrapped body). See setupNoticeClamp() in shared.js. */
  .notice{position:relative;padding:11px 40px 12px 16px;gap:8px}
  .notice .n-dot{margin-top:5px}
  .notice .n-sev{margin-top:2px}
  .notice .n-x{position:absolute;top:5px;right:6px;padding:4px 8px}
  .notice.n-clamp .n-lede{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  .notice.n-clamp.n-open .n-lede{display:inline;overflow:visible;-webkit-line-clamp:none}
  .notice .n-more{display:block;width:-moz-fit-content;width:fit-content;margin-top:5px;background:none;border:0;padding:0;font:inherit;font-weight:700;color:inherit;text-decoration:underline;cursor:pointer}
  /* Badge shrinks to just the diamond so it stops covering card text; the
     disclaimer bar at the top of every page carries the full prototype message. */
  .proto{padding:7px;line-height:1}
  .proto .proto-mark{margin-right:0;font-size:13px}
  .proto .proto-txt{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
}

/* gold bookend stripe */
.goldbar{height:4px;background:var(--accent)}

/* utility bar */
.util{background:var(--ink);color:#ccd4e4;font-size:13px}
.util .wrap{display:flex;align-items:center;justify-content:space-between;min-height:38px;gap:16px}
.util a{color:#e9eef8}
.util .u-right{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.util .u-right a{display:inline-flex;align-items:center;gap:6px}
.themebtn{background:none;border:0;cursor:pointer;font-size:15px;line-height:1;padding:5px 7px;border-radius:var(--radius);color:inherit}
.themebtn:hover{background:rgba(255,255,255,.14)}

/* header */
header.site{background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:100}
header.site .wrap{display:flex;align-items:center;gap:28px;min-height:74px}
.brand{display:flex;align-items:center;gap:12px;font-family:Fraunces,serif}
.brand .seal{width:42px;height:42px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:700;font-size:19px;flex:0 0 auto;box-shadow:0 0 0 2px var(--accent),0 0 0 3px var(--paper)}
.brand b{font-size:21px;font-weight:600;letter-spacing:-.02em}
.brand small{display:block;font-family:Inter,sans-serif;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-soft);font-weight:600}
nav.main{margin-left:auto;display:flex;gap:2px;align-items:center}
nav.main a{display:inline-flex;align-items:center;gap:6px;padding:9px 11px;border-radius:var(--radius);color:var(--ink);font-weight:500;font-size:15px}
nav.main a:hover{background:var(--primary-soft);text-decoration:none}
nav.main a[aria-current]{background:var(--primary);color:#fff}
nav.main a .ico{width:17px;height:17px}
/* icon vocabulary (#10): inline SVG, inherits color; always beside a label */
.ico{width:1em;height:1em;flex:0 0 auto;vertical-align:-.125em}
/* header weather widget (NWS current conditions; fails silently, hidden on phones) */
.wx{display:inline-flex;align-items:center;gap:8px;color:var(--ink-soft);font-size:13px;line-height:1.15;text-decoration:none;font-weight:500}
.wx:hover{color:var(--primary);text-decoration:none}
.wx[hidden]{display:none}
.wx .wx-ico{flex:0 0 auto;display:inline-flex}
.wx .wx-ico svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wx .wx-text{display:flex;flex-direction:column}
.wx .wx-now{font-weight:600;color:var(--ink)}
.wx .wx-sub{font-size:11px;color:var(--ink-soft)}

/* footer */
footer{background:var(--ink);color:#b9c4da;padding:54px 0 30px;margin-top:10px;border-top:3px solid var(--accent)}
footer h4{color:#fff;font-size:13px;letter-spacing:.1em;text-transform:uppercase;font-family:Inter,sans-serif;margin-bottom:14px}
footer .fgrid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:30px}
footer a{color:#d3dcec}
footer ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:9px;font-size:14px}
footer .fbrand b{font-family:Fraunces,serif;color:#fff;font-size:20px}
footer .fbrand p{font-size:14px;margin:10px 0 0;max-width:260px}
footer .a11y{display:inline-flex;align-items:center;gap:8px;margin-top:14px;font-size:13px;background:rgba(255,255,255,.08);padding:7px 12px;border-radius:var(--radius)}
footer .a11y svg{width:16px;height:16px;stroke:var(--accent);fill:none;stroke-width:1.8}
footer .legal{border-top:1px solid rgba(255,255,255,.12);margin-top:34px;padding-top:20px;font-size:13px;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;color:#9aa6be}

/* mobile nav — hamburger + slide-in drawer (default hidden on desktop) */
.navtoggle{display:none}
.drawer,.navscrim{display:none}
/* keep the hidden attribute authoritative even under the mobile display rules below,
   so a closed drawer is truly inert (out of layout + a11y tree, never tabbable) */
.drawer[hidden],.navscrim[hidden]{display:none!important}
@media (max-width:900px){
  nav.main{display:none}
  footer .fgrid{grid-template-columns:1fr 1fr}
  .navtoggle{display:inline-flex;margin-left:auto;align-items:center;justify-content:center;
    width:44px;height:44px;padding:0;border:1px solid var(--line-strong);border-radius:var(--radius);
    background:var(--card);color:var(--ink);cursor:pointer}
  .navtoggle svg{width:24px;height:24px}
  .navtoggle .i-close{display:none}
  .navtoggle[aria-expanded="true"] .i-open{display:none}
  .navtoggle[aria-expanded="true"] .i-close{display:block}
  .navscrim{display:block;position:fixed;inset:0;background:rgba(10,15,28,.5);z-index:150;opacity:0;transition:opacity .2s}
  .navscrim.open{opacity:1}
  .drawer{display:flex;flex-direction:column;gap:2px;position:fixed;top:0;right:0;bottom:0;
    width:min(84vw,320px);z-index:160;background:var(--paper);box-shadow:var(--shadow-lift);
    overflow-y:auto;transform:translateX(100%);transition:transform .22s ease;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px))}
  .drawer.open{transform:translateX(0)}
  .drawer-links{display:flex;flex-direction:column;gap:2px}
  .drawer-links a{display:flex;align-items:center;gap:12px;min-height:48px;padding:13px 14px;border-radius:var(--radius);
    font-size:17px;font-weight:600;color:var(--ink)}
  .drawer-links a .ico{width:20px;height:20px}
  .drawer-links a:hover{background:var(--primary-soft);text-decoration:none}
  .drawer-links a[aria-current]{background:var(--primary);color:#fff}
  .drawer-actions{display:flex;flex-direction:column;gap:2px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
  .drawer-actions a{display:flex;align-items:center;min-height:44px;padding:10px 14px;font-size:15px;font-weight:600;color:var(--primary)}
}
@media (prefers-reduced-motion:reduce){ .navscrim,.drawer{transition:none} }
@media (max-width:560px){
  .wx{display:none}   /* header space is tight on phones; conditions omitted */
  .util .u-left{display:none}
  footer .fgrid{grid-template-columns:1fr}
  /* densify the stacked top chrome, but keep utility actions tappable */
  header.site .wrap{min-height:58px;gap:14px}
  .brand b{font-size:19px}
  .disclaimer-bar{font-size:12px}
  .disclaimer-bar .wrap{padding-top:8px;padding-bottom:8px}
  .util .wrap{min-height:auto;gap:10px}
  .util .u-right{gap:6px}
  .util .u-right a{min-height:40px;display:inline-flex;align-items:center;padding:4px 2px}
  .themebtn{min-height:40px;min-width:40px}
  .brand small{font-size:11.5px}
  /* add-to-calendar controls: comfortable touch size */
  .lcal-btn{min-height:40px}
  .lcal-menu a{min-height:44px}
}

/* ── dark theme (tokens + chrome overrides; page components override their own warm bits) ── */
html[data-theme="dark"]{
  --ink:#e4e6ea; --ink-soft:#a4aab5;
  --paper:#121315; --card:#1d1f23;
  --primary:#8fb3ee; --primary-dark:#223353; --primary-soft:#1e2530;
  --accent:#ecc361; --accent-soft:#262117; --accent-line:#4d4429; --accent-ink:#efc768;
  --line:#2a2c30; --line-strong:#41454b; --good:#4cae84; --bad:#e07a6a;
  --shadow:0 1px 2px rgba(0,0,0,.35);
  --shadow-lift:0 2px 6px rgba(0,0,0,.5),0 18px 40px rgba(0,0,0,.55);
}
/* surfaces that use --ink as a dark background stay dark in dark mode */
html[data-theme="dark"] .util,
html[data-theme="dark"] footer,
html[data-theme="dark"] .proto,
html[data-theme="dark"] .skip{background:#0d0e10}
/* white-text-on-primary chrome controls keep a deep blue so text stays legible */
html[data-theme="dark"] nav.main a[aria-current],
html[data-theme="dark"] .brand .seal{background:var(--primary-dark);color:#fff}
html[data-theme="dark"] .drawer{background:var(--card)}
html[data-theme="dark"] .drawer-links a[aria-current]{background:var(--primary-dark);color:#fff}
html[data-theme="dark"] .navscrim{background:rgba(0,0,0,.6)}
html[data-theme="dark"] .notice{border-bottom-color:#2c2e33}
html[data-theme="dark"] .notice .n-x:hover{background:rgba(255,255,255,.10)}
html[data-theme="dark"] .notice.n-info{background:#1a2231;border-bottom-color:#2c3d57;color:#cdd9ec}
html[data-theme="dark"] .notice.n-info .n-src,html[data-theme="dark"] .notice.n-info .n-help{color:#9fbfe8}
html[data-theme="dark"] .notice.n-advisory{background:var(--accent-soft);border-bottom-color:var(--accent-line);color:var(--accent-ink)}
html[data-theme="dark"] .notice.n-advisory .n-src,html[data-theme="dark"] .notice.n-advisory .n-help{color:var(--accent-ink)}
html[data-theme="dark"] .notice.n-urgent{background:#291717;border-bottom-color:#562a2a;color:#f0b8b2}
html[data-theme="dark"] .notice.n-urgent .n-src,html[data-theme="dark"] .notice.n-urgent .n-help{color:#f0b8b2}

/* ── off-domain marker ───────────────────────────────────────────────────
   Reusable across pages. Any link that leaves ourloris for ANOTHER
   organization's system (Horry County, iWorQ, Edmunds, SC Courts) wears the
   .offsite-tag pill + a one-line .offsite-why so residents know before they
   click. On-domain city pages we simply haven't mirrored yet do NOT get this
   — they use a plain "on cityoflorissc.com ↗" link instead.

   .offsite-tag rule (documented #85): the pill marks a link that takes the
   reader OFF ourloris to a third-party site to DO something — a portal, a
   payment, an official request. A bare "↗" marks an informational third-party
   reference (a source page you're just reading). Pill = you're about to act
   elsewhere; ↗ = here's where this came from. */
.offsite-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:9px}
.offsite-tag{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--ink);background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:999px;padding:3px 9px;white-space:nowrap}
.offsite-tag svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2.2}
.offsite-why{font-size:12.5px;color:var(--ink-soft)}
html[data-theme="dark"] .offsite-tag{color:var(--accent-ink)}

/* add-to-calendar control (LorisCal.mount) — shared: hero, meetings list, meeting page */
.lcal{position:relative;display:inline-block}
.lcal-btn{display:inline-flex;align-items:center;gap:7px;font:inherit;font-size:13px;font-weight:600;
  cursor:pointer;background:var(--card);color:var(--ink);border:1px solid var(--line-strong);
  border-radius:999px;padding:7px 13px}
.lcal-btn:hover{border-color:var(--primary);color:var(--primary)}
.lcal-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;flex:0 0 auto}
.lcal-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:30;background:var(--card);
  border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:var(--shadow-lift);
  padding:6px;min-width:210px;display:flex;flex-direction:column;gap:2px}
.lcal-menu[hidden]{display:none}
.lcal-menu a{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:var(--radius-sm);
  font-size:14px;font-weight:600;color:var(--ink)}
.lcal-menu a:hover{background:var(--primary-soft);text-decoration:none}
.lcal-menu a svg{width:16px;height:16px;fill:none;stroke:var(--primary);stroke-width:1.9;flex:0 0 auto}
/* on narrow screens anchor the menu to the right edge so it can't spill off-screen */
@media (max-width:560px){
  .lcal-menu{left:auto;right:0;min-width:0;width:max-content;max-width:calc(100vw - 32px)}
}

/* <city-limits-help> — reusable "are you inside the city limits?" explainer.
   Self-contained drop-in card; used on trash/tax/water/street pages. */
city-limits-help{display:block}
.cityhelp{background:var(--card);border:1px solid var(--line-strong);
  border-left:4px solid var(--primary);border-radius:var(--radius);
  padding:20px 22px;box-shadow:var(--shadow);margin:22px 0}
.cityhelp-head{display:flex;align-items:center;gap:10px;margin:0 0 6px}
.cityhelp-head svg{width:22px;height:22px;stroke:var(--primary);fill:none;stroke-width:1.9;flex:0 0 auto}
.cityhelp-head h2{font-size:19px;font-weight:600;margin:0}
.cityhelp-lede{margin:0 0 14px;font-size:14.5px;color:var(--ink-soft);max-width:640px}
.cityhelp-checks{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:9px;
  font-size:14.5px;color:var(--ink-soft)}
.cityhelp-checks b{color:var(--ink)}
.cityhelp-checks a{font-weight:600}
.cityhelp-more{margin:14px 0 0;font-size:14px;color:var(--ink-soft)}

/* ── print handout pattern (issue #84) ─────────────────────────────────────
   Drop-in for any page that wants a printable, chrome-free handout:
     <button type="button" class="printbtn" data-print>…SVG… Print this page</button>
     <div class="print-head"><b>Title</b><span>Sub-line</span></div>
   shared.js auto-wires [data-print] / #printBtn to window.print() — no
   per-page script needed. Add class="no-print" to strip anything else (e.g.
   an interactive widget) from the handout. Page-specific print tweaks
   (layout collapse, extra break-inside rules) stay local to that page. */
.printbtn{flex:0 0 auto;margin-top:14px;appearance:none;border:1px solid var(--line-strong);background:var(--card);color:var(--ink);font:inherit;font-weight:600;font-size:14px;border-radius:var(--radius-sm);padding:10px 15px;cursor:pointer;display:inline-flex;gap:8px;align-items:center;box-shadow:var(--shadow)}
.printbtn:hover{border-color:var(--primary);color:var(--primary)}
.printbtn svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9}
/* print-only header line (hidden on screen, shown when printed) */
.print-head{display:none}

@media print{
  :root{
    --paper:#fff;--card:#fff;--ink:#161616;--ink-soft:#3a3a3a;
    --line:#d6d6d6;--line-strong:#b3b3b3;--primary-soft:#eef2f4;--shadow:none;
  }
  html,body{background:#fff}
  site-header,site-footer,.crumb,.printbtn,.no-print{display:none !important}
  .print-head{display:block;border-bottom:2px solid var(--primary);padding-bottom:8px;margin-bottom:6px}
  .print-head b{font-family:Fraunces,serif;font-size:17px;color:var(--primary)}
  .print-head span{display:block;font-size:12px;color:var(--ink-soft);margin-top:2px}
  a{color:var(--ink);text-decoration:none}
  /* generic handout blocks: avoid splitting a card across a page break */
  .step,.panel,.nd{break-inside:avoid}
}
.cityhelp-more a{font-weight:600}
