/* ============================================================
   ctreal.estate — Main Homepage
   Calm, premium, dense, daily ritual editorial aesthetic.
   FT + HousingWire + The Real Deal meets trustworthy local ledger.
   ============================================================ */

:root {
  --ct-blue: #0a2f52;           /* Deeper, more sophisticated navy */
  --ct-gold: #a67f4a;           /* Muted antique brass — elegant */
  --ct-gold-light: #c9a16b;
  --ct-bg: #f7f5f0;             /* Warmer paper-like */
  --ct-surface: #ffffff;
  --ct-text: #111827;
  --ct-muted: #5f6b7a;
  --ct-border: rgba(0, 0, 0, 0.07);
  --ct-hairline: rgba(13, 37, 64, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 10px 40px rgba(10, 47, 82, 0.11),
                  0 2px 8px rgba(10, 47, 82, 0.06);
  --glass-inner: inset 0 1px 0 rgba(255,255,255,0.9);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ct-bg: #0f172a;
    --ct-surface: #1e2937;
    --ct-text: #e2e8f0;
    --ct-muted: #94a3b8;
    --ct-border: rgba(148,163,184,0.15);
    --ct-hairline: rgba(148,163,184,0.18);

    --glass-bg: rgba(15,23,42,0.82);
    --glass-border: rgba(148,163,184,0.2);
    --glass-shadow: 0 10px 30px rgba(0,0,0,0.35);
  }
}

/* Base typography — dense, Drudge-inspired but modern */
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum", "ss01";
  background: var(--ct-bg);
  color: var(--ct-text);
  line-height: 1.45;
}

/* High-density news list — core reading experience */
.news-list {
  border-top: 1px solid var(--ct-border);
}

.news-item {
  display: block;
  padding: 14px 0 13px;
  border-bottom: 1px solid var(--ct-border);
  text-decoration: none;
  color: inherit;
  transition: background 80ms ease;
}

.news-item:hover {
  background: rgba(13, 59, 102, 0.025);
}

.news-item h6 {
  font-size: 15.2px;
  line-height: 1.22;
  font-weight: 650;
  margin: 0 0 5px;
  letter-spacing: -0.012em;
}

.news-item .summary {
  font-size: 13.2px;
  color: var(--ct-muted);
  line-height: 1.38;
  margin-bottom: 6px;
}

.news-item .meta {
  font-size: 11px;
  color: var(--ct-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Glass fallback surfaces (used by islands + pure CSS cards) */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

/* Town / topic pills — tight, scannable */
.pill {
  font-size: 10.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(13, 59, 102, 0.08);
  color: var(--ct-blue);
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}

.pill:hover {
  background: rgba(13, 59, 102, 0.14);
}

/* Section headers — uppercase, spaced, quiet */
.section-header {
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
}

/* The famous gold "Why it matters" accent — now reusable as .why-glass */
.why-glass {
  border-left: 4px solid var(--ct-gold);
  background: linear-gradient(90deg, rgba(193,154,91,0.06), transparent);
  padding-left: 14px;
}

/* Hero / masthead refinements */
.hero-title {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ct-blue);
}

/* Reduce Bootstrap noise on public pages (we will strip classes over time) */
@media (min-width: 768px) {
  .container { max-width: 1080px; }
}

/* Future WebGPU island container styles */
[data-island] {
  position: relative;
  min-height: 120px;
}

/* Print / crawler friendliness */
@media print {
  .glass, [data-island] { background: white; box-shadow: none; }
}

/* ============================================================
   ctreal.estate — Minimal High-Impact Homepage Polish
   Calm, premium, dense, daily-usable editorial aesthetic.
   FT / HousingWire meets trustworthy local ledger.
   Reduces Bootstrap cookie-cutter instantly.
   ============================================================ */

/* Refined global typography & density for calm premium reading */
body {
  line-height: 1.42;
  font-size: 15px;
}

a {
  color: var(--ct-blue);
  text-decoration: none;
  transition: color 60ms ease;
}
a:hover {
  color: #0a2f52;
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--ct-gold);
  outline-offset: 2px;
}

/* Premium thin hairline rules (use on sections for "ledger" feel) */
.hr-thin {
  border: 0;
  height: 1px;
  background: var(--ct-border);
  margin: 12px 0 18px;
}

