/* District Fiscal Tools: Allocations.
   House style carried from districtfiscaltools.com: statement chrome, color as
   surface, tinted table heads, no newspaper rules. */

:root {
  --paper: #FBFBF8;
  --ink: #16211B;
  --green: #1A5741;
  --green-deep: #134232;
  --greenbar: #EAF1EA;
  --greenbar-hover: #DCE9DD;
  --goldenrod: #C89B3C;
  --gold-soft: #E8C87E;
  --pale-on-green: #D7E4DB;
  --muted: #57675E;
  --hairline: #DAE0DA;
  --flag: #8A2D22;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  padding: 0 0 4rem;
}
main { max-width: 69rem; margin: 0 auto; padding: 0 1.5rem; }
.mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
a { color: var(--green); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--green); outline-offset: 2px;
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: #FFF; padding: .5rem .9rem; z-index: 10; }

/* ---- the statement band: masthead plus the one number ---- */
.band { background: var(--green); border-bottom: 3px solid var(--goldenrod); color: #FFFFFF; }
.mast-inner {
  max-width: 69rem; margin: 0 auto; padding: 1.2rem 1.5rem 1.05rem;
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: .4rem 2rem;
}
.wordmark { font-family: "Besley", Georgia, serif; font-weight: 800; font-size: clamp(1.25rem, 3vw, 1.55rem); letter-spacing: .01em; }
.wordmark a { color: #FFFFFF; text-decoration: none; }
.wordmark span { color: var(--gold-soft); }
.mast-right { font-size: .8rem; color: var(--pale-on-green); text-align: right; line-height: 1.5; }
.mast-right .mono { font-size: .7rem; letter-spacing: .02em; }

.hero { max-width: 69rem; margin: 0 auto; padding: 2.2rem 1.5rem 2.6rem; }
.hero .eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pale-on-green); display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem;
}
.hero .eyebrow::before { content: ""; width: .6em; height: .6em; background: var(--goldenrod); flex: none; }
.hero h1 {
  font-family: "Besley", Georgia, serif; font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.12; letter-spacing: -0.015em;
}
.hero .figure {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: clamp(2.2rem, 7.4vw, 4.4rem);
  line-height: 1.05; letter-spacing: -0.02em; margin: .9rem 0 .1rem;
}
.hero .caption { color: var(--pale-on-green); font-size: .95rem; max-width: 44em; margin-top: .55rem; }
.hero .delta { margin-top: 1.1rem; font-size: clamp(1.02rem, 2vw, 1.2rem); font-weight: 600; max-width: 44em; }
.hero .crumbs { font-size: .8rem; color: var(--pale-on-green); margin-bottom: 1.1rem; }
.hero .crumbs a { color: #FFFFFF; }

/* ---- sections ---- */
section { margin-top: 3.2rem; }
.kicker { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h2 { font-family: "Besley", Georgia, serif; font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.55rem); letter-spacing: -0.015em; margin-top: .2rem; }
h3 { font-weight: 700; font-size: 1rem; margin-top: .1rem; }
section > p { margin-top: .8rem; max-width: 46em; }
.lede { color: var(--muted); font-size: .95rem; }

.stage-notes { margin-top: 1.8rem; border-left: 3px solid var(--goldenrod); padding: .1rem 0 .1rem 1rem; }
.stage-notes p { font-size: .88rem; color: var(--muted); max-width: 46em; }
.stage-notes p + p { margin-top: .55rem; }

.meta-row {
  margin-top: 1.6rem; padding-top: .8rem; border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .78rem; color: var(--muted);
}
.meta-row .mono { font-size: .74rem; }
.tie-ok { color: var(--green); font-weight: 600; }
.tie-bad { color: var(--flag); font-weight: 700; }

/* ---- tables ---- */
table.schedule { width: 100%; border-collapse: collapse; margin-top: 1.3rem; }
.schedule caption { text-align: left; font-size: .82rem; color: var(--muted); padding-bottom: .6rem; }
.schedule th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #FFFFFF; background: var(--green); text-align: left; padding: .55rem 1rem .55rem 0;
}
.schedule th:first-child { padding-left: .9rem; }
.schedule th.num, .schedule td.num { text-align: right; }
.schedule th:last-child, .schedule td:last-child { padding-right: .9rem; }
.schedule td { padding: .72rem 1rem .72rem 0; vertical-align: baseline; font-size: .92rem; }
.schedule td:first-child { padding-left: .9rem; }
.schedule tbody tr:nth-child(odd) { background: var(--greenbar); }
.schedule tbody tr:hover { background: var(--greenbar-hover); }
.schedule td.num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.schedule td.code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.schedule td.when { font-size: .84rem; white-space: nowrap; }
.schedule tfoot td { padding: .8rem .9rem; border-top: 1px solid var(--ink); font-size: .86rem; color: var(--muted); }
.schedule tfoot td.num { color: var(--ink); }
.up { color: var(--green); }
.down { color: var(--flag); }
.soon { color: var(--flag); font-weight: 600; }
.unknown { color: var(--muted); font-style: italic; }
.double-rule { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); height: 5px; margin-top: 1.1rem; }

