/* ==========================================================================
   Software Service BD — design system
   Tokens are derived from the original design-canvas artboards, kept outside
   the theme in ../_theme-dev/design-source so they are not shipped. Dark mode
   is driven by [data-theme] on <html>, set before first paint by the inline
   script in header.php (no flash of light theme).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Tells the UA which palette to paint the bits we do not style ourselves:
     scrollbars, the search field's clear button, select popups, autofill,
     date pickers. Without it those stay light on a dark page. */
  color-scheme: light;

  --bg: #ffffff;
  --surface: #ffffff;
  --hero: #f3f6fa;
  --hero2: #eff8f1;
  --ink: #0f1b2d;
  --ink2: #333a44;
  --muted: #5c6675;
  --line: #e1e5ea;
  --accent: #1e8156;
  /* Text-safe accent, split from the fill green because one value cannot do
     both jobs: white-on-fill needs --accent dark, page-text needs contrast
     against the ground. #1e8156 as text is only 4.27:1 on --accent-soft, so
     this is a shade darker — 4.99 there, 5.67 on white. Fills and borders
     stay on --accent in both themes. */
  --accent-text: #1b7550;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4ea;
  --shadow-sm: 0 8px 20px -12px rgba(15, 27, 45, .3);
  --shadow-md: 0 20px 44px -20px rgba(15, 27, 45, .5);

  --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1240px;
  --wrap-narrow: 760px;
  --gutter: 40px;
  --radius: 16px;
  --radius-lg: 22px;
  --pill: 999px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  /* #1e8156 as text on the dark ground is only 3.86:1 — under AA. This is the
     same green, lightened until it clears 4.5:1 on every dark bed we use it
     on (page 7.9, surface 7.4, accent-soft 6.3). */
  --accent-text: #2fbf82;

  --bg: #0a1220;
  --surface: #101a2c;
  --hero: #0d1728;
  --hero2: #101a2c;
  --ink: #edeff3;
  --ink2: #d5dae2;
  --muted: #93a0ae;
  --line: #22303f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(30, 129, 86, .16);
  --shadow-sm: 0 8px 20px -12px rgba(0, 0, 0, .6);
  --shadow-md: 0 20px 44px -20px rgba(0, 0, 0, .75);
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Any rule that sets `display` beats the UA's `[hidden] { display: none }`,
   and this stylesheet sets display on buttons, toolbars and — on mobile —
   table rows. Without this, everything the table hides stays on screen. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  transition: background .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
a:hover { color: var(--accent-text); }
img, svg, video { max-width: 100%; height: auto; }
::selection { background: var(--accent); color: #fff; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.12; margin: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 20px; background: var(--accent); color: #fff; font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding: 88px var(--gutter); }
.section--tight { padding: 56px var(--gutter); }
.section--hero { background: var(--hero); border-bottom: 1px solid var(--line); }
.section--soft { background: var(--hero2); }
/* In dark mode the soft band and the surface tone are the same navy, so
   panels sitting on that band drop to the page background instead — they
   still read as panels, just inverted. */
:root[data-theme="dark"] .section--soft :is(.card--raised, .faq-item, .process-step, .journey-node, .stat) { background: var(--bg); }
.section--surface { background: var(--surface); }
.section--bordered { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

@media (max-width: 900px) { .section { padding: 60px var(--gutter); } }

.stack { display: flex; flex-direction: column; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.section-head { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 700; }
.section-head p { margin: 16px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow--muted { color: var(--muted); }
.eyebrow--chip {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--surface); color: var(--muted);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Buttons ---------- */
.btn {
  /* Flex, not grid: a button whose label is followed by an arrow span has two
     children, and a single-column grid stacks them onto two lines. */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px;
  border-radius: var(--pill); border: 1px solid transparent;
  /* A <button> with no background falls back to the UA's `buttonface` — a
     white pill. In dark mode the label is var(--ink), which is near-white too,
     so the text vanishes. Every modifier below repaints this; the base must
     still be explicit for the ones that only set a border and a colour. */
  background: transparent; color: inherit;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--ink); color: var(--bg); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
/* Border and tint carry the hover, not the label: accent green on the dark
   page is only ~3.3:1, so the text stays at --ink. Same deal as .filter-tab. */
.btn--ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.btn--sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

.link-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--accent-text);
}
.link-cta .arrow { display: inline-block; transition: transform .2s ease; }
.link-cta:hover .arrow { transform: translateX(3px); }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-block; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--pill);
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block; padding: 5px 10px; border-radius: var(--pill);
  font-size: 10.5px; font-weight: 600;
}
.badge--accent { background: var(--accent); color: #fff; }
.badge--light { background: rgba(255, 255, 255, .92); color: #0f1b2d; }

/* ---------- Cards ---------- */
.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--accent); }
a.card:hover { color: inherit; }
.card--raised { background: var(--surface); box-shadow: var(--shadow-sm); }
.card h3 { font-size: 17px; font-weight: 700; }
.card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.card-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-text);
}