/* Masthead / Hero — calm, authoritative, non-generic */
.masthead {
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--ct-border);
  margin-bottom: 18px;
}
.masthead .brand {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.masthead .title {
  font-size: clamp(1.55rem, 3.8vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.02;
  color: var(--ct-blue);
  margin: 0 0 6px;
}
.masthead .tagline {
  font-size: 13.5px;
  color: var(--ct-muted);
  max-width: 46ch;
}

/* High-density news feed — the core "Ledger" experience (replaces generic list-group) */
.news-feed {
  border-top: 1px solid var(--ct-border);
}
.news-item {
  display: block;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--ct-border);
  text-decoration: none;
  color: inherit;
  transition: background 70ms ease;
}
.news-item:hover {
  background: rgba(13, 59, 102, 0.022);
}
.news-item h6,
.news-item .title {
  font-size: 15px;
  line-height: 1.18;
  font-weight: 650;
  margin: 0 0 4px;
  letter-spacing: -0.011em;
  color: #1a2f4a;
}
.news-item .summary {
  font-size: 13px;
  color: var(--ct-muted);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item .meta {
  font-size: 10.5px;
  color: var(--ct-muted);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
}

/* Featured / picks — compact and calm, not loud cards */
.featured-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.featured-ledger .item {
  padding: 10px 12px;
  border: 1px solid var(--ct-border);
  border-radius: 6px;
  background: var(--ct-surface);
  transition: border-color 80ms ease, box-shadow 80ms ease;
}
.featured-ledger .item:hover {
  border-color: rgba(13,59,102,0.18);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.featured-ledger .item h6 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  margin: 0 0 3px;
}

/* Coverage / Taxonomy — calm, scannable, non-card */
.harbor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .harbor-grid { grid-template-columns: 1fr; }
}
.harbor-stat {
  padding: 10px 12px;
  border: 1px solid var(--ct-border);
  border-radius: 5px;
  background: var(--ct-surface);
}
.harbor-stat .label {
  font-size: 9.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
  margin-bottom: 3px;
}
.harbor-stat .value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ct-blue);
}
.harbor-stat .pills {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Market Pulse / Glass signature element — premium calm daily widget */
.market-pulse,
[data-island="pulse"] .glass {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,247,244,0.92));
  border: 1px solid rgba(13,59,102,0.09);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(13, 59, 102, 0.07);
  backdrop-filter: blur(10px);
}
@media (prefers-color-scheme: dark) {
  .market-pulse,
  [data-island="pulse"] .glass {
    background: linear-gradient(145deg, rgba(30,41,55,0.95), rgba(15,23,42,0.9));
    border-color: rgba(148,163,184,0.12);
  }
}

.pulse-header {
  font-size: 8.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
}
.pulse-number {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ct-blue);
  letter-spacing: -0.01em;
  line-height: 1;
}
.pulse-town {
  font-size: 9px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(13,59,102,0.07);
  color: #0d3b66;
  font-weight: 500;
  white-space: nowrap;
}

/* Stronger section headers with ledger character */
.section-header {
  font-size: 9.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 700;
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--ct-gold);
}

