/* ==========================================================================
   WrenLine Studio: design system
   --------------------------------------------------------------------------
   Concept: "the line". A single drafting hairline runs through the site:
   section markers, the Diagnose → Recommend → Build line in the hero, rules
   between rows. Editorial serif display type, a precise grotesk for reading,
   and mono "annotations" like the margin notes on a technical drawing.

   1. Tokens           6. Masthead & menu     11. Software ("lab")
   2. Fonts            7. Hero                12. Case study / detail
   3. Base             8. Home sections       13. Forms
   4. Layout helpers   9. Plates & video      14. Footer
   5. Components      10. Page headers        15. Motion & utilities
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ink: #111214;
  --ink-2: #191a1d;
  --ink-3: #2b2d31;
  --paper: #ffffff;
  --paper-2: #f5f5f3;
  --paper-3: #e8e8e5;
  --paper-hi: #ffffff;
  --text: var(--ink);
  --muted: #61656b;
  --rule: rgba(17, 18, 20, .09);
  --rule-strong: rgba(17, 18, 20, .2);
  --wren: #2f5d8a;          /* accent: a quiet ink blue, used sparingly */
  --wren-deep: #2a5480;
  --signal: #a9c3de;        /* accent on dark backgrounds */
  --on-ink: #f4f4f2;
  --on-ink-muted: #a3a6ab;
  --rule-ink: rgba(244, 244, 242, .13);
  --danger: #b3261e;

  --f-display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-sans: var(--f-display);
  --f-mono: var(--f-display);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --head: 76px;
  --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem; --space-4: 2.5rem;
  --space-5: clamp(3.5rem, 7vw, 6rem); --space-6: clamp(5rem, 11vw, 10rem);

  --t-xs: .72rem;
  --t-sm: .9rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.15rem, 1rem + .5vw, 1.35rem);
  --t-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --t-2xl: clamp(2rem, 1.3rem + 2.8vw, 3.6rem);
  --t-3xl: clamp(2.4rem, 1.4rem + 4.2vw, 5.2rem);
  --t-hero: clamp(2.7rem, 1rem + 6.4vw, 7.4rem);

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --radius: 4px;
}

/* 2. Fonts (self-hosted, latin subset, SIL OFL) ---------------------------- */
@font-face { font-family: "Inter Tight"; src: url("/static/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 var(--t-md)/1.6 var(--f-sans); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol[role="list"], ul[role="list"] { list-style: none; padding: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--ink); color: var(--paper); }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--wren); outline-offset: 3px; border-radius: 1px; }

.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
.display em { font-style: normal; color: var(--muted); }
.mono { font-family: var(--f-sans); font-size: var(--t-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
.sr-only { 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 { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 16px; transition: top .2s; }
.skip:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* 4. Layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* 5. Components ------------------------------------------------------------ */
/* Section marker: "§ 02  SELECTED WORK  ──────────" */
.shead { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); color: var(--muted); }
.shead__num { color: var(--wren-deep); }
.shead__rule { height: 1px; background: var(--rule-strong); transform-origin: left; }
.shead--light { color: var(--on-ink-muted); }
.shead--light .shead__num { color: var(--signal); }
.shead--light .shead__rule { background: var(--rule-ink); }

/* Buttons: one shape, five tones */
.btn {
  --b-bg: var(--ink); --b-fg: var(--paper); --b-bd: var(--ink); --b-hover: #34373c;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 24px 0 26px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd); border-radius: 999px;
  font: 500 .95rem/1 var(--f-sans); letter-spacing: .005em; cursor: pointer; white-space: nowrap;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--b-hover); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover .icon { transform: translateX(4px); }
.btn:hover { border-color: var(--b-hover); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--rule-strong); --b-hover: var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--light { --b-bg: var(--paper); --b-fg: var(--ink); --b-bd: var(--paper); --b-hover: #dcdcd8; }
.btn--light:hover { color: var(--ink); }
.btn--signal { --b-bg: var(--signal); --b-fg: var(--ink); --b-bd: var(--signal); --b-hover: var(--paper); }
.btn--ghost-light { --b-bg: transparent; --b-fg: var(--on-ink); --b-bd: var(--rule-ink); --b-hover: var(--paper); }
.btn--ghost-light:hover { color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 14px 0 16px; font-size: .875rem; gap: 10px; }
.btn--large { min-height: 58px; padding: 0 26px 0 28px; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link { display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--rule-strong); transition: color .2s, text-decoration-color .2s; }
.link:hover { color: var(--wren-deep); text-decoration-color: currentColor; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.25rem 0; }
.tags li { border: 1px solid var(--rule-strong); padding: 5px 10px; border-radius: var(--radius); color: var(--muted); }
.tags--large li { padding: 8px 14px; color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid currentColor; border-radius: 99px; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--concept { color: #b9bcc1; }
.status--in-development { color: #e7c27a; }
.status--demo-available { color: var(--signal); }
.status--live-product { color: #b7e08a; }

.metatable { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 clamp(16px, 2vw, 32px); margin: clamp(2rem, 4vw, 3rem) 0 2rem; }
.metatable div { border-top: 1px solid var(--rule-strong); padding: 12px 0 14px; }
.metatable dt { color: var(--muted); margin-bottom: 4px; }
.metatable dd { font-weight: 500; }

.note { display: grid; gap: 6px; border-left: 2px solid var(--wren); padding: 4px 0 4px 18px; margin-top: 2rem; max-width: 62ch; color: var(--muted); }
.note .mono { color: var(--wren-deep); }

.prose { max-width: 64ch; }
.prose p + p, .prose h2 + p { margin-top: 1em; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-xl); margin: 2.2em 0 .5em; }
.prose--large { font-size: var(--t-lg); line-height: 1.55; }

.crumbs { margin-bottom: clamp(2rem, 5vw, 3.5rem); color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: .5; }
.crumbs a:hover { color: var(--wren-deep); }

/* Steps & item lists */
.steps { border-bottom: 1px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 4rem 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--rule); }
.steps .mono { color: var(--wren-deep); padding-top: .3em; }
.steps p { max-width: 60ch; }
.sitems { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 clamp(20px, 3vw, 48px); }
.sitems li { border-top: 1px solid var(--rule-strong); padding: 20px 0 28px; }
.sitems .mono { color: var(--muted); }
.sitems h3 { font: 500 1.6rem/1.1 var(--f-display); letter-spacing: -.02em; margin: 10px 0 8px; }
.sitems h3 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.sitems p { color: var(--muted); max-width: 46ch; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 32px; }
.checks li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.checks .icon { color: var(--wren-deep); margin-top: .2em; }

/* FAQ disclosure */
.faqs { border-bottom: 1px solid var(--rule-strong); }
.faq { border-top: 1px solid var(--rule-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq__q { font: 500 1.125rem/1.35 var(--f-sans); }
.faq__icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule-strong); border-radius: 50%; flex: none; transition: transform .35s var(--ease), background .25s; }
.faq[open] .faq__icon { transform: rotate(45deg); background: var(--ink); color: var(--paper); }
.faq summary:hover .faq__q { color: var(--wren-deep); }
.faq__a { padding: 0 3.5rem 24px 0; color: var(--muted); max-width: 68ch; }

/* 6. Masthead & menu ------------------------------------------------------- */
.masthead { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .35s, box-shadow .35s, transform .45s var(--ease); }
.masthead__inner { display: flex; align-items: center; gap: 24px; height: var(--head); }
.masthead.is-scrolled { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--rule); }
.masthead.is-hidden { transform: translateY(-100%); }
.masthead__brand { margin-right: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.wordmark__mark { width: 28px; height: 28px; }
.wordmark__name { font: 650 1.3rem/1 var(--f-display); letter-spacing: -.03em; }
.wordmark__studio { font: 500 .66rem/1 var(--f-sans); letter-spacing: .18em; text-transform: uppercase; padding-left: 10px; border-left: 1px solid var(--rule-strong); color: var(--muted); }
.wordmark--light { color: var(--on-ink); }
.wordmark--light .wordmark__studio { color: var(--on-ink-muted); border-color: var(--rule-ink); }
.masthead__nav { display: none; }
.masthead__nav ul { display: flex; gap: clamp(16px, 2.4vw, 36px); list-style: none; margin: 0; padding: 0; }
.navlink { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 0; font-weight: 500; font-size: .95rem; }
.navlink__n { font-size: .62rem; color: var(--muted); transition: color .2s; }
.navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.navlink:hover::after, .navlink.is-current::after { transform: scaleX(1); transform-origin: left; }
.navlink:hover .navlink__n, .navlink.is-current .navlink__n { color: var(--wren-deep); }
.masthead__cta { display: none; }
.masthead__toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px 0 12px; background: none; border: 0; cursor: pointer; font: 500 .8rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.masthead__toggle-lines { position: relative; width: 26px; height: 10px; }
.masthead__toggle-lines i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease); }
.masthead__toggle-lines i:first-child { top: 0; }
.masthead__toggle-lines i:last-child { top: 8.5px; }
.menu-open .masthead__toggle-lines i:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-open .masthead__toggle-lines i:last-child { top: 4.25px; transform: rotate(-45deg); }
.menu-open .masthead { color: var(--on-ink); background: transparent; box-shadow: none; backdrop-filter: none; }
.menu-open .masthead .wordmark { color: var(--on-ink); }
.menu-open .masthead .wordmark__studio { color: var(--on-ink-muted); border-color: var(--rule-ink); }
.menu-open { overflow: hidden; }

.menu { position: fixed; inset: 0; z-index: -1; background: var(--ink); color: var(--on-ink); overflow-y: auto; clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease-io), visibility 0s .6s; visibility: hidden; }
.menu[hidden] { display: block; }
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .6s var(--ease-io); }
.menu__inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--head) + 4vh); padding-bottom: 32px; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { border-top: 1px solid var(--rule-ink); opacity: 0; transform: translateY(18px); transition: opacity .4s, transform .5s var(--ease); }
.menu-open .menu__list li { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .05s); }
.menu__list a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; font: 500 clamp(2.4rem, 10vw, 4rem)/1 var(--f-display); letter-spacing: -.02em; }
.menu__list .mono { color: var(--signal); }
.menu__list a[aria-current] { color: var(--on-ink-muted); }
.menu__foot { display: grid; gap: 20px; justify-items: start; margin-top: 40px; color: var(--on-ink-muted); }

@media (min-width: 64em) {
  .masthead__nav, .masthead__cta { display: block; }
  .masthead__cta { display: inline-flex; }
  .masthead__toggle, .menu { display: none !important; }
  .masthead__nav { margin-right: 12px; }
}

/* 7–8. Hero & home sections: see 16. Redesign */
section { position: relative; }

