/* ============================================================
   LUMIÈRE — Components & sections
   ============================================================ */

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--accent); color: #16121f; padding: 0.6em 1em;
  border-radius: 8px; z-index: 200; font-weight: 600; font-size: var(--fs-sm);
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled,
.reading .nav {
  background: color-mix(in oklch, var(--bg) 58%, transparent);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(100% - calc(var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
  height: 72px;
  display: flex; align-items: center; gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.brand .mark { width: 30px; height: 30px; }
.brand .wordmark {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  line-height: 1;
  padding-top: 3px;
}
.brand .wordmark b { font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.nav-links a {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  padding: 0.5em 0.85em;
  border-radius: 8px;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0.85em; right: 0.85em; bottom: 0.25em; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: color-mix(in oklch, var(--surface-1) 60%, transparent); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-burger { display: none; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: color-mix(in oklch, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: none; visibility: visible; }
.mobile-menu a {
  font-family: var(--serif); font-size: 2rem; padding: 0.5rem 0;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.mobile-menu .btn { margin-top: 2rem; align-self: flex-start; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding-top: clamp(8rem, 6rem + 8vw, 12rem); padding-bottom: var(--section-y); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6em;
  white-space: nowrap; line-height: 1;
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.06em;
  color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45em 0.9em;
  background: color-mix(in oklch, var(--surface-1) 50%, transparent);
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px 2px var(--glow);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.018em;
  margin: 1.4rem 0 0;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; }
.hero h1 .lum {
  color: transparent;
  background: linear-gradient(96deg, var(--accent-soft), var(--text) 55%);
  -webkit-background-clip: text; background-clip: text;
}
.hero-sub {
  font-size: var(--fs-lead);
  color: var(--text-dim);
  max-width: 46ch;
  margin-top: 1.6rem;
  text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.2rem; }
.hero-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.4rem; margin-top: 3rem; }
.hero-langs .label { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-faint); letter-spacing: 0.1em; }
.hero-langs ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.hero-langs li { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-dim); }

/* Hero visual */
.hero-visual { position: relative; aspect-ratio: 1 / 1; min-height: 360px; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-visual .vlabel {
  position: absolute; bottom: 8px; left: 8px;
  font-family: var(--mono); font-size: 0.66rem; color: var(--text-faint); letter-spacing: 0.1em;
}

/* ============================================================
   Trust strip (marquee)
   ============================================================ */
.trust { border-block: 1px solid var(--line); padding-block: 1.5rem; overflow: hidden; }
.marquee { display: flex; gap: 3.5rem; width: max-content; animation: scroll-x calc(38s / var(--speed, 1)) linear infinite; }
.trust.js-marquee .marquee { animation: none; will-change: transform; }
.marquee .item { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--text-dim); font-size: var(--fs-sm); white-space: nowrap; }
.marquee .item svg { width: 16px; height: 16px; color: var(--accent-soft); flex-shrink: 0; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
[data-reduce-motion="true"] .marquee { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }

/* ============================================================
   Capabilities grid (bento)
   ============================================================ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.cap { grid-column: span 2; padding: clamp(1.5rem, 1rem + 1.5vw, 2.2rem); min-height: 260px; display: flex; flex-direction: column; }
.cap.wide { grid-column: span 3; }
.cap.feature { grid-column: span 6; min-height: auto; }
.cap-ix { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--accent-soft); margin-bottom: auto;
  background: color-mix(in oklch, var(--accent) 8%, transparent); }
.cap-ix svg { width: 24px; height: 24px; }
.cap h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; margin-top: 1.6rem; }
.cap p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.6rem; max-width: 40ch; }
.cap .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; position: relative; }
.tag { font-family: var(--mono); font-size: 0.7rem; color: var(--text-dim); border: 1px solid var(--line);
  padding: 0.3em 0.6em; border-radius: 6px; position: relative; z-index: 1; }
/* Optional sliding pill glow — only active when the group carries .pill-glow */
.cap .tags.pill-glow .tag { transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.cap .tags.pill-glow:hover .tag { border-color: color-mix(in oklch, var(--line) 60%, transparent); }
.cap .tags.pill-glow .tag:hover { color: var(--text); border-color: transparent; }
.tag-spot {
  position: absolute; top: 0; left: 0; z-index: 0; opacity: 0; display: none;
  border-radius: 9px; pointer-events: none;
  background: color-mix(in oklch, var(--accent) 16%, transparent);
  box-shadow: 0 0 20px -2px color-mix(in srgb, var(--accent) 65%, transparent),
              inset 0 0 0 1px color-mix(in oklch, var(--accent) 50%, transparent);
  transition: transform 0.34s var(--ease), width 0.34s var(--ease), height 0.34s var(--ease), opacity 0.25s var(--ease);
}
.cap .tags.pill-glow .tag-spot { display: block; }
.tag-spot.placing { transition: opacity 0.25s var(--ease); }

/* Feature cap layout */
.cap.feature { flex-direction: row; gap: 2rem; align-items: center; flex-wrap: wrap; }
.cap.feature .cap-body { flex: 1 1 320px; }
.cap.feature .cap-art { flex: 1 1 320px; align-self: stretch; min-height: 200px; position: relative; }

/* ============================================================
   Stack / orbit
   ============================================================ */
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.orbit { position: relative; --osize: min(390px, 80vw); width: var(--osize); height: var(--osize); aspect-ratio: 1; margin-inline: auto; }
.orbit-core {
  position: absolute; inset: 38%; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), var(--accent-deep));
  box-shadow: 0 0 50px 6px var(--glow); display: grid; place-items: center;
}
.orbit-core span { font-family: var(--serif); font-size: 1.5rem; color: oklch(0.16 0.02 280); }
.orbit-core .orbit-mark { width: 54%; height: 54%; color: oklch(0.16 0.02 280); }
[data-theme="light"] .orbit-core .orbit-mark { color: oklch(0.99 0.012 280); }
.orbit-core .orbit-mark line { stroke: currentColor; }
.orbit-core .orbit-mark circle { fill: currentColor; }
.orbit-ring { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-r1 { inset: 12%; } .orbit-r2 { inset: 26%; }
.orbit-spin { position: absolute; inset: 0; animation: spin calc(40s / var(--speed,1)) linear infinite; }
.orbit-spin.rev { animation-direction: reverse; animation-duration: calc(56s / var(--speed,1)); }
@keyframes spin { to { transform: rotate(360deg); } }
[data-reduce-motion="true"] .orbit-spin { animation: none; }
.lang-node {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(var(--a)) translateX(calc(var(--osize) * var(--rad))) rotate(calc(-1 * var(--a)));
}
.lang-chip {
  font-family: var(--mono); font-size: var(--fs-sm); font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  padding: 0.5em 0.9em; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.5em;
  color: color-mix(in oklch, var(--lc, var(--text)) 55%, var(--text));
  box-shadow: var(--shadow);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.lang-chip:hover {
  border-color: color-mix(in oklch, var(--lc) 60%, var(--line-strong));
  background: color-mix(in oklch, var(--lc) 10%, var(--surface-2));
  box-shadow: var(--shadow), 0 0 20px -2px color-mix(in srgb, var(--lc) 60%, transparent);
}
.lang-chip .lang-ic {
  flex-shrink: 0; height: 16px; min-width: 16px; padding: 0 3px;
  border-radius: 5px; display: inline-grid; place-items: center;
  font-size: 0.6rem; font-weight: 700; line-height: 1; color: #fff;
  background: var(--lc);
}
.orbit-spin .lang-node .lang-chip { animation: counter calc(40s / var(--speed,1)) linear infinite; }
.orbit-spin.rev .lang-node .lang-chip { animation-duration: calc(56s / var(--speed,1)); animation-direction: reverse; }
@keyframes counter { to { transform: rotate(-360deg); } }
[data-reduce-motion="true"] .lang-chip { animation: none !important; }

.stack-points { list-style: none; padding: 0; margin-top: 1.8rem; display: grid; gap: 1.1rem; }
.stack-points li { display: flex; gap: 0.9rem; align-items: flex-start; }
.stack-points .k { color: var(--accent-soft); font-family: var(--mono); font-size: var(--fs-xs); padding-top: 0.35em; flex-shrink: 0; }
.stack-points strong { font-weight: 600; }
.stack-points p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.15rem; }

/* ============================================================
   Developer experience (code panel)
   ============================================================ */
.dx-grid { display: grid; grid-template-columns: 0.9fr minmax(0, 1.1fr); gap: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); align-items: center; }
.dx-grid > * { min-width: 0; }
.editor {
  border-radius: var(--r-lg); border: 1px solid var(--line-strong);
  background: var(--code-bg); overflow: hidden; box-shadow: var(--shadow); min-width: 0;
}
.editor-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); background: color-mix(in oklch, var(--code-bg) 80%, #000); }
.editor-bar .dots { display: flex; gap: 0.4rem; }
.editor-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.editor-tabs { display: flex; gap: 0.25rem; margin-left: 0.8rem; }
.editor-tab { font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint); padding: 0.3em 0.7em; border-radius: 6px; transition: all 0.3s var(--ease); }
.editor-tab[aria-selected="true"] { color: var(--text); background: color-mix(in oklch, var(--surface-2) 70%, transparent); }
.editor-body { padding: 1.2rem 1.3rem; font-family: var(--mono); font-size: 0.82rem; line-height: 1.75; height: 348px; overflow: auto; color: oklch(0.85 0.01 274); }
.editor-body pre { margin: 0; }
.editor-body .ln { color: oklch(0.45 0.01 274); user-select: none; display: inline-block; width: 1.8em; text-align: right; margin-right: 1.3em; }
.tok-kw { color: oklch(0.72 0.16 300); }
.tok-fn { color: oklch(0.78 0.13 240); }
.tok-ty { color: oklch(0.82 0.11 95); }
.tok-str { color: oklch(0.78 0.12 150); }
.tok-num { color: oklch(0.78 0.12 40); }
.tok-cm { color: oklch(0.5 0.01 274); font-style: italic; }
.tok-pn { color: oklch(0.62 0.01 274); }
.editor-foot { display: flex; align-items: center; gap: 1.2rem; padding: 0.6rem 1.3rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); }
.editor-foot .ok { color: oklch(0.75 0.14 150); }

.dx-points { display: grid; gap: 1.3rem; }
.dx-points .dxp { padding-left: 1.4rem; border-left: 2px solid var(--line); transition: border-color 0.3s var(--ease); }
.dx-points .dxp:hover { border-color: var(--accent); }
.dx-points h4 { font-size: 1.1rem; font-weight: 600; }
.dx-points p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.3rem; }

/* ============================================================
   Lab / products
   ============================================================ */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.lab-card { padding: 1.7rem; display: flex; flex-direction: column; gap: 0.9rem; min-height: 230px; }
.lab-card .lab-top { display: flex; align-items: center; justify-content: space-between; }
.lab-pkg { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text); }
.lab-status { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3em 0.6em; border-radius: 6px; border: 1px solid var(--line); color: var(--text-dim); }
.lab-status.soon { color: var(--accent-soft); border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.lab-card h3 { font-size: 1.15rem; font-weight: 600; }
.lab-card p { color: var(--text-dim); font-size: var(--fs-sm); flex: 1; }
.lab-meta { display: flex; align-items: center; gap: 1rem; font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); }
.lab-install { font-family: var(--mono); font-size: 0.74rem; color: oklch(0.85 0.012 274);
  background: var(--code-bg); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 0.6em 0.8em; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.lab-install button { color: oklch(0.62 0.012 274); transition: color 0.2s; }
.lab-install button:hover { color: var(--accent-soft); }

/* ============================================================
   Case studies
   ============================================================ */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.case-card { padding: 1.7rem; display: flex; flex-direction: column; }
.case-tag { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-soft); }
.case-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.1; margin-top: 1rem; }
.case-card p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.7rem; flex: 1; }
.case-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 1.6rem; padding-top: 1.3rem; padding-inline: 0.55rem; border-top: 1px solid var(--line); }
.case-metric { display: flex; flex-direction: column; min-width: 0; }
.case-metric:nth-child(1) { align-items: flex-start; text-align: left; }
.case-metric:nth-child(2) { align-items: center; text-align: center; }
.case-metric:nth-child(3) { align-items: flex-end; text-align: right; }
.case-metric .n { font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--text); }
.case-metric .l { font-size: 0.72rem; color: var(--text-faint); margin-top: 0.35rem; text-wrap: balance; }

