/* One stylesheet for every page.
   Tokens echo the product's own design language (OKLCH, brand hue 262, Inter). */

:root {
  --brand-h: 262;
  --bg: oklch(0.99 0.002 255);
  --fg: oklch(0.21 0.02 260);
  --surface: oklch(1 0 0);
  --sunken: oklch(0.97 0.004 255);
  --muted: oklch(0.955 0.005 255);
  --muted-fg: oklch(0.5 0.02 260);
  --border: oklch(0.91 0.006 255);
  --border-strong: oklch(0.84 0.008 255);
  --primary: oklch(0.5 0.18 var(--brand-h));
  --primary-hover: oklch(0.45 0.18 var(--brand-h));
  --primary-fg: oklch(0.99 0 0);
  --primary-subtle: oklch(0.96 0.03 var(--brand-h));
  --accent-fg: oklch(0.38 0.13 var(--brand-h));
  --ring: oklch(0.6 0.16 var(--brand-h));
  --overlay: oklch(0.21 0.02 260 / 0.5);
  --success-subtle: oklch(0.96 0.03 150);
  --success-fg: oklch(0.42 0.11 150);
  --warning-subtle: oklch(0.96 0.04 85);
  --warning-fg: oklch(0.44 0.1 60);
  --danger-subtle: oklch(0.96 0.03 27);
  --danger-fg: oklch(0.45 0.17 27);
  --info-subtle: oklch(0.96 0.025 240);
  --info-fg: oklch(0.43 0.12 240);
  --dot: oklch(0.86 0.01 255);
  --shot-shadow:
    0 1px 2px oklch(0.2 0.02 260 / 0.06),
    0 10px 24px -8px oklch(0.2 0.02 260 / 0.14),
    0 28px 56px -18px oklch(0.2 0.03 262 / 0.16);
  --card-shadow: 0 1px 2px oklch(0.2 0.02 260 / 0.05);
  --pop-shadow: 0 2px 6px oklch(0.2 0.02 260 / 0.08), 0 24px 64px -12px oklch(0.2 0.02 260 / 0.3);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --header-h: 60px;
  --sidebar-w: 272px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.16 0.01 260);
    --fg: oklch(0.95 0.005 255);
    --surface: oklch(0.2 0.012 260);
    --sunken: oklch(0.135 0.01 260);
    --muted: oklch(0.24 0.012 260);
    --muted-fg: oklch(0.72 0.015 260);
    --border: oklch(0.28 0.012 260);
    --border-strong: oklch(0.36 0.014 260);
    --primary: oklch(0.7 0.15 var(--brand-h));
    --primary-hover: oklch(0.76 0.13 var(--brand-h));
    --primary-fg: oklch(0.16 0.01 260);
    --primary-subtle: oklch(0.27 0.06 var(--brand-h));
    --accent-fg: oklch(0.88 0.05 var(--brand-h));
    --ring: oklch(0.72 0.15 var(--brand-h));
    --overlay: oklch(0 0 0 / 0.65);
    --success-subtle: oklch(0.26 0.05 150);
    --success-fg: oklch(0.86 0.1 150);
    --warning-subtle: oklch(0.28 0.06 75);
    --warning-fg: oklch(0.88 0.1 80);
    --danger-subtle: oklch(0.27 0.07 27);
    --danger-fg: oklch(0.86 0.08 27);
    --info-subtle: oklch(0.26 0.05 240);
    --info-fg: oklch(0.86 0.08 240);
    --dot: oklch(0.3 0.012 260);
    --shot-shadow: 0 0 0 1px oklch(1 0 0 / 0.04), 0 18px 48px -16px oklch(0 0 0 / 0.7);
    --card-shadow: none;
    --pop-shadow: 0 0 0 1px oklch(1 0 0 / 0.06), 0 24px 64px -12px oklch(0 0 0 / 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.16 0.01 260);
  --fg: oklch(0.95 0.005 255);
  --surface: oklch(0.2 0.012 260);
  --sunken: oklch(0.135 0.01 260);
  --muted: oklch(0.24 0.012 260);
  --muted-fg: oklch(0.72 0.015 260);
  --border: oklch(0.28 0.012 260);
  --border-strong: oklch(0.36 0.014 260);
  --primary: oklch(0.7 0.15 var(--brand-h));
  --primary-hover: oklch(0.76 0.13 var(--brand-h));
  --primary-fg: oklch(0.16 0.01 260);
  --primary-subtle: oklch(0.27 0.06 var(--brand-h));
  --accent-fg: oklch(0.88 0.05 var(--brand-h));
  --ring: oklch(0.72 0.15 var(--brand-h));
  --overlay: oklch(0 0 0 / 0.65);
  --success-subtle: oklch(0.26 0.05 150);
  --success-fg: oklch(0.86 0.1 150);
  --warning-subtle: oklch(0.28 0.06 75);
  --warning-fg: oklch(0.88 0.1 80);
  --danger-subtle: oklch(0.27 0.07 27);
  --danger-fg: oklch(0.86 0.08 27);
  --info-subtle: oklch(0.26 0.05 240);
  --info-fg: oklch(0.86 0.08 240);
  --dot: oklch(0.3 0.012 260);
  --shot-shadow: 0 0 0 1px oklch(1 0 0 / 0.04), 0 18px 48px -16px oklch(0 0 0 / 0.7);
  --card-shadow: none;
  --pop-shadow: 0 0 0 1px oklch(1 0 0 / 0.06), 0 24px 64px -12px oklch(0 0 0 / 0.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
code, kbd, .mono { font-family: var(--mono); font-feature-settings: normal; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: var(--primary-subtle); color: var(--fg); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--primary); color: var(--primary-fg); padding: 8px 14px; border-radius: var(--r-md);
}
.skip-link:focus { top: 10px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i--sm { width: 14px; height: 14px; }
svg.i--lg { width: 22px; height: 22px; }

/* ---------- Small components ---------- */
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  font-size: 11px; font-weight: 500; line-height: 1;
  color: var(--muted-fg); background: var(--surface);
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-sm);
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  border-radius: var(--r-sm);
  background: var(--muted); color: var(--muted-fg);
}
.chip--brand { background: var(--primary-subtle); color: var(--accent-fg); }
.chip--success { background: var(--success-subtle); color: var(--success-fg); }
.chip--warning { background: var(--warning-subtle); color: var(--warning-fg); }
.chip--info { background: var(--info-subtle); color: var(--info-fg); }
.chip--outline { background: transparent; border: 1px solid var(--border-strong); }
.eyebrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 500; color: var(--muted-fg);
}
.eyebrow a { color: var(--muted-fg); }
.eyebrow a:hover { color: var(--fg); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 550; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
}
.btn:hover { text-decoration: none; background: var(--muted); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-md);
  border: 1px solid transparent; background: transparent; color: var(--muted-fg); cursor: pointer;
}
.icon-btn:hover { background: var(--muted); color: var(--fg); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; font-size: 15px; }
.link-arrow svg { transition: transform 0.15s ease; }
.link-arrow:hover svg { transform: translateX(2px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.section-head p { color: var(--muted-fg); margin-top: 6px; max-width: 60ch; }
.count { color: var(--muted-fg); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; letter-spacing: -0.01em; font-size: 17px; }
.wordmark:hover { text-decoration: none; }
.wordmark__mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-md);
  background: var(--primary); color: var(--primary-fg);
}
.wordmark__mark svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.wordmark__sub { font-weight: 500; color: var(--muted-fg); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--border); }
.site-nav { display: flex; gap: 2px; margin-left: 16px; }
.site-nav a {
  padding: 6px 10px; border-radius: var(--r-md);
  color: var(--muted-fg); font-size: 14px; font-weight: 500;
}
.site-nav a:hover { color: var(--fg); background: var(--muted); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--muted); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  width: 260px; height: 36px; padding: 0 6px 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--muted-fg); font-size: 14px; cursor: pointer; text-align: left;
}
.search-trigger:hover { border-color: var(--muted-fg); }
.search-trigger span.label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger .keys { display: inline-flex; gap: 3px; }
.menu-btn { display: none; }
.menu-btn--always { display: inline-flex; }
@media (max-width: 1023px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .search-trigger span.label, .search-trigger .keys { display: none; }
  .wordmark__sub { display: none; }
}
@media (max-width: 400px) { .site-header { padding: 0 10px; gap: 4px; } }

