/* The reading pages: county pages, the blog and approval times. styles.css holds the tokens
   and the shared parts, and loads first; docs/design-system.md says how they look. */

/* County pages and the blog */

.crumbs { margin-bottom: 20px; font-size: 0.9375rem; color: var(--muted); }
.crumbs a { color: inherit; }
.page.county, .page.counties { padding-bottom: 0; }
.county .lede { margin-bottom: 24px; }
.county-offer .cta-note { margin-top: 12px; }
.county-offer { display: grid; gap: 16px; margin-top: 32px; padding: 24px; border: 1.5px solid var(--mark-edge); border-radius: var(--radius-panel); background: var(--surface-raised); }
@media (min-width: 720px) { .county-offer { padding: 32px; } }
.county-offer p { margin: 0; }
.county-price b { font-weight: 400; font-size: clamp(2.75rem, 2.2rem + 2vw, 4rem); line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; margin-right: 8px; }
.county-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .county-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.county-subhead { font-size: 1.5rem; margin: 0 0 16px; }
.county-facts { margin: 24px 0 16px; max-width: 880px; }
.county-facts > div { padding-block: 14px; border-top: 1px solid var(--border); }
.county-facts > div:last-child { border-bottom: 1px solid var(--border); }
.county-facts dt { font-weight: 500; }
.county-facts dd { margin: 4px 0 0; }
@media (min-width: 720px) { .county-facts > div { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; } .county-facts dd { margin: 0; } }
.county-steps { counter-reset: step; }
.county-steps li { counter-increment: step; display: flex; gap: 12px; }
.county-steps li::before { content: counter(step); flex: none; min-width: 1.5em; font-variant-numeric: tabular-nums; color: var(--muted); }
.county-state { margin-top: 40px; }
.county-list { list-style: none; margin: 0 0 24px; padding: 0; max-width: 720px; }
.county-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-block: 14px; border-top: 1px solid var(--border); }
.county-list li:last-child { border-bottom: 1px solid var(--border); }
.county-list span { color: var(--muted); }
.page .county-list { padding-left: 0; }
.areas-table th a { color: inherit; }

.post-meta { margin-bottom: 32px; }
.prose { line-height: 1.6; }
.prose h2 { font-size: 1.5rem; margin: 1.8em 0 0.5em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-tile); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25em 0; font-size: 0.9375rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 500; border-bottom-color: var(--line-strong, var(--border)); }
@media (max-width: 719px) { .prose table { display: block; overflow-x: auto; } }
.prose code { font-size: 0.9em; }

/* Approval times: one row per county, the days from filing to the court's approval. */
.approval-times .lede { margin-bottom: 12px; }
.approval-times .measured { margin: 0 0 32px; }
.approval-times > .times { max-width: 1000px; }
.times { margin: 0; }
.times-key { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; font-size: 0.9375rem; color: var(--muted); }
.times-key span { display: inline-flex; align-items: center; gap: 8px; }
.times-key i { display: inline-block; }
.key-range { width: 24px; height: 10px; background: var(--highlighter); border: 1px solid var(--mark-edge); border-radius: 2px; }
.key-median { width: 3px; height: 14px; background: var(--text); }
.times-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.times-table th, .times-table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.times-table thead th { font-weight: 500; font-size: 0.9375rem; color: var(--muted); border-bottom-color: var(--border-strong); }
.times-table tbody th { font-weight: 400; }
.times-table tbody th a { color: inherit; }
.times-table .num { text-align: right; white-space: nowrap; }
.times-table td:last-child, .times-table th:last-child { padding-right: 0; }
.times-bar, .times-bar-head { width: 34%; padding-left: 8px; }
.times-svg { display: block; width: 100%; height: 14px; overflow: visible; }
.times-track { fill: var(--border); }
.times-range { fill: var(--highlighter); stroke: var(--mark-edge); stroke-width: 1; vector-effect: non-scaling-stroke; }
.times-median { fill: var(--text); }
@media (min-width: 720px) { .times-table tbody th { white-space: nowrap; } }
@media (max-width: 719px) {
  .times-table thead { display: none; }
  .times-table, .times-table tbody { display: block; }
  .times-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-block: 14px; border-bottom: 1px solid var(--border); }
  .times-table th, .times-table td { padding: 0; border: 0; }
  .times-table tbody th { grid-column: 1 / -1; font-weight: 500; }
  .times-table td.num { text-align: left; }
  .times-table td:nth-of-type(1)::before { content: "Half approved: "; color: var(--muted); }
  .times-table td:nth-of-type(2) { text-align: right; color: var(--muted); }
  .times-bar { grid-column: 1 / -1; width: auto; }
  .times-table td:last-child { display: none; }
}
.times-notes { max-width: 760px; margin-top: 48px; }
.times-notes ul { padding-left: 1.2em; }
.times-notes li { margin-bottom: 0.5em; }
.guide-counties, .more-guides { max-width: 760px; margin-top: 56px; }
.guide-counties h2, .more-guides h2 { font-size: 1.5rem; }