/* 9. Plates & video -------------------------------------------------------- */
.plate { position: relative; background: var(--paper-2); border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.plate__bar { display: flex; justify-content: center; align-items: center; height: 30px; border-bottom: 1px solid var(--rule); background: var(--paper-hi); }
.plate__bar::before { content: ""; position: absolute; left: 12px; top: 12px; width: 26px; height: 6px; background: radial-gradient(circle, var(--paper-3) 2.6px, transparent 3px) 0 0 / 10px 6px repeat-x; }
.plate__url { font-size: .62rem; color: var(--muted); text-transform: none; letter-spacing: .02em; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate__view { aspect-ratio: 16 / 10; overflow: hidden; }
.plate__view > img, .plate__view > .plate__svg { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.1s var(--ease); }
a:hover .plate__view > img, a:hover .plate__view > .plate__svg { transform: scale(1.035); }

.video { margin-top: 1rem; }
.video__trigger { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--rule-ink); border-radius: var(--radius); background: var(--ink-2); overflow: hidden; cursor: pointer; }
.video__poster, .video__poster img, .video__poster svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__poster img, .video__poster svg { transition: transform 1.2s var(--ease), filter .6s; }
.video__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 23, 27, .05) 40%, rgba(20, 23, 27, .65)); }
.video__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: clamp(64px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--paper); color: var(--ink); transform: translate(-50%, -50%); transition: transform .45s var(--ease), background .3s, color .3s; box-shadow: 0 0 0 0 rgba(241, 237, 228, .35); }
.video__play .icon { width: 34%; height: 34%; margin-left: 6%; }
.video__trigger:hover .video__play, .video__trigger:focus-visible .video__play { transform: translate(-50%, -50%) scale(1.08); background: var(--wren); color: var(--paper); box-shadow: 0 0 0 14px rgba(241, 237, 228, .12); }
.video__trigger:hover .video__poster img, .video__trigger:hover .video__poster svg { transform: scale(1.03); }
.video__meta { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; color: var(--on-ink); }
.video__caption { margin-top: 14px; color: var(--on-ink-muted); }
.video__caption .mono { color: var(--signal); margin-right: 8px; }

.vmodal { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--on-ink); }
.vmodal::backdrop { background: rgba(14, 16, 19, .92); backdrop-filter: blur(6px); }
.vmodal[open] { display: grid; place-items: center; animation: vm-in .35s var(--ease); }
.vmodal__inner { width: min(100% - 2 * var(--gutter), 1280px, (100dvh - 140px) * 16 / 9); }
.vmodal__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.vmodal__title { color: var(--on-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmodal__close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule-ink); border-radius: 50%; background: transparent; cursor: pointer; transition: background .25s, color .25s; }
.vmodal__close:hover { background: var(--paper); color: var(--ink); }
.vmodal__frame { aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.vmodal__frame video, .vmodal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@keyframes vm-in { from { opacity: 0; transform: scale(.98); } }

/* 10. Page headers & index pages ------------------------------------------- */
.phead { padding-top: calc(var(--head) + clamp(2rem, 6vh, 4.5rem)); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.phead__kicker { color: var(--wren-deep); margin-bottom: 1.25rem; }
.phead__title { font-size: var(--t-3xl); max-width: 16ch; letter-spacing: -.02em; }
.phead__title em { color: var(--muted); }
.phead__lede { font-size: var(--t-lg); line-height: 1.5; max-width: 52ch; margin-top: 1.75rem; color: #34383e; }
.phead--center { text-align: center; min-height: 70vh; display: grid; align-content: center; justify-items: center; }
.phead--center .phead__lede { margin-inline: auto; }
.phead--center .actions { justify-content: center; margin-top: 2rem; }

.windex { position: relative; padding-bottom: var(--space-5); }
.windex__list { border-bottom: 1px solid var(--rule-strong); }
.windex__row { border-top: 1px solid var(--rule-strong); }
.windex__row a { position: relative; display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 4px 16px; align-items: baseline; padding: 22px 0; transition: padding .45s var(--ease), color .3s; }
.windex__n { color: var(--wren-deep); }
.windex__name { font-size: clamp(1.9rem, 1.2rem + 3vw, 4.4rem); line-height: 1; }
.windex__ind, .windex__cat { grid-column: 2; color: var(--muted); }
.windex__go { grid-row: 1; grid-column: 3; align-self: center; transition: transform .35s var(--ease); }
.windex__row a:hover { color: var(--wren-deep); }
.windex__row a:hover .windex__go { transform: translateX(6px); }
@media (min-width: 64em) {
  .windex__row a { grid-template-columns: 4rem minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr) 2rem; padding: 28px 0; }
  .windex__ind, .windex__cat { grid-column: auto; }
  .windex__row a:hover { padding-left: 14px; }
  .windex__go { grid-column: 5; }
}
.windex__float { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 64em) {
  .js .windex__float { display: block; position: fixed; left: 0; top: 0; z-index: 30; width: 380px; pointer-events: none; opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0); transition: opacity .3s; }
  .windex__float.is-on { opacity: 1; }
  .windex__float-item { position: absolute; inset: 0 auto auto 0; width: 100%; opacity: 0; transform: scale(.96) rotate(-1.5deg); transition: opacity .35s, transform .5s var(--ease); box-shadow: 0 30px 60px -20px rgba(20, 23, 27, .35); }
  .windex__float-item.is-active { opacity: 1; transform: none; }
}

.wgrid { padding-bottom: var(--space-4); }
.wcase { display: grid; gap: 1.5rem; padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule); }
.wcase__fig { color: var(--wren-deep); margin-bottom: 10px; }
.wcase__name { font-size: var(--t-2xl); margin-bottom: 1rem; }
.wcase__name a:hover { color: var(--wren-deep); }
.wcase__text > p { color: #34383e; max-width: 44ch; }
@media (min-width: 64em) {
  .wcase { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .wcase__visual { grid-column: 1 / span 8; }
  .wcase__text { grid-column: 9 / span 4; }
  .wcase--flip .wcase__visual { grid-column: 5 / span 8; grid-row: 1; }
  .wcase--flip .wcase__text { grid-column: 1 / span 4; grid-row: 1; }
}

.svc { display: grid; gap: 2rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule-strong); }
.svc__code { color: var(--wren-deep); }
.svc__name { font-size: var(--t-2xl); margin: 12px 0 14px; }
.svc__name a:hover { color: var(--wren-deep); }
.svc__sum { color: #34383e; margin-bottom: 1.5rem; max-width: 42ch; }
.svc__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 28px; align-content: start; }
.svc__items li { border-top: 1px solid var(--rule); padding: 16px 0 18px; }
.svc__items h3 { font-size: 1.05rem; margin-bottom: 4px; }
.svc__items h3 a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.svc__items p { color: var(--muted); font-size: var(--t-sm); }
@media (min-width: 64em) { .svc { grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 6vw, 96px); } .svc__head { position: sticky; top: calc(var(--head) + 24px); align-self: start; } }

/* Detail pages share a two-column "label + content" rhythm */
.sdetail > section, .case__sec, .about__sec, .prbody > section { display: grid; gap: 1rem 32px; padding: clamp(2.5rem, 5vw, 4rem) 0 0; }
.sdetail > section > .shead, .case__sec > .shead, .about__sec > .shead, .prbody > section > .shead { grid-column: 1 / -1; margin-bottom: .5rem; }
.case__h { font: 500 var(--t-xl)/1.08 var(--f-display); letter-spacing: -.02em; max-width: 14ch; }
@media (min-width: 64em) {
  .sdetail > section, .case__sec, .about__sec, .prbody > section { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .sdetail > section > :not(.shead), .case__sec > :not(.shead), .about__sec > :not(.shead), .prbody > section > :not(.shead) { grid-column: 5 / -1; }
  .sdetail > section > .case__h, .case__sec > .case__h, .about__sec > .case__h, .prbody > section > .case__h { grid-column: 1 / span 4; grid-row: span 6; align-self: start; }
  .sdetail__intro > .prose { grid-column: 1 / span 8 !important; }
  .sdetail__intro > .sdetail__who { grid-column: 9 / -1 !important; }
}
.sdetail__who { border-top: 1px solid var(--rule-strong); padding-top: 14px; color: var(--muted); }
.sdetail__who .mono { color: var(--wren-deep); margin-bottom: 6px; font-weight: 500; }
.sdetail__child { margin-top: 1.5rem; }

.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px 24px; }
.minis a { display: grid; gap: 6px; }
.minis .plate { margin-bottom: 8px; }
.minis__name { font: 500 1.4rem/1.1 var(--f-display); letter-spacing: -.02em; }
.minis .mono { color: var(--muted); }

.others { margin-top: var(--space-5); padding-top: 1rem; }
.others h2 { color: var(--muted); margin-bottom: 1rem; }
.others ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--rule-strong); }
.others a { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); font: 500 1.35rem/1.1 var(--f-display); letter-spacing: -.02em; }
.others a .mono { color: var(--wren-deep); }
.others a .icon { margin-left: auto; margin-right: 16px; transition: transform .3s var(--ease); }
.others a:hover .icon { transform: translateX(4px); }

.pledges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 32px; }
.pledges li { border-top: 1px solid var(--rule-strong); padding: 16px 0 22px; }
.pledges h3 { font: 500 1.55rem/1.1 var(--f-display); letter-spacing: -.02em; margin-bottom: 6px; }
.pledges p { color: var(--muted); }
.about { padding-bottom: var(--space-4); }
.about__facts .metatable { margin: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.faqpage { display: grid; gap: 2rem; padding-bottom: var(--space-4); }
.faqpage__toc ol { list-style: none; padding: 0; border-top: 1px solid var(--rule-strong); }
.faqpage__toc a { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); color: var(--muted); }
.faqpage__toc a:hover { color: var(--wren-deep); }
.qa-item { display: grid; grid-template-columns: 3rem 1fr; gap: 6px 12px; padding: 28px 0 32px; border-top: 1px solid var(--rule-strong); }
.qa-item__n { color: var(--muted); padding-top: .7em; }
.qa-item__q { font: 500 var(--t-xl)/1.1 var(--f-display); letter-spacing: -.02em; }
.qa-item__a { grid-column: 2; font-size: var(--t-lg); line-height: 1.55; color: #34383e; max-width: 62ch; }
@media (min-width: 64em) {
  .faqpage { grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 6vw, 96px); }
  .faqpage__toc { position: sticky; top: calc(var(--head) + 24px); align-self: start; }
}
.legal { padding-bottom: var(--space-5); }
.legal h2:first-child { margin-top: 0; }