/* ============================================================
   Blog
   ============================================================ */
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 3rem; }
.post { display: flex; flex-direction: column; overflow: hidden; }
.post-art { aspect-ratio: 16/10; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.post-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; gap: 0.8rem; font-family: var(--mono); font-size: 0.68rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.post-meta span { white-space: nowrap; }
.post h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.25; margin-top: 0.8rem; letter-spacing: -0.01em; }
.post p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.5rem; flex: 1; }
.post .read { font-family: var(--mono); font-size: 0.72rem; color: var(--accent-soft); margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.4em; }
.post:hover .read .btn-arrow { transform: translateX(3px); }

/* striped placeholder art */
.ph {
  background-color: var(--surface-2);
  background-image: repeating-linear-gradient(135deg,
    color-mix(in oklch, var(--accent) 10%, transparent) 0 2px,
    transparent 2px 11px);
  position: relative;
}
.ph::after {
  content: attr(data-ph);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); letter-spacing: 0.08em;
}

/* ============================================================
   Final CTA
   ============================================================ */
.cta { position: relative; }
.cta-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  padding: clamp(2.5rem, 1.5rem + 5vw, 6rem);
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -20%, color-mix(in oklch, var(--accent) 28%, transparent), transparent 60%),
    color-mix(in oklch, var(--surface-1) 70%, transparent);
}
.cta-card h2 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.015em; }
.cta-card h2 em { font-style: italic; color: var(--accent-soft); }
.cta-card p { color: var(--text-dim); font-size: var(--fs-lead); max-width: 48ch; margin: 1.3rem auto 0; text-wrap: pretty; }
.cta-card .hero-cta { justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding-top: clamp(3rem, 2rem + 3vw, 5rem); padding-bottom: 3rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2.5rem; }
.footer-brand .wordmark { font-family: var(--serif); font-size: 1.7rem; }
.footer-brand p { color: var(--text-dim); font-size: var(--fs-sm); max-width: 32ch; margin-top: 1rem; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
.footer-col h5 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.footer-col a { font-size: var(--fs-sm); color: var(--text-dim); transition: color 0.25s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-bottom p, .footer-bottom a { font-size: var(--fs-xs); color: var(--text-faint); }
.footer-legal { display: flex; gap: 1.4rem; }

/* ============================================================
   Theme / config panel (in-page product feature)
   ============================================================ */
.config-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--accent-soft);
  box-shadow: var(--shadow); transition: transform 0.4s var(--ease);
}
.config-fab:hover { transform: rotate(45deg) scale(1.05); }
.config-fab svg { width: 22px; height: 22px; }
.config-panel {
  position: fixed; right: 20px; bottom: 82px; z-index: 91;
  width: 290px; padding: 1.3rem;
  background: color-mix(in oklch, var(--surface-1) 92%, transparent);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.96); opacity: 0; visibility: hidden;
  transform-origin: bottom right;
  transition: transform 0.35s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
}
.config-panel.open { transform: none; opacity: 1; visibility: visible; }
.config-panel h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.9rem; }
.config-row + .config-row { margin-top: 1.3rem; }
.config-seg { display: flex; gap: 0.3rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.25rem; }
.config-seg button { flex: 1; padding: 0.5em; border-radius: 7px; font-size: var(--fs-xs); color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; transition: all 0.25s var(--ease); }
.config-seg button[aria-pressed="true"] { background: color-mix(in oklch, var(--accent) 22%, transparent); color: var(--text); }
.config-seg button svg { width: 14px; height: 14px; }
.lang-switch { position: relative; }
.lang-btn { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; position: relative; }
.lang-spinner { display: none; }
.lang-btn.loading [data-lang-code] { visibility: hidden; }
.lang-btn.loading .lang-spinner {
  display: block; position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: lang-spin 0.6s linear infinite;
}
@keyframes lang-spin { to { transform: rotate(360deg); } }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 95;
  min-width: 148px; padding: 0.35rem;
  background: var(--surface-glass); backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow); display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.lang-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.lang-switch:hover .lang-menu,
