/* ═══════════════════════════════════════════════════════════════════
   DATA SUB-PAGES - editorial-heavy pages about the dataset itself.
   Builds on platform-page primitives with additions for:
     - county tile grid (coverage map)
     - signal rows with weight badges (eleven signals)
     - methodology numbered sections
     - article preview cards (market briefing)
     - county analytics data tables
   ═══════════════════════════════════════════════════════════════════ */

/* ── County tile grid (coverage-map) ─────────────────────────── */
.data-counties {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.5rem;
    max-width: 68rem;
    margin: 2.5rem auto 0;
}
.data-county {
    background: #fff;
    border: 0.0625rem solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 0.875rem;
    cursor: default;
    transition: transform 180ms cubic-bezier(0.16, 0.84, 0.32, 1), border-color 180ms ease, box-shadow 180ms ease;
    position: relative;
}
.data-county:hover {
    transform: translateY(-0.125rem);
    border-color: var(--gold);
    box-shadow: 0 0.625rem 1.5rem rgba(12, 17, 26, 0.08);
    z-index: 2;
}
.data-county.is-live { border-left: 0.1875rem solid var(--gold); }
.data-county-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--slate);
    line-height: 1.2;
    margin-bottom: 0.1875rem;
}
.data-county-meta {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.data-county-count {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--gold-dk);
    font-weight: 600;
    margin-top: 0.125rem;
}

.data-counties-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-2);
}
.data-counties-legend-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.375rem;
    vertical-align: middle;
}
.data-counties-legend-dot.live { background: var(--gold); }
.data-counties-legend-dot.queued { background: var(--border-dk); }

/* ── Signal catalog rows (eleven-signals) ────────────────────── */
.data-signals {
    max-width: 56rem;
    margin: 2.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.data-signal {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    border: 0.0625rem solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    transition: border-color 180ms ease, transform 180ms cubic-bezier(0.16, 0.84, 0.32, 1);
}
.data-signal:hover { border-color: var(--gold); }
.data-signal-weight {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gold-dk);
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
}
.data-signal-body h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--slate);
    margin: 0 0 0.25rem;
}
.data-signal-body p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-2);
    margin: 0;
}
.data-signal-cat {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dk);
    background: rgba(212, 175, 55, 0.08);
    padding: 0.3125rem 0.625rem;
    border-radius: 2rem;
    white-space: nowrap;
}
@media (max-width: 44em) {
    .data-signal { grid-template-columns: 3rem 1fr; }
    .data-signal-cat { display: none; }
}

/* ── Methodology numbered sections ───────────────────────────── */
.data-method {
    max-width: 48rem;
    margin: 0 auto;
}
.data-method-block {
    padding: 2rem 0;
    border-bottom: 0.0625rem solid var(--border);
}
.data-method-block:first-child { padding-top: 0; }
.data-method-block:last-child { border-bottom: 0; }
.data-method-n {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: 0.625rem;
}
.data-method-block h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--slate);
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}
.data-method-block p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 0.875rem;
}
.data-method-block p:last-child { margin-bottom: 0; }
.data-method-block ul {
    margin: 0.875rem 0 0;
    padding: 0 0 0 1.25rem;
}
.data-method-block li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-2);
    margin-bottom: 0.375rem;
}

/* ── Article / briefing preview cards ────────────────────────── */
.data-articles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 68rem;
    margin: 2.5rem auto 0;
}
@media (max-width: 64em) { .data-articles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 44em) { .data-articles { grid-template-columns: 1fr; } }
.data-article {
    background: #fff;
    border: 0.0625rem solid var(--border);
    border-radius: 0.875rem;
    padding: 1.75rem 1.5rem;
    transition: transform 180ms cubic-bezier(0.16, 0.84, 0.32, 1), border-color 180ms ease, box-shadow 180ms ease;
}
.data-article:hover {
    transform: translateY(-0.25rem);
    border-color: var(--gold);
    box-shadow: 0 1rem 2rem rgba(12, 17, 26, 0.08);
}
.data-article-cat {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: 0.75rem;
}
.data-article-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate);
    line-height: 1.3;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}
