/* Fonts are self-hosted (latin subset, from Google Fonts, SIL Open Font License), so the
   first paint doesn't wait on a third-party stylesheet. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-display: swap; src: url('/assets/fonts/bricolage-grotesque.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/dm-sans.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ibm-plex-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2'); }

/* Phone first. The base styles are for a phone; 640px adds the tablet layout, 1024px the
   desktop one. The design is BPL-76's "Mobile design, every page" canvas. */
:root {
  --ink: #0E2238;
  --paper: #F7F9FC;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --white: #FFFFFF;
  --text: #2A3A4F;
  --muted: #4A5A70;
  --blue: #1D4ED8;
  --tint: #EAF1FB;
  --line: #C9D6E8;
  --soft: #DCE3EE;
  --green: #15803D;
  --green-bright: #22C55E;
  --purple: #7C3AED;
  --cyan: #0E7490;
  --amber: #B45309;
  --pink: #BE185D;
  --orange-bright: #E8590C;
  --orange-tint: #FDE7DC;
  --green-tint: #E3F3E1;
  --blue-tint: #DCE6FB;
  --dark-panel: #16304D;
  --dark-line: #2A4766;
  --dark-text: #D3DEEC;
  --dark-muted: #A9BBD3;
  --dark-link: #8FC1FF;
  --track: #9DB4D3;
  --warning: #D97706;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-heading: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: 20px;
  --bar-h: 56px;
  --sec: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 640px) { :root { --gutter: 32px; --bar-h: 64px; --sec: 72px; } }
@media (min-width: 1024px) { :root { --bar-h: 72px; --sec: 88px; } }

/* Shared foundation */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; font-family: var(--font-body); font-size: 16px; color: var(--ink); background: var(--paper); line-height: 1.5; overflow-x: clip; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); }
h1, h2 { font-weight: 800; }
h3, h4 { font-weight: 700; line-height: 1.2; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
button { font: inherit; cursor: pointer; color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); }
.wrap { width: 100%; max-width: 1244px; margin-inline: auto; padding-inline: var(--gutter); }
.label { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 60; top: 8px; left: 8px; padding: 12px 18px; min-height: 44px; background: var(--ink); color: var(--paper); border-radius: 10px; transform: translateY(-200%); }
.skip-link:focus { transform: none; color: var(--paper); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Page transitions between pages of the site. Home fades in; pages one level down slide
   in from the right (live-demos.css). None at all with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 999px; font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--dark-panel); color: var(--white); }
.btn-outline { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { color: var(--ink); background: var(--tint); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-hover); color: var(--white); }
.btn-light { border: 2px solid var(--paper); color: var(--paper); background: transparent; }
.btn-light:hover { color: var(--paper); background: var(--dark-panel); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.button-row { display: flex; gap: 10px; }
.button-row > .btn { flex: 1 1 0; min-width: 0; }
@media (min-width: 640px) { .button-row > .btn { flex: 0 0 auto; } .btn { padding: 14px 24px; } }

/* Top bar: sticky on every size. Phone and tablet get a menu button; desktop shows the nav. */
.site-header { position: sticky; top: 0; z-index: 30; background: rgb(247 249 252 / 92%); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.bar { height: var(--bar-h); display: flex; align-items: center; gap: 6px; }
.site-logo { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; font-family: var(--font-heading); font-weight: 800; font-size: clamp(17px, 5.2vw, 19px); letter-spacing: -.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-logo:hover { color: var(--ink); }
.site-logo span { color: var(--accent); }
.bar-space { flex: 1; }
.icon-btn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: var(--tint); color: var(--ink); }
.back-btn { margin-left: -12px; }
.menu-btn { margin-right: -10px; }
.bar-cta { display: none; }
.site-nav { display: none; }
@media (min-width: 640px) {
  .site-logo { font-size: 21px; }
  .bar-cta { display: inline-flex; margin-right: 4px; }
}
@media (min-width: 1024px) {
  .back-btn, .menu-btn { display: none; }
  .site-nav { display: flex; align-items: center; gap: 2px; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--ink); font-weight: 500; text-decoration: none; }
  .site-nav a:hover { background: var(--tint); color: var(--ink); }
  .site-nav a[aria-current="page"] { font-weight: 700; background: var(--tint); }
  .nav-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
  .bar-cta { margin: 0 0 0 10px; }
}

/* Sheets: a native <dialog>, so focus stays inside, Escape closes it and the page behind
   is inert. Phone: from the bottom, under the thumb. Tablet: a panel from the right. */
.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: calc(100dvh - 32px); margin: 0; padding: 0; flex-direction: column; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0; overflow: hidden; }
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgb(14 34 56 / 50%); }
.sheet-tall { height: calc(100dvh - 40px); max-height: none; }
.sheet-grab { flex: none; width: 40px; height: 5px; border-radius: 999px; background: var(--track); margin: 10px auto 0; }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px var(--gutter) 10px; }
/* A sheet opens with focus on its title, so screen readers hear what it is and a tap
   doesn't leave a focus ring on the close button. */
