/* Layout: deep blue hero with a framed portrait and stat strip, then calm white sections with soft-edged panels. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ground: #f6f8fc;
  --surface: #ffffff;
  --tint: #eaf0fa;
  --ink: #0f1f35;
  --muted: #4d5e76;
  --line: #d9e1ec;
  --accent: #1546a0;
  --on-accent: #ffffff;
  --signal: #2f6fe0;
  --bar: #9db0ca;
  --hero: #0b2a66;
  --hero-deep: #071d4a;
  --on-hero: #f5f8fe;
  --on-hero-muted: #c6d4ee;
  --hero-line: rgba(255, 255, 255, 0.16);
  --hero-grid: rgba(255, 255, 255, 0.045);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0d1524;
    --surface: #141f33;
    --tint: #18263f;
    --ink: #e7eef9;
    --muted: #a5b4ca;
    --line: #2a3a52;
    --accent: #86b4ff;
    --on-accent: #0a1426;
    --signal: #86b4ff;
    --bar: #5f7697;
    --hero: #102a5c;
    --hero-deep: #0a1a3c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0d1524;
  --surface: #141f33;
  --tint: #18263f;
  --ink: #e7eef9;
  --muted: #a5b4ca;
  --line: #2a3a52;
  --accent: #86b4ff;
  --on-accent: #0a1426;
  --signal: #86b4ff;
  --bar: #5f7697;
  --hero: #102a5c;
  --hero-deep: #0a1a3c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
h1, h2, h3, .h3 { margin: 0; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: var(--step-3); font-weight: 700; font-stretch: 92%; }
h3, .h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; background: var(--surface); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }

/* Masthead */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
}
.masthead {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.625rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  min-width: 0;
}
.logo { flex: none; display: block; width: 2rem; height: 2rem; }
.logo-bg { fill: var(--accent); }
.logo-m { fill: var(--on-accent); }

