/* ─── Design tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

h1, h2, h3, h4, h5, h6 { text-transform: uppercase; }

:root {
  --bg:          #f2efe6;
  --bg-2:        #ece7da;
  --bg-card:     #f8f5ec;
  --ink:         #16181c;
  --ink-2:       #3e434b;
  --ink-3:       #6b7280;
  --line:        #d8d1be;
  --line-2:      #c5bca3;
  --indigo:      #b51621;
  --indigo-dim:  #fae8e9;
  --accent:      #b51621;

  --sans:    "Noto Sans",      ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "Noto Sans Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif:   "Noto Serif",     "Times New Roman", serif;
  --heading: "Barlow Condensed";

  --radius:    4px;
  --radius-lg: 8px;
  --maxw:      1440px;
  --gutter:    clamp(20px, 4vw, 56px);

  /* Fixed dark surface (nav + footer) — does not change with the theme toggle */
  --footer-bg:    #1c1e24;
  --footer-ink:   #f4f2ea;
  --footer-ink-2: #c8c6bd;
  --footer-ink-3: #93969f;
  --footer-line:  rgba(255, 255, 255, 0.1);
  --footer-accent: #e05560;
}

[data-theme="dusk"] {
  --bg:         #14161b;
  --bg-2:       #1a1d24;
  --bg-card:    #1e2229;
  --ink:        #ece7da;
  --ink-2:      #b8b5ac;
  --ink-3:      #7e8089;
  --line:       #2b2f38;
  --line-2:     #3a3f4a;
  --indigo:     #e05560;
  --indigo-dim: #3a1215;
  --accent:     #e05560;
}

/* ─── Base ──────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 180ms, color 180ms;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; padding: 0; }
::selection { background: var(--indigo); color: #fff; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ─── Nav ───────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--footer-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--footer-line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  transform: translateY(10px);
  flex: 1;
}

.nav-links a {
  padding: 7px 11px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--footer-ink-2);
  white-space: nowrap;
  text-transform: uppercase;
  transition: background 100ms, color 100ms;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--footer-line);
  color: var(--footer-ink);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(5px);
  flex-shrink: 0;
}

/* ─── Nav dropdown ──────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--footer-ink-2);
  white-space: nowrap;
  text-transform: uppercase;
  transition: background 100ms, color 100ms;
}

.nav-dropdown__trigger:hover,
.nav-dropdown.active .nav-dropdown__trigger {
  background: var(--footer-line);
  color: var(--footer-ink);
}

.nav-dropdown__chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-dropdown__chevron {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform 150ms;
  color: var(--footer-ink-3);
}

.nav-dropdown:hover .nav-dropdown__chevron,
.nav-dropdown:focus-within .nav-dropdown__chevron {
  transform: rotate(180deg);
}

.nav-dropdown--open .nav-dropdown__chevron {
  transform: rotate(180deg);
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  /* padding-top creates an invisible bridge over the gap so hover doesn't break */
  padding: 6px 0 0;
  z-index: 100;
}

.nav-dropdown__menu::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  top: 0;
}

.nav-dropdown__menu-inner {
  background: var(--footer-bg);
  border: 1px solid var(--footer-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.24);
  padding: 4px;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  display: flex;
  flex-direction: column;
}

.nav-dropdown__menu-inner a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--footer-ink-2);
  white-space: nowrap;
  transition: background 100ms, color 100ms;
}

.nav-dropdown__menu-inner a:hover,
.nav-dropdown__menu-inner a.active {
  background: var(--footer-line);
  color: var(--footer-ink);
}

/* ─── Lang switcher ─────────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  display: inline-block;
  padding: 5px 9px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--footer-ink-3);
  transition: background 100ms, color 100ms;
}

a.lang-btn:hover {
  background: var(--footer-line);
  color: var(--footer-ink);
}

.lang-btn--active {
  background: var(--footer-line);
  color: var(--footer-ink);
}

/* ─── Theme toggle ──────────────────────────────────────────── */
.theme-toggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--footer-line);
  border-radius: var(--radius);
  color: var(--footer-ink-3);
  transition: background 100ms, color 100ms, border-color 100ms;
}

.theme-toggle:hover {
  background: var(--footer-line);
  border-color: var(--footer-ink);
  color: var(--footer-ink);
}

.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dusk"] .theme-toggle .icon-moon { display: none; }
[data-theme="dusk"] .theme-toggle .icon-sun  { display: block; }

/* ─── Mobile nav toggle ─────────────────────────────────────── */
.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--footer-ink-2);
  transition: background 100ms, color 100ms;
}

.nav-toggle:hover {
  background: var(--footer-line);
  color: var(--footer-ink);
}