/* Reduce remaining Bootstrap generic on public homepage */
.card, .list-group-item {
  border-color: var(--ct-border) !important;
  box-shadow: none !important;
}
.badge {
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ============================================================
   ctreal.estate COMPONENTS (Homepage only)
   ============================================================ */

/* Premium Masthead */
.masthead {
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--ct-hairline);
  margin-bottom: 16px;
}
.masthead .brand {
  font-size: 10px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.masthead .title {
  font-size: clamp(1.65rem, 3.8vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.02;
  color: var(--ct-blue);
  margin: 0 0 4px;
}
.masthead .tagline {
  font-size: 13.5px;
  color: var(--ct-muted);
}

/* Morning Ritual Bar */
.ritual-bar {
  font-size: 11px;
  color: var(--ct-muted);
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--ct-hairline);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ritual-bar .greeting {
  font-weight: 600;
  color: var(--ct-blue);
}
.ritual-bar .freshness {
  font-size: 10.5px;
}

/* High-density news feed — the core daily experience */
.news-feed {
  border-top: 1px solid var(--ct-hairline);
}
.news-item {
  display: block;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--ct-hairline);
  text-decoration: none;
  color: inherit;
  transition: background 60ms ease;
}
.news-item:hover {
  background: rgba(13, 59, 102, 0.022);
}
.news-item .title {
  font-size: 15px;
  line-height: 1.18;
  font-weight: 650;
  margin: 0 0 3px;
  letter-spacing: -0.011em;
  color: #1a2f4a;
}
.news-item .summary {
  font-size: 13px;
  color: var(--ct-muted);
  line-height: 1.32;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item .meta {
  font-size: 10.5px;
  color: var(--ct-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
}

/* Today's items get a subtle premium accent */
.news-item.today-item {
  border-left: 3px solid var(--ct-gold);
  padding-left: 8px;
}
.news-item .new-badge {
  font-size: 9px;
  background: var(--ct-gold);
  color: white;
  padding: 0 5px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Featured / Editor's Picks — calmer, denser */
.featured-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.featured-ledger .item {
  padding: 10px 12px;
  border: 1px solid var(--ct-border);
  border-radius: 6px;
  background: var(--ct-surface);
}
.featured-ledger .item h6 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  margin: 0 0 2px;
}

/* Calm coverage grid (replaces card-y Bootstrap) */
.harbor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .harbor-grid { grid-template-columns: 1fr; }
}
.harbor-stat {
  padding: 10px 12px;
  border: 1px solid var(--ct-border);
  border-radius: 5px;
  background: var(--ct-surface);
}
.harbor-stat .label {
  font-size: 9.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.harbor-stat .value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ct-blue);
}
.harbor-stat .pills {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Elevated Market Pulse — the daily signature widget */
.market-pulse,
[data-island="pulse"] .glass {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,247,244,0.93));
  border: 1px solid rgba(13,59,102,0.09);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(13, 59, 102, 0.07);
  backdrop-filter: blur(12px);
}
.pulse-header {
  font-size: 8.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 600;
}
.pulse-number {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ct-blue);
  letter-spacing: -0.01em;
  line-height: 1;
}
.pulse-town {
  font-size: 9px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(13,59,102,0.07);
  color: #0d3b66;
  font-weight: 500;
  white-space: nowrap;
}

/* Ritual closer */
.scan-complete {
  font-size: 12px;
  color: var(--ct-muted);
  padding: 8px 0;
  border-top: 1px solid var(--ct-hairline);
  margin-top: 16px;
}

/* Reduce remaining Bootstrap generic on public homepage */
.card, .list-group-item {
  border-color: var(--ct-border) !important;
  box-shadow: none !important;
}
.badge {
  font-weight: 500;
  letter-spacing: 0.2px;
}

.section-header {
  font-size: 9.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ct-muted);
  font-weight: 700;
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--ct-gold);
}

