/* Site styles. Palette: Tailwind indigo (primary), fuchsia (secondary), slate (gray),
   kept from the previous Next.js/Tailwind site. Dark theme is class-based (html.dark),
   set before paint by the inline script in base.html. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/lora-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/lora-latin-wght-italic.woff2") format("woff2");
}

:root {
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-300: #a5b4fc;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-900: #312e81;
  --fuchsia-500: #d946ef;
  --fuchsia-900: #701a75;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --yellow-100: #fef9c3;
  --yellow-500: #eab308;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Lora", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #fff;
  --text: var(--slate-900);
  --text-strong: var(--slate-700);
  --text-muted: var(--slate-500);
  --heading: var(--slate-700);
  --border: var(--slate-200);
  --surface: var(--indigo-50);
  --surface-raised: #fff;
  --link: var(--indigo-500);
  --link-hover-bg: var(--indigo-500);
  --link-hover-text: #fff;
  --code-bg: var(--indigo-50);
  --code-text: var(--indigo-600);
  --pill-bg: var(--slate-200);
  --pill-text: var(--slate-700);
  --footer-bg: var(--slate-200);
  --footer-text: var(--slate-600);
  --focus: var(--indigo-500);
  --focus-offset: var(--indigo-100);
  --card-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --container: 64rem;
  --gutter: 1rem;
  --header-h: 5.5rem; /* sticky .site-top (band + header); offsets anchor jumps and the TOC rail */
  /* Post TOC: every pair is >= 4.5:1 (WCAG AA) on both --bg and --surface (the narrow-screen box). */
  --toc-text: var(--slate-600);   /* 7.6 on #fff, 6.8 on indigo-50 */
  --toc-active: var(--slate-900); /* 17.9 / 16 */
  --toc-accent: var(--indigo-700); /* active marker and hover: 7.9 / 7.1 */

  color-scheme: light;
}

html.dark {
  --bg: var(--slate-800);
  --text: var(--slate-300);
  --text-strong: #fff;
  --text-muted: var(--slate-400);
  --heading: #fff;
  --border: var(--slate-700);
  --surface: var(--slate-900);
  --surface-raised: var(--slate-800);
  --link: var(--indigo-300);
  --link-hover-bg: var(--indigo-500);
  --link-hover-text: #fff;
  --code-bg: var(--slate-900);
  --code-text: var(--indigo-200);
  --pill-bg: var(--slate-700);
  --pill-text: var(--slate-200);
  --footer-bg: var(--slate-700);
  --footer-text: var(--slate-300);
  --focus: var(--indigo-300);
  --focus-offset: var(--indigo-900);
  --card-shadow: 0 20px 25px -5px rgb(99 102 241 / 0.3), 0 8px 10px -6px rgb(99 102 241 / 0.3);
  --toc-text: var(--slate-300);    /* 9.9 on slate-800, 12 on slate-900 */
  --toc-active: #fff;              /* 14.6 / 17.9 */
  --toc-accent: var(--indigo-300); /* 7.3 / 9 */

  color-scheme: dark;
}

@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
}
@media (min-width: 1024px) {
  :root { --gutter: 2rem; }
}

/* ---------- base ---------- */

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

html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1, h2, h3, h4, h5, h6, p, figure, ul, ol, dl, dd {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

::selection {
  background: var(--indigo-500);
  color: #fff;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

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

.muted {
  color: var(--text-muted);
}

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 50;
  padding: 0.75rem;
  background: var(--indigo-600);
  color: #fff;
  font-weight: 700;
  transform: translateY(-120%);
}
.skip-link:focus {
  transform: none;
}

.link {
  color: var(--link);
  text-decoration: underline;
}
.link:hover {
  background: var(--link-hover-bg);
  color: var(--link-hover-text);
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--indigo-600);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--indigo-700);
}

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.block {
  padding-block: 1rem;
}
@media (min-width: 768px) {
  .block { padding-block: 1.5rem; }
}

.block--page-header {
  padding-block: 2rem 1.5rem;
}
@media (min-width: 768px) {
  .block--page-header { padding-block: 3.25rem 2.5rem; }
}

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1.375;
  letter-spacing: 0.025em;
  color: var(--slate-600);
  overflow-wrap: break-word;
}
html.dark .page-title {
  color: #fff;
}
@media (min-width: 640px) { .page-title { font-size: 3rem; } }
@media (min-width: 768px) { .page-title { font-size: 3.75rem; } }
@media (min-width: 1024px) { .page-title { font-size: 4.5rem; } }

.page-lede {
  margin-top: 2.5rem;
  font-size: 1.25rem;
  line-height: 2.5rem;
  color: var(--text-strong);
}
@media (min-width: 768px) {
  .page-lede { font-size: 1.5rem; }
}

/* ---------- header ---------- */

.site-top {
  position: sticky;
  top: 0;
  z-index: 30;
}

.top-band {
  display: flex;
  height: 4px;
}
.top-band span { flex: 1; }
.top-band span:first-child { background: var(--indigo-500); }
.top-band span:last-child { background: var(--fuchsia-500); }

.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.site-header__inner {
  max-width: 80rem;
  margin-inline: auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__start,
.site-header__end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: block;
  width: 3rem;
  height: 3rem;
  position: relative;
  border-radius: 0.25rem;
  background: linear-gradient(to bottom right, var(--indigo-500), var(--indigo-700));
  user-select: none;
}
html.dark .logo {
  background: linear-gradient(to bottom right, var(--indigo-200), var(--indigo-400));
}
.logo__frame {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  color: #fff;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
}
html.dark .logo__frame {
  border-color: var(--slate-800);
  color: var(--slate-800);
}

.menu-toggle {
  display: inline-flex;
  padding: 0.25rem;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 2rem;
}
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.site-nav {
  list-style: none;
  padding: 0;
}
.site-nav a {
  display: block;
  font-weight: 600;
  color: var(--slate-600);
  text-decoration: none;
  border-bottom: 4px solid transparent;
  padding-bottom: 0.5rem;
  margin-bottom: -0.5rem;
}
html.dark .site-nav a {
  color: #fff;
}
.site-nav a:hover {
  border-bottom-color: var(--slate-300);
}
html.dark .site-nav a:hover {
  border-bottom-color: var(--slate-500);
}
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--indigo-500);
}