/* ---------- Shell: sidebar + main ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100dvh - var(--header-h)); }
.shell--home { display: block; }
.sidebar {
  position: sticky; top: var(--header-h);
  height: calc(100dvh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--sunken); border-right: 1px solid var(--border);
  padding: 20px 12px 32px;
  scrollbar-width: thin;
}
.sidebar__head { display: none; }
.sidebar__top a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-md);
  color: var(--fg); font-size: 14px; font-weight: 500;
}
.sidebar__top a:hover { background: var(--muted); text-decoration: none; }
.sidebar__top a[aria-current="page"] { background: var(--primary-subtle); color: var(--accent-fg); }
.sidebar__label {
  margin: 20px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted-fg);
  display: flex; justify-content: space-between;
}
.nav-group summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; color: var(--fg);
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--muted); }
.nav-group summary .count { margin-left: auto; font-size: 12px; font-weight: 500; }
.nav-group summary svg { color: var(--muted-fg); transition: transform 0.15s ease; }
.nav-group[open] > summary svg { transform: rotate(90deg); }
.nav-group ul { list-style: none; margin: 2px 0 8px 17px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-group li a {
  display: block; padding: 5px 10px; border-radius: var(--r-md);
  font-size: 14px; color: var(--muted-fg); line-height: 1.35;
}
.nav-group li a:hover { color: var(--fg); background: var(--muted); text-decoration: none; }
.nav-group li a[aria-current] { color: var(--accent-fg); background: var(--primary-subtle); font-weight: 550; }
.nav-group li a .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted-fg); }
.sidebar__fallback { padding: 8px 10px; font-size: 14px; }
.scrim { display: none; }

@media (max-width: 1023px) {
  .shell { display: block; }
}
/* Drawer mode: phones/tablets everywhere, and on the home page at every width */
@media (max-width: 1023px) {
  .sidebar { position: fixed; }
}
.sidebar--drawer, .shell--home .sidebar { position: fixed; }
@media (max-width: 1023px) {
  .sidebar {
    left: 0; top: 0; bottom: 0; z-index: 60; height: 100dvh;
    width: min(320px, 88vw); transform: translateX(-102%);
    transition: transform 0.2s ease; box-shadow: var(--pop-shadow);
    visibility: hidden;
  }
  .sidebar__head { display: flex; }
}
.shell--home .sidebar {
  left: 0; top: 0; bottom: 0; z-index: 60; height: 100dvh;
  width: min(320px, 88vw); transform: translateX(-102%);
  transition: transform 0.2s ease; box-shadow: var(--pop-shadow);
  visibility: hidden;
}
.shell--home .sidebar__head { display: flex; }
.sidebar__head { align-items: center; justify-content: space-between; padding: 0 4px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
body.drawer-open .sidebar { transform: none; visibility: visible; }
body.drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--overlay); }