.num {
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .1em; color: var(--accent-text);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand-name .accent { color: var(--accent-text); }

.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 6px 0; font-size: 14px; font-weight: 500; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a { border-bottom-color: var(--accent); color: var(--accent-text); }
.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* ---------- Dropdowns ----------
   Opened by hover and by :focus-within, so a keyboard reaches every item
   without any JavaScript. On touch, where neither exists, the whole menu
   becomes the mobile panel below and the submenus are simply expanded. */
.site-nav li { position: relative; }
.site-nav .menu-item-has-children > a::after {
  content: "▾"; display: inline-block; margin-left: 6px;
  font-size: 10px; opacity: .6; transition: transform .2s ease;
}
.site-nav li:hover > a::after, .site-nav li:focus-within > a::after { transform: rotate(-180deg); }

.site-nav .sub-menu {
  position: absolute; top: 100%; left: -14px; z-index: 60;
  display: block; flex-direction: column; align-items: stretch;
  min-width: 232px; margin: 0; padding: 8px;
  gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav .sub-menu a {
  padding: 9px 12px; border-bottom: 0; border-radius: 9px;
  font-weight: 500; white-space: nowrap;
}
.site-nav .sub-menu a:hover, .site-nav .sub-menu .current-menu-item > a {
  background: var(--accent-soft); color: var(--accent-text);
}
/* A third level — Web Development > Laravel — opens beside its parent. */
.site-nav .sub-menu .sub-menu { top: -9px; left: 100%; margin-left: 4px; }
.site-nav .sub-menu .menu-item-has-children > a::after { content: "›"; float: right; margin-left: 12px; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line);
  border-radius: var(--pill); background: transparent; color: inherit; cursor: pointer;
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; inset: 100% 0 auto; display: none;
    padding: 16px var(--gutter) 24px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav a { padding: 10px 0; font-size: 15px; }
  .header-actions .btn--contact { display: none; }

  /* No hover on touch: the submenus are always open, indented under their
     parent, so every service is one tap away. */
  .site-nav .sub-menu, .site-nav .sub-menu .sub-menu {
    position: static; min-width: 0; margin: 0 0 4px 14px; padding: 0 0 0 12px;
    border: 0; border-left: 1px solid var(--line); border-radius: 0;
    box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none;
  }
  .site-nav .sub-menu a { padding: 8px 0; font-size: 14px; white-space: normal; }
  .site-nav .sub-menu a:hover { background: transparent; }
  .site-nav .menu-item-has-children > a::after { display: none; }
}

/* ---------- Theme toggle (React island) ---------- */
.theme-toggle {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: transparent; color: inherit;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .icon { font-size: 14px; line-height: 1; }
@media (max-width: 480px) { .theme-toggle .label { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px var(--gutter) 64px; }
.hero::before {
  content: ""; position: absolute; top: -140px; right: -120px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 129, 86, .16), transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 56px; align-items: center;
  max-width: var(--wrap); margin-inline: auto;
}
.hero-copy { animation: ssbdRise .7s ease both; }
.hero h1 { margin: 22px 0 0; font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; line-height: 1.06; }
.hero-lede { margin: 20px 0 0; max-width: 54ch; font-size: 17px; line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { margin: 22px 0 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.page-hero { padding: 72px var(--gutter) 56px; }
.page-hero-eyebrow { margin-top: 18px; }
.page-hero h1 { margin: 14px 0 0; font-size: clamp(30px, 3.9vw, 46px); font-weight: 800; }
.page-hero .lede { margin: 18px 0 0; }

/* Orbit graphic */
.orbit { position: relative; display: grid; place-items: center; min-height: 420px; }
.orbit-ring { position: absolute; width: 280px; height: 280px; border-radius: 50%; border: 1px dashed var(--line); }
.orbit-core {
  display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%;
  background: var(--ink); color: var(--bg); z-index: 2;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  letter-spacing: -.02em; text-align: center; box-shadow: var(--shadow-md);
}
.orbit-node {
  position: absolute; display: grid; place-items: center;
  width: 96px; height: 96px; padding: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center;
  z-index: 1; box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .orbit { min-height: 340px; transform: scale(.86); }
}
@media (max-width: 420px) {
  .orbit { min-height: 300px; transform: scale(.72); }
}

/* ---------- Capability strip ---------- */
.capability-strip { padding: 26px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); }
.capability-strip ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 44px;
  max-width: var(--wrap); margin-inline: auto; padding: 0; list-style: none;
}
.capability-strip li { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- Filter tabs (React island) ---------- */
.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.filter-tabs--left { justify-content: flex-start; }
.filter-tab {
  height: 40px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: transparent; color: inherit;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
}
.filter-tab:hover { background: var(--accent-soft); border-color: var(--accent); }
.filter-tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.stat { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.03em; color: var(--accent-text); }
.stat-label { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* ---------- Project cards ---------- */
.project-card { overflow: hidden; padding: 0; }
.project-thumb {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 16 / 10; background: var(--hero);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb .badge { position: absolute; top: 12px; }
.project-thumb .badge--light { left: 12px; }
.project-thumb .badge--accent { right: 12px; }
.project-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; }

/* ---------- Numbered process ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.process-step { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.process-step h3 { margin: 10px 0 6px; font-size: 16px; font-weight: 700; }
.process-step p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.journey { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.journey-node {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--surface); font-size: 14px; font-weight: 600;
}
.journey-node .n {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; font-family: var(--font-mono);
}
.journey-sep { color: var(--muted); }

/* ---------- Service list rows ---------- */
.service-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 20px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-row h3 { font-size: 20px; font-weight: 700; }
.service-row p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 720px) {
  .service-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- FAQ (React island, <details> fallback) ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 18px 22px; margin: 0;
  border: 0; background: transparent; color: inherit;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; text-align: left;
  letter-spacing: -.02em; cursor: pointer; list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .plus { flex: none; color: var(--accent-text); font-size: 20px; line-height: 1; transition: transform .25s ease; }
.faq-item[open] .faq-q .plus, .faq-q[aria-expanded="true"] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 22px 20px; margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--muted); }

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14px; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table thead th { background: var(--hero); font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td:first-child { font-weight: 600; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 14.5px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field .error { font-size: 12.5px; color: #c0392b; }
.form-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.form-status { padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.form-status--ok { background: var(--accent-soft); color: var(--accent-text); }
.form-status--err { background: rgba(192, 57, 43, .1); color: #c0392b; }

.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-info-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.contact-info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-info-row .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-info-row .value { font-size: 15px; font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px; padding: 40px; border-radius: var(--radius-lg);
  background: var(--ink); color: var(--bg);
}
.cta-band h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; }
.cta-band p { margin: 10px 0 0; font-size: 15px; opacity: .78; max-width: 520px; }
.cta-band .btn--primary { background: var(--accent); color: #fff; }
.cta-band .btn--primary:hover { background: var(--bg); color: var(--ink); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Editorial / post content ---------- */
.entry-content { font-size: 16px; line-height: 1.75; color: var(--ink2); }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 { margin-top: 1.8em; font-size: 24px; }
.entry-content h3 { margin-top: 1.5em; font-size: 19px; }
.entry-content a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote {
  margin-inline: 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
.entry-content pre {
  padding: 18px; overflow-x: auto; border-radius: 12px;
  background: var(--hero); font-family: var(--font-mono); font-size: 13.5px;
}
.entry-content code { font-family: var(--font-mono); font-size: .92em; }
.entry-content img { border-radius: var(--radius); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--line); }

.entry-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* Category · Date · Reading time — the dot is drawn rather than written so
   the meta items stay independent elements for screen readers. */
.entry-meta > * + *::before { content: "·"; margin-inline-end: 10px; opacity: .5; }
.entry-meta-cat { color: var(--accent-text); font-weight: 700; }
.entry-meta-cat:hover { text-decoration: underline; }

/* The whole post card is one click target: the title's link is stretched over
   the card, so the excerpt and the "Read article" line are clickable too —
   they are plain text, not links, so there is still only one tab stop. The
   category needs its own destination, so it is lifted back on top. */
.post-card { position: relative; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card .entry-meta-cat, .post-card .post-card-thumb { position: relative; z-index: 1; }
.post-card:hover .link-cta .arrow { transform: translateX(3px); }
.post-card:focus-within { border-color: var(--accent); }

/* ---------- Service pages ---------- */
.card-children { margin: 0; font-size: 13px; color: var(--muted); }
.card-children a { color: var(--ink2); border-bottom: 1px solid var(--line); }
.card-children a:hover { color: var(--accent-text); border-bottom-color: var(--accent); }

.service-items {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 24px; margin: 22px 0 0; padding: 0; list-style: none;
}
.service-items li { position: relative; padding-left: 26px; font-size: 14.5px; }
.service-items li::before {
  content: "\2713"; position: absolute; left: 0; top: -1px;
  color: var(--accent-text); font-weight: 700;
}

/* ---------- Comparisons hub ---------- */

/* The table's toolbar. Hidden in the markup and revealed by
   comparison-table.js, so a control that cannot work is never shown. */
.ctable { margin-top: 4px; }
.ctable-toolbar {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 22px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 0; background: var(--bg);
}
.ctable-search input {
  width: 100%; height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 15px;
}
.ctable-search input:focus { border-color: var(--accent); outline: none; }
.ctable-search input::placeholder { color: var(--muted); }

.facet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.facet-label {
  min-width: 86px; font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.facet-row .filter-tab { height: 34px; padding: 0 14px; font-size: 13px; }

.ctable-status {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 4px; border-top: 1px solid var(--line);
}
.facet-count { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.facet-count [data-facet-count] { font-weight: 700; color: var(--ink); }
.ctable-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* The table itself. Sortable headers are real buttons — a click target that
   is not a button is invisible to the keyboard. */
.ctable .table-scroll { border-radius: 0 0 var(--radius) var(--radius); }
.ctable-table { min-width: 720px; }
.ctable-table thead th { padding: 0; background: var(--hero); }
.ctable-table thead th button {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 15px 18px; border: 0; background: none; color: inherit;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 700;
  text-align: left; cursor: pointer;
}
.ctable-table thead th:last-child { padding: 15px 18px; font-family: var(--font-display); font-size: 13.5px; }
.ctable-table thead th button:hover { color: var(--accent-text); }
.ctable-table thead th button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.sort-arrow::after { content: "↕"; font-size: 11px; opacity: .4; }
[aria-sort="ascending"] .sort-arrow::after { content: "↑"; opacity: 1; color: var(--accent-text); }
[aria-sort="descending"] .sort-arrow::after { content: "↓"; opacity: 1; color: var(--accent-text); }

.ctable-table tbody tr { transition: background .15s ease; }
.ctable-table tbody tr:hover { background: var(--hero); }
.ctable-table th[scope="row"] { font-weight: 600; }
.ctable-table th[scope="row"] a { border-bottom: 1px solid transparent; }
.ctable-table th[scope="row"] a:hover { color: var(--accent-text); border-bottom-color: var(--accent); }
.ctable-table th[scope="row"] em {
  display: block; margin-top: 3px; font-style: normal;
  font-size: 12.5px; font-weight: 400; color: var(--muted);
}
.ctable-table .pill { font-size: 10.5px; }
.matchup-planned {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

.ctable-empty {
  margin: 0; padding: 26px 18px; text-align: center;
  font-size: 14px; color: var(--muted);
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.ctable-pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 20px;
}
.ctable-pageinfo { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* Under 760px the table restacks: each row becomes a labelled block, using
   the data-label already on every cell. No second copy of the markup. */
@media (max-width: 760px) {
  .ctable .table-scroll { overflow: visible; border: 0; }
  .ctable-table { min-width: 0; }
  .ctable-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ctable-table tr {
    display: block; margin-bottom: 12px; padding: 16px 18px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  }
  .ctable-table th, .ctable-table td { display: flex; gap: 14px; padding: 5px 0; border: 0; }
  .ctable-table th[scope="row"] { flex-direction: column; gap: 2px; padding-bottom: 10px; }
  .ctable-table td::before {
    content: attr(data-label); flex: none; min-width: 96px;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted);
  }
  .ctable-table th[scope="row"]::before { content: none; }
  .ctable-toolbar { border-radius: var(--radius); border-bottom: 1px solid var(--line); }
  .facet-label { min-width: 0; width: 100%; }
  /* Two buttons side by side overflow a 380px screen; give them a row. */
  .ctable-status { flex-direction: column; align-items: stretch; }
  .ctable-actions { width: 100%; }
  .ctable-actions .btn { flex: 1; }
}

/* Per-pillar index and cards. */
.matchup-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.matchup-list li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 24px; padding: 15px 2px; border-bottom: 1px solid var(--line);
}
.matchup-list a, .matchup-list span { font-size: 15px; font-weight: 600; }
.matchup-list a:hover { color: var(--accent-text); }
.matchup-list span { color: var(--muted); }
.matchup-list em { font-style: normal; font-size: 13px; color: var(--muted); }

.pillar-picks-heading {
  margin: 40px 0 18px; font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* The nudge from one pillar to the next. */
.cross-sell {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px 32px; margin-top: 40px; padding: 24px 28px;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent-soft);
}
.cross-sell-eyebrow {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text);
}
.cross-sell h3 { margin: 6px 0 0; font-size: 18px; font-weight: 700; }
.cross-sell p { margin: 6px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.cross-sell .btn { flex: none; border-color: var(--accent); color: var(--accent-text); }
.cross-sell .btn:hover { background: var(--accent); color: #fff; }

.section-note { margin: 26px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }

/* Feedback. */
.feedback {
  padding: 30px 32px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface);
}
.feedback h2 { font-size: 20px; font-weight: 700; }
.feedback-lede { margin: 8px 0 18px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.feedback-form textarea { min-height: 0; }

/* ---------- Shared service page ----------
   The phone frame is the page's one piece of art direction. It holds a real
   screenshot when the service has one and a drawn screen when it does not,
   so the same CSS carries the page before and after there is work to show. */
.svc-hero { padding: 76px var(--gutter) 0; background: var(--hero); border-bottom: 1px solid var(--line); overflow: hidden; }
.svc-hero-inner { display: grid; grid-template-columns: 1.02fr .98fr; align-items: end; gap: 48px; }
.svc-hero-copy { padding-bottom: 84px; }
.svc-hero-copy h1 { margin: 14px 0 0; font-size: clamp(32px, 4.3vw, 52px); font-weight: 800; line-height: 1.06; letter-spacing: -.025em; }
.svc-hero-copy .lede { margin: 20px 0 0; max-width: 52ch; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.svc-hero-copy .hero-actions { margin-top: 30px; }
.svc-hero-copy .hero-meta { margin-top: 26px; }

.svc-hero-visual {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  gap: 18px; padding-bottom: 0; min-height: 430px;
}

.phone {
  position: relative; width: 214px; flex: none; padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 30px;
  box-shadow: var(--shadow-md);
}
.phone-notch {
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 5px; border-radius: 999px; background: var(--line); z-index: 2;
}
.phone-screen {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 18.5; border-radius: 23px;
  background: var(--bg); border: 1px solid var(--line);
}
.phone-shot { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.phone.frame--lead { width: 240px; z-index: 3; margin-bottom: 34px; }
.phone.frame--aside { z-index: 2; margin-bottom: 8px; opacity: .97; }
.phone.frame--left { transform: rotate(-3deg); }
.phone.frame--right { transform: rotate(3deg); }
.phone.frame--sm { width: 190px; box-shadow: var(--shadow-sm); }

/* The drawn screen. Everything inside is a token, so it inverts with the
   theme instead of being a light-mode picture pasted into a dark page. */
.screen { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px 13px 14px; }
.screen-top { display: flex; align-items: center; justify-content: space-between; }
.screen-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.screen-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); }
.screen-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.screen-pill {
  padding: 3px 8px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-text); font-size: 8.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.screen-kpi strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.screen-kpi span { font-size: 9.5px; color: var(--muted); }
.screen-chart { display: flex; align-items: flex-end; gap: 5px; height: 66px; }
.screen-chart span { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--accent-soft); }
.screen-chart span:last-child { background: var(--accent); }
.screen-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.screen-tiles span { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--hero); }

.screen-list { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.screen-list li { display: flex; align-items: center; gap: 8px; }
.screen-thumb { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); flex: none; }
.screen-lines { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.screen-lines i { display: block; height: 5px; border-radius: 999px; background: var(--line); }
.screen-lines i.is-short { width: 58%; }
.screen-tag {
  padding: 2px 6px; border-radius: 999px; flex: none;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.screen-tag.is-muted { background: var(--hero); color: var(--muted); }
.screen-cta {
  margin-top: auto; padding: 9px; border-radius: 10px; text-align: center;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
}

.screen-chat { display: flex; flex-direction: column; gap: 7px; }
.screen-chat .bubble {
  max-width: 86%; padding: 7px 10px; border-radius: 12px 12px 12px 4px;
  background: var(--hero); font-size: 9.5px; line-height: 1.4; color: var(--ink2);
}
.screen-chat .bubble--ai { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: var(--accent-soft); color: var(--accent-text); }
.screen-chat .bubble--typing { display: flex; gap: 4px; width: 40px; }
.screen-chat .bubble--typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; }
.screen-input {
  margin-top: auto; padding: 8px 11px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 9.5px; color: var(--muted);
}

/* Browser frame: the web counterpart of the phone. One in the hero, a rail of
   them in the showcase — same content rules, wider aspect. */
.browser {
  width: 100%; max-width: 620px; flex: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md);
}
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.browser-dots { display: flex; gap: 5px; }
.browser-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser-url { flex: 1; max-width: 62%; height: 15px; border-radius: 999px; background: var(--hero); }
.browser-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.browser-shot { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.browser.frame--sm { width: 344px; max-width: none; box-shadow: var(--shadow-sm); }

/* The drawn website screens. Same token discipline as the phone screens. */
.wscreen { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 13px; }
.wscreen-nav { display: flex; align-items: center; gap: 10px; }
.wscreen-logo { width: 34px; height: 9px; border-radius: 3px; background: var(--ink); flex: none; }
.wscreen-menu { display: flex; gap: 8px; flex: 1; }
.wscreen-menu i { width: 24px; height: 5px; border-radius: 999px; background: var(--line); }
.wscreen-btn { width: 46px; height: 15px; border-radius: 999px; background: var(--accent); flex: none; }
.wscreen-search { flex: 1; height: 15px; border-radius: 999px; background: var(--hero); border: 1px solid var(--line); }
.wscreen-cart { width: 15px; height: 15px; border-radius: 4px; background: var(--accent-soft); flex: none; }

.wscreen-hero { flex: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: center; padding: 4px 0; }
.wscreen-hero-copy { display: flex; flex-direction: column; gap: 7px; }
.wscreen-h1 { width: 92%; height: 11px; border-radius: 3px; background: var(--ink); opacity: .85; }
.wscreen-h1.is-short { width: 62%; }
.wscreen-p { width: 82%; height: 5px; border-radius: 999px; background: var(--line); }
.wscreen-p.is-short { width: 58%; }
.wscreen-cta {
  align-self: flex-start; margin-top: 5px; padding: 5px 12px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 8.5px; font-weight: 700;
}
.wscreen-hero-art {
  display: flex; flex-direction: column; gap: 7px; justify-content: center;
  height: 100%; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--accent-soft);
}
.wscreen-hero-art i { display: block; height: 9px; border-radius: 999px; background: var(--accent); opacity: .55; }
.wscreen-hero-art i:last-child { width: 62%; }
.wscreen-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wscreen-cards span { height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--hero); }

.wscreen-app { display: flex; gap: 10px; height: 100%; }
.wscreen-side { display: flex; flex-direction: column; gap: 7px; width: 46px; flex: none; padding-top: 2px; }
.wscreen-side i { height: 8px; border-radius: 3px; background: var(--line); }
.wscreen-side i.is-on { background: var(--accent); }
.wscreen-main { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.wscreen-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wscreen-stats span { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.wscreen-stats b { display: block; font-family: var(--font-display); font-size: 11px; }
.wscreen-stats i { display: block; width: 70%; height: 4px; margin-top: 5px; border-radius: 999px; background: var(--line); }
.wscreen-table { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; }
.wscreen-table span { flex: 1; max-height: 13px; border-radius: 3px; background: var(--line); opacity: .7; }
.wscreen-table span.is-head { background: var(--accent-soft); opacity: 1; }

.wscreen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wscreen-grid span { border: 1px solid var(--line); border-radius: 8px; background: var(--hero); padding: 6px; }
.wscreen-grid i { display: block; height: 26px; border-radius: 5px; background: var(--accent-soft); }

.svc-card h3 { font-size: 16px; }
.svc-card .pill-row { margin-top: auto; padding-top: 4px; }

/* Showcase: a rail of frames that scrolls sideways instead of shrinking. */
.showcase { overflow: hidden; }
.showcase-rail { margin-top: 4px; padding: 8px var(--gutter) 4px; overflow-x: auto; scrollbar-width: none; }
.showcase-rail::-webkit-scrollbar { display: none; }
.showcase-track {
  display: flex; justify-content: center; gap: 22px;
  min-width: min-content; margin: 0 auto; padding: 0; list-style: none;
}
.showcase-rail--wide { overflow: visible; }
.showcase-rail--wide .showcase-track { flex-wrap: wrap; min-width: 0; max-width: var(--wrap); gap: 26px; }
.showcase-item { display: flex; flex-direction: column; align-items: center; gap: 12px; scroll-snap-align: center; }
.showcase-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Numbered steps, laid out as a row that wraps rather than a long timeline. */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px; margin: 0; padding: 0; list-style: none;
}
.step { padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
}
.step h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 700; }
.step p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.stack-row { margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--line); }
.stack-lede { margin: 0 0 24px; text-align: center; font-size: 14.5px; color: var(--muted); }

/* Logo wall: one row of marks, divided by hairlines rather than boxes, so it
   reads as a stack and not as seven more cards. Monochrome until hover, when
   each mark takes its own brand colour — the only colour on the section. */
.logo-wall {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.logo-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 26px 12px;
  border-left: 1px solid var(--line);
  transition: background .2s ease;
}
.logo-tile:first-child { border-left: 0; }
.logo-tile:hover { background: var(--bg); }
.logo-mark { display: block; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.logo-tile:hover .logo-mark { color: var(--brand); transform: translateY(-2px); }
.logo-name {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  text-align: center;
}

@media (max-width: 1024px) {
  .logo-wall { grid-template-columns: repeat(4, 1fr); }
  /* Hairlines have to restart on every row once the grid wraps. */
  .logo-tile:nth-child(4n + 1) { border-left: 0; }
  .logo-tile:nth-child(n + 5) { border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .logo-tile { padding: 20px 8px; gap: 9px; }
  .logo-tile:nth-child(4n + 1) { border-left: 1px solid var(--line); }
  .logo-tile:nth-child(3n + 1) { border-left: 0; }
  .logo-tile:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .logo-name { font-size: 9.5px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-tile:hover .logo-mark { transform: none; }
}

.consult { display: grid; grid-template-columns: 1fr 1.05fr; gap: 52px; align-items: start; }
.consult-copy h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 700; letter-spacing: -.02em; }
.consult-copy .lede { margin: 18px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.consult-points { margin: 26px 0 0; padding: 0; list-style: none; }
.consult-points li { position: relative; padding: 0 0 16px 27px; }
.consult-points li::before { content: "\2713"; position: absolute; left: 0; top: 1px; color: var(--accent-text); font-weight: 700; }
.consult-points strong { display: block; font-size: 14.5px; }
.consult-points span { font-size: 13.5px; color: var(--muted); }
.consult-related { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.consult-related a { color: var(--ink2); border-bottom: 1px solid var(--line); }
.consult-related a:hover { color: var(--accent-text); border-bottom-color: var(--accent); }
.consult-form {
  padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg); box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
  .svc-hero { padding-top: 56px; }
  .svc-hero-inner { grid-template-columns: 1fr; gap: 12px; }
  .svc-hero-copy { padding-bottom: 8px; }
  .svc-hero-visual { min-height: 0; padding-top: 12px; }
  .browser { max-width: 100%; }
  .phone { width: 178px; }
  .phone.frame--lead { width: 196px; margin-bottom: 22px; }
  .consult { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 720px) {
  /* One phone, upright: three overlapping frames at this width is clutter. */
  .svc-hero-visual { gap: 0; }
  .svc-hero-visual .phone.frame--aside { display: none; }
  .phone.frame--lead { width: 224px; margin-bottom: 0; }
  .showcase-track { justify-content: flex-start; }
  .showcase-rail { scroll-snap-type: x mandatory; padding-inline: var(--gutter); }
  .consult-form { padding: 22px; }
}

.post-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--hero); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--pill); font-size: 14px; font-weight: 600;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent-text); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-text); }
.breadcrumbs .sep { opacity: .5; }

/* ---------- Lede ----------
   The opening paragraph of a page. Set one step down from the H1 and held to
   a ~66ch measure so it reads as a single comfortable block rather than
   running the full width of the hero. */
.lede {
  margin: 18px 0 0;
  max-width: 66ch;
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.65;
  color: var(--muted);
}

/* Standfirst on a single post: an editor-written summary of the article.
   Kept distinct from .lede because here it genuinely is a separate statement
   from the headline, not a restatement of it. No box, no accent rule — just
   larger type and a hairline above. */
.post-standfirst {
  margin: 26px 0 0;
  padding-top: 20px;
  max-width: 66ch;
  border-top: 1px solid var(--line);
}
.post-standfirst .label {
  display: block;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.post-standfirst p {
  margin: 10px 0 0;
  font-size: 17px; line-height: 1.7; color: var(--ink2);
}

/* ---------- Footer ---------- */
.site-footer { padding: 0 var(--gutter) 30px; background: var(--surface); border-top: 1px solid var(--line); }

/* Sign-up band: the one place in the footer with any weight to it. */
.footer-signup {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 28px 48px; padding: 40px 0 38px; border-bottom: 1px solid var(--line);
}
.footer-signup-copy h2 { font-size: clamp(21px, 2.2vw, 27px); font-weight: 700; letter-spacing: -.02em; }
.footer-signup-copy p { margin: 8px 0 0; max-width: 54ch; font-size: 14px; line-height: 1.6; color: var(--muted); }

.subscribe { flex: 1 1 340px; max-width: 460px; }
.subscribe .form-status { margin: 0 0 12px; padding: 10px 14px; font-size: 13px; }
.subscribe-form { display: flex; gap: 10px; }
.subscribe-form input[type=email] {
  flex: 1; min-width: 0; height: 44px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 14px;
}
.subscribe-form input[type=email]:focus { border-color: var(--accent); outline: none; }
.subscribe-form .btn { flex: none; }
.subscribe-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

.footer-top {
  display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(140px, 1fr)) minmax(180px, 1.1fr);
  gap: 40px 32px; padding: 46px 0 42px;
}
.footer-brand p { margin: 16px 0 0; max-width: 320px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.footer-col h3 {
  margin: 0 0 16px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--ink2); }
.footer-col a:hover { color: var(--accent-text); }
.footer-contact address { font-style: normal; font-size: 13.5px; line-height: 1.9; color: var(--ink2); }
.footer-hours { margin: 12px 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.social-links { display: flex; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.social-links a {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.social-links a:hover { color: var(--accent-text); border-color: var(--accent); transform: translateY(-2px); }

.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }

@media (max-width: 1024px) {
  .footer-top { grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 34px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .footer-signup { padding: 32px 0; }
  .subscribe { flex-basis: 100%; max-width: none; }
  .subscribe-form { flex-wrap: wrap; }
  .subscribe-form input[type=email], .subscribe-form .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .social-links a:hover { transform: none; }
}

/* ---------- Animation ---------- */
@keyframes ssbdRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Island hydration ---------- */
[data-ssbd-island] { min-height: 0; }
.no-js [data-ssbd-island-nojs="hide"] { display: none; }

.hero-inner--solo { grid-template-columns: minmax(0, 1fr); }
.hero-inner--solo .hero-lede { max-width: 62ch; }

/* ---------- Affiliate offers ---------- */
.affiliate-disclosure {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--hero);
  font-size: 13px; line-height: 1.6; color: var(--muted);
}
.affiliate-disclosure a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.affiliate-disclosure--inline { margin: 12px 0 0; padding: 0; border: 0; background: none; font-size: 12.5px; }

/* The offer card is the money card on a comparison page: it gets real
   padding, a price block you can read across the room, and one button. */
.offer-card {
  gap: 20px; padding: 30px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.offer-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-3px); }
/* Wider tracks than the generic grid: this card carries a price block, a
   verdict, pros, cons and a button, and four across is where it starts to
   feel like a spreadsheet. Three at most on a full-width page. */
.grid.offer-grid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 24px; }

.offer-head { display: flex; align-items: flex-start; gap: 16px; }
.offer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.offer-title h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.offer-bestfor { font-size: 13px; line-height: 1.4; color: var(--muted); }
.offer-logo {
  width: 52px; height: 52px; flex: none; object-fit: contain;
  border-radius: 14px; border: 1px solid var(--line); background: var(--hero);
}
.offer-logo--letter {
  display: grid; place-items: center;
  background: var(--accent-soft); border-color: transparent; color: var(--accent-text);
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
}
.offer-rating { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.offer-stars { font-size: 12px; letter-spacing: 1px; color: var(--accent-text); white-space: nowrap; }
.offer-stars i { font-style: normal; color: var(--line); }
.offer-rating strong { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

/* Price block: the thing the reader came for, so it gets its own panel. */
.offer-pricing {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  padding: 16px 18px; border-radius: 14px;
  background: var(--accent-soft);
}
.offer-price {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  letter-spacing: -.02em; color: var(--accent-text);
}
.offer-coupon { font-size: 12.5px; color: var(--ink2); }
.offer-coupon code {
  padding: 3px 8px; margin-left: 4px; border-radius: 6px;
  background: var(--surface); color: var(--accent-text);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
}

.offer-summary { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink2); }

.offer-proscons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 22px; padding: 18px 0; border-block: 1px solid var(--line);
}
.offer-proscons h4 {
  margin: 0 0 9px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.offer-proscons ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 13px; line-height: 1.5; }
.offer-proscons li { position: relative; padding-left: 20px; }
.offer-pros li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--accent-text); font-weight: 700; }
.offer-cons li::before { content: "–"; position: absolute; left: 0; top: -1px; color: var(--muted); font-weight: 700; }

.offer-foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.offer-cta { width: 100%; height: 48px; font-size: 14.5px; }
.offer-cta--empty { border-style: dashed; }
.offer-note { font-size: 11.5px; line-height: 1.45; text-align: center; color: var(--muted); }

.offer-card--inline {
  flex-direction: row; align-items: center; flex-wrap: wrap;
  gap: 16px; padding: 20px 22px;
}
.offer-card--inline:hover { transform: none; }
.offer-card--inline .offer-proscons, .offer-card--inline .offer-summary { display: none; }
.offer-card--inline .offer-head { flex: 1; min-width: 220px; }
.offer-card--inline .offer-pricing { padding: 10px 14px; }
.offer-card--inline .offer-foot { flex: none; width: auto; }
.offer-card--inline .offer-cta { width: auto; padding: 0 22px; }
.offer-card--inline .offer-note { display: none; }

@media (prefers-reduced-motion: reduce) {
  .offer-card:hover { transform: none; }
}

.tool-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.tool-list li { display: flex; flex-direction: column; gap: 3px; }
.tool-list strong { font-size: 14.5px; }
.tool-list span { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tool-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }

/* ---------- Products & ordering ----------
   The price and the Order button sit at the foot of a product card, pushed
   there with margin-top:auto so cards in a row line their buttons up however
   uneven the descriptions above them are. */
.product-price { margin: 4px 0 0; }
.order-price { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
/* A product with no price is not free — it is quoted. Muted and normal weight
   so it never reads as a number. */
.order-price--quote { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--muted); }
.product-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: auto; padding-top: 14px;
}

.order { display: flex; flex-direction: column; gap: 24px; }
.order-summary {
  padding: 24px 26px;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent-soft);
}
.order-summary-name { margin: 6px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.order-summary-desc { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink2); }
.order-summary-price { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 0; }
.order-summary-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.order-form { padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }

/* The fallback when /order/ is opened with no product on it. */
.order-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.order-picker-item {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px;
  padding: 16px 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .2s ease, background .2s ease;
}
.order-picker-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.order-picker-name { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; }
.order-picker-price { font-size: 13.5px; font-weight: 600; color: var(--muted); }

@media (max-width: 560px) {
  .order-form { padding: 20px 18px; }
  .order-summary { padding: 20px 18px; }
  .order-actions .btn { width: 100%; }
}

/* ---------- Partners ----------
   Three across at most, so each card is wide enough for the logo to be read at
   a glance rather than squinted at. Cards are equal height with the button
   pinned to the foot: a ragged row of partner logos is the single thing that
   makes this kind of section look unfinished. */
.partner-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.partner-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) { .partner-grid, .partner-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .partner-grid, .partner-grid--cols-2 { grid-template-columns: 1fr; gap: 16px; } }

.partner-card {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 32px 28px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.partner-card:hover {
  border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-md);
}

/* Light in both themes on purpose — see the note in partner-card.php. */
.partner-logo {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 104px; padding: 20px 26px;
  border-radius: var(--radius); background: #fff;
}
.partner-logo img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.partner-logo-letter { font-family: var(--font-display); font-size: 44px; font-weight: 800; color: #0f1b2d; }

.partner-name {
  margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: -.02em;
}

.partner-coupon {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; padding: 14px 16px;
  border: 1px dashed var(--accent); border-radius: var(--radius);
  background: var(--accent-soft);
}
.partner-coupon-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.partner-coupon-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.partner-coupon-code {
  font-family: var(--font-mono); font-size: 17px; font-weight: 700;
  letter-spacing: .06em; color: var(--accent-text);
}
.partner-coupon-copy {
  padding: 5px 12px; border: 1px solid var(--accent); border-radius: var(--pill);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.partner-coupon-copy:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.partner-coupon-copy.is-copied { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Pinned to the foot so buttons line up across a row of uneven cards. */
.partner-action { margin-top: auto; padding-top: 4px; width: 100%; }
.partner-btn { width: 100%; height: 46px; }

/* Shared by any front-page section that ends in a "view all" button. */
.section-more { display: flex; justify-content: center; margin-top: 36px; }
.partner-disclosure { margin-top: 32px; }

@media (max-width: 560px) {
  .partner-card { padding: 26px 20px; gap: 16px; }
  .partner-logo { height: 88px; padding: 16px 20px; }
}

/* ---------- Blog portal ----------
   A news portal leans on typography, spacing and hierarchy rather than colour
   and shadow: one story is clearly the lead, the rest fall away in size. Kept
   deliberately flat — no gradients, one shadow weight, the brand accent only
   on links and labels. */

/* Its own padding, because .section--hero only paints the background — and the
   topic bar below is conditional, so the bottom padding cannot depend on it. */
.blog-masthead { padding: 72px var(--gutter) 32px; }
.blog-masthead-top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px 40px; margin-top: 18px;
}
.blog-masthead-title { margin: 10px 0 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; }
.blog-masthead-lede { margin: 12px 0 0; max-width: 60ch; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.blog-masthead-search { flex: 1; min-width: 240px; max-width: 380px; }

/* The topic bar scrolls sideways on a phone rather than wrapping to four
   rows and pushing the first story off the screen. */
.blog-topics {
  display: flex; gap: 6px; margin-top: 26px;
  overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
}
.blog-topics::-webkit-scrollbar { display: none; }
.blog-topic {
  flex: none; padding: 10px 14px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; transition: background .2s ease, color .2s ease;
}
.blog-topic:hover { background: var(--accent-soft); color: var(--accent-text); }
.blog-topic.is-current { color: var(--ink); background: var(--accent-soft); }

/* Shared placeholder for a post with no featured image, so a missing picture
   leaves a considered block rather than a collapsed row. */
.thumb-fallback {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--hero) 0%, var(--accent-soft) 100%);
}

/* ---- Featured ---- */
.featured-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 26px; }
.featured-grid--solo { grid-template-columns: 1fr; }

/* Fewer than three companions and the thin rail reads as an empty column beside
   the lead, which is how a young blog ends up looking broken rather than new.
   The survivors stack their image on top instead and take the room. */
.featured-grid--sparse { grid-template-columns: 1.35fr 1fr; }
.featured-grid--sparse .side-story { grid-template-columns: 1fr; gap: 12px; }
.featured-grid--sparse .side-story-thumb { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.featured-grid--sparse .side-story-title { font-size: 18px; line-height: 1.3; }
.featured-side { display: flex; flex-direction: column; gap: 18px; }

.lead-story { display: flex; flex-direction: column; gap: 18px; }
.lead-story-thumb {
  display: block; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9; background: var(--hero);
  /* Capped so a wide screen does not turn the lead image into a wall that
     leaves the stories beside it stranded at the top of an empty column. */
  max-height: 400px;
}
.lead-story-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.lead-story:hover .lead-story-thumb img { transform: scale(1.03); }
.lead-story-title { margin: 10px 0 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.18; letter-spacing: -.03em; }
.lead-story-excerpt { margin: 12px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--muted); }

.side-story { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; }
.side-story-thumb {
  display: block; overflow: hidden; border-radius: 12px;
  aspect-ratio: 3 / 2; background: var(--hero);
}
.side-story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-story-title { margin: 6px 0 0; font-size: 15.5px; line-height: 1.35; letter-spacing: -.01em; }
.side-story + .side-story { border-top: 1px solid var(--line); padding-top: 18px; }

/* ---- Latest column + sidebar ---- */
.blog-columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.blog-main { min-width: 0; }

.category-block-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 10px 20px; margin-bottom: 22px;
  border-bottom: 2px solid var(--ink); padding-bottom: 10px;
}
.category-block-title {
  margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 800;
  letter-spacing: -.01em; text-transform: uppercase;
}

.story-list { display: flex; flex-direction: column; }
.story-row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 22px 0; align-items: start; }
.story-row:first-child { padding-top: 0; }
.story-row + .story-row { border-top: 1px solid var(--line); }
.story-row-thumb {
  display: block; overflow: hidden; border-radius: 12px;
  aspect-ratio: 16 / 10; background: var(--hero);
}
.story-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-row-title { margin: 8px 0 0; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
.story-row-excerpt { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---- Sidebar ---- */
.blog-sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }
.sidebar-block { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sidebar-title {
  margin: 0 0 14px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.sidebar-note { margin: -6px 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }

.trending-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.trending-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 11px 0; }
.trending-item:first-child { padding-top: 0; }
.trending-item + .trending-item { border-top: 1px solid var(--line); }
.trending-rank { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--accent-text); }
.trending-item a { font-size: 14px; font-weight: 600; line-height: 1.35; }

.topic-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.topic-list li + li { border-top: 1px solid var(--line); }
.topic-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; font-weight: 600; }
.topic-count { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* ---- Category rows ---- */
.category-block + .category-block { margin-top: 48px; }

@media (max-width: 1024px) {
  .blog-columns { grid-template-columns: 1fr; gap: 40px; }
  .blog-sidebar { position: static; }
}

@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 560px) {
  .story-row { grid-template-columns: 116px 1fr; gap: 14px; padding: 18px 0; }
  .story-row-title { font-size: 16px; }
  .story-row-excerpt { display: none; }
  .side-story { grid-template-columns: 88px 1fr; }
  .blog-masthead-search { max-width: none; }
}

