/* Coverage round (2026-10-06): "Every city record" and the curated cards (app/live_sources/city_records.py,
   app/curated.py). Uses the report's own tokens; a separate file so it never collides with style.css. */

.cr-index { margin: 0.6rem 0 0.4rem; }
.cr-agency-group { margin: 0.7rem 0 0.2rem; }
.cr-agency {
  margin: 0.9rem 0 0.25rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 600; color: rgb(var(--brass-text));
}
.cr-agency-group > .cr-agency { margin-top: 0; }
.cr-lines { list-style: none; margin: 0; padding: 0; }
.cr-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.75rem;
  padding: 0.28rem 0; border-top: 1px solid rgb(var(--rule-hair));
}
.cr-line:first-child { border-top: 0; }
.cr-name { font-weight: 600; flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.cr-count, .cr-dates { color: rgb(var(--ink-muted)); font-size: 0.82rem; white-space: nowrap; }
.cr-addr { margin: 0; }

.cr-nothing, .cr-unavailable, .cr-restricted, .cr-skipped { border-top: 1px solid rgb(var(--rule-hair)); margin-top: 0.5rem; }
.cr-nothing > summary, .cr-unavailable > summary, .cr-restricted > summary, .cr-skipped > summary {
  cursor: pointer; list-style: none; padding: 0.45rem 0; color: rgb(var(--ink-muted)); font-size: 0.88rem;
}
.cr-nothing > summary::-webkit-details-marker, .cr-unavailable > summary::-webkit-details-marker,
.cr-restricted > summary::-webkit-details-marker, .cr-skipped > summary::-webkit-details-marker { display: none; }
.cr-nothing > summary:hover, .cr-unavailable > summary:hover { color: rgb(var(--ink)); }
.cr-unavailable > summary { color: rgb(var(--warning)); }
.cr-nothing-list { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; columns: 2 18rem; column-gap: 1.6rem; font-size: 0.84rem; }
.cr-nothing-list li { break-inside: avoid; margin: 0.12rem 0; overflow-wrap: anywhere; }
.cr-agency-note { color: rgb(var(--ink-faint)); font-size: 0.76rem; }

/* one dataset's records, inside the records panel */
details.cr-dataset { border: 1px solid rgb(var(--rule-hair)); border-radius: 3px; margin: 0.4rem 0; background: rgb(var(--raised) / 0.35); }
details.cr-dataset > summary { cursor: pointer; list-style: none; padding: 0.5rem 0.7rem; display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; align-items: baseline; }
details.cr-dataset > summary::-webkit-details-marker { display: none; }
details.cr-dataset > summary:hover { background: rgb(var(--raised) / 0.7); }
details.cr-dataset > summary .cr-name { flex: 1 1 14rem; }
.cr-dataset-body { padding: 0.1rem 0.7rem 0.6rem; }
.cr-blurb { margin: 0.1rem 0 0.2rem; }
.cr-via { margin: 0.1rem 0 0.4rem; }
.cr-dataset-body .table-wrap { margin-top: 0.3rem; }
.table-plain { margin: 0.1rem 0 0.35rem; }

@media (max-width: 560px) {
  .cr-count, .cr-dates { white-space: normal; }
  .cr-nothing-list { columns: 1; }
  details.cr-dataset > summary { padding: 0.5rem 0.55rem; }
  .cr-dataset-body { padding: 0.1rem 0.5rem 0.5rem; }
}

@media print {
  .cr-nothing > summary, .cr-unavailable > summary, .cr-restricted > summary, .cr-skipped > summary,
  details.cr-dataset > summary { color: inherit; }
  details.cr-dataset { break-inside: avoid-page; }
  .cr-agency { break-after: avoid; }
}

/* ---- Every city record, readable (Jason, 2026-10-06): topics, then datasets, then records, then all fields ---- */
.cr-topics { margin: 0.5rem 0 0.2rem; }
details.cr-topic { border-top: 1px solid rgb(var(--rule-hair)); }
details.cr-topic > summary {
  cursor: pointer; list-style: none; display: block; padding: 0.6rem 0.1rem 0.55rem; font-weight: 600;
}
details.cr-topic > summary::-webkit-details-marker { display: none; }
details.cr-topic > summary:hover { background: rgb(var(--raised) / 0.45); }
.cr-topic-title { font-size: 0.98rem; }
.cr-topic > summary .count { font-weight: 400; color: rgb(var(--ink-muted)); font-size: 0.82rem; }
.cr-topic-sentence { display: block; margin: 0.15rem 0 0 1.15rem; font-weight: 400; color: rgb(var(--ink-muted)); font-size: 0.86rem; line-height: 1.4; }
details.cr-topic-other > summary { color: rgb(var(--ink-muted)); }
details.cr-topic > .cr-lines { margin: 0 0 0.5rem 0.9rem; }
details.cr-ds { margin: 0; }
details.cr-ds > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 0.1rem 0.6rem; align-items: baseline; padding: 0.4rem 0.2rem; }
details.cr-ds > summary::-webkit-details-marker { display: none; }
details.cr-ds > summary:hover { background: rgb(var(--raised) / 0.45); }
details.cr-ds > summary .cr-name { flex: 1 1 14rem; font-weight: 600; }
.cr-open { margin: 0; }
.cr-topic-head { margin-top: 1.1rem; }
.cr-topic-sentence-print { margin: 0 0 0.3rem; }
.cr-table-slot .records-loading { margin: 0.3rem 0; }