.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav.is-open .nav-toggle .icon-menu { display: none; }
.nav.is-open .nav-toggle .icon-close { display: block; }

/* Locks background scroll while the full-screen mobile menu is open */
html.nav-scroll-lock,
html.nav-scroll-lock body {
  height: 100%;
  overflow: hidden;
}

@media (max-width: 1280px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav.is-open .nav-inner {
    position: fixed;
    inset: 0;
    z-index: 60;
    height: 100vh;
    background: var(--footer-bg);
    padding: 0;
    display: grid;
    grid-template-areas:
      "brand toggle"
      "links links"
      "cta   cta";
    grid-template-rows: 60px 1fr auto;
    grid-template-columns: 1fr auto;
    gap: 0;
  }

  .nav.is-open .brand {
    grid-area: brand;
    padding-inline-start: var(--gutter);
  }

  .nav.is-open .nav-toggle {
    grid-area: toggle;
    margin-inline-end: var(--gutter);
  }

  .nav.is-open .nav-links,
  .nav.is-open .nav-cta {
    display: flex;
    transform: none;
  }

  .nav.is-open .nav-links {
    grid-area: links;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 24px;
    overflow-y: auto;
  }

  .nav-links a,
  .nav-dropdown__trigger {
    width: 100%;
    padding: 14px 10px;
    font-size: 15px;
  }

  .nav-dropdown__trigger {
    justify-content: space-between;
  }

  .nav.is-open .nav-cta {
    grid-area: cta;
    justify-content: space-between;
    padding: 16px var(--gutter) 24px;
    border-top: 1px solid var(--footer-line);
  }

  /* Dropdowns become tap-to-expand accordions instead of hover menus */
  .nav-dropdown:hover .nav-dropdown__menu,
  .nav-dropdown:focus-within .nav-dropdown__menu {
    display: none;
  }

  .nav-dropdown--open .nav-dropdown__menu {
    display: flex;
    flex-direction: column;
  }

  .nav-dropdown__menu {
    position: static;
    padding: 0;
  }

  .nav-dropdown__menu::before {
    display: none;
  }

  .nav-dropdown__menu-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 4px 16px;
  }

  .nav-dropdown__chevron-btn {
    width: 34px;
    height: 34px;
  }
}

/* ─── Breadcrumb ────────────────────────────────────────────── */
/* lives inside the sticky header, so it always moves with the nav */
.breadcrumb {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-line);
  margin: 0;
  padding: 0;
}

.breadcrumb--hidden {
  display: none;
}

nav.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 8px var(--gutter) !important;
  font-size: 13px;
  color: var(--footer-ink-3);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 6px;
  color: var(--footer-ink-3);
}

.breadcrumb a {
  color: var(--footer-ink-3);
  text-decoration: none;
  transition: color 100ms;
}

.breadcrumb a:hover {
  color: var(--footer-accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--footer-ink-2);
}

.breadcrumb-home-icon {
  width: 13px;
  height: 13px;
  vertical-align: -1px;
  flex-shrink: 0;
}

/* ─── Main content ──────────────────────────────────────────── */
.site-main {
  min-height: calc(100vh - 60px - 72px);
}

/* ─── Prose ─────────────────────────────────────────────────── */
.prose h1,
.site-main h1 {
  font-family: var(--heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--ink);
}

.prose h2,
.site-main h2 {
  font-family: var(--heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2.25rem 0 0.6rem;
  color: var(--ink);
}

.prose h3,
.site-main h3 {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
  color: var(--ink);
}

.prose p,
.site-main p {
  margin: 0 0 1rem;
  color: var(--ink-2);
}

.prose a:not(.btn),
.site-main a:not(.btn):not(.post-card) {
  color: var(--indigo);
  text-decoration: none;
  text-underline-offset: 2px; /* re-add text-decoration: underline here or on a child selector to restore selectively */
}

.post-card__title {
  text-decoration: none;
}

.prose ul,
.prose ol,
.site-main ul,
.site-main ol {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
  color: var(--ink-2);
}

.prose li,
.site-main li { margin-bottom: 0.3rem; }

/* standalone content images (a paragraph of their own) span the full column;
   component images have their own classes and keep their layout */
.prose p > img:only-child {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* embedded video iframes (e.g. YouTube), same treatment as content images —
   overflow: hidden is needed too since Safari won't clip a replaced
   element's own content to border-radius without it */
.prose iframe,
.site-main iframe {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.prose code,
.site-main code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}

.prose pre,
.site-main pre {
  font-family: var(--mono);
  font-size: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
}

.prose pre code,
.site-main pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

blockquote {
  border-left: 3px solid var(--indigo);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--ink-2);
  font-style: italic;
}

/* ─── Blog post ─────────────────────────────────────────────── */
.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0 clamp(24px, 4vw, 56px);
  align-items: start;
}