/* ---------- Doc layout ---------- */
.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) 208px; gap: 56px;
  max-width: 1240px; padding: 36px 48px 96px;
}
.doc--wide { grid-template-columns: minmax(0, 1fr); max-width: 1160px; }
.doc__main { min-width: 0; }
.rail { position: sticky; top: calc(var(--header-h) + 36px); align-self: start; max-height: calc(100dvh - var(--header-h) - 60px); overflow: auto; }
@media (max-width: 1279px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 0; } .rail { display: none; } }
@media (max-width: 767px) { .doc { padding: 24px var(--gutter) 72px; } }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-fg); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted-fg); }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb svg { width: 12px; height: 12px; }
.breadcrumb [aria-current] { color: var(--fg); font-weight: 500; }

.page-title { font-size: clamp(30px, 4vw, 42px); font-weight: 680; letter-spacing: -0.025em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--muted-fg); max-width: 64ch; margin-top: 12px; }
.lede strong { color: var(--fg); font-weight: 550; }

/* On-this-page rail */
.toc__label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: 10px; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc a {
  display: grid; grid-template-columns: 22px 1fr; gap: 4px;
  margin-left: -1px; padding: 5px 0 5px 12px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.4; color: var(--muted-fg);
}
.toc a:hover { color: var(--fg); text-decoration: none; }
.toc a .n { font-family: var(--mono); font-size: 11px; padding-top: 2px; }
.toc a.is-active { color: var(--accent-fg); border-left-color: var(--primary); font-weight: 550; }
.toc__extra { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 13px; }
.toc__extra a { color: var(--muted-fg); display: flex; gap: 6px; align-items: center; }
.toc__extra a:hover { color: var(--fg); }

/* ---------- Screenshot frame ---------- */
.shot { margin: 0; }
.shot__frame {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shot-shadow);
  overflow: hidden;
}
.shot__bar {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--sunken);
  font-size: 12px; color: var(--muted-fg);
}
.shot__bar .mk {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: var(--r-sm);
  background: var(--primary); color: var(--primary-fg); font-size: 8px; font-weight: 800; letter-spacing: 0;
}
.shot__bar .crumb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot__bar .crumb b { color: var(--fg); font-weight: 550; }
.shot__bar .dim { font-family: var(--mono); font-size: 11px; }
.shot__open {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; position: relative;
}
.shot__open img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot__open::after {
  content: ""; position: absolute; inset: 0; background: transparent; transition: background 0.15s ease;
}
.shot__zoom {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border-radius: var(--r-md); background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
  font-size: 12px; font-weight: 550; opacity: 0; transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease; pointer-events: none;
}
.shot__open:hover .shot__zoom, .shot__open:focus-visible .shot__zoom { opacity: 1; transform: none; }
.shot__open:focus-visible { outline-offset: -3px; }
.shot figcaption {
  display: flex; gap: 10px; align-items: baseline;
  margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted-fg);
}
.shot figcaption .fig { flex: none; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent-fg); background: var(--primary-subtle); padding: 2px 6px; border-radius: var(--r-sm); }
.shot--phone .shot__frame { border-radius: 30px; border: 6px solid var(--fg); background: var(--fg); max-width: 300px; margin: 0 auto; }
:root[data-theme="dark"] .shot--phone .shot__frame { border-color: oklch(0.32 0.012 260); background: oklch(0.32 0.012 260); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot--phone .shot__frame { border-color: oklch(0.32 0.012 260); background: oklch(0.32 0.012 260); } }
.shot--phone .shot__open { border-radius: 24px; overflow: hidden; }
.shot--phone .shot__open img { aspect-ratio: 390 / 844; }
.shot--phone figcaption { max-width: 300px; margin-left: auto; margin-right: auto; }
/* The phone's screen around the capture (phoneScreen in parts.mjs), in cqw of the screen: a status bar and side
   margins, each filled with the capture's first two rows or outer two columns stretched, and a home indicator over
   the bottom of the capture. */