/* Mobile: links collapse into a dropdown panel under the header. Without JS the
   toggle is hidden and the links stay visible (see .no-js fallback below). */
@media (max-width: 1023.98px) {
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    z-index: 20;
    flex-direction: column;
    gap: 2rem;
    padding: 2.5rem 4rem 2.5rem 2.5rem;
    border-radius: 0.375rem;
    background: var(--surface-raised);
    box-shadow: 0 20px 25px -5px rgb(99 102 241 / 0.2), 0 8px 10px -6px rgb(99 102 241 / 0.2);
    font-size: 1.25rem;
  }
  .site-header { position: relative; }
  html.no-js .menu-toggle { display: none; }
  html.no-js .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 1rem;
    padding: 0;
    box-shadow: none;
    background: none;
    font-size: 1rem;
  }
  .site-header__inner:has([aria-expanded="true"]) .site-nav {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  .site-nav {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-right: 1rem;
  }
}

/* Theme switch: 52x26 pill with a sliding thumb, as on the previous site. */
.theme-switch {
  --w: 52px;
  display: flex;
  align-items: center;
  width: var(--w);
  height: calc(var(--w) / 2);
  padding: 0;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: var(--slate-300);
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}
.theme-switch:focus-visible {
  border-radius: 999px;
}
.theme-switch__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: #fff;
  color: var(--slate-400);
  font-size: 1rem;
  transition: transform 0.15s;
}
.theme-switch__moon { display: none; }
.theme-switch[aria-checked="true"] {
  border-color: var(--slate-400);
  background: var(--slate-600);
}
.theme-switch[aria-checked="true"] .theme-switch__thumb {
  transform: translateX(26px);
  border-color: var(--slate-400);
  background: var(--slate-800);
}
.theme-switch[aria-checked="true"] .theme-switch__sun { display: none; }
.theme-switch[aria-checked="true"] .theme-switch__moon { display: block; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
}
.site-footer__inner {
  max-width: 80rem;
  margin-inline: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 1280px) {
  .site-footer__inner {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
  }
}
.site-footer__social {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  font-size: 1.25rem;
  color: var(--slate-900);
}
html.dark .site-footer__social {
  color: #fff;
}
.site-footer__feed {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--indigo-500);
}
html.dark .site-footer a:hover {
  color: var(--indigo-400);
}

/* ---------- home ---------- */

.block--hero {
  padding-block: 4rem;
}
@media (min-width: 768px) {
  .block--hero { padding-block: 8rem; }
}

