/* Nameplate Research — tracker portal. Follows the landing page: off-white paper, ink, old-style serif. */
:root {
  --paper: #f6f6f4;
  --paper-2: #eeede8;
  --paper-3: #e6e5df;
  --ink: #1b1b1a;
  --body: #4a4a47;
  --muted: #8a8a86;
  --rule: #d9d8d2;
  --flame: #1d5c8f;
  --flame-ink: #143f63;
  --ok: #2f6b3a;
  --warn: #9a5b12;
  --s-announced: #cfdce8;
  --s-permitting: #a9c3da;
  --s-permitted: #7aa3c6;
  --s-construction: #4a7fae;
  --s-commissioning: #2a5f8f;
  --s-operating: #1b1b1a;
  --s-inactive: #b9b8b2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1280px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--flame); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; margin: 0; }
h1 { font-size: 2rem; line-height: 1.15; }
h2 { font-size: 1.35rem; line-height: 1.25; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.75em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.body { color: var(--body); }
.small { font-size: 12.5px; }
.serif { font-family: var(--serif); }
button, .btn {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--ink);
  border-radius: 3px; padding: 6px 12px; cursor: pointer; line-height: 1.2;
}
button:hover, .btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
button.quiet, .btn.quiet { border-color: var(--rule); color: var(--body); }
button.quiet:hover { background: var(--paper-2); color: var(--ink); }
button.primary { background: var(--ink); color: var(--paper); }
button.primary:hover { background: var(--flame-ink); border-color: var(--flame-ink); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid var(--rule);
  border-radius: 3px; padding: 7px 9px; width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--flame); outline-offset: 1px;
}
label { display: block; font-size: 12.5px; color: var(--body); margin-bottom: 4px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---------------------------------------------------------------- frame */
.topbar {
  border-bottom: 1px solid var(--rule); background: var(--paper);
}
.topbar .in {
  max-width: var(--max); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; height: 56px;
}
.wordmark { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 10px; letter-spacing: 0.02em; }
.nav { display: flex; gap: 20px; margin-left: 8px; }
.nav a { color: var(--body); font-size: 14px; padding: 18px 0; border-bottom: 2px solid transparent; }
.nav a:hover { text-decoration: none; color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.topbar .who form { margin: 0; }
main { flex: 1; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 28px 24px 56px; }
.wrap.narrow { max-width: 860px; }
footer.site {
  border-top: 1px solid var(--rule); color: var(--muted); font-size: 12.5px;
}
footer.site .in { max-width: var(--max); margin: 0 auto; padding: 18px 24px 36px; display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- intro */
.intro { max-width: 760px; }
.intro h1 { font-size: 2.25rem; }
.intro .lede { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; color: var(--body); margin: 14px 0 6px; }
.intro .lede b { font-weight: 400; color: var(--ink); }
.dates { font-size: 12.5px; color: var(--muted); }
.dates span + span::before { content: " \2014 "; color: var(--rule); }

/* ---------------------------------------------------------------- filters */
.filters {
  position: sticky; top: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  margin: 24px -24px 0; padding: 10px 24px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
}
.filters input[type=text] { width: 220px; }
.filters select { width: auto; max-width: 200px; padding-right: 26px; }
.filters .count { margin-left: auto; font-size: 13px; color: var(--body); white-space: nowrap; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  font-size: 12.5px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; color: var(--body);
}
.chip .sw { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid rgba(27,27,26,.25); }
.chip.on { border-color: var(--ink); color: var(--ink); background: var(--paper-2); }
.chip.off { opacity: .45; }
.chip:hover { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }

/* ---------------------------------------------------------------- map + panel */
.stage { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 24px; margin-top: 20px; align-items: start; }
.mapcol { min-width: 0; }
.mapnote { margin: 6px 2px 0; }
table.data td.empty { text-align: center; padding: 28px; color: var(--body); }
table.data td.empty button { margin-left: 8px; }
.mapbox { position: relative; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.mapbox svg { display: block; width: 100%; height: auto; }
.mapbox .county { fill: #f2f1ec; stroke: #d5d4ce; stroke-width: .5; }
.mapbox .county:hover { fill: #e9e8e2; }
.mapbox .state { fill: none; stroke: var(--ink); stroke-width: 1; }
.mapbox .site { stroke: var(--paper); stroke-width: .8; cursor: pointer; opacity: .92; }
.mapbox .site.county-approx { stroke: var(--ink); stroke-dasharray: 2 1.5; fill-opacity: .25; stroke-width: .8; }
.mapbox .site.sel { stroke: var(--ink); stroke-width: 2; opacity: 1; }
.mapbox .site.dim { opacity: .18; pointer-events: none; }
.maptools { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.maptools button { width: 30px; height: 30px; padding: 0; font-size: 16px; background: #fff; border-color: var(--rule); }
.maplegend { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--body); display: flex; flex-direction: column; gap: 3px; }
.maplegend .row { display: flex; align-items: center; gap: 6px; }
.maplegend .sw { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(27,27,26,.25); }
.maplegend .sw.hollow { background: transparent !important; border: 1px dashed var(--ink); }
.maplegend .size { display: flex; align-items: flex-end; gap: 6px; margin-top: 4px; }
.maplegend .size i { display: inline-block; border-radius: 50%; background: rgba(27,27,26,.18); border: 1px solid rgba(27,27,26,.35); }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12.5px; padding: 7px 10px;
  border-radius: 3px; max-width: 260px; line-height: 1.35; opacity: 0; transition: opacity .08s; z-index: 4;
}
.tip b { font-family: var(--serif); font-weight: 400; font-size: 14px; display: block; margin-bottom: 2px; }
.panel { border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; background: #fff; min-height: 300px; }
.panel.empty { color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.panel h2 { margin-bottom: 4px; }
.panel .meta { color: var(--body); font-size: 13px; margin-bottom: 12px; }
.panel .overview { font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink); }
.panel .facts { margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; }
.panel .facts div span { display: block; color: var(--muted); font-size: 11.5px; }
.panel .more { margin-top: 16px; }

/* ---------------------------------------------------------------- pills + badges */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px 2px 7px; border-radius: 999px;
  border: 1px solid var(--rule); background: #fff; color: var(--body); white-space: nowrap;
}
.pill .sw { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(27,27,26,.25); }
.tag { display: inline-block; font-size: 11.5px; color: var(--body); background: var(--paper-2); border-radius: 3px; padding: 1px 6px; white-space: nowrap; }
.tag.q { color: var(--warn); background: #f7efe3; }
.tag.v { color: var(--ok); background: #e8f0e9; }
.tag.c { color: #8a2d2d; background: #f6e8e8; }
.na { color: var(--muted); }

/* ---------------------------------------------------------------- table */
.tablewrap { margin-top: 28px; overflow-x: auto; position: relative; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data th { font-weight: 500; color: var(--body); font-size: 12.5px; white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: var(--sticky-top, 0); background: var(--paper); z-index: 2; }
table.data th.on { color: var(--ink); }
table.data th.on::after { content: " \25BE"; font-size: 10px; }
table.data th.on.asc::after { content: " \25B4"; }
table.data td.r, table.data th.r { text-align: right; }
table.data tr:hover td { background: #fbfaf7; }
table.data td a.name { font-family: var(--serif); font-size: 14.5px; color: var(--ink); }
table.data td .sub { display: block; color: var(--muted); font-size: 12px; }
table.data td.nowrap { white-space: nowrap; }
.wm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; opacity: .045; font-size: 20px; line-height: 3.2; transform: rotate(-18deg); white-space: pre-wrap; color: var(--ink); user-select: none; }

/* ---------------------------------------------------------------- project page */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--body); }
.phead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-bottom: 6px; }
.phead h1 { font-size: 2.1rem; }
.pmeta { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 6px 0 22px; color: var(--body); }
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr); gap: 36px; align-items: start; }
.cols .left { min-width: 0; }
.cols .left table.data { font-size: 12.5px; }
.cols .left table.data th, .cols .left table.data td { padding: 6px 8px; }
.cols .left .section:first-of-type { margin-top: 10px; }
.notes { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 640px; }
.notes section { margin-bottom: 20px; }
.notes section h3 { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.notes p { margin: 0; }
.facts { border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
.facts dl { margin: 0; padding: 6px 0; }
.facts .grp { padding: 8px 16px 4px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--rule); }
.facts .grp:first-child { border-top: 0; }
.facts dt { font-size: 12px; color: var(--body); padding: 6px 16px 0; }
.facts dd { margin: 0; padding: 1px 16px 7px; font-size: 13.5px; line-height: 1.4; }
.facts dd .q { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.section { margin-top: 36px; }
.section h2 { margin-bottom: 10px; }
.section .sub { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.timeline li .d { color: var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline li .q { display: block; color: var(--muted); font-size: 12px; }
.evidence { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--body); align-items: center; }
.evidence .bar { display: flex; height: 8px; width: 220px; border-radius: 2px; overflow: hidden; background: var(--paper-3); }
.evidence .bar i { display: block; height: 100%; }
.ask { border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; max-width: 640px; background: #fff; }
.ask .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.ask textarea { min-height: 76px; }
.ask .ok { color: var(--ok); margin-bottom: 10px; }

/* ---------------------------------------------------------------- charts */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 34px; }
.chart h3 { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.chart .sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .bar { fill: var(--flame); }
.chart .bar.na { fill: var(--s-inactive); }
.chart .bar.conv { fill: var(--s-permitted); }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--body); }
.chart .axis line, .chart .axis path { stroke: var(--rule); }

/* ---------------------------------------------------------------- login */
.login { max-width: 400px; margin: 10vh auto 0; padding: 0 24px; }
.login .mark { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 4px; }
.login .sub { color: var(--body); font-family: var(--serif); font-size: 1.05rem; margin-bottom: 30px; }
.login form > div { margin-bottom: 14px; }
.login .err { color: #8a2d2d; margin-bottom: 14px; font-size: 13.5px; }
.login .note { color: var(--muted); font-size: 12.5px; margin-top: 18px; line-height: 1.5; }

/* ---------------------------------------------------------------- admin */
.admin h2 { margin: 30px 0 10px; }
.admin table.data th { top: 0; }
.admin .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.admin form.inline { display: inline; }
.admin form.inline button { padding: 3px 8px; font-size: 12px; }
.card { border: 1px solid var(--rule); border-radius: 4px; padding: 16px 18px; background: #fff; }
.card pre { white-space: pre-wrap; font: inherit; background: var(--paper-2); padding: 12px; border-radius: 3px; margin: 8px 0 0; }
.newuser { border: 1px solid var(--ink); border-radius: 4px; padding: 16px 18px; background: #fff; margin: 14px 0 24px; }
.newuser .pw { font-family: ui-monospace, Menlo, monospace; font-size: 16px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.f2 > div.full { grid-column: 1 / -1; }
.status-ok { color: var(--ok); } .status-warn { color: var(--warn); } .status-bad { color: #8a2d2d; }

/* ---------------------------------------------------------------- about */
.prose { font-family: var(--serif); font-size: 16.5px; line-height: 1.55; max-width: 680px; color: var(--ink); }
.prose h2 { margin: 28px 0 8px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 4px; }
.prose .sans { font-family: var(--sans); font-size: 13.5px; color: var(--body); }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 8px; }
.twocol .card h3 { margin-bottom: 8px; }
.twocol .card ul { margin: 0; padding-left: 1.1em; font-size: 14px; line-height: 1.5; }

.menubtn { display: none; }
@media (max-width: 900px) {
  .stage, .cols, .charts, .admin .grid2, .twocol { grid-template-columns: 1fr; }
  .topbar .in { gap: 12px; padding: 0 16px; flex-wrap: wrap; height: auto; min-height: 56px; }
  .wordmark { flex: 1; min-width: 0; } .wordmark small { display: block; margin: 0; }
  .menubtn { display: inline-block; margin-left: auto; }
  .nav, .topbar .who { display: none; width: 100%; }
  body.nav-open .nav { display: flex; flex-direction: column; gap: 0; margin: 0; border-top: 1px solid var(--rule); }
  body.nav-open .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  body.nav-open .nav a.on { border-bottom-color: var(--rule); font-weight: 600; }
  body.nav-open .topbar .who { display: flex; justify-content: space-between; padding: 12px 0 14px; }
  body.nav-open .topbar .who span.email { display: inline; }
  .wrap { padding: 20px 16px 48px; }
  .filters { margin: 18px -16px 0; padding: 10px 16px; position: static; } .filters input[type=text] { width: 100%; }
  .filters .count { margin-left: 0; width: 100%; }
  .intro h1 { font-size: 1.8rem; } .phead h1 { font-size: 1.7rem; }
  table.data th { top: 0; position: static; }
  .panel { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
