/* ============================================================
   Airtable Facile — Ghost theme
   Design tokens & styles derived from the "Airtable Facile"
   design system (stacked-layers logo: blue / yellow / red).
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* Brand core (exact logo faces) */
  --at-blue:   #29BEEC;
  --at-yellow: #FDC500;
  --at-red:    #E5304A;

  /* Blue scale (primary) */
  --blue-50:  #EAF8FD;
  --blue-100: #CBEFFA;
  --blue-200: #9CE1F5;
  --blue-300: #63D0EF;
  --blue-400: #29BEEC;
  --blue-500: #16A8DA;
  --blue-600: #0E88B4;
  --blue-700: #0C6C8F;
  --blue-800: #0E566F;
  --blue-900: #0F475C;

  /* Yellow scale (accent) */
  --yellow-50:  #FFF9E3;
  --yellow-100: #FFEFB0;
  --yellow-400: #FDC500;
  --yellow-500: #E3AE00;
  --yellow-700: #8C6900;

  /* Red scale (accent / danger) */
  --red-50:  #FDECEE;
  --red-100: #FBD2D7;
  --red-400: #E5304A;
  --red-500: #CC2340;
  --red-600: #A81A34;
  --red-700: #7F1428;

  /* Green (success) */
  --green-50:  #E9F9F0;
  --green-400: #22B573;
  --green-600: #148A55;

  /* Neutrals (cool slate) */
  --slate-0:   #FFFFFF;
  --slate-25:  #FBFCFD;
  --slate-50:  #F5F7F9;
  --slate-100: #EDF0F3;
  --slate-200: #E1E6EB;
  --slate-300: #CBD3DA;
  --slate-400: #9AA6B2;
  --slate-500: #6B7885;
  --slate-600: #4C5966;
  --slate-700: #37424D;
  --slate-800: #232C34;
  --slate-900: #131A20;

  /* Semantic */
  --color-primary:        var(--blue-400);
  --color-primary-hover:  var(--blue-500);
  --color-primary-active: var(--blue-600);
  --color-primary-subtle: var(--blue-50);
  --color-on-primary:     #FFFFFF;

  --text-strong:   var(--slate-900);
  --text-body:     var(--slate-700);
  --text-muted:    var(--slate-500);
  --text-faint:    var(--slate-400);
  --text-link:     var(--blue-600);
  --text-link-hover: var(--blue-700);

  --surface-page:    var(--slate-50);
  --surface-card:    var(--slate-0);
  --surface-sunken:  var(--slate-100);
  --surface-inverse: var(--slate-900);

  --border-subtle:  var(--slate-200);
  --border-default: var(--slate-300);
  --border-strong:  var(--slate-400);
  --border-focus:   var(--blue-400);

  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--blue-400) 40%, transparent);

  /* Type */
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-3xl:  3rem;
  --text-4xl:  3.75rem;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;
  --weight-extrabold: 800;

  --leading-tight:   1.1;
  --leading-snug:    1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;
  --tracking-wide:   0.04em;

  /* Spacing (4px grid) */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;   --space-24: 6rem;

  --container-max: 1200px;
  --content-max: 720px;
  --gutter: var(--space-6);

  /* Radius */
  --radius-xs: 4px;  --radius-sm: 6px;  --radius-md: 10px;
  --radius-lg: 14px; --radius-xl: 20px; --radius-2xl: 28px;
  --radius-pill: 999px;

  /* Shadows (soft, slate-tinted) */
  --shadow-xs: 0 1px 2px rgba(19,26,32,.06);
  --shadow-sm: 0 1px 3px rgba(19,26,32,.08), 0 1px 2px rgba(19,26,32,.04);
  --shadow-md: 0 4px 12px rgba(19,26,32,.08), 0 2px 4px rgba(19,26,32,.05);
  --shadow-lg: 0 12px 28px rgba(19,26,32,.12), 0 4px 8px rgba(19,26,32,.06);
  --shadow-xl: 0 24px 56px rgba(19,26,32,.16), 0 8px 16px rgba(19,26,32,.08);
  --shadow-primary: 0 6px 18px color-mix(in srgb, var(--blue-400) 42%, transparent);
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--gh-font-body, var(--font-sans));
  font-size: var(--text-md);
  line-height: var(--body-leading, var(--leading-relaxed));
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--text-link-hover); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gh-font-heading, var(--font-sans));
  color: var(--text-strong);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
}