.hero__kicker {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(to right, var(--indigo-500), var(--fuchsia-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html.dark .hero__kicker {
  background-image: linear-gradient(to right, var(--indigo-400), var(--fuchsia-500));
}
.hero__title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3rem;
  line-height: 1;
  color: var(--slate-700);
}
html.dark .hero__title {
  color: var(--slate-100);
}
.hero__lede {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  line-height: 2.5rem;
  color: var(--slate-700);
}
html.dark .hero__lede {
  color: #fff;
}
.hero__lede a {
  font-weight: 700;
  text-decoration: none;
}
.hero__lede a:hover {
  color: var(--indigo-500);
}
html.dark .hero__lede a:hover {
  color: var(--indigo-400);
}
@media (min-width: 768px) {
  .hero__kicker { font-size: 1.5rem; }
  .hero__title { font-size: 6rem; }
  .hero__lede { font-size: 1.875rem; }
}

.post-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  border-top: 1px solid var(--border);
}
.post-row {
  border-bottom: 1px solid var(--border);
}
.post-row__link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease-in-out;
}
.post-row__link:hover {
  background: var(--surface);
}
.post-row__link:hover .post-row__title {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.post-row__link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.post-row__title {
  flex: 1 1 20rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: var(--heading);
}
.post-row__date {
  flex: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- post ---------- */

.post .block:first-child {
  padding-top: 1.5rem;
}
.post__meta {
  padding-block: 1rem 1.5rem;
  text-align: right;
  font-weight: 300;
  color: var(--slate-600);
}
.post__meta span {
  color: var(--slate-500);
}
html.dark .post__meta {
  color: var(--slate-300);
}
html.dark .post__meta span {
  color: var(--slate-400);
}
.post__hero {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---------- post table of contents ---------- */

/* .post__body holds the TOC and the prose. Its font size matches .prose so `65ch` here is the
   same measure as the prose column. Narrow: one column, TOC is a collapsible block above the text.
   Wide (>= 1280px): sticky rail in the left column, like a docs sidebar. */
.post__body {
  --toc-top: calc(var(--header-h) + 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 65ch);
  justify-content: center;
  padding-inline: var(--gutter);
  font-size: 1.25rem;
}
@media (min-width: 640px) {
  .post__body { font-size: 1.5rem; }
}
/* Auto margins would stop the grid from stretching the prose, letting wide code/tables blow it out. */
.post__body > .prose {
  margin-inline: 0;
}

.toc {
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
  font-size: 1rem;
  line-height: 1.4;
}
.toc__label {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--toc-text);
}
.toc[open] .toc__label {
  margin-bottom: 0.5rem;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc ol ol {
  padding-left: 1.1rem;
}
.toc a {
  display: flex;
  gap: 0.5rem;
  padding-block: 0.3rem;
  color: var(--toc-text);
  text-decoration: none;
}
.toc a::before {
  content: "└";
  flex: none;
  font-family: var(--font-mono);
}
.toc a:hover {
  color: var(--toc-accent);
  text-decoration: underline;
}
.toc a[aria-current] {
  color: var(--toc-active);
  font-weight: 600;
}
.toc a[aria-current]::before {
  color: var(--toc-accent);
}

@media (min-width: 1280px) {
  .post__body {
    grid-template-columns: minmax(13rem, 1fr) minmax(0, 65ch) minmax(0, 1fr);
    column-gap: 2.5rem;
    align-items: start;
  }
  .post__body > .prose {
    grid-column: 2;
    grid-row: 1;
  }
  .toc {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    width: min(100%, 17rem);
    position: sticky;
    top: var(--toc-top);
    max-height: calc(100vh - var(--toc-top) - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 0.5rem 0 0;
    border: 0;
    background: none;
    font-size: 0.875rem;
  }
  /* On the rail the label is a heading, not a toggle (site.ts keeps it open). */
  .toc__label {
    cursor: default;
    list-style: none;
  }
  .toc__label::-webkit-details-marker {
    display: none;
  }
  /* With scroll-spy running, only the current section's subheadings are shown. */
  .toc[data-spy] .toc__list > li:not(.is-current) > ol {
    display: none;
  }
}

/* ---------- prose (replaces @tailwindcss/typography prose-xl / sm:prose-2xl) ---------- */

.prose {
  max-width: 65ch;
  margin-inline: auto;
  padding-bottom: 3rem;
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text);
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .prose {
    font-size: 1.5rem;
    line-height: 1.6667;
  }
}

.prose > * + * {
  margin-top: 1.2em;
}
.prose :is(h1, h2, h3, h4) {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.375;
  letter-spacing: 0.025em;
  color: var(--heading);
}
.prose :is(h1, h2, h3, h4, h5, h6)[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prose h1 { font-size: 3rem; margin-top: 0; }
.prose h2 { font-size: 2.25rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.875rem; margin-top: 1.5em; }
.prose h4 { font-size: 1.5rem; margin-top: 1.5em; }
.prose :is(h2, h3, h4) + * {
  margin-top: 0.6em;
}

.prose a {
  color: var(--link);
  text-decoration: underline;
  font-weight: 500;
}
.prose a:hover {
  background: var(--link-hover-bg);
  color: var(--link-hover-text);
  text-decoration: none;
}

.prose strong {
  font-weight: 600;
  color: var(--text-strong);
}
html:not(.dark) .prose strong {
  color: #000;
}

.prose :is(ul, ol) {
  padding-left: 1.6em;
}
.prose li + li,
.prose li > :is(ul, ol) {
  margin-top: 0.5em;
}
.prose li > p + p {
  margin-top: 0.75em;
}
.prose li::marker {
  color: var(--slate-400);
}

.prose blockquote {
  margin-inline: 0;
  padding-left: 1em;
  border-left: 0.25rem solid var(--slate-300);
  font-style: italic;
  color: var(--text-strong);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 3em;
}

.prose :not(pre) > code {
  padding: 0.1em 0.3em;
  border-radius: 0.25rem;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.85em;
  font-weight: 600;
}

.prose pre {
  overflow-x: auto;
  padding: 1em 1.25em;
  border-radius: 0.5rem;
  background: var(--code-bg) !important;
  box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  font-size: 0.75em;
  line-height: 1.7;
}
.prose pre code {
  font-family: var(--font-mono);
}
.prose pre:not(.giallo) code {
  color: var(--code-text);
}

/* Required by Zola's giallo highlighter output. */
.giallo-l {
  display: inline-block;
  min-height: 1lh;
  width: 100%;
}
.giallo-ln {
  display: inline-block;
  user-select: none;
  margin-right: 0.4em;
  padding: 0.4em;
  min-width: 3ch;
  text-align: right;
  opacity: 0.8;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  display: block;
  overflow-x: auto;
}
.prose :is(th, td) {
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--heading);
  font-weight: 600;
}

.prose img {
  margin-inline: auto;
  border-radius: 0.25rem;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-muted);
}

.prose .gallery {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-block: 2rem;
}
.prose .gallery figure {
  flex: 1;
  max-width: 33%;
  margin: 0;
  text-align: center;
}
.prose .gallery img {
  max-height: 520px;
  width: auto;
  border-radius: 0.5rem;
}

.prose .footnote-definition {
  font-size: 0.85em;
}

/* Side notes: GitHub-style alerts, `> [!NOTE]` / `> [!WARNING]` in Markdown. */
.prose blockquote:is(.markdown-alert-note, .markdown-alert-warning) {
  position: relative;
  margin-inline: 0;
  padding: 0.25rem 1rem 0.25rem 2rem;
  border-left: 2px solid var(--indigo-500);
  border-radius: 0 0.25rem 0.25rem 0;
  background: var(--indigo-100);
  font-style: normal;
  color: var(--text);
}
.prose blockquote.markdown-alert-warning {
  border-left-color: var(--yellow-500);
  background: var(--yellow-100);
}
html.dark .prose blockquote:is(.markdown-alert-note, .markdown-alert-warning) {
  background: var(--slate-700);
}
.prose blockquote:is(.markdown-alert-note, .markdown-alert-warning) > * + * {
  margin-top: 1em;
}
/* Icon badge on the top-left corner, as on the old site. */
.prose blockquote:is(.markdown-alert-note, .markdown-alert-warning)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background:
    var(--alert-icon) center / 1.75rem no-repeat,
    #fff;
}
html.dark .prose blockquote:is(.markdown-alert-note, .markdown-alert-warning)::before {
  background:
    var(--alert-icon) center / 1.75rem no-repeat,
    var(--slate-800);
}
.prose blockquote.markdown-alert-note {
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%236366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0'/%3E%3C/svg%3E");
}
.prose blockquote.markdown-alert-warning {
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23eab308' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4m0 4h.01M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0'/%3E%3C/svg%3E");
}

/* YouTube embeds (raw HTML figure in Markdown) */
.video {
  max-width: 48rem;
  margin-inline: auto;
}
.video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}
.video figcaption {
  font-size: 0.875rem;
  color: var(--text-strong);
}

