:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #172033;
  --muted: #5f6b7a;
  --border: #dbe3ef;
  --brand: #2454d6;
  --brand-dark: #143a99;
  --accent: #0f766e;
  --code-bg: #0f172a;
  --code-text: #e5edf7;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --content-width: 1280px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.pagefind-metadata { display: none; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(36, 84, 214, 0.12), transparent 32rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 24rem, #ffffff 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; border-radius: 14px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: .65rem 1rem;
  background: var(--text);
  color: white;
  z-index: 20;
}
.skip-link:focus { left: 1rem; top: 1rem; }
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(36, 84, 214, 0.72);
  outline-offset: 3px;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 255, 0.92);
  border-bottom: 1px solid rgba(219, 227, 239, 0.9);
}
.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: .85rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 750; }
.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 10px 24px rgba(36, 84, 214, .25);
  letter-spacing: -0.04em;
}
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.site-nav a {
  color: #334155;
  text-decoration: none;
  padding: .42rem .7rem;
  border-radius: 999px;
  font-size: .92rem;
}
.site-nav a:hover { background: #eaf0ff; color: var(--brand-dark); }

.site-main {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 3.2rem 1rem 5rem;
}
.hero {
  padding: clamp(2.2rem, 6vw, 5.6rem);
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,245,255,.88)),
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, .16), transparent 18rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 10px);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.hero--compact { padding: clamp(2rem, 4vw, 3.5rem); }
.hero--compact h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); }
.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1,
.site-main > h1,
article h1 {
  margin: 0 0 1rem;
  color: #0f172a;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: .98;
  letter-spacing: -0.055em;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  text-wrap: balance;
}
.hero__lede {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.65rem; }
.hero--home { margin-bottom: 1rem; }
.hero--home h1 { font-size: clamp(2.35rem, 6vw, 4.8rem); }
.author-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(145deg, #0f172a, #16295f);
  color: #e5edf7;
  border: 1px solid #243a70;
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}
.author-card::after {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -5rem;
  top: -5rem;
  border-radius: 999px;
  background: rgba(94, 234, 212, .13);
}
.author-card__monogram {
  display: grid;
  place-items: center;
  width: 3.7rem;
  height: 3.7rem;
  margin-bottom: 1.4rem;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-weight: 850;
  letter-spacing: -.05em;
}
.author-card__identity { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: .9rem; }
.author-card__identity > div:last-child { min-width: 0; }
.author-card__identity .author-card__monogram { flex: 0 0 auto; margin-bottom: 0; }
.author-card__identity .eyebrow { margin-bottom: .3rem; }
.author-card h2 { margin: 0; color: white; font-size: 1.8rem; letter-spacing: -.035em; }
.author-card p { color: #cbd5e1; line-height: 1.58; }
.author-card__role { margin: .2rem 0 1rem; color: #5eead4 !important; font-weight: 750; }
.profile-links { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.3rem 0 0; list-style: none; }
.profile-links a { display: inline-flex; padding: .38rem .7rem; border: 1px solid #3d5486; border-radius: 999px; color: #e0e7ff; text-decoration: none; font-weight: 700; font-size: .88rem; }
.profile-links a:hover { color: white; background: #243a70; }
.author-card__stats { display: none; }
.author-card__latest {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, .28);
}
.author-card__latest .eyebrow { margin-bottom: .35rem; color: #93c5fd; }
.author-card__latest a {
  display: block;
  color: white;
  font-weight: 760;
  line-height: 1.35;
  text-decoration: none;
}
.author-card__latest a:hover { color: #bfdbfe; text-decoration: underline; }
.author-card__latest span { display: block; margin-top: .35rem; color: #94a3b8; font-size: .8rem; }
.author-card__upstream {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, .28);
}
.upstream-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; }
.upstream-heading .eyebrow { margin: 0; color: #93c5fd; }
.upstream-heading > span { color: #94a3b8; font-size: .7rem; white-space: nowrap; }
.upstream-proof { display: flex; align-items: baseline; gap: .45rem; margin-top: .55rem; }
.upstream-proof strong { color: white; font-size: 1.7rem; line-height: 1; letter-spacing: -.045em; }
.upstream-proof span { color: #dbeafe; font-size: .84rem; font-weight: 720; }
.author-card .upstream-scope { margin: .45rem 0 .6rem; color: #94a3b8; font-size: .76rem; line-height: 1.35; }
.upstream-latest {
  display: block;
  overflow: hidden;
  color: #e0e7ff;
  font-size: .79rem;
  font-weight: 680;
  line-height: 1.4;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upstream-latest span { color: #5eead4; font-size: .68rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.upstream-latest:hover { color: white; text-decoration: underline; }
.upstream-links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; margin-top: .7rem; }
.upstream-links a { color: #bfdbfe; font-size: .75rem; font-weight: 750; text-decoration: none; }
.upstream-links a:hover { color: white; text-decoration: underline; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .72rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #1e293b;
  background: white;
  text-decoration: none;
  font-weight: 700;
}
.button:hover { border-color: #b9c7dc; background: #f8fbff; }
.button--primary { color: white; background: var(--brand); border-color: var(--brand); }
.button--primary:hover { color: white; background: var(--brand-dark); }

.agent-note,
.search-panel,
.page-footer {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15,23,42,.05);
  padding: 1.2rem 1.35rem;
  margin: 1.5rem 0 2rem;
}
.agent-note h2 { margin-top: 0; }

.section-heading { margin: 2.5rem 0 1rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.04em; }
.section-heading--split { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.text-link { font-weight: 750; text-decoration: none; white-space: nowrap; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.topic-grid--archive { margin-top: 2rem; }
.topic-card {
  display: flex;
  flex-direction: column;
  min-height: 10.5rem;
  padding: 1.25rem;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(15,23,42,.05);
}
.topic-card:hover { border-color: #9fb4d7; box-shadow: 0 18px 44px rgba(15,23,42,.08); }
.topic-card strong { display: block; margin: auto 0 .35rem; font-size: 1.12rem; line-height: 1.25; letter-spacing: -.02em; }
.topic-card > span:last-child { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.topic-card__count { color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.post-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 100%;
  padding: 1.25rem;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .05);
}
.post-card:hover { box-shadow: 0 18px 44px rgba(15,23,42,.08); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .post-card { transition: transform .18s ease, box-shadow .18s ease; }
  .post-card:hover { transform: translateY(-2px); }
}
.post-card h3 { margin: 0; font-size: 1.22rem; line-height: 1.25; letter-spacing: -0.02em; }
.post-card h3 a { color: #0f172a; text-decoration: none; }
.post-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.post-card p { margin: 0; color: var(--muted); }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; }
.post-card__date { font-size: .78rem; font-weight: 700; color: var(--muted) !important; }
.topic-badge { display: inline-flex; padding: .18rem .52rem; border-radius: 999px; color: #0f766e; background: #ecfdf5; border: 1px solid #a7f3d0; text-decoration: none; font-size: .75rem; font-weight: 800; }
.topic-badge:hover { color: #115e59; background: #d1fae5; }
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .2rem 0 0; }
.tag-list li,
.tags,
.categories { color: #475569; font-size: .82rem; }
.tag-list li { padding: .18rem .52rem; border-radius: 999px; background: #eef4ff; border: 1px solid #dbe8ff; }
.updated-strip { margin-top: 3rem; }
.updated-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.updated-list a { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; }
.updated-list a:hover { border-color: #9fb4d7; }
.updated-list span { color: var(--muted); font-size: .84rem; }

/* Legacy imported post compatibility + modern article readability */
article[data-pagefind-body] {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem);
  background: rgba(255,255,255,.96);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
article[data-pagefind-body] > header { margin-bottom: 2.2rem; }
article[data-pagefind-body] > header h1 { font-size: clamp(1.9rem, 4.2vw, 3.25rem); line-height: 1.04; }
article main { margin-top: 1.5rem; }
.back-link,
.home-link {
  display: inline-flex;
  margin-bottom: 1.15rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.back-link:hover,
.home-link:hover { color: var(--brand); }
.meta,
.date,
.post-meta { color: var(--muted); font-size: .94rem; }
article h2 { margin-top: 2.35rem; font-size: clamp(1.55rem, 3vw, 2.05rem); letter-spacing: -0.035em; line-height: 1.18; }
article h3 { margin-top: 1.8rem; font-size: 1.25rem; line-height: 1.28; }
article p, article li { color: #253044; }
article ul, article ol { padding-left: 1.3rem; }
article li + li { margin-top: .35rem; }

.disclaimer,
.warning,
.success,
.note,
.update-banner,
.author-box,
.related-posts,
.comments-box {
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin: 1.35rem 0;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.disclaimer { background: #f0f7ff; border-left: 5px solid #3b82f6; color: #28425f; }
.note,
.update-banner { background: #fff8e6; border-left: 5px solid #f59e0b; color: #60440c; }
.warning { background: #fff1f2; border-left: 5px solid #e11d48; color: #671b2b; }
.success { background: #ecfdf5; border-left: 5px solid #10b981; color: #174c3a; }
.author-box,
.related-posts,
.comments-box { background: var(--surface-2); margin-top: 2.2rem; }
.related-posts ul { margin-bottom: 0; }

code { background: #eef2f7; color: #0f172a; padding: .14rem .38rem; border-radius: 7px; font-size: .92em; }
pre { max-width: 100%; background: var(--code-bg); color: var(--code-text); padding: 1rem; border-radius: 16px; overflow-x: auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
pre code { background: transparent; color: inherit; padding: 0; white-space: pre; }
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5rem 0; border-radius: 14px; box-shadow: 0 0 0 1px var(--border); }
th, td { padding: .75rem .85rem; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
th { background: #eef4ff; color: #1e293b; }
tr:nth-child(even) td { background: #fafcff; }
blockquote { margin: 1.5rem 0; padding: .4rem 0 .4rem 1rem; border-left: 5px solid #94a3b8; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.search-panel { max-width: 860px; margin-left: auto; margin-right: auto; }
.search-panel .pagefind-ui__search-input { border-radius: 999px !important; }
.search-hints { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.search-hints ul { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .6rem 0 0; list-style: none; }
.search-hints a { display: inline-flex; padding: .35rem .7rem; border-radius: 999px; background: #eef4ff; text-decoration: none; font-weight: 700; }
.page-footer { color: var(--muted); }

.explore { margin-top: 2rem; }
.explore-controls { padding: clamp(1rem, 3vw, 1.5rem); margin-bottom: 2rem; background: rgba(255,255,255,.94); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15,23,42,.05); }
.explore-controls__heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1rem; }
.explore-controls__heading h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.reset-button { border: 0; background: transparent; color: var(--brand); font: inherit; font-size: .9rem; font-weight: 750; cursor: pointer; }
.filter-grid { display: grid; grid-template-columns: 2fr 1.5fr 1.2fr; gap: .75rem; align-items: end; }
.filter-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.filter-field > span { color: #475569; font-size: .78rem; font-weight: 800; }
.filter-field input,
.filter-field select { width: 100%; min-height: 2.8rem; padding: .6rem .7rem; color: var(--text); background: var(--surface); border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; font-size: .9rem; }
.filter-field input:focus,
.filter-field select:focus { border-color: var(--brand); }
.filter-field select:disabled { opacity: .55; cursor: not-allowed; }
.active-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.filter-chip { padding: .3rem .62rem; color: #1e3a8a; background: #eef4ff; border: 1px solid #c7d8ff; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.explore-status { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; }
.explore-error { margin: .75rem 0 0; padding: .7rem .85rem; color: #9f1239; background: #fff1f2; border-left: 4px solid #e11d48; border-radius: 8px; }
.explore-results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.explore-results-heading h2 { margin: 0; font-size: 1.7rem; }
.explore-results-heading span { color: var(--muted); font-size: .88rem; }
.empty-state { padding: 3rem 1rem; text-align: center; background: var(--surface); border: 1px dashed #94a3b8; border-radius: var(--radius); }
.empty-state h2 { margin-top: 0; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .site-header__inner { align-items: flex-start; flex-direction: column; padding-inline: .85rem; }
  .brand__text { max-width: 14rem; }
  .site-nav { justify-content: flex-start; gap: .15rem; }
  .site-nav a { padding: .34rem .52rem; font-size: .86rem; }
  .site-main { width: 100%; padding: .8rem .5rem 4rem; }
  .hero { border-radius: 22px; padding: 1.25rem; }
  .hero h1 { font-size: clamp(1.55rem, 9vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.12; text-wrap: auto; overflow-wrap: anywhere; word-break: break-word; }
  .hero__actions { gap: .5rem; }
  .button { width: 100%; justify-content: center; }
  .post-card { padding: 1rem; }
  article[data-pagefind-body] { padding: .85rem; border-radius: 18px; max-width: 100%; min-width: 0; }
  article[data-pagefind-body] > header h1 { font-size: clamp(1.35rem, 7vw, 1.8rem); letter-spacing: -0.018em; line-height: 1.18; text-wrap: auto; overflow-wrap: anywhere; word-break: break-word; }
  article p, article li, article h2, article h3, .post-card, .hero, .agent-note, .search-panel { overflow-wrap: anywhere; word-break: break-word; min-width: 0; max-width: 100%; }
  .search-panel { padding: 1rem; }
  .search-hints ul { display: grid; grid-template-columns: 1fr; }
  .section-heading--split,
  .explore-controls__heading { align-items: flex-start; flex-direction: column; }
  .text-link { white-space: normal; }
  .topic-grid,
  .updated-list { grid-template-columns: 1fr; }
  .topic-card { min-height: 9rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-field--query { grid-column: auto; }
  .author-card__upstream { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; padding-top: .8rem; }
  .upstream-heading,
  .upstream-scope,
  .upstream-latest,
  .upstream-links a:last-child { display: none; }
  .upstream-proof { display: inline-flex; margin: 0; }
  .upstream-proof strong { font-size: 1rem; letter-spacing: 0; }
  .upstream-proof span { font-size: .78rem; }
  .upstream-links { display: inline-flex; margin: 0; }
  .upstream-links a { font-size: .78rem; }
}

.utterances-wrapper { margin-top: 2rem; }
.search-noscript { padding: 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #111827;
    --surface-2: #172033;
    --text: #e5edf7;
    --muted: #a7b4c6;
    --border: #2a3a52;
    --brand: #8ab4ff;
    --brand-dark: #bfdbfe;
    --accent: #5eead4;
    --code-bg: #020617;
    --code-text: #dbeafe;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }
  body {
    background:
      radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 32rem),
      linear-gradient(180deg, #0b1220 0%, #0f172a 24rem, #111827 100%);
  }
  .site-header { background: rgba(15, 23, 42, 0.92); border-bottom-color: rgba(42, 58, 82, 0.9); }
  .site-nav a { color: #cbd5e1; }
  .site-nav a:hover { background: #172554; color: #dbeafe; }
  .hero,
  .post-card,
  .topic-card,
  article[data-pagefind-body],
  .agent-note,
  .search-panel,
  .explore-controls,
  .updated-list a,
  .page-footer {
    background: rgba(17, 24, 39, 0.94);
  }
  .hero { background: linear-gradient(135deg, rgba(17,24,39,.96), rgba(15,23,42,.88)); }
  .hero h1,
  .site-main > h1,
  article h1,
  .post-card h3 a { color: #f8fafc; }
  .post-card h3 a:hover { color: var(--brand); }
  article p,
  article li { color: #d5deea; }
  code { background: #1e293b; color: #e2e8f0; }
  th { background: #172554; color: #e5edf7; }
  tr:nth-child(even) td { background: #101827; }
  .tag-list li,
  .search-hints a { background: #172554; border-color: #1d4ed8; color: #dbeafe; }
  .topic-badge { color: #99f6e4; background: #11352f; border-color: #115e59; }
  .filter-field > span { color: #cbd5e1; }
  .filter-field input,
  .filter-field select { border-color: #475569; }
  .filter-chip { color: #dbeafe; background: #172554; border-color: #1d4ed8; }
  .explore-error { color: #fecdd3; background: #3b1119; }
  .disclaimer { background: #10233e; color: #dbeafe; }
  .note,
  .update-banner { background: #2d230d; color: #fde68a; }
  .warning { background: #3b1119; color: #fecdd3; }
  .success { background: #0f2e23; color: #bbf7d0; }
}

@media (min-width: 1200px) {
  .site-main { padding-top: 2rem; }
  .home-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(21rem, .8fr);
    grid-template-areas:
      "intro author"
      "topics author";
    gap: 1rem;
    align-items: stretch;
  }
  .hero--home {
    grid-area: intro;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0;
    padding: clamp(1.8rem, 2.4vw, 2.4rem);
  }
  .hero--home h1 {
    max-width: 28ch;
    font-size: clamp(2.1rem, 2.55vw, 2.5rem);
    line-height: 1.06;
    letter-spacing: -.04em;
  }
  .hero--home .hero__lede { max-width: 70ch; font-size: 1rem; line-height: 1.58; }
  .hero--home .hero__actions { margin-top: 1.15rem; }
  .hero--home .button { padding: .58rem .85rem; font-size: .9rem; }
  .author-card { grid-area: author; height: 100%; padding: 1.45rem 1.55rem; }
  .author-card__monogram { width: 3.1rem; height: 3.1rem; border-radius: 15px; }
  .author-card h2 { font-size: 1.55rem; }
  .author-card p { margin-block: .6rem; font-size: .9rem; line-height: 1.44; }
  .author-card__identity .eyebrow { margin: 0 0 .2rem; font-size: .69rem; }
  .author-card__role { margin: .08rem 0 0 !important; font-size: .84rem !important; line-height: 1.35 !important; }
  .profile-links { margin-top: .75rem; }
  .profile-links a { padding: .3rem .58rem; font-size: .78rem; }
  .author-card__stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin: 1.4rem 0 0;
  }
  .author-card__stats div { padding: .8rem; background: rgba(15, 23, 42, .32); border: 1px solid rgba(96, 165, 250, .22); border-radius: 14px; }
  .author-card__stats dt { color: white; font-size: 1.45rem; font-weight: 820; line-height: 1; }
  .author-card__stats dd { margin: .35rem 0 0; color: #94a3b8; font-size: .74rem; line-height: 1.3; }
  .author-card__upstream { margin-top: 1.1rem; padding-top: 1rem; }
  .upstream-proof strong { font-size: 1.75rem; }
  .upstream-latest { max-width: 100%; }
  .home-topics { grid-area: topics; min-width: 0; }
  .home-topics .section-heading { margin: 0 0 .85rem; }
  .home-topics .section-heading h2 { font-size: clamp(1.75rem, 2.6vw, 2.35rem); }
  .home-topics .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
  .home-topics .topic-card { min-height: 8.25rem; padding: .9rem 1rem; }
  .home-topics .topic-card strong { margin: .6rem 0 .25rem; font-size: .98rem; }
  .home-topics .topic-card > span:last-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .82rem;
    line-height: 1.42;
  }
}

@media (max-width: 1050px) and (min-width: 721px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  :root { color-scheme: light; }
  body { background: white; color: black; font-size: 12pt; }
  .site-header,
  .hero__actions,
  .search-panel,
  .utterances-wrapper,
  .page-footer,
  .skip-link { display: none !important; }
  .site-main,
  article[data-pagefind-body] { width: auto; max-width: none; margin: 0; padding: 0; box-shadow: none; border: 0; }
  a { color: black; text-decoration: underline; }
  pre, code { background: #f4f4f4; color: black; }
}

@media (max-width: 420px) {
  .hero__lede { font-size: .98rem; }
  .eyebrow { font-size: .7rem; letter-spacing: .08em; }
  .site-main { padding-inline: .45rem; }
  .hero, .post-card, .agent-note, .search-panel { padding: .9rem; }
  .brand { max-width: 100%; }
  .site-nav { width: 100%; }
  .site-nav a { flex: 1 1 auto; text-align: center; }
  article[data-pagefind-body] { padding: .75rem; }
  article[data-pagefind-body] > header h1 { font-size: clamp(1.3rem, 6.8vw, 1.7rem); }
}

@media (max-width: 720px) {
  article[data-pagefind-body] > header,
  article[data-pagefind-body] > header * {
    max-width: 100%;
    min-width: 0;
  }
  article[data-pagefind-body] > header h1 {
    display: block;
    width: 100%;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }
  .meta,
  .tags,
  .date,
  .post-meta,
  .back-link {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .disclaimer,
  .note,
  .update-banner,
  .warning,
  .success {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Final mobile hardening: prefer conservative wrapping over oversized display type. */
@media (max-width: 480px) {
  article[data-pagefind-body],
  article[data-pagefind-body] > header,
  article[data-pagefind-body] main,
  article[data-pagefind-body] footer {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  article[data-pagefind-body] > header h1 {
    max-width: 100%;
    font-size: clamp(1.22rem, 5.8vw, 1.55rem);
    line-height: 1.22;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .hero h1,
  #search-title {
    max-width: 100%;
    font-size: clamp(1.55rem, 8.5vw, 2.1rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  article[data-pagefind-body] .meta,
  article[data-pagefind-body] .tags,
  article[data-pagefind-body] .disclaimer,
  article[data-pagefind-body] .note,
  article[data-pagefind-body] p,
  article[data-pagefind-body] li {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Inline code can contain long model names, paths, and commands; wrap it on phones instead of clipping. */
:not(pre) > code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 720px) {
  :not(pre) > code {
    font-size: .88em;
  }
}

@media (max-width: 720px) {
  pre {
    white-space: pre-wrap;
    word-break: break-word;
  }
  pre code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Mobile polish after visual review: add breathing room and trade display scale for reliable wrapping. */
@media (max-width: 520px) {
  .site-main { padding-inline: 1rem; }
  .hero,
  .post-card,
  .agent-note,
  .search-panel,
  article[data-pagefind-body] {
    padding-inline: 1rem;
  }
  .hero h1,
  #search-title {
    font-size: clamp(1.45rem, 7.4vw, 1.95rem);
    line-height: 1.16;
    letter-spacing: -0.015em;
  }
  article[data-pagefind-body] > header h1 {
    font-size: clamp(1.18rem, 5.6vw, 1.45rem);
    line-height: 1.24;
  }
  .hero__lede,
  .post-card p,
  article[data-pagefind-body] p,
  article[data-pagefind-body] li,
  .disclaimer,
  .note,
  .update-banner {
    line-height: 1.62;
  }
}

@media (max-width: 380px) {
  .site-main { padding-inline: .85rem; }
  .hero,
  .post-card,
  .agent-note,
  .search-panel,
  article[data-pagefind-body] { padding-inline: .85rem; }
  .site-nav a { font-size: .82rem; }
}

/* Stack legacy tables on narrow screens so table cells never visually clip mobile content. */
@media (max-width: 720px) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  tr { border-bottom: 1px solid var(--border); }
  th,
  td {
    border-bottom: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
