/* dcsewage.org — the actual design.
   Loaded last. Overrides styles.css and overflows.css so the rebuild could be
   done without rewriting every legacy rule. */

/* ---------- base ---------- */
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: var(--t-body);
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--w-wide); padding-inline: var(--s5); }
.container.narrow { max-width: var(--w-text); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
h1 { font-weight: 500; letter-spacing: -0.02em; }
h2 {
    font-size: var(--t-h2); font-weight: 500; line-height: 1.15;
    letter-spacing: -0.015em; color: var(--ink); margin-bottom: var(--s4);
    text-wrap: balance;
}
h3 {
    font-family: var(--font-ui); font-size: var(--t-h3); font-weight: 700;
    letter-spacing: -0.005em; margin-bottom: var(--s3);
}
p { margin-bottom: var(--s4); }
a { color: var(--anacostia); text-underline-offset: 2px; text-decoration-thickness: 1px; }

.section-intro, .lede {
    font-family: var(--font-display);
    font-size: var(--t-lede); line-height: 1.5; color: var(--ink-60);
    max-width: 58ch; text-align: left;
}

.eyebrow, .stat-label, thead th, .doc-meta, .news-tag {
    font-family: var(--font-ui); font-size: var(--t-label); font-weight: 700;
    letter-spacing: 0.09em; text-transform: uppercase;
}

.chart-note, .source-note, figcaption {
    font-family: var(--font-display); font-style: italic;
    font-size: var(--t-caption); color: var(--ink-60); max-width: 52ch;
}

/* ---------- kill the AI tells ---------- */
/* no gradients */
.hero, .page-hero {
    background: var(--paper) !important;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
    padding: var(--s9) 0 var(--s7);
    text-align: left;
}
.hero h1, .page-hero h1 {
    font-size: var(--t-display); line-height: 1.04; max-width: 20ch;
    margin: 0 0 var(--s4); color: var(--ink);
}
.hero .subtitle, .page-hero .subtitle {
    font-family: var(--font-display); font-size: var(--t-lede);
    color: var(--ink-60); max-width: 56ch; margin: 0; opacity: 1;
}
.page-hero .eyebrow, .hero .eyebrow { color: var(--ink-60); opacity: 1; margin-bottom: var(--s3); }

/* no shadows, no lift, no rounded-12 */
.card, .stat-card, .chart-card, .doc-item, .next-card, .news-item,
.info-box, .bill-item, .regional-card, .resource-card {
    box-shadow: none !important;
    border-radius: var(--radius) !important;
    transform: none !important;
}
.card:hover, .next-card:hover, .doc-item:hover, .news-item:hover {
    transform: none !important; box-shadow: none !important;
    border-color: var(--ink) !important;
}
.card, .doc-item, .next-card, .info-box {
    background: var(--paper-2); border: 1px solid var(--rule);
    transition: border-color 120ms ease;
}

/* hide emoji icon systems — the words carry it */
.card-icon, .doc-icon, .alert-icon, .regional-card h3 .emoji { display: none !important; }
.service-list li::before { content: "" !important; }
.service-list li {
    padding-left: var(--s5); position: relative;
}
.service-list li::after {
    content: ""; position: absolute; left: 0; top: 0.72em;
    width: 10px; height: 1px; background: var(--ink);
}

/* ---------- wordmark ---------- */
.logo h1 {
    font-family: var(--font-ui); font-size: 0.95rem; font-weight: 700;
    letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink);
    display: flex; align-items: center; gap: var(--s2); margin: 0;
}
.logo h1::before {
    content: ""; width: 3px; height: 15px; background: var(--anacostia); flex: none;
}
header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.navbar { padding: var(--s4) 0; }
.nav-menu a {
    font-family: var(--font-ui); font-size: 0.9rem; font-weight: 400;
    color: var(--ink-60); text-decoration: none;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--ink); text-decoration: none; }
.nav-menu a.active { font-weight: 700; }

/* ---------- sections ---------- */
.section, .content-section { padding: var(--s9) 0; }
.content-section.alt, .gray-bg, .section.gray-bg {
    background: var(--paper-2);
    border-block: 1px solid var(--rule);
}