.lang-switch:focus-within .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.5em 0.7em; border-radius: 8px; font-size: var(--fs-sm);
  color: var(--text-dim); text-align: left; transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-menu a:hover { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--text); }
.lang-menu a[aria-current="true"] { color: var(--text); }
.lang-menu a[aria-current="true"]::after { content: "●"; color: var(--accent); font-size: 0.55em; }
.i18n-loading { cursor: progress; }
.swatches { display: flex; gap: 0.5rem; }
.swatch-btn { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; position: relative; transition: transform 0.25s var(--ease); }
.swatch-btn:hover { transform: scale(1.1); }
.swatch-btn[aria-pressed="true"] { border-color: var(--text); }
.swatch-btn span { position: absolute; inset: 3px; border-radius: 6px; }
.config-toggle { display: flex; align-items: center; justify-content: space-between; }
.config-toggle label { font-size: var(--fs-sm); color: var(--text-dim); }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.3s var(--ease); flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform 0.3s var(--ease); }
.switch[aria-pressed="true"] { background: var(--accent); }
.switch[aria-pressed="true"]::after { transform: translateX(18px); background: oklch(0.16 0.02 280); }

/* ============================================================
   About
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.92fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: start; }
.about-narrative { display: flex; flex-direction: column; align-items: flex-start; }
.about-body { color: var(--text-dim); font-size: var(--fs-lead); max-width: 52ch; text-wrap: pretty; }
.about-narrative .eyebrow { margin-top: 2.4rem; }
.about-values { display: grid; gap: 1.4rem; margin-top: 1.5rem; width: 100%; }
.about-value { padding-left: 1.4rem; border-left: 2px solid var(--line); transition: border-color 0.3s var(--ease); }
.about-value:hover { border-color: var(--accent); }
.about-value h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.005em; }
.about-value p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.3rem; max-width: 48ch; text-wrap: pretty; }
.about-narrative .btn { margin-top: 2.2rem; }

/* Team / studio photo — gated behind the aboutPhoto config flag */
.about-photo { position: relative; position: sticky; top: 100px; }
.about-photo .ph { aspect-ratio: 4 / 5; height: auto; min-height: 380px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.about-photo .vlabel { position: absolute; bottom: 10px; left: 12px; font-family: var(--mono); font-size: 0.66rem; color: var(--text-faint); letter-spacing: 0.08em; }
[data-about-photo="off"] .about-photo { display: none; }
[data-about-photo="off"] .about-grid { grid-template-columns: 1fr; }
[data-about-photo="off"] .about-body { max-width: 70ch; }
[data-about-photo="off"] .about-values { grid-template-columns: 1fr 1fr; gap: 1.4rem 2.4rem; }

/* How we work — process steps */
.about-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.about-step { padding: clamp(1.4rem, 1rem + 1vw, 1.9rem); display: flex; flex-direction: column; min-height: 200px; }
.about-step .k { font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent-soft); letter-spacing: 0.14em; }
.about-step h4 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; margin-top: 0.9rem; }
.about-step p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.6rem; text-wrap: pretty; }