/* Stronger, calmer news feed (use this instead of Bootstrap list-group on homepage) */
.news-feed {
  border-top: 1px solid var(--ct-hairline);
}
.news-item {
  display: block;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--ct-hairline);
  text-decoration: none;
  color: inherit;
  transition: background 60ms ease;
}
.news-item:hover {
  background: rgba(13, 59, 102, 0.022);
}
.news-item .title {
  font-size: 15px;
  line-height: 1.18;
  font-weight: 650;
  margin: 0 0 3px;
  letter-spacing: -0.011em;
  color: #1a2f4a;
}
.news-item .summary {
  font-size: 13px;
  color: var(--ct-muted);
  line-height: 1.32;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item .meta {
  font-size: 10.5px;
  color: var(--ct-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
}

/* Today's items get a subtle premium gold accent */
.news-item.today-item {
  border-left: 3px solid var(--ct-gold);
  padding-left: 8px;
}
.news-item .new-badge {
  font-size: 9px;
  background: var(--ct-gold);
  color: white;
  padding: 0 5px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ============================================================
   MORNING RITUAL / HABIT-FORMATION PATTERNS (ctreal.estate)
   Freshness signals, quick-scan, subtle retention, Pulse+Feed synergy.
   All additions use existing CSS vars + dense editorial aesthetic.
   30-45 min implementation surface.
   ============================================================ */

/* Top ritual bar — sets "this is your daily briefing" context instantly */
.morning-ritual-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  padding: 6px 10px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, rgba(13,59,102,0.03), transparent);
  border: 1px solid var(--ct-border);
  border-radius: 6px;
  color: var(--ct-muted);
  letter-spacing: 0.2px;
}
.morning-ritual-bar .ritual-left { display: flex; gap: 12px; align-items: center; }
.morning-ritual-bar .ritual-right { display: flex; gap: 8px; align-items: center; }
.ritual-time { font-weight: 500; }
.ritual-delta { opacity: 0.75; }
.ritual-fresh { font-weight: 600; color: var(--ct-blue); }
.ritual-streak {
  background: rgba(193,154,91,0.12);
  color: #5c4630;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* Enhanced masthead freshness callout (non-intrusive "the market moved") */
.freshness-callout {
  margin-top: 6px;
  font-size: 12.5px;
}
.fresh-pill {
  display: inline-block;
  background: #c19a5b;
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}
.small-muted { opacity: 0.6; font-size: 11.5px; margin-left: 6px; }

/* Pulse deltas (synergy: shows "why the pulse number matters today") */
.pulse-delta {
  color: #c19a5b;
  font-weight: 700;
  letter-spacing: 0.1px;
}

/* Today's prioritized items in ledger — quick visual scan for "what's fresh this morning" */
.news-item.today-item {
  border-left: 3px solid var(--ct-gold);
  padding-left: 11px;
  background: linear-gradient(90deg, rgba(193,154,91,0.025), transparent);
}
.new-badge {
  background: #c19a5b;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 0 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  line-height: 1.1;
  display: inline-block;
}

/* Quick-scan micro affordance */
.read-time {
  font-size: 9.5px;
  opacity: 0.5;
  background: rgba(0,0,0,0.03);
  padding: 0 4px;
  border-radius: 2px;
}

/* Ritual closer — quiet completion signal + retention (bookmark/RSS nudge) */
.scan-complete {
  margin-top: 16px;
  padding: 10px 12px;
  border-top: 1px solid var(--ct-border);
  font-size: 11.5px;
  color: var(--ct-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.scan-complete a:hover { color: var(--ct-blue); }

/* Dark mode polish for new elements */
@media (prefers-color-scheme: dark) {
  .morning-ritual-bar { background: rgba(255,255,255,0.02); }
  .news-item.today-item { background: linear-gradient(90deg, rgba(193,154,91,0.06), transparent); }
  .ritual-streak { background: rgba(193,154,91,0.18); color: #d4b98a; }
}

/* ============================================================
   ctreal.estate HOMEPAGE (Prime Time)
   ============================================================ */

.harbor-masthead {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--ct-hairline);
  margin-bottom: 24px;
}
.harbor-masthead h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--ct-blue);
}
.harbor-masthead .tagline {
  font-size: 1.05rem;
  color: var(--ct-muted);
  margin: 0;
}

.ritual-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ct-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--ct-hairline);
  margin-bottom: 24px;
}

.pulse-section {
  margin-bottom: 10px;
}
.pulse-compact {
  /* Slimmer presentation so the story feed leads visually */
}
.harbor-pulse {
  padding: 0;
}
.pulse-section.pulse-compact .market-pulse {
  margin: 0;
}

.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--ct-hairline);
  border-radius: 6px;
  overflow: hidden;
}
.ledger-row {
  background: var(--ct-surface);
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--ct-hairline);
}
.ledger-row:last-child {
  border-bottom: none;
}
.ledger-title {
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 4px;
}
.ledger-summary {
  font-size: 0.85rem;
  color: var(--ct-muted);
  line-height: 1.35;
}
.ledger-footer {
  margin-top: 8px;
  font-size: 0.75rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--ct-muted);
}
.ledger-footer .tag, .ledger-footer .source {
  background: rgba(13,59,102,0.06);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
}

.coverage-stats {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

/* ============================================================
   MAIN SITE CLEANUP — aggregator-first homepage and taxonomy
   ============================================================ */

.harbor-masthead {
  padding: 22px 0 10px;
  margin-bottom: 18px;
}

.harbor-masthead h1 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}

.harbor-masthead .tagline {
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.masthead-top {
  margin-bottom: 8px;
}

.masthead-top .brand {
  font-weight: 650;
}

.masthead-top .edition {
  font-size: 1rem;
  font-weight: 600;
}

.ritual-bar {
  margin-top: 12px;
  margin-bottom: 0;
}

.ritual-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.picks-section,
.ledger-section,
.coverage-section {
  margin: 22px 0;
}

.section-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pick-card {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 15px 12px;
  border: 1px solid var(--ct-hairline);
  border-radius: 6px;
  background: var(--ct-surface);
  color: var(--ct-text);
  box-shadow: none;
  text-decoration: none;
  transition: border-color 90ms ease, background 90ms ease, transform 90ms ease;
}

.pick-card:hover {
  border-color: rgba(10, 47, 82, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ct-blue);
  text-decoration: none;
  transform: translateY(-1px);
}

.pick-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
}