/* ---------- LAYOUT ---------- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(var(--content-max) + 2 * var(--gutter)); }
.section { padding: var(--space-16) 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: var(--space-2);
  background: var(--surface-card); color: var(--text-link);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); z-index: 100;
}
.skip-link:focus { left: var(--space-4); }

/* ---------- SITE HEADER ---------- */
.site-header {
  background: color-mix(in srgb, var(--surface-card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-6); min-height: 68px;
}
.site-brand { display: inline-flex; align-items: center; gap: var(--space-3); }
.site-brand__logo { width: 34px; height: 34px; object-fit: contain; }
.site-brand__name {
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
  font-size: var(--text-md);
  color: var(--text-strong);
}
.site-nav { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.site-nav a {
  color: var(--text-body); font-weight: var(--weight-semibold);
  font-size: var(--text-sm); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md); transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { color: var(--text-strong); background: var(--surface-sunken); }
.site-header__actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--space-2); color: var(--text-strong);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-weight: var(--weight-bold);
  font-size: var(--text-base); line-height: 1; letter-spacing: var(--tracking-snug);
  padding: 10px 18px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; user-select: none;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); color: #fff; box-shadow: var(--shadow-primary); }
.btn--secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); }
.btn--secondary:hover { background: var(--surface-sunken); border-color: var(--border-strong); color: var(--text-strong); }
.btn--ghost { background: transparent; color: var(--text-link); }
.btn--ghost:hover { background: var(--color-primary-subtle); }
.btn--sm { padding: 7px 14px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.btn--lg { padding: 14px 26px; font-size: var(--text-md); border-radius: var(--radius-lg); }

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; font-size: var(--text-xs); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug); line-height: 1.4;
  border-radius: var(--radius-pill); color: var(--blue-700); background: var(--blue-50);
  white-space: nowrap;
}
.badge--neutral { color: var(--slate-600); background: var(--slate-100); }
.badge--yellow { color: var(--yellow-700); background: var(--yellow-50); }
.badge--red { color: var(--red-600); background: var(--red-50); }
.badge--green { color: var(--green-600); background: var(--green-50); }

/* ---------- HERO (home) ---------- */
.hero { padding: var(--space-20) 0 var(--space-12); text-align: center; position: relative; overflow: hidden; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  color: var(--text-muted); margin-bottom: var(--space-5);
}
.hero__layers { display: inline-flex; gap: 5px; }
.hero__layers span { width: 14px; height: 8px; border-radius: 3px; }
.hero__layers span:nth-child(1) { background: var(--at-blue); }
.hero__layers span:nth-child(2) { background: var(--at-yellow); }
.hero__layers span:nth-child(3) { background: var(--at-red); }
.hero__title {
  font-size: clamp(var(--text-2xl), 6vw, var(--text-4xl));
  max-width: 900px; margin: 0 auto var(--space-5);
}
.hero__subtitle {
  font-size: var(--text-lg); color: var(--text-body);
  max-width: var(--content-max); margin: 0 auto var(--space-8);
  font-weight: var(--weight-medium);
}
.hero__cta { display: inline-flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }

/* ---------- HOME RESOURCE LINKS (encart 4 liens, home only) ---------- */
.home-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4);
  max-width: var(--container-max); margin: var(--space-4) auto 0; text-align: left;
}
.home-link {
  position: relative; display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-6); padding-top: var(--space-8);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.home-link::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--at-blue); }
