/*
Theme Name: Daily Tech Update
Description: Editorial tech news theme — warm editorial palette, Epilogue display font, bento-style layouts, dark mode, full SEO schema. Based on 2026 design trends.
Version: 3.0
Text Domain: dailytechupdate
*/

/* ═══════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════ */
:root {
  /* ── Permanent surfaces — NEVER change with theme ──
     Use --ink / --paper wherever you want an always-dark or
     always-light surface (footer, ticker, verdict score, CTAs).
     Do NOT use var(--text) or var(--bg) for backgrounds that
     must stay dark in both modes — those flip in dark mode. */
  --ink:   #0D0D0B;   /* always near-black */
  --paper: #F5F3EE;   /* always warm limestone */

  /* Palette — light mode */
  --bg:          #F5F3EE;   /* warm limestone, not white */
  --bg-card:     #FFFFFF;
  --bg-muted:    #EEECE7;
  --text:        #0D0D0B;
  --text-2:      #4A4840;
  --text-3:      #8A8880;
  --border:      rgba(13,13,11,0.08);
  --border-mid:  rgba(13,13,11,0.14);
  --border-hard: rgba(13,13,11,0.22);
  --accent:      #00C8CC;
  --accent-dark: #00989B;
  --accent-glow: rgba(0,200,204,0.15);
  --chip-review-bg:  rgba(107,33,168,0.08);
  --chip-review-fg:  #5B21B6;
  --chip-review-bd:  rgba(107,33,168,0.18);
  --chip-news-bg:    rgba(0,200,204,0.08);
  --chip-news-fg:    #006F72;
  --chip-news-bd:    rgba(0,200,204,0.2);
  --chip-gaming-bg:  rgba(220,38,38,0.07);
  --chip-gaming-fg:  #B91C1C;
  --chip-gaming-bd:  rgba(220,38,38,0.18);
  --chip-ai-bg:      rgba(217,119,6,0.08);
  --chip-ai-fg:      #92400E;
  --chip-ai-bd:      rgba(217,119,6,0.2);
  --chip-mobile-bg:  rgba(5,150,105,0.07);
  --chip-mobile-fg:  #065F46;
  --chip-mobile-bd:  rgba(5,150,105,0.18);

  /* Typography */
  --font-display: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif:   'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --sp-xs:  0.375rem;
  --sp-sm:  0.75rem;
  --sp-md:  1.25rem;
  --sp-lg:  2rem;
  --sp-xl:  3rem;
  --sp-2xl: 4.5rem;

  /* Layout */
  --container: 1280px;
  --content:   780px;
  --r:         6px;

  /* Motion */
  --ease:   cubic-bezier(0.25, 0, 0, 1);
  --ease-s: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur:    160ms;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.03);
  --sh-md: 0 4px 16px rgba(0,0,0,0.07);
  --sh-lg: 0 12px 40px rgba(0,0,0,0.1);
}