/* ---------- data posts: charts, cards, verdict table, FAQ, jargon tooltips ----------
   Raw HTML blocks inside Markdown (first used by blog/dropping-the-framework-web-performance).
   Two series: --viz-b (indigo, the site primary) and --viz-c (orange, distinct from indigo
   for colour-blind readers). --viz-accent (fuchsia, the site secondary) marks limits and deltas.
   Tooltips come from [data-tip] attributes, wired up by initTips() in site.ts. */

:root {
  --viz-surface: var(--slate-50);
  --viz-surface-2: #fff;
  --viz-line: var(--slate-200);
  --viz-axis: var(--slate-300);
  --viz-ink: var(--slate-900);
  --viz-ink-2: var(--slate-600);
  --viz-muted: var(--slate-500);
  --viz-accent: #a21caf; /* fuchsia-700 */
  --viz-b: var(--indigo-600);
  --viz-b-soft: rgb(79 70 229 / 0.1);
  --viz-c: #c2410c; /* orange-700 */
  --viz-c-soft: rgb(194 65 12 / 0.1);
  --viz-on-series: #fff; /* labels drawn inside a series bar */
  --viz-claim: var(--slate-400);
  --viz-up: rgb(22 163 74 / 0.22);
  --viz-dn: rgb(220 38 38 / 0.2);
  --viz-good: #15803d;
  --viz-bad: #b91c1c;
  --viz-mixed: #b45309;
  --viz-tip-bg: var(--slate-900);
  --viz-tip-text: #fff;
}
html.dark {
  --viz-surface: var(--slate-900);
  --viz-surface-2: var(--slate-800);
  --viz-line: var(--slate-700);
  --viz-axis: var(--slate-600);
  --viz-ink: #fff;
  --viz-ink-2: var(--slate-300);
  --viz-muted: var(--slate-400);
  --viz-accent: #e879f9; /* fuchsia-400 */
  --viz-b: var(--indigo-400);
  --viz-b-soft: rgb(129 140 248 / 0.16);
  --viz-c: #fb923c; /* orange-400 */
  --viz-c-soft: rgb(251 146 60 / 0.16);
  --viz-on-series: var(--slate-900);
  --viz-claim: var(--slate-500);
  --viz-up: rgb(34 197 94 / 0.3);
  --viz-dn: rgb(248 113 113 / 0.3);
  --viz-good: #4ade80;
  --viz-bad: #f87171;
  --viz-mixed: #fbbf24;
  --viz-tip-bg: var(--slate-100);
  --viz-tip-text: var(--slate-900);
}

/* Jargon: dotted underline, definition in a tooltip on hover, focus or tap. */
.prose .term {
  border-bottom: 1.5px dotted var(--viz-muted);
  cursor: help;
}
.prose .term:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.viz-tip {
  position: fixed;
  z-index: 50;
  max-width: 300px;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: var(--viz-tip-bg);
  color: var(--viz-tip-text);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
}
.viz-tip.is-on {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .viz-tip { transition: none; }
}

/* Figure card */
.prose .chart {
  margin-block: 2.5rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--viz-line);
  border-radius: 0.75rem;
  background: var(--viz-surface);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--viz-ink-2);
}
.prose .chart > * + * {
  margin-top: 0;
}
.prose .chart .fig-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--viz-ink);
}
.prose .chart .fig-sub {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
}
.prose .chart figcaption {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--viz-line);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
  color: var(--viz-ink-2);
}
.prose .chart figcaption b {
  color: var(--viz-ink);
}
.prose .chart svg.viz {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: inherit;
}
.prose .chart .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0 0 0.9rem;
  font-size: 0.875rem;
}
.prose .chart .legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.prose .chart :is(.legend, .tile) i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.prose .chart .sw-b { background: var(--viz-b); }
.prose .chart .sw-c { background: var(--viz-c); }
.prose .chart .sw-claim { background: var(--viz-claim); }

