/* Brooks Bio — site styles
   Palette: logo navy, white, soft grey, one aqua accent (Hamilton-adjacent).
   Type: Outfit for headings, Inter for body. */

:root {
  --navy: #1F2E57;
  --navy-deep: #16213F;
  --ink: #1B2744;
  --slate: #5A6983;
  --mute: #8A97B3;
  --line: rgba(31, 46, 87, .12);
  --bg: #FFFFFF;
  --soft: #F4F6F9;
  --paper: #FBFBF8;
  --accent: #0091AE;
  --accent-ink: #00728A;
  --chart-science: #0091AE;
  --chart-admin: #8A97B3;

  --font-head: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 9vw, 136px);
  --radius: 6px;
  --radius-lg: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 10px 30px rgba(22, 33, 63, .08);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.intro-active { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

section { padding: var(--section) 0; }
.lead-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.lead { font-size: clamp(1.9rem, 3.4vw, 2.9rem); max-width: 22ch; }
.lead em { font-style: normal; color: var(--accent); }
.lead-note { color: var(--slate); font-size: 1.05rem; max-width: 42ch; }
.lead-row--top { align-items: start; }
.lead-row--top .lead-note { padding-top: .55em; }
@media (max-width: 820px) { .lead-row { grid-template-columns: 1fr; align-items: start; } .lead-row--top .lead-note { padding-top: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.45rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--soft); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }
.btn-ghost { border: 1.5px solid currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn svg { width: 1em; height: 1em; }
.link { font-weight: 600; color: var(--accent-ink); display: inline-flex; align-items: center; gap: .35rem; }
.link:hover { text-decoration: underline; }

/* ---------- Logo (inline SVG, colour via currentColor) ---------- */
.logo-svg { width: 100%; height: auto; color: currentColor; --logo-bg: #fff; overflow: visible; }
.logo-svg .logo-letter path, .logo-svg .logo-circle { fill: currentColor; }
.logo-svg .logo-bioletter path { fill: var(--logo-bg); }

/* ---------- Intro ---------- */
#intro {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--navy);
  display: grid; place-items: center;
  color: #fff;
}
#intro .intro-logo { width: min(72vw, 760px); }
#intro .logo-svg { --logo-bg: var(--navy); }
#intro .logo-letter { opacity: 0; transform: translateX(-140px); animation: introLetter .75s var(--ease) forwards; animation-delay: calc(.2s + var(--i) * .08s); }
#intro .logo-mark { opacity: 0; transform: translateX(180px); animation: introMark .8s var(--ease) forwards; animation-delay: .55s; }
#intro .logo-bioletter { opacity: 0; animation: introFade .4s ease forwards; animation-delay: calc(1.25s + var(--i) * .06s); }
#intro.leaving .logo-word, #intro.leaving .logo-bio { animation: introFadeOut .3s ease forwards; }
#intro.leaving .logo-circle { opacity: 0; }
#intro .intro-burst {
  position: fixed; border-radius: 50%; background: #fff; opacity: 0; pointer-events: none;
  transform-origin: center; will-change: transform;
}
#intro.leaving .intro-burst { opacity: 1; transition: transform .9s cubic-bezier(.6, 0, .9, .4); }
#intro.leaving { background: transparent; transition: background 0s .9s; }
#intro.fading .intro-burst { transition: opacity .5s ease; opacity: 0; }
#intro .intro-skip { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .55); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: 0; animation: introFade .6s ease 1.6s forwards; }
@keyframes introLetter { to { opacity: 1; transform: none; } }
@keyframes introMark { to { opacity: 1; transform: none; } }
@keyframes introFade { to { opacity: 1; } }
@keyframes introFadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #intro .logo-letter, #intro .logo-mark, #intro .logo-bioletter { animation: none; opacity: 1; transform: none; }
  #intro.leaving .intro-burst { transition: none; }
  #intro.fading { transition: opacity .4s ease; opacity: 0; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  color: #fff;
  transition: background .35s ease, color .35s ease, box-shadow .35s ease;
}
.nav::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(22, 33, 63, .55), rgba(22, 33, 63, 0)); opacity: 1; transition: opacity .35s; pointer-events: none; }
.nav.solid { background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--navy); box-shadow: 0 1px 0 var(--line); }
.nav.solid::before { opacity: 0; }
.nav .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.nav-brand { display: block; width: 168px; --logo-bg: var(--navy); }
.nav.solid .nav-brand { --logo-bg: #fff; }
.nav-brand .logo-svg { --logo-bg: inherit; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: .92rem; font-weight: 500; opacity: .9; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav .btn { padding: .7rem 1.2rem; }
.nav:not(.solid) .btn-nav { background: #fff; color: var(--navy); }
.nav.solid .btn-nav { background: var(--navy); color: #fff; }
.nav-mobile-cta { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: .3s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; transition: .3s; }
.nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav.open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; color: var(--navy); padding: 8px var(--gutter) 24px; box-shadow: var(--shadow); display: none; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta .btn-nav { display: none; }
  .nav-mobile-cta { display: block; padding-top: 18px; }
  .nav-links .nav-mobile-cta a { display: inline-flex; border-bottom: 0; padding: .9rem 1.4rem; font-size: .95rem; }
  .nav.open { background: #fff; color: var(--navy); }
  .nav.open::before { opacity: 0; }
  .nav.open .nav-brand { --logo-bg: #fff; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 0; color: #fff; background: var(--navy-deep); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 33, 63, .15) 0%, rgba(22, 33, 63, .25) 45%, rgba(22, 33, 63, .78) 100%); }
.hero .wrap { position: relative; width: 100%; padding-bottom: clamp(56px, 9vh, 120px); padding-top: 140px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); max-width: 12ch; font-weight: 500; }
.hero-sub { margin-top: 20px; font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 42ch; color: rgba(255, 255, 255, .88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-scroll { position: absolute; right: var(--gutter); bottom: 28px; display: flex; align-items: center; gap: 10px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.hero-scroll i { display: block; width: 1px; height: 44px; background: #fff; transform-origin: top; animation: scrollLine 1.8s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 700px) { .hero-scroll { display: none; } }

/* ---------- Outcome cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.8vw, 24px); }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }
.card { display: block; }
.card figure { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover figure img { transform: scale(1.04); }
.card .icon { position: absolute; top: 14px; left: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.35rem; margin-top: 18px; }
.card p { margin-top: 8px; color: var(--slate); font-size: .98rem; max-width: 30ch; }

/* ---------- Clients marquee ---------- */
.clients { padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.clients .lead-note { text-align: center; margin: 0 auto 28px; max-width: none; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; width: max-content; gap: clamp(40px, 6vw, 88px); padding: 0 clamp(20px, 3vw, 44px); animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { height: 36px; width: auto; filter: grayscale(1); opacity: .62; transition: opacity .3s, filter .3s; }
.marquee-track img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; row-gap: 24px; } }

/* ---------- Letter ---------- */
.letter { background: var(--soft); }
.letter-card { max-width: 780px; margin: 0 auto; background: var(--paper); border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 64px); box-shadow: var(--shadow); border: 1px solid rgba(31, 46, 87, .06); }
.letter-card p { margin-bottom: 1.15em; font-size: 1.05rem; line-height: 1.7; }
.letter-card p:last-of-type { margin-bottom: 0; }
.letter-card .hi { font-family: var(--font-head); font-size: 1.6rem; font-weight: 500; margin-bottom: .4em; }
.letter-card strong { font-weight: 600; color: var(--navy); }
.letter-sign { margin-top: 28px; }
.letter-sign img { width: 230px; height: auto; margin-left: -12px; }
.letter-author { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.letter-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.letter-author b { display: block; font-weight: 600; color: var(--navy); }
.letter-author span { color: var(--slate); font-size: .95rem; }

/* ---------- Before / after donuts ---------- */
.split { text-align: center; }
.split .lead { margin: 0 auto; }
.donuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); max-width: 920px; margin: clamp(40px, 5vw, 64px) auto 0; }
@media (max-width: 640px) { .donuts { grid-template-columns: 1fr; } }
.donut { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.donut h3 { font-size: 1.05rem; font-weight: 500; color: var(--slate); letter-spacing: 0; }
.donut svg { width: min(100%, 260px); height: auto; margin: 20px auto 8px; }
.donut .ring-bg { fill: none; stroke: var(--soft); stroke-width: 26; }
.donut .ring { fill: none; stroke-width: 26; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray 1.4s var(--ease); }
.donut .ring-admin { stroke: var(--chart-admin); }
.donut .ring-science { stroke: var(--chart-science); }
.donut .center-num { font-family: var(--font-head); font-size: 54px; font-weight: 500; fill: var(--navy); }
.donut .center-lbl { font-size: 15px; fill: var(--slate); }
.legend { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; font-size: .92rem; color: var(--slate); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.legend .sw-admin { background: var(--chart-admin); }
.legend .sw-science { background: var(--chart-science); }
.donut.after { border-color: rgba(0, 145, 174, .35); box-shadow: 0 0 0 4px rgba(0, 145, 174, .06); }
.split-note { margin: 28px auto 0; color: var(--slate); max-width: none; }

/* ---------- Case studies ---------- */
.cases { background: var(--soft); }
.cases .lead-row { margin-bottom: 32px; }
.case-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 960px) { .case-track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .case-track { grid-template-columns: 1fr; } }
.case { background: #fff; border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(31, 46, 87, .06); transition: transform .4s var(--ease), box-shadow .4s; }
.case:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.case figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; }
.case figure img { width: 100%; height: 100%; object-fit: cover; }
.case-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.case .tag { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.case h3 { font-size: 1.35rem; }
.case p { color: var(--slate); font-size: .97rem; flex: 1; }
.case .link { margin-top: 6px; }

dialog.case-dialog { border: 0; padding: 0; border-radius: var(--radius-lg); max-width: min(760px, calc(100vw - 32px)); width: 100%; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
dialog.case-dialog::backdrop { background: rgba(22, 33, 63, .6); backdrop-filter: blur(4px); }
.dialog-hero { aspect-ratio: 16 / 7; overflow: hidden; }
.dialog-hero img { width: 100%; height: 100%; object-fit: cover; }
.dialog-body { padding: clamp(24px, 4vw, 44px); }
.dialog-body .tag { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.dialog-body h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 8px 0 24px; }
.dialog-body h4 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 22px 0 8px; font-family: var(--font-body); font-weight: 600; }
.dialog-body p { color: var(--ink); line-height: 1.65; }
.dialog-body ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink); }
.dialog-body li { margin-bottom: 6px; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--navy); display: grid; place-items: center; }
.dialog-close svg { width: 18px; height: 18px; }

/* ---------- How we work ---------- */
.method { background: var(--navy); color: #fff; }
.method .lead-note { color: rgba(255, 255, 255, .75); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, .14); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { padding: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 36px) clamp(32px, 3vw, 48px) 0; border-right: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; gap: 18px; }
.step:last-child { border-right: 0; }
.step + .step { padding-left: clamp(20px, 2.4vw, 36px); }
@media (max-width: 900px) { .step { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); padding-left: 0 !important; } .step:last-child { border-bottom: 0; } }
.step-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.step-num { font-family: var(--font-head); font-size: clamp(2.4rem, 4vw, 3.4rem); color: rgba(255, 255, 255, .35); line-height: 1; }
.step-pill { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .3); padding: 6px 10px; border-radius: 4px; color: rgba(255, 255, 255, .8); white-space: nowrap; }
.step-art { height: 150px; display: grid; place-items: center; }
.step-art svg { width: 100%; max-width: 300px; height: 150px; overflow: visible; }
/* Step diagrams: ambient motion runs always; the "seen" state (added on scroll) plays the one-off sequences */
.pv text { font-family: var(--font-body); font-size: 10px; letter-spacing: .1em; fill: rgba(255, 255, 255, .55); }
.pv .node { fill: var(--navy); stroke: rgba(255, 255, 255, .45); stroke-width: 1.5; transition: fill .45s, stroke .45s; }
.method.seen .pv .node { fill: #8FE1EF; stroke: #8FE1EF; }
.method.seen .pv .node:nth-of-type(2) { transition-delay: .3s; }
.method.seen .pv .node:nth-of-type(3) { transition-delay: .6s; }
/* 1 · Diagnose */
.pv-map .route { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; stroke-dasharray: 5 6; }
.pv-map .goal { fill: #8FE1EF; stroke: #8FE1EF; }
.pv-map .goal-ring { fill: none; stroke: #8FE1EF; stroke-width: 1; opacity: .5; transform-origin: 272px 32px; transform-box: view-box; animation: pvRing 2.4s ease-out infinite; }
.pv-map .runner { fill: #fff; opacity: 0; transition: opacity .4s .5s; }
.method.seen .pv-map .runner { opacity: .95; }
@keyframes pvRing { 0% { transform: scale(.45); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
/* 2 · Embed */
.pv-build .src { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 1.2; transition: stroke .5s; }
.method.seen .pv-build .src { stroke: #8FE1EF; }
.method.seen .pv-build .src:nth-of-type(2) { transition-delay: .25s; }
.method.seen .pv-build .src:nth-of-type(3) { transition-delay: .5s; }
.pv-build .link { fill: none; stroke: #8FE1EF; stroke-width: 1.3; stroke-dasharray: 4 4; animation: pvDash 1.6s linear infinite; }
.pv-build .core { fill: #8FE1EF; stroke: #8FE1EF; }
.pv-build .core-glow { fill: #8FE1EF; opacity: .18; animation: pvGlow 2.6s ease-in-out infinite; }
.pv-build .core-t { font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: .04em; fill: var(--navy); }
.pv-build .out { fill: rgba(143, 225, 239, .08); stroke: #8FE1EF; stroke-width: 1.2; opacity: 0; transition: opacity .6s .9s; }
.pv-build .out-t { opacity: 0; transition: opacity .6s .9s; }
.method.seen .pv-build .out, .method.seen .pv-build .out-t { opacity: 1; }
@keyframes pvDash { to { stroke-dashoffset: -16; } }
@keyframes pvGlow { 50% { opacity: .38; } }
/* 3 · Hand over */
.pv-cycle .orbit { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1.2; }
.pv-cycle .orbit-live { fill: none; stroke: #8FE1EF; stroke-width: 1.6; stroke-dasharray: 70 282; stroke-linecap: round; transform-origin: 150px 75px; transform-box: view-box; animation: pvOrbit 6s linear infinite; }
.pv-cycle .shield { fill: rgba(143, 225, 239, .1); stroke: #8FE1EF; stroke-width: 1.5; stroke-linejoin: round; }
.pv-cycle .tick { fill: none; stroke: #8FE1EF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; stroke-dashoffset: 32; transition: stroke-dashoffset .8s .6s; }
.method.seen .pv-cycle .tick { stroke-dashoffset: 0; }
@keyframes pvOrbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .pv-map .goal-ring, .pv-build .link, .pv-build .core-glow, .pv-cycle .orbit-live { animation: none; }
  .pv-map .runner { display: none; }
  .pv .node, .pv-build .src, .pv-build .out, .pv-build .out-t, .pv-cycle .tick { transition: none; }
  .method .pv .node { fill: #8FE1EF; stroke: #8FE1EF; }
  .method .pv-build .src { stroke: #8FE1EF; }
  .method .pv-build .out, .method .pv-build .out-t { opacity: 1; }
  .method .pv-cycle .tick { stroke-dashoffset: 0; }
}
.step h3 { font-size: 1.5rem; }
.step h3 small { display: block; font-family: var(--font-body); font-size: .98rem; font-weight: 400; color: rgba(255, 255, 255, .72); margin-top: 6px; letter-spacing: 0; }
.step p { color: rgba(255, 255, 255, .82); font-size: .98rem; flex: 1; }
.step-body { display: flex; flex-direction: column; gap: 12px; }
.step-deliv { font-size: .78rem; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; color: #8FE1EF; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px; }
/* Desktop: share rows across the three steps so titles, text and deliverables line up */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 901px) {
    .steps { grid-template-rows: repeat(5, auto); }
    .step { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 18px; }
    .step-deliv { align-self: start; }
  }
}

/* ---------- Integrations ---------- */
.tools { background: #fff; }
.tools .lead-row { margin-bottom: clamp(28px, 4vw, 48px); }
.tools-marquee { overflow: hidden; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tools-marquee { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tools-marquee.dragging { cursor: grabbing; }
.tools-track { display: flex; gap: 16px; width: max-content; padding: 0 8px; will-change: transform; }
.tools-marquee img { -webkit-user-drag: none; pointer-events: none; }
.tools-marquee.dragging .tool { transform: none; }
.tool { flex: none; width: 152px; height: 94px; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.tool:hover { transform: translateY(-3px); border-color: rgba(31, 46, 87, .45); box-shadow: 0 8px 20px rgba(22, 33, 63, .08); }
.tool img { max-height: 30px; max-width: 110px; width: auto; height: auto; }
.tool span { font-size: .76rem; font-weight: 600; color: var(--slate); letter-spacing: .02em; white-space: nowrap; }
.tool-wordmark img { max-height: 34px; max-width: 120px; }
.tool-mark-lg img { max-height: 46px; max-width: 110px; }
.tool-wordmark span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tool-text span { font-family: var(--font-head); font-size: 1.1rem; font-weight: 500; color: var(--navy); letter-spacing: -.01em; }
@media (prefers-reduced-motion: reduce) {
  .tools-track { width: auto; flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); }
  .tools-marquee { -webkit-mask-image: none; mask-image: none; cursor: default; }
}

/* ---------- Guides ---------- */
.guides { background: var(--soft); border-bottom: 1px solid var(--line); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

/* Resources: three stacks, each opens a popup listing its cards */
.stacks { padding-top: 14px; padding-right: 14px; }
.stack { --stack: 6px -6px 0 -1px #fff, 6px -6px 0 0 var(--line), 12px -12px 0 -1px #fff, 12px -12px 0 0 var(--line); position: relative; text-align: left; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; background: #fff; color: inherit; cursor: pointer; box-shadow: var(--stack); transition: transform .4s var(--ease), box-shadow .4s; }
.stack:hover, .stack:focus-visible { transform: translateY(-3px); box-shadow: var(--stack), var(--shadow); outline: none; }
.stack-art { position: relative; display: block; height: 150px; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.stack-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stack .kind { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.stack-title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.35rem; color: var(--navy); line-height: 1.2; }
.stack-text { color: var(--slate); flex: 1; }
.stack .link { font-weight: 600; color: var(--accent-ink); }
.guide-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(31, 46, 87, .72); border: 1px solid rgba(255, 255, 255, .6); transition: transform .3s var(--ease); }
.guide-play::after { content: ''; position: absolute; left: 18px; top: 14px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.guide-demo .guide-art { position: relative; }
.guide-art-btn { width: 100%; cursor: pointer; border: 0; display: block; }
.guide-art-btn:disabled { cursor: default; }
.guide-art-btn:disabled .guide-play { opacity: .35; }
.guide-art-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-acts { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding-top: 4px; }
.guide-acts .link { flex-basis: 100%; }
.btn-sm { padding: 9px 14px; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-ghost:hover:not(:disabled) { background: var(--navy); color: #fff; }
.guide-acts .btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.guide-acts .btn small { font-weight: 500; opacity: .8; }
.guide-acts .link { font-weight: 600; color: var(--accent-ink); }
.guide-demo:hover .guide-play, .stack:hover .guide-play { transform: translate(-50%, -50%) scale(1.08); }
.guides .guide-post .kind, .stack-dialog .guide-post .kind { text-transform: none; letter-spacing: 0; color: var(--slate); }
.guides .guide-post h3, .stack-dialog .guide-post h3 { font-size: 1.12rem; }

dialog.stack-dialog { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(1200px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); background: var(--soft); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); flex-direction: column; overflow: hidden; }
dialog.stack-dialog[open] { display: flex; }
dialog.stack-dialog::backdrop { background: rgba(22, 33, 63, .65); backdrop-filter: blur(4px); }
.stack-dialog-bar { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 72px 18px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.stack-dialog-bar h3 { font-size: 1.4rem; margin: 0; }
.stack-dialog-bar p { margin: 4px 0 0; color: var(--slate); font-size: .95rem; }
.stack-dialog-bar p:empty { display: none; }
.stack-dialog-bar .dialog-close { top: 18px; right: 18px; background: var(--soft); }
.stack-dialog-body { padding: 24px 28px; overflow: auto; }
.stack-dialog-body .guide { background: #fff; }
@media (max-width: 900px) { .stack-dialog-body, .stack-dialog-bar { padding-left: 18px; padding-right: 18px; } }
.stack-dialog-foot { padding: 14px 28px; background: #fff; border-top: 1px solid var(--line); }
.stack-dialog-foot .link { font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.stack-dialog-foot .link:hover { text-decoration: underline; }
@media (max-width: 1000px) { .guides .cards { grid-template-columns: repeat(2, 1fr); } .guides .cards > *, .guides .cards > *:nth-child(n+4) { grid-column: auto; } }
@media (max-width: 900px) { .guides .cards { grid-template-columns: 1fr; } }
.guide { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; min-height: 240px; background: #fff; }
.guide .kind { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.guide h3 { font-size: 1.3rem; }
.guide p { color: var(--slate); flex: 1; }
.guide .soon { align-self: flex-start; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--slate); padding: 6px 12px; border-radius: 999px; }
.guide-art { height: 120px; border-radius: var(--radius); background: linear-gradient(135deg, var(--soft), #E6ECF5); display: grid; place-items: center; color: var(--navy); }
.guide-art svg { width: 44px; height: 44px; }

/* ---------- Blog cards ---------- */
.guide-blog { color: inherit; transition: transform .4s var(--ease), box-shadow .4s; }
.guide-blog:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.guide-art-img { overflow: hidden; padding: 0; }
.guide-art-img img { width: 100%; height: 100%; object-fit: cover; }
.posts { display: grid; gap: clamp(16px, 2vw, 28px); }
.posts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.posts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.posts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .posts-4, .posts-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .posts-4, .posts-3, .posts-2 { grid-template-columns: 1fr; } }
.post { display: flex; flex-direction: column; gap: 8px; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
.post figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post:hover figure img { transform: scale(1.04); }
.post-meta { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; padding: 16px 20px 0; }
.post h3 { font-size: 1.2rem; padding: 0 20px; }
.post p { color: var(--slate); font-size: .95rem; padding: 0 20px 22px; }
.posts-2 .post h3 { font-size: 1.45rem; }
.post-text { border-top: 3px solid var(--accent); }
.post-text .post-meta { padding-top: 22px; }
.post-text p { flex: 1; }

/* ---------- Article pages ---------- */
.page-blog main { padding-top: 76px; }
.blog-index { padding-top: clamp(48px, 7vw, 96px); }
.article { padding: clamp(40px, 6vw, 80px) 0 0; }
.article-head { max-width: 820px; }
.article .back, .blog-index .back { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--accent-ink); margin-bottom: 28px; }
.article .back:hover, .blog-index .back:hover { text-decoration: underline; }
.article-meta { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; margin-bottom: 14px; }
.article h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 20ch; }
.article-sub { margin-top: 18px; font-size: 1.2rem; color: var(--slate); max-width: 56ch; line-height: 1.55; }
.article-author { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.article-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.article-author b { display: block; font-weight: 600; color: var(--navy); }
.article-author span { color: var(--slate); font-size: .9rem; }
.article-cover { margin: clamp(32px, 4vw, 56px) auto; max-width: 980px; }
.article-cover img { width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: var(--radius-lg); }
.article-body { max-width: 720px; margin: 0 auto; font-size: 1.1rem; line-height: 1.75; padding-bottom: clamp(48px, 6vw, 96px); }
.article-body p { margin: 0 0 1.3em; }
.article-body h2, .article-body h3, .article-body h4 { margin: 2em 0 .7em; line-height: 1.2; }
.article-body h2 { font-size: 1.8rem; }
.article-body h3 { font-size: 1.5rem; }
.article-body h4 { font-size: 1.2rem; }
.article-body ul, .article-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body li > p { margin: 0; }
.article-body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { color: var(--navy); }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.article-body blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--accent); color: var(--slate); }
.article-body .art-fig { margin: 2em 0; }
.article-body .art-fig img { width: 100%; height: auto; border-radius: var(--radius); }
.article-body figcaption { font-size: .9rem; color: var(--slate); margin-top: 10px; text-align: center; }
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--soft); padding: .1em .35em; border-radius: 4px; }
.article-origin { margin-top: 3em !important; padding-top: 1.6em; border-top: 1px solid var(--line); font-size: .95rem; color: var(--slate); }
.more-posts { background: var(--soft); }
.more-posts .lead-row { margin-bottom: 32px; }
.more-posts .lead-note { text-align: right; }
@media (max-width: 820px) { .more-posts .lead-note { text-align: left; } }
.cta-slim { padding: clamp(56px, 7vw, 96px) 0; }
.cta-slim-wrap { display: flex !important; grid-template-columns: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-slim h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); max-width: 22ch; }

/* ---------- FAQ ---------- */
.faq .lead-row { align-items: start; }
.faq-photo { margin: clamp(24px, 3vw, 36px) 0 0; max-width: 420px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-lg); background: var(--soft); }
.faq-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@media (max-width: 820px) { .faq-photo { max-width: 360px; } }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-family: var(--font-head); font-size: 1.15rem; font-weight: 500; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); position: relative; transition: transform .3s var(--ease), background .3s; }
.faq-list summary i::before, .faq-list summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--navy); transform: translate(-50%, -50%); transition: .3s; }
.faq-list summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-list details[open] summary i { background: var(--navy); border-color: var(--navy); }
.faq-list details[open] summary i::before, .faq-list details[open] summary i::after { background: #fff; }
.faq-list details[open] summary i::after { transform: translate(-50%, -50%) rotate(0); }
.faq-list .answer { padding: 0 0 24px; color: var(--slate); max-width: 62ch; line-height: 1.7; }

/* ---------- CTA + form ---------- */
.cta { position: relative; color: #fff; padding: clamp(80px, 10vw, 150px) 0; overflow: hidden; }
.cta-media { position: absolute; inset: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(22, 33, 63, .92) 0%, rgba(22, 33, 63, .78) 55%, rgba(22, 33, 63, .55) 100%); }
.cta .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 900px) { .cta .wrap { grid-template-columns: 1fr; } }
.cta h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); max-width: 16ch; }
.cta h2 em { font-style: normal; color: #8FE1EF; }
.cta-copy p { margin-top: 20px; color: rgba(255, 255, 255, .85); max-width: 44ch; font-size: 1.05rem; }
.cta-book { margin-top: 26px; }
.cta-copy .alt { margin-top: 22px; font-size: .95rem; }
.cta-copy .alt a { color: #8FE1EF; font-weight: 600; }
.form { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); box-shadow: 0 30px 70px rgba(0, 0, 0, .25); }
.form h3 { font-size: 1.3rem; margin-bottom: 4px; }
.form .hint { color: var(--slate); font-size: .92rem; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--navy); }
.field input, .field textarea { font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 145, 174, .15); }
.field textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form .btn { width: 100%; justify-content: center; margin-top: 6px; padding: 1rem; }
.form .fine { font-size: .8rem; color: var(--mute); margin-top: 12px; text-align: center; }
.form-success { display: none; text-align: center; padding: 24px 0; }
.form.sent form { display: none; }
.form.sent .form-success { display: block; }
.form-success svg { width: 48px; height: 48px; color: var(--accent); margin: 0 auto 12px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--slate); font-size: .9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.footer-brand { width: 140px; color: var(--navy); --logo-bg: #fff; }
.footer-brand .logo-svg { --logo-bg: inherit; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a:hover { color: var(--navy); text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; } .reveal[data-delay="2"] { transition-delay: .2s; } .reveal[data-delay="3"] { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll i { animation: none; }
  .donut .ring { transition: none; }
}

/* ---------- Resource pages (guides and toolkits behind the email form) ---------- */
.resource .article-head { max-width: 880px; }
.rs-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.rs-ghost { color: var(--navy); }
.rs-ghost:hover { background: var(--soft); }
.rs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: clamp(32px, 4vw, 56px) auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.rs-meta span { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; margin-bottom: 6px; }
.rs-meta b { font-weight: 600; color: var(--navy); }
@media (max-width: 760px) { .rs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rs-film { margin-top: clamp(32px, 4vw, 56px); }
.rs-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy); box-shadow: var(--shadow); }
.rs-video img, .rs-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-video img { opacity: .55; }
.rs-film-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 600; letter-spacing: .02em; background: rgba(31, 46, 87, .55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 12px 22px 12px 14px; white-space: nowrap; }
.rs-play { width: 36px; height: 36px; border-radius: 50%; background: #fff; position: relative; }
.rs-play::after { content: ""; position: absolute; left: 14px; top: 10px; border-left: 12px solid var(--navy); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.rs-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: clamp(32px, 5vw, 80px); margin-top: clamp(32px, 4.5vw, 56px); align-items: start; }
@media (max-width: 900px) { .rs-grid { grid-template-columns: 1fr; } }
.rs-block { padding: 0; margin-bottom: clamp(18px, 2.4vw, 28px); font-size: 1.08rem; line-height: 1.65; }
.rs-block p { margin: 0 0 .8em; }
.rs-block .article-meta { margin-bottom: 8px; }
.rs-list, .rs-steps { margin: 0 0 1em; padding-left: 1.3em; }
.rs-list li, .rs-steps li { margin-bottom: .5em; }
.rs-list li::marker, .rs-steps li::marker { color: var(--accent); font-weight: 600; }
.rs-block b { color: var(--navy); font-weight: 600; }
.rs-fine { font-size: .92rem; color: var(--slate); }
.rs-fine code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--soft); padding: .1em .4em; border-radius: 4px; }
.rs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 6px 0 14px; }
.rs-stats div { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 20px; }
.rs-stats b { display: block; font-family: var(--font-head); font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; color: var(--accent); margin-bottom: 10px; font-weight: 600; }
.rs-stats b.before { color: var(--chart-admin); }
.rs-stats span { font-size: .92rem; color: var(--slate); line-height: 1.45; display: block; }
@media (max-width: 620px) { .rs-stats { grid-template-columns: 1fr; } }
.rs-case { background: var(--soft); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); }
.rs-side { position: sticky; top: 96px; }
.rs-tool { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.rs-tool-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; font-weight: 600; font-size: .92rem; color: var(--navy); border-bottom: 1px solid var(--line); }
.rs-tool-bar .btn-sm { border: 1.5px solid var(--line); }
.rs-tool-view { position: relative; height: 380px; overflow: hidden; background: #f5f7fb; }
.rs-tool-frame { position: absolute; inset: 0; width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; background: #fff; }
.rs-tool .fine { padding: 12px 18px 14px; margin: 0; }
.rs-gate { box-shadow: var(--shadow); border: 1px solid var(--line); }
.rs-gate .opt { font-weight: 400; color: var(--mute); margin-left: 6px; }
.rs-gate .check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--slate); margin: 4px 0 10px; cursor: pointer; }
.rs-gate .check input { margin-top: 4px; accent-color: var(--accent); flex: none; }
.rs-unlocked { text-align: left; }
.rs-unlocked svg { margin-left: 0; }
.rs-dl { width: 100%; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 10px; padding: .9rem 1.1rem; text-align: left; white-space: normal; line-height: 1.3; }   /* nowrap from .btn would set the column's minimum width and push the page sideways on phones */
.rs-dl small { font-weight: 500; opacity: .75; font-size: .8rem; line-height: 1.35; }
.rs-main, .rs-side { min-width: 0; }
.rs-unlocked .btn-light { border: 1.5px solid var(--line); }
.rs-author { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); max-width: 60ch; }
.rs-author picture { flex: none; }
.rs-author img { display: block; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.rs-author b { display: block; color: #fff; font-weight: 600; }
.rs-author span { font-size: .9rem; color: rgba(255, 255, 255, .78); line-height: 1.5; }
.rs-next { margin: clamp(48px, 6vw, 96px) auto; }
.rs-next-card { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.rs-next-card h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 10px; }
.rs-next-card p { color: rgba(255, 255, 255, .85); max-width: 60ch; }
@media (max-width: 700px) { .rs-next-card { grid-template-columns: 1fr; } }
/* home card that links to a resource page */
.guide-link { color: inherit; transition: transform .4s var(--ease), box-shadow .4s; }
.guide-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Lab brain: strip on tool pages, hub page, home section ---------- */
.lb-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; width: fit-content; max-width: 100%; margin: 0 0 22px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: .88rem; color: var(--slate); line-height: 1.4; }
.lb-strip a { color: var(--navy); font-weight: 600; text-decoration: none; }
.lb-strip a:hover { color: var(--accent-ink); }
.lb-strip .lb-mod { background: var(--navy); color: #fff; font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.lb-strip .lb-more { color: var(--accent-ink); }
@media (max-width: 620px) { .lb-strip { border-radius: var(--radius-lg); } }

.lb-next { margin: clamp(32px, 4vw, 56px) auto 0; }
.lb-next-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); color: inherit; text-decoration: none; background: #fff; transition: transform .4s var(--ease), box-shadow .4s; }
a.lb-next-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lb-next-card .lb-kind { grid-column: 1; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.lb-next-card b { grid-column: 1; font-family: var(--font-head); font-size: 1.35rem; color: var(--navy); font-weight: 500; }
.lb-next-card .lb-sub { grid-column: 1; color: var(--slate); font-size: .95rem; }
.lb-next-card .lb-go { grid-column: 2; grid-row: 1 / span 3; font-style: normal; font-size: 1.6rem; color: var(--accent); }
.lb-next-card .lb-sub a { color: var(--accent-ink); font-weight: 600; }

/* status chips, shared by hub cards and the home mini diagram */
.lb-chip { display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); background: #fff; white-space: nowrap; }
.lb-chip.live { background: var(--accent); border-color: var(--accent); color: #fff; }
.lb-chip.demo { background: #E6F6F9; border-color: var(--accent); color: var(--accent-ink); }
.lb-chip.next { border-style: dashed; border-color: var(--accent); color: var(--accent-ink); }

/* hub page */
.lb-hub .article-head { max-width: 920px; }
.lb-section { margin-top: clamp(48px, 6vw, 88px); }
.lb-section > .article-meta { margin-bottom: 8px; }
.lb-section h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); margin: 0 0 14px; max-width: 24ch; }
.lb-section .lb-lede { max-width: 66ch; font-size: 1.08rem; line-height: 1.65; color: var(--ink); }
.lb-map { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: .98rem; }
.lb-map th { text-align: left; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; padding: 0 16px 10px 0; border-bottom: 1px solid var(--line); }
.lb-map td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.lb-map td:first-child { color: var(--navy); font-weight: 600; width: 36%; }
.lb-map a { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 700px) { .lb-map thead { display: none; } .lb-map, .lb-map tbody, .lb-map tr, .lb-map td { display: block; width: 100%; } .lb-map tr { padding: 14px 0; border-bottom: 1px solid var(--line); } .lb-map td { border: 0; padding: 2px 0; } .lb-map td:first-child { width: 100%; } }

.lb-door { margin-top: 28px; }
.lb-layer-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); font-weight: 600; margin: 28px 0 12px; }
.lb-grid { display: grid; gap: 16px; }
.lb-grid.sci { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lb-grid.ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lb-grid.door { grid-template-columns: 1fr; }
@media (max-width: 980px) { .lb-grid.sci { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .lb-grid.sci, .lb-grid.ops { grid-template-columns: 1fr; } }
.lb-card { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; color: inherit; text-decoration: none; min-width: 0; }
.lb-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lb-card h3 { font-size: 1.3rem; margin: 0; }
.lb-card p { margin: 0; color: var(--slate); font-size: .96rem; line-height: 1.5; }
.lb-card .lb-tool { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: .95rem; color: var(--navy); }
a.lb-card { transition: transform .4s var(--ease), box-shadow .4s; }
a.lb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
a.lb-card .lb-tool { color: var(--accent-ink); }
.lb-card.planned { background: var(--soft); border-style: dashed; }
.lb-card.planned h3 { color: var(--slate); }
.lb-card.planned .lb-tool { color: var(--mute); font-weight: 500; }
.lb-card.door { background: var(--navy); border-color: var(--navy); }
.lb-card.door h3, .lb-card.door .lb-tool { color: #fff; }
.lb-card.door p { color: rgba(255, 255, 255, .82); }
.lb-card.door .lb-chip { border-color: rgba(255, 255, 255, .5); }
.lb-store { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 16px 22px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; font-weight: 600; }
.lb-store span:last-child { font-weight: 400; color: rgba(255, 255, 255, .8); }
.lb-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
@media (max-width: 820px) { .lb-three { grid-template-columns: 1fr; } }
.lb-three div { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.lb-three b { display: block; color: var(--navy); font-family: var(--font-head); font-size: 1.15rem; font-weight: 500; margin-bottom: 6px; }
.lb-three span { color: var(--slate); font-size: .96rem; line-height: 1.5; display: block; }
.lb-series { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: lbs; }
.lb-series li { counter-increment: lbs; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lb-series li::before { content: counter(lbs); font-family: var(--font-head); font-size: 1.4rem; color: var(--accent); font-weight: 600; }
.lb-series b { color: var(--navy); font-weight: 600; }
.lb-series b a { color: var(--navy); }
.lb-series span.lb-d { display: block; color: var(--slate); font-size: .95rem; margin-top: 2px; font-weight: 400; }
.lb-real { background: var(--soft); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); margin-top: 24px; }
.lb-real ul { margin: 0; padding-left: 1.2em; line-height: 1.6; }
.lb-real li { margin-bottom: .45em; }
.lb-real li::marker { color: var(--accent); }
.lb-real b { color: var(--navy); }


/* ---------- Lab brain: the cycle (home) ---------- */
.lbx { background: var(--navy); color: #fff; padding: clamp(36px, 4.5vw, 64px) 0 clamp(28px, 3.5vw, 48px); }
.lbx .lead-row { margin-bottom: 0; }
.lbx .lead-note { color: rgba(255, 255, 255, .75); }
.lbx-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 64px); align-items: center; margin-top: clamp(20px, 2.5vw, 32px); border-top: 1px solid rgba(255, 255, 255, .14); padding-top: clamp(12px, 1.5vw, 20px); }
@media (max-width: 900px) { .lbx-grid { grid-template-columns: 1fr; } }
.lbx-art { display: grid; place-items: center; }
.lbx-svg { width: 100%; max-width: 560px; height: auto; overflow: visible; display: block; }
.lbx-svg text { font-family: var(--font-body); font-size: 15px; font-weight: 600; fill: rgba(255, 255, 255, .88); pointer-events: none; }
.lbx-label { font-size: 12px !important; font-weight: 500 !important; letter-spacing: .1em; text-transform: uppercase; fill: rgba(255, 255, 255, .55) !important; }
.lbx-ring { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1.5; }
.lbx-ring-live { fill: none; stroke: #8FE1EF; stroke-width: 2; stroke-dasharray: 110 832; stroke-linecap: round; transform-origin: 300px 330px; transform-box: view-box; animation: lbxOrbit 9s linear infinite; }
.lbx-link { fill: none; stroke: #8FE1EF; stroke-width: 1.4; stroke-dasharray: 4 5; animation: lbxDash 1.8s linear infinite; opacity: .85; }
.lbx-core-glow { fill: #8FE1EF; opacity: .12; animation: lbxGlow 3s ease-in-out infinite; }
.lbx-core-ring { fill: var(--navy-deep); stroke: #8FE1EF; stroke-width: 1.6; transition: fill .35s; }
.lbx-core-t { font-family: var(--font-head) !important; font-size: 19px !important; font-weight: 500 !important; fill: #fff !important; }
.lbx-node { cursor: pointer; outline: none; }
.lbx-node rect { fill: var(--navy-deep); stroke: rgba(255, 255, 255, .45); stroke-width: 1.4; transition: fill .3s, stroke .3s, transform .3s var(--ease); }
.lbx-node.live rect, .lbx-node.demo rect { stroke: #8FE1EF; }
.lbx-node.planned rect { stroke-dasharray: 5 4; stroke: rgba(255, 255, 255, .5); }
.lbx-node.planned text { fill: rgba(255, 255, 255, .7); }
.lbx-node.bd rect { stroke: rgba(255, 255, 255, .4); }
.lbx-node:hover rect, .lbx-node:focus-visible rect, .lbx-node.active rect { fill: #8FE1EF; stroke: #8FE1EF; }
.lbx-node:hover text, .lbx-node:focus-visible text, .lbx-node.active text { fill: var(--navy); }
.lbx-core:hover .lbx-core-ring, .lbx-core:focus-visible .lbx-core-ring, .lbx-core.active .lbx-core-ring { fill: #8FE1EF; }
.lbx-core:hover .lbx-core-t, .lbx-core:focus-visible .lbx-core-t, .lbx-core.active .lbx-core-t { fill: var(--navy) !important; }
.lbx-panel { border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); min-height: 260px; display: flex; flex-direction: column; gap: 14px; background: rgba(255, 255, 255, .03); }
.lbx-panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lbx-kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8FE1EF; font-weight: 600; }
.lbx-chip { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .35); padding: 5px 10px; border-radius: 999px; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.lbx-chip.live { background: #8FE1EF; border-color: #8FE1EF; color: var(--navy); }
.lbx-chip.planned { border-style: dashed; }
.lbx-panel h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 0; line-height: 1.25; }
.lbx-panel p { color: rgba(255, 255, 255, .82); font-size: .98rem; margin: 0; flex: 1; }
.lbx-actions { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; padding-top: 6px; }
.lbx-link2 { color: #8FE1EF; font-weight: 600; text-decoration: none; }
.lbx-link2:hover { text-decoration: underline; }
.lbx-panel.swap h3, .lbx-panel.swap p, .lbx-panel.swap .lbx-actions { animation: lbxIn .35s var(--ease); }

/* Lab brain: demo list under the panel + popup player */
.lbx-side { display: flex; flex-direction: column; gap: 14px; }
.lbx-demos { animation: lbxIn .35s var(--ease); }
.lbx-demos-head { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin: 0 0 8px; font-weight: 600; }
.lbx-demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lbx-demo { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border: 1px solid rgba(143, 225, 239, .5); border-radius: 14px; background: rgba(143, 225, 239, .06); }
.lbx-demo-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; border: 0; padding: 0; background: var(--navy-deep); cursor: pointer; }
.lbx-demo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.lbx-demo-thumb:hover img, .lbx-demo-thumb:focus-visible img { transform: scale(1.05); }
.lbx-demo-play { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(31, 46, 87, .7); border: 1px solid rgba(255, 255, 255, .5); }
.lbx-demo-play::after { content: ''; position: absolute; left: 13px; top: 10px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.lbx-demo-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lbx-demo-name { color: #fff; font-weight: 600; text-decoration: none; }
.lbx-demo-name:hover { text-decoration: underline; }
.lbx-demo-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.lbx-demo-btn { font: inherit; font-size: .8rem; font-weight: 600; line-height: 1.2; white-space: nowrap; padding: 6px 11px; border-radius: 999px; border: 1px solid #8FE1EF; background: transparent; color: #8FE1EF; cursor: pointer; transition: background .2s, color .2s; }
.lbx-demo-btn:hover:not(:disabled), .lbx-demo-btn:focus-visible { background: #8FE1EF; color: var(--navy); outline: none; }
.lbx-demo-btn:disabled { border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .45); cursor: default; }
.lbx-demo-btn small { font-weight: 500; opacity: .8; }
@media (max-width: 480px) { .lbx-demo { grid-template-columns: 1fr; } }
dialog.lbx-dialog { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(1200px, calc(100vw - 32px)); max-width: none; background: var(--navy-deep); color: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; }
dialog.lbx-dialog::backdrop { background: rgba(22, 33, 63, .7); backdrop-filter: blur(4px); }
.lbx-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 64px 12px 20px; font-weight: 600; font-size: .95rem; position: relative; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.lbx-dialog-bar .dialog-close { top: 8px; right: 12px; }
.lbx-dialog-body { background: #000; }
.lbx-dialog-body video { display: block; width: 100%; max-height: calc(100vh - 140px); aspect-ratio: 16 / 9; }
.lbx-dialog-body iframe { display: block; width: 100%; height: min(78vh, 820px); border: 0; background: #fff; }
@media (prefers-reduced-motion: reduce) { .lbx-demos { animation: none; } }
@keyframes lbxOrbit { to { transform: rotate(360deg); } }
@keyframes lbxDash { to { stroke-dashoffset: -18; } }
@keyframes lbxGlow { 50% { opacity: .28; } }
@keyframes lbxIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lbx-ring-live, .lbx-link, .lbx-core-glow { animation: none; } .lbx-panel.swap h3, .lbx-panel.swap p, .lbx-panel.swap .lbx-actions { animation: none; } }
@media (max-width: 480px) { .lbx-svg text { font-size: 17px; } .lbx-core-t { font-size: 21px !important; } }

/* Keep nav links on one line now the booking button is wider */
.nav-links a { white-space: nowrap; }
