/* ============================================
   DESIGN TOKENS - Editorial Premium
   Serif display + refined neutrals + indigo ink
   ============================================ */
:root {
  /* Warm paper neutrals */
  --bg: #f7f7f4;
  --bg-subtle: #efeee9;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-soft: #334155;
  /* Batch 3.15: --muted darkened for 4.5:1 body-text contrast on paper */
  --muted: #5b6b7f;
  --line: #e5e3dc;
  --line-light: #f0efe9;

  /* Typography */
  --serif: Georgia, 'Times New Roman', 'Source Serif 4', serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* Vibrant accents */
  --ai: #4f46e5;
  --ai-deep: #4338ca;
  --ai-light: #eef2ff;
  --ai-border: rgba(79, 70, 229, 0.18);
  --sw: #c2410c;
  --ft: #047857;

  /* Layout */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 2px 8px rgba(15, 23, 42, 0.06), 0 16px 40px rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.22s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility - Screen reader only */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ai);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   HEADER - Sticky with blur effect
   ============================================ */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition);
}

header.site.shadow {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.site-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo */
header.site img.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  transition: box-shadow var(--transition);
}

header.site a:hover img.brand-mark,
header.site a:focus-visible img.brand-mark {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

header.site h1 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}

/* Header tag line */
header .tag {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Batch 2.11: compact header tag — date pill only; tagline moved to edition line */
header .tag-compact {
  gap: 0;
}

header .tag .date {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 20px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

header .tag .divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

header .tag .desc {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

header .tag .desc strong {
  font-weight: 600;
  color: var(--ink-soft);
}

/* Batch 2.11: edition tagline under the sticky header, not inside it */
.edition-line {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.edition-line strong { font-weight: 600; color: var(--ink-soft); }

/* Batch 2.11: shrink header on scroll (JS toggles .shadow) */
header.site .site-inner {
  transition: padding var(--transition-fast);
}
header.site.shadow .site-inner {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
header.site.shadow img.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
header.site.shadow h1 { font-size: 1.1rem; }

.grow { flex: 1; }

/* Header actions */
.hdr-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  align-items: center;
}

/* Button styles */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: none;
  transition: all var(--transition-fast);
}

.btn:hover {
  background: var(--bg-subtle);
  box-shadow: var(--shadow-sm);
}

.install { display: none; }

/* ============================================
   SEARCH INPUT - Polished design
   ============================================ */
.hdr-actions .search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  transition: all var(--transition-fast);
}

.hdr-actions .search:focus-within {
  background: var(--card);
  border-color: var(--ai);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.hdr-actions .search input {
  width: 180px;
  max-width: 40vw;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
}

/* Batch 2.9: clear-search affordance */
.clear-search {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.375rem;
  border-radius: 8px;
  min-width: 32px;
  min-height: 32px;
}
.clear-search:hover { color: var(--ink); background: var(--bg-subtle); }
.clear-search[hidden] { display: none; }

.hdr-actions .search input::placeholder {
  color: var(--muted);
}

/* Hide browser search UI */
.hdr-actions .search input[type="search"]::-webkit-search-decoration,
.hdr-actions .search input[type="search"]::-webkit-search-cancel-button,
.hdr-actions .search input[type="search"]::-webkit-search-results-button,
.hdr-actions .search input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

.hdr-actions .search input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.hdr-actions .search input[type="search"]::-ms-clear,
.hdr-actions .search input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
#app {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

/* Section container */
#tek2day-pulse {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  margin-top: 2rem;
}

/* ============================================
   GRID LAYOUT
   ============================================ */
/* Grid uses intrinsic minimums so long titles and narrow viewports never
   force horizontal scroll. */
.items {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
}

/* ============================================
   ARTICLE CARDS - Grid Style
   ============================================ */
article {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column; /* Stack vertically for grid card */
  overflow: hidden; /* Ensure image doesn't bleed out */
  height: 100%; /* Uniform height */
  transition: transform var(--transition-fast), box-shadow var(--transition), border-color var(--transition);
}

article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #d9d7cf;
  z-index: 2;
}

/* Article thumbnail - Full width card header.
   Batch 1.1: broken-image resilience — calm paper box + muted alt text. */
.article-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0) 55%),
    var(--bg-subtle);
  border-bottom: 1px solid var(--line-light);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  /* Broken-image alt text: small, muted, padded — never an "alt wall". */
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}
/* Batch 3.13: typographic fallback cover for stories without thumbnails */
.thumb-fallback {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.10) 0%, rgba(79, 70, 229, 0.02) 55%),
    var(--bg-subtle);
}
.thumb-fallback-mark {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 800;
  color: var(--ai-deep);
  opacity: 0.35;
  line-height: 1;
  user-select: none;
}
/* Batch 3.13: broken remote image — mute alt text, keep the box */
img.article-thumb.is-broken {
  object-fit: none;
  object-position: center;
}