/* SVG roles */
.prose .chart .ax { stroke: var(--viz-axis); stroke-width: 1; }
.prose .chart .gl { stroke: var(--viz-line); stroke-width: 1; }
.prose .chart .tk { fill: var(--viz-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.prose .chart .lb { fill: var(--viz-ink-2); font-size: 13.5px; }
.prose .chart .lb-strong { fill: var(--viz-ink); font-size: 13.5px; font-weight: 600; }
.prose .chart .val { fill: var(--viz-ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.prose .chart .val-in { fill: var(--viz-on-series); font-size: 13px; font-weight: 650; }
.prose .chart .note { fill: var(--viz-muted); font-size: 12px; }
.prose .chart .fb { fill: var(--viz-b); }
.prose .chart .fc { fill: var(--viz-c); }
.prose .chart .fclaim { fill: var(--viz-claim); }
.prose .chart .sb { stroke: var(--viz-b); }
.prose .chart .sc { stroke: var(--viz-c); }
.prose .chart .cap { stroke: var(--viz-accent); stroke-width: 1.5; stroke-dasharray: 4 4; }
.prose .chart .capt { fill: var(--viz-accent); font-size: 12px; font-weight: 600; }
.prose .chart .ring { stroke: var(--viz-surface); stroke-width: 2; }
.prose .chart svg [data-tip]:hover { filter: brightness(1.15); }

/* Dashboard sketch (first figure). The simulation panel stays dark in both themes. */
.prose .chart .sk-frame { fill: var(--viz-surface-2); stroke: var(--viz-line); }
.prose .chart .sk-bar { fill: var(--viz-line); }
.prose .chart .sk-url { fill: var(--viz-surface); }
.prose .chart .sk-sim { fill: #16161c; }
html.dark .prose .chart .sk-sim { fill: #0c0c10; }
.prose .chart .sk-spring { fill: none; stroke: rgb(240 239 236 / 0.28); stroke-width: 1; }
.prose .chart .sk-node { fill: #f0efec; stroke: #0c0c10; stroke-width: 1.5; }
.prose .chart .sk-cursor { fill: #f0efec; stroke: #0c0c10; stroke-width: 1; }
.prose .chart .sk-lab { fill: var(--viz-muted); font-size: 10.5px; letter-spacing: 0.14em; font-weight: 600; }
.prose .chart .sk-head { fill: var(--viz-muted); font-size: 10px; letter-spacing: 0.06em; font-weight: 600; }
.prose .chart .sk-sym { fill: var(--viz-ink); font-size: 11px; font-weight: 600; }
.prose .chart .sk-cell { fill: var(--viz-ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.prose .chart .sk-up { fill: var(--viz-up); }
.prose .chart .sk-dn { fill: var(--viz-dn); }
.prose .chart .sk-sel { fill: var(--viz-b-soft); }
.prose .chart .sk-spark { fill: none; stroke: var(--viz-accent); stroke-width: 1.2; }
.prose .chart .sk-div { stroke: var(--viz-line); }

/* Step flow: an <ol class="flow"> of steps on a vertical line, one marker per kind of step
   (.mk-agent filled dot, .mk-check ring with a tick, .mk-you diamond), with .flow-group labels.
   First used by blog/optimal-stack-for-claude-code-2026. */
.prose .chart .flow {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The line is drawn per row so it ends at the last marker however its text wraps.
   Marker centre: row padding (0.4rem) + marker offset (0.3rem) + half the marker (7px). */
.prose .chart .flow li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10.5px;
  width: 1px;
  background: var(--viz-axis);
}
.prose .chart .flow li:first-child::before {
  top: 0.5em;
}
.prose .chart .flow li:last-child::before {
  bottom: auto;
  height: calc(0.7rem + 7px);
}
.prose .chart .flow li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 11.5rem) minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: start;
  margin: 0;
  padding: 0.4rem 0;
}
.prose .chart .flow b {
  font-weight: 600;
  color: var(--viz-ink);
}
.prose .chart .flow li > span:last-child {
  font-size: 0.95rem;
}
.prose .chart .flow .flow-group {
  display: block;
  padding: 1rem 0 0.1rem calc(22px + 0.85rem);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--viz-muted);
}
.prose .chart .flow .flow-group:first-child {
  padding-top: 0;
}
.prose .chart .mk {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  justify-self: center;
  margin-top: 0.3rem;
  border-radius: 50%;
  /* A ring of the card colour cuts the vertical line around each marker. */
  box-shadow: 0 0 0 3px var(--viz-surface);
}
.prose .chart .mk-agent {
  background: var(--viz-b);
}
.prose .chart .mk-check {
  border: 1.5px solid var(--viz-ink-2);
  background: var(--viz-surface);
}
.prose .chart .mk-check::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 1px;
  width: 3px;
  height: 6px;
  border: solid var(--viz-ink-2);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.prose .chart .mk-you {
  width: 10px;
  height: 10px;
  margin-top: calc(0.3rem + 2px);
  border-radius: 1px;
  background: var(--viz-accent);
  transform: rotate(45deg);
}
.prose .chart .flow-legend {
  margin: 1rem 0 0;
}
.prose .chart .flow-legend .mk {
  margin-top: 0;
  box-shadow: none;
}
.prose .chart .mk-prod {
  border-radius: 3px;
  background: var(--viz-c);
}
@media (max-width: 36rem) {
  .prose .chart .flow li {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .prose .chart .flow li > span:last-child {
    grid-column: 2;
  }
}
/* Compact flow: name with an optional muted note under it, for two flows side by side. */
.prose .chart .flow.compact li:not(.flow-group) {
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 0.3rem 0;
}
.prose .chart .flow.compact li > :not(.mk) {
  grid-column: 2;
}
.prose .chart .flow.compact li > span:not(.mk) {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--viz-muted);
}
.prose .chart .flow.compact li:last-child::before {
  height: calc(0.6rem + 7px);
}
.prose .chart .flow-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.prose .chart .flow-head {
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--viz-line);
  font-weight: 650;
  color: var(--viz-ink);
}
.prose .chart .flow-sub2 {
  margin: 1.4rem 0 0.8rem;
}
@media (max-width: 40rem) {
  .prose .chart .flow-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Horizontal bars in HTML (label, track, value), so labels stay legible on phones. */
.prose .chart .hbars {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem 0.9rem;
  align-items: center;
}
.prose .chart .hbars .hb-l {
  font-size: 0.9rem;
  line-height: 1.35;
}
.prose .chart .hbars .hb-t {
  display: block;
  height: 22px;
}
.prose .chart .hbars .hb-t i {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.prose .chart .hbars i.b { background: var(--viz-b); }
.prose .chart .hbars i.c { background: var(--viz-c); }
.prose .chart .hbars i.faint { opacity: 0.4; }
.prose .chart .hbars > b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--viz-ink);
}
@media (max-width: 36rem) {
  .prose .chart .hbars {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
  }
  .prose .chart .hbars .hb-l {
    grid-column: 1 / -1;
    margin-top: 0.4rem;
  }
}

/* Release folders with the "current" symlink. */
.prose .chart .rel-rows {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1rem;
  align-items: end;
}
.prose .chart .rel-label {
  padding-bottom: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--viz-ink);
}
.prose .chart .rel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: end;
}
.prose .chart .rel span {
  position: relative;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--viz-line);
  border-radius: 0.4rem;
  background: var(--viz-surface-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  color: var(--viz-muted);
}
.prose .chart .rel span.on {
  margin-top: 1.5rem;
  border-color: var(--viz-b);
  background: var(--viz-b-soft);
  box-shadow: inset 0 0 0 1px var(--viz-b);
  font-weight: 600;
  color: var(--viz-ink);
}
.prose .chart .rel em {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--viz-b);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 650;
  color: var(--viz-on-series);
  white-space: nowrap;
}
@media (max-width: 36rem) {
  .prose .chart .rel-rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
  .prose .chart .rel-label {
    padding: 0.6rem 0 0;
  }
}

/* One box and what lives off it. */
.prose .chart .infra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.prose .chart .infra-box {
  padding: 1rem;
  border-radius: 0.6rem;
}
.prose .chart .infra-vps {
  border: 1.5px solid var(--viz-b);
  background: var(--viz-b-soft);
}
.prose .chart .infra-off {
  border: 1.5px dashed var(--viz-axis);
}
.prose .chart .infra-h {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--viz-muted);
}
.prose .chart .layer {
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  background: var(--viz-surface-2);
  font-size: 0.875rem;
  line-height: 1.4;
}
.prose .chart .layer + .layer {
  margin-top: 0.45rem;
}
.prose .chart .layer b {
  display: block;
  font-size: 0.95rem;
  color: var(--viz-ink);
}
.prose .chart .nots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
}
.prose .chart .nots > span {
  margin-right: 0.25rem;
  font-weight: 600;
  color: var(--viz-ink);
}
.prose .chart .nots s {
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--viz-line);
  border-radius: 999px;
  color: var(--viz-muted);
}
@media (max-width: 40rem) {
  .prose .chart .infra {
    grid-template-columns: minmax(0, 1fr);
  }
}

