/* =========================================================
   App Atlas — Editorial Redesign
   Drop-in replacement for /main.css
   Recommended <head> font link (replaces Source Sans / Source Serif):
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
   ========================================================= */

:root {
  /* Palette — warm paper + deep ink + terracotta accent */
  --paper:        #f5f1ea;
  --paper-2:      #ece6db;
  --surface:      #ffffff;
  --ink:          #1a1714;
  --ink-2:        #3b332c;
  --ink-soft:     #6b6258;
  --rule:         #e2dccf;
  --rule-strong:  #c9c0ad;
  --accent:       #c2410c;   /* burnt terracotta */
  --accent-2:     #8a2d09;
  --accent-soft:  #fbe7d8;
  --gold:         #b08538;

  --radius:       4px;
  --radius-lg:    10px;
  --shadow-sm:    0 1px 0 rgba(26,23,20,.04);
  --shadow:       0 1px 2px rgba(26,23,20,.06), 0 8px 24px -12px rgba(26,23,20,.12);

  --font-serif:   'Fraunces', 'Source Serif 4', Georgia, serif;
  --font-sans:    'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw:         1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background:
    radial-gradient(1200px 600px at 85% -10%, #fff 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #f8f3e8 0%, transparent 55%),
    var(--paper);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(3rem, 6vw, 5.25rem); font-weight: 500; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
p  { margin: 0 0 1em; }

/* ---------- Layout shell ---------- */
.site-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 28px 0;
}

main { display: block; padding-bottom: 96px; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
}
.brand-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--radius);
  letter-spacing: -0.02em;
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  display: block;
  line-height: 1.1;
}
.brand-tagline {
  margin: 4px 0 0;
  font-size: .82rem;
  color: var(--ink-soft);
  max-width: 380px;
  line-height: 1.4;
}
.header-actions { display: flex; align-items: center; gap: 28px; }
.main-nav { display: flex; gap: 22px; }
.main-nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
}
.header-cta {
  display: inline-flex; align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.header-cta:hover { background: var(--accent); color: #fff; }

/* ---------- Eyebrow / Section header ---------- */
.eyebrow, .section-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-header-block {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 88px 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.section-header-block h2 { max-width: 760px; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 24px 0 8px;
}
.hero-copy { max-width: 640px; }
.hero h1 { margin-bottom: 24px; }
.hero h1::after {
  content: "."; color: var(--accent);
}
.hero-text {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-trustbar {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.hero-trustbar span {
  font-size: .78rem;
  color: var(--ink-soft);
  padding: 6px 12px;
  background: var(--paper-2);
  border-radius: 999px;
}

/* Hero side panel */
.hero-panel { display: flex; flex-direction: column; gap: 18px; }
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.metric-grid > div {
  background: var(--surface);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.metric-grid span {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-grid small {
  font-size: .78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}
.metric-grid.solo { grid-template-columns: 1fr; }

/* Ad slot */
.ad-slot {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: rgba(255,255,255,.5);
}
.ad-slot p { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.ad-slot small { color: var(--ink-soft); font-size: .8rem; }
.ad-slot.tall { min-height: 280px; }

/* ---------- Buttons ---------- */
.button-primary, .button-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.button-primary {
  background: var(--ink);
  color: var(--paper);
}
.button-primary:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.button-secondary:hover { background: var(--ink); color: var(--paper); }
.button-primary.block, .button-secondary.block { width: 100%; }

/* ---------- Cards (grid) ---------- */
.card-grid {
  display: grid;
  gap: 20px;
}
.category-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.app-grid      { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--rule-strong);
}
.card h3 { margin: 0; font-size: 1.3rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.55; }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .85rem;
  color: var(--gold);
}
.meta-row {
  font-size: .78rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--rule);
  padding-top: 12px;
  font-style: italic;
}
.card-actions { margin-top: auto; padding-top: 6px; }

/* App card top */
.app-card-top { display: flex; align-items: center; gap: 14px; }
.logo-badge {
  width: 52px; height: 52px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  flex-shrink: 0;
}
.app-card-top h3 { font-size: 1.15rem; margin: 4px 0 0; }
.stat-strip {
  display: flex; gap: 14px;
  font-size: .82rem;
  color: var(--ink-soft);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.stat-strip span { display: inline-flex; align-items: center; }
.stat-strip span + span::before {
  content: "•"; margin-right: 14px; color: var(--rule-strong);
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 5px 10px;
  border-radius: 999px;
  margin: 0;
}

/* ---------- Text link ---------- */
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent);
  position: relative;
}
.text-link::after {
  content: "→"; transition: transform .15s ease;
}
.text-link:hover::after { transform: translateX(3px); }

/* ---------- Editorial list (blog) ---------- */
.editorial-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.editorial-card {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  transition: background .15s ease;
}
.editorial-card:hover { background: rgba(255,255,255,.6); }
.editorial-card .chip { align-self: start; }
.editorial-card h2,
.editorial-card h3 {
  font-family: "Fraunces", "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0;
  max-width: 720px;
  letter-spacing: -0.01em;
}
.editorial-card h2 a,
.editorial-card h3 a { color: var(--ink); text-decoration: none; }
.editorial-card h2 a:hover,
.editorial-card h3 a:hover { color: var(--accent); }
.editorial-card p {
  grid-column: 2;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: .95rem;
  max-width: 720px;
}
.editorial-card .card-actions {
  grid-column: 3; grid-row: 1 / span 2;
  align-self: center;
}

/* ---------- Detail pages (app / blog single) ---------- */
.page-hero {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}
.page-hero.compact { padding: 24px 0 20px; }
.page-hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 14px; }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
}
.detail-main { min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 24px; }

.detail-hero {
  display: flex; gap: 22px; align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}
.detail-hero .logo-badge { width: 88px; height: 88px; border-radius: 16px; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: .85rem;
  color: var(--ink-soft);
  margin-top: 12px;
}
.detail-screenshot {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  overflow: hidden;
  margin: 24px 0 36px;
  background: var(--paper-2);
}

.detail-panel,
.side-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.side-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.side-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.side-link:hover { background: var(--paper); border-color: var(--rule); color: var(--ink); }

/* ---------- Content (prose) ---------- */
.content-section { margin: 36px 0; }
.prose { font-size: 1.04rem; line-height: 1.75; color: var(--ink-2); max-width: 70ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.85rem; }
.prose h3 { margin-top: 1.4em; font-size: 1.3rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.4em 0;
  padding: .2em 0 .2em 1.2em;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--paper-2); padding: 2px 6px; border-radius: 4px; font-size: .92em;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }

/* Verdict box (blog) */
.verdict-box {
  margin: 36px 0;
  padding: 28px 28px 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.verdict-box h2, .verdict-box h3 { color: #fff; margin-top: 0; }
.verdict-box p { color: rgba(245,241,234,.85); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px;
  padding: 40px 0 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 420px; }
.footer-brand strong {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  display: block;
  margin-bottom: 8px;
}
.footer-brand p { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.footer-links { display: flex; gap: 22px; align-items: center; }
.footer-links a {
  color: var(--ink-2);
  font-size: .9rem;
  font-weight: 500;
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 18px; }
  .header-actions { width: 100%; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .section-header-block { flex-direction: column; align-items: flex-start; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .editorial-card { grid-template-columns: 1fr; gap: 10px; }
  .editorial-card p, .editorial-card .card-actions { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .site-shell { padding: 20px 18px 0; }
  .main-nav { gap: 14px; flex-wrap: wrap; }
  .brand-tagline { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .section-header-block { margin-top: 64px; }
  .detail-hero { flex-direction: column; }
}

/* ---------- Search form (page hero) ---------- */
.search-form {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  max-width: 680px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 1px 0 rgba(20, 14, 10, 0.04), 0 18px 40px -28px rgba(56, 28, 14, 0.35);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.search-form input[type="search"] {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: 500 1rem/1.4 "Inter", system-ui, sans-serif;
  color: var(--ink);
  padding: 12px 4px;
  letter-spacing: -0.005em;
}
.search-form input[type="search"]::placeholder {
  color: color-mix(in oklab, var(--ink) 45%, transparent);
}
.search-form button[type="submit"] {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.92rem/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: 999px;
  transition: background 180ms ease, transform 180ms ease;
}
.search-form button[type="submit"]:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.search-form.public-search { margin-top: 26px; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 56px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: 600 0.9rem/1 "Inter", system-ui, sans-serif;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.pagination a.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.pagination a.current:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

@media (max-width: 820px) {
  .search-form { flex-wrap: wrap; padding: 10px; border-radius: 22px; }
  .search-form input[type="search"] { padding: 10px 12px; width: 100%; }
  .search-form button[type="submit"] { width: 100%; }
}

/* =========================================================
   LAYOUT v2 — Site-wide structural redesign
   Turns the horizontal header into a sticky left sidebar,
   widens the content rail, restructures the home grid into
   an asymmetric magazine layout, and reworks the blog list,
   footer, and hero composition. CSS-only — no HTML changes.
   ========================================================= */

:root {
  --nav-w: 248px;
  --gutter: 56px;
  --maxw: 1320px;
}

/* Body becomes a full-bleed canvas; the shell anchors the grid */
body {
  background:
    radial-gradient(1400px 700px at 100% -5%, #fff 0%, transparent 55%),
    radial-gradient(900px 600px at -5% 0%, #f8f3e8 0%, transparent 50%),
    var(--paper);
}

/* ----- Site shell as 2-column grid (sidebar + main) ----- */
.site-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  grid-template-areas:
    "nav main"
    "nav footer";
  column-gap: var(--gutter);
  align-items: start;
}

/* ----- Header → sticky vertical sidebar ----- */
.site-header {
  grid-area: nav;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 36px 0 28px;
  margin: 0;
  border-bottom: 0;
  border-right: 1px solid var(--rule);
  padding-right: 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 36px;
}
.brand-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.brand-mark {
  width: 56px; height: 56px;
  font-size: 22px;
}
.brand-name { font-size: 1.5rem; }
.brand-tagline {
  margin-top: 10px;
  font-size: .82rem;
  max-width: none;
}
.header-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  margin-top: auto;
  width: 100%;
}
.main-nav {
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}
.main-nav a {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 8px 0;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a.active { color: var(--accent); }
.main-nav a.active::after { display: none; }
.main-nav a.active::before {
  content: "→ ";
  color: var(--accent);
  margin-right: 4px;
}
.header-cta {
  align-self: stretch;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ----- Main column ----- */
main {
  grid-area: main;
  padding: 56px 0 64px;
}

/* ----- HERO: oversized display + offset metric panel ----- */
.hero {
  grid-template-columns: 1.7fr 1fr;
  gap: 64px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: .95;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin-bottom: 28px;
}
.hero-text { font-size: 1.25rem; max-width: 600px; }
.eyebrow, .section-label {
  font-size: .68rem;
  letter-spacing: .26em;
  margin-bottom: 18px;
}
.hero-panel { position: relative; padding-top: 12px; }
.metric-grid {
  border-radius: 0;
  border: 0;
  border-top: 2px solid var(--ink);
  background: transparent;
  gap: 0;
  box-shadow: none;
}
.metric-grid > div {
  background: transparent;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding-right: 18px;
}
.metric-grid > div:nth-child(2n) { border-right: 0; padding-right: 0; padding-left: 18px; }
.metric-grid span { font-size: 2.8rem; }
.ad-slot { border-radius: 0; border-style: solid; border-color: var(--rule); background: transparent; }

/* ----- Section header: stacked with rule + counter ----- */
.section-header-block {
  margin: 96px 0 32px;
  padding-bottom: 0;
  border-bottom: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  position: relative;
}
.section-header-block::before {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 6px;
}
.section-header-block h2 {
  max-width: 880px;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.08;
}

/* ----- HOMEPAGE category grid → magazine bento ----- */
.card-grid.category-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  counter-reset: cat;
}
.category-grid .card {
  border: 0;
  border-radius: 0;
  background: var(--surface);
  padding: 28px 26px 24px;
  grid-column: span 2;
  counter-increment: cat;
  position: relative;
}
.category-grid .card:hover { transform: none; box-shadow: inset 0 0 0 2px var(--accent); border-color: transparent; }
.category-grid .card::before {
  content: counter(cat, decimal-leading-zero);
  position: absolute;
  top: 16px; right: 18px;
  font-family: var(--font-serif);
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
}
/* Featured first card */
.category-grid .card:first-child {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  padding: 44px 40px 40px;
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--surface) 100%);
}
.category-grid .card:first-child h3 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  grid-column: 1;
  grid-row: 2;
}
.category-grid .card:first-child .card-head { grid-column: 1; grid-row: 1; align-items: center; }
.category-grid .card:first-child p {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  font-size: 1.05rem;
  max-width: 420px;
}
.category-grid .card:first-child .meta-row,
.category-grid .card:first-child .card-actions {
  grid-column: 1; border: 0; padding-top: 0; margin-top: 14px;
}
/* (Standard cards span 2 each → 3 per row of 6 cols, balancing nicely
    against the full-width featured first card.) */

/* ----- App grid: tighter & numbered ----- */
.card-grid.app-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.app-grid .card {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 28px 26px;
  background: transparent;
}
.app-grid .card:hover { background: rgba(255,255,255,.55); transform: none; box-shadow: none; }

/* ----- BLOG editorial list: feature first, two-column rest ----- */
.editorial-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 2px solid var(--ink);
  margin-top: 24px;
}
.editorial-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 32px 28px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  grid-template-columns: none;
}
.editorial-card:nth-child(2n) { padding-right: 0; padding-left: 32px; border-right: 0; }
.editorial-card h2,
.editorial-card h3 { font-size: 1.6rem; max-width: none; }
.editorial-card p { grid-column: auto; max-width: none; margin: 0; }
.editorial-card .card-actions { grid-column: auto; grid-row: auto; margin-top: auto; padding-top: 8px; }

/* Featured first article — full row, oversized */
.editorial-list > .editorial-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  padding: 44px 0 40px;
  border-right: 0;
  background:
    linear-gradient(90deg, var(--paper-2) 0%, transparent 60%);
  padding-left: 32px;
  padding-right: 32px;
  margin-bottom: 0;
}
.editorial-list > .editorial-card:first-child .chip { grid-column: 1; }
.editorial-list > .editorial-card:first-child h2 {
  grid-column: 1;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.editorial-list > .editorial-card:first-child p {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  font-size: 1.1rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-2);
  max-width: 460px;
}
.editorial-list > .editorial-card:first-child .card-actions { grid-column: 1; }

/* ----- Page hero: full-bleed within main ----- */
.page-hero, .page-hero.compact {
  padding: 8px 0 36px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

/* ----- Detail layout: shift sidebar left, content gets wider rail ----- */
.detail-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 64px;
}
.detail-side {
  order: -1;
  position: sticky;
  top: 36px;
}
.side-card, .detail-panel { border-radius: 0; border-left: 3px solid var(--accent); border-right: 0; border-top: 0; border-bottom: 1px solid var(--rule); padding: 18px 0 22px 18px; background: transparent; }

/* ----- Footer: spans only the main column, big serif marquee ----- */
.site-footer {
  grid-area: footer;
  margin-top: 80px;
  padding: 48px 0 40px;
  border-top: 2px solid var(--ink);
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
}
.footer-brand { max-width: none; }
.footer-brand strong {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}
.footer-brand p { max-width: 520px; font-size: 1rem; }
.footer-links {
  border-top: 1px solid var(--rule);
  padding-top: 22px;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--font-sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 600;
}

/* ----- Search form: full-width banded ----- */
.search-form, .search-form.public-search {
  max-width: none;
  margin-top: 28px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 18px;
  background: transparent;
  box-shadow: none;
}
.search-form input[type="search"] {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  padding: 18px 4px;
  letter-spacing: -0.02em;
}
.search-form button[type="submit"] {
  border-radius: 0;
  padding: 14px 26px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
}

/* ----- Responsive: collapse sidebar on tablet/mobile ----- */
@media (max-width: 1100px) {
  .site-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "nav" "main" "footer";
    column-gap: 0;
    padding: 0 28px;
  }
  .site-header {
    position: static;
    height: auto;
    border-right: 0;
    padding: 22px 0 24px;
    padding-right: 0;
    border-bottom: 1px solid var(--rule);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
  }
  .brand-row { flex-direction: row; align-items: center; flex: 1 1 320px; }
  .brand-tagline { display: none; }
  .header-actions { flex-direction: row; align-items: center; gap: 18px; margin-top: 0; width: auto; flex-wrap: wrap; }
  .main-nav { flex-direction: row; border-top: 0; padding-top: 0; gap: 18px; }
  .main-nav a { font-size: .95rem; }
  .header-cta { padding: 10px 18px; }
  main { padding: 32px 0 48px; }
  .category-grid .card:first-child { grid-template-columns: 1fr; }
  .category-grid .card:first-child p { grid-column: 1; grid-row: auto; }
  .editorial-list > .editorial-card:first-child { grid-template-columns: 1fr; padding: 28px 20px; }
  .editorial-list > .editorial-card:first-child p { grid-column: 1; grid-row: auto; }
  .detail-layout { grid-template-columns: 1fr; gap: 32px; }
  .detail-side { position: static; order: 1; }
}
@media (max-width: 720px) {
  .card-grid.category-grid { grid-template-columns: 1fr; }
  .category-grid .card,
  .category-grid .card:first-child { grid-column: span 1; }
  .editorial-list { grid-template-columns: 1fr; }
  .editorial-card,
  .editorial-card:nth-child(2n) { padding: 24px 0; border-right: 0; }
  .search-form input[type="search"] { font-size: 1.2rem; }
}

.editorial-byline,
.footer-credit {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-2);
  margin-top: 14px;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}

.guide-side {
  position: sticky;
  top: 36px;
}

.guide-picks {
  margin-top: 20px;
}

.readiness-panel {
  margin-bottom: 22px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.readiness-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.readiness-header h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.readiness-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-2);
}

.readiness-list li + li {
  margin-top: 6px;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--rule);
  background: rgba(255,255,255,.55);
}

.notice strong {
  display: block;
  margin-bottom: 8px;
}

.notice-good {
  border-left-color: #1f7a52;
}

.notice-warn {
  border-left-color: var(--accent);
}

.notice-bad {
  border-left-color: #9b2c2c;
}

@media (max-width: 1100px) {
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .guide-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .readiness-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