/* ---- disclosure blocks ---- */
details { border-top: 1px solid var(--hairline); padding: .95rem 0; }
details:last-of-type { border-bottom: 1px solid var(--hairline); }
summary { cursor: pointer; font-weight: 700; font-size: .98rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "open"; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
details[open] summary::after { content: "close"; }
summary .hint { font-weight: 400; font-size: .84rem; color: var(--muted); }
details .body { padding-top: .6rem; }
details .body p { font-size: .9rem; color: var(--muted); max-width: 48em; margin-top: .7rem; }

/* ---- gate and licensing ---- */
.lock {
  margin-top: 1.3rem; background: var(--greenbar); border: 1px solid var(--green);
  padding: 1.35rem 1.5rem;
}
.lock h3 { font-family: "Besley", Georgia, serif; font-size: 1.12rem; }
.lock p { font-size: .92rem; margin-top: .55rem; max-width: 46em; }
.lock .teaser { font-weight: 600; color: var(--ink); }
.lock .row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.lock select {
  font: inherit; font-size: .9rem; padding: .5rem .55rem; border: 1px solid var(--hairline);
  border-radius: 3px; background: #FFFFFF; color: var(--ink);
}
.lock input {
  font: inherit; font-size: .9rem; padding: .5rem .65rem; border: 1px solid var(--hairline);
  border-radius: 3px; background: #FFFFFF; color: var(--ink); flex: 1 1 13rem; min-width: 0;
}
button.primary, button.ghost {
  font: inherit; font-size: .92rem; font-weight: 600; border-radius: 3px;
  padding: .55rem 1.15rem; cursor: pointer; white-space: nowrap;
}
button.primary { color: #FFFFFF; background: var(--green); border: 1px solid var(--green); }
button.primary:hover { background: var(--green-deep); }
button.ghost { color: var(--green); background: transparent; border: 1px solid var(--green); }
button.ghost:hover { background: var(--greenbar-hover); }
a.btn {
  display: inline-block; font-weight: 600; font-size: .92rem; text-decoration: none;
  color: var(--green); background: transparent; border: 1px solid var(--green);
  border-radius: 3px; padding: .55rem 1.15rem;
}
a.btn:hover { background: var(--greenbar-hover); }
.err { color: var(--flag); font-size: .84rem; margin-top: .5rem; min-height: 1em; }
.ok-msg { color: var(--green); font-size: .84rem; margin-top: .5rem; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 1.8rem; margin-top: 1.1rem; }
.price b { display: block; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 1.05rem; }
.price span { font-size: .86rem; color: var(--muted); }

/* ---- search (index page) ---- */
.search-wrap { margin-top: 1.6rem; }
#q {
  font: inherit; font-size: 1.05rem; padding: .75rem .9rem; width: 100%;
  border: 1.5px solid var(--green); border-radius: 3px; background: #FFFFFF; color: var(--ink);
}
#results { margin-top: 1.1rem; list-style: none; }
#results li { border-bottom: 1px solid var(--hairline); }
#results a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .3rem; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
#results a:hover { background: var(--greenbar); }
#results .who b { font-weight: 700; }
#results .who span { display: block; font-size: .8rem; color: var(--muted); }
#results .amt { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
#results .amt small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); text-align: right; }
.hint-line { font-size: .84rem; color: var(--muted); margin-top: .6rem; }

/* ---- footer ---- */
footer { margin-top: 4rem; padding-top: 1.1rem; border-top: 1px solid var(--hairline); font-size: .78rem; color: var(--muted); }
footer .row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer .legal { margin-top: .9rem; max-width: 56em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .schedule tbody tr, button.primary, button.ghost { transition: none; }
}
@media (max-width: 760px) {
  .mast-right { text-align: left; }
  .schedule thead { display: none; }
  .schedule, .schedule tbody, .schedule tfoot, .schedule tr, .schedule td { display: block; width: 100%; }
  .schedule caption { display: block; width: 100%; }
  .schedule td { padding: 0 .9rem; }
  .schedule tbody tr { padding: .85rem 0; }
  .schedule td.num, .schedule td.code, .schedule td.when { text-align: left; }
  .schedule td.num { font-size: 1.02rem; margin-top: .2rem; }
  .schedule td::before { content: attr(data-label) " "; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; }
  .schedule td:first-child::before { content: none; }
}