.prose .chart .callouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.1rem;
}
.prose .chart .callouts div {
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  background: var(--viz-surface-2);
  font-size: 0.95rem;
  line-height: 1.55;
}
.prose .chart .callouts b {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--viz-ink);
}

/* Stat tiles */
.prose .chart .tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.prose .chart .tile {
  padding: 1rem 1.1rem;
  border-radius: 0.5rem;
  background: var(--viz-surface-2);
}
.prose .chart .tile .k {
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.4;
}
.prose .chart .tile .pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  align-items: baseline;
}
.prose .chart .tile .pair span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.prose .chart .tile .pair b {
  font-size: 1.5rem;
  font-weight: 650;
  color: var(--viz-ink);
}
.prose .chart .tile .d {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--viz-accent);
}

/* 2x2 mix-and-match grid */
.prose .chart .mix {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 0.6rem;
  align-items: stretch;
}
.prose .chart .mix .h {
  align-self: end;
  padding-bottom: 0.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--viz-muted);
}
.prose .chart .mix .r {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: right;
}
.prose .chart .mix .cell {
  padding: 1.1rem 0.6rem;
  border-radius: 0.5rem;
  text-align: center;
}
.prose .chart .mix .cell b {
  display: block;
  font-size: 1.9rem;
  font-weight: 650;
  line-height: 1.1;
  color: var(--viz-ink);
}
.prose .chart .mix .cell small { font-size: 0.8rem; }
.prose .chart .mix .cb { background: var(--viz-b-soft); box-shadow: inset 0 0 0 1.5px var(--viz-b); }
.prose .chart .mix .cc { background: var(--viz-c-soft); box-shadow: inset 0 0 0 1.5px var(--viz-c); }

/* Files-touched blocks */
.prose .chart .files {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.1rem;
  align-items: center;
}
.prose .chart .files .who {
  font-size: 0.9rem;
  line-height: 1.35;
}
.prose .chart .files .who b {
  display: block;
  color: var(--viz-ink);
}
.prose .chart .sq {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.prose .chart .sq i {
  display: block;
  width: 22px;
  height: 28px;
  border-radius: 4px;
}
.prose .chart .sq.b i { background: var(--viz-b); }
.prose .chart .sq.c i { background: var(--viz-c); }
.prose .chart .sq i.maybe { opacity: 0.4; }
.prose .chart .files .num {
  grid-column: 2;
  margin-top: -0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .prose .chart {
    padding: 1.25rem 0.9rem 1rem;
    overflow-x: auto;
  }
  /* Keep chart labels legible: below this width the SVG scrolls sideways inside the card. */
  .prose .chart svg.viz {
    min-width: 540px;
  }
  .prose .chart :is(.callouts, .tiles) {
    grid-template-columns: 1fr;
  }
}

/* Two contestant cards side by side */
.prose .versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-block: 2.25rem;
  font-size: 1.0625rem;
  line-height: 1.6;
}
.prose .versus .side {
  padding: 1.25rem 1.25rem 0.5rem;
  border: 1px solid var(--viz-line);
  border-top: 4px solid var(--viz-b);
  border-radius: 0.75rem;
  background: var(--viz-surface);
}
.prose .versus .side.c {
  border-top-color: var(--viz-c);
}
.prose .versus h3 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
}
.prose .versus .tag {
  margin: 0 0 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--viz-muted);
}
.prose .versus ul {
  margin: 0 0 0.75rem;
  padding-left: 1.1em;
}
@media (max-width: 680px) {
  .prose .versus { grid-template-columns: 1fr; }
}