.sheet-title { font-size: 22px; line-height: 1.2; }
.sheet-title:focus { outline: none; }
.sheet-head .icon-btn { margin-right: -10px; }
.sheet-body { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 4px var(--gutter) calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-up .34s var(--ease); }
  .sheet[open]::backdrop { animation: fade-in .24s ease; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) {
  .sheet { inset: 0 0 0 auto; width: 420px; height: 100dvh; max-height: none; border: 2px solid var(--ink); border-right: 0; border-radius: 24px 0 0 24px; }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 16px; }
  @media (prefers-reduced-motion: no-preference) { .sheet[open] { animation-name: sheet-in; } }
}

/* Menu sheet */
.menu-group { display: flex; flex-direction: column; gap: 10px; }
.menu-pages { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.menu-pages li + li { border-top: 1px solid var(--line); }
.page-link { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 16px; color: var(--ink); text-decoration: none; }
.page-link:hover { background: var(--tint); color: var(--ink); }
.page-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.page-link-name { font-family: var(--font-heading); font-weight: 700; font-size: 18px; line-height: 1.2; }
.page-link-sub { font-size: 14px; line-height: 1.35; color: var(--muted); }
.page-link .icon { width: 20px; height: 20px; color: var(--muted); }
.here { flex: none; font-family: var(--font-mono); font-size: 12px; padding: 4px 8px; border-radius: 999px; background: var(--tint); color: var(--blue); }
/* Section shortcuts: only on the tablet panel. On a phone you scroll the page. */
.menu-sections { display: none; }
.section-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.section-links a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); font-weight: 500; text-decoration: none; }
.section-links a:hover { border-color: var(--ink); color: var(--ink); }
@media (min-width: 640px) { .menu-sections { display: flex; } }
.menu-cta { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.menu-mini { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.menu-mini a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 15px; }

/* Shared pieces */
.card { background: var(--white); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); }
.status-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(21 128 61 / 50%); } 50% { box-shadow: 0 0 0 6px rgb(21 128 61 / 0%); } }
.chev { transition: transform .2s ease; }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }
.fade { animation: rise .24s ease; }
.section-tinted { background: var(--tint); border-block: 2px solid var(--ink); }
.section-white { background: var(--white); border-block: 2px solid var(--ink); }
.section-stack { padding-block: var(--sec); display: flex; flex-direction: column; gap: 24px; }
.section-stack h2, .sec-title { font-size: 32px; line-height: 1.08; letter-spacing: -.01em; }
.section-intro { display: flex; flex-direction: column; gap: 10px; }
.section-intro p { max-width: 640px; color: var(--text); font-size: 16px; }
@media (min-width: 640px) { .section-stack { gap: 32px; } .section-stack h2, .sec-title { font-size: 42px; } .section-intro p { font-size: 17px; } }
@media (min-width: 1024px) { .section-stack h2, .sec-title { font-size: 52px; line-height: 1.05; } }

