/* ==========================================================================
   The Amazing History of Cars That Changed the World - editorial redesign.
   Every selector matches the existing markup, so no HTML changes are needed.
   Colour, spacing and type all come from the tokens in :root, so the whole
   look can be retuned from one place. Dark mode follows the OS setting.
   ========================================================================== */

/* --- Self-hosted variable fonts, latin subset ---------------------------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-var.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Faustina";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/faustina-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Faustina";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/faustina-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens -------------------------------------------------------------- */
:root {
  /* The brand green, kept. --lime is the fill colour; --accent is a darkened
     variant for small text, where pure lime cannot meet contrast on white. */
  --lime: #d9fd06;
  --lime-dim: #eaff7a;
  --accent: #5b6900;
  /* Text stays a neutral near-black. Tinting the ink green as well as the
     accent made the body copy read muddy, so green is accent-only. */
  --page: #f8f8f6;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --ink: #1a1a18;
  --ink-2: #3b3b37;
  --muted: #67675f;
  --line: #e5e4e0;
  --line-strong: #cecdc7;
  --shadow-sm: 0 1px 2px rgba(20, 22, 15, 0.05);
  --shadow-md: 0 6px 22px rgba(20, 22, 15, 0.08);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --sans: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Faustina", Georgia, "Times New Roman", serif;
  --shell: 1200px;
  --step: clamp(2.5rem, 5vw, 4.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --lime-dim: #b8d600;
    --accent: #d9fd06;
    --page: #101010;
    --surface: #191919;
    --surface-2: #222220;
    --ink: #f5f5f1;
    --ink-2: #d8d8d2;
    --muted: #a2a29a;
    --line: #2c2c29;
    --line-strong: #3d3d38;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
picture { display: block; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .site-logo { transform: none !important; }
}

/* --- Type primitives ----------------------------------------------------- */
h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.05rem); }
h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  margin: 16px 0 0;
  max-width: 58ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.62;
}

