/*
Theme Name: Zuvrix
Theme URI: https://zuvrix.com/
Author: Zuvrix
Description: Editorial theme for Zuvrix — an independent publication reviewing privacy and security tools by profession and use case. Amber/serif editorial register, single-H1 article template, client-side archive filtering driven by the real post index.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zuvrix
Tags: blog, news, one-column, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ============================================================================
   ZUVRIX — Design System
   An independent digital publication reviewing privacy & security tools.
   Register: editorial. Accent: honey/amber (deliberately NOT security-navy).
   Type: Fraunces (display serif) · Inter (body sans) · JetBrains Mono (meta).
   ========================================================================== */

/* ---- Tokens -------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg: #ffffff;
  --surface: #f5f6f8;       /* faint cool paper for alternating sections */
  --surface-2: #eceef1;
  --ink-surface: #14161d;   /* the "drenched" brand block: near-black */
  --ink-surface-2: #1c1f28;

  /* Ink ramp (cool near-black) */
  --ink: #1a1d26;           /* ~15:1 on white  — primary text            */
  --ink-2: #474c59;         /* ~7:1  on white  — secondary text          */
  --ink-3: #5c6270;         /* ~5.3:1 on white — small meta text         */
  --on-dark: #f4f5f7;       /* text on ink-surface                        */
  --on-dark-2: #a9adba;     /* secondary text on ink-surface              */

  /* Accent — honey/amber */
  --accent: #e79a2b;        /* signature amber (fills, markers)           */
  --accent-soft: #fbeccd;   /* amber wash for tags/highlights             */
  --accent-ink: #96580a;    /* ~5.3:1 on white — amber link/emphasis text */
  --accent-on-dark: #f2b64d; /* amber for text on the dark ink surface */

  /* Lines */
  --border: #e4e6ea;
  --border-2: #d2d6dd;
  --border-ink: #2c3140;    /* borders on ink-surface                     */

  /* Fonts */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --wrap: 1180px;
  --read: 680px;            /* editorial reading width */
  --gap: clamp(1.25rem, 3.5vw, 3rem);
  --radius: 4px;
  --radius-lg: 8px;

  /* Elevation — restrained */
  --shadow-1: 0 1px 2px rgba(20,22,29,.05), 0 2px 8px rgba(20,22,29,.04);
  --shadow-2: 0 8px 30px rgba(20,22,29,.10);

  /* Motion */
  --ease: cubic-bezier(.22,1,.36,1);      /* ease-out-quint */
  --dur: .5s;

  /* z-scale */
  --z-sticky: 100;
  --z-overlay: 400;
  --z-nav: 500;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.08;
  letter-spacing: -0.02em; text-wrap: balance; color: var(--ink); }
p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }

