/*
 * Site-wide stylesheet — served by AssetMapper via assets/app.js.
 *
 * Until 2026-09-07 every page template carried its own <style> block and
 * declared the palette five times over; this file is the ONE place for what
 * every page shares: the tokens, the type floor for phones, the utility row,
 * the editions line, the mini masthead, the footer shell, the breadcrumb and
 * the refresh strip. Page-specific rules stay in their templates.
 *
 * Palette (templates/home/index.html.twig, 2026-07): paper, ink, rust.
 */

:root {
    --paper: #F5F1EA;       /* warm off-white, newsprint feel */
    --paper-2: #EDE7DB;     /* a shade deeper, for inset panels */
    --ink: #1A1A1A;         /* charcoal, not pure black */
    --ink-muted: #5C5C5C;   /* secondary text — 6.3:1 on paper */
    --rule: #C4BBA8;        /* hairline rules */
    --accent: #B7410E;      /* rust / burnt sienna — prairie sunset */
    --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

body {
    background-color: var(--paper);
    color: var(--ink);
}

/* ── Type floor for phones ───────────────────────────────────────────────
   With the viewport meta in place the page renders at device width, and the
   0.6–0.7rem mono labels the desktop design uses become 9.6–11px. Nothing a
   homeowner has to read goes below 12px. */
@media (max-width: 600px) {
    html { font-size: 17px; }
    .stat-label, .search-hint, .byline, .crumbs, .figure-caption, .caption,
    .result-meta-line, .facts, .home-footer, .site-footer { font-size: max(0.75rem, 12px) !important; }
}

/* ── Utility row: sign in / account ───────────────────────────────────── */
.utility {
    display: flex; justify-content: flex-end; align-items: center; gap: 18px;
    font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em;
}
.utility a { text-decoration: none; color: var(--ink-muted); }
.utility a:hover { color: var(--ink); text-decoration: underline; }
.utility .utility-signin { color: var(--ink); border: 1px solid var(--ink); padding: 4px 11px; border-radius: 2px; }
.utility .utility-signin:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.utility .count { color: var(--accent); }
.home-page .utility { margin-bottom: 10px; }

/* ── Editions line (replaces the county switcher buttons) ─────────────── */
.editions {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
    gap: 6px 14px; padding: 12px 0 0;
    font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.05em;
}
.editions .editions-label { color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; margin-right: 4px; }
.editions a { text-decoration: none; color: var(--ink); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.editions a:hover { border-bottom-color: var(--ink); }
.editions a[aria-current] { border-bottom: 2px solid var(--accent); font-weight: 500; }
.editions .beta {
    font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--paper); background: var(--ink-muted); padding: 1px 5px; border-radius: 2px;
    margin-left: 4px; vertical-align: 1px;
}

/* ── Inner-page mini masthead: logo (a <p>, not a heading) + kicker + utility ── */
.mini-masthead {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    border-bottom: 3px double var(--ink); padding-bottom: 10px; margin-bottom: 0;
}
.mini-masthead-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.55rem; line-height: 1; }
.mini-masthead-title a { text-decoration: none; color: var(--ink); }
.mini-masthead-title .accent { font-style: italic; color: var(--accent); }
.mini-masthead-section { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.mini-masthead-section .accent { margin-right: 6px; }
@media (max-width: 600px) {
    .mini-masthead { flex-wrap: wrap; }
    .mini-masthead .utility { width: 100%; order: 3; justify-content: flex-start; padding-top: 4px; }
}

/* ── Breadcrumb ───────────────────────────────────────────────────────── */
.crumbs { margin: 14px 0 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { margin: 0 8px; color: var(--rule); }

/* ── Refresh strip (ADR 0024), in the paper's own ink ─────────────────── */
.refresh-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    margin: 16px 0 0; padding: 10px 14px;
    background: var(--ink); color: var(--paper);
    font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em;
}
.refresh-strip-head { display: flex; align-items: baseline; gap: 12px; flex: 1 1 auto; }
.refresh-strip-head small { color: #B8B0A2; font-weight: 400; }
.refresh-strip-bar { flex: 1 1 160px; height: 3px; background: #3D3934; overflow: hidden; }
.refresh-strip-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }
.refresh-strip-phases { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; width: 100%; }
.refresh-strip-phases li { color: #B8B0A2; }
.refresh-strip-phases li::before { content: '○'; margin-right: 6px; }
.refresh-strip-phases li[data-state="running"] { color: var(--paper); }
.refresh-strip-phases li[data-state="running"]::before { content: '●'; color: var(--accent); animation: refresh-pulse 1.2s ease-in-out infinite; }
.refresh-strip-phases li[data-state="done"] { color: var(--paper); }
.refresh-strip-phases li[data-state="done"]::before { content: '✓'; color: var(--accent); }
.refresh-strip-phases li[data-state="failed"] { color: #E0A899; }
.refresh-strip-phases li[data-state="failed"]::before { content: '✗'; }
.refresh-strip-phases li[data-state="skipped"] { color: #8B8478; text-decoration: line-through; }
.refresh-strip-phases li[data-state="skipped"]::before { content: '–'; }
.refresh-strip-note { display: block; width: 100%; color: #B8B0A2; font-size: 0.72rem; }
@keyframes refresh-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .refresh-strip-phases li[data-state="running"]::before { animation: none; } }

/* ── Site footer: editions / the ledger / account, then the disclaimer ── */
.site-footer {
    max-width: 1100px; margin: 48px auto 0; padding: 22px 2rem 40px;
    border-top: 3px double var(--ink); color: var(--ink);
}
.site-footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 32px; }
.site-footer-nav h2 {
    margin: 0 0 8px; font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted);
}
.site-footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 0.9rem; }
.site-footer-nav a { color: var(--ink); text-decoration: none; }
.site-footer-nav a:hover { text-decoration: underline; }
.site-footer-nav .soon, .site-footer-nav .beta {
    font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink-muted); margin-left: 6px;
}
.site-footer-disclaimer {
    margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule);
    font-family: var(--mono); font-size: 0.75rem; line-height: 1.7; color: var(--ink-muted); text-align: center;
}
.site-footer-disclaimer p { margin: 0 0 8px; }
.site-footer-disclaimer a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.site-footer-colophon {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 14px;
    font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted);
}
@media (max-width: 600px) {
    .site-footer { padding: 18px 1rem 30px; }
    .site-footer-nav { grid-template-columns: 1fr 1fr; }
}