@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; max-width: 460px; margin-inline: auto; position: static; }
  .about-photo .ph { min-height: 300px; aspect-ratio: 16 / 10; }
  .about-process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  [data-about-photo="off"] .about-values { grid-template-columns: 1fr; }
  .about-process { grid-template-columns: 1fr; }
}

/* ============================================================
   Tweak-driven variants
   ============================================================ */
[data-headline="grotesk"] { --serif: var(--sans); }
[data-headline="grotesk"] .hero h1,
[data-headline="grotesk"] .section-head h2,
[data-headline="grotesk"] .cta-card h2,
[data-headline="grotesk"] #stack h2,
[data-headline="grotesk"] .case-card h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
[data-headline="grotesk"] .hero h1 em,
[data-headline="grotesk"] .section-head h2 em,
[data-headline="grotesk"] .cta-card h2 em,
[data-headline="grotesk"] #stack h2 em { font-style: normal; }

[data-density="compact"] { --section-y: clamp(3.5rem, 2rem + 4vw, 6rem); }
[data-density="comfy"]   { --section-y: clamp(6.5rem, 4rem + 10vw, 12rem); }

/* ============================================================
   Tweaks panel (host edit-mode)
   ============================================================ */
.tweaks-host {
  position: fixed; top: 84px; right: 20px; z-index: 120;
  width: 290px; padding: 1.3rem;
  background: color-mix(in oklch, var(--surface-1) 94%, transparent);
  backdrop-filter: blur(22px);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.tweaks-host[hidden] { display: none; }
.tweaks-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.tweaks-head span { font-family: var(--serif); font-size: 1.3rem; }
.tweaks-close { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--line); font-size: 1.1rem; line-height: 1; }
.tweaks-close:hover { color: var(--text); border-color: var(--line-strong); }
@media (max-width: 620px) { .tweaks-host { width: calc(100vw - 40px); } }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; margin-inline: auto; aspect-ratio: 4/3; min-height: 300px; }
  .stack-grid, .dx-grid { grid-template-columns: 1fr; }
  .dx-grid .editor { order: 2; }
  .cap.wide, .cap { grid-column: span 3; }
  .lab-grid, .case-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap, .cap.wide, .cap.feature { grid-column: auto; }
  .cap.feature { flex-direction: column; align-items: flex-start; }
  .lab-grid, .case-grid, .blog-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .case-metrics { gap: 1.2rem; }
  .config-panel { width: calc(100vw - 40px); }
}