/* ---- Utilities ----------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.eyebrow, .meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); }
.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; }

/* Tag / category chip */
.tag {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: .32em .6em; border-radius: 3px; white-space: nowrap;
}
.tag--ghost { color: var(--ink-2); background: transparent; border: 1px solid var(--border-2); }
.tag--dot::before { content:""; width:.42em; height:.42em; border-radius:50%; background: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .7em 1.25em; border-radius: var(--radius); border: 1px solid transparent;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--on-dark); }
.btn--primary:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--amber { background: var(--accent); color: #211603; }
.btn--amber:hover { background: #f0a63c; }
.btn--sm { padding: .5em .9em; font-size: .85rem; }

/* Read-more link with animated underline */
.rlink { display: inline-flex; align-items: center; gap: .4em; font-weight: 600;
  color: var(--ink); position: relative; }
.rlink::after { content:""; position:absolute; left:0; bottom:-2px; height:1.5px; width:100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.rlink:hover::after { transform: scaleX(1); }
.rlink .arw { transition: transform .3s var(--ease); }
.rlink:hover .arw { transform: translateX(3px); }

/* Duotone image treatment — unifies the site's mismatched stock photos into
   one branded look and hides how random the source imagery is. */
.duo { position: relative; overflow: hidden; background: var(--ink-surface); }
.duo img { width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(.95);
  mix-blend-mode: luminosity; opacity: .92;
  transition: transform .6s var(--ease); }
.duo::after { content:""; position:absolute; inset:0; mix-blend-mode: color;
  background: linear-gradient(150deg, #2a2f3d 0%, #4a3413 100%); opacity:.55; pointer-events:none; }
.duo::before { content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background: linear-gradient(180deg, transparent 45%, rgba(15,16,22,.35) 100%); }
a:hover > .duo img, .card:hover .duo img { transform: scale(1.045); }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, background .3s;
}
.site-header.is-stuck { box-shadow: var(--shadow-1); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: -.03em;
  color: var(--ink); display: inline-flex; align-items: baseline; gap: .12em; }
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 1.35rem; margin-left: 1rem; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--ink-2);
  padding: .35em 0; position: relative; transition: color .18s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { content:""; position:absolute; left:0; right:0; bottom:-2px;
  height:2px; background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius);
  color: var(--ink); background: transparent; border: 1px solid transparent; transition: background .18s, border-color .18s; }
.icon-btn:hover { background: var(--surface); border-color: var(--border); }
.nav-toggle { display: none; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--ink-surface); color: var(--on-dark-2); margin-top: clamp(4rem,8vw,7rem); }
.site-footer a { color: var(--on-dark-2); transition: color .18s; }
.site-footer a:hover { color: var(--on-dark); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem;
  padding-block: clamp(3rem,6vw,4.5rem); border-bottom: 1px solid var(--border-ink); }
.footer-top h4 { color: var(--on-dark); font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-brand .brand { color: var(--on-dark); font-size: 1.7rem; }
.footer-brand p { max-width: 32ch; margin-top: .8rem; font-size: .95rem; line-height: 1.6; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .92rem; }
.footer-disclosure { padding-block: 1.5rem; font-size: .82rem; color: var(--on-dark-2);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer-disclosure .tag { background: rgba(231,154,43,.14); color: var(--accent-on-dark); }

/* ---- Search overlay ------------------------------------------------------ */
.search-overlay { position: fixed; inset: 0; z-index: var(--z-overlay); display: none;
  background: rgba(16,17,23,.55); backdrop-filter: blur(4px); }
.search-overlay.is-open { display: block; }
.search-panel { max-width: 640px; margin: 12vh auto 0; background: var(--bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2); overflow: hidden; animation: pop .32s var(--ease); }
@keyframes pop { from { opacity:0; transform: translateY(-10px) scale(.99); } to { opacity:1; transform:none; } }
.search-field { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.search-field input { flex: 1; border: 0; outline: 0; font-size: 1.1rem; font-family: var(--sans); color: var(--ink); background: transparent; }
.search-field input::placeholder { color: var(--ink-3); }
.search-results { max-height: 52vh; overflow-y: auto; }
.search-results a { display: flex; gap: .9rem; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.search-results a:hover, .search-results a.is-active { background: var(--surface); }
.search-results .sr-thumb { width: 54px; height: 40px; border-radius: 3px; flex: none; }
.search-results .sr-title { font-weight: 600; font-size: .92rem; line-height: 1.3; color: var(--ink); }
.search-empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .search-panel { animation: none; } }

/* ---- Reveal animation ---------------------------------------------------- */
/* Content is visible by default; JS adds .reveal-ready to opt in, then .in-view. */
.reveal-ready { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-ready.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready { opacity: 1; transform: none; transition: none; }
  .duo img { transition: none; }
}

/* ============================================================================
   HOMEPAGE
   ========================================================================== */
.section { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.section--alt { background: var(--surface); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-head .meta { margin-bottom: .35rem; display: block; }

/* Hero: one lead story + two stacked secondaries (front-page hierarchy) */
.hero { padding-top: clamp(1.75rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--gap); align-items: stretch; }
.lead { display: flex; flex-direction: column; }
.lead .duo { aspect-ratio: 16/9; border-radius: var(--radius-lg); }
.lead-body { padding-top: 1.25rem; }
.lead h1 { font-size: clamp(1.9rem, 3.8vw, 3.15rem); margin: .5rem 0 .65rem; letter-spacing: -.025em; }
.lead .dek { color: var(--ink-2); font-size: 1.08rem; line-height: 1.55; max-width: 46ch; }
.byline { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; font-size: .82rem; color: var(--ink-3); }
.byline .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink-surface); color: var(--accent-on-dark);
  display: grid; place-items: center; font-family: var(--serif); font-size: .82rem; font-weight: 600; flex: none; }
.byline b { color: var(--ink-2); font-weight: 600; }
.byline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-2); }

.secondary-list { display: grid; grid-template-rows: 1fr 1fr; gap: var(--gap); }
.mini { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.mini .duo { aspect-ratio: 16/9; border-radius: var(--radius); }
.mini h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.mini h3 a:hover { color: var(--accent-ink); }
.mini .byline { margin-top: .5rem; }

/* Trust strip */
.trust { border-block: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.trust-item { padding: 1.5rem clamp(1rem,2.5vw,2rem); display: flex; gap: .9rem; align-items: flex-start; }
.trust-item + .trust-item { border-left: 1px solid var(--border); }
.trust-item svg { flex: none; color: var(--accent-ink); margin-top: .15rem; }
.trust-item h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: .2rem; }
.trust-item p { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }

/* Latest — editorial list + rail */
.latest-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--gap); align-items: start; }
.story-list { display: grid; gap: 1.5rem; }
.story { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: center;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.story:last-child { border-bottom: 0; padding-bottom: 0; }
.story .duo { aspect-ratio: 3/2; border-radius: var(--radius); }
.story h3 { font-size: 1.28rem; margin: .5rem 0 .4rem; letter-spacing: -.02em; }
.story h3 a:hover { color: var(--accent-ink); }
.story .dek { color: var(--ink-2); font-size: .95rem; line-height: 1.5; max-width: 52ch; }
.story .byline { margin-top: .7rem; }

.rail { position: sticky; top: 92px; }
.rail-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rail-card h3 { font-family: var(--sans); font-size: .82rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); }
.rank-list { list-style: none; margin: 0; padding: .35rem 0; counter-reset: r; }
.rank-list li { counter-increment: r; }
.rank-list a { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: baseline;
  padding: .8rem 1.15rem; transition: background .15s; }
.rank-list a:hover { background: var(--surface); }
.rank-list a::before { content: counter(r,decimal-leading-zero); font-family: var(--mono); font-size: .8rem;
  color: var(--accent-ink); font-weight: 500; }
.rank-list .rank-title { font-size: .93rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.rank-list .rank-meta { display: block; font-family: var(--mono); font-size: .68rem; color: var(--ink-3);
  margin-top: .25rem; text-transform: uppercase; letter-spacing: .04em; }

/* Browse by need — the site's real superpower (audience-specific reviews) */
.needs { display: flex; flex-wrap: wrap; gap: .65rem; }
.need-chip { display: inline-flex; align-items: center; gap: .5em; padding: .6em 1em; border: 1px solid var(--border-2);
  border-radius: 100px; font-size: .92rem; font-weight: 500; color: var(--ink); background: var(--bg);
  transition: border-color .18s, background .18s, transform .18s var(--ease); }
.need-chip:hover { border-color: var(--ink); transform: translateY(-2px); background: var(--surface); }
.need-chip .n { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }

/* Newsletter band */
.newsletter { background: var(--ink-surface); color: var(--on-dark); overflow: hidden; position: relative; }
.newsletter::before { content:""; position:absolute; right:-120px; top:-120px; width:420px; height:420px;
  background: radial-gradient(circle, rgba(231,154,43,.28), transparent 62%); pointer-events:none; }
.newsletter .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gap); align-items: center; position: relative; }
.newsletter h2 { color: var(--on-dark); font-size: clamp(1.6rem, 3vw, 2.4rem); }
.newsletter p { color: var(--on-dark-2); margin-top: .7rem; max-width: 44ch; line-height: 1.6; }
.subscribe { display: flex; gap: .6rem; }
.subscribe input { flex: 1; min-width: 0; padding: .85em 1em; border-radius: var(--radius); border: 1px solid var(--border-ink);
  background: var(--ink-surface-2); color: var(--on-dark); font-size: .95rem; }
