/*
Theme Name: Daily Tech Update
Description: Newsroom theme for Daily Tech Update — TechCrunch-style front page (brand band, Latest News rows, Most Popular rail, category rails), image fallbacks for posts without a featured image, dark mode, SEO schema.
Version: 4.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dailytechupdate
*/

/* ═══════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════ */
:root {
  /* Permanent surfaces — same in both modes (nav, band, footer, popular block) */
  --ink:        #0D0D0B;
  --ink-2:      #1B1B19;
  --paper:      #FFFFFF;
  --brand:      #00C8CC;   /* logo teal — accents on dark surfaces */
  --brand-deep: #00474A;   /* front-page band */

  /* Light mode */
  --bg:        #FFFFFF;
  --bg-soft:   #F3F3F0;
  --text:      #0D0D0B;
  --text-2:    #45453F;
  --text-3:    #6E6E67;
  --line:      rgba(13,13,11,0.12);
  --line-hard: rgba(13,13,11,0.85);
  --brand-text:#00777A;    /* teal readable on white (5:1) — kickers, big titles, links */

  --font-display: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1320px;
  --gutter:    32px;
  --rail:      340px;
  --measure:   720px;
  --r:         4px;
  --dur:       150ms;
  --ease:      cubic-bezier(0.25, 0, 0, 1);
}

[data-theme="dark"] {
  --bg:        #0F0F0E;
  --bg-soft:   #1A1A18;
  --text:      #EDEDE8;
  --text-2:    #BDBDB5;
  --text-3:    #8F8F87;
  --line:      rgba(237,237,232,0.12);
  --line-hard: rgba(237,237,232,0.8);
  --brand-text:#3FDCDF;
  --brand-deep:#003537;
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; scroll-behavior:smooth; scroll-padding-top:72px; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width:100%; height:auto; display:block; }
a { color:inherit; text-decoration:none; }
button { font:inherit; }
::selection { background:var(--brand); color:var(--ink); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link:focus {
  position:fixed; top:1rem; left:1rem; z-index:9999;
  background:var(--brand); color:var(--ink);
  padding:0.75rem 1.5rem; font-weight:700;
  clip:auto; width:auto; height:auto;
}

[data-theme="light"] .icon-sun,
[data-theme="dark"]  .icon-moon { display:none; }

/* Shared: kicker (category label), byline, pill buttons */
.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin-bottom: 6px;
}
a.kicker:hover { text-decoration: underline; text-underline-offset: 3px; }
.kicker--lg { font-size: 14px; margin-bottom: 12px; }
.kicker--light { color: rgba(255,255,255,0.85); }

.byline { font-size: 14px; color: var(--text-3); display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; }
.byline-author { color: var(--text-2); font-weight: 500; }
.byline--light, .byline--light span { color: rgba(255,255,255,0.8); }

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  color: var(--text);
  white-space: nowrap;
  transition: background var(--dur), color var(--dur);
}
.btn-pill::after { content: '↗'; font-weight: 400; }
.btn-pill:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-pill--solid { background: var(--brand); color: var(--ink); border-color: var(--brand); }
.btn-pill--solid:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ═══════════════════════════════════════════
   TICKER
═══════════════════════════════════════════ */
.ticker-bar {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  height: 34px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ticker-label {
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px 0 var(--gutter);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
.ticker-viewport { overflow:hidden; flex:1; min-width:0; }
.ticker-track {
  display: flex;
  width: max-content;
  animation: dtu-ticker 70s linear infinite;
}
.ticker-dup { display: flex; }
.ticker-item {
  font-size: 13px;
  padding: 0 22px;
  white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,0.14);
}
.ticker-item:hover { color: var(--paper); text-decoration: underline; }
.ticker-track:hover, .ticker-track:focus-within { animation-play-state: paused; }
@keyframes dtu-ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ═══════════════════════════════════════════
   HEADER — dark nav bar
═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-branding { flex-shrink: 0; display:flex; align-items:center; }

/* Uploaded logo has a white tile — keep it as a tidy chip on the dark bar */
.custom-logo-link { display:flex; background:#fff; border-radius:5px; padding:3px 7px; }
.custom-logo { height: 32px; width: auto; max-width: 160px; object-fit: contain; }

.wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--paper);
  white-space: nowrap;
}