/* Dark mode overrides */
[data-theme="dark"] {
  --bg:         #0D0D0B;
  --bg-card:    #161614;
  --bg-muted:   #1C1C1A;
  --text:       #EDE9E0;
  --text-2:     #A0998F;
  --text-3:     #60584E;
  --border:     rgba(237,233,224,0.06);
  --border-mid: rgba(237,233,224,0.1);
  --border-hard:rgba(237,233,224,0.16);
  --chip-review-fg:  #C084FC;
  --chip-review-bg:  rgba(192,132,252,0.08);
  --chip-review-bd:  rgba(192,132,252,0.18);
  --chip-news-fg:    #2DD4BF;
  --chip-news-bg:    rgba(45,212,191,0.07);
  --chip-news-bd:    rgba(45,212,191,0.16);
  --chip-gaming-fg:  #F87171;
  --chip-gaming-bg:  rgba(248,113,113,0.07);
  --chip-gaming-bd:  rgba(248,113,113,0.16);
  --chip-ai-fg:      #FCD34D;
  --chip-ai-bg:      rgba(252,211,77,0.07);
  --chip-ai-bd:      rgba(252,211,77,0.16);
  --chip-mobile-fg:  #34D399;
  --chip-mobile-bg:  rgba(52,211,153,0.07);
  --chip-mobile-bd:  rgba(52,211,153,0.16);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.3);
  --sh-md: 0 4px 16px rgba(0,0,0,0.4);
  --sh-lg: 0 12px 40px rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { font-size:16px; scroll-behavior:smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img { max-width:100%; height:auto; display:block; }
a { color:inherit; text-decoration:none; }
::selection { background:var(--accent); color:#fff; }

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

p { margin-bottom: var(--sp-md); line-height: 1.75; }

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

.skip-link:focus {
  position:fixed; top:1rem; left:1rem; z-index:9999;
  background:var(--accent); color:#fff;
  padding:0.75rem 1.5rem;
  font-family:var(--font-display); font-size:14px; font-weight:700;
  clip:auto; width:auto; height:auto;
}

/* ═══════════════════════════════════════════
   DARK MODE ICON VISIBILITY
   The header.php renders both moon + sun SVGs.
   CSS shows/hides based on data-theme.
═══════════════════════════════════════════ */
[data-theme="light"] .icon-sun  { display:none; }
[data-theme="light"] .icon-moon { display:block; }
[data-theme="dark"]  .icon-moon { display:none; }
[data-theme="dark"]  .icon-sun  { display:block; }

/* ═══════════════════════════════════════════
   BREAKING TICKER
═══════════════════════════════════════════ */
.ticker-bar {
  background: var(--ink);
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-label {
  flex-shrink: 0;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-right: 1px solid rgba(255,255,255,0.1);
  background: var(--ink);
  z-index: 1;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  /* JS sets animation after fonts load to prevent layout shift */
  animation: ticker-scroll 40s linear infinite;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 32px 0 0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: rgba(237,233,224,0.7);
  text-decoration: none;
  transition: color var(--dur);
}
.ticker-item:hover { color: var(--accent); }
.ticker-item::before { content:'→'; color:var(--accent); font-weight:700; }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border-mid);
  transition: background var(--dur) var(--ease);
}

[data-theme="dark"] .site-header {
  background: rgba(13,13,11,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
  height: 60px;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

/* ─── Logo integration ────────────────────────────────────────────────────
   WordPress's the_custom_logo() outputs:
     <a class="custom-logo-link" href="/" rel="home">
       <img class="custom-logo" src="..." alt="Site Name">
     </a>

   The current DTU logo (daily.tech.update.) has a white background.
   We handle this with mix-blend-mode so white areas disappear
   on the warm limestone background without touching the file.

   DARK MODE: a subtle frosted pill sits behind the logo so the
   white-background PNG is always legible. No filter inversions
   that would break the gradient colours.

   To upload: Appearance → Customize → Site Identity → Logo.
   Recommended size: 400px wide minimum, SVG or PNG.
─────────────────────────────────────────────────────────────────────── */
.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 6px;
  /* Light mode: mix-blend-mode multiply knocks out the white background
     so the gradient icon sits cleanly on the limestone bg */
  mix-blend-mode: multiply;
  transition: opacity var(--dur) var(--ease);
}
.custom-logo-link:hover { opacity: 0.85; }

.custom-logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

/* Dark mode: multiply doesn't work on dark backgrounds.
   Wrap with a light pill so the logo is always readable,
   and disable mix-blend-mode so the pill shows correctly. */
[data-theme="dark"] .custom-logo-link {
  mix-blend-mode: normal;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 10px;
  border-radius: 6px;
}
[data-theme="dark"] .custom-logo {
  height: 30px;  /* slightly smaller to fit inside the pill */
}

/* Fallback text logo (shown when no image is uploaded) */
.site-branding { flex-shrink: 0; }

.site-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0;
}
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); text-decoration: none; }

/* Nav */
.main-navigation { flex:1; min-width:0; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: nowrap;
}

.nav-menu a {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 5px 11px;
  border-radius: var(--r);
  white-space: nowrap;
  transition: color var(--dur), background var(--dur);
}
.nav-menu a:hover { color: var(--text); background: var(--bg-muted); text-decoration:none; }
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a { color: var(--text); background: var(--bg-muted); }

/* Header actions */
.header-actions { display:flex; align-items:center; gap:6px; margin-left:auto; flex-shrink:0; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-hard); background: var(--bg-muted); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Mobile toggle — hidden until ≤768px */
.menu-toggle { display:none; }