/* Article content wrapper */
.article-content {
  padding: 1.25rem 1.25rem 1.1rem;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Featured/top article — unused legacy rules retired (lead lives in .hero). */
article.top {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.04) 0%, var(--card) 100%);
  border-color: var(--ai-border);
}

/* Hero layout logic — retired: the lead lives in .hero (see FRONT PAGE LAYOUT).
   Legacy .top card rules removed; broken selectors cleaned up. */

/* Article title — editorial serif for headlines (Batch 1.5 type scale) */
h3 {
  margin: 0 0 0.625rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block; /* Expand click area */
}

h3 a:hover {
  color: var(--ai);
}

/* Batch 1.6: visited state — scanned stories dim, unvisited stay ink. */
h3 a:visited,
.lead h2 a:visited {
  color: #526078;
}
h3 a:visited:hover,
.lead h2 a:visited:hover {
  color: var(--ai-deep);
}

/* Article meta — source · time · badge */
.meta {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 0.625rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
  line-height: 1.6;
}

.meta time { white-space: nowrap; }

.meta .src {
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* Badges — quiet by default so 90 pills don't shout (Batch 1.3) */
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 800;
  background: var(--ai-light);
  color: var(--ai-deep);
  border: 1px solid var(--ai-border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.muted {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  opacity: 1;
}

/* Article summary — clamp keeps grid rows even */
p[data-summary] {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Share row pins to the card bottom.
   Batch 1.4: quiet until hover/focus; never display:none (no CLS, stays
   tabbable). Touch devices and keyboard focus always show it. */
.share {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line-light);
  align-items: center;
  opacity: 0.55;
  transition: opacity var(--transition-fast);
}
article:hover .share,
article:focus-within .share {
  opacity: 1;
}
@media (hover: none) {
  .share { opacity: 1; }
}
p[data-summary] + .share { margin-top: 1rem; }

.share-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.375rem 0.125rem;
  /* Batch 3.15: 44px touch target without moving layout */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.share-btn:hover {
  color: var(--ai-deep);
}

.share-btn.copy-url {
    margin-left: auto;
}

/* Batch 2.10: Latest pager — Load more */
.pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 0;
}
.pager[hidden] { display: none; }
.pager .btn {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  border-color: var(--ai-border);
}
.pager .btn:hover {
  border-color: var(--ai);
  color: var(--ai-deep);
  background: var(--ai-light);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ai);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 90;
  outline: none;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
  background: #565add;
}