/* ---------- Article reading page ----------
   Reading comes first here: a measure around 68 characters, 17px type and
   1.8 line height. The contents rail is the only furniture beside the text. */

.article-head { padding: 64px var(--gutter) 36px; }
.article-kicker {
  display: inline-block; margin-top: 18px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text);
}
.article-kicker:hover { text-decoration: underline; }
.article-title {
  margin: 14px 0 0; font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15; letter-spacing: -.03em;
}
.article-standfirst {
  margin: 18px 0 0; max-width: 62ch;
  font-size: 18.5px; line-height: 1.6; color: var(--muted);
}
.article-byline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line);
}
.article-byline-author { font-size: 14px; font-weight: 700; }

/* Pulled up into the hero so the image reads as part of the headline block
   rather than as the first thing in the body. */
.article-figure { margin: -20px 0 0; }
/* Held to the reading layout's width, not the full page grid: a hero image
   twice as wide as the text it introduces reads as a banner, not as part of
   the article. Held to a ratio rather than a pixel height so a tall crop still
   cannot become a wall: a fixed max-height crops by whatever the container
   happens to be minus that number, which silently ate the top and bottom of
   the 16:9 image ssbd-hero (1200x675) is cropped to in the first place. At
   16:9 the intended featured image now shows whole, and only an upload of some
   other shape is cropped. */