/* ═══════════════════════════════════════════
   SEARCH OVERLAY
═══════════════════════════════════════════ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(13,13,11,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
}
.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: 100%;
  max-width: 640px;
  padding: var(--sp-lg);
  position: relative;
}

.search-close {
  position: absolute;
  top: -2rem;
  right: var(--sp-lg);
  background: none;
  border: none;
  color: rgba(237,233,224,0.6);
  cursor: pointer;
  padding: 4px;
  transition: color var(--dur);
}
.search-close:hover { color: #fff; }

.search-form { display:flex; gap:0; }

.search-field {
  flex: 1;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  border: 2px solid var(--bg-card);
  border-right: none;
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--r) 0 0 var(--r);
  outline: none;
}
.search-field:focus { border-color: var(--accent); }
.search-field::placeholder { color: var(--text-3); }

.search-submit {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  padding: 0 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0 var(--r) var(--r) 0;
  transition: background var(--dur);
}
.search-submit:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ═══════════════════════════════════════════
   CATEGORY CHIPS
═══════════════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid;
  margin-bottom: var(--sp-sm);
  white-space: nowrap;
  text-decoration: none !important;
  transition: filter var(--dur);
}
.chip:hover { filter: brightness(1.15); }

.chip-news    { background:var(--chip-news-bg);    color:var(--chip-news-fg);    border-color:var(--chip-news-bd); }
.chip-review  { background:var(--chip-review-bg);  color:var(--chip-review-fg);  border-color:var(--chip-review-bd); }
.chip-gaming  { background:var(--chip-gaming-bg);  color:var(--chip-gaming-fg);  border-color:var(--chip-gaming-bd); }
.chip-ai      { background:var(--chip-ai-bg);      color:var(--chip-ai-fg);      border-color:var(--chip-ai-bd); }
.chip-mobile  { background:var(--chip-mobile-bg);  color:var(--chip-mobile-fg);  border-color:var(--chip-mobile-bd); }

/* ═══════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════ */
.content-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-lg);
  border-bottom: 1px solid var(--border-mid);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Line after title */
.section-title::after {
  content:'';
  display:block;
  height:1px;
  width:clamp(40px, 8vw, 120px);
  background: var(--border-hard);
}

.section-more {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  white-space: nowrap;
  transition: color var(--dur);
}
.section-more:hover { color: var(--accent); }

/* ═══════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════ */
.hero-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-lg) var(--sp-lg) 0;
  border-bottom: 1px solid var(--border-mid);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-md);
  padding-bottom: var(--sp-lg);
}

/* Hero main card */
.hero-main {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
}

.hero-img-link { display:block; overflow:hidden; }
.hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.hero-main:hover .hero-img { transform:scale(1.025); }

.hero-body { padding: var(--sp-lg); flex:1; display:flex; flex-direction:column; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-sm);
}
.hero-title a { color:var(--text); }
.hero-title a:hover { color:var(--accent-dark); text-decoration:none; }

.hero-excerpt {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: var(--sp-md);
  flex:1;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px var(--sp-sm);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
}

.meta-sep { color: var(--border-hard); }

/* Hero sidebar */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.hero-side-item {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  gap: 0;
  flex-direction: column;
  box-shadow: var(--sh-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  flex: 1;
}
.hero-side-item:hover { transform:translateY(-2px); box-shadow:var(--sh-md); }

.hero-side-thumb-link { display:block; overflow:hidden; }
.hero-side-thumb {
  width:100%;
  aspect-ratio: 16/7;
  object-fit:cover;
  transition:transform 0.4s var(--ease);
}
.hero-side-item:hover .hero-side-thumb { transform:scale(1.04); }

.hero-side-body { padding: 10px 12px 12px; flex:1; display:flex; flex-direction:column; gap:4px; }

.hero-side-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}
.hero-side-title a { color:inherit; }
.hero-side-title a:hover { color:var(--accent-dark); text-decoration:none; }

/* ═══════════════════════════════════════════
   POST CARDS
═══════════════════════════════════════════ */
.posts-grid {
  display: grid;
  gap: var(--sp-md);
}

.posts-grid-3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid-4 { grid-template-columns: repeat(4, 1fr); }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
}
.post-card:hover { transform:translateY(-3px); box-shadow:var(--sh-md); border-color:var(--border-hard); }

.card-image-link { display:block; overflow:hidden; }
.card-image {
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  transition:transform 0.4s var(--ease);
}
.post-card:hover .card-image { transform:scale(1.035); }

.card-body { padding: var(--sp-md); flex:1; display:flex; flex-direction:column; }

.card-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-sm);
  flex: 1;
}
.card-title a { color:var(--text); }
.card-title a:hover { color:var(--accent-dark); text-decoration:none; }