.home-link--blue::before   { background: var(--at-blue); }
.home-link--red::before    { background: var(--at-red); }
.home-link--yellow::before { background: var(--at-yellow); }
.home-link--green::before  { background: var(--green-400); }
.home-link:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-default); }
.home-link__label { font-weight: var(--weight-extrabold); color: var(--text-strong); font-size: var(--text-md); letter-spacing: var(--tracking-snug); }
.home-link__desc { color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-snug); }
.home-link__arrow { margin-top: var(--space-2); color: var(--text-link); font-weight: var(--weight-bold); font-size: var(--text-md); }
.home-link:hover .home-link__arrow { color: var(--text-link-hover); }
@media (max-width: 900px) { .home-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .home-links { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .home-link { padding: var(--space-4); padding-top: var(--space-6); } }

/* Consulting CTA button inside the nav (override .site-nav a base styles) */
.site-nav a.site-nav__cta { color: #fff; background: var(--color-primary); padding: 7px 14px; }
.site-nav a.site-nav__cta:hover { color: #fff; background: var(--color-primary-hover); box-shadow: var(--shadow-primary); }

/* Nav dropdown "Nos outils" */
.site-nav__dropdown { position: relative; }
.site-nav__dropdown-toggle {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  background: none; border: none; font-family: var(--font-sans);
  color: var(--text-body); font-weight: var(--weight-semibold); font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  transition: background .15s ease, color .15s ease;
}
.site-nav__dropdown-toggle:hover { color: var(--text-strong); background: var(--surface-sunken); }
.site-nav__chevron { transition: transform .15s ease; }
.site-nav__dropdown[data-open="true"] .site-nav__chevron { transform: rotate(180deg); }
.site-nav__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-2);
  display: none; z-index: 60;
}
.site-nav__dropdown[data-open="true"] .site-nav__menu { display: block; }
.site-nav__menu a {
  display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--text-body); font-weight: var(--weight-semibold); font-size: var(--text-sm);
}
.site-nav__menu a:hover { background: var(--surface-sunken); color: var(--text-strong); }

/* ---------- POST GRID ---------- */
.post-grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); flex-wrap: wrap; }
.section-head h2 { font-size: var(--text-xl); margin: 0; }
.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- POST CARD ---------- */
.post-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-default); }
.post-card__accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2; background: var(--at-blue); }
/* Rotate accent colors across the grid, echoing the logo's stacked layers */
.post-grid > .post-card:nth-child(3n+1) .post-card__accent { background: var(--at-blue); }
.post-grid > .post-card:nth-child(3n+2) .post-card__accent { background: var(--at-yellow); }
.post-grid > .post-card:nth-child(3n+3) .post-card__accent { background: var(--at-red); }
.post-card--featured .post-card__accent { background: var(--at-blue); }
/* Hide the top accent bar everywhere — it clashes with the colored article covers
   (home page 1, paginated pages, tag & author archives) */
.post-card__accent { display: none; }
.post-card__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-sunken); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-muted); flex-wrap: wrap; }
.post-card__title { font-size: var(--text-lg); margin: 0; }
.post-card__title a { color: var(--text-strong); }
.post-card__title a:hover { color: var(--text-link); }
.post-card__excerpt { color: var(--text-body); font-size: var(--text-base); margin: 0; }
.post-card__footer { margin-top: auto; display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-muted); }
.post-card--featured { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .post-card--featured { flex-direction: row; }
  .post-card--featured .post-card__image { flex: 1 1 55%; aspect-ratio: auto; }
  .post-card--featured .post-card__body { flex: 1 1 45%; justify-content: center; padding: var(--space-12); }
  .post-card--featured .post-card__title { font-size: var(--text-2xl); }
  .post-card--featured .post-card__excerpt { font-size: var(--text-md); }
}

/* author avatar */
.avatar { width: 26px; height: 26px; border-radius: var(--radius-pill); object-fit: cover; background: var(--surface-sunken); }
.avatar--placeholder { display: inline-flex; align-items: center; justify-content: center; font-weight: var(--weight-bold); font-size: var(--text-xs); color: var(--blue-700); background: var(--blue-50); }
.meta-dot { color: var(--text-faint); }

/* ---------- PAGINATION ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-16); }
.pagination__label { color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); }

/* ---------- ARCHIVE HEADER (tag / author) ---------- */
.archive-header { padding: var(--space-16) 0 var(--space-8); text-align: center; }
.archive-header__title { font-size: var(--text-2xl); }
.archive-header__desc { color: var(--text-body); font-size: var(--text-md); max-width: var(--content-max); margin: var(--space-3) auto 0; }
.archive-header__avatar { width: 84px; height: 84px; border-radius: var(--radius-pill); margin: 0 auto var(--space-5); box-shadow: var(--shadow-md); }