.main-navigation { flex:1; min-width:0; }
.nav-menu { display:flex; align-items:center; list-style:none; gap:4px; flex-wrap:nowrap; overflow:hidden; }
.nav-menu a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  padding: 18px 10px;
  white-space: nowrap;
  box-shadow: inset 0 -3px 0 transparent;
  transition: color var(--dur), box-shadow var(--dur);
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a,
.nav-menu .current-post-ancestor > a { color: var(--paper); box-shadow: inset 0 -3px 0 var(--brand); }

.header-actions { display:flex; align-items:center; gap:4px; margin-left:auto; flex-shrink:0; }
.icon-btn {
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px;
  border:0; border-radius:50%;
  background:transparent; color:rgba(255,255,255,0.85);
  cursor:pointer;
  transition: background var(--dur), color var(--dur);
}
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--paper); }
.menu-toggle { display:none; }

/* ═══════════════════════════════════════════
   SEARCH OVERLAY + FORM
═══════════════════════════════════════════ */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13,13,11,0.92);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 18vh var(--gutter) 0;
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur), visibility var(--dur);
}
.search-overlay.is-open { opacity:1; visibility:visible; }
.search-overlay-inner { width:100%; max-width:720px; position:relative; }
.search-close {
  position:absolute; top:-56px; right:0;
  background:none; border:0; color:var(--paper); cursor:pointer; padding:8px;
}
.search-overlay .search-field { background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.4); font-size: 24px; }
.search-overlay .search-field::placeholder { color: rgba(255,255,255,0.5); }

.search-form { display:flex; gap:8px; }
.search-field {
  flex:1; min-width:0;
  font: inherit; font-size: 17px;
  padding: 12px 18px;
  border: 1.5px solid var(--line-hard);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
}
.search-submit {
  font-weight: 700; font-size: 15px;
  padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--brand); color: var(--ink);
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   FRONT BAND — lead, stacked stories, Top Headlines
═══════════════════════════════════════════ */
.front-band {
  background: var(--brand-deep);
  color: var(--paper);
  padding: 18px 0 44px;
}
.band-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.band-wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: center;
  margin: 6px 0 26px;
  color: var(--paper);
}
.band-wordmark::after { content: '.'; color: var(--brand); }

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  min-height: 540px;
}
.band-lead { display:flex; }
.band-lead .overlay-card { flex:1; }
.band-stack { display:grid; grid-template-rows: 1fr 1fr; gap:20px; }

.overlay-card {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  min-height: 260px;
  display: flex;
  align-items: flex-end;
}
.overlay-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale 600ms var(--ease);
}
/* hover uses `scale`, parallax uses `translate` — separate properties so they never fight */
.overlay-card:hover .overlay-img { scale: 1.03; }
.overlay-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0) 70%);
}
.overlay-body { position: relative; z-index: 1; padding: 22px; }
.overlay-title { color: var(--paper); font-size: 22px; line-height: 1.15; margin-bottom: 10px; }
.overlay-card--lead .overlay-body { padding: 30px; }
.overlay-card--lead .overlay-title { font-size: clamp(28px, 3.4vw, 50px); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; }
.overlay-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.stretched::after { content:''; position:absolute; inset:0; z-index:1; }

.band-headlines-title {
  color: var(--paper);
  font-size: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  margin-bottom: 4px;
}
.band-headlines ul { list-style: none; }
.band-headlines li {
  position: relative;
  padding: 14px 0 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.band-headlines li::before {
  content: '';
  position: absolute; left: 0; top: 21px;
  width: 8px; height: 8px;
  background: var(--brand);
}
.band-headlines a { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--paper); }
.band-headlines a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ═══════════════════════════════════════════
   LATEST NEWS + RAIL
═══════════════════════════════════════════ */
.with-rail {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: 56px;
  align-items: start;
}
.section-head { display:flex; align-items:center; flex-wrap:wrap; gap:16px 20px; margin-bottom: 16px; }
.section-head--rule { border-top: 3px solid var(--line-hard); padding-top: 14px; justify-content: space-between; }