.section-copy {
  margin: 10px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.text-link {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 2px solid var(--lime);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.text-link:hover { color: var(--ink); border-color: var(--ink); }

/* --- Shell + sticky header ---------------------------------------------- */
.page-shell {
  width: min(var(--shell), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 96px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 4px;
  padding: 10px clamp(16px, calc((100vw - var(--shell)) / 2 + 16px), 96px);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 62%;
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.site-logo {
  display: block;
  width: clamp(152px, 20vw, 250px);
  max-height: 62px;
  height: auto;
  object-fit: contain;
  object-position: left center;
  transform-origin: left center;
  transition: width 0.2s ease, max-height 0.2s ease, transform 0.2s ease;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-mark-accent {
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(217, 253, 6, 0.24);
}

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }

.site-nav a {
  padding: 7px 11px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover { background: var(--surface-2); color: var(--ink); }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
  content: "";
}

.menu-toggle-bars {
  position: relative;
}

.menu-toggle-bars::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.menu-toggle-bars::after {
  position: absolute;
  top: 6px;
  left: 0;
}

body.nav-open .menu-toggle-bars {
  background: transparent;
}

body.nav-open .menu-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .menu-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

body.is-scrolled .site-header {
  padding-top: 2px;
  padding-bottom: 2px;
  box-shadow: 0 10px 28px rgba(20, 22, 15, 0.08);
}

body.is-scrolled .site-logo {
  width: clamp(168px, 18vw, 230px);
  max-height: 34px;
  transform: none;
}

body.is-scrolled .site-nav a {
  padding-top: 3px;
  padding-bottom: 3px;
  font-size: 0.8rem;
}

/* --- Surfaces ----------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.hero-copy,
.feature-card,
.archive-hero,
.article-hero,
.article-rail,
.article-body,
.category-band { padding: clamp(22px, 3.2vw, 40px); }

/* --- Home hero ---------------------------------------------------------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: stretch;
}

.hero-banner {
  position: relative;
  width: 100vw;
  min-height: clamp(540px, 70vh, 780px);
  margin: 0 0 20px calc(50% - 50vw);
  overflow: hidden;
  background: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-banner-media,
.hero-banner-media picture,
.hero-banner-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-banner-media {
  position: absolute;
  inset: 0;
}

.hero-banner-media img {
  object-fit: cover;
  object-position: center 32%;
}

.hero-banner-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 11, 8, 0.86) 0%, rgba(10, 11, 8, 0.48) 42%, rgba(10, 11, 8, 0.2) 70%, rgba(10, 11, 8, 0.58) 100%),
    linear-gradient(180deg, rgba(10, 11, 8, 0.2) 0%, rgba(10, 11, 8, 0.12) 45%, rgba(10, 11, 8, 0.78) 100%);
}

.hero-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: min(1360px, calc(100% - 56px));
  min-height: inherit;
  margin: 0 auto;
  padding: 0 0 18px;
}

.hero-copy-wide {
  max-width: 760px;
  width: min(90vw, 760px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
}

.hero-copy-wide .eyebrow { color: var(--lime); }

.hero-copy-home h1 {
  max-width: 9ch;
  color: #fff;
  font-family: "Arial Black", "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(3rem, 6.4vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: pretty;
}

.hero-copy-wide .lede {
  max-width: min(34ch, 90%);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
}

.hero-copy-wide .button-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.hero-copy-wide .button-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.hero-visual {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border-radius: var(--r-lg);
}

.hero-visual picture { height: 100%; }

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-visual:hover img { transform: scale(1.03); }

.hero-visual-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 24px 22px;
  /* Ramps up early so the lime eyebrow keeps contrast even when the top of the
     overlay lands on a bright part of the photo. */
  background: linear-gradient(
    180deg,
    rgba(10, 10, 8, 0) 0%,
    rgba(10, 10, 8, 0.75) 30%,
    rgba(10, 10, 8, 0.96) 100%
  );
  color: #fff;
  /* The photo behind the top of the scrim varies per image, so a soft shadow
     guarantees the eyebrow stays readable over bright paintwork. */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero-visual-overlay .eyebrow { color: var(--lime); }
.hero-visual-overlay h2 { max-width: 20ch; color: #fff; }

.hero-visual-overlay p:last-child {
  margin: 10px 0 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* --- Buttons ------------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--lime); color: #15170f; }
.button-primary:hover { background: var(--lime-dim); }
.button-secondary { border: 1px solid var(--line-strong); color: var(--ink); }
.button-secondary:hover { border-color: var(--ink); background: var(--surface-2); }

/* --- About / founder ---------------------------------------------------- */
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: 20px;
  padding: clamp(22px, 3.2vw, 40px);
}

.founder-grid-bottom {
  margin-top: calc(var(--step) + 4px);
}

.founder-copy .lede { max-width: 66ch; font-size: 1.13rem; }
.founder-card { display: grid; justify-items: center; gap: 14px; }

.founder-headshot {
  width: min(320px, 100%);
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
  box-shadow: none;
}

.founder-headshot-editorial {
  width: min(260px, 100%);
  aspect-ratio: 4 / 5;
}

.founder-signature { width: min(165px, 100%); opacity: 0.85; }

.founder-caption {
  margin: 0;
  text-align: center;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
}

.founder-caption span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Section headings --------------------------------------------------- */
.section-block { margin-top: var(--step); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  max-width: 18ch;
}

.section-head .eyebrow:empty {
  display: none;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 180px minmax(320px, 1.6fr);
  gap: 28px;
  margin-top: var(--step);
  padding: clamp(24px, 3vw, 38px);
}

.footer-brand p {
  margin: 16px 0 0;
  max-width: 28ch;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
}

.footer-note {
  opacity: 0.82;
  font-size: 0.92rem;
}

.footer-logo {
  width: min(280px, 100%);
  height: auto;
}

.footer-column h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.footer-column a {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 0.15s ease;
}

.footer-column a:hover,
.footer-links a:hover {
  color: var(--ink);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.footer-links a {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.footer-meta {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.card-grid-tight { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.category-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.category-card-title {
  margin-top: -2px;
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.category-card-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.45;
}

.category-card-date {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  line-height: 1.16;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card-media { display: block; overflow: hidden; background: var(--surface-2); }

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img { transform: scale(1.04); }

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--lime);
  color: #15170f;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-date { color: var(--muted); font-size: 0.8rem; }

.card h2 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.card h2 a:hover { color: var(--accent); }

/* :not(.eyebrow) so these container rules never out-specify the accent
   colour on an eyebrow label nested inside the same block. */
.card p:not(.eyebrow) {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.01rem;
  line-height: 1.55;
}

.card-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.card-bottom a { color: var(--accent); font-weight: 700; }
.card-bottom a:hover { color: var(--ink); }
.card-compact h2 { font-size: 1.1rem; }

/* --- Feature card ------------------------------------------------------- */
.feature-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  padding: clamp(18px, 2.4vw, 26px);
}

.feature-media {
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.feature-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.feature-media:hover img { transform: scale(1.03); }
.feature-copy h2 { margin: 6px 0 12px; font-size: clamp(1.5rem, 2.3vw, 1.95rem); }
.feature-copy h2 a:hover { color: var(--accent); }

.feature-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.07rem;
  line-height: 1.6;
}

.feature-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.feature-meta span + span::before { content: "\00b7"; margin-right: 8px; }

/* --- Taxonomy chips ----------------------------------------------------- */
.category-band { margin-top: var(--step); }
.taxonomy-cloud { display: flex; flex-wrap: wrap; gap: 9px; }

.taxonomy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.taxonomy-chip span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }

.taxonomy-chip:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: #15170f;
}

.taxonomy-chip:hover span { color: #15170f; }
.taxonomy-chip-soft { background: var(--surface-2); border-color: var(--line); }

/* --- Archive toolbar + taxonomy index ----------------------------------- */
.archive-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.search-input,
.filter-select {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
}

.search-input { flex: 1 1 320px; min-width: 0; }
.search-input::placeholder { color: var(--muted); }
.filter-select { cursor: pointer; }

.tax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.tax-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tax-card-featured {
  background:
    radial-gradient(circle at top right, rgba(226, 255, 0, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    var(--surface);
}

.tax-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tax-card h2 { margin: 6px 0 8px; font-size: 1.18rem; }

.tax-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tax-card-count {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tax-card-copy {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
}

.tax-card-link {
  margin-top: auto;
  color: var(--text);
  font-weight: 700;
}

.tax-card-link:hover {
  color: var(--accent);
}

@media (min-width: 900px) {
  .tax-card-featured {
    grid-column: span 2;
  }
}

/* --- Breadcrumbs -------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.crumbs a:hover { color: var(--accent); }
.crumb-sep { color: var(--line-strong); }

/* --- Article ------------------------------------------------------------ */
.article-layout {
  display: grid;
  gap: 22px;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.article-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  align-items: start;
  align-content: start;
  padding: 16px 18px 18px;
}

.article-hero > .crumbs {
  grid-column: 1 / -1;
  grid-row: 1;
}

.article-topline {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.article-hero h1 {
  grid-column: 1;
  grid-row: 3;
  max-width: 15ch;
  width: 100%;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.032em;
  margin: 0;
  line-height: 0.98;
}

.article-hero .lede {
  display: none;
}

.article-meta-row {
  grid-column: 1;
  grid-row: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 0;
  padding-top: 6px;
  border-top: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-meta-row span + span::before { content: "\00b7"; margin-right: 8px; }

.article-hero-image {
  grid-column: 2;
  grid-row: 2 / span 3;
  align-self: start;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.article-hero-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 260px;
  object-fit: cover;
}

.article-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
}

.article-body {
  order: 1;
}

.article-rail {
  position: sticky;
  top: 76px;
  order: 2;
  display: block;
  padding: 16px 18px;
  background: var(--surface);
}

.rail-block + .rail-block {
  margin-top: 16px;
  padding-top: 16px;
  padding-left: 0;
  border-top: 1px solid var(--line);
  border-left: 0;
}

.rail-block .eyebrow { margin-bottom: 8px; }

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.rail-list li + li { margin-top: 9px; }
.rail-list a:hover { color: var(--accent); }

/* Reading column: serif body, comfortable measure and rhythm. */
.article-content {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.19rem;
  line-height: 1.78;
}

.article-content > * { max-width: 68ch; }

.article-content::after { content: ""; display: block; clear: both; }

.article-content > p:first-child {
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.72;
}

.article-content p,
.article-content ul,
.article-content ol { margin: 0 0 1.3em; }

.article-content h2,
.article-content h3 {
  max-width: 34ch;
  margin: 2em 0 0.6em;
  color: var(--ink);
  font-family: var(--sans);
}

.article-content h2 { font-size: clamp(1.45rem, 2.1vw, 1.9rem); }
.article-content h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); }

.article-content a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-content a:hover { color: var(--ink); }

.article-content ul,
.article-content ol { padding-left: 1.3em; }
.article-content li + li { margin-top: 0.4em; }

.article-content strong { color: var(--ink); font-weight: 700; }

.article-content blockquote {
  max-width: 62ch;
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--lime);
  color: var(--ink);
  font-size: 1.28rem;
  font-style: italic;
  line-height: 1.55;
}

.article-content img { border-radius: var(--r-md); }

/* Figures inside article body */
.article-figure,
.module-image {
  max-width: 100%;
  margin: 0 0 1.5rem;
}

.module-image {
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.article-figure img,
.module-image img {
  width: 100%;
  border-radius: var(--r-md);
}

.article-figure figcaption,
.module-image figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.45;
}

.article-figure-left,
.article-figure-right { width: min(46%, 340px); }
.article-figure-left { float: left; margin: 0.3rem 24px 1.2rem 0; }
.article-figure-right { float: right; margin: 0.3rem 0 1.2rem 24px; }

/* Responsive YouTube embed */
.video-embed {
  max-width: 68ch;
  margin: 1.6rem 0;
  overflow: hidden;
  border-radius: var(--r-md);
  background: #000;
}

.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

/* Migrated posts carry a few hardcoded inline colours that would otherwise
   clash with the theme (and fail contrast in dark mode). Neutralise them. */
.article-content p[style*="background-color: #333"],
.article-content p[style*="background-color: #f0f0f0"] {
  max-width: 68ch;
  padding: 12px 16px !important;
  border-radius: var(--r-sm);
  background: var(--surface-2) !important;
  color: var(--ink-2) !important;
  font-size: 0.95rem;
}

.article-content p[style*="font-weight: 400"] { font-weight: 400 !important; }

/* Google search-result classes were pasted into one post; keep them neutral. */
.article-content .LC20lb,
.article-content .MBeuO,
.article-content .DKV0Md { font-family: var(--sans); color: var(--ink); }

/* --- Utilities ---------------------------------------------------------- */
.is-hidden { display: none !important; }

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

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
  .article-columns { grid-template-columns: minmax(0, 1fr) 220px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-column-wide { grid-column: 1 / -1; }
}

@media (max-width: 940px) {
  .founder-grid,
  .feature-card,
  .article-columns { grid-template-columns: 1fr; }

  .article-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-hero > .crumbs,
  .article-hero > .article-topline,
  .article-hero h1,
  .article-hero .lede,
  .article-meta-row,
  .article-hero-image {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-banner {
    min-height: auto;
    margin-bottom: 20px;
  }

  .hero-banner-inner {
    align-items: center;
    width: min(90%, calc(100% - 32px));
    padding: 0 0 20px;
  }

  .hero-copy-home h1 {
    max-width: 10ch;
    font-size: clamp(2.4rem, 8.4vw, 4rem);
  }

  .article-hero-image {
    max-width: none;
    margin-left: 0;
  }

  .article-rail {
    position: static;
    grid-template-columns: 1fr;
    order: 2;
  }

  .rail-block + .rail-block {
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .founder-grid { justify-items: center; text-align: left; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-column-wide { grid-column: auto; }
}

@media (max-width: 720px) {
  .page-shell { width: min(100%, calc(100% - 28px)); padding-bottom: 64px; }

  .article-hero > .crumbs,
  .article-hero > .article-topline {
    display: none;
  }

  .site-header {
    gap: 10px;
    align-items: flex-start;
    padding: 8px 14px;
  }
  .site-mark {
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9rem;
  }
  .site-logo { width: clamp(138px, 40vw, 172px); }
  .menu-toggle { display: inline-flex; flex: none; }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--page) 96%, transparent);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  body.is-scrolled .site-logo {
    width: clamp(148px, 42vw, 190px);
    max-height: 28px;
    transform: none;
  }

  body.is-scrolled .site-header {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }

  .hero-banner {
    min-height: 400px;
    margin-left: calc(50% - 50vw);
  }

  .hero-banner-inner {
    width: 90%;
    align-items: flex-end;
    padding-top: 0;
    padding-bottom: 18px;
  }

  .hero-banner-shade {
    background:
      linear-gradient(180deg, rgba(10, 11, 8, 0.28) 0%, rgba(10, 11, 8, 0.24) 28%, rgba(10, 11, 8, 0.9) 100%),
      linear-gradient(90deg, rgba(10, 11, 8, 0.62) 0%, rgba(10, 11, 8, 0.18) 100%);
  }

  .hero-copy-wide .lede {
    max-width: 90%;
    margin-top: 12px;
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .hero-actions .button {
    width: auto;
    min-width: 0;
    padding-inline: 20px;
    padding-block: 12px;
    font-size: 0.95rem;
  }

  .hero-copy-home h1 {
    max-width: 6ch;
    font-size: clamp(1.95rem, 8.8vw, 2.9rem);
    line-height: 0.86;
  }

  .site-footer {
    gap: 20px;
    padding: 22px 18px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-input { flex: 1 1 100%; }
  .filter-select { flex: 1 1 100%; }

  .article-content { font-size: 1.1rem; line-height: 1.72; }

  .article-figure-left,
  .article-figure-right {
    float: none;
    width: 100%;
    margin: 0 0 1.3rem;
  }
}

@media (max-width: 420px) {
  .hero-copy-home h1 {
    max-width: 6ch;
    font-size: clamp(1.85rem, 8.2vw, 2.55rem);
  }

  .hero-banner-inner,
  .hero-copy-wide,
  .hero-copy-wide .lede {
    width: 90%;
    max-width: 90%;
  }
  .card-grid { grid-template-columns: 1fr; }
}