/* Decorative motion */
.flow { --c: var(--blue); position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); flex: 1 1 40px; min-width: 24px; }
.dot { position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--blue)); animation: run 2.6s linear infinite; }
.d2 { animation-delay: .9s; }
.d3 { animation-delay: 1.7s; }
@keyframes run { 0% { left: 0; opacity: 0; } 10%, 90% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
.vflow { position: relative; width: 2px; height: 28px; margin-inline: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 5px, transparent 5px 10px); }
.vdot { position: absolute; left: -4px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--blue)); animation: vrun 1.4s linear infinite; }
.vdot.d2 { animation-delay: .45s; }
.vdot.d3 { animation-delay: .9s; }
@keyframes vrun { 0% { top: 0; opacity: 0; } 20%, 80% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; } }
.bar-anim { flex: 1; border-radius: 4px 4px 0 0; background: var(--blue); animation: grow 2.4s ease-in-out infinite alternate; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.heal { background: var(--green); animation: heal 4s ease-in-out infinite; }
@keyframes heal { 0%, 35% { background: var(--warning); } 55%, 100% { background: var(--green); } }

/* Footer: the same on every page; the headline changes per page. */
.site-footer { background: var(--ink); color: var(--paper); }
.footer-inner { padding-block: 64px 28px; display: flex; flex-direction: column; gap: 24px; }
.site-footer h2 { color: var(--paper); font-size: clamp(30px, 10vw, 40px); line-height: 1.05; letter-spacing: -.01em; overflow-wrap: break-word; }
.footer-intro { max-width: 620px; font-size: 17px; line-height: 1.55; color: var(--dark-text); }
.footer-buttons { display: flex; flex-direction: column; gap: 12px; }
.footer-links { display: flex; flex-direction: column; border-top: 1px solid var(--dark-line); font-family: var(--font-mono); }
.footer-links li { border-bottom: 1px solid var(--dark-line); }
.footer-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; color: var(--dark-link); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--white); }
.footer-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--dark-muted); }
.footer-meta a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dark-link); }
.footer-meta-end { display: flex; gap: 20px; }
.site-footer :focus-visible { outline-color: var(--dark-link); }
@media (min-width: 640px) {
  .footer-inner { padding-block: 88px 40px; gap: 28px; }
  .site-footer h2 { font-size: 56px; }
  .footer-buttons { flex-direction: row; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 0 28px; padding-top: 12px; }
  .footer-links li { border: 0; }
  .footer-links a { min-height: 44px; }
}
@media (min-width: 1024px) { .site-footer h2 { font-size: 68px; } }

/* Home: hero and pipeline illustration */
.hero { padding-block: 28px 48px; display: flex; flex-direction: column; gap: 36px; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-badge, .profile-link { display: inline-flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 12px; }
.status-badge { background: var(--white); border: 1.5px solid var(--ink); min-height: 36px; }
.profile-link { min-height: 44px; background: var(--tint); color: var(--blue); text-decoration: none; }
.profile-link:hover { color: var(--blue); text-decoration: underline; }
.wide-only { display: none; }
.narrow-only { display: inline; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.hero h1 { font-size: 42px; line-height: 1.02; letter-spacing: -.025em; }
.hero-intro { max-width: 620px; font-size: 18px; line-height: 1.5; color: var(--text); }
.hero .button-row { padding-top: 4px; }
.pipeline-figure { min-width: 0; padding: 18px; border: 2px solid var(--ink); border-radius: 20px; background: var(--white); box-shadow: 4px 4px 0 var(--ink); }
.pipeline-illustration { display: flex; flex-direction: column; gap: 6px; }
.pipeline-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.pipeline-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 10px; font-family: var(--font-mono); font-size: 12px; }
.source { display: flex; flex-direction: column; align-items: center; }
.source .vflow { height: 32px; }
.source-chip { padding: 6px 8px; border-radius: 8px; }
.source-app { background: var(--orange-tint); }
.source-devices { background: var(--green-tint); }
.source-db { background: var(--blue-tint); }
.flow-orange { --c: var(--orange-bright); }
.flow-green { --c: var(--green); }
.pipeline-platform, .pipeline-product { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pipeline-platform { background: var(--ink); color: var(--paper); }
.pipeline-heading, .product-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 700; font-size: 16px; }
.platform-health { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--dark-muted); }
.platform-health .status-dot { width: 7px; height: 7px; background: var(--green-bright); }
.pipeline-stages { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-mono); font-size: 12px; }
.pipeline-stages span { padding: 5px 8px; border-radius: 6px; background: var(--dark-panel); }
.pipeline-product { border: 2px solid var(--ink); }
.product-heading { flex-wrap: wrap; font-size: 15px; }
.product-customers { display: flex; gap: 4px; font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.product-customers span { padding: 3px 7px; border-radius: 999px; background: var(--tint); }
.product-customers span:first-child { background: var(--ink); color: var(--paper); }
.product-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.product-bars .bar-anim:nth-child(1) { height: 60%; }
.product-bars .bar-anim:nth-child(2) { height: 85%; animation-delay: .3s; }
.product-bars .bar-anim:nth-child(3) { height: 45%; animation-delay: .6s; }
.product-bars .bar-anim:nth-child(4) { height: 95%; animation-delay: .9s; }
.product-bars .bar-anim:nth-child(5) { height: 70%; animation-delay: 1.2s; }
.product-bars .bar-anim:nth-child(6) { height: 55%; animation-delay: 1.5s; }
.product-bars .bar-anim:nth-child(7) { height: 100%; animation-delay: 1.8s; background: var(--accent); }
.pipeline-figure figcaption { padding-top: 12px; font-size: 14px; color: var(--muted); }
@media (min-width: 640px) {
  .status-badge, .profile-link { padding: 8px 12px; gap: 8px; }
  .wide-only { display: inline; }
  .narrow-only { display: none; }
  .hero { padding-block: 48px 64px; gap: 40px; }
  .hero h1 { font-size: 60px; }
  .hero-intro { font-size: 20px; }
  .pipeline-figure { padding: 24px; box-shadow: 6px 6px 0 var(--ink); }
  .product-bars { height: 64px; }
  .source .vflow { height: 40px; }
}
@media (min-width: 1024px) {
  .hero { flex-direction: row; align-items: center; gap: 56px; padding-block: 64px 88px; }
  .hero-copy { flex: 1.25 1 0; gap: 24px; }
  .pipeline-figure { flex: 1 1 0; }
  .hero h1 { font-size: 76px; }
}

/* Home: services. Phone: a rail you swipe; tablet 2 columns; desktop 3. */
.section-head { display: flex; flex-direction: column; gap: 6px; }
.swipe-hint { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.swipe-hint .icon { width: 16px; height: 16px; }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 2px var(--gutter) 14px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: 0 0 80%; max-width: 300px; scroll-snap-align: start; display: flex; }
.service-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.service-card h3 { font-size: 20px; }
.service-card p { font-size: 15px; line-height: 1.55; color: var(--text); }
.service-icon { display: flex; align-items: center; height: 28px; }
.service-icon svg { width: 28px; height: 28px; stroke: var(--ink); }
.service-icon .flow { max-width: 120px; }
.reliability-blocks { display: flex; align-items: center; gap: 4px; width: 100%; max-width: 140px; }
.reliability-blocks span { flex: 1; height: 18px; border-radius: 3px; background: var(--green); }
.service-contact { font-size: 16px; color: var(--text); }
.service-contact a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
@media (min-width: 640px) {
  .swipe-hint { display: none; }
  .rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: visible; margin: 0; padding: 0; }
  .rail > li { max-width: none; }
  .service-card { padding: 24px; }
  .service-card h3 { font-size: 22px; }
}
@media (min-width: 1024px) { .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-card { transition: transform .2s ease; }
  .service-card:hover { transform: translateY(-3px); }
}