.shot--phone .shot__frame { container-type: inline-size; }
.shot--phone .shot__open { --ph-t: 11cqw; --ph-x: 4cqw; padding: var(--ph-t) var(--ph-x) 0; }
.phone__edge { position: absolute; background-repeat: no-repeat; pointer-events: none; }
.phone__edge--t { left: 0; right: 0; top: 0; height: var(--ph-t); background-size: 100% calc(var(--ph-t) * var(--ih) / 2); background-position: center top; }
.phone__edge--l, .phone__edge--r { top: var(--ph-t); bottom: 0; width: var(--ph-x); background-size: calc(var(--ph-x) * var(--iw) / 2) 100%; }
.phone__edge--l { left: 0; background-position: left center; }
.phone__edge--r { right: 0; background-position: right center; }
.phone__edge--t::after { content: ""; position: absolute; left: 50%; top: 2.8cqw; width: 27cqw; height: 6.6cqw; transform: translateX(-50%); border-radius: 999px; background: oklch(0.1 0 0); }
.phone__home { position: absolute; left: 50%; bottom: 2.2cqw; width: 32cqw; height: 1.3cqw; transform: translateX(-50%); border-radius: 999px; pointer-events: none; }
.phone--dark .phone__home { background: oklch(0.96 0 0 / 0.8); }
.phone--light .phone__home { background: oklch(0.15 0 0 / 0.8); }

/* Placeholder thumbnail (screenshot not captured yet) */
.thumb {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.thumb--pending {
  display: grid; place-items: center; align-content: center; gap: 4px;
  background-color: var(--sunken);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 12px 12px;
}
.thumb--pending .ini { font-size: 20px; font-weight: 700; color: var(--muted-fg); letter-spacing: -0.02em; }
.thumb--pending .tag { font-family: var(--mono); font-size: 10px; color: var(--muted-fg); }

/* ---------- Home ---------- */
.home-main { overflow: hidden; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 767px) { .wrap { padding: 0 var(--gutter); } }
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--border); }
/* The first section follows the hero's rule closely, so the page reads as one flow. */
.hero + .home-section { padding-top: 48px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.hero .lede { margin-top: 20px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14px; color: var(--muted-fg); }
.hero__meta b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero__search { margin-top: 28px; position: relative; max-width: 520px; }
.hero__starts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted-fg); }
.hero__starts a {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--fg); font-size: 13px; font-weight: 500; background: var(--surface);
}
.hero__starts a:hover { border-color: var(--primary); color: var(--accent-fg); text-decoration: none; }
.hero__media { position: relative; padding: 0 0 56px 14%; }
.hero__media::before {
  content: ""; position: absolute; inset: -24px -200px 0 0; z-index: -1;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to right, transparent, black 30%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 30%);
}
.hero__media .shot--main .shot__frame { width: 100%; }
.hero__media .shot--phone { position: absolute; left: 0; bottom: 0; width: 23%; }
.hero__media .shot--phone .shot__frame { border-width: 5px; border-radius: 24px; }
.hero__media .shot--phone .shot__open { border-radius: 19px; }
.hero__note {
  position: absolute; right: 0; bottom: 0; max-width: 72%; text-align: right; line-height: 1.4;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; color: var(--muted-fg);
}
@media (max-width: 1023px) {
  .hero { padding: 40px 0 28px; }
  .hero + .home-section { padding-top: 36px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__media { padding: 0 0 40px 14%; }
}
@media (max-width: 599px) {
  .hero__media { padding: 0 0 28px 16%; }
  .hero__media .shot--phone { width: 28%; }
  .hero__media .shot--phone .shot__frame { border-width: 3px; border-radius: 14px; }
  .hero__media .shot--phone .shot__open { border-radius: 11px; }
  .hero__note { display: none; }
}

/* Search box (inline + dialog) */
.searchbox { position: relative; display: flex; align-items: center; }
.searchbox svg.lead { position: absolute; left: 14px; color: var(--muted-fg); pointer-events: none; }
.searchbox input {
  width: 100%; height: 52px; padding: 0 52px 0 44px;
  font: 400 16px var(--font); color: var(--fg);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
}
.searchbox input::placeholder { color: var(--muted-fg); }
.searchbox input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 30%, transparent); }
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox .hint { position: absolute; right: 14px; }
.search-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--pop-shadow); overflow: hidden;
}
.search-panel[hidden] { display: none; }
.results { list-style: none; max-height: min(60vh, 440px); overflow-y: auto; padding: 6px; }
.results li[role="option"] {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 9px 10px; border-radius: var(--r-md); cursor: pointer;
}
.results li[role="option"] .t { font-size: 14px; font-weight: 550; color: var(--fg); }
.results li[role="option"] .t mark { background: none; color: var(--primary); }
.results li[role="option"] .d { grid-column: 1; font-size: 13px; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results li[role="option"] .chip { grid-row: 1 / span 2; grid-column: 2; }
.results li[aria-selected="true"] { background: var(--primary-subtle); }
.results .grp { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-fg); }
.results .empty { padding: 20px 12px; font-size: 14px; color: var(--muted-fg); }
.search-foot {
  display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--border);
  background: var(--sunken); font-size: 12px; color: var(--muted-fg);
}
.search-foot span { display: inline-flex; gap: 5px; align-items: center; }