/* ---------- SINGLE POST ---------- */
.post-hero { padding: var(--space-16) 0 var(--space-8); }
.post-hero__meta { display: flex; align-items: center; gap: var(--space-3); justify-content: center; font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-5); flex-wrap: wrap; }
.post-hero__title { font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl)); text-align: center; max-width: 880px; margin: 0 auto var(--space-4); }
.post-hero__excerpt { font-size: var(--text-lg); color: var(--text-body); text-align: center; max-width: var(--content-max); margin: 0 auto; font-weight: var(--weight-medium); }
.post-hero__byline { display: flex; align-items: center; gap: var(--space-3); justify-content: center; margin-top: var(--space-6); }
.post-hero__byline .avatar { width: 40px; height: 40px; }
.post-hero__author-name { font-weight: var(--weight-bold); color: var(--text-strong); font-size: var(--text-sm); }
.post-hero__author-meta { font-size: var(--text-xs); color: var(--text-muted); }
.post-feature-image { max-width: var(--container-max); margin: var(--space-8) auto; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.post-feature-image img { width: 100%; }

/* ---------- CONTENT (Koenig) ---------- */
.post-content { max-width: var(--content-max); margin: 0 auto; padding: var(--space-8) 0 var(--space-16); font-size: var(--text-md); color: var(--text-body); line-height: var(--leading-relaxed); }
.post-content > * { margin-top: 0; margin-bottom: var(--space-6); }
.post-content h2 {
  font-size: var(--text-2xl); margin-top: var(--space-16);
  padding-bottom: var(--space-3); border-bottom: 2px solid var(--border-subtle);
}
.post-content h3 {
  font-size: var(--text-lg); margin-top: var(--space-10); color: var(--text-strong);
  padding-left: var(--space-3); border-left: 3px solid var(--at-blue);
}
.post-content h4 { font-size: var(--text-md); margin-top: var(--space-6); color: var(--text-strong); }
.post-content h2, .post-content h3, .post-content h4 { scroll-margin-top: 88px; }

/* ---------- TABLE OF CONTENTS ---------- */
.post-layout { display: block; }
.post-main { min-width: 0; }
.post-toc {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-8);
}
.post-toc__title {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--text-muted); font-weight: var(--weight-bold); margin: 0 0 var(--space-3);
}
.post-toc__nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border-subtle); }
.post-toc__item a {
  display: block; padding: var(--space-1) var(--space-3); margin-left: -2px;
  font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-snug);
  border-left: 2px solid transparent; transition: color .15s ease, border-color .15s ease;
}
.post-toc__item a:hover { color: var(--text-strong); }
.post-toc__item--h3 a { padding-left: var(--space-6); font-size: var(--text-xs); }
.post-toc__item a.is-active { color: var(--text-link); border-left-color: var(--at-blue); font-weight: var(--weight-semibold); }
@media (min-width: 1120px) {
  .post-layout {
    display: grid; grid-template-columns: 1fr minmax(0, var(--content-max)) 1fr;
    gap: var(--space-8); align-items: start;
  }
  .post-toc {
    grid-column: 1; justify-self: end; width: 250px;
    position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto;
    background: none; border: none; padding: 0; margin: 0;
  }
  .post-main { grid-column: 2; }
  .post-content { padding-top: var(--space-4); }
}
.post-content a { color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--blue-400) 45%, transparent); }
.post-content a:hover { color: var(--text-link-hover); text-decoration-color: var(--blue-500); }
.post-content ul, .post-content ol { padding-left: var(--space-6); }
.post-content li { margin-bottom: var(--space-2); }
.post-content ul li::marker { color: var(--at-blue); }
.post-content strong { color: var(--text-strong); font-weight: var(--weight-bold); }
.post-content blockquote {
  margin: var(--space-8) 0; padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--at-blue); background: var(--blue-50);
  border-radius: var(--radius-md); color: var(--slate-800);
  font-size: var(--text-md);
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content hr { border: none; border-top: 1px solid var(--border-subtle); margin: var(--space-12) 0; }
.post-content code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--surface-sunken); color: var(--red-600);
  padding: 2px 6px; border-radius: var(--radius-sm);
}
.post-content pre {
  font-family: var(--font-mono); background: var(--slate-900); color: var(--slate-100);
  padding: var(--space-5); border-radius: var(--radius-lg); overflow-x: auto;
  font-size: var(--text-sm); line-height: var(--leading-normal);
  box-shadow: var(--shadow-md);
}
.post-content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.post-content img { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.post-content table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.post-content th, .post-content td { padding: var(--space-3); border-bottom: 1px solid var(--border-subtle); text-align: left; }
.post-content th { font-weight: var(--weight-bold); color: var(--text-strong); background: var(--surface-sunken); }

/* Koenig card widths & cards */
.kg-width-wide { max-width: min(1080px, 92vw); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.kg-width-full img { border-radius: 0; }
.post-content .kg-card { margin-bottom: var(--space-8); }
.kg-embed-card, .kg-image-card, .kg-gallery-card { display: flex; flex-direction: column; align-items: center; }
figcaption { text-align: center; font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-3); }
.kg-callout-card { display: flex; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); border-left: 4px solid var(--at-blue); background: var(--blue-50); }
.kg-callout-card-blue { border-color: var(--at-blue); background: var(--blue-50); }
.kg-callout-card-yellow { border-color: var(--at-yellow); background: var(--yellow-50); }
.kg-callout-card-red { border-color: var(--at-red); background: var(--red-50); }
.kg-callout-card-green { border-color: var(--green-400); background: var(--green-50); }
.kg-callout-card-grey { border-color: var(--slate-400); background: var(--slate-100); }
.kg-callout-emoji { font-size: 1.25rem; }
.kg-callout-text { color: var(--slate-800); }
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container { display: flex; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); color: var(--text-body); text-decoration: none; transition: box-shadow .18s ease, transform .18s ease; }
.kg-bookmark-container:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text-body); }
.kg-bookmark-content { flex: 1; padding: var(--space-5); order: 0; }
.kg-bookmark-title { font-weight: var(--weight-bold); color: var(--text-strong); }
.kg-bookmark-description { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--text-xs); color: var(--text-muted); }
.kg-bookmark-thumbnail { flex: 0 0 33%; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-icon { width: 18px; height: 18px; }
.kg-button-card { display: flex; }
.kg-button-card.kg-align-center { justify-content: center; }
.kg-btn {
  display: inline-flex; align-items: center; padding: 12px 22px;
  border-radius: var(--radius-md); font-weight: var(--weight-bold);
  background: var(--color-primary); color: #fff !important; text-decoration: none !important;
}
.kg-btn:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-primary); }
.kg-toggle-card { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.kg-header-card { padding: var(--space-16) var(--space-6); border-radius: var(--radius-xl); text-align: center; }

/* ---------- TAGS ON POST ---------- */
.post-tags { max-width: var(--content-max); margin: 0 auto; padding-bottom: var(--space-8); display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ---------- AUTHOR BOX ---------- */
.author-box { max-width: var(--content-max); margin: var(--space-8) auto 0; padding: var(--space-6); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: flex; gap: var(--space-4); }
.author-box .avatar { width: 56px; height: 56px; flex: 0 0 auto; }
.author-box__name { font-weight: var(--weight-extrabold); color: var(--text-strong); letter-spacing: var(--tracking-snug); }
.author-box__bio { color: var(--text-body); font-size: var(--text-base); margin: var(--space-1) 0 0; }

/* ---------- READ NEXT ---------- */
.read-next { background: var(--surface-card); border-top: 1px solid var(--border-subtle); }

/* ---------- CTA / SUBSCRIBE ---------- */
.subscribe {
  background: var(--surface-inverse); color: #fff; border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-8); text-align: center; position: relative; overflow: hidden;
}
.subscribe::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 200px at 80% -10%, color-mix(in srgb, var(--at-blue) 22%, transparent), transparent),
    radial-gradient(500px 200px at 10% 120%, color-mix(in srgb, var(--at-red) 16%, transparent), transparent);
  pointer-events: none;
}
.subscribe > * { position: relative; }
.subscribe h2 { color: #fff; font-size: var(--text-2xl); }
.subscribe p { color: var(--slate-300); max-width: 520px; margin: 0 auto var(--space-8); font-size: var(--text-md); }
.subscribe-form { display: flex; gap: var(--space-3); max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.subscribe-form input {
  flex: 1; min-width: 220px; height: 48px; padding: 0 var(--space-4);
  border-radius: var(--radius-md); border: 1px solid var(--slate-700);
  background: var(--slate-800); color: #fff; font-family: var(--font-sans); font-size: var(--text-base);
}
.subscribe-form input::placeholder { color: var(--slate-400); }
.subscribe-form input:focus { outline: none; border-color: var(--at-blue); box-shadow: var(--focus-ring); }
.subscribe-form .btn { height: 48px; }
.subscribe__note { color: var(--slate-400); font-size: var(--text-xs); margin-top: var(--space-4); }
.subscribe__success { color: #fff; font-size: var(--text-md); font-weight: var(--weight-semibold); margin: var(--space-4) auto 0; max-width: 480px; }

/* ---------- LANDING PAGES ---------- */
.lp-hero { padding-bottom: var(--space-8); }
.lp-section-head { text-align: center; max-width: var(--content-max); margin: 0 auto var(--space-12); }
.lp-section-head h2 { font-size: var(--text-2xl); }
.lp-section-head p { color: var(--text-muted); font-size: var(--text-md); margin: 0; }

.lp-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(2, 1fr); }
.lp-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .lp-grid, .lp-grid--3 { grid-template-columns: 1fr; } }
.lp-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: var(--space-8);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  gap: var(--space-4); align-items: flex-start;
}
.lp-card--sm { padding: var(--space-6); border-radius: var(--radius-lg); }
.lp-card h2, .lp-card h3 { margin: 0; }
.lp-card h2 { font-size: var(--text-xl); }
.lp-card h3 { font-size: var(--text-md); }
.lp-card p { margin: 0; color: var(--text-body); font-size: var(--text-base); }
.lp-card__icon { font-size: 1.75rem; line-height: 1; }
.lp-card .btn { margin-top: auto; }