/* Home: live demo teaser. Hidden until the API answers; paused mutes the numbers. */
.live-teaser { padding-top: var(--sec); }
.live-card { padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.live-intro { flex: 3 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.live-intro h2 { font-size: 28px; line-height: 1.1; }
.live-intro p { color: var(--text); }
.live-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.live-kicker { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.live-state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #DCF3E2; color: #14532D; }
.live-data { flex: 4 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.live-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.live-tiles div { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--soft); border-radius: 12px; background: var(--paper); }
.live-tiles dt { font-size: 12px; color: var(--muted); }
.live-tiles dd { font-family: var(--font-heading); font-weight: 800; font-size: 20px; line-height: 1.1; }
.live-note { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.live-go { flex: none; }
.live-go .icon { width: 18px; height: 18px; }
.live-teaser.is-paused .live-state { background: #FEF3C7; color: #78350F; }
.live-teaser.is-paused .status-dot { background: var(--warning); }
.live-teaser.is-paused .live-tiles div { border-style: dashed; border-color: var(--line); background: #FAFBFD; }
.live-teaser.is-paused .live-tiles dd { color: var(--muted); }
.live-teaser.is-paused .live-note { color: #78350F; }
/* The narrowest phones: five-digit counts still fit a third of the card. */
@media (max-width: 359px) { .live-tiles { gap: 6px; } .live-tiles div { padding: 8px; } .live-tiles dd { font-size: 17px; } }
@media (min-width: 640px) { .live-card { padding: 24px; gap: 24px; } .live-tiles { gap: 10px; } .live-tiles div { padding: 12px; } .live-tiles dd { font-size: 24px; } .live-intro h2 { font-size: 34px; } }

/* Home: results. 2 by 2 on a phone; each one opens its case study. */
.results { padding-bottom: 8px; }
.results h2 { font-size: 28px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--white); color: var(--ink); text-decoration: none; }
.result-card:hover { color: var(--ink); background: var(--tint); }
.result-context { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: break-word; }
/* Only the narrowest phones need "infrastructure" hyphenated to fit. */
@media (max-width: 359px) { .result-context { hyphens: auto; } }
/* Scales with the screen so "<500ms" fits a 320 px phone's half-width card. */
.result-number { font-family: var(--font-heading); font-weight: 800; font-size: clamp(22px, 7.8vw, 34px); line-height: 1; letter-spacing: -.02em; padding-top: 4px; }
.result-label { font-size: 14px; line-height: 1.4; color: var(--text); }
.result-go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--blue); }
.result-go .icon { width: 14px; height: 14px; }
@media (min-width: 640px) { .results h2 { font-size: 36px; } .result-card { padding: 20px; gap: 8px; } .result-number { font-size: 44px; } .result-label { font-size: 16px; } .result-go { font-size: 13px; } }
@media (min-width: 1024px) { .results h2 { font-size: 40px; } .result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .result-card { min-height: 252px; padding: 24px; } .result-number { font-size: clamp(34px, 3.5vw, 48px); } }

/* Home: case studies. Collapsed: the result. Open: context, role, challenge, approach, stack. */
.cases { display: grid; gap: 12px; align-items: start; }
.case-study { scroll-margin-top: calc(var(--bar-h) + 16px); padding: 20px 20px 0; border: 2px solid var(--ink); border-radius: 18px; background: var(--white); display: flex; flex-direction: column; gap: 12px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-mono); font-size: 12px; }
.case-tags span { padding: 5px 10px; border-radius: 999px; }
.case-theme { background: var(--tint); color: var(--blue); }
.case-sector { border: 1px solid var(--line); color: var(--muted); }
.case-study h3 { font-size: 20px; line-height: 1.2; }
.case-study p { font-size: 15px; line-height: 1.55; color: var(--text); }
.case-study strong { color: var(--ink); }
.case-details { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.case-tech { font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--muted) !important; }
.case-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: calc(100% + 40px); margin: 2px -20px 0; min-height: 52px; padding: 0 20px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; background: transparent; color: var(--blue); font-family: var(--font-mono); font-size: 13px; text-align: left; }
.case-toggle:hover { background: var(--tint); }
.case-toggle .icon { width: 20px; height: 20px; }
@media (min-width: 640px) {
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .case-study { padding: 24px 24px 0; }
  .case-study h3 { font-size: 22px; }
  .case-toggle { width: calc(100% + 48px); margin: 4px -24px 0; padding: 0 24px; }
}
@media (min-width: 1024px) { .case-study h3 { font-size: 24px; } }

/* Home: approach. Phone: a numbered timeline. Tablet: 3 columns. Desktop: 6, with the
   moving packet above. */
.approach .section-intro p { font-size: 16px; }
.track { display: none; position: relative; height: 2px; background: var(--track); }
.packet { position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 3px; background: var(--blue); animation: pk 6s linear infinite; }
@keyframes pk { from { left: 0; } to { left: calc(100% - 12px); } }
.steps { display: flex; flex-direction: column; }
.approach-step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; padding-bottom: 20px; }
.approach-step:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--track); }
.step-number { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--tint); font-family: var(--font-mono); font-size: 12px; color: var(--blue); }
.approach-step h3 { font-size: 18px; padding-top: 6px; }
.approach-step p { font-size: 15px; line-height: 1.5; color: var(--text); padding-top: 4px; }
.foundation { background: var(--ink); color: var(--paper); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.foundation-heading { font-family: var(--font-mono); font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--dark-muted); }
.foundation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* The smallest phones: one column, so "Infrastructure" isn't squeezed. */
@media (max-width: 359px) { .foundation-grid { grid-template-columns: minmax(0, 1fr); } }
.foundation-card { padding: 14px; border: 1px solid var(--dark-line); border-radius: 12px; background: var(--dark-panel); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.foundation-card h4 { color: var(--paper); font-size: clamp(15px, 4.2vw, 16px); }
.foundation-card p { color: var(--dark-text); font-size: 14px; line-height: 1.45; }
.governance { font-size: 15px; color: var(--text); }
@media (min-width: 640px) {
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .approach-step { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--tint); border: 2px solid var(--ink); border-radius: 14px; }
  .approach-step::before { display: none; }
  .step-number { width: auto; height: auto; border: 0; background: none; display: block; }
  .approach-step h3, .approach-step p { padding: 0; }
  .approach-step p { font-size: 14px; }
  .foundation { padding: 24px; gap: 16px; }
  .approach .section-intro p { font-size: 18px; }
}
@media (min-width: 1024px) {
  .track { display: block; }
  .steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .foundation-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .foundation-card { padding: 16px; }
  .foundation-card h4 { font-size: 17px; }
}