dialog { color: var(--fg); }
dialog::backdrop { background: var(--overlay); }
.search-dialog {
  width: min(640px, calc(100vw - 24px)); max-height: none; padding: 0; margin: 10vh auto auto;
  border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--pop-shadow);
  overflow: hidden;
}
.search-dialog .searchbox input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; height: 56px; box-shadow: none; }
.search-dialog .searchbox input:focus { box-shadow: none; }
@media (max-width: 599px) { .search-dialog { margin-top: 12px; } }

.home-section { padding: 72px 0 0; }
.home-section:last-of-type { padding-bottom: 88px; }
@media (max-width: 767px) { .home-section { padding-top: 48px; } }

/* Suite grid */
.suites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1023px) { .suites { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .suites { grid-template-columns: 1fr; } }
.suite-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface);
  box-shadow: var(--card-shadow); overflow: hidden;
}
.suite-card__thumb { position: relative; height: 112px; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--sunken); }
.suite-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transform-origin: top left; transition: transform 0.3s ease; }
.suite-card:hover .suite-card__thumb img { transform: scale(1.03); }
.suite-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.suite-card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 17px; }
.suite-card h3 a { color: var(--fg); }
.suite-card h3 .count { font-size: 13px; }
.suite-card p { font-size: 14px; color: var(--muted-fg); line-height: 1.5; }
.suite-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 4px; font-size: 14px; }
.suite-card li:not(:last-child)::after { content: "·"; color: var(--border-strong); padding: 0 7px; }
.suite-card li a { color: var(--fg); }
.suite-card li a:hover { color: var(--primary); }

/* Workflow strip */
.flows { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 16px; margin: 0 -2px; scrollbar-width: thin; }
@media (min-width: 1200px) { .flows { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } .flows .flow-card:first-child { grid-column: span 2; grid-row: span 2; } }
.flow-card { scroll-snap-align: start; display: flex; flex-direction: column; color: var(--fg); border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); overflow: hidden; box-shadow: var(--card-shadow); }
.flow-card:hover { text-decoration: none; border-color: var(--border-strong); }
.flow-card__poster { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunken); border-bottom: 1px solid var(--border); }
.flow-card__poster img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.flow-card__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.18 0.02 262 / 0.55), transparent 55%); }
.play-dot {
  position: absolute; z-index: 1; left: 14px; bottom: 14px;
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: oklch(1 0 0 / 0.95); color: oklch(0.3 0.1 262); box-shadow: 0 4px 14px oklch(0 0 0 / 0.25);
}
.play-dot svg { fill: currentColor; stroke: none; margin-left: 2px; }
.flow-card__poster .dur { position: absolute; z-index: 1; right: 12px; bottom: 14px; font-family: var(--mono); font-size: 12px; color: oklch(1 0 0); background: oklch(0.15 0.01 260 / 0.7); padding: 2px 6px; border-radius: var(--r-sm); }
.flow-card__body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.flow-card h3 { font-size: 16px; }
.flow-card p { font-size: 13px; color: var(--muted-fg); line-height: 1.5; }
.flow-card .steps { font-size: 12px; color: var(--muted-fg); }
.flows .flow-card:first-child h3 { font-size: 20px; }
.flows .flow-card:first-child p { font-size: 15px; }
.flows .flow-card:first-child .play-dot { width: 56px; height: 56px; left: 20px; bottom: 20px; }
.flow-card--planned .flow-card__poster img { filter: saturate(0.6); opacity: 0.85; }