.back-to-top:focus-visible {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
.foot {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */
@media (max-width: 768px) {
  .site-inner {
    padding: 0.625rem 1rem;
    flex-wrap: wrap;
  }
  
  header.site img.brand-mark {
    width: 44px;
    height: 44px;
  }
  
  header.site h1 {
    font-size: 1.1rem;
  }
  
  header .tag {
    flex: 1 1 100%;
    order: 3;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  header .tag .divider {
    display: none;
  }
  
  header .tag .desc {
    font-size: 0.85rem;
  }
  
  .hdr-actions {
    order: 2;
    flex: 0 1 auto;
  }
  
  .hdr-actions .search {
    flex: 1 1 auto;
    max-width: 60vw;
  }
  
  .hdr-actions .search input {
    width: 100%;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .grow {
    display: none;
  }
  
  #app {
    padding: 0 1rem;
  }
  
  .items {
    grid-template-columns: 1fr; /* Force single column on mobile */
    gap: 1.5rem;
  }
  
  article {
    /* On mobile, standard card stack */
    flex-direction: column;
  }
  
  /* Mobile cards stack single-column; hero type scales down (see below). */
  
  .share-btn {
    padding: 0.5rem 0; /* Larger touch target */
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 400px) {
  .site-inner {
    padding: 0.5rem 0.75rem;
  }
  
  header.site img.brand-mark {
    width: 40px;
    height: 40px;
  }
  
  .hdr-actions .search {
    max-width: 55vw;
  }
  
  article {
    border-radius: var(--radius-sm);
  }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
  article {
    border: 2px solid var(--ink);
  }
  
  .badge {
    border: 1px solid currentColor;
  }
}
  

/* ============================================
   PULSE BRIEF — Enhanced for reader engagement
   ============================================ */
.pb {
  margin: 1.25rem 0 1.75rem;
  background: var(--card);
  border: 1px solid var(--ai-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

/* Accent gradient bar — visual anchor ("start here") */
.pb::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--ai) 0%, #818cf8 40%, var(--sw) 70%, var(--ft) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.pb > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  user-select: none;
  transition: background var(--transition-fast);
}
.pb > summary:hover {
  background: var(--bg-subtle);
}
.pb > summary::-webkit-details-marker { display: none; }

/* BRIEF pill — bold label */
.pb-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--ai);
  color: #fff;
  flex-shrink: 0;
}

/* Story count badge */
.pb-count {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-subtle);
  padding: .2rem .55rem;
  border-radius: 999px;
  letter-spacing: .02em;
  flex-shrink: 0;
}

/* [A] Editorial hook — dynamic summary in the collapsed bar */
.pb-hook {
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Chevron — points down when open (▾), up when closed */
.pb-chev {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--bg-subtle);
  font-size: 0.8rem;
  line-height: 1;
  color: var(--ink-soft);
  transition: transform 0.25s ease, background var(--transition-fast);
  flex-shrink: 0;
}
.pb > summary:hover .pb-chev {
  background: var(--line);
}
details.pb:not([open]) .pb-chev { transform: rotate(180deg); }

/* Batch 2.8: descriptive sub-line under the pill row (hero + standalone) */
.pb-sub {
  display: block;
  flex-basis: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: -0.25rem;
}

/* Body area */
.pb-body {
  padding: 0 1.25rem 1.25rem;
}

/* Numbered takeaway list */
.pb-takeaways {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

/* [D] Each row is a flex container with CTA pushed right */
.pb-takeaways li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .6rem;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--line-light);
}
.pb-takeaways li:last-child {
  border-bottom: none;
}
.pb-takeaways li:hover {
  background: var(--bg-subtle);
}

/* Rank number */
.pb-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

/* [E] Category text label (replaces dot) */
.pb-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .15rem .4rem;
  border-radius: 6px;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}
.pb-cat--ai  { background: rgba(79,70,229,0.12);  color: var(--ai-deep); }
.pb-cat--sw  { background: rgba(194,65,12,0.12);  color: var(--sw); }
.pb-cat--ft  { background: rgba(4,120,87,0.14);  color: var(--ft); }

/* Takeaway content — middle column, grows to fill */
.pb-takeaway-body {
  flex: 1;
  min-width: 0;
}
.pb-takeaway-body strong {
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  display: block;
}

/* [B] Impact line — hidden by default, shown on hover */
.pb-impact {
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.45;
  display: block;
  margin-top: .15rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}

/* [C] Hover/focus preview — expand impact on row hover or keyboard focus */
.pb-takeaways li:hover .pb-impact,
.pb-takeaways li:focus-within .pb-impact {
  max-height: 4rem;
  opacity: 1;
  margin-top: .3rem;
}

/* Source label under title (always visible) */
.pb-src {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  margin-top: .15rem;
  display: block;
}

/* [D] Read CTA — right-aligned, vertically centered in row.
   Batch 3.15: 44px touch target, deeper hover ink. */
.pb-read {
  color: var(--ai-deep);
  font-weight: 700;
  font-size: .78rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  flex-shrink: 0;
  margin-left: auto;
  padding: .35rem .65rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast), gap var(--transition-fast);
  white-space: nowrap;
}
.pb-read:hover {
  color: var(--ai-deep);
  background: var(--ai-light);
  gap: .35rem;
}
.pb-read::after {
  content: "→";
  font-size: .85rem;
  transition: transform var(--transition-fast);
}
.pb-read:hover::after {
  transform: translateX(2px);
}

.pb-empty { color: var(--muted); margin: 0; }

/* Brief responsive */
@media (max-width: 520px) {
  .pb > summary { padding: .9rem 1rem; gap: .5rem; }
  .pb-hook { display: none; }
  .pb-body { padding: 0 1rem 1rem; }
  .pb-takeaways li { gap: .45rem; padding: .65rem .35rem; }
  .pb-rank { width: 22px; height: 22px; font-size: .68rem; }
  .pb-takeaway-body strong { font-size: .88rem; }
  /* On mobile, show impact by default (no hover) */
  .pb-impact {
    max-height: none;
    opacity: 1;
    margin-top: .2rem;
  }
  .pb-read { padding: .3rem .45rem; font-size: .75rem; min-height: 44px; }
}

