/* Oregon's counties (OPP-37): the county map and each county's page. Both
   wear the free owner page's frame (owner-page.css, project-page.css); this
   adds only the map, the locator, and the county page's two lists. */
.county-pages, .county-page, .county-index {
  --county-empty: #eef1f0;
  --county-shade-1: #d6ebe6;
  --county-shade-2: #a8d2c9;
  --county-shade-3: #6cb0a5;
  --county-shade-4: #2e877d;
  --county-shade-5: #0f5d57;
  --county-edge: #fbfcfb;
}

/* The locator: Oregon in outline, one county marked. */
.county-locator { display: block; width: 100%; height: auto; overflow: visible; }
.county-locator path { fill: #dbe7e3; stroke: #fff; stroke-width: .6px; vector-effect: non-scaling-stroke; }
.county-locator path.is-here { fill: var(--project-teal); }

/* County page header: the locator sits before the name, as a seal would. */
.county-page-lead { display: grid; grid-template-columns: 128px minmax(0, 1fr); grid-template-areas: "map title" "map sentence"; column-gap: 22px; align-items: center; }
.county-page-lead > .county-page-locator { grid-area: map; align-self: center; }
.county-page-lead > h1 { grid-area: title; align-self: end; }
.county-page-lead > .project-page-sentence { grid-area: sentence; align-self: start; }
.county-page-locator { display: block; padding: 10px; border: 1px solid #d3e3df; border-radius: 12px; background: rgba(255, 255, 255, .82); text-decoration: none !important; }
.county-page-locator:hover .county-locator path:not(.is-here), .county-page-locator:focus-visible .county-locator path:not(.is-here) { fill: #cfe0db; }
.county-page h1 { margin-top: 0; }
.county-page-lead .project-page-sentence { margin-top: 10px; }

/* A row's owner on the county page's solicitation list. */
.owner-page-rows li p.owner-page-row-owner { margin: 1px 0 1px; color: var(--project-ink); font-size: 13px; font-weight: 600; }
.owner-page-rows li p.owner-page-row-owner a { color: var(--project-ink); font-weight: 600; }

/* Public owners and the ranked table. */
.county-owner-table td small, .county-rank-table td small { display: block; color: var(--project-muted); font-size: 12px; font-weight: 400; }
.county-zero { color: #a3b2af; }
.county-open-count { display: inline-block; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: #e3f2ee; color: #0b4f4a; font-weight: 700; text-align: center; }
.county-rank-table tbody th a, .county-owner-table tbody th a { font-weight: 600; }
.county-rank-table td:last-child { max-width: 260px; color: var(--project-copy); }
.county-rank-table td:last-child a { color: var(--project-copy); font-weight: 500; }

/* Neighboring counties: each with its own place on the state. */
.county-neighbor-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.county-page .county-neighbor { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; height: 100%; padding: 12px 14px; border: 1px solid var(--project-line); border-radius: 10px; color: var(--project-ink); font-weight: 400; text-decoration: none; }
.county-page .county-neighbor:hover, .county-page .county-neighbor:focus-visible { border-color: #a9cbc4; background: #f6faf9; }
.county-neighbor strong { display: block; font-size: 15px; font-weight: 600; }
.county-neighbor small { display: block; margin-top: 2px; color: var(--project-copy); font-size: 12.5px; line-height: 1.4; }

/* The map. */
.county-index-lead { max-width: 760px; }
.county-index-lead h1 { text-wrap: balance; }
.county-index-lead .project-page-sentence { margin-top: 12px; }
.county-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 28px; align-items: start; margin-top: 14px; }
.county-map { display: block; width: 100%; height: auto; overflow: visible; }
.county-map-county path { fill: var(--county-empty); stroke: var(--county-edge); stroke-width: 1.1px; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .12s ease; }
.county-map-county.is-shade-1 path { fill: var(--county-shade-1); }
.county-map-county.is-shade-2 path { fill: var(--county-shade-2); }
.county-map-county.is-shade-3 path { fill: var(--county-shade-3); }
.county-map-county.is-shade-4 path { fill: var(--county-shade-4); }
.county-map-county.is-shade-5 path { fill: var(--county-shade-5); }
.county-map-county { outline: none; cursor: pointer; }
.county-map-county:hover path, .county-map-county:focus-visible path, .county-map-county.is-active path { stroke: var(--project-ink); stroke-width: 2.2px; filter: brightness(.94); }
.county-map-county:focus-visible path { stroke-width: 3px; }
.county-map-labels text { fill: var(--project-ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 15px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(255, 255, 255, .8); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.county-map-labels text.is-small { font-size: 11px; }
.county-map-labels text.is-dark { fill: #fff; stroke: rgba(10, 66, 62, .55); stroke-width: 2.5px; }
.county-map-panel { position: sticky; top: 24px; display: grid; gap: 4px; padding: 18px 20px 20px; border: 1px solid #d3e3df; border-radius: 12px; background: #fbfdfc; }
.county-map-panel .project-page-label { color: var(--project-copy); font-size: 12px; font-weight: 600; }
.county-map-panel h3 { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; line-height: 1.15; }
.county-map-panel dl { display: grid; gap: 10px; margin: 6px 0 14px; }
.county-map-panel dt { color: var(--project-copy); font-size: 12px; }
.county-map-panel dd { margin: 1px 0 0; color: var(--project-ink); font-size: 18px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.county-map-panel dd[data-county-map-target="owner"] { font-size: 15px; }
.county-page .county-map-open, .county-index .county-map-open { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 7px; background: var(--project-action, #0b4f4a); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.county-index .county-map-open:hover, .county-index .county-map-open:focus-visible { background: #083b38; color: #fff; }
/* The panel informs; only a touch screen, where nothing moves it, offers its link. */
.county-index .county-map-open { display: none; }
@media (hover: none) { .county-index .county-map-open { display: inline-flex; } }
.county-map-panel dl > div { padding-left: 10px; border-left: 2px solid transparent; }
.county-map-panel dl > div.is-measure { border-left-color: var(--project-teal); }
.county-map-panel dl > div.is-measure dt { color: var(--project-teal); font-weight: 600; }
/* The color bar: the map's key, directly beneath the map it decodes and
   inside the map's column, never the panel's. Its caption names what the
   shades measure; one stepped bar reads lighter to darker, with the empty
   step set apart so "none" never reads as "few". */
.county-map-figure { min-width: 0; }
.county-map-legend { display: grid; gap: 8px; max-width: 520px; margin: 18px 0 0; }
.county-map-legend[hidden] { display: none; }
.county-map-legend p { margin: 0; color: var(--project-ink); font-size: 14px; font-weight: 600; }
.county-map-legend ol { display: flex; align-items: flex-start; gap: 2px; margin: 0; padding: 0; list-style: none; }
.county-map-legend li { display: grid; flex: 1 1 0; gap: 6px; min-width: 0; color: var(--project-copy); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.county-map-legend li.is-none { flex: 0 0 48px; margin-right: 14px; }
.county-map-legend span { display: block; height: 16px; border-radius: 2px; background: var(--county-empty); box-shadow: inset 0 0 0 1px rgba(21, 56, 58, .1); }
.county-map-legend li:nth-child(2) span { border-radius: 4px 2px 2px 4px; }
.county-map-legend li:last-child span { border-radius: 2px 4px 4px 2px; }
.county-map-legend .is-shade-1 { background: var(--county-shade-1); }
.county-map-legend .is-shade-2 { background: var(--county-shade-2); }
.county-map-legend .is-shade-3 { background: var(--county-shade-3); }
.county-map-legend .is-shade-4 { background: var(--county-shade-4); }
.county-map-legend .is-shade-5 { background: var(--county-shade-5); }

@media (prefers-reduced-motion: reduce) { .county-map-county path { transition: none; } }

@media (max-width: 860px) {
  .county-map-layout { grid-template-columns: minmax(0, 1fr); }
  .county-map-panel { position: static; grid-template-columns: minmax(0, 1fr); }
  .county-map-panel dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .county-page-lead { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "map title" "sentence sentence"; column-gap: 14px; }
  .county-page-lead > h1 { align-self: center; }
  .county-page-locator { padding: 6px; border-radius: 9px; }
  .county-map-labels text { font-size: 30px; stroke-width: 5px; }
  .county-map-labels text.is-dark { stroke-width: 4px; }
  .county-map-labels text.is-small, .county-map-labels text.is-crowded { display: none; }
  .county-rank-table td:last-child { max-width: none; }
}

/* A neighbor's thumbnail marks the county the page is about, lightly. */
.county-locator path.is-beside { fill: #a8cfc7; }
.county-neighbor .county-locator { width: 64px; }


/* What the map shows: a labeled segmented control and its key on one row.
   Sized as a control on the map, not as page tabs, and chosen with a light
   raised segment so it never borrows the map's own shades. */
.county-map-section .county-map-heading { display: block; margin-bottom: 14px; }
.county-map-section .county-map-heading p { margin: 6px 0 0; color: var(--project-copy); font-size: 15px; text-align: left; }
.county-map-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.county-measure-switch { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.county-measure-switch legend { float: left; padding: 0; color: var(--project-ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.county-measure-options { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #d3e3df; border-radius: 11px; background: #eef4f2; }
.county-measure-options label { position: relative; display: block; }
.county-measure-options input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.county-measure-option { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 8px; color: var(--project-copy); transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.county-measure-option .county-inline-icon { flex: none; width: 18px; height: 18px; }
.county-measure-text { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.county-measure-text strong { color: inherit; font-size: 14.5px; font-weight: 600; }
.county-measure-text small { color: var(--project-muted); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.county-measure-options label:hover .county-measure-option { color: var(--project-ink); }
.county-measure-options input:checked + .county-measure-option { background: #fff; color: var(--project-ink); box-shadow: 0 1px 3px rgba(21, 56, 58, .14), inset 0 0 0 1px #c2d8d2; }
.county-measure-options input:checked + .county-measure-option .county-inline-icon { color: var(--project-teal); }
.county-measure-options input:checked + .county-measure-option small { color: var(--project-teal); }
.county-measure-options input:focus-visible + .county-measure-option { outline: 2px solid var(--project-teal); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .county-measure-option { transition: none; } }

/* Where the work is: observations worked out from the figures. */
.county-insight-list { margin: 6px 0 0; padding: 0; list-style: none; }
.county-insight { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--project-line); }
.county-insight:first-child { border-top: 0; }
.county-insight-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: #e6f1ee; }
.county-insight-icon .phosphor-icon { width: 22px; height: 22px; opacity: .8; }
.county-insight h3 { margin: 0; color: var(--project-ink); font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.county-insight p { margin: 3px 0 0; color: var(--project-copy); font-size: 14px; line-height: 1.45; }
.county-insight-note { display: block; color: var(--project-muted); font-size: 13px; }
.county-insight-value { color: var(--project-ink); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.county-insight:first-child .county-insight-value { color: var(--project-teal); }

/* The county directory: find a county, sort the rows, open one. */
.county-directory-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.county-directory-search { position: relative; flex: 1 1 260px; max-width: 380px; }
.county-directory-search .phosphor-icon { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; opacity: .55; transform: translateY(-50%); pointer-events: none; }
.county-directory-search input, .county-directory-sort select { width: 100%; height: 42px; border: 1px solid #cfdcd8; border-radius: 9px; background: #fff; color: var(--project-ink); font: inherit; font-size: 14.5px; }
.county-directory-search input { padding: 0 12px 0 38px; }
.county-directory-sort select { padding: 0 36px 0 12px; }
.county-directory-search input:focus-visible, .county-directory-sort select:focus-visible { outline: 2px solid var(--project-teal); outline-offset: 1px; border-color: var(--project-teal); }
.county-sort-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; }
.county-sort-button:hover { color: var(--project-ink); }
th[aria-sort] .county-sort-button { color: var(--project-ink); }
th[aria-sort="descending"] .county-sort-button::after { content: " ↓"; }
th[aria-sort="ascending"] .county-sort-button::after { content: " ↑"; }
.county-rank-table tbody tr[hidden] { display: none; }
.county-rank-table tbody tr:hover { background: #f6faf9; }
.county-rank-table tbody th a { color: var(--project-teal); font-size: 15px; text-decoration: none; }
.county-rank-table tbody th a:hover { text-decoration: underline; }
.county-rank-table .county-rank-go { width: 28px; text-align: right; }
.county-rank-table .county-rank-go a { display: inline-grid; place-items: center; width: 24px; height: 24px; }
.county-rank-table .county-rank-go .phosphor-icon { width: 16px; height: 16px; opacity: .4; }
.county-rank-table tbody tr:hover .county-rank-go .phosphor-icon { opacity: .85; }
.county-directory-empty { margin: 14px 0 0; color: var(--project-copy); }
.county-directory-empty[hidden] { display: none; }

/* Where the figures come from, and how fresh they are. */
.county-about { padding: 22px 24px; border: 1px solid var(--project-line); border-radius: 12px; background: #fafcfb; }
.county-about h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 18px; }
.county-about h2 .phosphor-icon { width: 20px; height: 20px; opacity: .7; }
/* Full width of the page: the source and the method side by side, each a
   readable measure, and the date line across both. */
.county-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 40px; }
.county-about h2, .county-about .county-about-meta { grid-column: 1 / -1; }
.county-about p { margin: 4px 0 0; color: var(--project-copy); font-size: 14.5px; line-height: 1.6; }
.county-about .county-about-meta { margin-top: 12px; color: var(--project-muted); font-size: 13px; }

@media (max-width: 680px) {
  .county-map-controls { gap: 12px; }
  .county-measure-switch { display: grid; gap: 8px; width: 100%; }
  .county-measure-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .county-measure-option { flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 4px; }
  .county-measure-text strong { font-size: 13.5px; }
  .county-measure-text small { display: none; }
  .county-map-legend { max-width: none; margin-top: 14px; }
  .county-map-legend li { font-size: 11.5px; }
  .county-map-legend li.is-none { flex-basis: 40px; margin-right: 8px; }
  .county-insight { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; }
  .county-insight-icon { width: 36px; height: 36px; border-radius: 9px; }
  .county-insight-value { font-size: 19px; }
  .county-directory-search { max-width: none; }
  .county-directory-sort { flex: 1 1 100%; }
  .county-rank-table .county-rank-go { display: none; }
  .county-rank-table td[data-label="Most active owner"] { grid-column: 1 / -1; }
  .county-about { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}