/* Home: experience. Fully open on every size: it's what recruiters read. */
.experience { gap: 36px; }
.experience-group { display: flex; flex-direction: column; }
.experience-heading { padding-bottom: 10px; border-bottom: 3px solid var(--ink); font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.5; }
.consulting .experience-heading { border-color: var(--blue); }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.experience-date { display: flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.row h4 { font-size: 19px; }
.experience-role { font-size: 15px; color: var(--muted); }
.consulting .experience-role { color: var(--blue); }
.rowdesc { font-size: 15px; line-height: 1.55; color: var(--text); padding-top: 4px; }
@media (min-width: 640px) {
  .row { grid-template-columns: 140px minmax(0, 1fr); column-gap: 24px; row-gap: 6px; align-items: baseline; padding-block: 20px; }
  .rowdesc { grid-column: 2; padding: 0; }
  .experience-date { font-size: 13px; }
}
@media (min-width: 1024px) { .row { grid-template-columns: 150px 220px minmax(0, 1fr); } .rowdesc { grid-column: auto; } }

/* Home: skills. A phone shows Core and folds the rest behind one button. */
.skills { border-bottom: 0; }
.skill-list { border-top: 3px solid var(--ink); }
.skillrow { display: flex; flex-direction: column; gap: 6px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.skillrow h3 { display: flex; gap: 10px; align-items: center; font-size: 17px; }
.skillrow p { font-size: 15px; line-height: 1.6; color: var(--text); }
.skill-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.skill-dot-accent { background: var(--accent); }
.skill-dot-ink { background: var(--ink); }
.skill-dot-blue { background: var(--blue); }
.skill-dot-purple { background: var(--purple); }
.skill-dot-cyan { background: var(--cyan); }
.skill-dot-green { background: var(--green); }
.skill-dot-amber { background: var(--amber); }
.skill-dot-pink { background: var(--pink); }
.skills-more.is-folded { display: none; }
.skills-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 700; font-size: 16px; }
.skills-toggle .icon { width: 20px; height: 20px; }
.certifications { font-size: 14px; color: var(--muted); }
.certifications a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); }
@media (min-width: 640px) {
  .skills-more.is-folded { display: block; }
  .skills-toggle { display: none; }
  .skillrow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: baseline; padding-block: 18px; }
  .skillrow h3 { font-size: 18px; }
  .skillrow p { font-size: 16px; }
}
@media (min-width: 1024px) { .skillrow { grid-template-columns: 260px minmax(0, 1fr); } }