/* Verdict table with status chips */
.prose .tbl-wrap {
  margin-block: 2rem 2.5rem;
  overflow-x: auto;
  border: 1px solid var(--viz-line);
  border-radius: 0.75rem;
  font-size: 1rem;
}
.prose .tbl-wrap table {
  display: table;
  font-size: 1rem;
  line-height: 1.55;
}
.prose .tbl-wrap :is(th, td) {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--viz-line);
}
.prose .tbl-wrap th {
  background: var(--viz-surface);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--viz-muted);
}
.prose .tbl-wrap tr:last-child td { border-bottom: 0; }
.prose .tbl-wrap td { color: var(--viz-ink-2); }
.prose .tbl-wrap td:first-child {
  min-width: 12rem;
  font-weight: 550;
  color: var(--viz-ink);
}
.prose .chip {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.prose .chip.no { color: var(--viz-bad); box-shadow: inset 0 0 0 1.5px var(--viz-bad); }
.prose .chip.yes { color: var(--viz-good); box-shadow: inset 0 0 0 1.5px var(--viz-good); }
.prose .chip.meh { color: var(--viz-mixed); box-shadow: inset 0 0 0 1.5px var(--viz-mixed); }
.prose .chip.na { color: var(--viz-muted); box-shadow: inset 0 0 0 1.5px var(--viz-muted); }
/* Phones: stack each row so nothing is cut off. */
@media (max-width: 600px) {
  .prose .tbl-wrap thead { display: none; }
  .prose .tbl-wrap tr { display: block; border-bottom: 1px solid var(--viz-line); }
  .prose .tbl-wrap tr:last-child { border-bottom: 0; }
  .prose .tbl-wrap td { display: block; min-width: 0; border-bottom: 0; }
  .prose .tbl-wrap td:first-child { padding-bottom: 0.25rem; }
  .prose .tbl-wrap td:last-child { padding-top: 0.25rem; }
}

/* FAQ accordion */
.prose .faq details {
  padding-block: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.prose .faq details:first-of-type {
  border-top: 1px solid var(--border);
}
.prose .faq summary {
  position: relative;
  padding: 0.9rem 2.25rem 0.9rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  line-height: 1.45;
  color: var(--heading);
}
.prose .faq summary::-webkit-details-marker {
  display: none;
}
.prose .faq summary::after {
  content: "+";
  position: absolute;
  top: 0.65rem;
  right: 0.4rem;
  font-weight: 400;
  color: var(--text-muted);
}
.prose .faq details[open] summary::after {
  content: "\2013";
}
.prose .faq details p {
  margin: 0 0 1.1em;
}

/* ---------- about ---------- */

.about-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  margin-bottom: 1rem;
}
.about-intro__photo {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.about-intro__text {
  max-width: 65ch;
  font-size: 1.25rem;
  line-height: 1.8;
}
@media (min-width: 640px) {
  .about-intro__text { font-size: 1.5rem; line-height: 1.6667; }
}
@media (min-width: 1024px) {
  .about-intro {
    flex-direction: row;
  }
  .about-intro__photo {
    flex-shrink: 0;
    border-radius: 999px;
  }
  .about-intro__text {
    padding-inline: 3rem;
  }
}

/* ---------- portfolio ---------- */

.portfolio-grid {
  list-style: none;
  padding: 0;
  margin-bottom: 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 20px 25px -5px rgb(99 102 241 / 0.2), 0 8px 10px -6px rgb(99 102 241 / 0.2);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.portfolio-item:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px -12px rgb(99 102 241 / 0.5);
}
html.dark .portfolio-item {
  box-shadow: 0 20px 25px -5px rgb(15 23 42 / 0.2);
}
.portfolio-item__title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--indigo-500), var(--fuchsia-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (min-width: 640px) {
  .portfolio-item__title { font-size: 1.5rem; }
}
.portfolio-item__image {
  width: 100%;
  max-width: 20rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(99 102 241 / 0.3);
}
html.dark .portfolio-item__image {
  border: 2px solid var(--indigo-500);
}
.portfolio-item__body {
  color: var(--slate-700);
}
html.dark .portfolio-item__body {
  color: var(--slate-300);
}
.portfolio-item__body p + p {
  margin-top: 0.5rem;
}
.portfolio-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}
.portfolio-item__links .link {
  color: var(--indigo-600);
  white-space: nowrap;
}
html.dark .portfolio-item__links .link {
  color: var(--indigo-400);
}
.portfolio-item__links .link:hover {
  color: #fff;
}
html.dark .portfolio-item__links .link:hover {
  color: var(--slate-900);
}

/* ---------- weather showcase ---------- */

.showcase {
  --showcase-max: 80rem;
  overflow-x: clip; /* the hero glow is wider than the viewport on phones */
}
.showcase section {
  max-width: var(--showcase-max);
  margin-inline: auto;
  padding: 6rem 1.5rem;
}
.showcase h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--slate-900);
}
html.dark .showcase h2 {
  color: #fff;
}
.showcase p {
  font-size: 1.125rem;
  line-height: 2rem;
  color: var(--slate-600);
}
html.dark .showcase p {
  color: var(--slate-300);
}
.showcase h2 + p,
.showcase p + p {
  margin-top: 1.5rem;
}
.showcase__hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  max-width: 42rem !important;
  padding-block: 8rem !important;
}
.showcase__hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--slate-900);
}
html.dark .showcase__hero h1 {
  color: #fff;
}
.showcase__hero p {
  margin-top: 1.5rem;
}
/* Blur on the wrapper, clip-path on the child: blurring a clipped element keeps hard edges. */
.showcase__glow {
  position: absolute;
  inset: -6rem -10rem auto;
  z-index: -1;
  height: 28rem;
  filter: blur(64px);
  pointer-events: none;
}
.showcase__glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, #ff80b5, #9089fc);
  opacity: 0.3;
  clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%);
}
.showcase__kicker {
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.75rem !important;
  color: var(--indigo-600) !important;
}
html.dark .showcase__kicker {
  color: var(--indigo-300) !important;
}
.showcase__kicker + h2 {
  margin-top: 0.5rem;
}
.showcase__split {
  display: grid;
  gap: 4rem 2rem;
  align-items: center;
}
.showcase__split img {
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}
.showcase__split--alt {
  background: var(--slate-50);
  max-width: none !important;
}
html.dark .showcase__split--alt {
  background: var(--slate-900);
}
@media (min-width: 1024px) {
  .showcase__split { grid-template-columns: 1fr 1fr; }
  .showcase__split--alt { padding-inline: max(1.5rem, calc((100% - var(--showcase-max)) / 2 + 1.5rem)) !important; }
}
.showcase__features {
  margin-top: 2.5rem;
  display: grid;
  gap: 2rem;
  color: var(--slate-600);
}
html.dark .showcase__features {
  color: var(--slate-300);
}
.showcase__features dt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--slate-900);
}
html.dark .showcase__features dt {
  color: #fff;
}
.showcase__features dt .icon,
.showcase__plans li li .icon {
  color: var(--indigo-600);
  font-size: 1.25rem;
}
html.dark .showcase__features dt .icon,
html.dark .showcase__plans li li .icon {
  color: var(--indigo-400);
}
.showcase__plans {
  text-align: center;
}
.showcase__plans > ul {
  list-style: none;
  padding: 0;
  margin-top: 4rem;
  display: grid;
  gap: 2rem;
  text-align: left;
}
@media (min-width: 1024px) {
  .showcase__plans > ul { grid-template-columns: repeat(3, 1fr); }
}
.showcase__plans > ul > li {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
}
@media (min-width: 1024px) {
  .showcase__plans > ul > li { border-top: 0; border-left: 1px solid var(--border); }
  .showcase__plans > ul > li:first-child { border-left: 0; }
}
.showcase__plans h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-600);
}
html.dark .showcase__plans h3 {
  color: var(--slate-300);
}
.showcase__price {
  margin-top: 1.5rem;
  font-size: 3rem !important;
  font-weight: 700;
  line-height: 1 !important;
  color: var(--slate-900) !important;
}
html.dark .showcase__price {
  color: #fff !important;
}
.showcase__price span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-600);
}
.showcase__plans .button {
  width: 100%;
  margin-top: 2.5rem;
}
.showcase__plan-lede {
  margin-top: 2rem !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  line-height: 1.5rem !important;
}
.showcase__plans li ul {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--slate-600);
}
html.dark .showcase__plans li ul {
  color: var(--slate-300);
}
.showcase__plans li li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.showcase__cta {
  display: grid;
  gap: 3rem;
  align-items: center;
  width: calc(100% - 2 * var(--gutter));
  margin-block: 4rem 6rem;
  border-radius: 1.5rem;
  background: radial-gradient(circle at 70% 60%, rgb(119 117 214 / 0.55), transparent 60%), var(--slate-900);
  padding: 4rem 2rem !important;
  overflow: hidden;
}
.showcase__cta h2,
html.dark .showcase__cta h2 {
  color: #fff;
}
.showcase__cta p,
html.dark .showcase__cta p {
  color: var(--slate-300);
}
.showcase__cta .button {
  margin-top: 2.5rem;
}
.button--light {
  background: #fff;
  color: var(--slate-900);
}
.button--light:hover {
  background: var(--slate-100);
}
.showcase__cta img {
  border-radius: 0.375rem;
}
@media (min-width: 1024px) {
  .showcase__cta { grid-template-columns: 1fr 1.3fr; padding: 4rem 6rem !important; }
}