/* ---------- stats: rules, not boxes ---------- */
.stat-row {
    display: grid; gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    border-top: 1px solid var(--ink);
}
.stat-card {
    background: none !important; border: 0 !important;
    border-right: 1px solid var(--rule) !important;
    padding: var(--s5) var(--s5) var(--s5) 0;
    display: flex; flex-direction: column; gap: var(--s1);
}
.stat-card:last-child { border-right: 0 !important; }
.stat-card + .stat-card { padding-left: var(--s5); }
.stat-label { color: var(--ink-60); }
.stat-value {
    font-family: var(--font-mono); font-size: var(--t-stat); font-weight: 500;
    line-height: 1; letter-spacing: -0.02em; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.stat-value.good { color: var(--anacostia); }
.stat-value.bad  { color: var(--potomac); }
.stat-note { font-family: var(--font-display); font-style: italic; font-size: 0.9rem; color: var(--ink-60); }

/* hero stat blobs on the homepage */
.hero-stats { display: flex; gap: var(--s7); flex-wrap: wrap; margin-top: var(--s6); }
.hero-stats .stat {
    background: none !important; backdrop-filter: none !important;
    border: 0; border-left: 2px solid var(--anacostia); border-radius: 0;
    padding: var(--s1) 0 var(--s1) var(--s4); text-align: left;
}
.hero-stats .stat-number {
    font-family: var(--font-mono); font-size: 2.25rem; font-weight: 500;
    color: var(--ink); letter-spacing: -0.02em;
}
.hero-stats .stat-label {
    font-family: var(--font-ui); font-size: var(--t-label); color: var(--ink-60);
    letter-spacing: 0.09em; text-transform: uppercase;
}

/* ---------- charts: on the page, not in a box ---------- */
.chart-card {
    background: none !important; border: 0 !important; padding: 0 !important;
    overflow-x: auto;
}
.chart-card .grid line { stroke: var(--rule-soft); }
.chart-card .axis text { fill: var(--ink-60); font-family: var(--font-mono); font-size: 10px; }
.chart-card .annot { fill: var(--ink); font-family: var(--font-ui); font-size: 11px; }
.chart-card .annot-rule { stroke: var(--ink-30); }
.chart-legend { gap: var(--s5); font-size: var(--t-small); color: var(--ink-60); margin-bottom: var(--s4); }
.key { border-radius: 1px; }
.bar-group:focus-visible { outline: none; }
.bar-group:focus-visible .bar-seg { stroke: var(--ink); stroke-width: 2; }

/* ---------- tables ---------- */
.data-table { background: none; font-size: var(--t-small); }
.data-table caption {
    font-family: var(--font-ui); font-size: var(--t-label); font-weight: 700;
    letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-60);
    padding-bottom: var(--s3);
}
.data-table thead th {
    background: none; color: var(--ink-60); border-bottom: 1px solid var(--ink);
}
.data-table th, .data-table td { border-bottom: 1px solid var(--rule-soft); padding: var(--s3) var(--s4) var(--s3) 0; }
.data-table td.num, .data-table th.num { font-family: var(--font-mono); }

.pill {
    font-family: var(--font-ui); font-size: var(--t-meta); font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: 2px; padding: 0.15rem 0.45rem;
}
.pill.ok   { background: none; color: var(--verified); border: 1px solid currentColor; }
.pill.warn { background: none; color: var(--potomac);  border: 1px solid currentColor; }
.pill.bad  { background: none; color: var(--decree);   border: 1px solid currentColor; }

/* ---------- callouts ---------- */
.callout {
    background: none; border: 0; border-left: 2px solid var(--decree);
    border-radius: 0; padding: var(--s1) 0 var(--s1) var(--s5);
    margin: var(--s6) 0;
}
.callout.method { border-left-color: var(--anacostia); }
.warning-box { background: none; border-left: 2px solid var(--decree); border-radius: 0; padding-left: var(--s4); }

/* ---------- documents: a docket, not a sticker sheet ---------- */
.doc-item { gap: var(--s5); padding: var(--s5); align-items: baseline; }
.doc-body h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; }
.doc-meta { color: var(--ink-60); font-family: var(--font-mono); font-size: var(--t-meta);
            letter-spacing: 0.02em; text-transform: none; font-weight: 400; }
.doc-links a { font-family: var(--font-ui); font-size: var(--t-small); font-weight: 700; }

/* ---------- news: a log, not a card wall ---------- */
.news-item {
    background: none !important; border: 0 !important;
    border-top: 1px solid var(--rule) !important;
    border-radius: 0 !important; padding: var(--s5) 0;
}
.news-tag { color: var(--ink-60); background: none; padding: 0; }
.news-date { font-family: var(--font-mono); font-size: var(--t-meta); color: var(--ink-60); }