.article-figure .wrap { max-width: 1080px; }
.article-figure img {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  object-fit: cover; border-radius: var(--radius-lg);
}
.article-figure figcaption {
  margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted);
}

.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 56px;
  align-items: start; max-width: 1080px; margin-inline: auto;
}
.article-layout--full { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.article-body { min-width: 0; }

/* The reading measure. Overrides the base .entry-content size only here, where
   the whole page exists to be read. */
.article-body .entry-content { font-size: 17px; line-height: 1.8; max-width: 68ch; }
.article-body .entry-content > * + * { margin-top: 1.3em; }
.article-body .entry-content h2 { margin-top: 2em; font-size: 26px; line-height: 1.25; letter-spacing: -.02em; }
.article-body .entry-content h3 { margin-top: 1.6em; font-size: 20px; line-height: 1.3; }
/* Anchored headings must not hide under a sticky header when jumped to. */
.article-body .entry-content :is(h2, h3) { scroll-margin-top: 90px; }
.article-body .entry-content figure { margin-inline: 0; }
.article-body .entry-content figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* Editor-applied callouts: add "callout" or "key-takeaways" to a group or list
   block's Additional CSS class. */
.entry-content .callout,
.entry-content .key-takeaways {
  padding: 20px 24px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent-soft);
}
.entry-content .callout > :first-child,
.entry-content .key-takeaways > :first-child { margin-top: 0; }
.entry-content .key-takeaways ul { list-style: none; padding-left: 0; }
.entry-content .key-takeaways li { position: relative; padding-left: 26px; }
.entry-content .key-takeaways li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--accent-text); font-weight: 700;
}