/* Home: phone-only dock. It shows once the hero has scrolled away (it sits at the end of
   the content after the hero) and leaves when the contact footer arrives. CSS only. */
.dock { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgb(14 34 56 / 97%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.dock .btn { flex: 1 1 0; min-height: 48px; font-size: 16px; padding: 10px 12px; }
@media (min-width: 640px) { .dock { display: none; } }

/* Analytics choice bar (analytics.js). Sits over the phone dock until answered. */
.consent { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--dark-text); border-top: 1px solid var(--dark-line); font-size: 15px; line-height: 1.45; }
.consent p { margin: 0; max-width: 620px; padding-right: 40px; }
.consent-buttons { display: flex; gap: 10px; }
.consent-buttons .btn { flex: 1 1 0; }
.consent :focus-visible { outline-color: var(--dark-link); }
.consent a { color: var(--dark-link); }
.consent-later { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--dark-muted); cursor: pointer; }
.consent-later:hover { color: var(--white); }
@media (min-width: 640px) {
  .consent { left: auto; right: var(--gutter); bottom: var(--gutter); max-width: 440px; padding: 18px 20px; border: 1px solid var(--dark-line); border-radius: 16px; box-shadow: 0 12px 32px rgb(14 34 56 / 25%); }
  .consent-buttons .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .skip-link, .site-header, .dock, .consent, .case-toggle, .skills-toggle, .sheet { display: none !important; }
  .case-details[hidden], .skills-more { display: flex !important; }
  .case-study, .result-card, .service-card, .row { break-inside: avoid; }
  .card, .pipeline-figure { box-shadow: none; }
}