.data-article-excerpt {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.55;
    margin: 0 0 1rem;
}
.data-article-meta {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Analytics data table ─────────────────────────────────────── */
.data-table-wrap {
    max-width: 56rem;
    margin: 2.5rem auto 0;
    background: #fff;
    border: 0.0625rem solid var(--border);
    border-radius: 0.875rem;
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.9375rem;
    border-bottom: 0.0625rem solid var(--border);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table th {
    background: var(--bg-warm);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-3);
}
.data-table td.is-num {
    font-family: var(--font-mono);
    text-align: right;
    color: var(--slate);
    font-weight: 600;
}
.data-table td.is-trend-up { color: #1b8a5a; font-weight: 700; }
.data-table td.is-trend-down { color: #c0392b; font-weight: 700; }
.data-table tr:hover { background: rgba(212, 175, 55, 0.04); }

/* ── Inline subscribe form (market briefing) ─────────────────── */
.data-subscribe {
    display: flex;
    gap: 0.5rem;
    max-width: 32rem;
    margin: 2rem 0 0;
}
.data-subscribe input {
    flex: 1;
    padding: 0.8125rem 1.125rem;
    font-size: 0.9375rem;
    border: 0.0625rem solid rgba(255, 255, 255, 0.22);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 180ms ease, background 180ms ease;
}
.data-subscribe input:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.18);
}
.data-subscribe input::placeholder { color: rgba(255, 255, 255, 0.45); }
.data-subscribe button {
    padding: 0 1.5rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--gold);
    color: var(--slate);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 180ms ease, transform 180ms ease;
}
.data-subscribe button:hover { background: var(--gold-soft); }


/* ═══════════════════════════════════════════════════════════════════
   EDITOR PROFILES + RICH BRIEFING CARDS
   For /data/market-briefing - editorial-quality treatment for the
   masthead and archive so the page reads like a real newsroom page.
   ═══════════════════════════════════════════════════════════════════ */