/* Mobile menu: a native disclosure, so it works with no JavaScript. */
.nav-mobile { display: none; }
.nav-mobile summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after {
  display: block;
  width: 1.375rem;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { top: 0; transform: rotate(45deg); }
.nav-mobile[open] .burger::after { top: 0; transform: rotate(-45deg); }
.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0.625rem max(var(--gutter), env(safe-area-inset-right, 0px)) 1rem max(var(--gutter), env(safe-area-inset-left, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 30px -18px rgba(3, 12, 36, 0.55);
}
.nav-panel a {
  display: block;
  padding: 0.75rem 0.875rem;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}
.nav-panel a:hover { background: var(--tint); }
.nav-panel a[aria-current="page"] { background: var(--tint); color: var(--accent); font-weight: 650; }
.nav-panel .nav-cta { background: var(--accent); color: var(--on-accent); text-align: center; font-weight: 600; margin-top: 0.25rem; }
.nav-panel .nav-cta:hover, .nav-panel .nav-cta[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a { color: var(--ink); text-decoration: none; display: inline-block; padding-block: 0.25rem; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.nav .nav-cta {
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { color: var(--on-accent); }

/* Hero */
.hero {
  color: var(--on-hero);
  background-color: var(--hero);
  background-image:
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    radial-gradient(90rem 40rem at 85% -10%, rgba(47, 111, 224, 0.55), transparent 65%),
    linear-gradient(160deg, var(--hero), var(--hero-deep));
  background-size: calc(100% / 13) 100%, auto, auto;
}
.hero a { color: inherit; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem clamp(2rem, 6vw, 5.5rem);
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}
.hero-copy { display: grid; gap: 1.25rem; min-width: 0; }
.hero-name {
  font-size: clamp(2.875rem, 2rem + 4.4vw, 5.25rem);
  font-weight: 750;
  font-stretch: 94%;
  line-height: 1.02;
  letter-spacing: -0.028em;
}
.hero-role { font-size: var(--step-1); font-weight: 550; color: var(--on-hero); line-height: 1.35; }
.hero-lede { font-size: 1.1875rem; line-height: 1.55; color: var(--on-hero-muted); max-width: 34em; }
.hero .actions { margin-top: 0.5rem; }
.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 25rem; }
.hero-photo {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--hero-line);
  box-shadow: 0 30px 60px -24px rgba(3, 12, 36, 0.75);
}
.hero-badge {
  position: absolute;
  left: -1.25rem;
  bottom: 1.5rem;
  display: grid;
  background: #ffffff;
  color: #0f1f35;
  padding: 0.7rem 1.05rem;
  border-radius: 14px;
  box-shadow: 0 14px 30px -12px rgba(3, 12, 36, 0.6);
  line-height: 1.3;
}
.hero-badge strong { font-weight: 700; }
.hero-badge span { font-size: 0.8125rem; color: #4d5e76; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--hero-line);
  padding-block: 1.5rem 2rem;
  gap: 1.25rem 2rem;
}
.hero-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.125rem; }
.hero-stats dd { margin: 0; font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.375rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stats dt { color: var(--on-hero-muted); font-size: var(--step--1); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1.5px solid var(--accent);
  overflow-wrap: anywhere;
}
.button:hover { filter: brightness(1.12); }
.hero .button-light, .hire .button { background: #ffffff; border-color: #ffffff; color: #0b2a66; }
.hero .button-ghost { background: transparent; border-color: var(--on-hero-muted); color: var(--on-hero); }
.hero .button-ghost:hover { background: var(--hero-line); filter: none; }
.button-off { background: transparent; color: var(--muted); border: 1.5px dashed var(--line); }
.more { font-weight: 600; }

/* Sections */
.section, .band { padding-block: clamp(3rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(1.25rem, 2.5vw, 2rem); }
.section-note { color: var(--muted); max-width: 42em; margin-top: 0.75rem; }
.more-row { margin-top: 1.5rem; }

/* Waterfall */
.wf {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(0.875rem, 2.5vw, 1.75rem);
}
.wf-axis, .wf-row {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  column-gap: 1.25rem;
}
.wf-years {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-bottom: 0.375rem;
}
.wf-rows { list-style: none; margin: 0; padding: 0; }
.wf-row { border-top: 1px solid var(--line); }
.wf-label { display: flex; flex-direction: column; padding-block: 0.625rem; font-size: 0.9375rem; line-height: 1.3; min-width: 0; }
.wf-label strong { font-weight: 650; }
.wf-dates { color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.wf-track {
  display: flex;
  align-items: center;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 13) 100%;
  min-width: 0;
}
.wf-track svg { display: block; width: 100%; height: 1rem; }
.wf-track rect { fill: var(--bar); }
.wf-row-current .wf-track rect { fill: var(--signal); }
.wf-row-current .wf-label strong { color: var(--accent); }

/* Work */
.work-list, .product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
.auto-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.work-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-width: 0;
}
.work-kind { color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
.work-detail { display: grid; gap: 0.625rem; margin-top: 0.5rem; }
.work-result { font-weight: 700; font-size: var(--step-1); color: var(--accent); line-height: 1.25; }
.work-stack { color: var(--muted); font-size: var(--step--1); }

/* Quotes */
.section-quotes { background: var(--tint); }
figure, blockquote { margin: 0; }
figcaption { color: var(--muted); font-size: var(--step--1); margin-top: 0.75rem; }
.quote-lead { margin-top: clamp(1.5rem, 3vw, 2.25rem); max-width: 52rem; }
.quote-lead blockquote p { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 500; line-height: 1.32; letter-spacing: -0.012em; }
.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-width: 0;
}
.quote-pair, .review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* Contact panel */
.hire { padding-block: clamp(2rem, 5vw, 4rem); }
.hire-panel {
  display: grid;
  gap: 0.875rem;
  justify-items: start;
  color: var(--on-hero);
  background: linear-gradient(140deg, var(--hero), var(--hero-deep));
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
}
.hire-panel p { color: var(--on-hero-muted); max-width: 38em; }
.hire-panel .actions { margin-top: 0.5rem; max-width: 100%; }

/* Inner pages */
.page-head { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; }
.page-title { font-size: clamp(2.375rem, 1.75rem + 3vw, 4rem); font-weight: 750; font-stretch: 94%; line-height: 1.04; letter-spacing: -0.028em; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 38em; }
.about-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
.about-intro { display: grid; gap: 1.25rem; min-width: 0; }
.portrait { width: min(100%, 22rem); border-radius: 20px; }
@media (min-width: 56rem) { .about-head:has(.portrait) { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 4rem; } }
.roles { display: grid; margin-top: 1.5rem; }
.role {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}
.role-head p { font-size: 0.9375rem; line-height: 1.35; }
.role ul { margin: 0; padding-left: 1.125rem; max-width: 40em; }
.about-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 2rem 3rem;
  padding-bottom: 2rem;
}
.about-facts h2 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.contact-list { margin: 0.5rem 0 0; display: grid; max-width: 44rem; }
.contact-list div {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
  gap: 0.125rem 1.5rem;
  padding-block: 0.875rem;
  border-top: 1px solid var(--line);
}
.contact-list dt { font-weight: 650; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }

/* Articles */
.article { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3rem); display: grid; gap: 1rem; }
.article > * { max-width: 46rem; min-width: 0; }
.crumbs, .meta, .buy-note { font-size: var(--step--1); color: var(--muted); }
.flag { font-size: var(--step--1); border: 1px dashed var(--signal); border-radius: 8px; padding: 0.5rem 0.75rem; }
.prose { max-width: 42rem; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--step-2); margin-top: 1.75em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.375rem; }
.prose li + li { margin-top: 0.5em; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--tint); }
.table-scroll { overflow-x: auto; }
.buy { display: grid; gap: 0.75rem; justify-items: start; padding-block: 0.5rem 1rem; }
.price { font-size: var(--step-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.post-list { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 56rem; }
.post-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.post-list a { font-weight: 650; font-size: var(--step-1); line-height: 1.3; }
.post-list time { color: var(--muted); font-size: var(--step--1); }

/* Shop */
.shop-section { padding-bottom: clamp(3rem, 6vw, 5rem); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.875rem 0.875rem 1.25rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.product-card:hover { border-color: var(--signal); }
.product-card:hover h3 { color: var(--accent); }
.product-card img { width: 100%; border-radius: 10px; }
.product-card h3, .product-card-pitch, .product-card .price, .product-card-cta { padding-inline: 0.375rem; }
.product-card h3 { margin-top: 0.25rem; }
.product-card-pitch { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; flex: 1; }
.product-card-cta { color: var(--accent); font-weight: 600; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 0.18em; }
.price { font-size: var(--step-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.price span { font-size: var(--step--1); font-weight: 500; color: var(--muted); margin-left: 0.25rem; }

/* Blog extras */
.prose code { font-size: 0.875em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { background: var(--tint); padding: 0.875rem 1rem; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0; padding: 0.75rem 1rem; border-left: 3px solid var(--signal); background: var(--tint); border-radius: 0 10px 10px 0; }
.faq { margin-top: 1rem; }
.ebook-cta {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: center;
  max-width: 46rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ebook-cta img { width: 100%; border-radius: 10px; }
.ebook-cta > div { display: grid; gap: 0.625rem; justify-items: start; min-width: 0; }
.ebook-cta h2 { font-size: var(--step-1); }
.ebook-cta p { color: var(--muted); }
.ebook-cta .ebook-cta-label { color: var(--accent); font-weight: 650; font-size: var(--step--1); }
/* In-article images */
.prose figure { margin-block: 1.75em; }
.prose figure img { width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.prose figcaption { margin-top: 0.5rem; font-size: var(--step--1); color: var(--muted); text-align: center; }

/* Post layout with a sticky table of contents on wide screens */
.article > .post-layout { max-width: none; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.post-main { display: grid; gap: 1rem; min-width: 0; max-width: 46rem; }
.toc { display: none; }
.toc-title, .toc-mobile summary { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.toc ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li, .toc-mobile li { counter-increment: toc; }
.toc a, .toc-mobile a {
  display: grid; grid-template-columns: 1.75rem minmax(0, 1fr);
  padding: 0.4rem 0.5rem; border-radius: 8px;
  color: var(--ink, inherit); text-decoration: none; font-size: 0.9375rem; line-height: 1.35;
}
.toc a::before, .toc-mobile a::before { content: counter(toc, decimal-leading-zero); color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.8125rem; padding-top: 0.1em; }
.toc a:hover, .toc-mobile a:hover { background: var(--tint); color: var(--accent); }
.toc-mobile { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 1rem; background: var(--surface); }
.toc-mobile summary { cursor: pointer; padding-block: 0.25rem; }
.toc-mobile[open] summary { margin-bottom: 0.5rem; }
@media (min-width: 64rem) {
  .post-layout { grid-template-columns: minmax(0, 46rem) 17rem; justify-content: space-between; }
  .toc {
    display: block; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 6rem);
    max-height: calc(100vh - 8rem); overflow-y: auto;
    border-left: 2px solid var(--line); padding: 0.25rem 0 0.25rem 1rem;
  }
  .toc-title { margin: 0 0 0.5rem 0.5rem; }
  .toc-mobile { display: none; }
}
.related { margin-top: 2rem; max-width: 46rem; }
.related h2 { font-size: var(--step-2); }

/* Footer */
.colophon { border-top: 1px solid var(--line); padding-block: 1.75rem 2.25rem; font-size: var(--step--1); color: var(--muted); }
.colophon-grid { display: grid; gap: 0.75rem; }
.colophon-links { display: flex; flex-wrap: wrap; gap: 0 1.125rem; list-style: none; margin: 0; padding: 0; }
.colophon-links a { display: inline-block; padding-block: 0.25rem; }

@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; justify-self: start; max-width: min(100%, 21rem); margin-left: 0; }
  .hero-badge { left: 0.75rem; bottom: 0.75rem; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 50rem) {
  .wf-axis-spacer { display: none; }
  .wf-axis, .wf-row { grid-template-columns: minmax(0, 1fr); }
  .wf-years span:nth-child(even) { visibility: hidden; }
  .wf-label { padding-block: 0.625rem 0.375rem; }
  .wf-track { margin-bottom: 0.625rem; }
  .role, .contact-list div { grid-template-columns: minmax(0, 1fr); }
  .ebook-cta { grid-template-columns: minmax(0, 1fr); }
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Author box on posts (E-E-A-T) */
.author-box { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.author-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.author-box div { display: grid; gap: 0.5rem; min-width: 0; }
.author-box .author-name { font-weight: 700; }
.author-box p { font-size: 0.9375rem; line-height: 1.55; }
@media (max-width: 30rem) { .author-box { grid-template-columns: minmax(0, 1fr); } }

/* Topic clusters */
.post-topic { font-size: var(--step--1); color: var(--muted); }
.topic-chips { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-chips a { display: inline-block; padding: 0.375rem 0.875rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: var(--step--1); font-weight: 600; }
.topic-chips a:hover { background: var(--tint); }
.topic-other { font-size: var(--step-1); margin-top: 2.5rem; }
.post-tag { font-size: var(--step--1); color: var(--muted); text-decoration: none; font-weight: 600; }
.post-tag:hover { color: var(--accent); }
.post-list .post-tag { order: 3; flex-basis: 100%; font-size: var(--step--1); font-weight: 600; color: var(--muted); text-decoration: none; }

/* Tool pages */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: 0 3rem; align-items: start; }
@media (min-width: 64rem) { .tool-layout { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); } .tool-card { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); } }
.tool-card { display: grid; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.tool-card fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.tool-card legend { font-weight: 700; margin-bottom: 0.5rem; width: 100%; }
.tool-checks { flex-direction: column; }
.tool-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.tool-card label { display: grid; gap: 0.375rem; font-weight: 600; font-size: 0.9375rem; }
.tool-type label, .tool-checks label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.tool-card input[type="number"] { font: inherit; padding: 0.625rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg, var(--surface)); color: inherit; width: 100%; min-width: 0; }
.tool-card input[type="number"]:focus { outline: 3px solid var(--signal); outline-offset: 1px; }
.tool-card small { font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.tool-results { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.tool-results div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.625rem; border-bottom: 1px solid var(--line); }
.tool-results dt { color: var(--muted); }
.tool-results dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tool-results .tool-main dd { font-size: var(--step-1); color: var(--accent); }
.tool-reverse p { align-self: end; padding-bottom: 0.625rem; }
.tool-note, .tool-sources { font-size: var(--step--1); color: var(--muted); }
.tool-copy { max-width: 42rem; }
.page-faq { margin-top: 2rem; }
.home-sub { margin-top: 2rem; font-size: var(--step-1); }
.home-more { margin-top: 1.25rem; font-weight: 600; }
[hidden] { display: none !important; }

/* Image cards for posts and tools */
.card-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1.5rem; }
.card { min-width: 0; }
.card-link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.card-link:hover { border-color: var(--accent); }
.card-link:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.card-img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--line); }
.card-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem 1.125rem 1.25rem; }
.card-tag { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.card-title { margin: 0; font-size: var(--step-1); font-weight: 680; line-height: 1.25; color: var(--ink); }
.card-link:hover .card-title { color: var(--accent); }
.card-date, .card-desc { font-size: var(--step--1); color: var(--muted); }
.related .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.related .card-title { font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) { .card-link:hover { transform: translateY(-2px); } }

/* Featured image on posts and tools */
.featured { margin: 0.5rem 0 0; max-width: 46rem; }
.featured img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.featured-tool { margin: 0 0 1.5rem; }