/* Across-the-suite band */
.cross { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 899px) { .cross { grid-template-columns: 1fr; } }
.cross-card { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 20px; background: var(--surface); display: grid; gap: 10px; align-content: start; }
.cross-card h3 { font-size: 17px; }
.cross-card p { font-size: 14px; color: var(--muted-fg); }
.cross-card .thumb { margin-top: 6px; }

/* ---------- Catalog page ---------- */
.filterbar { display: grid; gap: 14px; margin: 28px 0 8px; position: sticky; top: var(--header-h); z-index: 5; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--border); }
.filterbar .searchbox input { height: 44px; font-size: 15px; }
.chips-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips-row::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.filter-chip .count { font-size: 12px; }
.filter-chip:hover { border-color: var(--muted-fg); }
.filter-chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.filter-chip[aria-pressed="true"] .count { color: inherit; opacity: 0.7; }
.filter-status { font-size: 13px; color: var(--muted-fg); min-height: 20px; }
.suite-section { padding-top: 36px; }
.suite-section[hidden] { display: none; }
.suite-section > header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.suite-section > header h2 { font-size: 22px; }
.suite-section > header h2 a.anchor { margin-left: 6px; }
.suite-section > header p { flex-basis: 100%; font-size: 14px; color: var(--muted-fg); }
.app-list { list-style: none; }
.app-row { border-bottom: 1px solid var(--border); }
.app-row[hidden] { display: none; }
.app-row > a {
  display: grid; grid-template-columns: 136px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 14px 8px 14px 0; color: var(--fg); border-radius: var(--r-md);
}
.app-row > a:hover { text-decoration: none; background: var(--sunken); }
.app-row > a:hover .app-row__go { color: var(--primary); transform: translateX(2px); }
.app-row .thumb { width: 136px; border-radius: var(--r-md); }
.app-row h3 { font-size: 16px; font-weight: 620; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-row p { font-size: 14px; color: var(--muted-fg); margin-top: 3px; line-height: 1.5; }
.app-row__caps { font-size: 12px; color: var(--muted-fg); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.app-row__caps span { display: inline-flex; align-items: center; gap: 5px; }
.app-row__go { color: var(--muted-fg); transition: transform 0.15s ease; }
.app-row:target > a { background: var(--primary-subtle); }
@media (max-width: 599px) {
  .app-row > a { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; }
  .app-row .thumb { width: 88px; }
  .app-row__go { display: none; }
}
.no-results { padding: 40px 0; color: var(--muted-fg); }

/* ---------- App detail page ---------- */
.app-hero { display: grid; gap: 20px; }
.summary {
  margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); overflow: hidden;
}
.summary > div { padding: 18px 20px; border-top: 1px solid var(--border); }
.summary > div:nth-child(-n+2) { border-top: 0; }
.summary > div:nth-child(even) { border-left: 1px solid var(--border); }
.summary dt, .summary h2 { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: 8px; }
.summary p { font-size: 15px; line-height: 1.55; }
.summary ul { list-style: none; display: grid; gap: 6px; font-size: 15px; }
.summary ul li { display: flex; gap: 8px; align-items: baseline; }
.summary .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.summary .tags a { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--fg); background: var(--bg); }
.summary .tags a:hover { border-color: var(--primary); color: var(--accent-fg); text-decoration: none; }
.summary__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; background: var(--sunken); font-size: 14px; color: var(--muted-fg); }
.summary__foot b { color: var(--fg); font-variant-numeric: tabular-nums; }
.summary__foot .link-arrow { margin-left: auto; font-size: 14px; }
@media (max-width: 767px) {
  .summary { grid-template-columns: 1fr; }
  .summary > div:nth-child(2) { border-top: 1px solid var(--border); }
  .summary > div:nth-child(even) { border-left: 0; }
  .summary__foot .link-arrow { margin-left: 0; }
}