.subscribe input::placeholder { color: var(--on-dark-2); }
.subscribe input:focus-visible { outline-color: var(--accent); border-color: var(--accent); }
.newsletter .fineprint { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--on-dark-2); margin-top: .8rem; }

/* ============================================================================
   ARTICLE PAGE
   ========================================================================== */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent);
  z-index: calc(var(--z-nav) + 1); transition: width .1s linear; }
.crumbs { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); display: flex; gap: .55rem; flex-wrap: wrap; padding-block: 1.5rem .25rem; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs .sep { color: var(--border-2); }

.article-header { padding-top: .75rem; padding-bottom: 1.5rem; }
.article-header .kicker { display: flex; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.article-header h1 { font-size: clamp(1.9rem, 4vw, 3.1rem); letter-spacing: -.025em; max-width: 20ch; }
.article-header .dek { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); max-width: 60ch; margin-top: 1rem;
  font-family: var(--serif); font-weight: 400; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: 1.4rem;
  padding-block: 1rem; border-block: 1px solid var(--border); font-size: .85rem; color: var(--ink-3); }
.article-meta .byline { margin: 0; font-size: .85rem; }
.article-meta .disclosure { margin-left: auto; font-family: var(--mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-3); }
.share { display: flex; gap: .4rem; }
.share a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-2); display: grid;
  place-items: center; color: var(--ink-2); transition: border-color .18s, color .18s; }