.card-excerpt {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: var(--sp-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px var(--sp-xs);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.card-rating {
  margin-left: auto;
  background: var(--accent);
  color: #0D0D0B;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: -0.01em;
}
.card-rating span { font-size:9px; opacity:0.7; }

/* ═══════════════════════════════════════════
   ARCHIVE HEADER
═══════════════════════════════════════════ */
.archive-header {
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border-mid);
}

.archive-label {
  margin-bottom: var(--sp-sm);
}

.archive-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: var(--sp-sm);
}

.archive-count {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: var(--sp-sm);
}

.archive-description {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 300;
  max-width: 60ch;
  line-height: 1.65;
  margin: var(--sp-sm) 0 0;
}
.archive-description p { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   ARTICLE — SINGLE
═══════════════════════════════════════════ */
.article-wrap {
  max-width: var(--container);
  margin: 0 auto;
}

/* Header area */
.article-header {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-lg) 0;
}

/* Breadcrumbs */
.breadcrumbs { margin-bottom: var(--sp-md); }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0; margin: 0;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.breadcrumb-list a { color:var(--text-3); transition:color var(--dur); }
.breadcrumb-list a:hover { color:var(--accent-dark); text-decoration:none; }
.bc-sep { color:var(--border-hard); }
[aria-current="page"] { color:var(--text-3); }

.article-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: var(--sp-md);
}

.article-deck {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: var(--sp-md);
}

.article-byline {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  flex-wrap: wrap;
  margin-bottom: 0;
}

.byline-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.byline-text { display:flex; flex-direction:column; gap:1px; }
.byline-name { font-family:var(--font-display); font-size:13px; font-weight:700; color:var(--text); }
.byline-date { font-size:12px; color:var(--text-3); font-weight:300; }

.byline-stats {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--sp-2xl);
  max-width: calc(var(--content) + 260px + var(--sp-2xl));
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-2xl);
  align-items: start;
}

/* Hero image */
.article-hero-figure {
  margin-bottom: var(--sp-xl);
  border-radius: var(--r);
  overflow: hidden;
}
.article-hero-img {
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
}
.article-hero-caption {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 300;
  font-style: italic;
  padding: 8px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Review verdict */
.review-verdict {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-lg);
  align-items: center;
  background: var(--bg-muted);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.verdict-score {
  background: var(--ink);
  color: var(--paper);
  width: 80px; height: 80px;
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.verdict-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.verdict-denom { font-size:10px; color:var(--text-3); font-weight:600; letter-spacing:0.04em; }
.verdict-product { font-family:var(--font-display); font-size:8px; color:var(--text-3); letter-spacing:0.06em; text-transform:uppercase; margin-top:2px; }

.verdict-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.verdict-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin:0;
}

/* Article body */
.article-body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text);
}

.article-body p { margin-bottom: 1.5em; }

.article-body > p:first-of-type {
  font-size: 19px;
  font-weight: 400;
  line-height: 1.65;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 2.5em 0 0.8em;
  line-height: 1.1;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2em 0 0.6em;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  line-height: 1.2;
}

.article-body blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text);
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--bg-muted);
  border-radius: 0 var(--r) var(--r) 0;
}
.article-body blockquote cite {
  display:block;
  font-family:var(--font-display);
  font-size:11px;
  font-style:normal;
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--text-3);
  margin-top:10px;
}

.article-body a { color:var(--accent-dark); text-decoration:underline; text-underline-offset:3px; }
.article-body a:hover { color:var(--accent); }

.article-body img {
  width:100%;
  border-radius:var(--r);
  margin:var(--sp-xl) 0;
}

.article-body ul, .article-body ol {
  padding-left: var(--sp-xl);
  margin: var(--sp-md) 0;
}
.article-body li { margin-bottom:var(--sp-sm); }
.article-body li::marker { color:var(--accent); font-weight:800; }

/* Table of contents (injected by PHP filter) */
.article-toc {
  background: var(--bg-muted);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  padding: var(--sp-md) var(--sp-lg);
  margin: var(--sp-xl) 0;
}

.toc-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-sm);
}

.toc-list { list-style:decimal; padding-left:var(--sp-lg); margin:0; columns:2; column-gap:var(--sp-lg); }

.toc-item { margin-bottom:4px; break-inside:avoid; }