/* A county's cities under its opening line, and a state's counties with their figures. */
.county-where { margin: 0 0 16px; color: var(--muted); max-width: 720px; }
.county .notice { max-width: 720px; margin: 0 0 8px; }
.county-state h2 a { color: inherit; }
.county-list .county-cities { flex-basis: 100%; order: 3; font-size: 0.9375rem; }
.state-counties { max-width: 880px; }
.state-counties li > div { min-width: 0; }
.state-counties p { margin: 2px 0 0; color: var(--muted); font-size: 0.9375rem; }
.state-counties li > span { text-align: right; }
@media (max-width: 719px) { .state-counties li > span { text-align: left; flex-basis: 100%; } }

/* A post's picture, on the post above its text. */
.post-picture { display: block; width: 100%; max-width: 880px; height: auto; margin: 0 0 32px; border-radius: var(--radius-panel); border: 1px solid var(--border); background: var(--bone, #f4f2f0); }

/* Figures in a post: HTML and SVG drawn from the site's data files (docs/design-system.md, Figures). */
.fig { margin: 2em 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface-raised); }
@media (min-width: 720px) { .fig { padding: 24px; } }
.fig figcaption { display: grid; gap: 2px; margin-bottom: 16px; }
.fig figcaption strong { font-weight: 500; font-size: 1.125rem; line-height: 1.3; }
.fig figcaption span { color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
.fig .times-key { margin: 0 0 12px; font-size: 0.875rem; }
.fig-source { margin: 16px 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.key-bar { width: 24px; height: 8px; background: var(--text); }
.bars { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; padding-block: 9px; border-top: 1px solid var(--border); font-size: 0.9375rem; line-height: 1.35; }
.bars li:first-child { border-top: 0; padding-top: 0; }
.bars li:last-child { padding-bottom: 0; }
.bar-label small { display: block; color: var(--muted); font-size: 0.875rem; }
.bar-value { white-space: nowrap; text-align: right; }
.bar-svg { grid-column: 1 / -1; display: block; width: 100%; height: 12px; overflow: visible; }
.bar-track { fill: var(--border); }
.bar-fill { fill: var(--text); }
.bar-band { fill: var(--border-strong); }
@media (min-width: 720px) {
  .bars li { grid-template-columns: 190px minmax(0, 1fr) 76px; align-items: center; gap: 16px; }
  .bars-detail li { grid-template-columns: 230px minmax(0, 1fr) 56px; }
  .bar-label { order: 1; }
  .bar-svg { order: 2; grid-column: auto; }
  .bar-value { order: 3; }
}

/* A figure redrawn as an animated chart keeps its rows for screen readers, out of sight. */
.fig-chart { width: 100%; }
.fig-live .bars { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A diagram draws itself in when it nears the screen; without the script it is simply drawn. */

/* A county page's own account of where its estates come from. */
.county-about > * { max-width: 760px; }
.county-about .county-subhead { margin-top: 32px; }

/* A post's key points and its sections, above its text. */
.post-points { margin: 0 0 24px; padding: 20px 24px; border-radius: var(--radius-panel); background: var(--surface-panel); }
.post-points h2, .post-sections h2 { margin: 0 0 10px; font-size: 1rem; font-weight: 500; }
.post-points ul { margin: 0; padding-left: 1.2em; line-height: 1.5; }
.post-points li + li { margin-top: 6px; }
.post-sections { margin: 0 0 32px; font-size: 0.9375rem; }
.post-sections ol { margin: 0; padding-left: 1.4em; line-height: 1.5; columns: 2 260px; column-gap: 32px; color: var(--muted); }
.post-sections li { break-inside: avoid; padding-block: 2px; }
.prose h2 { scroll-margin-top: 24px; }

/* A chart's second color, the row its headline names or the county a reader picked. */
.bar-accent { fill: var(--chart-accent); }
.key-accent { background: var(--chart-accent); }
.bars .bar-group { display: block; padding: 14px 0 2px; border-top: 0; color: var(--muted); font-weight: 500; font-size: 0.875rem; }
.bars .bar-group:first-child { padding-top: 0; }
.bars .bar-group + li { border-top: 0; }
.fig-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; font-size: 0.9375rem; }
.fig-pick label { font-weight: 500; }
.fig-pick select { min-height: 40px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--field-border); border-radius: var(--radius-field); background: var(--surface-raised); color: var(--text); font: inherit; }
.fig-pick output { flex-basis: 100%; color: var(--text); }
.fig-pick output:empty { display: none; }

/* The county map: the states in outline, each county on sale a link in one of two colors. */
.counties > .fig { max-width: 880px; margin: 32px 0 8px; }
.map-still { display: block; width: 100%; height: auto; }
.map-state { fill: var(--surface-raised); stroke: var(--border-strong); stroke-width: 0.8; }
.map-sold { fill: var(--border); }
.map-county { fill: var(--chart-accent); stroke: var(--surface-raised); stroke-width: 0.5; }
.fig-map { aspect-ratio: 975 / 610; }
.fig-live .map-still { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* The blog's front page: the guides as cards, three across on a wide screen, the main guide
   first and across the whole row. A card is one link, its title, stretched over the card. */
.page.blog > .post-grid { max-width: none; }
.post-grid { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.page .post-grid { padding-left: 0; }
@media (min-width: 720px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } }
@media (min-width: 1080px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface-raised); overflow: hidden; transition: border-color 0.2s var(--ease-quiet), transform 0.2s var(--ease-quiet), box-shadow 0.2s var(--ease-quiet); }
.post-card:hover, .post-card:focus-within { border-color: var(--mark-edge); transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgb(12 10 8 / 35%); }
.post-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface-panel); border-bottom: 1px solid var(--border); }
.post-card-text { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 20px; }
.post-card h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }
.post-card h2 a:focus-visible { outline: none; }
.post-card:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.post-card p { margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.post-card .post-card-meta { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 0.875rem; }
.post-card-flag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--highlighter); color: var(--ink); box-shadow: inset 0 0 0 1px var(--mark-edge); font-size: 0.8125rem; font-weight: 500; }
@media (min-width: 720px) {
  .post-lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .post-lead img { width: 56%; height: auto; border-bottom: 0; border-right: 1px solid var(--border); }
  .post-lead .post-card-text { justify-content: center; padding: 32px; gap: 12px; }
  .post-lead h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); line-height: 1.15; }
  .post-lead p { font-size: 1rem; }
  .post-lead .post-card-meta { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .post-card { transition: none; } .post-card:hover { transform: none; } }