.share a:hover { border-color: var(--ink); color: var(--ink); }

.article-hero { margin: 1.75rem 0 .5rem; }
.article-hero .duo { aspect-ratio: 21/9; border-radius: var(--radius-lg); }
.article-hero figcaption { font-family: var(--mono); font-size: .7rem; color: var(--ink-3); margin-top: .55rem;
  text-transform: uppercase; letter-spacing: .03em; }

/* Article layout: content column + sticky TOC rail */
.article-layout { display: grid; grid-template-columns: 1fr minmax(0, var(--read)) 240px; gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start; padding-top: 1.5rem; }
.article-layout > .prose { grid-column: 2; }
.toc-rail { grid-column: 3; position: sticky; top: 92px; }
.toc-rail h4 { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; }
.toc-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; border-left: 1px solid var(--border); }
.toc-rail a { display: block; padding: .4rem .9rem; font-size: .84rem; line-height: 1.35; color: var(--ink-3);
  border-left: 2px solid transparent; margin-left: -1px; transition: color .18s, border-color .18s; }
.toc-rail a:hover { color: var(--ink); }
.toc-rail a.is-current { color: var(--ink); border-left-color: var(--accent); font-weight: 500; }

/* Prose */
.prose { font-size: 1.14rem; line-height: 1.72; color: #24272f; }
.prose > * + * { margin-top: 1.4rem; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 2.8rem; letter-spacing: -.02em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.3rem; margin-top: 2rem; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.prose li::marker { color: var(--accent-ink); }
.prose figure { margin: 2rem 0; }
.prose figure .duo { border-radius: var(--radius-lg); aspect-ratio: 16/9; }
.pullquote { font-family: var(--serif); font-size: clamp(1.4rem,2.4vw,1.85rem); line-height: 1.3; font-weight: 500;
  color: var(--ink); border: 0; margin: 2.5rem 0; padding-left: 1.4rem; border-left: 3px solid var(--accent);
  letter-spacing: -.01em; }
.pullquote cite { display: block; font-family: var(--mono); font-size: .72rem; font-style: normal; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); margin-top: .8rem; }

/* Verdict box — a distinctive, honest summary card */
.verdict { border: 1px solid var(--border-2); border-radius: var(--radius-lg); overflow: hidden; margin: 2.5rem 0; }
.verdict-head { background: var(--ink-surface); color: var(--on-dark); padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.verdict-head h3 { color: var(--on-dark); font-family: var(--sans); font-size: .95rem; letter-spacing: .02em; }
.verdict-score { font-family: var(--mono); font-weight: 600; color: var(--accent-on-dark); font-size: 1rem; }
.verdict-body { padding: 1.25rem; display: grid; gap: 1rem; }
.verdict-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.verdict-cols h4 { font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .55rem; }
.verdict-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .92rem; color: var(--ink-2); }
.verdict-cols li { display: flex; gap: .5rem; align-items: flex-start; line-height: 1.4; }
.verdict-cols .pro::before { content:"+"; color: #2f7d4f; font-weight: 700; }
.verdict-cols .con::before { content:"–"; color: #b4472e; font-weight: 700; }
.verdict-cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 1rem; }
.verdict-cta .note { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.verdict-cta .note a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.author-box { display: flex; gap: 1rem; align-items: flex-start; margin-top: 3rem; padding: 1.4rem;
  background: var(--surface); border-radius: var(--radius-lg); }
.author-box .avatar { width: 52px; height: 52px; font-size: 1.2rem; }
.author-box h4 { font-family: var(--sans); font-size: 1rem; margin-bottom: .25rem; }
.author-box p { font-size: .9rem; color: var(--ink-2); line-height: 1.5; max-width: 60ch; }
.author-box .meta { margin-top: .5rem; }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card { display: flex; flex-direction: column; }
.card .duo { aspect-ratio: 16/10; border-radius: var(--radius); }
.card h3 { font-size: 1.12rem; margin: .7rem 0 .35rem; letter-spacing: -.018em; }
.card h3 a:hover { color: var(--accent-ink); }
.card .byline { margin-top: auto; padding-top: .6rem; }

/* ============================================================================
   CATEGORY / ARCHIVE PAGE
   ========================================================================== */
.cat-hero { padding-block: clamp(2rem,4vw,3.25rem); border-bottom: 1px solid var(--border); }
.cat-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.025em; }
.cat-hero p { color: var(--ink-2); font-size: 1.1rem; max-width: 58ch; margin-top: .9rem; line-height: 1.55; }
.cat-hero .count { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); margin-top: 1rem; display: inline-block; }

.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding-block: 1.25rem; position: sticky; top: 68px; background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px); z-index: var(--z-sticky); border-bottom: 1px solid var(--border); }
.filter-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { padding: .45em .9em; border-radius: 100px; border: 1px solid var(--border-2); background: var(--bg);
  font-size: .85rem; font-weight: 500; color: var(--ink-2); transition: all .18s; }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.is-active { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.filter-search { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: .45em .75em; color: var(--ink-3); }
.filter-search input { border: 0; outline: 0; font: inherit; font-size: .9rem; color: var(--ink); background: transparent; width: 180px; }

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding-top: 2rem; }
.archive-grid .card.is-hidden { display: none; }
.no-results { text-align: center; padding: 4rem 1rem; color: var(--ink-3); grid-column: 1 / -1; }
.no-results h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: .5rem; }