.toc-item a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  transition: color var(--dur);
}
.toc-item a:hover { color:var(--accent-dark); text-decoration:none; }
.toc-item[aria-current] a { color:var(--accent-dark); font-weight:500; }
.toc-h3 { margin-left:var(--sp-md); }

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border-mid);
}

.tag-pill {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--border-hard);
  border-radius: 20px;
  color: var(--text-2);
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.tag-pill:hover { border-color:var(--accent); color:var(--accent-dark); background:var(--accent-glow); text-decoration:none; }

/* Author bio */
.author-bio {
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
  margin-top: var(--sp-xl);
  padding: var(--sp-lg);
  background: var(--bg-muted);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
}
.author-bio-avatar { width:64px; height:64px; border-radius:50%; flex-shrink:0; }
.author-bio-label { font-family:var(--font-display); font-size:10px; font-weight:800; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-3); margin-bottom:2px; }
.author-bio-name { font-family:var(--font-display); font-size:16px; font-weight:800; letter-spacing:-0.02em; margin-bottom:var(--sp-sm); }
.author-bio-name a { color:var(--text); text-decoration:underline; text-underline-offset:3px; }
.author-bio-name a:hover { color:var(--accent-dark); }
.author-bio-text { font-size:13px; color:var(--text-2); font-weight:300; line-height:1.65; margin:0; }

/* Article rail */
.article-rail {
  position: sticky;
  top: 80px; /* header height */
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

/* Score breakdown widget */
.rail-scores {
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  overflow: hidden;
}

.rail-scores-head {
  background: var(--ink);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(237,233,224,0.7);
}
.rail-overall {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.rail-overall small { font-size:11px; opacity:0.6; }

.rail-scores-body { padding: 14px 16px; background:var(--bg-card); display:flex; flex-direction:column; gap:10px; }

.score-row { display:flex; align-items:center; gap:8px; }
.score-label { font-family:var(--font-display); font-size:11px; font-weight:600; color:var(--text-2); flex:1; }
.score-bar-wrap { flex:2; height:4px; background:var(--bg-muted); border-radius:2px; overflow:hidden; }
.score-bar { height:100%; background:var(--accent); border-radius:2px; transition:width 0.6s var(--ease); }
.score-val { font-family:var(--font-display); font-size:12px; font-weight:800; color:var(--text); width:24px; text-align:right; }

.cta-btn-full {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px;
  border-radius: var(--r);
  transition: background var(--dur), color var(--dur);
}
.cta-btn-full:hover { background: var(--accent); color: var(--ink); text-decoration:none; }

.rail-toc-note {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px;
}

/* ═══════════════════════════════════════════
   PAGINATION
   WordPress the_posts_pagination() outputs:
     <nav class="navigation pagination">
       <div class="nav-links">
         <a class="page-numbers" href="...">1</a>
         <span class="page-numbers current">2</span>
         ...
       </div>
     </nav>
   The container class is .navigation.pagination and the flex
   row must be on .nav-links, NOT .pagination alone.
═══════════════════════════════════════════ */
.navigation.pagination {
  margin: var(--sp-xl) 0 0;
  text-align: center;        /* fallback for very old browsers */
}

/* Horizontal pill row */
.nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.page-numbers {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  background: var(--bg-card);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  transition: background var(--dur), color var(--dur), border-color var(--dur);
  text-decoration: none !important;
}
.page-numbers:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border-hard);
}
.page-numbers.current,
.page-numbers[aria-current="page"] {
  background: var(--accent);
  color: #0D0D0B;
  border-color: var(--accent);
  font-weight: 800;
}
.page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: var(--text-3);
  cursor: default;
  pointer-events: none;
}
/* Prev / Next text links */
.page-numbers.prev,
.page-numbers.next {
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 0 14px;
}

/* ═══════════════════════════════════════════
   POST CARDS — NO IMAGE FALLBACK
   When a post has no featured image the card
   still looks intentional, not broken.
═══════════════════════════════════════════ */

/* Cards without a featured image get a left accent stripe instead */
.post-card:not(:has(.card-image-link)) {
  border-left: 3px solid var(--accent);
}

/* Fallback: colour strip that sits where the image would be.
   Applied via inline style class from content-card.php */
.card-img-fallback {
  width: 100%;
  height: 6px;               /* thin top stripe — accent color */
  background: var(--accent);
  flex-shrink: 0;
}