.features { counter-reset: none; margin-top: 56px; display: grid; gap: 88px; }
@media (max-width: 767px) { .features { gap: 64px; } }
.feature { scroll-margin-top: calc(var(--header-h) + 24px); }
.feature__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: start; }
.feature__num {
  grid-row: span 2;
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-lg);
  font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--accent-fg); background: var(--primary-subtle);
  font-variant-numeric: tabular-nums;
}
.feature__head h2 { font-size: clamp(21px, 2.3vw, 26px); font-weight: 660; display: flex; align-items: center; gap: 8px; }
.feature__head .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted-fg); }
.anchor { color: var(--border-strong); font-weight: 400; opacity: 0; transition: opacity 0.15s ease; text-decoration: none; }
h2:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--primary); text-decoration: none; }
.feature__body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; margin: 18px 0 28px 56px; }
.feature__body p { font-size: 16px; line-height: 1.65; }
.feature__body p + p { margin-top: 10px; }
.caps { list-style: none; display: grid; gap: 8px; font-size: 14px; align-content: start; padding: 14px 16px; border-radius: var(--r-lg); background: var(--sunken); border: 1px solid var(--border); }
.caps li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; line-height: 1.45; }
.caps li svg { color: var(--success-fg); margin-top: 2px; }
.caps__label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: 2px; display: block; }
@media (max-width: 1023px) { .feature__body { grid-template-columns: 1fr; margin-left: 0; gap: 18px; } }
.shots { display: grid; gap: 28px; }
.shots--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.shots--phone { grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 32px; padding: 32px; border-radius: var(--r-xl); background: var(--sunken); border: 1px solid var(--border); }
.shots--phone .side { display: grid; gap: 14px; font-size: 15px; }
.shots--phone .side h3 { font-size: 15px; }
.shots--phone .side p { color: var(--muted-fg); font-size: 14px; }
@media (max-width: 899px) {
  .shots--pair { grid-template-columns: 1fr; }
  .shots--phone { grid-template-columns: 1fr; padding: 20px; }
}

/* Workflow video card (on app pages) */
.video-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); color: var(--fg);
  box-shadow: var(--card-shadow);
}
.video-card:hover { text-decoration: none; border-color: var(--border-strong); }
.video-card__poster { position: relative; min-height: 220px; background: var(--sunken); }
.video-card__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.video-card__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, oklch(0.18 0.02 262 / 0.55), transparent 60%); }
.video-card__poster .play-dot { width: 56px; height: 56px; left: 20px; bottom: 20px; }
.video-card__body { padding: 24px; display: grid; gap: 12px; align-content: center; }
.video-card__body h3 { font-size: 21px; }
.video-card__body p { color: var(--muted-fg); font-size: 15px; }
.video-card ol { list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--muted-fg); counter-reset: s; }
.video-card ol li { display: flex; gap: 10px; }
.video-card ol li .mono { font-size: 12px; color: var(--accent-fg); }
@media (max-width: 767px) { .video-card { grid-template-columns: 1fr; } .video-card__poster { aspect-ratio: 16 / 10; min-height: 0; } }

.block { margin-top: 88px; }
.block > h2 { font-size: 24px; margin-bottom: 6px; }
.block > p.sub { color: var(--muted-fg); margin-bottom: 20px; }
.block > h2 + .related { margin-top: 20px; }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; }
@media (max-width: 1023px) { .related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .related { grid-template-columns: 1fr; } }
.related a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--fg); background: var(--surface); height: 100%; }
.related a:hover { text-decoration: none; border-color: var(--border-strong); background: var(--sunken); }
.related .thumb { border-radius: var(--r-md); }
.related h3 { font-size: 15px; }
.related p { font-size: 13px; color: var(--muted-fg); line-height: 1.45; margin-top: 2px; }
.related .rel { font-size: 12px; color: var(--accent-fg); margin-top: 4px; display: block; }

/* ---------- Workflow page ---------- */
.chapters { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.chapters__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.chapters__head .count { font-size: 13px; }
.chapters ol { list-style: none; overflow-y: auto; padding: 6px; display: grid; gap: 2px; }
.chapters button {
  width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 10px; text-align: left;
  padding: 8px 10px; border-radius: var(--r-md); border: 0; background: transparent; cursor: pointer;
}
.chapters button:hover { background: var(--muted); }
.chapters button[aria-current="true"] { background: var(--primary-subtle); }
.chapters button[aria-current="true"] .ct { color: var(--accent-fg); }
.chapters .tc { font-family: var(--mono); font-size: 12px; color: var(--muted-fg); padding-top: 2px; grid-row: span 2; }
.chapters .ct { font-size: 14px; font-weight: 550; line-height: 1.35; }
.chapters .ca { font-size: 12px; color: var(--muted-fg); }

.touches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.touches a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--fg); font-size: 14px; font-weight: 500; background: var(--surface); }
.touches a:hover { border-color: var(--primary); text-decoration: none; }
.touches .step-n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--muted); font-family: var(--mono); font-size: 11px; color: var(--muted-fg); }