/* ---------- resume ---------- */

.resume {
  max-width: 56rem;
  margin-inline: auto;
  padding-block: 1.5rem 4rem;
}
.resume-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.resume-header__photo {
  order: 2;
  width: 150px;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
@media (min-width: 768px) {
  .resume-header { flex-direction: row; }
  .resume-header__photo { order: 0; }
}
.resume-header__label {
  font-size: 1.25rem;
  font-weight: 700;
}
.resume-header__name {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--heading);
}
.resume-header__title {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--text-strong);
}
.resume-contact {
  display: grid;
  gap: 0.5rem;
  padding-block: 1rem;
  font-size: 0.875rem;
}
.resume-contact p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.resume-contact span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.resume-contact a {
  color: var(--indigo-600);
}
html.dark .resume-contact a {
  color: var(--indigo-400);
}
.resume-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-block: 1rem 2rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.resume-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  padding: 0;
}
.resume-nav ul a {
  font-weight: 600;
  text-decoration: none;
  color: var(--slate-600);
}
html.dark .resume-nav ul a {
  color: var(--slate-200);
}
.resume-nav ul a:hover {
  color: var(--indigo-500);
}
.resume-nav__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}
.resume-nav__actions a {
  color: var(--link);
}
.resume-section {
  scroll-margin-top: 6rem;
  padding-block: 1rem 1.5rem;
}
.resume-section h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
}
.resume-section h4 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading);
}
.resume-section > p {
  margin-top: 0.5rem;
  line-height: 1.75;
}
.resume-section .pills {
  margin-top: 0.75rem;
}
.resume-entry {
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.resume-entry:last-child {
  border-bottom: 0;
}
.resume-entry h4 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.resume-star {
  color: var(--indigo-500);
  font-size: 1rem;
  align-self: center;
}
.resume-entry__subtitle {
  font-weight: 500;
}
.resume-entry__meta {
  margin-block: 0.25rem;
  font-style: italic;
  color: var(--text-muted);
}
.resume-entry__meta a {
  color: var(--indigo-600);
}
html.dark .resume-entry__meta a {
  color: var(--indigo-400);
}
.resume-entry__links {
  display: flex;
  gap: 0.75rem;
}
.resume-entry__links a {
  color: var(--link);
}
.resume-entry > p {
  margin-top: 0.5rem;
  line-height: 1.75;
}
.resume-entry__list {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  line-height: 1.75;
}
.resume-entry__industries {
  font-size: 0.9rem;
}
.resume-entry__industries span {
  font-weight: 600;
}
.resume-more summary,
.pills-more summary {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--indigo-200);
  color: var(--indigo-900);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.resume-more summary::-webkit-details-marker,
.pills-more summary::-webkit-details-marker {
  display: none;
}
html.dark .resume-more summary,
html.dark .pills-more summary {
  background: var(--indigo-700);
  color: var(--indigo-100);
}
.resume-more[open] summary,
.pills-more[open] summary {
  display: none;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
}
.pills li {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font-size: 0.75rem;
  font-weight: 500;
}
.skills {
  display: grid;
  gap: 0.5rem 4rem;
  list-style: none;
  padding: 0;
}
@media (min-width: 768px) {
  .skills { grid-template-columns: 1fr 1fr; }
}
.skills li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.skills li > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
}
.skills .muted {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-top,
  .site-footer,
  .skip-link,
  .no-print,
  .toc {
    display: none !important;
  }
  html.dark {
    --bg: #fff;
    --text: #000;
    --heading: #000;
    --text-strong: #000;
    --border: #ccc;
    --pill-bg: #eee;
    --pill-text: #000;
  }
  body {
    font-size: 11pt;
  }
  .resume {
    padding: 0;
  }
  .resume-entry,
  .skills li {
    break-inside: avoid;
  }
  .resume-more summary,
  .pills-more summary {
    display: none;
  }
  a {
    color: inherit !important;
  }
}