/* Hero placeholder when no featured image exists */
.hero-img-placeholder {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-lg);
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-mid);
  flex-shrink: 0;
  position: relative;
}
/* Accent stripe at bottom of placeholder */
.hero-img-placeholder::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--accent);
}

/* Hero sidebar thumb placeholder */
.hero-side-thumb-placeholder {
  width: 100%;
  height: 80px;
  background: var(--bg-muted);
  flex-shrink: 0;
  border-bottom: 2px solid var(--accent);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--border-hard);
  padding: var(--sp-2xl) 0 var(--sp-lg);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid rgba(237,233,224,0.1);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--paper);
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 13px;
  font-weight: 300;
  color: rgba(237,233,224,0.4);
  line-height: 1.6;
  max-width: 220px;
  margin-bottom: var(--sp-md);
}
.footer-social { display:flex; gap:8px; }
.social-icon {
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  border: 1px solid rgba(237,233,224,0.14);
  border-radius: var(--r);
  font-size: 13px;
  font-weight:700;
  color: rgba(237,233,224,0.5);
  transition: all var(--dur);
}
.social-icon:hover { border-color:var(--accent); color:var(--accent); text-decoration:none; }

.footer-col .widget h3,
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(237,233,224,0.35);
  margin-bottom: var(--sp-md);
}
.footer-col ul { list-style:none; }
.footer-col li { margin-bottom:10px; }
.footer-col a { font-size:13px; font-weight:300; color:rgba(237,233,224,0.65); transition:color var(--dur); }
.footer-col a:hover { color:var(--accent); text-decoration:none; }

.footer-nav {
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:6px var(--sp-md);
}
.footer-nav a { font-size:12px; font-weight:600; letter-spacing:0.03em; }

.footer-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-family:var(--font-display);
  font-size:11px;
  font-weight:500;
  letter-spacing:0.03em;
  color:rgba(237,233,224,0.28);
  flex-wrap:wrap;
  gap:var(--sp-sm);
}
.footer-legal { display:flex; align-items:center; gap:var(--sp-sm); }
.footer-legal a { color:rgba(237,233,224,0.28); transition:color var(--dur); }
.footer-legal a:hover { color:var(--accent); text-decoration:none; }

/* ═══════════════════════════════════════════
   RELATED SECTION
═══════════════════════════════════════════ */
.related-section {
  border-top: 1px solid var(--border-mid);
  border-bottom: none;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sidebar { display: grid; grid-template-columns: repeat(3, 1fr); }

  .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .posts-grid-4 { grid-template-columns: repeat(2, 1fr); }

  .article-layout { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .article-rail { position:static; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .toc-list { columns:1; }
}

@media (max-width: 768px) {
  /* Collapse primary nav */
  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-mid);
    padding: var(--sp-sm) var(--sp-lg);
    z-index: 100;
    box-shadow: var(--sh-md);
  }
  .main-navigation.is-open { display: block; }
  .nav-menu { flex-direction:column; align-items:flex-start; gap:2px; }
  .nav-menu a { width:100%; display:block; }

  /* Show hamburger */
  .menu-toggle { display:flex; }

  /* Collapse header to 2-col */
  .header-inner {
    grid-template-columns: auto auto;
    position: relative;
  }
  .site-branding { order:1; }
  .header-actions { order:2; margin-left:auto; }
  .main-navigation { order:3; grid-column:1/-1; }

  .posts-grid-3,
  .posts-grid-4 { grid-template-columns: 1fr; }
  .hero-sidebar { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .article-header { padding:var(--sp-lg) var(--sp-md) 0; }
  .article-layout { padding:var(--sp-lg) var(--sp-md) var(--sp-xl); }

  .author-bio { flex-direction:column; align-items:center; text-align:center; }
  .review-verdict { grid-template-columns:1fr; text-align:center; }

  .footer-bottom { flex-direction:column; text-align:center; }
}

@media (max-width: 480px) {
  :root { --sp-lg:1.25rem; --sp-xl:2rem; --sp-2xl:3rem; }
  .article-body { font-size:16px; }
  .article-body > p:first-of-type { font-size:17px; }
  .byline-stats { display:none; }
}

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {
  .site-header, .ticker-bar, .search-overlay, .article-rail,
  .related-section, .site-footer, .article-tags, .author-bio,
  .article-toc { display:none !important; }
  body { background:#fff; color:#000; }
  .article-layout { display:block; }
  .article-body { font-size:12pt; }
}