.pick-meta {
  margin-top: 14px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.badge-town,
.badge-topic {
  border: 1px solid rgba(10, 47, 82, 0.16);
  border-radius: 999px;
  padding: 0.36em 0.62em;
  color: var(--ct-blue);
  background: rgba(10, 47, 82, 0.08);
}

.badge-topic {
  border-color: rgba(166, 127, 74, 0.28);
  color: #6d4f25;
  background: rgba(166, 127, 74, 0.13);
}

.badge-town:hover,
.badge-topic:hover {
  color: var(--ct-blue);
  background: rgba(10, 47, 82, 0.13);
  text-decoration: none;
}

@media (max-width: 820px) {
  .picks-grid {
    grid-template-columns: 1fr;
  }

  .pick-card {
    min-height: auto;
  }
}

@media (prefers-color-scheme: dark) {
  .pick-card {
    background: rgba(30, 41, 55, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
  }

  .pick-card:hover {
    background: rgba(30, 41, 55, 1);
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.36);
  }

  .badge-town {
    color: #dbeafe;
    background: rgba(96, 165, 250, 0.13);
    border-color: rgba(147, 197, 253, 0.24);
  }

  .badge-topic {
    color: #f5d69a;
    background: rgba(166, 127, 74, 0.18);
    border-color: rgba(245, 214, 154, 0.22);
  }
}

/* ============================================================
   LATEST STORIES — Inline Filters
   Subtle, metadata-weight filter row. Stories stay front & center.
   ============================================================ */

.ledger-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.filter-toggle {
  all: unset;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-muted);
  transition: color 80ms ease;
}
.filter-toggle:hover {
  color: var(--ct-blue);
}
.filter-caret {
  font-size: 0.6rem;
  margin-left: 2px;
  vertical-align: 1px;
}

.filter-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease, opacity 150ms ease;
  opacity: 0;
}
.filter-drawer--open {
  max-height: 220px;
  opacity: 1;
  margin-bottom: 8px;
}

.filter-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 0;
}

.filter-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-muted);
  margin-right: 4px;
  flex-shrink: 0;
}

.filter-pill {
  font-size: 0.7rem;
  font-weight: 550;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(13, 59, 102, 0.06);
  color: var(--ct-blue);
  text-decoration: none;
  white-space: nowrap;
  transition: background 80ms ease, color 80ms ease;
}
.filter-pill:hover {
  background: rgba(13, 59, 102, 0.14);
  color: var(--ct-blue);
  text-decoration: none;
}
.filter-pill--topic {
  background: rgba(166, 127, 74, 0.1);
  color: #6d4f25;
}
.filter-pill--topic:hover {
  background: rgba(166, 127, 74, 0.22);
  color: #6d4f25;
}
.filter-pill--source {
  background: rgba(95, 107, 122, 0.08);
  color: var(--ct-muted);
}
.filter-pill--source:hover {
  background: rgba(95, 107, 122, 0.18);
}

.filter-active-bar {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-active-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ct-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-active-pill {
  font-size: 0.72rem;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ct-gold);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 80ms ease;
}
.filter-active-pill:hover {
  background: var(--ct-gold-light);
  color: #fff;
  text-decoration: none;
}
.filter-active-pill--topic {
  background: #7a5e30;
}
.filter-active-pill--topic:hover {
  background: #96752f;
}
.filter-active-pill--source {
  background: var(--ct-muted);
}
.filter-active-pill--source:hover {
  background: #4a5568;
}
.filter-x {
  margin-left: 3px;
  font-weight: 400;
}
.filter-clear {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ct-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.filter-clear:hover {
  color: var(--ct-blue);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .filter-pill {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
  }
  .filter-pill:hover {
    background: rgba(148, 163, 184, 0.22);
    color: #dbeafe;
  }
  .filter-pill--topic {
    background: rgba(166, 127, 74, 0.15);
    color: #d4b98a;
  }
  .filter-pill--topic:hover {
    background: rgba(166, 127, 74, 0.28);
    color: #f5d69a;
  }
  .filter-pill--source {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
  }
  .filter-active-pill {
    background: var(--ct-gold);
    color: #1a1a1a;
  }
  .filter-active-pill--topic {
    background: #b8943e;
    color: #1a1a1a;
  }
  .filter-active-pill--source {
    background: #64748b;
    color: #f1f5f9;
  }
}