.load-more { display: flex; justify-content: center; padding-top: 2.5rem; }

/* ============================================================================
   STATIC PAGES — about / how we test / disclosure
   ========================================================================== */
.page-hero { padding-block: clamp(2.25rem,4.5vw,3.75rem) clamp(1.75rem,3.5vw,2.75rem);
  border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); letter-spacing: -.025em; max-width: 18ch; margin-top: .8rem; }
.page-hero .dek { color: var(--ink-2); font-size: 1.15rem; line-height: 1.55; max-width: 58ch; margin-top: 1.1rem;
  font-family: var(--serif); }

/* A narrow editorial column for policy/standards copy */
.page-body { max-width: var(--read); margin-inline: auto; }
.page-body h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-top: 3rem; scroll-margin-top: 90px; }
.page-body h2:first-child { margin-top: 0; }
.page-body h3 { font-size: 1.18rem; margin-top: 1.9rem; }
.page-body p { margin-top: 1rem; color: #24272f; font-size: 1.08rem; line-height: 1.7; }
.page-body ul { margin-top: 1rem; padding-left: 1.25rem; display: grid; gap: .55rem; color: #24272f; line-height: 1.6; }
.page-body li::marker { color: var(--accent-ink); }
.page-body a:not(.btn):not(.need-chip) { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.page-body p.meta { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }

/* Numbered method steps */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; counter-reset: s; display: grid; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3.25rem 1fr; gap: 1.25rem;
  padding-block: 1.5rem; border-top: 1px solid var(--border); }
.steps li:last-child { border-bottom: 1px solid var(--border); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: 1.5rem;
  font-weight: 500; color: var(--accent); line-height: 1; padding-top: .2rem; }
.steps h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.6; }

/* Two-column promise / refusal grid */
.pledge { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 2rem; }
.pledge-col h3 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }
.pledge-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.pledge-col li { position: relative; padding-left: 1.75rem; font-size: 1rem;
  line-height: 1.55; color: var(--ink-2); }