.article-tags { margin-top: 40px; }

/* ---- Contents rail ---- */
.article-rail { position: sticky; top: 92px; }
.toc { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toc-title {
  margin: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.toc-toggle {
  display: none; width: 28px; height: 28px; flex: none;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: inherit; cursor: pointer;
}
.toc-toggle-mark { display: block; margin: 0 auto; width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; }
.toc-toggle[aria-expanded="true"] .toc-toggle-mark { transform: rotate(225deg) translate(-2px, -2px); }

.toc-list { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: toc; }
.toc-item { counter-increment: toc; }
.toc-item + .toc-item { margin-top: 2px; }
.toc-item a {
  display: block; padding: 6px 0 6px 26px; position: relative;
  font-size: 13.5px; line-height: 1.4; color: var(--muted);
  border-left: 2px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.toc-item a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 8px;
  font-family: var(--font-mono); font-size: 10.5px; opacity: .6;
}
.toc-item--h3 a { padding-left: 40px; font-size: 13px; }
.toc-item--h3 a::before { left: 22px; }
.toc-item a:hover { color: var(--ink); }
.toc-item a.is-current { color: var(--accent-text); font-weight: 600; border-left-color: var(--accent); }

/* ---- Share row ---- */
.share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  margin-top: 32px; padding: 18px 0; border-block: 1px solid var(--line);
}
.share-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; min-width: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: transparent; color: var(--muted);
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.share-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.share-btn--copy { padding: 0 14px; }
.share-btn--copy.is-copied { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Author box ---- */
.author-box {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
  margin-top: 36px; padding: 24px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.author-box-mark {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 14px; overflow: hidden;
  background: var(--hero);
}
.author-box-mark img { width: 100%; height: 100%; object-fit: cover; }
.author-box-mark span { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.author-box-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.author-box-name { margin: 6px 0 0; font-size: 17px; letter-spacing: -.01em; }
.author-box-bio { margin: 8px 0 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.article-disclosure { margin-top: 28px; }

@media (max-width: 980px) {
  /* The rail moves above the article, where a contents list belongs on a
     phone — collapsed, so it never pushes the opening paragraph off screen. */
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 760px; }
  .article-rail { position: static; order: -1; }
  .toc-toggle { display: block; }
  .toc:not(.is-open) .toc-list { display: none; }
}

@media (max-width: 560px) {
  .article-head { padding: 44px var(--gutter) 28px; }
  .article-body .entry-content { font-size: 16.5px; }
  .article-body .entry-content h2 { font-size: 22px; }
  .author-box { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
}

/* ---------- Comments ----------
   Threaded, so the indent has to stay readable at depth without running the
   text off a phone: one step of indent with a hairline down the thread, and
   the indent collapses entirely on the narrowest screens. */
.comments { max-width: 760px; margin-inline: auto; }
.comments-title,
.comment-reply-title {
  margin: 0 0 24px; font-family: var(--font-display); font-size: 20px;
  font-weight: 800; letter-spacing: -.02em;
}

.comment-list { margin: 0 0 40px; padding: 0; list-style: none; }
.comment-list .children {
  margin: 0 0 0 22px; padding-left: 22px; list-style: none;
  border-left: 1px solid var(--line);
}
.comment-item { margin-top: 22px; }
.comment-list > .comment-item:first-child { margin-top: 0; }

.comment-body { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.comment-avatar img {
  width: 44px; height: 44px; border-radius: 50%; display: block;
  background: var(--hero);
}
.comment-main { min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.comment-author { font-size: 14.5px; font-weight: 700; }
.comment-badge {
  padding: 2px 8px; border-radius: var(--pill);
  background: var(--accent-soft); color: var(--accent-text);
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.comment-date { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.comment-date:hover { color: var(--accent-text); }

.comment-text { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--ink2); }
.comment-text > * + * { margin-top: .8em; }
.comment-text a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

.comment-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.comment-actions a {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.comment-actions a:hover { color: var(--accent-text); }

.comment-item.is-pending > .comment-body { opacity: .75; }
.comment-pending {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 12.5px; font-weight: 600;
}
.comments-closed { margin: 0; font-size: 14px; color: var(--muted); }

/* ---- The form ---- */
.comment-respond {
  padding: 26px 28px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface);
}
.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comment-form .field--full,
.comment-form .comment-consent,
.comment-form .form-submit { grid-column: 1 / -1; }
.comment-form .form-submit { margin: 4px 0 0; }

/* Core prints its own logged-in and cookie lines outside the fields array. */
.comment-form .logged-in-as,
.comment-form .comment-notes {
  grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted);
}
.comment-form .logged-in-as a { color: var(--accent-text); }

.comment-consent { display: flex; }
.comment-consent label { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.comment-consent input { margin-top: 2px; accent-color: var(--accent); flex: none; }

/* The cancel link sits inside the heading when replying to somebody. */
.comment-reply-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.comment-reply-title small { font-size: 12px; font-weight: 600; }
.comment-reply-title small a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.comment-reply-title small a:hover { color: var(--accent-text); }

/* A reply form opened inside the thread should not look like a second page. */
.comment-item .comment-respond { margin-top: 18px; padding: 20px 22px; }

@media (max-width: 560px) {
  .comment-form { grid-template-columns: 1fr; }
  .comment-list .children { margin-left: 0; padding-left: 14px; }
  .comment-body { grid-template-columns: 34px 1fr; gap: 11px; }
  .comment-avatar img { width: 34px; height: 34px; }
  .comment-respond { padding: 20px 18px; }
}