.transcript { list-style: none; margin-top: 8px; }
.tstep { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 24px); }
.tstep__tc { display: grid; gap: 8px; align-content: start; }
.tstep__tc button { font-family: var(--mono); font-size: 13px; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.tstep__tc button:hover { text-decoration: underline; }
.tstep__tc .n { font-size: 12px; color: var(--muted-fg); }
.tstep h3 { font-size: 19px; }
.tstep .where { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0 10px; font-size: 13px; color: var(--muted-fg); }
.tstep p { max-width: 68ch; line-height: 1.65; }
.tstep__grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: start; }
.tstep__grid .thumb { cursor: zoom-in; padding: 0; width: 100%; }
@media (max-width: 899px) { .tstep__grid { grid-template-columns: 1fr; } .tstep__grid .thumb { max-width: 320px; } }
@media (max-width: 599px) { .tstep { grid-template-columns: 1fr; gap: 6px; } .tstep__tc { display: flex; gap: 10px; } }
button.thumb { display: block; border: 1px solid var(--border); background: var(--surface); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent;
}
.lightbox::backdrop { background: oklch(0.1 0.01 260 / 0.92); }
.lightbox__inner { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: oklch(0.96 0 0); }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 13px; }
.lightbox__top .counter { font-family: var(--mono); opacity: 0.8; }
.lightbox .icon-btn { color: oklch(0.96 0 0); width: 44px; height: 44px; }
.lightbox .icon-btn:hover { background: oklch(1 0 0 / 0.1); color: oklch(1 0 0); }
.lightbox__stage { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 8px; padding: 0 12px; min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; margin: 0 auto; object-fit: contain; border-radius: var(--r-lg); box-shadow: 0 20px 60px oklch(0 0 0 / 0.5); }
.lightbox__fig { min-height: 0; height: 100%; display: grid; place-items: center; margin: 0; }
.lightbox__cap { padding: 14px 20px 22px; text-align: center; font-size: 15px; line-height: 1.5; max-width: 860px; margin: 0 auto; }
.lightbox__cap .src { display: block; margin-top: 4px; font-size: 12px; opacity: 0.65; font-family: var(--mono); }
@media (max-width: 599px) {
  .lightbox__stage { grid-template-columns: 1fr; padding: 0 8px; }
  .lightbox__stage .nav { display: none; }
  .lightbox__navrow { display: flex !important; justify-content: center; gap: 16px; }
}
.lightbox__navrow { display: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--sunken); font-size: 14px; color: var(--muted-fg); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 40px 0; }
.footer__grid h2 { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 10px; }
.footer__grid ul { list-style: none; display: grid; gap: 6px; }
.footer__grid a { color: var(--muted-fg); }
.footer__grid a:hover { color: var(--fg); }
.footer__grid p { margin-top: 10px; max-width: 36ch; line-height: 1.55; }
@media (max-width: 767px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > div:first-child { grid-column: 1 / -1; } }
.shell .site-footer .wrap { max-width: none; padding: 0 48px; }
@media (max-width: 767px) { .shell .site-footer .wrap { padding: 0 var(--gutter); } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* late additions */
.shell__main { min-width: 0; }
.app-row__list { font-size: 12.5px !important; color: var(--muted-fg); margin-top: 6px !important; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-row > a > div { min-width: 0; }
.features, .shots, .block { grid-template-columns: minmax(0, 1fr); }
.shots--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.shots--phone { grid-template-columns: minmax(0, 1fr) 260px; }
@media (max-width: 899px) { .shots--pair, .shots--phone { grid-template-columns: minmax(0, 1fr); } }
.feature, .shots > *, .feature__body > * { min-width: 0; }
.shot--crop .shot__open img { aspect-ratio: 32 / 11; }
.shot--crop .shot__zoom { opacity: 1; transform: none; }

/* Workflows index */
.flows--index { list-style: none; margin-top: 28px; grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); overflow: visible; }
.flows--index > li { display: flex; }
.flows--index .flow-card { flex: 1; }
@media (min-width: 1200px) { .flows--index .flow-card:first-child { grid-column: auto; grid-row: auto; } .flows.flows--index { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wf-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.flow-card__body .wf-meta { font-size: 13px; color: var(--muted-fg); margin-top: 6px; }

/* Platform page: numbered sections, each a list of label and detail rows */
.features.platform__sections { gap: 56px; }
.spec { margin: 16px 0 0 56px; max-width: 880px; border-top: 1px solid var(--border); }
.spec__row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 3fr); gap: 2px 24px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.spec dt { font-size: 14px; font-weight: 600; line-height: 1.65; }
.spec dd { margin: 0; font-size: 15px; line-height: 1.6; }
@media (max-width: 1023px) { .spec { margin-left: 0; } }
@media (max-width: 599px) { .spec__row { grid-template-columns: minmax(0, 1fr); } }


/* Accessibility review fixes */
.suite-card ul a { display: inline-block; padding-block: 4px; }
.app-row { scroll-margin-top: 230px; }

/* Not-found page (404.html) */
.notfound__search { margin-top: 24px; }
.notfound__h { font-size: 20px; margin-top: 40px; }
.notfound__links { list-style: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; max-width: 880px; }
@media (max-width: 599px) { .notfound__links { grid-template-columns: minmax(0, 1fr); } }
.notfound__links .cross-card { position: relative; transition: border-color 0.15s ease; }
.notfound__links .cross-card:hover { border-color: var(--border-strong); }
.notfound__links h3 a { color: var(--fg); }
.notfound__links h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