/* ============================================================
   Project modal ("Start a Project")
   ============================================================ */
.modal-root { position: fixed; inset: 0; z-index: 200; display: none; }
.modal-root.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: color-mix(in oklch, var(--bg) 60%, transparent); backdrop-filter: blur(7px); animation: modal-fade 0.3s var(--ease); }
.modal-card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 44px); overflow: auto;
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  animation: modal-pop 0.32s var(--ease); scrollbar-gutter: stable;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--line);
  font-size: 1.05rem; line-height: 1; transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.modal-close:hover { color: var(--text); border-color: var(--line-strong); }
.modal-card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.05; letter-spacing: -0.01em; margin-top: 0.7rem; }
.modal-lead, .modal-sub { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.6rem; text-wrap: pretty; }
.project-form { display: grid; gap: 1.1rem; margin-top: 1.6rem; }
.project-form .field { display: grid; gap: 0.4rem; }
.project-form label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.project-form input, .project-form textarea {
  width: 100%; background: color-mix(in oklch, var(--surface-2) 70%, transparent);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.7em 0.85em;
  color: var(--text); font: inherit; font-size: var(--fs-sm); resize: vertical;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.project-form input:focus, .project-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent);
}
.project-form .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-form .chip {
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim);
  border: 1px solid var(--line-strong); padding: 0.4em 0.75em; border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.project-form .chip:hover { color: var(--text); border-color: var(--accent); }