details.cr-allfields { margin-top: 0.3rem; }
details.cr-allfields > summary { cursor: pointer; font-size: 0.78rem; color: rgb(var(--ink-muted)); list-style: none; }
details.cr-allfields > summary::-webkit-details-marker { display: none; }
details.cr-allfields > summary::before { content: "+ "; }
details.cr-allfields[open] > summary::before { content: "- "; }
dl.cr-fields { margin: 0.3rem 0 0.2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.2rem 1.2rem; font-size: 0.78rem; }
dl.cr-fields > div { min-width: 0; }
dl.cr-fields dt { color: rgb(var(--ink-faint)); font-size: 0.7rem; letter-spacing: 0.03em; }
dl.cr-fields dd { margin: 0; overflow-wrap: anywhere; }
td.src-cell details.cr-allfields { min-width: 11rem; }
@media (max-width: 560px) {
  dl.cr-fields { grid-template-columns: 1fr; }
  details.cr-topic > .cr-lines { margin-left: 0.4rem; }
  .cr-topic-sentence { margin-left: 0; }
}
@media print {
  details.cr-allfields > summary { display: none; }
}

/* ---- filters ---- */
.cr-filters { margin: 0.6rem 0 0.4rem; padding: 0.6rem 0 0.2rem; border-top: 1px solid rgb(var(--rule-hair)); }
.cr-chips { display: flex; flex-wrap: nowrap; gap: 0.4rem; overflow-x: auto; padding: 0.1rem 0 0.4rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.cr-chip, .cr-range-btn {
  flex: 0 0 auto; font: inherit; font-size: 0.8rem; line-height: 1.2; color: rgb(var(--ink)); background: transparent; white-space: nowrap;
  border: 1px solid rgb(var(--rule)); border-radius: 999px; padding: 0.3rem 0.7rem; cursor: pointer;
}
.cr-chip:hover, .cr-range-btn:hover { background: rgb(var(--raised) / 0.7); }
.cr-chip[aria-pressed="true"], .cr-range-btn[aria-pressed="true"] { background: rgb(var(--brass) / 0.2); border-color: rgb(var(--brass)); font-weight: 600; }
.cr-chip:focus-visible, .cr-range-btn:focus-visible, .cr-toggle input:focus-visible { outline: 2px solid rgb(var(--focus)); outline-offset: 2px; }
.cr-chip-n { color: rgb(var(--ink-muted)); font-size: 0.74rem; margin-left: 0.15rem; }
.cr-chip-zero { color: rgb(var(--ink-faint)); }
.cr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.1rem 0 0.2rem; }
.cr-toggle { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; cursor: pointer; }
.cr-toggle input { width: 1rem; height: 1rem; accent-color: rgb(var(--brass)); }
.cr-range { display: inline-flex; gap: 0.3rem; }
.cr-range-btn { border-radius: 4px; padding: 0.26rem 0.6rem; }
.cr-filter-status { margin: 0.3rem 0 0; font-size: 0.8rem; color: rgb(var(--ink-muted)); }
.cr-empty { margin: 0.5rem 0 0.2rem; padding: 0.6rem 0.8rem; border: 1px dashed rgb(var(--rule)); border-radius: 4px; font-size: 0.86rem; }
.cr-suspended-note { margin: 0.4rem 0 0; padding: 0.4rem 0.7rem; border-radius: 4px; background: rgb(var(--warning) / 0.14); font-size: 0.84rem; }
.cr-hide { display: none !important; }
.cr-topics.cr-suspended .cr-hide { display: block !important; }
.cr-open-only:not(.cr-suspended) .cr-ds tr[data-record]:not([data-open]) { display: none; }
@media (max-width: 560px) {
  .cr-controls { gap: 0.45rem 0.8rem; }
  .cr-range { flex: 1 0 100%; }
  .cr-range-btn { flex: 1 1 0; text-align: center; padding: 0.4rem 0.3rem; }
  .cr-chip { padding: 0.4rem 0.75rem; }
}
@media print { .cr-filters { display: none; } }

[data-city-filters] [hidden] { display: none !important; }