.lp-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.lp-check li { position: relative; padding-left: var(--space-6); color: var(--text-body); }
.lp-check li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green-600); font-weight: var(--weight-bold); }

.lp-stats { display: flex; flex-wrap: wrap; gap: var(--space-10); justify-content: center; text-align: center; }
.lp-stat__num { font-size: var(--text-3xl); font-weight: var(--weight-extrabold); color: var(--at-blue); letter-spacing: var(--tracking-tight); line-height: 1; }
.lp-stat__label { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-2); }

.lp-steps { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.lp-step { position: relative; padding-top: var(--space-12); }
.lp-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-50); color: var(--blue-700); border-radius: var(--radius-pill);
  font-weight: var(--weight-extrabold); font-size: var(--text-md);
}
.lp-step h3 { font-size: var(--text-md); margin: 0 0 var(--space-2); }
.lp-step p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.lp-note { text-align: center; color: var(--text-muted); font-size: var(--text-sm); }
.lp-check--inline { flex-direction: row; flex-wrap: wrap; gap: var(--space-5); justify-content: center; margin-top: var(--space-6); }
.lp-check--inline li { padding-left: var(--space-6); }
.lp-badges { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.lp-badges .badge { font-size: var(--text-sm); padding: 6px 14px; }

/* client logos strip */
.lp-logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-8); align-items: center; justify-items: center; }
@media (max-width: 800px) { .lp-logos { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); } }
@media (max-width: 460px) { .lp-logos { grid-template-columns: repeat(2, 1fr); } }
.lp-logos img { max-height: 46px; width: auto; max-width: 140px; object-fit: contain; opacity: .6; filter: grayscale(1); transition: opacity .18s ease, filter .18s ease; }
.lp-logos img:hover { opacity: 1; filter: none; }
.lp-logos--all { grid-template-columns: repeat(6, 1fr); gap: var(--space-6) var(--space-8); }
.lp-logos--all img { max-height: 38px; max-width: 120px; }
@media (max-width: 800px) { .lp-logos--all { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .lp-logos--all { grid-template-columns: repeat(2, 1fr); } }

/* testimonials (masonry via columns) */
.lp-quotes { columns: 3; column-gap: var(--space-6); }
@media (max-width: 900px) { .lp-quotes { columns: 2; } }
@media (max-width: 600px) { .lp-quotes { columns: 1; } }
.lp-quote { break-inside: avoid; margin: 0 0 var(--space-6); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.lp-quote p { margin: 0 0 var(--space-4); color: var(--text-body); font-size: var(--text-base); }
.lp-quote__by { display: flex; align-items: center; gap: var(--space-3); }
.lp-quote__avatar { width: 44px; height: 44px; border-radius: var(--radius-pill); object-fit: cover; flex: 0 0 auto; background: var(--surface-sunken); }
.lp-quote__avatar--ph { display: inline-flex; align-items: center; justify-content: center; font-weight: var(--weight-bold); font-size: var(--text-sm); color: var(--blue-700); background: var(--blue-50); }
.lp-quote__author { font-weight: var(--weight-bold); color: var(--text-strong); font-size: var(--text-sm); }
.lp-quote__role { color: var(--text-muted); font-size: var(--text-xs); margin-top: 2px; }

/* FAQ accordion */
.lp-faq { max-width: var(--content-max); margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3); }
.lp-faq details { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-6); }
.lp-faq summary { cursor: pointer; font-weight: var(--weight-bold); color: var(--text-strong); font-size: var(--text-md); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--at-blue); font-weight: var(--weight-bold); font-size: var(--text-xl); line-height: 1; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq details > *:not(summary) { margin: var(--space-4) 0 0; color: var(--text-body); font-size: var(--text-base); }
.lp-faq details p { margin: 0 0 var(--space-2); }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--surface-card); border-top: 1px solid var(--border-subtle); padding: var(--space-16) 0 var(--space-8); margin-top: var(--space-24); }
.site-footer__grid { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; }
.site-footer__brand { max-width: 320px; }
.site-footer__brand p { color: var(--text-muted); font-size: var(--text-sm); margin: var(--space-3) 0 0; }
.site-footer__newsletter { flex: 1 1 360px; max-width: 420px; }
.site-footer__newsletter-title { font-size: var(--text-md); margin-bottom: var(--space-2); }
.site-footer__newsletter p { color: var(--text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-4); }
.site-footer__newsletter .ml-embedded { min-height: 40px; }
.site-footer__nav { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.site-footer__nav a { color: var(--text-body); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.site-footer__nav a:hover { color: var(--text-strong); }
.site-footer__bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.site-footer__bottom p { color: var(--text-faint); font-size: var(--text-xs); margin: 0; }
.site-footer__disclaimer { color: var(--text-faint); font-size: var(--text-xs); max-width: 620px; }

/* ---------- ERROR ---------- */
.error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--space-16) 0; }
.error-code { font-size: clamp(var(--text-3xl), 14vw, 9rem); font-weight: var(--weight-extrabold); letter-spacing: var(--tracking-tight); background: linear-gradient(120deg, var(--at-blue), var(--at-yellow) 55%, var(--at-red)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin: 0 0 var(--space-4); }

/* ---------- EMPTY STATE ---------- */
.empty-state { text-align: center; padding: var(--space-24) 0; color: var(--text-muted); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
  :root { --text-md: 1.0625rem; }
  .section { padding: var(--space-12) 0; }
  .site-nav, .site-header__actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header__actions { gap: var(--space-1); }
  .site-header[data-nav-open="true"] .site-nav {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface-card); border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg); padding: var(--space-3);
  }
  .site-header[data-nav-open="true"] .site-nav a { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
  .site-nav { margin-left: 0; }
  .site-nav__dropdown { width: 100%; }
  .site-nav__dropdown-toggle { width: 100%; justify-content: space-between; padding: var(--space-3) var(--space-4); }
  .site-nav__menu { position: static; display: none; box-shadow: none; border: none; padding: 0 0 0 var(--space-4); min-width: 0; }
  .subscribe { padding: var(--space-12) var(--space-5); border-radius: var(--radius-xl); }
}
