/* eCounty public pages (ecounty.us and <county>-<state>.ecounty.us) */
:root {
  --bg: #f6f4ef; --card: #ffffff; --ink: #1d2b36; --muted: #5d6b76; --line: #e2ddd2;
  --accent: #2a5f8f; --accent-ink: #ffffff; --soft: #e8eef4; --ok: #2f7a4f; --warn: #a3620a;
  --radius: 12px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #12181d; --card: #1a2229; --ink: #e7ecef; --muted: #9aa7b1; --line: #2b353e; --accent: #6aa5d8; --accent-ink: #0d1418; --soft: #1f2c37; --ok: #6cc28f; --warn: #e2a74b; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #12181d; --card: #1a2229; --ink: #e7ecef; --muted: #9aa7b1; --line: #2b353e; --accent: #6aa5d8; --accent-ink: #0d1418; --soft: #1f2c37; --ok: #6cc28f; --warn: #e2a74b; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--card); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .2px; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0; max-width: 640px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2 { font-size: 19px; margin: 0 0 10px; }
section { margin: 0 0 28px; }
section > h2 { font-size: 22px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.k { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 600; white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); }
.next { border-left: 4px solid var(--accent); }
.next .date { font-size: 24px; font-weight: 700; }
ol.agenda { margin: 8px 0 0; padding-left: 22px; }
ol.agenda li { margin: 2px 0; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
details summary { cursor: pointer; font-weight: 600; }
.minutes { white-space: pre-wrap; margin: 10px 0 0; font-size: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.table { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; }
.contact b { display: block; }
.contact a { text-decoration: none; }
footer { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 6px 0; }
@media (max-width: 600px) { .hero { padding: 26px 0 16px; } .hide-sm { display: none; } }
/* eTribe (<tribe>.ecounty.us): the tribe page and its maps */
.contact .phone { display: block; font-size: 26px; font-weight: 700; margin: 4px 0 6px; text-decoration: none; }
.stat { font-size: 15px; margin: 0 0 8px; } .stat b { font-size: 24px; display: block; line-height: 1.2; }
ul.cats { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 14px; }
ul.cats li { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
ul.cats i { width: 14px; height: 14px; border-radius: 3px; flex: none; display: inline-block; opacity: .8; }
ul.cats i.line { background: none; border: 3px solid; border-radius: 2px; width: 10px; height: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; } a.pill { text-decoration: none; color: var(--accent); }
.wrap.wide { max-width: none; }
body.mapbody { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.mapwrap { flex: 1; display: flex; min-height: 0; }
#map { flex: 1; min-width: 0; background: #dfe6e9; }
.panel { width: 340px; flex: none; overflow-y: auto; background: var(--card); border-left: 1px solid var(--line); padding: 14px 16px 24px; }
.panel h1 { font-size: 20px; margin: 0 0 6px; } .panel h2 { font-size: 15px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
table.mini { font-size: 13.5px; margin: 6px 0 10px; } table.mini th, table.mini td { padding: 4px 4px; } table.mini .n { text-align: right; white-space: nowrap; }
.dl { margin: 0 0 12px; } .dl .btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dl .btn, .panel button.btn { font: inherit; font-size: 13.5px; padding: 6px 12px; cursor: pointer; }
.pop table { font-size: 13px; margin-top: 4px; } .pop th { text-transform: none; letter-spacing: 0; padding: 2px 8px 2px 0; font-size: 12px; } .pop td { padding: 2px 0; border: 0; } .pop th { border: 0; }
.town span { font: 600 12px system-ui, sans-serif; color: #1d2b36; background: rgba(255,255,255,.8); padding: 1px 5px; border-radius: 4px; white-space: nowrap; position: relative; left: -50%; }
.leaflet-container { font: 14px system-ui, sans-serif; }
@media (max-width: 760px) {
  .mapwrap { flex-direction: column; } #map { flex: 1 1 60%; }
  .panel { width: auto; flex: 0 0 40%; border-left: 0; border-top: 1px solid var(--line); }
}
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; opacity: .85; }
.pin { width: 22px !important; height: 22px !important; margin: -11px 0 0 -11px !important; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 11px system-ui, sans-serif; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.pin.small { width: 14px !important; height: 14px !important; margin: -7px 0 0 -7px !important; font-size: 0; }
.panel label.tog { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 3px 0; cursor: pointer; }
.panel .dirlist { font-size: 13.5px; } .panel .dirlist div { margin: 0 0 7px; } .panel .dirlist a.go { cursor: pointer; }
[hidden] { display: none !important; }
/* eTribe: life of the nation (tribe-life.js) */
.nws { display: block; font-size: .72em; font-weight: 600; opacity: .8; letter-spacing: .2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chip { display: inline-flex; flex-direction: column; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.chip:hover { border-color: var(--accent); }
ol.timeline { list-style: none; margin: 14px 0 0; padding: 0; border-left: 3px solid var(--line); }
ol.timeline li { display: flex; gap: 14px; margin: 0 0 14px; padding-left: 14px; position: relative; font-size: 15px; }
ol.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
ol.timeline .yr { flex: none; width: 64px; font-weight: 700; color: var(--accent); }
figure.bars { margin: 14px 0 6px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
figure.bars figcaption { font-weight: 700; margin: 0 0 8px; }
.bar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 48px; gap: 10px; align-items: center; margin: 6px 0; font-size: 14px; }
.bar .bt { background: var(--soft); border-radius: 6px; height: 16px; overflow: hidden; } .bar .bt i { display: block; height: 100%; border-radius: 6px; }
.bar b { text-align: right; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; } .tile b { display: block; font-size: 28px; line-height: 1.1; color: var(--accent); } .tile span { font-size: 13.5px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.cal .mo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; } .cal h3 { margin: 0 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.cal .ev { margin: 0 0 8px; font-size: 14.5px; } .cal .ev .k { display: block; font-size: 13px; }
details.src { margin-top: 10px; background: none; border: 0; padding: 0; } details.src summary { font-weight: 600; color: var(--muted); font-size: 14px; } details.src ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
ul.plain { margin: 0; padding-left: 18px; font-size: 14.5px; } ul.plain li { margin: 2px 0; }
input.search { width: 100%; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; margin: 0 0 10px; }
details.subj { margin: 0 0 6px; padding: 8px 14px; }
.li { margin: 0 0 10px; font-size: 15px; } a.ph { font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 600px) { ol.timeline .yr { width: 52px; } .bar { grid-template-columns: 1fr 44px; } .bar .bl { grid-column: 1 / -1; } }
/* eTribe sovereignty guides: airspace, carbon, spectrum (tribe-life.js guides) */
.chip.sov { border-color: var(--accent); }
.sovgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.sovcard { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.sovcard:hover { border-color: var(--accent); } .sovcard .ic, section.sov h2 .ic { font-size: 26px; line-height: 1; }
.sovcard b { font-size: 17px; }
ul.facts { list-style: none; margin: 0; padding: 0; } ul.facts li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 8px; font-size: 15px; }
ul.facts li.mine { border-left: 4px solid var(--ok); }
/* eTribe directory and nation pages (tribes.js) */
.dirtools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; } .dirtools input, .dirtools select { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.dirtools input { flex: 1 1 240px; }
#dmap { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); margin: 0 0 14px; background: #dfe6e9; }
#nmap { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); background: #dfe6e9; }
.nlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.nrow { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 15px; }
.nrow:hover { border-color: var(--accent); } .nrow .k { display: block; font-size: 13px; }
.nrow .full { color: var(--ok); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.counts { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; } .counts .tile { flex: 1 1 160px; }

/* County portal (server/county-portal.js) */
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.brand-sub { font-weight: 400; color: var(--muted); }
.notice { background: var(--soft); border-bottom: 1px solid var(--line); font-size: 14px; }
.notice .wrap { padding: 8px 16px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 18px 0 4px; }
main h1 { font-size: clamp(26px, 4.5vw, 38px); line-height: 1.15; margin: 14px 0 8px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 760px; }
h3 { font-size: 17px; margin: 0 0 6px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.card.link { text-decoration: none; color: inherit; display: block; }
.card.link:hover, .card.link:focus-visible { border-color: var(--accent); }
.options { display: grid; gap: 14px; }
.option { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); text-decoration: none; color: inherit; }
.option:hover, .option:focus-visible { border-color: var(--accent); box-shadow: 0 6px 22px rgba(0,0,0,.08); outline: none; }
.option h3 { font-size: 24px; margin: 0 0 4px; } .option h3 b { color: var(--accent); }
.option p { margin: 0; color: var(--muted); max-width: 520px; } .option p b { color: var(--ink); }
.addr { font: 13px ui-monospace, Menlo, monospace; color: var(--muted); margin-top: 6px; display: block; }
.board { margin: 0; font-size: 14px; color: var(--muted); }
ul.links { padding-left: 18px; margin: 0 0 10px; } ul.links li { margin: 5px 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 14px; } dl.facts dd { margin: 0; }
.people { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.person { display: flex; flex-direction: column; gap: 2px; }
ol.toc li, ol.steps li { margin: 6px 0; } ol.steps li p { margin: 4px 0 0; color: var(--ink); }
.cite { font-size: 12.5px; white-space: nowrap; color: var(--muted); }
.source { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; }
.from { white-space: pre-wrap; color: var(--muted); }
details { margin: 0 0 8px; } details summary { min-height: 44px; display: flex; align-items: center; }
section { margin: 0 0 30px; }
main { overflow-wrap: anywhere; }
