/* The data catalog (/data) and the table pages (/data/<family>/<table>): reference-page layout only. Tokens and shared
 * components come from site.css; this sheet adds the section grid, the filter row, the reflow of wide tables on a
 * phone, the status swatches of the rights vocabulary and the coverage figure. */

/* ------------------------------------------------------------------ page head */
.dc-head { padding-bottom: 34px; }
.dc-head h1 { max-width: 24em; overflow-wrap: break-word; }
.dc-crumb { margin: 0 0 14px; font: 500 var(--t-ui)/1.4 var(--sans); color: var(--ink-3); }
.dc-crumb a { color: var(--ink-2); }
.dc-headline { margin: 16px 0 0; font: 400 var(--t-ui)/1.7 var(--sans); color: var(--ink-2); }
.dc-hl { white-space: nowrap; }
@media (max-width: 720px) { .dc-hl { white-space: normal; } }
.dc-sep { margin: 0 10px; color: var(--ink-4); }
.dc-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 22px 0 0; }

/* ------------------------------------------------------------------ sections: title in the margin, body beside it */
.dc-sec { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); column-gap: 48px; align-items: start; }
.dc-sec > h2 { font-size: 23px; line-height: 1.25; margin: 0 0 14px; }
.dc-body { min-width: 0; }
.dc-blockhead { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); column-gap: 48px; align-items: baseline; margin-bottom: 18px; }
.dc-blockhead > h2 { font-size: 23px; line-height: 1.25; margin: 0; }
.dc-blockhead > .dc-p { margin: 0; }
.dc-p { max-width: 46em; margin: 0 0 12px; color: var(--ink-2); }
.dc-h3 { margin: 26px 0 8px; font: 600 var(--t-m)/1.3 var(--sans); color: var(--ink); }
.dc-h3:first-child { margin-top: 0; }
.dc-ul { margin: 0 0 8px; padding-left: 18px; max-width: 46em; color: var(--ink-2); }
.dc-ul li { margin-bottom: 6px; }
.dc-ul li::marker { color: var(--ink-4); }
.dc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.dc-side { padding-left: 28px; border-left: 1px solid var(--rule); }
.dc-dl { row-gap: 9px; max-width: 54em; }
.dc-dl dd { overflow-wrap: anywhere; }
.dc-dl dd small, .dc-sub { display: block; margin-top: 2px; font-size: var(--t-s); color: var(--ink-3); }
.dc-cite { margin: 0 0 6px; padding-left: 14px; border-left: 3px solid var(--rule-2); font: 400 17px/1.5 var(--serif); color: var(--ink); max-width: 38em; }
.dc-mono, .dc-path { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
.dc-path { color: var(--ink-3); }
code { overflow-wrap: anywhere; }
.ui-table code { overflow-wrap: normal; word-break: normal; }
@media (min-width: 721px) { .dc-colname code { white-space: nowrap; } }
.ui-table td.dc-main code { overflow-wrap: anywhere; }
.dc-count { margin: 16px 0 8px; font: 500 var(--t-ui)/1.4 var(--sans); color: var(--ink-2); }
.dc-count button { margin-left: 10px; }
@media (max-width: 900px) {
  .dc-sec, .dc-blockhead { grid-template-columns: minmax(0, 1fr); }
  .dc-blockhead > .dc-p { margin-top: 6px; }
  .dc-two { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .dc-side { padding-left: 0; border-left: 0; padding-top: 22px; border-top: 1px solid var(--rule); }
}

/* ------------------------------------------------------------------ filters */
.dc-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; padding: 14px 0 16px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.dc-filter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dc-filter label { font: 500 var(--t-s)/1.2 var(--sans); color: var(--ink-3); }
.dc-filter .ui-select { min-width: 190px; max-width: 100%; }
@media (max-width: 720px) {
  .dc-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .dc-filter .ui-select { min-width: 0; width: 100%; }
}

/* ------------------------------------------------------------------ status words: rights and inventory (swatch + word) */
.dc-r-public_domain, .dc-i-published { --sw: var(--ok); }
.dc-r-attribution { --sw: var(--water); }
.dc-r-restricted, .dc-i-published_withheld { --sw: var(--dated); }
.dc-r-not_published, .dc-i-not_published, .dc-r-withheld { --sw: var(--bad); }
.dc-rightskey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 28px; margin: 10px 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.dc-rightskey p { margin: 3px 0 0 19px; font: 400 var(--t-s)/1.45 var(--sans); color: var(--ink-3); }
@media (max-width: 900px) { .dc-rightskey { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ tables: families, inventory, files, columns */
.dc-fam { margin-top: 34px; }
.dc-fam-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-bottom: 8px; }
.dc-fam-h h3 { font: 600 20px/1.3 var(--serif); }
.dc-fam-h span { font: 400 var(--t-s)/1.3 var(--sans); color: var(--ink-3); }
.dc-scroll { overflow-x: auto; max-width: 100%; }
.dc-scroll:focus-visible { outline-offset: 4px; }
.dc-table-list td { padding-top: 11px; padding-bottom: 11px; }
.dc-fixed { table-layout: fixed; min-width: 900px; }
.dc-table-list .dc-main { width: 34%; }
.dc-tt { font: 600 var(--t-m)/1.3 var(--sans); }
.dc-purpose { display: block; margin-top: 3px; font: 400 var(--t-s)/1.45 var(--sans); color: var(--ink-2); max-width: 36em; }
.dc-table-list .dc-path { display: block; margin-top: 4px; font-size: 13px; }
.ui-table td .ui-status { white-space: normal; }
.dc-mline { display: none; margin-top: 4px; font: 400 var(--t-s)/1.45 var(--sans); color: var(--ink-2); }
.dc-note { display: block; margin-top: 3px; font: 400 var(--t-s)/1.4 var(--sans); color: var(--ink-3); }
.dc-hash { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.dc-empty-row td { color: var(--ink-3); }
.ui-table caption { padding-top: 4px; }
.dc-inv-rel { margin-top: 30px; }
.dc-inv-rel:first-child { margin-top: 0; }
.dc-inv-rel .dc-fam-h h3 { font-family: var(--sans); font-size: 18px; }
.dc-inv-sum { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 18px; padding: 0; list-style: none; }
.dc-inv-sum li { font: 500 var(--t-ui)/1.3 var(--sans); }
.dc-inv-sum b { font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
:target { scroll-margin-top: 16px; }
tr:target { background: var(--paper-3); }
.dc-np li { margin-bottom: 10px; }
.dc-fn { font: 500 var(--t-s)/1 var(--sans); vertical-align: baseline; margin-left: 3px; white-space: nowrap; }
.dc-notes { margin: 10px 0 0; padding-left: 22px; font: 400 var(--t-s)/1.5 var(--sans); color: var(--ink-2); max-width: 60em; }
.dc-notes li { margin-bottom: 4px; }
.dc-notes li:target { background: var(--paper-3); }
.dc-np code { color: var(--ink); }

/* a wide table becomes a list of labelled lines on a phone; the header row stays for screen readers */
@media (max-width: 720px) {
  .dc-reflow thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dc-reflow, .dc-reflow tbody, .dc-reflow tr, .dc-reflow td { display: block; width: auto; }
  .dc-reflow tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .dc-reflow td { position: relative; padding: 3px 0 3px 7.6em; border: 0; text-align: left; min-height: 1.6em; }
  .dc-reflow td.n { text-align: left; }
  .dc-reflow td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 7em; font: 400 var(--t-s)/1.5 var(--sans); color: var(--ink-3); }
  .dc-reflow td.dc-main, .dc-reflow td[data-label=""] { padding-left: 0; }
  .dc-reflow td.dc-main { padding-bottom: 6px; }
  .dc-reflow td.dc-main::before, .dc-reflow td[data-label=""]::before { content: none; }
  .dc-table-list .dc-main { width: auto; }
  .ui-table td .ui-status { white-space: normal; }
  .dc-m-hide { display: none !important; }
  .dc-mline { display: block !important; }
  .dc-mline-i { display: inline !important; }
  .dc-reflow.dc-fixed { min-width: 0; table-layout: auto; }
  .dc-reflow colgroup { display: none; }
}
.dc-mline-i { display: none; color: var(--ink-3); font-size: var(--t-s); }

/* ------------------------------------------------------------------ coverage figure (California Albers, equal area) */
.dc-maps { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 18px 26px; max-width: 980px; }
.dc-maps.one { --n: 1; max-width: 520px; }
.dc-fig.side { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); column-gap: 32px; align-items: end; }
.dc-fig.side .dc-figkey { margin-top: 0; flex-direction: column; gap: 8px; }
.dc-fig.side figcaption { margin-top: 14px; }
@media (max-width: 1100px) { .dc-fig.side { display: block; } .dc-fig.side .dc-figkey { margin-top: 12px; flex-direction: row; } }
.dc-map { margin: 0; min-width: 0; }
.dc-map svg { display: block; width: 100%; height: auto; background: var(--paper-2); border: 1px solid var(--rule-2); }
.dc-map h3 { margin: 0 0 6px; font: 600 var(--t-ui)/1.3 var(--sans); }
.dc-map p { margin: 6px 0 0; font: 400 var(--t-s)/1.4 var(--sans); color: var(--ink-2); }
.dc-land { fill: var(--land-out); stroke: none; }
.dc-u { fill: var(--land-ca); stroke: var(--lv-edge); stroke-width: 0.5; }
.dc-u.on { fill: color-mix(in srgb, var(--water-2) 62%, var(--land-ca)); stroke: var(--surface); stroke-width: 0.45; }
.dc-u.on:hover, .dc-u:hover { stroke: var(--ink); stroke-width: 1.2; }
.dc-ca { fill: var(--land-ca); stroke: var(--m-state); stroke-width: 0.9; }
.dc-ca.on { fill: color-mix(in srgb, var(--water-2) 62%, var(--land-ca)); }
.dc-ctx { fill: none; stroke: #cbbfa8; stroke-width: 0.4; }
.dc-pts { fill: none; stroke: var(--water-ink); stroke-opacity: 0.55; stroke-width: 1.6; stroke-linecap: round; }
.dc-frame { fill: none; stroke: var(--m-state); stroke-width: 0.9; }
.dc-figkey { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 0; font: 400 var(--t-s)/1.3 var(--sans); color: var(--ink); }
.dc-figkey span { display: inline-flex; align-items: center; gap: 8px; }
.dc-figkey i { display: inline-block; width: 22px; height: 12px; border: 1px solid var(--rule-2); background: var(--land-ca); }
.dc-figkey i.on { background: color-mix(in srgb, var(--water-2) 62%, var(--land-ca)); border-color: var(--water-2); }
.dc-figkey i.line { height: 0; border: 0; border-top: 1px solid #cbbfa8; background: none; }
.dc-figkey i.land { background: var(--land-out); border-color: var(--rule-2); }
.dc-figkey i.pt { width: 12px; border: 0; background: none; position: relative; }
.dc-figkey i.pt::after { content: ""; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--water-ink); opacity: 0.7; }
@media (max-width: 720px) { .dc-maps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; } .dc-maps.one { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ code, provenance */
.dc-code { margin: 6px 0 16px; padding: 12px 16px; overflow-x: auto; background: var(--paper-2); border-left: 3px solid var(--rule-2);
  font: 400 13.5px/1.55 var(--mono); color: var(--ink); white-space: pre; tab-size: 4; }
.dc-code:focus-visible { outline-offset: 2px; }
.dc-ex-h { margin: 18px 0 2px; font: 600 var(--t-ui)/1.35 var(--sans); }
.dc-ex-h:first-child { margin-top: 0; }
.dc-prov { list-style: none; margin: 0; padding: 0; }
.dc-prov li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.dc-prov li:first-child { border-top: 1px solid var(--rule); }
.dc-filelist td { vertical-align: middle; }
.dc-filelist .ui-btn { white-space: nowrap; }
details.ui-more pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.5 var(--mono); color: var(--ink-2); }

@media print {
  .dc-filters, .dc-actions, .dc-filelist .ui-btn, .dc-count button { display: none !important; }
  .dc-sec { display: block; }
  .dc-scroll { overflow: visible; }
  .dc-code { white-space: pre-wrap; }
}