.display-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--brand-text);
}

.post-rows { border-top: 1px solid var(--line); }
.post-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.post-row--noimg { grid-template-columns: minmax(0, 1fr); }
.row-media { display:block; aspect-ratio: 16/9; overflow:hidden; background: var(--bg-soft); }
.row-img { width:100%; height:100%; object-fit:cover; transition: scale 400ms var(--ease); }
.post-row:hover .row-img { scale: 1.04; }
.row-title { font-size: 21px; font-weight: 700; line-height: 1.22; letter-spacing: -0.015em; margin-bottom: 8px; }
.row-title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.score-badge {
  font-family: var(--font-display);
  font-weight: 800; font-size: 12px;
  background: var(--ink); color: var(--brand);
  padding: 2px 7px; border-radius: 3px;
}

/* Rail */
.rail-sticky { position: sticky; top: 84px; display:flex; flex-direction:column; gap: 28px; }
.admin-bar .rail-sticky { top: 116px; }

.rail-popular { background: var(--ink); color: var(--paper); padding: 26px 24px 18px; }
.rail-popular-title {
  font-weight: 900;
  font-size: 40px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--paper);
  margin-bottom: 14px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.rail-popular-title::after {
  content: '↗';
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  background: var(--brand); color: var(--ink);
  font-size: 26px; font-weight: 700;
}
.rail-popular-list { list-style: none; counter-reset: pop; }
.rail-popular-list li {
  counter-increment: pop;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 8px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.rail-popular-list li::before {
  content: counter(pop);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 900; line-height: 1;
  color: var(--brand);
}
.rail-popular-list a { font-weight: 700; font-size: 16px; line-height: 1.3; }
.rail-popular-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rail-popular-meta { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

.rail-box { border: 2px solid var(--brand-text); padding: 24px; display:flex; flex-direction:column; align-items:flex-start; gap: 10px; }
.rail-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); }
.rail-box-title { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.rail-box-text { font-size: 15px; color: var(--text-2); }
.rail-series-latest { font-weight: 700; font-size: 16px; line-height: 1.3; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); width: 100%; }
.rail-series-latest:hover { text-decoration: underline; }
.rail-newsletter { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--paper); }
.rail-newsletter .rail-box-title { color: var(--paper); }
.rail-newsletter .rail-box-text { color: rgba(255,255,255,0.8); }

.sidebar-widget { font-size: 15px; }
.sidebar-widget-title { font-size: 20px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 3px solid var(--line-hard); }
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sidebar-widget a:hover { color: var(--brand-text); }