.project-form .chip[aria-pressed="true"] { background: color-mix(in oklch, var(--accent) 18%, transparent); border-color: var(--accent); color: var(--text); }
.project-form .btn-primary { justify-self: start; margin-top: 0.3rem; }
/* Inside the modal, keep buttons anchored — no hover lift (it reads as jitter on a form) */
.modal-card .btn:hover { transform: none; }
.modal-card .btn:active { transform: scale(0.99); }
/* scheduler */
.modal-sep { height: 1px; background: var(--line); margin: 0.4rem 0 1.1rem; }
.scheduler .eyebrow { display: block; }
.cal { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.cal-month { font-family: var(--serif); font-size: 1.05rem; text-transform: capitalize; }
.cal-nav { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--line); font-size: 1.1rem; line-height: 1; }
.cal-nav:hover { color: var(--text); border-color: var(--line-strong); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week span { text-align: center; font-size: 0.6rem; color: var(--text-faint); font-family: var(--mono); padding-bottom: 0.3rem; }
.cal-day { aspect-ratio: 1; border-radius: 8px; font-size: 0.8rem; color: var(--text-dim); display: grid; place-items: center; transition: background-color 0.18s var(--ease), color 0.18s var(--ease); }
.cal-day:hover:not(:disabled) { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--text); }
.cal-day:disabled { opacity: 0.26; }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-day.selected { background: var(--accent); color: #fff; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.9rem; }
.slot { font-family: var(--mono); font-size: 0.72rem; padding: 0.45em 0.75em; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text-dim); transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease); }
.slot:hover { border-color: var(--accent); color: var(--text); }
.slot.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-chosen { margin-top: 0.8rem; font-size: 0.78rem; color: var(--text-dim); min-height: 1.1em; }
[data-modal-view="success"] { text-align: center; padding: 1.5rem 0 0.5rem; }
.success-mark { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--accent); box-shadow: 0 0 30px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
[data-modal-view="success"] .btn { margin-top: 1.4rem; }
@media (max-width: 480px) { .modal-card { padding: 1.4rem; } .modal-card h2 { font-size: 1.55rem; } }

/* ============================================================
   Blog article (data-driven reading page)
   ============================================================ */
.article-main { padding-top: clamp(5.5rem, 4rem + 6vw, 8rem); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.article { width: min(100% - 2.5rem, 720px); margin-inline: auto; }
.article-back { display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-dim); transition: color 0.2s var(--ease); }
.article-back:hover { color: var(--accent-soft); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 1.8rem; font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint); }
.article-meta > span { white-space: nowrap; }
.article-meta .case-tag { color: var(--accent-soft); }
.article h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.5rem); line-height: 1.12; letter-spacing: -0.015em; margin-top: 1.1rem; }
.article-standfirst { font-size: var(--fs-lead); color: var(--text-dim); line-height: 1.5; margin-top: 1.5rem; max-width: 60ch; text-wrap: pretty; }
.article-byline { display: flex; align-items: center; gap: 0.6em; margin-top: 1.6rem; font-size: var(--fs-sm); color: var(--text-dim); }
.article-byline .byline-dot { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 35% 30%, var(--accent-soft), var(--accent-deep)); box-shadow: 0 0 14px -2px var(--glow); }
.article-byline strong { color: var(--text); font-weight: 600; }
.article-cover { aspect-ratio: 16 / 7; border-radius: var(--r-lg); margin: 2.4rem 0; border: 1px solid var(--line); }
.article-body { font-size: 1.12rem; line-height: 1.75; color: var(--text); }
.article-body > * + * { margin-top: 1.5rem; }
.article-body .lead { font-size: 1.3rem; line-height: 1.5; color: var(--text); }
.article-body p { color: oklch(from var(--text) l c h / 0.86); text-wrap: pretty; }
.article-body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.12; letter-spacing: -0.01em; margin-top: 2.6rem; color: var(--text); }
.article-body ul { padding-left: 0; list-style: none; display: grid; gap: 0.7rem; }
.article-body li { position: relative; padding-left: 1.5rem; color: oklch(from var(--text) l c h / 0.86); }
.article-body li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.article-body blockquote { margin: 2.4rem 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 2px solid var(--accent); }
.article-body blockquote p { font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.32; color: var(--text); }
.article-body blockquote cite { display: block; margin-top: 0.7rem; font: 500 var(--fs-xs)/1.4 var(--mono); font-style: normal; color: var(--text-faint); letter-spacing: 0.04em; }
.article-more { margin-top: 4rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.article-more h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -0.01em; }
.article-more h3 em { font-style: italic; color: var(--accent-soft); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.6rem; }
.more-card .post-art { aspect-ratio: 16 / 10; }
.more-card h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.article-missing { width: min(100% - 2.5rem, 720px); margin: 4rem auto; text-align: center; }
.article-missing h1 { font-family: var(--serif); font-size: 4rem; color: var(--accent-soft); }
.article-missing p { color: var(--text-dim); margin: 0.5rem 0 1.6rem; }
@media (max-width: 680px) { .more-grid { grid-template-columns: 1fr; } }