/* 11. Software ("lab") ------------------------------------------------------ */
.lab, .theme-lab main, .case__video, .labcta {
  --grid-line: transparent;
  background-color: var(--ink);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
  color: var(--on-ink);
}
.lab { margin-top: var(--space-6); padding: var(--space-6) 0; }
.lab__tab { display: none !important; }
.lab__tab { position: absolute; left: var(--gutter); top: -34px; height: 34px; display: flex; align-items: center; padding: 0 18px; background: var(--ink); color: var(--signal); border-radius: var(--radius) var(--radius) 0 0; }
@media (min-width: 90em) { .lab__tab { left: calc((100vw - var(--max)) / 2 + var(--gutter)); } }
.lab__grid { display: grid; gap: 3rem; }
.lab__kicker { color: var(--signal); margin-bottom: 1.25rem; }
.lab__title { font-size: var(--t-3xl); max-width: 13ch; margin-bottom: 1.5rem; }
.lab__title em, .theme-lab .phead__title em, .case__video-title em, .labcta em, .labnotes__title em, .footer__statement em { color: var(--on-ink-muted); }
.lab__lede { color: var(--on-ink-muted); max-width: 46ch; margin-bottom: 2rem; font-size: var(--t-lg); line-height: 1.5; }
@media (min-width: 64em) { .lab__grid { grid-template-columns: 6fr 5fr; column-gap: clamp(32px, 6vw, 96px); align-items: center; } }

.lab__console, .console { border: 1px solid var(--rule-ink); border-radius: var(--radius); background: rgba(20, 23, 27, .72); }
.console__bar { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rule-ink); color: var(--on-ink-muted); text-transform: none; letter-spacing: .02em; }
.console__bar span:first-child::before { content: "● "; color: var(--signal); }
.console__list { list-style: none; margin: 0; padding: 0; }
.console__list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px; border-bottom: 1px solid var(--rule-ink); }
.console__list a:hover { background: rgba(241, 237, 228, .04); }
.console__name { font: 500 1.5rem/1.1 var(--f-display); letter-spacing: -.02em; }
.console__ind { color: var(--on-ink-muted); grid-column: 1; }
.console__list .status { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.console__empty { padding: clamp(24px, 4vw, 40px) 16px; display: grid; gap: 12px; }
.console__empty .mono { color: var(--signal); text-transform: none; letter-spacing: .01em; font-size: .8rem; }
.console__empty p:last-child { color: var(--on-ink-muted); max-width: 44ch; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-right: 10px; vertical-align: -.18em; background: var(--signal); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console__caps { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-top: 1px solid var(--rule-ink); list-style: none; margin: 0; }
.console__caps li { padding: 5px 9px; border: 1px solid var(--rule-ink); color: var(--on-ink-muted); font-size: .64rem; }

.theme-lab { background: var(--ink); }
.theme-lab .masthead { color: var(--on-ink); }
.theme-lab .masthead .wordmark { color: var(--on-ink); }
.theme-lab .masthead .wordmark__studio, .theme-lab .navlink__n { color: var(--on-ink-muted); border-color: var(--rule-ink); }
.theme-lab .masthead.is-scrolled { background: color-mix(in srgb, var(--ink) 86%, transparent); box-shadow: 0 1px 0 var(--rule-ink); }
.theme-lab .masthead__cta { --b-bg: var(--signal); --b-fg: var(--ink); --b-bd: var(--signal); --b-hover: var(--paper); }
.theme-lab .phead__kicker { color: var(--signal); }
.theme-lab .phead__lede, .theme-lab .prose--large, .theme-lab .crumbs { color: var(--on-ink-muted); }
.theme-lab .crumbs a:hover { color: var(--signal); }
.theme-lab .metatable div { border-color: var(--rule-ink); }
.theme-lab .metatable dt { color: var(--on-ink-muted); }
.theme-lab .checks li, .theme-lab .steps li { border-color: var(--rule-ink); }
.theme-lab .checks .icon { color: var(--signal); }
.theme-lab :focus-visible { outline-color: var(--signal); }
.theme-lab .cta { display: none; }

.products { padding-bottom: var(--space-5); }
.products__list { border-bottom: 1px solid var(--rule-ink); }
.product { border-top: 1px solid var(--rule-ink); }
.product__link { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px 20px; align-items: center; padding: 22px 0; }
.product__logo { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--rule-ink); border-radius: var(--radius); overflow: hidden; color: var(--signal); }
.product__logo--large { width: 96px; height: 96px; font-size: 1.2rem; }
.product__name { display: block; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 3rem); }
.product__tag { color: var(--on-ink-muted); }
.product__ind { grid-column: 2; color: var(--on-ink-muted); }
.product .status { grid-column: 2; justify-self: start; }
.product__go { grid-row: 1; grid-column: 3; transition: transform .3s var(--ease); }
.product__link:hover .product__name { color: var(--signal); }
.product__link:hover .product__go { transform: translateX(6px); }
@media (min-width: 64em) {
  .product__link { grid-template-columns: 56px minmax(0, 6fr) minmax(0, 2fr) auto 2rem; }
  .product__ind, .product .status { grid-column: auto; }
  .product__go { grid-column: 5; }
}
.products__empty { display: grid; gap: 2rem; }
.products__legend h3 { color: var(--signal); margin-bottom: 12px; }
.products__legend ul { list-style: none; padding: 0; border-top: 1px solid var(--rule-ink); }
.products__legend li { padding: 12px 0; border-bottom: 1px solid var(--rule-ink); color: var(--on-ink-muted); }
@media (min-width: 64em) { .products__empty { grid-template-columns: 7fr 5fr; column-gap: 64px; } }

.prhead { display: flex; gap: 24px; align-items: flex-start; }
.prhead .status { margin-bottom: 14px; }

.labnotes { padding: var(--space-5) 0; border-top: 1px solid var(--rule-ink); }
.labnotes__grid { display: grid; gap: 2rem; }
.labnotes__title { font-size: var(--t-2xl); max-width: 12ch; }
.labnotes__list li { display: grid; grid-template-columns: 3rem 1fr; gap: 4px 12px; padding: 20px 0; border-top: 1px solid var(--rule-ink); }
.labnotes__list .mono { color: var(--signal); grid-row: span 2; padding-top: .35em; }
.labnotes__list h3 { font: 500 1.6rem/1.1 var(--f-display); letter-spacing: -.02em; }
.labnotes__list p { color: var(--on-ink-muted); max-width: 52ch; }
@media (min-width: 64em) { .labnotes__grid { grid-template-columns: 5fr 7fr; column-gap: 64px; } }
.labcta { padding: var(--space-5) 0 var(--space-6); border-top: 1px solid var(--rule-ink); }
.labcta__grid { display: grid; gap: 1.5rem; }
.labcta h2 { font-size: var(--t-2xl); max-width: 16ch; }
.labcta p { color: var(--on-ink-muted); margin-bottom: 1.5rem; max-width: 44ch; }
@media (min-width: 64em) { .labcta__grid { grid-template-columns: 7fr 5fr; align-items: end; column-gap: 64px; } }

/* 12. Case study: see 16. Redesign */