/* When each source shows an estate: one card a source, the earliest first and marked. */

/* An estate's road to a sale: three cards in a row, an arrow between them, the approval in yellow. */
.path-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.path-cards li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-tile); font-size: 0.9375rem; line-height: 1.4; }
.path-cards li + li::before { content: ""; position: absolute; left: 50%; top: -20px; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateX(-50%) rotate(45deg); }
@media (min-width: 720px) {
  .path-cards { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .path-cards li + li::before { left: -19px; top: 50%; transform: translateY(-50%) rotate(-45deg); }
}
.path-steps { color: var(--muted); font-size: 0.8125rem; }
.path-word { font-size: 1.625rem; line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
.path-cards strong { font-weight: 500; }
.path-note { color: var(--muted); }
.path-cards .path-before .path-word { color: var(--muted); }
.path-cards .path-approved { background: var(--highlighter); border-color: var(--mark-edge); color: var(--ink); }
.path-cards .path-approved .path-steps, .path-cards .path-approved .path-note { color: var(--ink); }
.fig-armed .path-cards li { opacity: 0; transform: translateY(8px); }
.fig-play .path-cards li { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.4s var(--ease-quiet); }
.fig-play .path-cards li:nth-child(2) { transition-delay: 0.3s; }
.fig-play .path-cards li:nth-child(3) { transition-delay: 0.6s; }