/* Inline validation / transport error inside the project modal.
   Server-side rejection needs somewhere to land; the form previously
   could not fail, so it had no error affordance. */
.modal-error {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid color-mix(in oklab, #ff6b6b 45%, transparent);
  border-radius: var(--r-sm, 10px);
  background: color-mix(in oklab, #ff6b6b 10%, transparent);
  color: color-mix(in oklab, #ff6b6b 75%, var(--fg));
  font-size: 0.9rem;
  line-height: 1.45;
}
.modal-error[hidden] { display: none; }

/* ============================================================
   Feedback widget
   Anchored opposite the appearance panel's button so the two
   corner controls never overlap.
   ============================================================ */
.fb-root { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 60; }
/* The panel opens upward, so on a short viewport it reaches under the fixed
   nav (z-index 100) and the brandmark paints over it. Lift the whole widget
   past the nav for as long as it is open; while it is only a FAB it stays in
   the corner-control layer, below the nav, like .config-fab. */
.fb-root.fb-open { z-index: 110; }
.fb-fab {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--surface-1); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.5rem 0.95rem; font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow);
}
.fb-fab:hover { border-color: var(--accent); }
.fb-fab svg { width: 16px; height: 16px; }

.fb-panel {
  position: absolute; left: 0; bottom: calc(100% + 0.6rem);
  width: min(340px, calc(100vw - 2.5rem));
  background: var(--surface-1); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow); padding: 1rem 1.1rem;
  /* Never grow past the nav: 20px root offset + ~38px FAB + 10px gap + 72px
     nav + 12px clearance. Beyond that the form scrolls inside the panel
     rather than disappearing off the top of the screen. */
  max-height: calc(100vh - 152px); overflow-y: auto; overscroll-behavior: contain;
}
.fb-panel[hidden] { display: none; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.fb-close { background: none; border: 0; color: var(--text-faint); cursor: pointer; font-size: 1rem; padding: 0.1rem 0.3rem; }
.fb-lead { color: var(--text-dim); font-size: 0.82rem; margin: 0.3rem 0 0.8rem; }

.fb-rating { display: flex; gap: 0.15rem; margin-bottom: 0.7rem; }
.fb-star { background: none; border: 0; cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--text-faint); padding: 0 0.05rem; }
.fb-star.on { color: var(--accent); }

.fb-field { display: block; margin-bottom: 0.6rem; }
.fb-field span { display: block; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.fb-field textarea, .fb-field input {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 0.45rem 0.6rem; font: inherit; font-size: 0.85rem; resize: vertical;
}
.fb-error { color: #ff6b6b; font-size: 0.8rem; margin: 0 0 0.5rem; }
.fb-error[hidden] { display: none; }
.fb-done { text-align: center; padding: 1.4rem 0.5rem; }
.fb-done[hidden] { display: none; }
.fb-done p { color: var(--text-dim); font-size: 0.88rem; margin: 0.6rem 0 0; }

@media (max-width: 720px) {
  .fb-root { left: 1rem; bottom: 1rem; }
}

/* ============================================================
   Article blocks — code, images, embeds, tables, callouts
   ------------------------------------------------------------
   Added with the block kinds in migration 0009. Each of these is
   wider or denser than prose, so they break out of the reading
   column rather than squeezing into it.
   ============================================================ */

.article-body > figure { margin: 2rem 0; }
.article-body figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted, #8b8fa3);
  text-align: center;
}

/* ---------- code ---------- */
.block-code pre {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  /* The same surface the developer-experience tabs use, because the `.tok-*`
     palette above was tuned against it. Both themes define it. */
  background: var(--code-bg);
  color: oklch(0.85 0.01 274);
  /* Long lines scroll inside the block; the article column never widens. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.block-code code {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.86rem;
  line-height: 1.7;
  white-space: pre;
  background: none;
  padding: 0;
}

/* The language, shown as a corner label rather than as chrome above. */
.block-code pre[data-lang] { position: relative; padding-top: 1.6rem; }
.block-code pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.45rem;
  right: 0.8rem;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8b8fa3);
}