.data-editors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
    max-width: 64rem;
    margin: 2.5rem auto 0;
}
/* Solo variant - single editor card centered with comfortable width. */
.data-editors-solo {
    grid-template-columns: minmax(0, 1fr);
    max-width: 38rem;
}
.data-editor {
    background: #fff;
    border: 0.0625rem solid var(--border, #d5cfc5);
    border-radius: 0.625rem;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.data-editor:hover {
    transform: translateY(-0.125rem);
    border-color: var(--gold-dk);
    box-shadow: 0 0.5rem 1.25rem rgba(20, 24, 35, 0.06);
}
.data-editor-photo {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 0.125rem solid var(--gold-soft, #e9c869);
    background: linear-gradient(135deg, var(--slate, #1c2331), #3a4660);
}
.data-editor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.data-editor-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate, #1c2331);
    margin: 0 0 0.25rem;
    line-height: 1.25;
}
.data-editor-title {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: 0.75rem;
}
.data-editor-bio {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-2, #4a4e58);
    margin: 0 0 0.875rem;
}
.data-editor-quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--slate, #1c2331);
    margin: 0 0 1rem;
    padding: 0.625rem 0 0.625rem 0.875rem;
    border-left: 0.1875rem solid var(--gold, #b5942a);
    text-align: left;
}
.data-editor-stats {
    display: flex;
    gap: 1.25rem;
    padding-top: 0.875rem;
    border-top: 0.0625rem solid var(--border-light, #ebe6dd);
    width: 100%;
    justify-content: center;
}
.data-editor-stat {
    text-align: center;
}
.data-editor-stat-n {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gold-dk);
    line-height: 1;
}
.data-editor-stat-l {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3, #6a7280);
    margin-top: 0.25rem;
}

/* ── Featured briefing (hero card at top of archive) ── */
.data-featured {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
    border: 0.0625rem solid var(--border, #d5cfc5);
    border-radius: 0.625rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    background: #fff;
}
.data-featured-image {
    min-height: 17rem;
    background-size: cover;
    background-position: center;
    position: relative;
}
.data-featured-image::after {
    content: 'FEATURED';
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gold, #d4af37);
    color: var(--slate, #1c2331);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.3125rem 0.625rem;
    border-radius: 0.1875rem;
    letter-spacing: 0.14em;
}
.data-featured-body {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.data-featured-meta {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: 0.75rem;
}
.data-featured-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--slate, #1c2331);
    line-height: 1.22;
    margin: 0 0 0.875rem;
    letter-spacing: -0.01em;
}
.data-featured-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-2, #4a4e58);
    margin: 0 0 1.5rem;
}
.data-featured-byline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 0.0625rem solid var(--border-light, #ebe6dd);
}
.data-byline-photo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--slate, #1c2331), #3a4660);
}
.data-byline-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.data-byline-text {
    display: flex;
    flex-direction: column;
}
.data-byline-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--slate, #1c2331);
}
.data-byline-meta {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3, #6a7280);
}

/* ── Archive grid: richer briefing cards with thumbnails + byline ── */
.data-archive {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}
/* Anchor wrapper around each card - full-card click target, no underline,
   inherits color so the body copy doesn't go blue. Focus ring lands on
   the wrapper so keyboard users get visible feedback. */
.data-brief-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 0.5rem;
    outline: none;
}
.data-brief-link:focus-visible {
    box-shadow: 0 0 0 0.1875rem rgba(212, 175, 55, 0.55);
}
.data-brief-link:visited { color: inherit; }
.data-brief {
    background: #fff;
    border: 0.0625rem solid var(--border, #d5cfc5);
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    cursor: pointer;
}
.data-brief-link:hover .data-brief,
.data-brief:hover {
    transform: translateY(-0.125rem);
    border-color: var(--gold-dk);
    box-shadow: 0 0.375rem 1rem rgba(20, 24, 35, 0.06);
}
/* Featured card behaves identically when wrapped in a link */
.data-brief-link .data-featured { cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.data-brief-link:hover .data-featured {
    transform: translateY(-0.125rem);
    border-color: var(--gold-dk);
    box-shadow: 0 0.5rem 1.5rem rgba(20, 24, 35, 0.08);
}
.data-brief-thumb {
    height: 8rem;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 0.0625rem solid var(--border-light, #ebe6dd);
}
.data-brief-body {
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.data-brief-meta {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: 0.625rem;
}
.data-brief-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate, #1c2331);
    margin: 0 0 0.625rem;
    line-height: 1.3;
}
.data-brief-excerpt {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-2, #4a4e58);
    margin: 0 0 1.25rem;
    flex: 1;
}
.data-brief-foot {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding-top: 0.875rem;
    border-top: 0.0625rem solid var(--border-light, #ebe6dd);
}
.data-brief-foot .data-byline-photo {
    width: 1.75rem;
    height: 1.75rem;
}
.data-brief-foot-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate, #1c2331);
    flex: 1;
}
.data-brief-foot-read {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3, #6a7280);
}

/* Thumbnail real-image variants - each category points to a stable
   Picsum URL (CC0 photographer catalog) keyed by category so the
   image is consistent and recognizable. Previous gradient-only
   placeholders shipped the archive without real imagery and the
   grid looked like a code editor; real photos give it the
   editorial weight the briefings deserve.

   Featured (1200×600) and archive thumb (600×280) sizes are
   served separately so the CDN can ship appropriately-sized
   bitmaps without wasting bandwidth on the smaller grid cells.

   The dim-overlay gradient on top of each photo keeps the gold
   "FEATURED" pill + meta line legible no matter which photo
   lands. Per-card uniqueness comes from inline style overrides
   in market-briefing.html (each archive card sets its own seed
   so the grid doesn't show the same photo eight times). */
/* Real, topic-relevant photos for every archive + featured thumb.
   LoremFlickr serves Creative-Commons Flickr photos matching the
   keywords passed in the URL path, so a "courthouse,gavel" lookup
   returns an actual courthouse photo instead of the random
   real-estate-adjacent image Picsum would hand back. The ?lock=N
   query makes the result deterministic across renders so the page
   doesn't shuffle photos between visits.

   Each archive card sets its own --card-img inline (see
   market-briefing.html) with keywords tied to that specific
   briefing topic. Category classes below provide a themed default
   for any thumb that doesn't override. The dark overlay gradient
   on top keeps the gold "FEATURED" pill and meta line AA-readable
   regardless of which photo lands. */
.data-brief-thumb,
.data-featured-image {
    --card-overlay: linear-gradient(180deg, rgba(20, 27, 44, 0.18) 0%, rgba(20, 27, 44, 0.42) 100%);
    background-color: #1f2838; /* fallback while the photo resolves */
    background-image: var(--card-overlay), var(--card-img, url("https://loremflickr.com/800/400/realestate?lock=1"));
    background-size: cover;
    background-position: center;
}
.data-featured-image {
    /* Hero variant - same overlay strength, larger requested image so
       it doesn't pixelate at hero scale. */
    --card-overlay: linear-gradient(180deg, rgba(20, 27, 44, 0.20) 0%, rgba(20, 27, 44, 0.45) 100%);
}
/* Category defaults - single common keywords because LoremFlickr's
   multi-tag AND lookups return the same fallback photo when one tag
   in the list has no Flickr matches (e.g. "forrent", "landdevelopment",
   "indianastatehouse" - all compound or invented words). Single
   popular words like "realestate", "capitol", "construction" return
   actual matched photos every time. The article-specific overrides
   in market-briefing.html follow the same rule. */
.data-brief-thumb-market       { --card-img: url("https://loremflickr.com/800/400/realestate?lock=11"); }
.data-brief-thumb-policy       { --card-img: url("https://loremflickr.com/800/400/capitol?lock=22"); }
.data-brief-thumb-entitlement  { --card-img: url("https://loremflickr.com/800/400/construction?lock=33"); }
.data-brief-thumb-distress     { --card-img: url("https://loremflickr.com/800/400/foreclosure?lock=44"); }
.data-brief-thumb-methodology  { --card-img: url("https://loremflickr.com/800/400/chart?lock=55"); }
.data-brief-thumb-investigation { --card-img: url("https://loremflickr.com/800/400/magnifying?lock=66"); }
.data-brief-thumb-profiles     { --card-img: url("https://loremflickr.com/800/400/apartment?lock=77"); }
.data-brief-thumb-prospecting  { --card-img: url("https://loremflickr.com/800/400/suburb?lock=88"); }

/* Archive filter chips */
.data-archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 0 auto 2.5rem;
    max-width: 56rem;
}
.data-archive-chip {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4375rem 0.875rem;
    border: 0.0625rem solid var(--border, #d5cfc5);
    border-radius: 2rem;
    color: var(--text-2, #4a4e58);
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    /* Reset button defaults so the chip looks identical whether the
       HTML uses <button> (clickable) or <span> (legacy). */
    font-weight: inherit;
    line-height: 1;
    appearance: none;
}
.data-archive-chip:hover:not(.is-active) {
    border-color: var(--gold-dk, #7a6315);
    color: var(--slate, #1c2331);
}
.data-archive-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.1875rem rgba(212, 175, 55, 0.55);
}
.data-archive-chip.is-active {
    background: var(--slate, #1c2331);
    color: #fff;
    border-color: var(--slate, #1c2331);
}

/* Year divider for the archive */
.data-year {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate, #1c2331);
    margin: 3.5rem 0 1.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 0.125rem solid var(--gold, #d4af37);
}
.data-year:first-child {
    margin-top: 0.75rem;
}

@media (max-width: 64em) {
    .data-editors { grid-template-columns: 1fr 1fr; }
    .data-archive { grid-template-columns: 1fr 1fr; }
    .data-featured { grid-template-columns: 1fr; }
    .data-featured-image { min-height: 12rem; }
    .data-featured-body { padding: 1.75rem; }
    .data-featured-title { font-size: 1.5rem; }
}
@media (max-width: 42em) {
    .data-editors,
    .data-archive { grid-template-columns: 1fr; }
}