/* 13. Forms ---------------------------------------------------------------- */
.contact { display: grid; gap: 3rem; padding-top: calc(var(--head) + clamp(2rem, 6vh, 4.5rem)); padding-bottom: var(--space-6); }
.contact .phead__title { font-size: var(--t-2xl); }
.contact__next { margin-top: 2.5rem; border-bottom: 1px solid var(--rule); }
.contact__next li { display: grid; grid-template-columns: 3rem 1fr; padding: 14px 0; border-top: 1px solid var(--rule); color: var(--muted); }
.contact__next strong { color: var(--ink); font-weight: 500; }
.contact__next .mono { color: var(--wren-deep); padding-top: .3em; }
.contact__alt { margin-top: 1.5rem; }
@media (min-width: 64em) {
  .contact { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .contact__intro { grid-column: 1 / span 5; position: sticky; top: calc(var(--head) + 24px); align-self: start; }
  .contact__form { grid-column: 7 / -1; padding-top: 2.5rem; }
}
.form { display: grid; gap: 2.5rem; }
.form__group { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 22px 20px; border: 0; padding: 0; margin: 0; min-width: 0; }
.form__group legend { grid-column: 1 / -1; width: 100%; padding: 0 0 12px; margin-bottom: 18px; border-bottom: 1px solid var(--rule-strong); color: var(--wren-deep); }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 500; font-size: .95rem; }
.req { color: var(--wren-deep); }
.opt { color: var(--muted); font-weight: 400; }
.field__hint { color: var(--muted); font-size: var(--t-sm); margin-top: -4px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 400 1rem/1.4 var(--f-sans); color: var(--ink);
  background: var(--paper-hi); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(184, 86, 43, .28); background: #fff; }
.field [aria-invalid="true"] { border-color: var(--danger); background: #fdf6f4; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(163, 38, 26, .2); }
.field__error { display: flex; align-items: flex-start; gap: 8px; color: var(--danger); font-size: var(--t-sm); font-weight: 500; }
.field__error[hidden] { display: none; }
.field__error .icon { margin-top: .12em; }
.field__count { color: var(--muted); justify-self: end; margin-top: -2px; text-transform: none; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper-hi); font-size: .95rem; transition: background .2s, color .2s, border-color .2s; }
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--wren); outline-offset: 2px; }
[role="radiogroup"][aria-invalid="true"] .choice span { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 8px; border-top: 1px solid var(--rule-strong); padding-top: 28px; }
.form__privacy { color: var(--muted); font-size: var(--t-sm); max-width: 36ch; }
.form__summary, .form__failure { border: 1px solid var(--danger); border-left-width: 3px; background: #fdf6f4; padding: 16px 18px; color: var(--danger); border-radius: var(--radius); }
.form__summary ul { margin: 8px 0 0; padding-left: 18px; }
.form__summary a { text-decoration: underline; }
.form__failure { color: #5b1a12; }
.form__success { padding: clamp(32px, 5vw, 56px); border: 1px solid var(--rule-strong); background: var(--paper-hi); border-radius: var(--radius); display: grid; gap: 16px; }
.form__success:focus { outline: none; }
.form__success-mark { width: 56px; height: 56px; color: var(--ink); }
.form__success h2 { font-size: var(--t-2xl); }
.form__success h2 em { color: var(--muted); }
.form__success p { color: var(--muted); max-width: 44ch; }
.is-sending [data-submit] .icon { animation: nudge .8s var(--ease-io) infinite alternate; }
@keyframes nudge { to { transform: translateX(6px); } }

/* 14. Footer --------------------------------------------------------------- */
.footer { background: var(--ink); color: var(--on-ink); padding: 0 0 28px; }
.theme-lab .footer { border-top: 1px solid var(--rule-ink); }
.footer__top { display: grid; gap: 2rem; align-items: end; padding-bottom: var(--space-5); border-bottom: 1px solid var(--rule-ink); }
.footer__statement { font-size: var(--t-2xl); line-height: 1; }

@media (min-width: 64em) { .footer__top { grid-template-columns: 1fr auto; } }
.footer__grid { display: grid; gap: 2.5rem 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); padding: var(--space-4) 0; }
.footer__entity { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; max-width: 46ch; color: var(--on-ink-muted); }
.footer__brand { justify-self: start; }
.footer__loc { text-transform: none; letter-spacing: .01em; font-size: .78rem; }
@media (min-width: 64em) { .footer__grid { grid-template-columns: 5fr 2fr 3fr 3fr; } .footer__entity { grid-column: auto; } }
.footer__col h2 { color: var(--signal); margin-bottom: 14px; font-weight: 500; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__col a { color: var(--on-ink-muted); transition: color .2s; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--on-ink); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid var(--rule-ink); color: var(--on-ink-muted); text-transform: none; letter-spacing: .02em; }
.footer__base a:hover { color: var(--on-ink); }
.footer :focus-visible { outline-color: var(--signal); }

/* 15. Motion --------------------------------------------------------------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .shead__rule { transform: scaleX(0); transition: transform 1.2s var(--ease-io) .1s; }
  .js .shead.is-in .shead__rule { transform: scaleX(1); }

}
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: scale(1); } }
@keyframes pop { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .caret { animation: none; }
  @view-transition { navigation: none; }
}

@media print {
  .masthead, .menu, .footer, .cta, .vmodal, .skip { display: none !important; }
  body { background: #fff; }
}

/* Logo dot on dark backgrounds */
.wordmark--light, .menu-open .masthead, .theme-lab .masthead, .footer { --wren: #7fa6cf; }

/* ==========================================================================
   16. Redesign (2026-11): portfolio-first studio
   Same palette and type. More showing, less telling: device frames, layered
   project stages, restrained motion. Reduced motion is respected throughout.
   ========================================================================== */
:root {
  --paper-panel: #efefec;
  --shadow-frame: 0 0 0 1px rgba(17, 18, 20, .07), 0 1px 2px rgba(17, 18, 20, .05), 0 18px 36px -18px rgba(17, 18, 20, .28), 0 50px 100px -40px rgba(17, 18, 20, .32);
  --shadow-phone: 0 0 0 1px rgba(17, 18, 20, .12), 0 30px 60px -24px rgba(17, 18, 20, .5);
  --r-frame: 10px;
  --t-mega: clamp(2.9rem, .9rem + 5.6vw, 6.6rem);
}

/* Shared type */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 1.25rem; font: 600 var(--t-xs)/1.4 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow__dot { display: none; }
.eyebrow--light { color: var(--on-ink-muted); }
.display em { font-style: normal; color: var(--muted); }
.arrowlink { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; padding: 6px 0; border-bottom: 1px solid var(--rule-strong); transition: border-color .3s, gap .35s var(--ease); }
.arrowlink:hover { border-color: currentColor; gap: 14px; }
.arrowlink--light { color: var(--on-ink); border-color: var(--rule-ink); }
.link--light { color: var(--on-ink-muted); text-decoration-color: var(--rule-ink); }
.link--light:hover { color: var(--on-ink); }
.btn--xl { min-height: 64px; padding: 0 30px 0 34px; font-size: 1.05rem; }
.btn__time { font-size: .68rem; letter-spacing: .06em; opacity: .6; }

/* Section header: eyebrow / big title / link on one baseline */
.sechead { display: grid; gap: 0 32px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.sechead .eyebrow { margin-bottom: .9rem; }
.sechead__title { font-size: var(--t-3xl); letter-spacing: -.035em; line-height: 1; max-width: 15ch; }
.sechead__link { justify-self: start; margin-top: 1.5rem; }
.sechead--tight { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
@media (min-width: 64em) {
  .sechead { grid-template-columns: 1fr auto; align-items: end; }
  .sechead .eyebrow { grid-column: 1 / -1; }
  .sechead__link { margin: 0 0 .6rem; }
}

/* ── Device frames ──────────────────────────────────────────────────────── */
.browser { position: relative; border-radius: var(--r-frame); background: #fff; box-shadow: var(--shadow-frame); overflow: hidden; isolation: isolate; }
.browser__bar { display: grid; grid-template-columns: 1fr minmax(0, 3fr) 1fr; align-items: center; gap: 10px; height: clamp(22px, 2.3vw, 32px); padding: 0 clamp(8px, 1vw, 14px); background: #f4f4f2; border-bottom: 1px solid var(--rule); }
.browser__dots { display: flex; gap: clamp(4px, .45vw, 6px); }
.browser__dots i { width: clamp(6px, .6vw, 9px); aspect-ratio: 1; border-radius: 50%; background: #d9d9d5; }
.browser__dots--ghost { visibility: hidden; }
.browser__url { justify-self: center; display: flex; align-items: center; justify-content: center; gap: 6px; width: min(100%, 320px); height: 64%; padding: 0 10px; border-radius: 5px; background: #fff; border: 1px solid var(--rule); color: var(--muted); font-size: clamp(.5rem, .55vw, .68rem); letter-spacing: .01em; white-space: nowrap; overflow: hidden; }
.browser__url svg { flex: none; opacity: .6; }
.browser__view { position: relative; aspect-ratio: var(--ratio, 16 / 10); overflow: hidden; background: var(--paper-2); }
.browser__view img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.browser--dark { background: #111317; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 36px -18px rgba(0, 0, 0, .5), 0 50px 100px -40px rgba(0, 0, 0, .55); }
.browser--dark .browser__bar { background: #1a1c21; border-color: rgba(255, 255, 255, .06); }
.browser--dark .browser__dots i { background: #3a3d44; }
.browser--dark .browser__url { background: #24272d; border-color: rgba(255, 255, 255, .06); color: #9da1a8; }
.browser--dark .browser__view { background: #0b1220; }

.phone { position: relative; padding: 4.2%; border-radius: 15% / 7%; background: #121316; box-shadow: var(--shadow-phone), inset 0 0 0 1.5px #2b2d32; }
.phone::after { content: ""; position: absolute; z-index: 2; left: 50%; top: 3.4%; width: 24%; height: 1.7%; border-radius: 99px; background: #121316; transform: translateX(-50%); }
.phone__screen { position: relative; display: flex; flex-direction: column; aspect-ratio: 390 / 844; padding-top: 9.5%; border-radius: 11% / 5.2%; overflow: hidden; background: #121316; }
.phone__screen img { flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* Screens that move: auto-scrolling, scroll-on-hover, scroll-linked */
@media (prefers-reduced-motion: no-preference) {
  .is-autoscroll img { animation: pan var(--pan, 26s) cubic-bezier(.45, 0, .55, 1) infinite alternate; animation-play-state: var(--play, running); }
  .is-hoverscroll img { transition: object-position 1.4s var(--ease); }
  a:hover .is-hoverscroll img, a:focus-visible .is-hoverscroll img { object-position: 50% 100%; transition: object-position var(--hover-pan, 9s) cubic-bezier(.35, 0, .3, 1); }
}
@keyframes pan { 0%, 10% { object-position: 50% 0; } 90%, 100% { object-position: 50% 100%; } }

/* Panel behind compositions, with hairline crop marks */
.pmedia { position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--paper-panel); }
.pmedia__marks, .pmedia__marks::before, .pmedia__marks::after { position: absolute; pointer-events: none; }
.pmedia__marks { inset: 14px; z-index: 0; background:
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 0 0 / 12px 1px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 0 0 / 1px 12px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 100% 0 / 12px 1px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 100% 0 / 1px 12px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 0 100% / 12px 1px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 0 100% / 1px 12px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 100% 100% / 12px 1px no-repeat,
  linear-gradient(var(--mk, rgba(17,18,20,.28)), var(--mk, rgba(17,18,20,.28))) 100% 100% / 1px 12px no-repeat; }
.pmedia--ink, .pmedia--tall { background: var(--ink); --mk: rgba(244, 244, 242, .3); }
.pmedia--tall { background: radial-gradient(120% 80% at 50% 0%, #1e2024 0%, var(--ink) 60%); }
.pmedia__browser, .pmedia__phone { position: relative; z-index: 1; transition: transform 1.2s var(--ease); }
.pmedia__cursor { position: absolute; z-index: 3; left: 0; top: 0; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 500 .85rem/1 var(--f-sans); pointer-events: none; opacity: 0; transform: translate(var(--cx, 50%), var(--cy, 50%)) translate(-50%, -50%) scale(.4); transition: opacity .3s, transform .45s var(--ease); }
.pmedia--tall .pmedia__cursor { background: var(--paper); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .feature__media:hover .pmedia__cursor { opacity: 1; transform: translate(var(--cx, 50%), var(--cy, 50%)) translate(-50%, -50%) scale(1); }
}

/* Lead: big browser + phone */
.pmedia--lead, .pmedia--flip { padding: clamp(28px, 6vw, 96px) clamp(20px, 7vw, 120px) 0; }
.pmedia--lead .pmedia__browser, .pmedia--flip .pmedia__browser { width: 88%; margin-bottom: -6%; }
.pmedia--lead .pmedia__phone, .pmedia--flip .pmedia__phone { position: absolute; right: clamp(16px, 5vw, 80px); bottom: clamp(16px, 4vw, 56px); width: clamp(84px, 17%, 230px); }
.pmedia--flip .pmedia__browser { margin-left: auto; }
.pmedia--flip .pmedia__phone { right: auto; left: clamp(16px, 5vw, 80px); }
.feature__media:hover .pmedia--lead .pmedia__phone, .feature__media:hover .pmedia--flip .pmedia__phone { transform: translateY(-10px); }
.pmedia--lead .browser, .pmedia--flip .browser { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Tall: one long page on dark */
.pmedia--tall { padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 72px) 0; }
.pmedia--tall .pmedia__browser { margin-bottom: -2%; }
.pmedia--tall .browser { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Phones: two overlapping phones */
.pmedia--phones { display: flex; justify-content: center; align-items: flex-start; gap: 0; padding: clamp(32px, 6vw, 80px) 0 0; aspect-ratio: 4 / 4.6; background: var(--surface, var(--paper-panel)); }
.pmedia--phones .pmedia__phone { width: 38%; }
.pmedia--phones .pmedia__phone--a { z-index: 2; margin-right: -6%; }
.pmedia--phones .pmedia__phone--b { margin-top: 16%; }
.feature__media:hover .pmedia--phones .pmedia__phone--a { transform: translateY(-8px) rotate(-1deg); }
.feature__media:hover .pmedia--phones .pmedia__phone--b { transform: translateY(8px) rotate(1deg); }
.feature__media:hover .pmedia--lead .pmedia__browser, .feature__media:hover .pmedia--tall .pmedia__browser { transform: translateY(-6px); }

/* ── Feature (project block) ────────────────────────────────────────────── */
.feature { display: grid; gap: 22px; }
.feature__media { display: block; }
.feature__meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; align-items: start; }
.feature__n { padding-top: .55em; color: var(--ink); }
.feature__n span { color: var(--muted); }
.feature__name { font: 500 clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem)/1.05 var(--f-display); letter-spacing: -.03em; }
.feature__name a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.feature__name a:hover { background-size: 100% 1px; }
.feature__ind { margin-top: 8px; color: var(--muted); }
.feature__desc { grid-column: 2; color: #3c4046; max-width: 46ch; }
.feature__actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.feature + .feature, .work__pair { margin-top: clamp(4rem, 9vw, 8rem); }
@media (min-width: 64em) {
  .feature--lead .feature__meta, .feature--flip .feature__meta { grid-template-columns: 5rem minmax(0, 4fr) minmax(0, 4fr) auto; column-gap: 32px; align-items: start; }
  .feature--lead .feature__desc, .feature--flip .feature__desc, .feature--lead .feature__actions, .feature--flip .feature__actions { grid-column: auto; margin-top: 0; }
  .feature--lead .feature__desc, .feature--flip .feature__desc { padding-top: .45em; }
  .feature--lead .feature__actions, .feature--flip .feature__actions { justify-content: flex-end; padding-top: .2em; }
  .work__pair { display: grid; grid-template-columns: 7fr 5fr; column-gap: clamp(32px, 4vw, 64px); align-items: start; }
  .work__pair .feature + .feature { margin-top: clamp(3rem, 7vw, 6.5rem); }
}

.work { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.work--index { padding-top: 0; }
.work__note { display: grid; gap: 6px; max-width: 60ch; margin-top: clamp(4rem, 8vw, 6rem); padding-left: 18px; border-left: 2px solid var(--wren); color: var(--muted); }
.work__note .mono { color: var(--wren-deep); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.xhero { padding-top: calc(var(--head) + clamp(1.5rem, 5vh, 3.5rem)); overflow: clip; }
.xhero__grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
.xhero__title { font-size: clamp(2.9rem, 1rem + 4.3vw, 5.4rem); line-height: .95; letter-spacing: -.05em; }
.xhero__title em { color: var(--muted); }
.line-mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line-mask > span { display: block; }
.xhero__lede { margin-top: clamp(1.25rem, 2.5vw, 2rem); font-size: var(--t-lg); line-height: 1.5; color: #3c4046; max-width: 34ch; }
.xhero__actions { margin-top: clamp(1.75rem, 3vw, 2.5rem); gap: 12px; }
.xhero__rail { position: relative; display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-top: 16px; padding-bottom: 16px; color: var(--muted); font-size: .66rem; }
.xhero__rail::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--rule-strong); }
.xhero__rail-mid { display: none; }
.xhero__scroll { display: inline-flex; align-items: center; gap: 10px; }
.xhero__scroll i { position: relative; width: 1px; height: 18px; background: var(--rule-strong); overflow: hidden; }
.xhero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(-100%); }
@media (prefers-reduced-motion: no-preference) { .xhero__scroll i::after { animation: drip 2.2s var(--ease-io) infinite; } }
@keyframes drip { 50% { transform: none; } 100% { transform: translateY(100%); } }
@media (min-width: 48em) { .xhero__rail-mid { display: block; } }
@media (min-width: 64em) {
  .xhero__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; min-height: min(calc(100svh - var(--head) - 140px), 820px); }
  .xhero__copy { grid-column: 1 / span 5; position: relative; z-index: 2; }
  .stage { grid-column: 6 / -1; }
}

/* Stage: layered browser, background browser and phone */
.stage { position: relative; display: grid; aspect-ratio: 1.12; --play: running; }
.stage__grid { position: absolute; inset: 6% 0 14% 8%; background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(70% 70% at 60% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 70% at 60% 45%, #000 20%, transparent 75%); }
.stage__back, .stage__main, .stage__phone { position: absolute; }
.stage__back { right: 0; top: 0; width: 58%; opacity: .55; filter: saturate(.6); }
.stage__main { left: 0; top: 13%; width: 84%; z-index: 1; }
.stage__phone { right: 3%; top: 32%; width: 22%; z-index: 2; }
.stage__slide { opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s, transform 1s var(--ease); transform: translateY(10px); }
.stage__slide:not(:first-child) { position: absolute; inset: 0 0 auto 0; }
.stage__slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .8s var(--ease), visibility 0s, transform 1s var(--ease); }
.stage__main .is-autoscroll img { --pan: 30s; }
.stage__phone .is-autoscroll img { --pan: 36s; }
.stage__tag { position: absolute; z-index: 3; display: none; align-items: center; gap: 10px; color: var(--muted); font-size: .62rem; white-space: nowrap; }
.stage__tag-line { width: 34px; height: 1px; background: var(--rule-strong); }
.stage__tag--a { left: 0; top: 6.5%; }
.stage__tag--a [data-stage-label] { color: var(--ink); }
.stage__tag--c { right: 0; top: -4%; }
.stage__tabs { align-self: end; position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.stage__tab { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 14px 0 0; text-align: left; background: none; border: 0; cursor: pointer; color: var(--muted); transition: color .3s; }
.stage__tab-n { grid-row: span 2; padding-top: .35em; font-size: .62rem; }
.stage__tab-name { font-weight: 500; font-size: .95rem; letter-spacing: -.01em; }
.stage__tab-ind { font-size: .58rem; letter-spacing: .1em; display: none; }
.stage__tab-bar { grid-column: 1 / -1; order: -1; height: 1px; margin-bottom: 12px; background: var(--rule-strong); overflow: hidden; }
.stage__tab-bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.stage__tab.is-active, .stage__tab:hover { color: var(--ink); }
.stage__tab.is-active .stage__tab-bar i { transform: scaleX(1); }
.stage.is-auto .stage__tab.is-active .stage__tab-bar i { animation: tabfill var(--dwell, 7s) linear both; animation-play-state: var(--play); }
@keyframes tabfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (min-width: 48em) { .stage__tag { display: inline-flex; } .stage__tab-ind { display: block; } .stage { aspect-ratio: 1.22; } }
@media (max-width: 47.99em) { .stage { aspect-ratio: .98; } .stage__main { width: 90%; top: 8%; } .stage__phone { width: 27%; top: 30%; right: 0; } .stage__back { width: 60%; top: 0; } }

/* ── Software band ──────────────────────────────────────────────────────── */
.soft { background: var(--ink); color: var(--on-ink); padding: clamp(5rem, 11vw, 10rem) 0; overflow: clip; }
.soft__grid { display: grid; gap: clamp(3rem, 7vw, 5rem); align-items: center; }
.soft__title { font-size: clamp(2.3rem, 1.2rem + 3.2vw, 4.4rem); line-height: 1; letter-spacing: -.035em; max-width: 13ch; }
.soft__title em { color: var(--on-ink-muted); }
.soft__lede { margin: 1.5rem 0 2rem; color: var(--on-ink-muted); font-size: var(--t-lg); line-height: 1.5; max-width: 36ch; }
.soft__caps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 2.5rem; padding-top: 18px; border-top: 1px solid var(--rule-ink); list-style: none; color: var(--on-ink-muted); font-size: .64rem; }
.soft__caps li::before { content: "+"; margin-right: 8px; color: var(--signal); }
.soft__visual { position: relative; aspect-ratio: 1.18; }
.soft__win { position: absolute; }
.soft__win--main { left: 0; top: 0; width: 88%; }
.soft__win--side { right: 0; bottom: 4%; width: 50%; z-index: 1; }
.soft__cap { position: absolute; left: 0; bottom: 0; color: var(--on-ink-muted); font-size: .6rem; text-transform: none; letter-spacing: .04em; max-width: 44%; }
.term { position: absolute; left: -2%; bottom: 10%; z-index: 2; width: min(62%, 380px); border-radius: 8px; background: rgba(12, 13, 15, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 30px 60px -20px rgba(0, 0, 0, .7); overflow: hidden; }
.term__bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #7d8189; font-size: .56rem; text-transform: none; letter-spacing: .02em; }
.term__bar .browser__dots i { background: #3a3d44; width: 7px; }
.term__body { margin: 0; padding: 12px 14px 14px; font: 400 clamp(.58rem, .5rem + .25vw, .74rem)/1.75 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #d6d8dc; white-space: pre-wrap; }
.term__p { color: var(--signal); }
.term__o { color: #8b9098; }
.term__ok { color: #b7e08a; }
@media (min-width: 64em) { .soft__grid { grid-template-columns: 5fr 7fr; column-gap: clamp(40px, 6vw, 96px); } }

/* ── Capabilities ───────────────────────────────────────────────────────── */
.caps { padding: clamp(5rem, 11vw, 10rem) 0 clamp(4rem, 8vw, 7rem); }
.caps__list { display: grid; border-top: 1px solid var(--rule-strong); }
.cap { border-bottom: 1px solid var(--rule-strong); }
.cap__link { position: relative; display: grid; grid-template-columns: 1fr; gap: 6px; height: 100%; padding: 22px 0 28px; }
.cap__visual { display: block; height: clamp(150px, 13vw, 190px); margin-bottom: 18px; border-radius: 4px; background: var(--paper-2); overflow: hidden; transition: background .5s; }
.cap__n { color: var(--muted); }
.cap__name { font: 500 clamp(1.3rem, 1.1rem + .6vw, 1.6rem)/1.1 var(--f-display); letter-spacing: -.025em; max-width: 16ch; }
@media (min-width: 64em) { .cap__name { min-height: 2.2em; } }
.cap__text { color: var(--muted); font-size: var(--t-sm); max-width: 34ch; }
.cap__go { position: absolute; right: 0; top: 22px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--ink); opacity: 0; transform: translate(-8px, 8px) rotate(-45deg); transition: opacity .3s, transform .45s var(--ease); }
.cap__link:hover .cap__go, .cap__link:focus-visible .cap__go { opacity: 1; transform: translate(-12px, 12px) rotate(-45deg); }
.cap__link:hover .cap__visual { background: #e9e9e5; }
@media (min-width: 40em) { .caps__list { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 64em) {
  .caps__list { grid-template-columns: repeat(4, 1fr); column-gap: 0; border-bottom: 1px solid var(--rule-strong); }
  .cap { border-bottom: 0; }
  .cap + .cap { border-left: 1px solid var(--rule-strong); }
  .cap__link { padding: 24px 24px 36px; }
  .cap:first-child .cap__link { padding-left: 0; }
  .cap:last-child .cap__link { padding-right: 0; }
}
/* line drawings */
.cv { width: 100%; height: 100%; }
.cv__frame, .cv__line, .cv__rule, .cv__lead { stroke: rgba(17, 18, 20, .38); stroke-width: 1; }
.cv__frame { fill: #fff; }
.cv__dot { fill: rgba(17, 18, 20, .18); }
.cv__ink { fill: var(--ink); }
.cv__soft { fill: rgba(17, 18, 20, .16); }
.cv__fill { fill: rgba(17, 18, 20, .1); }
.cv__card { fill: #fff; stroke: rgba(17, 18, 20, .2); }
.cv__accent { fill: var(--wren); }
.cv__accent-t { fill: var(--wren); }
.cv__mark { stroke: var(--wren); stroke-width: 1.5; }
.cv__badge { fill: var(--ink); }
.cv text { fill: #fff; font: 600 9px/1 var(--f-sans); }
.cv g, .cv rect { transition: transform .8s var(--ease), opacity .5s; transform-box: fill-box; }
.cap__link:hover .cv--web .cv__a { transform: translateX(6px); }
.cap__link:hover .cv--web .cv__b { transform: translateY(-6px); }
.cap__link:hover .cv--web .cv__c { transform: translateY(4px); }
.cv--seo .cv__type { transform-origin: left; }
.cap__link:hover .cv--seo .cv__type { transform: scaleX(.55); }
.cap__link:hover .cv--seo .cv__r2, .cap__link:hover .cv--seo .cv__r3 { opacity: .45; }
.cap__link:hover .cv--seo .cv__r1 { transform: translateX(4px); }
.cv__bar { transform-origin: bottom; }
.cap__link:hover .cv__bar { transform: scaleY(1.18); }
.cap__link:hover .cv__bar:nth-child(2) { transform: scaleY(1.4); }
.cap__link:hover .cv__bar:nth-child(4) { transform: scaleY(.8); }
.cv__pin { opacity: .25; }
.cap__link:hover .cv__pin { opacity: 1; }
.cap__link:hover .cv__pin--2 { transition-delay: .12s; }
.cap__link:hover .cv__pin--3 { transition-delay: .24s; }

/* ── Method ─────────────────────────────────────────────────────────────── */
.method { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--paper-2); border-top: 1px solid var(--rule); }
.method__head { margin-bottom: clamp(1rem, 3vw, 2.5rem); }
.method__list { position: relative; display: grid; gap: 0; list-style: none; padding: 0; margin: 0; }
.method__step { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 6px 12px; padding: 22px 0 26px; border-top: 1px solid var(--rule-strong); }
.method__node { display: none; }
.method__n { grid-row: span 2; padding-top: .9em; color: var(--muted); }
.method__word { font-size: clamp(2.1rem, 1.3rem + 3vw, 4.4rem); line-height: 1; letter-spacing: -.045em; }
.method__text { color: var(--muted); max-width: 32ch; }
@media (min-width: 64em) {
  .method__list { grid-template-columns: repeat(3, 1fr); column-gap: 32px; padding-top: 34px; }
  .method__list::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform-origin: left; }
  .method__step { grid-template-columns: 1fr; border-top: 0; padding: 0; }
  .method__n { grid-row: auto; padding: 0 0 18px; }
  .method__node { display: block; position: absolute; left: 0; top: -39px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--ink); }
  .method__node--end { background: var(--wren); border-color: var(--wren); }
  .method__text { margin-top: 18px; }
}

/* ── Closing CTA (all pages) ────────────────────────────────────────────── */
.cta { margin-top: 0; padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 6rem); background: var(--ink); color: var(--on-ink); border-top: 0; }
.cta__grid { display: grid; gap: 1.5rem; }
.cta__kicker { color: var(--signal); }
.cta__title { font-size: var(--t-mega); line-height: .95; letter-spacing: -.05em; max-width: 12ch; }
.cta__body p { color: var(--on-ink-muted); font-size: var(--t-lg); line-height: 1.5; max-width: 38ch; margin-bottom: 2rem; }
@media (min-width: 64em) {
  .cta__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .cta__kicker { grid-column: 1 / -1; }
  .cta__title { grid-column: 1 / span 8; }
  .cta__body { grid-column: 9 / span 4; padding-bottom: .6rem; }
}
.cta + .footer .footer__grid { border-top: 1px solid var(--rule-ink); }
.footer__grid { padding-top: clamp(3rem, 6vw, 4.5rem); }
.theme-lab .cta { display: none; }

/* ── Page header (index pages) ──────────────────────────────────────────── */
.phead--work { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.phead__split { display: grid; gap: 1.5rem; align-items: end; }
.phead--work .phead__title { font-size: clamp(4rem, 1rem + 12vw, 12rem); line-height: .85; letter-spacing: -.06em; }
.phead__count { font-size: .9rem; vertical-align: top; margin-left: .4em; letter-spacing: .08em; color: var(--muted); position: relative; top: .6em; }
.phead--work .phead__lede { margin-top: 0; max-width: 40ch; }
@media (min-width: 64em) { .phead__split { grid-template-columns: 7fr 5fr; column-gap: 32px; } .phead--work .phead__lede { padding-bottom: 1.2rem; } }

/* ── Case study ─────────────────────────────────────────────────────────── */
.cs-cover { padding-top: calc(var(--head) + clamp(1.5rem, 5vh, 3.5rem)); }
.cs-cover .crumbs { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.cs-cover__grid { display: grid; gap: 1.25rem 32px; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.cs-cover__n { color: var(--ink); }
.cs-cover__n span { color: var(--muted); }
.cs-cover__title { font-size: var(--t-mega); line-height: .95; letter-spacing: -.05em; }
.cs-cover__lede { font-size: var(--t-lg); line-height: 1.5; color: #3c4046; max-width: 44ch; }
.cs-cover__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.cs-cover__facts div { padding: 12px 0; border-top: 1px solid var(--rule-strong); }
.cs-cover__facts dt { color: var(--muted); margin-bottom: 4px; }
.cs-cover__facts dd { margin: 0; font-weight: 500; }
@media (min-width: 64em) {
  .cs-cover__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .cs-cover__n { grid-column: 1 / -1; }
  .cs-cover__title { grid-column: 1 / span 8; }
  .cs-cover__lede { grid-column: 9 / -1; padding-bottom: .6rem; }
  .cs-cover__facts { grid-column: 1 / span 8; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.5rem; }
  .cs-cover__actions { grid-column: 9 / -1; justify-content: flex-start; margin-top: 1.5rem; }
}

.cs-stage__inner { position: relative; overflow: hidden; border-radius: 6px; background: var(--surface); padding: clamp(28px, 7vw, 110px) clamp(16px, 8vw, 140px) 0; }
.cs-stage--dark .cs-stage__inner { --mk: rgba(244, 244, 242, .3); }
.cs-stage__browser .browser { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cs-stage__phone { position: absolute; right: clamp(12px, 5vw, 80px); bottom: clamp(12px, 5vw, 72px); width: clamp(80px, 17%, 250px); z-index: 2; }

.cs-over { display: grid; gap: 1.5rem 32px; padding-top: clamp(4rem, 9vw, 8rem); padding-bottom: clamp(4rem, 9vw, 8rem); }
.cs-over__lead { font: 400 clamp(1.35rem, 1rem + 1.4vw, 2.2rem)/1.3 var(--f-display); letter-spacing: -.02em; max-width: 30ch; }
.cs-over__brief { display: grid; gap: 8px; margin-top: 2rem; color: #3c4046; max-width: 52ch; }
.cs-over__brief .mono { color: var(--muted); }
.cs-spec { display: grid; gap: 0; margin: 0; align-self: start; }
.cs-spec div { padding: 14px 0; border-top: 1px solid var(--rule-strong); }
.cs-spec dt { color: var(--muted); margin-bottom: 4px; }
.cs-spec dd { margin: 0; }
@media (min-width: 64em) {
  .cs-over { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-over > .eyebrow { grid-column: 1 / span 3; align-self: start; margin-top: .9rem; }
  .cs-over__body { grid-column: 4 / span 6; }
  .cs-spec { grid-column: 10 / -1; }
}

.cs-h { font-size: var(--t-2xl); line-height: 1; letter-spacing: -.035em; max-width: 14ch; }

.cs-full { position: relative; }
.cs-full__grid { display: grid; gap: 1.5rem 32px; align-items: center; }
.cs-full__hint { display: none; align-items: center; gap: 12px; margin-top: 2rem; color: var(--muted); }
.cs-full__meter { position: relative; width: 120px; height: 1px; background: var(--rule-strong); }
.cs-full__meter i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(var(--p, 0)); transform-origin: left; }
.cs-full__frame .browser__view { aspect-ratio: auto; height: min(72vh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.cs-full__frame .browser__view img { height: auto; object-fit: initial; }
@media (min-width: 64em) {
  .cs-full__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-full__label { grid-column: 1 / span 4; }
  .cs-full__frame { grid-column: 5 / -1; }
}
/* Scroll-linked mode (JS + motion allowed): the page inside scrolls with the page */
@media (min-width: 64em) and (prefers-reduced-motion: no-preference) {
  .js .cs-full { height: 280vh; }
  .js .cs-full__sticky { position: sticky; top: 0; height: 100vh; display: grid; align-items: center; padding-top: var(--head); }
  .js .cs-full__hint { display: inline-flex; }
  .js .cs-full__frame .browser__view { overflow: hidden; height: min(74vh, 780px); }
  .js .cs-full__frame .browser__view img { transform: translate3d(0, calc(var(--shift, 0px) * -1), 0); will-change: transform; }
}

.cs-pages { padding-top: clamp(4rem, 9vw, 8rem); padding-bottom: clamp(4rem, 9vw, 8rem); }
.cs-pages__grid { display: grid; gap: clamp(2rem, 4vw, 3rem) 32px; }
.cs-pages figcaption, .cs-admin figcaption { display: flex; gap: 12px; margin-top: 14px; color: var(--muted); font-size: var(--t-sm); }
.cs-pages figcaption .mono, .cs-admin figcaption .mono { color: var(--ink); padding-top: .2em; }
@media (min-width: 64em) {
  .cs-pages__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-pages__item--1 { grid-column: 1 / span 12; }
  .cs-pages__item--2 { grid-column: 1 / span 6; }
  .cs-pages__item--3 { grid-column: 7 / span 6; margin-top: clamp(3rem, 8vw, 7rem); }
  .cs-pages__item--1 .browser { width: 100%; }
}

.cs-mobile { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--surface); }
.cs-mobile--dark { color: var(--on-ink); }
.cs-mobile--dark .eyebrow, .cs-mobile--dark .cs-h em, .cs-mobile--dark .cs-mobile__item p { color: rgba(244, 244, 242, .62); }
.cs-mobile__head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.cs-mobile__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 62%); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 24px; margin: 0 -4px; list-style: none; scrollbar-width: none; }
.cs-mobile__row::-webkit-scrollbar { display: none; }
.cs-mobile__item { scroll-snap-align: center; }
.cs-mobile__item p { margin-top: 16px; color: var(--muted); text-align: center; }
@media (min-width: 48em) {
  .cs-mobile__row { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 5vw, 80px); overflow: visible; padding: 0 clamp(0px, 6vw, 96px); }
  .cs-mobile__item:nth-child(2) { margin-top: -3rem; }
  .cs-mobile__item:nth-child(1), .cs-mobile__item:nth-child(3) { margin-top: 3rem; }
}

.cs-admin { padding-top: clamp(4rem, 9vw, 8rem); }
.cs-admin__grid { display: grid; gap: 2rem 32px; }
@media (min-width: 64em) {
  .cs-admin__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-admin__item--1 { grid-column: 1 / span 7; grid-row: span 2; }
  .cs-admin__item--2 { grid-column: 8 / span 5; }
  .cs-admin__item--3 { grid-column: 8 / span 5; }
}

.cs-feat { display: grid; gap: 2rem 32px; padding-top: clamp(4rem, 9vw, 8rem); padding-bottom: clamp(4rem, 9vw, 8rem); }
.cs-feat__list { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--rule-strong); }
.cs-feat__list li { display: grid; grid-template-columns: 3rem 1fr; gap: 12px; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.cs-feat__list .mono { color: var(--muted); padding-top: .3em; }
.cs-measure { margin-top: 2.5rem; padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.cs-measure__label { color: var(--muted); margin-bottom: 14px; text-transform: none; letter-spacing: .02em; }
.cs-measure dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; margin: 0; }
.cs-measure dt { color: var(--muted); font-size: var(--t-sm); }
.cs-measure dd { margin: 4px 0 0; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1; letter-spacing: -.04em; }
@media (min-width: 64em) {
  .cs-feat { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-feat__head { grid-column: 1 / span 4; }
  .cs-feat__list { grid-column: 6 / -1; grid-template-columns: 1fr 1fr; column-gap: 32px; }
}

.cs-video { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--ink); color: var(--on-ink); }
.cs-video .cs-h em { color: var(--on-ink-muted); }
.cs-video__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.cs-video__trigger { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: var(--r-frame); overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.cs-video__trigger img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), filter .6s; }
.cs-video__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 13, 15, .1), rgba(12, 13, 15, .55)); transition: background .5s; }
.cs-video__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: clamp(72px, 10vw, 120px); aspect-ratio: 1; border-radius: 50%; background: var(--paper); color: var(--ink); transform: translate(-50%, -50%); transition: transform .5s var(--ease), box-shadow .5s; }
.cs-video__play .icon { width: 30%; height: 30%; margin-left: 6%; }
.cs-video__meta { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; justify-content: space-between; gap: 16px; color: var(--on-ink); font-size: .66rem; }
.cs-video__trigger.is-in:hover img, .cs-video__trigger:hover img { transform: scale(1.03); }
.cs-video__trigger:hover .cs-video__play, .cs-video__trigger:focus-visible .cs-video__play { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 16px rgba(244, 244, 242, .12); }

.cs-live { padding-top: clamp(4rem, 8vw, 7rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.cs-live__link { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: center; padding: clamp(1.5rem, 3vw, 2.5rem) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule-strong); }
.cs-live__link .eyebrow { margin: 0; }
.cs-live__url { grid-column: 1; font-size: clamp(1.4rem, .8rem + 3vw, 3.6rem); letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; transition: color .3s; }
.cs-live__go { grid-row: 1 / span 2; grid-column: 2; display: grid; place-items: center; width: clamp(52px, 7vw, 84px); aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; transition: background .3s, color .3s, transform .5s var(--ease); }
.cs-live__link:hover .cs-live__go { background: var(--ink); color: var(--paper); transform: rotate(45deg); }
.cs-live__link:hover .cs-live__url { color: var(--wren-deep); }
.cs-live__note { display: grid; gap: 6px; margin-top: 2rem; max-width: 62ch; color: var(--muted); font-size: var(--t-sm); }
.cs-live__note .mono { color: var(--ink); }

.cs-next { border-top: 1px solid var(--rule-strong); overflow: hidden; }
.cs-next__link { display: block; padding: clamp(3rem, 8vw, 6rem) 0; transition: background .5s; }
.cs-next__grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; }
.cs-next__label { color: var(--muted); }
.cs-next__name { grid-column: 1; font-size: var(--t-3xl); line-height: 1; letter-spacing: -.045em; transition: transform .6s var(--ease); }
.cs-next__ind { grid-column: 1; color: var(--muted); }
.cs-next__thumb { display: none; }
.cs-next__go { grid-row: 1 / span 3; grid-column: 2; display: grid; place-items: center; width: clamp(56px, 8vw, 96px); aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; transition: background .3s, color .3s; }
.cs-next__link:hover { background: var(--paper-2); }
.cs-next__link:hover .cs-next__name { transform: translateX(12px); }
.cs-next__link:hover .cs-next__go { background: var(--ink); color: var(--paper); }
@media (min-width: 64em) {
  .cs-next__grid { grid-template-columns: 1fr 26vw auto; }
  .cs-next__thumb { display: block; grid-row: 1 / span 3; grid-column: 2; width: 100%; opacity: 0; transform: translateY(24px) rotate(-2deg); transition: opacity .5s, transform .8s var(--ease); }
  .cs-next__go { grid-column: 3; }
  .cs-next__link:hover .cs-next__thumb { opacity: 1; transform: none; }
}

/* ── Software page showcase ─────────────────────────────────────────────── */
.swshow { display: grid; gap: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.swshow__title { font-size: var(--t-2xl); line-height: 1; letter-spacing: -.035em; max-width: 13ch; margin-bottom: 1.25rem; }
.swshow__title em { color: var(--on-ink-muted); }
.swshow__copy > p { color: var(--on-ink-muted); max-width: 40ch; margin-bottom: 1.5rem; }
.swshow__note { margin-top: 2.5rem; padding-top: 14px; border-top: 1px solid var(--rule-ink); color: var(--on-ink-muted); text-transform: none; letter-spacing: .02em; font-size: .72rem; max-width: 40ch; }
.swshow__media { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.swshow__fig--1 { grid-column: 1 / -1; }
.swshow__fig figcaption { margin-top: 10px; color: var(--on-ink-muted); text-transform: none; letter-spacing: .02em; }
@media (min-width: 64em) { .swshow { grid-template-columns: 4fr 8fr; column-gap: clamp(40px, 6vw, 96px); align-items: start; } .swshow__copy { position: sticky; top: calc(var(--head) + 32px); } }

/* ── Masthead refinements ───────────────────────────────────────────────── */
.masthead.is-scrolled { background: color-mix(in srgb, var(--paper) 86%, transparent); }
.navlink { color: #3c4046; transition: color .25s; }
.navlink:hover, .navlink.is-current { color: var(--ink); }
.masthead__nav ul { padding: 6px 22px; border-radius: 99px; border: 1px solid transparent; transition: border-color .4s, background .4s; }
@media (min-width: 64em) { .masthead:not(.is-scrolled) .masthead__nav ul { border-color: var(--rule); background: rgba(255, 255, 255, .6); } }
.theme-lab .navlink { color: var(--on-ink-muted); }
.theme-lab .navlink:hover, .theme-lab .navlink.is-current { color: var(--on-ink); }
.theme-lab .masthead:not(.is-scrolled) .masthead__nav ul { border-color: var(--rule-ink); background: rgba(255, 255, 255, .03); }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js .xhero__title .line-mask > span, .js .cs-cover__title .line-mask > span { transform: translateY(108%); animation: rise 1.1s var(--ease) .05s forwards; }
  .js .xhero__title .line-mask:nth-child(2) > span { animation-delay: .14s; }
  .js .xhero__kicker, .js .xhero__lede, .js .xhero__actions, .js .xhero__rail, .js .cs-cover__lede, .js .cs-cover__facts, .js .cs-cover__actions, .js .cs-cover__n { opacity: 0; animation: fade-up .9s var(--ease) forwards; }
  .js .xhero__lede, .js .cs-cover__lede { animation-delay: .3s; }
  .js .xhero__actions, .js .cs-cover__facts { animation-delay: .42s; }
  .js .xhero__rail, .js .cs-cover__actions { animation-delay: .6s; }
  .js .stage__main { opacity: 0; animation: stage-in 1.3s var(--ease) .2s forwards; }
  .js .stage__back { animation: fade-in-55 1.4s var(--ease) .5s both; }
  .js .stage__phone { opacity: 0; animation: stage-in 1.3s var(--ease) .55s forwards; }
  .js .stage__tag, .js .stage__tabs { opacity: 0; animation: fade-up .8s var(--ease) 1s forwards; }
  .js .cs-stage__inner { clip-path: inset(6% 4% 0 4% round 6px); animation: unclip 1.4s var(--ease-io) .25s forwards; }
  .js .reveal-img { opacity: 0; transform: translateY(56px); transition: opacity 1s var(--ease), transform 1.4s var(--ease); }
  .js .reveal-img.is-in { opacity: 1; transform: none; }
  .js .reveal-img img { transform: scale(1.06); transition: transform 1.8s var(--ease); }
  .js .reveal-img.is-in img { transform: none; }
  .js .cs-pages__item--3.reveal-img.is-in, .js .cs-admin__item--3.reveal-img.is-in { transition-delay: .12s; }
  .js .method__list::before { transform: scaleX(0); transition: transform 1.6s var(--ease-io); }
  .js .method__list.is-in::before { transform: scaleX(1); }
  .js .method__node { transform: scale(0); transition: transform .5s var(--ease); }
  .js .method__list.is-in .method__node { transform: scale(1); }
  .js .method__list.is-in .method__step:nth-child(2) .method__node { transition-delay: .6s; }
  .js .method__list.is-in .method__step:nth-child(3) .method__node { transition-delay: 1.2s; }
  .js .method__step { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform 1s var(--ease); }
  .js .method__list.is-in .method__step { opacity: 1; transform: none; }
  .js .method__list.is-in .method__step:nth-child(2) { transition-delay: .2s; }
  .js .method__list.is-in .method__step:nth-child(3) { transition-delay: .4s; }
  .js [data-depth], .js [data-parallax] { will-change: transform; }
  main { animation: page-in .6s var(--ease) both; }
}
@keyframes stage-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes fade-in-55 { from { opacity: 0; } to { opacity: .55; } }
@keyframes unclip { to { clip-path: inset(0 0 0 0 round 6px); } }
@keyframes page-in { from { opacity: 0; } }
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Video modal: softer entrance */
.vmodal[open] { animation: vm-in .5s var(--ease); }
.vmodal[open] .vmodal__frame { animation: vm-frame .7s var(--ease) both; }
@keyframes vm-frame { from { opacity: 0; transform: translateY(24px) scale(.97); } }

@media (max-width: 63.99em) {
  .soft__visual { aspect-ratio: .92; }
  .soft__win--side { display: none; }
  .term { left: 0; bottom: 12%; width: 86%; }
  .soft__cap { max-width: 100%; }
}
@media (max-width: 47.99em) { .cs-video__meta span:first-child { display: none; } .cs-video__meta { justify-content: flex-end; } }
.form[hidden], .form__success[hidden], .form__failure[hidden], .form__summary[hidden] { display: none; }

/* ── Chat assistant (static/js/assistant.js) ─────────────────────────────── */
.ast { position: fixed; right: clamp(16px, 2.4vw, 28px); bottom: clamp(16px, 2.4vw, 28px); z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--f-sans); }
.menu-open .ast { display: none; }
.ast__icon { width: 20px; height: 20px; flex: none; }
.ast__launch { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: 500 .95rem/1 var(--f-sans); cursor: pointer; box-shadow: 0 10px 30px -12px rgba(17, 18, 20, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.ast__launch:hover { background: var(--ink-3); }
.ast__launch:focus-visible, .ast__close:focus-visible, .ast__send:focus-visible, .ast__chip:focus-visible, .ast__link:focus-visible, .ast__log:focus-visible { outline: 2px solid var(--wren); outline-offset: 2px; }
.ast.is-open .ast__launch-label { display: none; }
.ast.is-open .ast__launch { padding: 0 14px; }
.ast__panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: var(--paper); color: var(--text); border-radius: 14px; box-shadow: var(--shadow-frame); overflow: hidden; }
.ast__panel[hidden] { display: none; }
.ast__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--rule); }
.ast__name { margin: 0; font-weight: 600; font-size: 1rem; }
.ast__tag { margin: 2px 0 0; font-size: var(--t-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ast__close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.ast__close:hover { background: var(--paper-2); }
.ast__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ast__msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; font-size: .94rem; line-height: 1.5; }
.ast__msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.ast__msg--bot { align-self: flex-start; background: var(--paper-2); border-top-left-radius: 4px; }
.ast__msg--user { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-top-right-radius: 4px; }
.ast__msg--note { align-self: stretch; max-width: none; padding: 8px 12px; background: transparent; border: 1px dashed var(--rule-strong); color: var(--muted); font-size: .82rem; }
.ast__links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ast__link { color: var(--wren-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.ast__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ast__chip { min-height: 36px; padding: 6px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper); color: var(--text); font: 500 .85rem/1.3 var(--f-sans); text-align: left; cursor: pointer; }
.ast__chip:hover { border-color: var(--ink); background: var(--paper-2); }
.ast__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); }
.ast__input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper); color: var(--text); font: 400 1rem/1 var(--f-sans); }
.ast__input:focus { outline: none; border-color: var(--wren); box-shadow: 0 0 0 3px rgba(47, 93, 138, .18); }
.ast__send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: var(--on-ink); cursor: pointer; }
.ast__send:hover { background: var(--ink-3); }
.ast__foot { margin: 0; padding: 0 16px 12px; font-size: .74rem; line-height: 1.4; color: var(--muted); }
@media (max-width: 40em) {
  .ast__launch-label { display: none; }
  .ast__launch { padding: 0 14px; width: 52px; height: 52px; justify-content: center; }
  .ast.is-open { left: 0; right: 0; bottom: 0; gap: 0; }
  .ast.is-open .ast__launch { display: none; }
  .ast__panel { width: 100vw; height: min(85dvh, 640px); border-radius: 16px 16px 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .ast__launch { transition: background .25s var(--ease), transform .35s var(--ease); }
  .ast__launch:hover { transform: translateY(-2px); }
  .ast.is-open .ast__panel { animation: ast-in .32s var(--ease) both; }
  @keyframes ast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ── Blog ─────────────────────────────────────────────────────────────────── */
.blog { padding-bottom: clamp(3rem, 7vw, 6rem); }
.bcats { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.bcats ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.bcats a { display: inline-block; padding: 8px 14px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: var(--t-sm); color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.bcats a:hover { color: var(--ink); border-color: var(--ink); }
.bcats a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px); list-style: none; padding: 0; }
.bcard article { position: relative; display: grid; align-content: start; gap: 10px; height: 100%; padding-top: 18px; border-top: 1px solid var(--rule-strong); transition: border-color .3s; }
.bcard:hover article { border-top-color: var(--ink); }
.bcard__img { width: 100%; height: auto; aspect-ratio: 1.9; object-fit: cover; border-radius: var(--radius); background: var(--paper-panel); margin-bottom: 6px; order: -1; }
.bcard__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.bcard__meta span:first-child { color: var(--wren-deep); }
.bcard__flag { color: var(--danger) !important; }
.bcard__title { font: 500 clamp(1.3rem, 1.1rem + .6vw, 1.6rem)/1.15 var(--f-display); letter-spacing: -.02em; }
.bcard__title a::after { content: ""; position: absolute; inset: 0; }
.bcard__title a:focus-visible { outline: none; }
.bcard article:has(a:focus-visible) { outline: 2px solid var(--wren); outline-offset: 6px; }
.bcard:hover .bcard__title { color: var(--wren-deep); }
.bcard__excerpt { color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__more { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); margin-top: 4px; }
.bcard__more .icon { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.bcard:hover .bcard__more .icon { transform: translateX(4px); }
@media (min-width: 64em) {
  .bcards--lead > li:first-child { grid-column: 1 / -1; }
  .bcards--lead > li:first-child article { max-width: 46rem; }
  .bcards--lead > li:first-child article:has(.bcard__img) { max-width: none; grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .bcards--lead > li:first-child .bcard__img { grid-row: 1 / span 5; grid-column: 2; order: 0; margin: 0; }
  .bcards--lead > li:first-child .bcard__title { font-size: var(--t-2xl); }
  .bcards--lead > li:first-child .bcard__excerpt { font-size: var(--t-lg); -webkit-line-clamp: 3; }
}
.bcards--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); grid-column: 1 / -1; }

.bempty { display: grid; gap: 1rem; max-width: 62ch; }
.bempty__links { display: grid; gap: 10px; list-style: none; padding: 0; margin-top: 1rem; }
.bempty__links .icon { width: 16px; height: 16px; }

.draftbar { position: sticky; top: var(--head); z-index: 5; margin: 0; padding: 10px var(--gutter); background: #fff4d6; color: #5c4400; text-align: center; }
.post__title { max-width: 22ch; font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.6rem); }
.post__head .phead__kicker a:hover { text-decoration: underline; }
.post__byline { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 2rem; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); }
.post__byline div { display: grid; gap: 2px; }
.post__byline dd { margin: 0; color: var(--ink); }
.post__byline a { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--rule-strong); }
.post__hero { margin-bottom: clamp(2rem, 5vw, 4rem); }
.post__hero img { width: 100%; height: auto; border-radius: var(--r-frame, 10px); }
.post__hero figcaption { margin-top: 10px; color: var(--muted); font-size: var(--t-sm); }
.post__layout { display: grid; gap: 2rem; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 64em) {
  .post__layout { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); column-gap: clamp(40px, 6vw, 96px); }
  .post__layout > .post__body:only-child { grid-column: 1 / -1; margin-inline: auto; }
  .post__toc { position: sticky; top: calc(var(--head) + 24px); align-self: start; }
}
.post__toc { border-top: 1px solid var(--rule-strong); padding-top: 14px; }
.post__toc h2 { color: var(--wren-deep); margin-bottom: 10px; }
.post__toc ol { list-style: none; padding: 0; display: grid; gap: 8px; font-size: var(--t-sm); color: var(--muted); }
.post__toc a:hover { color: var(--ink); }
.post__body { font-size: var(--t-md); line-height: 1.7; max-width: 68ch; }
.post__body > :first-child { margin-top: 0; }
.post__body h2 { scroll-margin-top: calc(var(--head) + 16px); }
.post__body h3 { font: 500 var(--t-lg)/1.25 var(--f-display); margin: 1.8em 0 .4em; scroll-margin-top: calc(var(--head) + 16px); }
.post__body p, .post__body ul, .post__body ol, .post__body blockquote, .post__body pre, .post__body .table-scroll { margin-top: 1em; }
.post__body ul, .post__body ol { padding-left: 1.3em; }
.post__body li + li { margin-top: .4em; }
.post__body ul li { list-style: disc; }
.post__body ol li { list-style: decimal; }
.post__body li::marker { color: var(--wren-deep); }
.post__body blockquote { margin-left: 0; margin-right: 0; border-left: 2px solid var(--wren); padding: 2px 0 2px 18px; color: #34383e; }
.post__body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--paper-panel); padding: .1em .35em; border-radius: 3px; }
.post__body pre { overflow-x: auto; background: var(--ink); color: var(--on-ink); padding: 16px 18px; border-radius: var(--radius); font-size: .88em; line-height: 1.55; }
.post__body pre code { background: none; padding: 0; color: inherit; }
.post__body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post__body hr { border: 0; border-top: 1px solid var(--rule-strong); margin: 2.5em 0; }
.post__body strong { font-weight: 600; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post__body table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.post__body th, .post__body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule-strong); vertical-align: top; }
.post__body th { font-weight: 600; }
.post__foot { display: grid; gap: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.post__foot > section { display: grid; gap: 1rem; }
.post__foot .tags { list-style: none; padding: 0; margin: 0; }
.bsvc { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; list-style: none; padding: 0; }
.bsvc a { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; height: 100%; padding: 18px 20px; border: 1px solid var(--rule-strong); border-radius: var(--radius); transition: border-color .2s; }
.bsvc a:hover { border-color: var(--ink); }
.bsvc__name { font: 500 1.15rem/1.2 var(--f-display); }
.bsvc__sum { grid-column: 1; color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }
.bsvc .icon { grid-row: 1; grid-column: 2; width: 18px; height: 18px; align-self: center; }