/* ── Good-neighbor note on the parcel page ────────────────────────────── */
.neighbor-note { margin-top: 20px; padding: 12px 16px; border: 1px dashed var(--rule); font-size: 0.88rem; color: var(--ink-muted); }
.neighbor-note a { color: var(--ink); }

/* ── "Also on this street" ─────────────────────────────────────────────── */
.street-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.street-grid a { display: block; text-decoration: none; color: var(--ink); padding: 12px 14px; border: 1px solid var(--rule); }
.street-grid a:hover { border-color: var(--ink); }
.street-grid .addr { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.street-grid .meta { margin-top: 6px; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-muted); }
.street-grid .meta b { color: var(--ink); font-weight: 500; }
.street-more { margin-top: 10px; font-family: var(--mono); font-size: 0.75rem; }
.street-more a { color: var(--accent); }
@media (max-width: 600px) { .street-grid { grid-template-columns: 1fr; } }

/* ── Investor-only history hint ───────────────────────────────────────── */
.more-history { margin: 10px 0 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted); }
.more-history a { color: var(--accent); }

/* ── Where the latest bill went (per taxing entity) ───────────────────── */
.bill-lines { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.9rem; }
.bill-lines th { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--ink); }
.bill-lines th:first-child, .bill-lines td:first-child { text-align: left; }
.bill-lines td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.bill-lines tfoot td { font-family: var(--display); font-weight: 700; border-bottom: 0; }

/* The page stylesheets still prepend "// " to the kicker; the partial carries its own § now. app.css loads after them, so equal specificity wins here. */
.search-page .mini-masthead-section::before, .parcel-page .mini-masthead-section::before, .static-page .mini-masthead-section::before { content: none; }
.search-page .mini-masthead-title, .parcel-page .mini-masthead-title { font-style: normal; }

/* Data tables on phones: scroll inside their own box rather than widen the page. The tax history table is 471px of columns at a 375px viewport. */
@media (max-width: 600px) {
    .tax-table, .bill-lines { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
}