.toc-sidebar {
  position: sticky;
  top: calc(104px + 24px); /* nav (61px) + breadcrumb (43px) */
  max-height: calc(100vh - 104px - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.toc-inner {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.toc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}

.post-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
}

.post-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.post-meta__icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-item {
  line-height: 1.3;
}

.toc-item + .toc-item {
  margin-top: 0.35rem;
}

.toc-item--h3 {
  padding-left: 0.85rem;
}

#toc-sidebar .toc-link {
  display: block;
  font-size: 12.5px;
  text-decoration: none !important;
  padding: 2px 0;
  transition: color 120ms;
  color: var(--ink);
}

#toc-sidebar .toc-link--past {
  color: var(--ink-3);
}

#toc-sidebar .toc-link:hover,
#toc-sidebar .toc-link--active {
  color: var(--accent);
}

@media (max-width: 900px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    display: none;
  }
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 100ms, color 100ms;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 80%, #000);
  color: #fff;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn--primary:disabled:hover {
  background: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-2);
}

.btn--ghost:hover {
  background: var(--bg-2);
  border-color: var(--ink-3);
  color: var(--ink);
}

/* Submitting state for form buttons (see contact-captcha.js): a spinner
   before the label, via ::before so it survives plain textContent updates. */
.btn.is-loading {
  cursor: default;
  opacity: 0.85;
}
.btn.is-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 700ms linear infinite;
}
@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Hero block ────────────────────────────────────────────── */
.block-hero {
  padding-block: clamp(48px, 9vw, 64px);
}

.block-hero--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.block-hero__text { min-width: 0; }

.block-hero__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
}

.block-hero__heading {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.block-hero__highlight {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.block-hero__desc {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 2rem;
  line-height: 1.65;
}

.block-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.block-hero__visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08);
}

.block-hero__img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
}

@media (max-width: 760px) {
  .block-hero--split {
    grid-template-columns: 1fr;
  }
  .block-hero__visual { order: -1; }
  .block-hero__img { height: 240px; }
}

/* ─── Stats block ────────────────────────────────────────────── */
.block-stats {
  padding-block: clamp(24px, 4vw, 48px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-block: clamp(32px, 5vw, 64px);
}

.block-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
}

.block-stats__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.block-stats__item:last-child { border-right: none; }

.block-stats__value {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.block-stats__label {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .block-stats__grid { grid-template-columns: 1fr 1fr; }
  .block-stats__item:nth-child(2n) { border-right: none; }
  .block-stats__item { border-bottom: 1px solid var(--line); }
}

/* ─── Image + Text block ─────────────────────────────────────── */
.block-image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(32px, 5vw, 64px);
}

.block-image-text--reverse .block-image-text__visual { order: 1; }
.block-image-text--reverse .block-image-text__body   { order: 0; }

.block-image-text__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.block-image-text__img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.block-image-text__badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.block-image-text__heading {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--ink);
}

.block-image-text__text {
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0 0 1.75rem;
  max-width: 52ch;
}

@media (max-width: 760px) {
  .block-image-text {
    grid-template-columns: 1fr;
  }
  .block-image-text--reverse .block-image-text__visual { order: 0; }
  .block-image-text--reverse .block-image-text__body   { order: 1; }
  .block-image-text__img { height: 240px; }
}

/* ─── Features block ─────────────────────────────────────────── */
.block-features {
  padding-block: clamp(32px, 5vw, 56px);
}

.block-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.block-features__item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.block-features__icon {
  display: block;
  font-size: 28px;
  margin-bottom: 12px;
}

.block-features__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.block-features__text {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin: 0;
}

/* ─── CTA block ──────────────────────────────────────────────── */
.block-cta {
  background: var(--indigo-dim);
  border: 1px solid color-mix(in srgb, var(--indigo) 25%, transparent);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 52px);
  margin-block: clamp(32px, 5vw, 56px);
  text-align: center;
}

.block-cta__heading {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.block-cta__text {
  color: var(--ink-2);
  max-width: 54ch;
  margin: 0 auto 1.5rem;
}

.block-cta .block-cta__text {
  text-align: center;
  margin-inline: auto;
}

/* ─── Card block ─────────────────────────────────────────────── */
.block-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-block: 16px;
}

.block-card__icon {
  display: block;
  font-size: 28px;
  margin-bottom: 12px;
}

.block-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.block-card__text {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin: 0 0 1rem;
}

.block-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--indigo);
}

.block-card__link:hover { text-decoration: none; }