/* ---------- alert banner ---------- */
.alert-banner { background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.alert { background: none; border: 0; border-left: 2px solid var(--decree); border-radius: 0;
         padding: var(--s4) 0 var(--s4) var(--s5); }

/* ---------- next links ---------- */
.next-links { gap: var(--s4); margin-top: var(--s7); }
.next-card { padding: var(--s5); }
.next-card strong { font-family: var(--font-display); font-weight: 500; color: var(--ink); font-size: 1.1rem; }
.next-card span { color: var(--ink-60); font-size: var(--t-small); }

/* ---------- footer ---------- */
footer { background: var(--paper-2); border-top: 1px solid var(--rule); color: var(--ink-60); padding: var(--s7) 0; }
footer strong { color: var(--ink); }
footer .small { font-size: var(--t-small); }

/* ---------- skip link + focus ---------- */
.skip {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--ink); color: var(--paper); padding: var(--s3) var(--s4);
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--anacostia); outline-offset: 2px; }

/* ---------- print ---------- */
@media print {
    header, .next-links, .chart-tip, .hamburger, .alert-banner { display: none; }
    body { font-size: 10pt; background: #fff; color: #000; }
    .content-section, .section { padding: 0 0 18pt; }
    .data-table { page-break-inside: avoid; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

@media (max-width: 768px) {
    .hero, .page-hero { padding: var(--s7) 0 var(--s6); }
    .section, .content-section { padding: var(--s7) 0; }
    .stat-card { border-right: 0 !important; border-bottom: 1px solid var(--rule) !important; padding-left: 0 !important; }
    .hero-stats { gap: var(--s5); }
}

/* ---------- surfaces: nothing hardcoded, everything follows the tokens ----------
   The legacy stylesheets set `background: white` in 21 places and paired it with
   token-driven text colour. In dark mode that produced near-white text on a
   hardcoded white panel — unreadable. Every surface below is re-pinned. */

.chart-tip {
    background: var(--paper-2);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: none;
}
.chart-tip .tip-year { color: var(--ink); font-family: var(--font-ui); }
.chart-tip .tip-row  { color: var(--ink); }
.chart-tip .tip-row span:last-child { font-family: var(--font-mono); color: var(--ink); }
.chart-tip .tip-sep  { border-top-color: var(--rule); }

.data-table,
.data-table tbody,
.info-box,
.card,
.doc-item,
.next-card,
.stat-card,
.bill-item,
.resource-card,
.regional-card,
.nav-menu {
    background: var(--paper-2);
    color: var(--ink);
}
.stat-card, .chart-card, .news-item { background: none; }

.data-table thead th { background: var(--paper); color: var(--ink-60); }
.data-table td, .data-table th { color: var(--ink); }

/* pills: outline only, so they never trap dark text on a pale fill */
.pill, .pill.ok, .pill.warn, .pill.bad {
    background: none;
    border: 1px solid currentColor;
}
.pill.ok   { color: var(--verified); }
.pill.warn { color: var(--potomac); }
.pill.bad  { color: var(--decree); }

/* legacy amber boxes */
.warning-box, .callout, .alert, .info-box .warning-box {
    background: none;
    color: var(--ink);
}
.warning-box { border-left: 2px solid var(--potomac); }

/* mobile nav panel */
@media (max-width: 768px) {
    .nav-menu {
        background: var(--paper-2) !important;
        border: 1px solid var(--rule);
    }
    .nav-menu a { color: var(--ink); }
}

/* hero text was `color: white` against the old gradient */
.hero h1, .hero .subtitle, .hero .eyebrow,
.page-hero h1, .page-hero .subtitle, .page-hero .eyebrow,
.hero-stats .stat-number, .hero-stats .stat-label {
    color: var(--ink);
}
.hero .subtitle, .page-hero .subtitle,
.hero .eyebrow, .page-hero .eyebrow,
.hero-stats .stat-label { color: var(--ink-60); }

/* card links / buttons that assumed a coloured background */
.card-link, .news-link, .alert-link { color: var(--anacostia); }
.btn, .cta-button {
    background: var(--ink); color: var(--paper);
    border: 1px solid var(--ink); border-radius: var(--radius);
}
.btn:hover, .cta-button:hover { background: var(--paper); color: var(--ink); }

@media print {
    .chart-tip { display: none; }
}

/* direct series labels — colour is never the only cue */
.chart-card .series-label {
    font-family: var(--font-ui); font-size: 11px; font-weight: 700;
    letter-spacing: .02em;
}