/* ---------- images ---------- */
.block-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255,255,255,0.1));
}

/* ---------- embeds ---------- */
/* A 16:9 box reserved before the frame loads, so the article does not jump
   when a third-party player finally arrives. */
.block-embed .embed-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line, rgba(255,255,255,0.1));
  background: var(--panel, rgba(255,255,255,0.03));
}

.block-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* A gist is a document, not a video, so it gets height rather than a ratio. */
.block-embed[data-provider="gist"] .embed-frame { aspect-ratio: auto; height: 420px; }

/* ---------- tables ---------- */
.block-table .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.block-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.block-table th,
.block-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.1));
  vertical-align: top;
}

.block-table th { font-weight: 600; white-space: nowrap; }

/* ---------- callouts ---------- */
.block-callout {
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  border-left: 3px solid var(--tone, var(--accent));
  background: color-mix(in oklch, var(--tone, var(--accent)) 8%, transparent);
  font-size: 0.95rem;
}

.block-callout[data-tone="note"]    { --tone: oklch(0.70 0.10 250); }
.block-callout[data-tone="tip"]     { --tone: oklch(0.72 0.15 155); }
.block-callout[data-tone="warning"] { --tone: oklch(0.80 0.14 85); }
.block-callout[data-tone="danger"]  { --tone: oklch(0.66 0.19 22); }

.block-callout > :first-child { margin-top: 0; }
.block-callout > :last-child  { margin-bottom: 0; }

/* ---------- divider ---------- */
.block-divider {
  margin: 2.5rem auto;
  width: 40%;
  border: 0;
  border-top: 1px solid var(--line, rgba(255,255,255,0.1));
}

/* ---------- heading anchors ---------- */
/* Revealed on hover so a section can be linked to, without putting a
   permanent hash beside every heading. */
.article-body h2 { position: relative; }
.heading-anchor {
  margin-left: 0.4rem;
  opacity: 0;
  text-decoration: none;
  color: var(--muted, #8b8fa3);
  transition: opacity 0.12s ease;
}
.article-body h2:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; }

/* ---------- tags ---------- */
/* A list rather than a row of links: tag archive pages do not exist yet, and a
   link that goes nowhere is worse than a label that never claimed to. */
/* ---------- hooks that used to be inline `style` attributes ----------
   Named classes rather than inline declarations so the pages carry no `style`
   attribute except where the server computed the value — which is what lets
   the policy stop trusting inline stylesheets. See `csp.rs`. */
.section-flush { padding-top: 0; }
.section-head.pushed { margin-top: 1.6rem; }
.section-head.flush { margin-bottom: 0; }
.page-title { font-size: var(--fs-h1); }
/* The same arrow glyph, pointing back. */
.btn-arrow.back { display: inline-block; transform: rotate(180deg); }
.eyebrow.centred { justify-content: center; }
.cta-card .eyebrow { justify-content: center; }
.cta-card h2 { margin-top: 1rem; }
.about-narrative .about-body { margin-top: 1.2rem; }
/* The prism marks, wherever they appear. */
.mark, .orbit-mark { stroke-linecap: round; }
.icon-14 { width: 14px; height: 14px; }
/* Toggled from script — the theme switcher shows one of three icons. */
.is-hidden { display: none; }

.stack-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-top: 1rem;
}
.stack-lead {
  font-size: var(--fs-lead);
  margin-top: 1.1rem;
  max-width: 46ch;
  text-wrap: pretty;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.tag {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* On the article page a tag leads to its archive; on a card it does not,
   because the card is already a link. The chip looks the same either way —
   the difference is that one of them responds to a pointer. */
.tag a {
  display: block;
  margin: -0.2rem -0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tag:has(a):hover { border-color: color-mix(in oklch, var(--accent) 45%, transparent); }
.tag a:hover { color: var(--accent-soft); }
.tag a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tag-row-sm { margin-top: 0.5rem; }
.tag-row-sm .tag { font-size: 0.68rem; padding: 0.1rem 0.45rem; }