/* ─── Post list ─────────────────────────────────────────────── */
.block-post-list { padding-block: clamp(32px, 5vw, 64px); }
.block-post-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 3vw, 28px);
}
.block-post-list__empty { color: var(--ink-3); font-size: 0.9375rem; }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms, border-color 200ms;
}
.post-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-color: var(--line-2);
}
.post-card__thumb { overflow: hidden; aspect-ratio: 16 / 9; }
.post-card__img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.post-card__body {
  display: flex; flex-direction: column; gap: 8px;
  padding: clamp(16px, 3vw, 24px);
  flex: 1;
}
.post-card__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.post-card__date {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.post-card__time {
  font-size: 0.75rem; font-weight: 600; color: var(--ink-3);
}
.post-card .post-card__title {
  font-family: var(--heading);
  font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.25; color: var(--ink);
  margin-top: 4px;
}
.post-card__desc {
  font-size: 0.875rem; color: var(--ink-2); line-height: 1.55; flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__read {
  font-size: 0.8125rem; font-weight: 600; color: var(--accent); margin-top: 4px;
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-block: 48px 32px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-col__heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--footer-ink);
  margin: 0 0 14px;
}

.footer-brand {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--footer-ink);
  margin: 0 0 12px;
}

.footer-col--contact address {
  font-style: normal;
  font-size: 13px;
  line-height: 1.8;
  color: var(--footer-ink-3);
}
.footer-col--contact address a {
  color: var(--footer-ink-3);
  text-decoration: none;
}
.footer-col--contact address a:hover {
  color: var(--footer-ink);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 13px;
  color: var(--footer-ink-3);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--footer-ink);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--footer-line);
  color: var(--footer-ink-2);
  transition: background 200ms, color 200ms;
}
.footer-social a:hover {
  background: var(--footer-accent);
  color: var(--footer-bg);
}
.footer-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.footer-partners {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}
.footer-partners img {
  max-height: 160px;
  width: auto;
}

.top-100-innovator {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #000;
  font-size: 12px;
  font-weight: 600;
}

.footer-bottom {
  padding-block: 20px;
  border-top: 1px solid var(--footer-line);
}

.footer-copy {
  font-size: 13px;
  color: var(--footer-ink-3);
}

.post-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin: 0 0 0.75rem;
}
.post-category:hover { text-decoration: underline; }

/* ─── Tags ──────────────────────────────────────────────────── */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.8125rem; font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 200ms, color 200ms;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.tag-chip__count { font-size: 0.75rem; color: var(--ink-3); }

.block-tag-cloud { padding-block: clamp(24px, 4vw, 48px); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud .tag-chip { font-size: 0.9375rem; padding: 6px 16px; }

/* tags in the blog post sidebar, below the table of contents;
   needs the extra class to win over the ".site-main p" margin reset */
.toc-sidebar .toc-label--tags { margin-top: 1.5rem; }
.toc-sidebar .post-tags { margin: 0; gap: 6px; }
.toc-sidebar .tag-chip { font-size: 0.75rem; padding: 2px 10px; }

/* ─── Category list (blog index) ────────────────────────────── */
.block-category-list { padding-block: clamp(24px, 4vw, 48px) 0; }
.block-category-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(12px, 2vw, 20px);
}
.category-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(16px, 2.5vw, 22px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms, border-color 200ms;
}
.category-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-color: var(--line-2);
}
.category-card .category-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.category-card__desc {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1;
  margin: 0;
}
.category-card__count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Progressive images: ResponsiveImage.Img stacks a blurred placeholder and a sharp
   layer in the same grid cell; img-swap.js loads the sharp variant once the element
   is in view, crossfades it in over the blur, then removes the blur layer once the
   fade-out finishes (see the transitionend handler in img-swap.js). */
.js-img-stack {
  /* Some parents (flex containers with center/flex-start alignment) don't
     stretch a block child to fill by default — pin width explicitly so it
     doesn't shrink to its content's (blur- vs sharp-dependent) size.
     justify-items centers the img inside that full-width track when the
     img itself is narrower (e.g. capped by a max-width). */
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  justify-items: center;
}
.js-img-stack > img {
  /* Component classes (e.g. .block-image-text__img) already set width: 100% — this is
     the fallback for images with no such class (plain markdown content images), which
     otherwise render at intrinsic size and can overflow their container. */
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.js-blur-placeholder {
  transition: opacity 300ms ease-out;
}
.js-blur-placeholder.is-hidden {
  opacity: 0;
}
.js-progressive-img {
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.js-progressive-img.is-loaded {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .js-blur-placeholder,
  .js-progressive-img {
    transition: none;
  }
  .btn.is-loading::before {
    animation: none;
  }
}