/* ---- polish pass (after seeing the live card) ---- */
.cr-chips { flex-wrap: wrap; overflow-x: visible; }
@media (max-width: 560px) { .cr-chips { flex-wrap: nowrap; overflow-x: auto; } }
.cr-chip, .cr-range-btn { font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.cr-chip-name { font-weight: 500; }
.cr-chip[aria-pressed="true"] .cr-chip-name { font-weight: 700; }
details.cr-ds > summary .cr-name { flex: 0 1 auto; }
details.cr-ds > summary { align-items: baseline; }
.cr-elsewhere { border-top: 1px solid rgb(var(--rule-hair)); margin-top: 0.5rem; }
.cr-elsewhere > summary { cursor: pointer; list-style: none; padding: 0.45rem 0; color: rgb(var(--ink-muted)); font-size: 0.88rem; }
.cr-elsewhere > summary::-webkit-details-marker { display: none; }
.cr-elsewhere > summary:hover { color: rgb(var(--ink)); }

/* ---- round 9: chip row edge cues ---- */
.cr-chips-wrap { position: relative; }
.cr-chips-hint { display: none; margin: 0.1rem 0 0.3rem; font-size: 0.76rem; color: rgb(var(--ink-muted)); }
.cr-chips-wrap::before, .cr-chips-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0.4rem; width: 2.4rem; pointer-events: none; opacity: 0; transition: opacity 120ms; z-index: 1;
}
.cr-chips-wrap::after { right: 0; background: linear-gradient(to right, transparent, rgb(var(--slip))); }
.cr-chips-wrap::before { left: 0; background: linear-gradient(to left, transparent, rgb(var(--slip))); }
.cr-chips-wrap.cr-more-r::after, .cr-chips-wrap.cr-more-l::before { opacity: 1; }
@media (max-width: 560px) { .cr-chips-hint:not([hidden]) { display: block; } }
@media print { .cr-chips-hint { display: none !important; } }

/* ---- round 10: the new section's labels follow the page's type (quiet Geist for words; Geist Mono only for numbers, IDs, dates) ---- */
.cr-agency, .cr-topic-head { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.02em; text-transform: none; font-weight: 600; color: rgb(var(--ink-muted)); }
.cr-topic-head { font-size: 0.95rem; color: rgb(var(--ink)); }
.cr-chip, .cr-range-btn, .cr-toggle, .cr-filter-status, .cr-empty, .cr-suspended-note, .cr-chips-hint, .cr-reset { font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.cr-chip-n, .cr-count, .cr-dates, .cr-line .count, details.cr-topic > summary .count, details.cr-ds > summary .count { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.cr-dataset-body .src-link, .cr-via .src-link, .cr-index .src-link { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 0.8rem; }
.cr-open, .cr-addr, .cr-dataset .tag, .cr-ds .tag { font-family: var(--sans); text-transform: none; letter-spacing: 0.01em; font-size: 0.72rem; font-weight: 500; }
details.cr-allfields > summary { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 0.8rem; }
dl.cr-fields dt { font-family: var(--sans); text-transform: none; letter-spacing: 0.01em; font-size: 0.74rem; font-weight: 500; }
dl.cr-fields dd { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.cr-nothing > summary, .cr-unavailable > summary, .cr-restricted > summary, .cr-skipped > summary, .cr-elsewhere > summary { font-family: var(--sans); text-transform: none; letter-spacing: 0; }

/* ---- polish round 4 (2026-10-07) ---- */
/* "N open" on a dataset: quiet unless it is a safety or legal item (violations, vacate orders, litigation, stop-work). */
.tag-quiet { color: rgb(var(--ink-muted)); }
.cr-old-open { margin: 0.3rem 0 0.5rem; color: rgb(var(--ink-muted)); }

/* A raw code the city uses as shorthand keeps its text; its column's own description is the tooltip. */
abbr.code-val { text-decoration: underline dotted; text-decoration-color: rgb(var(--ink-muted)); text-underline-offset: 0.22em; cursor: help; }

/* The "Official record" cell was a flex box, so its bottom rule stopped short of the header's. A table cell again. */
@media (min-width: 641px), print {
  td.src-cell { display: table-cell; }
}

/* City record tables: words wrap at spaces, never in the middle of a word; a column is never squeezed to a sliver. */
.cr-dataset-body .records-table td, .cr-dataset-body .records-table th { overflow-wrap: break-word; word-break: normal; hyphens: none; }
@media (min-width: 641px) {
  .cr-dataset-body .records-table td { min-width: 6.5rem; }
  .cr-dataset-body .records-table td.src-cell { white-space: normal; width: auto; min-width: 8.5rem; }
}

/* Printed summary of the city section: counts and dates, open items; no tables. */
.cr-print-label { margin: 0.4rem 0 0.1rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--ink-muted)); }
ul.cr-print-open, ul.cr-print-lines { list-style: none; margin: 0 0 0.5rem; padding: 0; font-size: 0.82rem; }
ul.cr-print-open li, ul.cr-print-lines li { padding: 0.12rem 0; border-top: 1px solid rgb(var(--rule-hair)); }
ul.cr-print-open li:first-child, ul.cr-print-lines li:first-child { border-top: 0; }
.cr-po-name { font-weight: 600; }
.cr-po-date, .cr-po-text, ul.cr-print-lines .count { color: rgb(var(--ink-muted)); }
@media print {
  ul.cr-print-lines { columns: 2; column-gap: 1.2rem; }
  ul.cr-print-lines li, ul.cr-print-open li { break-inside: avoid; }
}
.cr-linkbtn { font: inherit; color: rgb(var(--drafting)); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.cr-linkbtn:focus-visible { outline: 2px solid rgb(var(--focus)); outline-offset: 2px; }