.pledge-col li b { color: var(--ink); font-weight: 600; }
.pledge-col li::before { position: absolute; left: 0; top: 0; font-family: var(--mono);
  font-weight: 700; line-height: 1.55; }
.pledge-col--do li::before { content: "✓"; color: #2f7d4f; }
.pledge-col--dont li::before { content: "✕"; color: #b4472e; }

/* Amber note block */
.callout { margin-top: 2rem; padding: 1.15rem 1.35rem; background: var(--accent-soft);
  border-radius: var(--radius-lg); font-size: 1rem; line-height: 1.6; color: #3d2a08; }
.callout b { color: #2b1d05; }

/* Definition rows — used for "what our verdicts mean" */
.deflist { margin-top: 1.75rem; border-top: 1px solid var(--border); }
.deflist > div { display: grid; grid-template-columns: 190px 1fr; gap: 1.5rem; padding-block: 1.1rem;
  border-bottom: 1px solid var(--border); align-items: start; }
.deflist dt { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--ink); }
.deflist dd { margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.6; }

/* Contact / page-level jump nav */
.page-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.contact-card { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 2rem;
  padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.contact-card--single { grid-template-columns: 1fr; }
.contact-card h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: .35rem; }
.contact-card p { margin: 0; font-size: .95rem; color: var(--ink-2); line-height: 1.55; }
.contact-card a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0,1fr); }
  .article-layout > .prose { grid-column: 1; max-width: var(--read); margin-inline: auto; }
  .toc-rail { display: none; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .secondary-list { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .latest-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
  .newsletter .wrap { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--border); }
  .related-grid, .archive-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .pledge, .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav { height: 60px; }
  .secondary-list { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; gap: .85rem; }
  .story .duo { aspect-ratio: 16/9; }
  .verdict-cols { grid-template-columns: 1fr; }
  .related-grid, .archive-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .article-meta .disclosure { margin-left: 0; width: 100%; }
  .filters { top: 60px; }
  .filter-search input { width: 120px; }
  .steps li { grid-template-columns: 1fr; gap: .5rem; }
  .steps li::before { font-size: 1.2rem; padding-top: 0; }
  .deflist > div { grid-template-columns: 1fr; gap: .35rem; }
}

/* Mobile nav drawer */
.mobile-drawer { position: fixed; inset: 0; z-index: var(--z-overlay); display: none; }
.mobile-drawer.is-open { display: block; }
.mobile-drawer .scrim { position: absolute; inset: 0; background: rgba(16,17,23,.5); }
.mobile-drawer .panel { position: absolute; top: 0; right: 0; width: min(84vw, 340px); height: 100%;
  background: var(--bg); box-shadow: var(--shadow-2); padding: 1.25rem; display: grid; gap: .25rem; align-content: start;
  animation: slidein .3s var(--ease); }
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
.mobile-drawer .panel a { padding: .85rem .5rem; font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-drawer .panel .close { justify-self: end; margin-bottom: .5rem; }
@media (prefers-reduced-motion: reduce) { .mobile-drawer .panel { animation: none; } }

/* ============================================================================
   WORDPRESS COMPATIBILITY
   Additive only — nothing above this line was changed when the prototype was
   ported. This block covers markup WordPress emits that the static prototype
   never had: core blocks, captions, alignments, comments, pagination, and the
   inline colours baked into the existing post content.
   ========================================================================== */

/* Core alignment + caption classes (WP outputs these inside post content) */
.prose .alignleft { float: left; margin: .4rem 1.4rem 1rem 0; }
.prose .alignright { float: right; margin: .4rem 0 1rem 1.4rem; }
.prose .aligncenter { margin-inline: auto; }
.prose .alignwide { width: min(100vw - 2rem, 900px); margin-inline: auto; }
.prose .alignfull { width: 100%; }
.prose .wp-caption { max-width: 100%; }
.prose .wp-caption-text, .prose figcaption {
  font-family: var(--mono); font-size: .7rem; color: var(--ink-3);
  margin-top: .55rem; text-transform: uppercase; letter-spacing: .03em; }
.prose img { border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .6rem .75rem; text-align: left; }
.prose th { background: var(--surface); font-weight: 600; }
.prose pre { overflow-x: auto; background: var(--surface); padding: 1rem; border-radius: var(--radius); font-size: .9rem; }
.prose code { font-family: var(--mono); font-size: .9em; }
.prose blockquote:not(.pullquote) { margin: 2rem 0; padding-left: 1.2rem;
  border-left: 3px solid var(--border-2); color: var(--ink-2); }
.prose .wp-block-embed, .prose iframe { max-width: 100%; }
.prose .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

/* The existing published posts carry inline colours (color:#1a1a2e / #333333)
   from the previous theme's authoring. Neutralise them so the ink ramp above
   stays the single source of truth. Removing them from the database is the
   owner's call; this override changes nothing stored. */
.prose h1[style], .prose h2[style], .prose h3[style], .prose h4[style],
.prose p[style], .prose li[style], .prose strong[style], .prose em[style],
.page-body h2[style], .page-body h3[style], .page-body p[style], .page-body li[style] {
  color: inherit !important;
}
.prose h2[style], .prose h3[style], .prose h4[style] { color: var(--ink) !important; }
.prose a[style] { color: var(--accent-ink) !important; }

/* Rank Math owns breadcrumbs when its module is on; keep them in the
   prototype's crumb row rather than restyling the plugin. */
.crumbs .rank-math-breadcrumb, .crumbs .rank-math-breadcrumb p {
  margin: 0; display: flex; gap: .55rem; flex-wrap: wrap; font: inherit; color: inherit; }
.crumbs .separator { color: var(--border-2); }

/* Inline-styled links carried over from the prototype's trust strip */
.trust-item a, .needs + p a, .section > .wrap > p > a:not(.btn):not(.need-chip):not(.rlink) {
  color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

/* Pagination (the prototype had no paged archive) */
.pagination, .pagination .nav-links { display: flex; justify-content: center; gap: .4rem;
  flex-wrap: wrap; padding-top: 2.75rem; }
.pagination .nav-links { padding-top: 0; width: 100%; }
[data-pagination][hidden] { display: none; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px;
  padding-inline: .7em; border: 1px solid var(--border-2); border-radius: var(--radius);
  font-family: var(--mono); font-size: .82rem; color: var(--ink-2); transition: border-color .18s, color .18s; }
.pagination .page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.pagination .page-numbers.dots { border-color: transparent; }
.pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.card.is-appended { animation: none; }

/* Single post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 2.5rem;
  border-top: 1px solid var(--border); padding-top: 1.5rem; }
.post-nav a { display: block; }
.post-nav .meta { display: block; margin-bottom: .3rem; }
.post-nav strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.post-nav .next { text-align: right; }
@media (max-width: 680px) { .post-nav { grid-template-columns: 1fr; } }

/* Comments — off by default on this site, styled in case they are switched on */
.comments-area { max-width: var(--read); margin: 3rem auto 0; }
.comments-area h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.comment-body { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; font-size: .98rem; color: var(--ink-2); }

/* Empty states / 404 */
.empty-state { max-width: var(--read); margin-inline: auto; text-align: center;
  padding-block: clamp(3rem, 8vw, 6rem); }
.empty-state h1, .empty-state h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.empty-state p { color: var(--ink-2); font-size: 1.08rem; line-height: 1.65; margin-top: 1rem; }
.empty-state .searchform { margin-top: 1.75rem; }

/* Search form (searchform.php) */
.searchform { display: flex; gap: .5rem; }
.searchform input[type="search"] { flex: 1; min-width: 0; padding: .7em .9em;
  border: 1px solid var(--border-2); border-radius: var(--radius); font: inherit;
  font-size: .95rem; color: var(--ink); background: var(--bg); }

/* Custom logo, if one is uploaded, replaces the wordmark */
.brand img { max-height: 34px; width: auto; }
.footer-brand .brand img { max-height: 40px; }

/* Newsletter fallback (no mailing-list endpoint configured) */
.newsletter .subscribe-fallback { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* Verdict box, rendered only when a post actually carries a verdict */
.verdict-cols ul:empty { display: none; }