/* ============================================
   FRONT PAGE LAYOUT
   Lead story + Brief hero, section head, search-only filtering.
   Everything below extends the tokens and components above.
   ============================================ */

/* Wordmark is set above (Inter 800); keep single-line in the header row. */
header.site h1 {
  white-space: nowrap;
}

/* Search box: icon + wider placeholder */
.hdr-actions .search .search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hdr-actions .search input {
  width: 220px;
}

/* Hero: lead story + Brief -----------------------------------------------
   Magazine rail: lead takes ~2fr, Brief sits in a sticky right rail. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.hero:empty { display: none; }

article.lead {
  height: auto;
  border-color: var(--ai-border);
  box-shadow: var(--shadow-lg);
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0) 38%),
    var(--card);
}
article.lead:hover {
  transform: none;
  box-shadow: var(--shadow-lg);
  border-color: var(--ai-border);
}
.lead .article-thumb {
  aspect-ratio: 16 / 9;
  max-height: 440px;
}
.lead .article-content {
  padding: 1.75rem 2rem 1.625rem;
}
.lead h2 {
  margin: 0 0 0.625rem;
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead h2 a { color: var(--ink); text-decoration: none; }
.lead h2 a:hover { color: var(--ai-deep); }
.lead p[data-summary] {
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 640px;
  -webkit-line-clamp: unset;
}
.lead .meta { order: 2; margin: 0.625rem 0 0; font-size: 0.8rem; }
.lead p[data-summary] { order: 1; }
.lead .share { order: 3; }

/* Batch 2.7: lead meta extras — favicon + read time + relative age.
   Wraps to two lines on narrow cards. */
.lead .meta {
  row-gap: 0.3rem;
}
.lead .meta .src-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  align-self: center;
  flex-shrink: 0;
  background: var(--bg-subtle);
}
.lead .meta .read,
.lead .meta .rel {
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* "Lead story" marker on the hero card — small caps over a hairline rule */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.625rem;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.eyebrow-note {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ai-deep);
}

/* Brief in the sidebar rail: sticky, tighter rows, quieter hover */
.hero .pb {
  margin: 0;
  align-self: start;
  position: sticky;
  top: 92px;
  box-shadow: var(--shadow);
}
.hero .pb-hook { display: none; }
.hero .pb > summary {
  padding: 0.875rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--line-light);
  row-gap: 0.3rem;
}
.hero .pb-body { padding: 0.25rem 1.25rem 0.75rem; }
.hero .pb-takeaways li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 0.25rem 0.6rem;
  align-items: start;
  padding: 0.75rem 0;
  border-radius: 0;
}
.hero .pb-takeaways li:hover { background: transparent; }
.hero .pb-rank { border-radius: 999px; }
.hero .pb-takeaway-body strong { font-size: 0.875rem; }
.hero .pb-impact { display: none; }
.hero .pb-read {
  margin-top: 0.15rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.72rem;
}

/* Section head — editorial rule with serif title ------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
}
.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}
.section-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.section-head .updated {
  margin-left: auto;
  display: flex;
  gap: 0.3rem;
  white-space: nowrap;
}

/* "Lead story" marker — defined once above with the hero; no duplicate. */

/* Filtering states -------------------------------------------------------- */
/* The lead's grid copy is hidden while the hero shows it; a search hides the
   hero and lets the grid copy through. */
.items > article[data-lead] { display: none; }
body.is-filtered .hero { display: none; }
body.is-filtered .items > article[data-lead] { display: flex; }
.items > article[hidden] { display: none !important; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .pb { position: static; }
  .lead .article-thumb { max-height: 320px; }
  .lead h2 { font-size: 1.75rem; line-height: 1.2; }
  .section-title { font-size: 1.35rem; }
}
@media (max-width: 768px) {
  /* Row 1: logo + wordmark. Row 2: search, full width. Row 3: date + tagline. */
  header.site h1 { order: 1; }
  .hdr-actions { flex: 1 1 100%; }
  .hdr-actions .search { width: 100%; max-width: none; }
  .hdr-actions .search input { width: 100%; max-width: none; flex: 1; }
  .section-head .updated { display: none; }
}
@media (max-width: 520px) {
  .lead .article-thumb { max-height: 240px; }
  .lead .article-content { padding: 1.125rem 1.25rem 1.25rem; }
  .lead h2 { font-size: 1.5rem; line-height: 1.22; }
  .section-head { padding-top: 1rem; }
  .section-title { font-size: 1.25rem; }
}