/* ═══════════════════════════════════════════
   CATEGORY RAILS + TILES
═══════════════════════════════════════════ */
.cat-rail { max-width: var(--container); margin: 64px auto 0; padding: 0 var(--gutter); }
.rail-title { font-size: 30px; font-weight: 900; letter-spacing: -0.035em; }
.tile-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 8px; }
.tile-media { display:block; aspect-ratio: 16/9; overflow:hidden; background: var(--bg-soft); margin-bottom: 12px; }
.tile-img { width:100%; height:100%; object-fit:cover; transition: scale 400ms var(--ease); }
.post-tile:hover .tile-img { scale: 1.04; }
.tile-media.media-missing::after { content: 'daily tech update.'; font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: -0.03em; color: rgba(255,255,255,0.9); }
.tile-media.media-missing,
.tile-media--empty { display:flex; align-items:flex-end; padding: 14px; background: linear-gradient(135deg, var(--brand-deep), #0B2E30); }
.tile-fallback { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -0.03em; color: var(--paper); line-height: 1; }
.tile-fallback::after { content: '.'; color: var(--brand); }
.tile-title { font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 8px; }
.tile-title a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.navigation.pagination { margin: 36px 0 0; }
.nav-links { display:flex; flex-wrap:wrap; align-items:center; gap: 6px; }
.page-numbers {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-weight: 700; font-size: 14px;
}
a.page-numbers:hover { border-color: var(--line-hard); }
.page-numbers.current { background: var(--text); color: var(--bg); border-color: var(--text); }
.page-numbers.dots { border: 0; }

/* ═══════════════════════════════════════════
   ARCHIVE / SEARCH / 404
═══════════════════════════════════════════ */
.archive-header { max-width: var(--container); margin: 0 auto; padding: 52px var(--gutter) 0; }
.archive-description { max-width: 720px; margin-top: 14px; font-size: 18px; color: var(--text-2); }
.archive-count { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.archive-search { max-width: 560px; margin-top: 20px; }
.archive-header + .with-rail { padding-top: 28px; }

.no-results { padding: 32px 0; }
.no-results h2 { font-size: 28px; margin-bottom: 8px; }
.no-results p { color: var(--text-2); margin-bottom: 18px; }

.error-404 { max-width: 760px; margin: 0 auto; padding: 80px var(--gutter); display:flex; flex-direction:column; gap: 18px; align-items:flex-start; }
.error-404 .search-form { width: 100%; }

/* ═══════════════════════════════════════════
   ARTICLE
═══════════════════════════════════════════ */
.article-header { max-width: 980px; margin: 0 auto; padding: 48px var(--gutter) 28px; }
.article-headline {
  font-size: clamp(32px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.article-deck { font-size: clamp(18px, 2vw, 22px); color: var(--text-2); line-height: 1.45; margin-bottom: 22px; max-width: 820px; }

.article-byline { display:flex; align-items:center; flex-wrap:wrap; gap: 12px 14px; }
.byline-avatar { width:40px; height:40px; border-radius:50%; }
.byline-text { display:flex; flex-direction:column; flex:1 1 200px; min-width:0; }
.byline-name { font-weight: 700; font-size: 15px; color: var(--text); }
.byline-name:hover { color: var(--brand-text); }
.byline-date { font-size: 14px; color: var(--text-3); }
.byline-sep { color: var(--text-3); }

.share-links { margin-left: auto; display:flex; gap: 8px; }
.share-links a, .share-copy {
  height: 36px; min-width: 36px;
  display:inline-flex; align-items:center; justify-content:center;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  background: transparent; color: var(--text);
  cursor: pointer;
}
.share-links a:hover, .share-copy:hover { border-color: var(--line-hard); }

.article-hero-figure { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.article-hero-frame { overflow: hidden; }
.article-hero-frame { position: relative; aspect-ratio: 16/9; background: var(--bg-soft); }
.article-hero-frame .article-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-hero-caption { font-size: 13px; color: var(--text-3); padding-top: 8px; }

.article-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 24px;
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) var(--rail);
  justify-content: center;
  gap: 72px;
  align-items: start;
}
.article-layout--single { grid-template-columns: minmax(0, var(--measure)); }

/* Review verdict (unchanged behaviour from v3) */
.review-verdict {
  display:grid; grid-template-columns:auto 1fr; gap: 22px; align-items:center;
  background: var(--bg-soft); padding: 22px; margin-bottom: 32px;
  border-left: 4px solid var(--brand-text);
}
.verdict-score { background: var(--ink); color: var(--paper); width: 84px; height: 84px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.verdict-num { font-family: var(--font-display); font-size: 32px; font-weight: 900; color: var(--brand); line-height: 1; }
.verdict-denom { font-size: 11px; color: rgba(255,255,255,0.6); }
.verdict-product { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-top: 2px; text-align:center; }
.verdict-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 4px; }
.verdict-text { font-size: 17px; font-weight: 500; line-height: 1.45; }

/* Body copy */
.article-body { font-size: 18px; line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.025em; margin-top: 1.8em; }
.article-body h3 { font-size: 22px; margin-top: 1.6em; }
.article-body h4 { font-size: 19px; margin-top: 1.4em; }
.article-body a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body strong { font-weight: 700; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: 0.4em; }
.article-body li::marker { color: var(--brand-text); }
.article-body img { margin: 0 auto; }
.article-body figure { margin-top: 1.8em; margin-bottom: 1.8em; }
.article-body figcaption, .article-body .wp-element-caption { font-size: 14px; color: var(--text-3); margin-top: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--brand-text);
  padding: 4px 0 4px 22px;
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -0.015em;
}
.article-body blockquote cite { display:block; margin-top: 10px; font-family: var(--font-body); font-size: 14px; font-weight: 500; font-style: normal; color: var(--text-3); }
.article-body table { width:100%; border-collapse: collapse; font-size: 15px; }
.article-body th, .article-body td { text-align:left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article-body th { font-weight: 700; border-bottom: 2px solid var(--line-hard); }
.article-body code { font-size: 0.9em; background: var(--bg-soft); padding: 2px 5px; border-radius: 3px; }
.article-body pre { background: var(--ink); color: #EDEDE8; padding: 18px; overflow-x: auto; font-size: 14px; }
.article-body iframe, .article-body video { max-width: 100%; }
.article-body .wp-block-embed iframe { width: 100%; aspect-ratio: 16/9; height: auto; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* TOC — theme-generated and Rank Math block share one look */
.article-toc,
.article-body .wp-block-rank-math-toc-block {
  background: var(--bg-soft);
  padding: 20px 24px;
  border-top: 3px solid var(--line-hard);
}
.article-body .wp-block-rank-math-toc-block::before { content: 'In this article'; }
.toc-label,
.article-body .wp-block-rank-math-toc-block::before {
  display: block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.toc-list, .article-body .wp-block-rank-math-toc-block ul { list-style: none; padding: 0; columns: 2; column-gap: 28px; }
.toc-item, .article-body .wp-block-rank-math-toc-block li { break-inside: avoid; margin: 0 0 6px; font-size: 15px; line-height: 1.35; }
.toc-item a, .article-body .wp-block-rank-math-toc-block a { color: var(--text-2); text-decoration: none; }
.toc-item a:hover, .article-body .wp-block-rank-math-toc-block a:hover { color: var(--brand-text); text-decoration: underline; }
.toc-item[aria-current] a { color: var(--brand-text); font-weight: 700; }
.toc-h3 { padding-left: 14px; }

/* Tags + author */
.article-tags { display:flex; flex-wrap:wrap; gap: 8px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.tag-pill { font-size: 13px; font-weight: 700; padding: 5px 12px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--text-2); }
.tag-pill:hover { border-color: var(--line-hard); color: var(--text); }

.author-bio { display:flex; gap: 18px; align-items:flex-start; margin-top: 32px; padding-top: 24px; border-top: 3px solid var(--line-hard); }
.author-bio-avatar { width:64px; height:64px; border-radius:50%; flex-shrink:0; }
.author-bio-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.author-bio-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin: 2px 0 6px; }
.author-bio-name a:hover { color: var(--brand-text); }
.author-bio-text { font-size: 15px; color: var(--text-2); }

/* Review score breakdown (rail) */
.rail-scores { border: 2px solid var(--line-hard); }
.rail-scores-head { background: var(--ink); color: rgba(255,255,255,0.8); padding: 12px 16px; display:flex; justify-content:space-between; align-items:center; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.rail-overall { font-family: var(--font-display); font-size: 24px; font-weight: 900; color: var(--brand); }
.rail-overall small { font-size: 12px; opacity: 0.6; }
.rail-scores-body { padding: 14px 16px; display:flex; flex-direction:column; gap: 10px; }
.score-row { display:flex; align-items:center; gap: 8px; }
.score-label { font-size: 13px; font-weight: 500; color: var(--text-2); flex: 1; }
.score-bar-wrap { flex: 2; height: 5px; background: var(--bg-soft); overflow: hidden; }
.score-bar { height: 100%; background: var(--brand-text); }
.score-val { font-weight: 700; font-size: 13px; width: 28px; text-align: right; }
.cta-btn-full { display:block; text-align:center; margin-top: 6px; background: var(--ink); color: var(--paper); font-weight: 700; padding: 12px; border-radius: 999px; }
.cta-btn-full:hover { background: var(--brand); color: var(--ink); }

.related-section { margin-top: 40px; }

/* Comments */
.comments-area { max-width: var(--measure); margin: 40px auto 0; padding: 0 var(--gutter); }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
  width:100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); border-radius: var(--r);
}
.comment-form .submit { font-weight: 700; padding: 10px 22px; border:0; border-radius: 999px; background: var(--text); color: var(--bg); cursor:pointer; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); margin-top: 88px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 56px var(--gutter) 28px; }
.footer-grid { display:grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { display:flex; flex-direction:column; align-items:flex-start; gap: 14px; }
.footer-logo { font-size: 32px; }
.footer-logo::after { content: '.'; color: var(--brand); }
.footer-tagline { font-size: 15px; }
.footer-social { display:flex; gap: 8px; }
.social-icon { width: 38px; height: 38px; display:grid; place-items:center; border: 1.5px solid rgba(255,255,255,0.25); border-radius: 50%; color: var(--paper); font-weight: 700; }
.social-icon:hover { border-color: var(--brand); color: var(--brand); }
.footer-col h3 { color: var(--paper); font-size: 15px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 4px 0; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-bottom { display:flex; flex-wrap:wrap; justify-content:space-between; gap: 12px; padding-top: 22px; font-size: 13px; }
.footer-legal { display:flex; flex-wrap:wrap; gap: 6px; align-items:center; }
.footer-legal a:hover { color: var(--paper); }
.footer-nav { display:flex; gap: 14px; list-style:none; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1180px) {
  .band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
  .band-lead { grid-column: 1 / -1; min-height: 460px; }
  .band-stack { min-height: 300px; }
  .with-rail, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .article-layout { max-width: calc(var(--measure) + 2 * var(--gutter)); }
  .rail-sticky { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items:start; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-menu a { padding: 18px 7px; font-size: 14px; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .header-inner { height: 54px; gap: 12px; }
  .menu-toggle { display:flex; }
  .main-navigation {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: none;
  }
  .main-navigation.is-open { display:block; }
  .nav-menu { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; overflow: visible; }
  .nav-menu a { padding: 12px 0; font-size: 17px; box-shadow: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .ticker-label { padding-left: var(--gutter); }

  .front-band { padding-bottom: 28px; }
  .band-wordmark { margin-bottom: 18px; }
  .band-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .band-lead { min-height: 380px; }
  .band-stack { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }
  .band-stack .overlay-card { min-height: 220px; }
  .band-stack .overlay-title { font-size: 17px; }
  .band-stack .overlay-body { padding: 14px; }
  .band-stack .byline { display: none; }
  .overlay-card--lead .overlay-body { padding: 20px; }

  .with-rail { padding-top: 36px; }
  .post-row { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 16px 0; align-items: start; }
  .post-row--noimg { grid-template-columns: minmax(0, 1fr); }
  .row-media { aspect-ratio: 1; }
  .row-title { font-size: 17px; }
  .byline { font-size: 13px; }

  .cat-rail { margin-top: 44px; }
  .rail-title { font-size: 24px; }
  .tile-grid { gap: 20px 14px; }
  .tile-title { font-size: 16px; }

  .article-header { padding-top: 28px; }
  .share-links { margin-left: 0; width: 100%; }
  .article-hero-figure { padding: 0; }
  .article-body { font-size: 17px; }
  .toc-list, .article-body .wp-block-rank-math-toc-block ul { columns: 1; }
  .review-verdict { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .band-stack { grid-template-columns: minmax(0, 1fr); }
  .tile-grid { grid-template-columns: minmax(0, 1fr); }
  .tile-media { aspect-ratio: 16/9; }
}


/* ═══════════════════════════════════════════
   MOTION (v4.1)
   Everything here is opt-out for readers who ask for reduced motion.
   - smart header: hides on scroll down, returns on scroll up (JS toggles .nav-hidden)
   - reveal: rows / tiles / rail blocks fade up as they enter (JS adds .js-motion + .is-in)
   - band load sequence: lead → stack → headlines
   - parallax + reading progress: CSS scroll-driven animations where supported
   - page transitions: cross-document View Transitions, card image → article hero
═══════════════════════════════════════════ */
.site-header { transition: transform 320ms var(--ease); }
.nav-hidden .site-header { transform: translateY(-100%); }
.nav-hidden .rail-sticky { top: 24px; }
.rail-sticky { transition: top 320ms var(--ease); }

.read-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--brand);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

.btn-pill::after { transition: translate var(--dur) var(--ease); }
.btn-pill:hover::after { translate: 2px -2px; }
.rail-popular-list li::before { transition: color var(--dur); }
.rail-popular-list li:hover::before { color: var(--paper); }

@media (prefers-reduced-motion: no-preference) {

  /* Reveal on scroll — only hidden once JS has confirmed it can reveal them */
  .js-motion .reveal {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 700ms var(--ease), translate 700ms var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js-motion .reveal.is-in { opacity: 1; translate: 0 0; }

  /* Front band load sequence */
  .js-motion .band-lead,
  .js-motion .band-stack .overlay-card,
  .js-motion .band-headlines li {
    animation: dtu-rise 800ms var(--ease) both;
  }
  .js-motion .band-stack .overlay-card:nth-child(1) { animation-delay: 120ms; }
  .js-motion .band-stack .overlay-card:nth-child(2) { animation-delay: 220ms; }
  .js-motion .band-headlines li:nth-child(1) { animation-delay: 300ms; }
  .js-motion .band-headlines li:nth-child(2) { animation-delay: 360ms; }
  .js-motion .band-headlines li:nth-child(3) { animation-delay: 420ms; }
  .js-motion .band-headlines li:nth-child(4) { animation-delay: 480ms; }
  .js-motion .band-headlines li:nth-child(5) { animation-delay: 540ms; }
  .js-motion .band-lead .overlay-img { animation: dtu-settle 1600ms var(--ease) both; }
  @keyframes dtu-rise   { from { opacity: 0; translate: 0 24px; } }
  @keyframes dtu-settle { from { scale: 1.12; } }

  /* Scroll-driven effects (Chrome, Edge, Safari 26+). Other browsers simply skip them. */
  @supports (animation-timeline: view()) {
    .band-lead .overlay-img,
    .article-hero-frame .article-hero-img {
      inset: -9% 0 auto 0;
      height: 118%;
      animation: dtu-parallax linear both;
      animation-timeline: view();
      animation-range: cover;
    }
    .band-stack .overlay-img {
      inset: -6% 0 auto 0;
      height: 112%;
      animation: dtu-parallax-sm linear both;
      animation-timeline: view();
      animation-range: cover;
    }
    .band-wordmark {
      animation: dtu-wordmark linear both;
      animation-timeline: view();
      animation-range: exit -20% exit 100%;
    }
    .read-progress {
      animation: dtu-progress linear both;
      animation-timeline: scroll(root);
    }
    /* lead image: load "settle" + scroll parallax together */
    .js-motion .band-lead .overlay-img {
      animation: dtu-settle 1600ms var(--ease) both, dtu-parallax linear both;
      animation-timeline: auto, view();
      animation-range: normal, cover;
    }
    @keyframes dtu-parallax    { from { translate: 0 -7%; } to { translate: 0 7%; } }
    @keyframes dtu-parallax-sm { from { translate: 0 -4%; } to { translate: 0 4%; } }
    @keyframes dtu-wordmark    { to { opacity: 0.15; translate: 0 -30%; letter-spacing: -0.02em; } }
    @keyframes dtu-progress    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }

  /* Page-to-page transitions */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 220ms var(--ease) both dtu-vt-out; }
  ::view-transition-new(root) { animation: 380ms var(--ease) 60ms both dtu-vt-in; }
  ::view-transition-group(dtu-hero) { animation-duration: 520ms; animation-timing-function: cubic-bezier(0.2, 0, 0, 1); }
  .article-hero-img { view-transition-name: dtu-hero; }
  .site-header { view-transition-name: dtu-header; }
  ::view-transition-group(dtu-header) { animation: none; }
  @keyframes dtu-vt-out { to { opacity: 0; } }
  @keyframes dtu-vt-in  { from { opacity: 0; translate: 0 18px; } }
}

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {
  .ticker-bar, .site-header, .rail, .article-rail, .share-links, .site-footer, .related-section, .search-overlay { display:none !important; }
  .article-layout { display:block; padding:0; }
  body { color:#000; background:#fff; }
}
