/* BioVault design system (v2, Glacier theme) for the site.
   Loaded on every page last, after site.css and the page stylesheets. site.css already sets the color tokens
   (--bg --surface --raised --ink --ink-muted --accent --accent-hover --on-accent --accent-soft --secondary
   --line --deep --on-deep --on-deep-muted) on html:root. This file adds the type scale, spacing and radius
   tokens from tokens.json, the component styles from the design system's components/bundle.css (adapted to
   this site's header and footer hosts), and the small overrides that bring the older v2 pages onto the system.
   Light only. No gradients, no shadows on content, no boxed tiles, nothing fades in. */

/* ---------- Tokens: type, spacing, radius ---------- */
html:root {
  --font-display: "Google Sans", "Google Sans Flex", system-ui, -apple-system, sans-serif;
  --font-body: "Google Sans", "Google Sans Flex", system-ui, -apple-system, sans-serif;
  --font-mono: "Google Sans Code", ui-monospace, "SF Mono", monospace;

  --type-hero-size: 64px;  --type-hero-size-phone: 38px; --type-hero-lh: 1.04; --type-hero-ls: -0.035em;
  --type-h2-size: 44px;    --type-h2-size-phone: 30px;   --type-h2-lh: 1.1;    --type-h2-ls: -0.03em;
  --type-h3-size: 24px;    --type-h3-lh: 1.2;            --type-h3-ls: -0.02em;
  --type-stat-size: 72px;  --type-stat-size-phone: 44px; --type-stat-lh: 1;    --type-stat-ls: -0.045em;
  --type-lead-size: 21px;  --type-lead-lh: 1.5;
  --type-body-size: 17px;  --type-body-lh: 1.6;
  --type-small-size: 14px; --type-small-lh: 1.5;
  --type-label-size: 13px; --type-label-lh: 1.4;         --type-label-ls: 0.06em;
  --type-step-size: 14px;  --type-step-lh: 1.4;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 48px;
  --space-5: 96px;
  --space-6: 144px;
  --content-max: 1160px;
  --header-h: 64px;
  --gutter-ds: var(--space-3);      /* desktop side gutter; space-2 on phones */

  /* Rhythm: one set of gaps for every page. Each one is fluid between its phone value (375px) and its desktop
     value (1280px and up), so a tablet sits in between instead of jumping at a breakpoint. */
  --section-gap: clamp(112px, 5.304vw + 92.11px, 160px);       /* section to section: 112 phone, 160 desktop */
  --hero-top: clamp(64px, 6.188vw + 40.8px, 120px);           /* header to the first line of a page: 64 to 120 */
  --hero-bottom: clamp(56px, 7.072vw + 29.48px, 120px);        /* a page title to the content it introduces: 56 to 120 */
  --space-intro: clamp(40px, 2.652vw + 30.06px, 64px);          /* a section's intro to its content: 40 to 64 */
  --band-pad: clamp(72px, 5.304vw + 52.11px, 120px);            /* inside the deep band: 72 to 120 */
  --card-pad-lg: clamp(var(--space-3), 1.768vw + 17.37px, 40px); /* inside a large card: 24 to 40 */
  --card-pad: clamp(var(--space-3), 0.884vw + 20.69px, 32px);  /* inside a medium or small card: 24 to 32 */
  --grid-gap: clamp(var(--space-2), 0.884vw + 12.69px, var(--space-3)); /* between cards in a grid: 16 to 24 */
  --lead-max: 56ch;
  --body-max: 64ch;

  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;
}
@media (max-width: 640px) {
  html:root { --gutter-ds: var(--space-2); }
}

/* The content column */
.bv-wrap { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gutter-ds); }

/* ---------- Type scale ----------
   Fluid between the phone and desktop values in tokens.json. The design-system markup uses bare class names
   (.h2, .lead, .stat ...) inside its components; .t-* are the same styles for use anywhere. */
.t-hero {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(var(--type-hero-size-phone), 3.6vw + 18px, var(--type-hero-size));
  line-height: var(--type-hero-lh); letter-spacing: var(--type-hero-ls);
  text-wrap: balance;
}
.t-h2, .bv-intro .h2, .bv-deep .h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(var(--type-h2-size-phone), 2.2vw + 16px, var(--type-h2-size));
  line-height: var(--type-h2-lh); letter-spacing: var(--type-h2-ls);
  text-wrap: balance;
}
.t-h3, .bv-step .h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--type-h3-size); line-height: var(--type-h3-lh); letter-spacing: var(--type-h3-ls);
}
.t-stat, .bv-stat .stat {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(var(--type-stat-size-phone), 4vw + 20px, var(--type-stat-size));
  line-height: var(--type-stat-lh); letter-spacing: var(--type-stat-ls);
  font-variant-numeric: tabular-nums;
}
.t-lead, .bv-intro .lead, .bv-deep .lead {
  font-family: var(--font-body); font-weight: 400;
  font-size: clamp(19px, 0.5vw + 15px, var(--type-lead-size)); line-height: var(--type-lead-lh);
  text-wrap: pretty;
}
.t-body, .bv-stat .body, .bv-step .body {
  font-family: var(--font-body); font-weight: 400;
  font-size: var(--type-body-size); line-height: var(--type-body-lh);
}
.t-small, .bv-stat .small, .bv-footer .small, .bv-panel__caption {
  font-family: var(--font-body); font-weight: 400;
  font-size: var(--type-small-size); line-height: var(--type-small-lh);
}
.t-label, .bv-intro .label {
  font-family: var(--font-body); font-weight: 500;
  font-size: var(--type-label-size); line-height: var(--type-label-lh); letter-spacing: var(--type-label-ls);
  text-transform: uppercase; color: var(--ink-muted);
}
.t-step, .bv-step .step {
  font-family: var(--font-mono); font-weight: 500;
  font-size: var(--type-step-size); line-height: var(--type-step-lh);
}

/* ---------- Focus ---------- */
.bv-focusable:focus-visible,
.bv-btn:focus-visible,
.bv-link:focus-visible,
.bv-nav a:focus-visible,
.bv-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.bv-deep .bv-btn:focus-visible,
.bv-deep .bv-link:focus-visible,
.bv-deep a:focus-visible,
.bv-deep button:focus-visible {
  outline-color: var(--on-deep);
}

/* ---------- Logo ---------- */
.bv-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-display);
  font-size: var(--bv-logo-size, 28px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
a.bv-logo:hover { color: var(--ink); text-decoration: none; }
.bv-logo__mark { width: 1.4em; height: 1.4em; flex: none; }
.bv-logo__mark .drop { fill: var(--accent); }
.bv-logo__mark .flake { stroke: var(--on-accent); stroke-width: 3.5; stroke-linecap: round; fill: none; }
.bv-logo__mark--small .flake { stroke-width: 5.5; }
.bv-logo__vault { color: var(--accent); }
.bv-logo__tm {
  margin-left: 2px;
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-muted);
  vertical-align: top;
}
.bv-logo--reversed { color: var(--on-deep); }
.bv-logo--reversed .bv-logo__mark .drop { fill: var(--on-deep); }
.bv-logo--reversed .bv-logo__mark .flake { stroke: var(--deep); }
.bv-logo--reversed .bv-logo__vault { color: var(--accent-soft); }
.bv-logo--reversed .bv-logo__tm { color: var(--on-deep-muted); }
/* header and footer: mark at 22 x 1.4 = about 31px, so the small mark (under 32px) */
.bv-logo--header, .bv-logo--footer { --bv-logo-size: 22px; min-height: 44px; }

/* ---------- Button and link ---------- */
.bv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s;
}
.bv-btn:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.bv-btn--on-deep { background: var(--on-deep); color: var(--deep); }
.bv-btn--on-deep:hover { background: var(--accent-soft); color: var(--deep); }
.bv-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.bv-link:hover { color: var(--accent-hover); text-decoration-thickness: 1px; }
button.bv-link { appearance: none; background: none; border: 0; padding: 0; font-family: inherit; font-size: inherit; cursor: pointer; }
.bv-deep .bv-link { color: var(--on-deep); }
.bv-deep .bv-link:hover { color: var(--accent-soft); }

/* ---------- Header (in #site-header, built by js/site.js) ---------- */
#site-header,
#site-header.is-scrolled,
#site-header.is-menu-open {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: border-color 0.2s;
}
#site-header.is-scrolled,
#site-header.is-menu-open { border-bottom-color: var(--line); }

.bv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  min-height: var(--header-h);
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter-ds);
  font-family: var(--font-body);
}
.bv-header__right { display: flex; align-items: center; gap: 16px; }
.bv-nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bv-nav li { margin: 0; }
.bv-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.bv-nav a:hover { color: var(--accent); text-decoration: none; }
.bv-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.bv-header__cta[aria-current="page"] { background: var(--accent-hover); }

/* phone menu toggle */
.bv-menu-btn {
  display: none;
  appearance: none;
  width: 44px; height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s;
}
.bv-menu-btn:hover { border-color: var(--accent); }
.bv-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bv-menu-btn__bars, .bv-menu-btn__bars::before, .bv-menu-btn__bars::after {
  display: block; width: 18px; height: 1.5px; border-radius: 1px; background: currentColor;
  transition: transform 0.2s, background-color 0.2s;
}
.bv-menu-btn__bars { position: relative; }
.bv-menu-btn__bars::before, .bv-menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.bv-menu-btn__bars::before { top: -6px; }
.bv-menu-btn__bars::after { top: 6px; }
.bv-menu-btn[aria-expanded="true"] .bv-menu-btn__bars { background: transparent; }
.bv-menu-btn[aria-expanded="true"] .bv-menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
.bv-menu-btn[aria-expanded="true"] .bv-menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 959px) {
  .bv-menu-btn { display: inline-grid; }
  /* the open menu is the one thing that floats over the page */
  .bv-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px var(--gutter-ds) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  #site-header.is-menu-open .bv-menu { display: flex; }
  .bv-menu .bv-nav { flex-direction: column; align-items: stretch; gap: 2px; }
  .bv-menu .bv-nav a { display: flex; font-size: 17px; }
  .bv-menu .bv-header__cta { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .bv-menu-btn__bars, .bv-menu-btn__bars::before, .bv-menu-btn__bars::after { transition: none; }
}

/* ---------- Section intro ---------- */
.bv-intro { display: flex; flex-direction: column; gap: 16px; max-width: 720px; font-family: var(--font-body); }
.bv-intro .label { margin: 0; color: var(--ink-muted); text-transform: uppercase; }
.bv-intro .h2 { margin: 0; max-width: 22ch; color: var(--ink); }
.bv-intro .lead { margin: 0; max-width: 56ch; color: var(--ink-muted); }

/* ---------- Stats ---------- */
.bv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--space-4) var(--space-3);
  font-family: var(--font-body);
}
.bv-stat { display: flex; flex-direction: column; gap: 8px; }
.bv-stat .stat { display: block; margin: 0; color: var(--accent); }
.bv-stat .body { margin: 0; max-width: 32ch; color: var(--ink); }
.bv-stat .small { margin: 0; color: var(--ink-muted); }

/* ---------- Steps ---------- */
.bv-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-4) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
}
.bv-step { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
/* site.css has an older .step rule; the design-system step number is plain text */
.bv-step .step { position: static; display: block; padding: 0; text-align: left; color: var(--ink-muted); }
.bv-step .h3 { margin: 0; color: var(--ink); }
.bv-step .body { margin: 0; max-width: 40ch; color: var(--ink); }

/* ---------- Diagram panel and logo spot ---------- */
.bv-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.bv-panel img, .bv-panel svg { display: block; width: 100%; max-width: 640px; height: auto; }
.bv-panel__caption { margin: 16px 0 0; color: var(--ink-muted); }
.bv-logo-spot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}
@media (max-width: 640px) {
  .bv-panel { padding: var(--space-3); }
}

/* ---------- Researcher strip ---------- */
.bv-strip { overflow: hidden; font-family: var(--font-display); }
.bv-strip__track { display: flex; align-items: center; width: max-content; animation: bv-marquee 60s linear infinite; }
.bv-strip:hover .bv-strip__track,
.bv-strip:focus-within .bv-strip__track { animation-play-state: paused; }
.bv-strip__item { flex: none; color: var(--ink-muted); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
@keyframes bv-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .bv-strip__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: 24px 48px; }
  .bv-strip__track [aria-hidden="true"] { display: none !important; }
}

/* ---------- Deep band: the one dark closing band ---------- */
.bv-deep {
  padding: var(--band-pad) 0;
  background: var(--deep);
  color: var(--on-deep);
  font-family: var(--font-body);
}
.bv-deep__in {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.bv-deep .h2, .bv-deep h2 { margin: 0; max-width: 22ch; color: var(--on-deep); }
.bv-deep .lead, .bv-deep .v2-sub { margin: 0; max-width: 56ch; color: var(--on-deep-muted); text-align: left; }
.bv-deep .label { margin: 0; color: var(--on-deep-muted); }
.bv-deep__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: var(--space-2); }
.bv-deep__actions .bv-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Footer (in #site-footer, built by js/site.js) ---------- */
#site-footer {
  padding: 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: inherit;
}
.bv-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: clamp(var(--space-4), 1.768vw + 41.37px, 64px) var(--gutter-ds);
  font-family: var(--font-body);
}
.bv-footer__row { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.bv-footer__nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.bv-footer__nav li { margin: 0; }
.bv-footer__nav .bv-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.bv-footer .small { margin: 0; color: var(--ink-muted); }

/* =====================================================================
   The older v2 pages (How it works, Technology, Products, Team, Contact, Demo) pick up the system here
   without being restructured: their page titles take the hero style, section headlines h2, the line under a
   headline lead, eyebrows label; filled buttons are the design-system pill and secondary buttons and
   "Learn more" controls are design-system links.
   ===================================================================== */
body.v2 .v2-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(var(--type-hero-size-phone), 3.6vw + 18px, var(--type-hero-size));
  line-height: var(--type-hero-lh); letter-spacing: var(--type-hero-ls);
}
body.v2 .v2-head h2,
body.v2 .v2-head h2.v2-h--long,
body.v2 .bv-deep h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(var(--type-h2-size-phone), 2.2vw + 16px, var(--type-h2-size));
  line-height: var(--type-h2-lh); letter-spacing: var(--type-h2-ls);
}
body.v2 .v2-sub {
  font-size: clamp(19px, 0.5vw + 15px, var(--type-lead-size));
  line-height: var(--type-lead-lh);
  color: var(--ink-muted);
}
body.v2 .v2-eyebrow {
  font-size: var(--type-label-size); line-height: var(--type-label-lh); font-weight: 500;
  letter-spacing: var(--type-label-ls); text-transform: uppercase; color: var(--ink-muted);
}

/* filled buttons: the design-system pill */
body.v2 .v2-btn {
  min-height: 44px; padding: 0 24px;
  border: 0; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1;
  opacity: 1; transition: background-color 0.15s;
}
body.v2 .v2-btn:hover { opacity: 1; background: var(--accent-hover); color: var(--on-accent); }
/* a second button beside the primary one reads as a link (one filled button per view) */
body.v2 .v2-btn.v2-btn--ghost,
body.v2 .v2-btn.v2-btn--ghost:hover {
  min-height: 44px; padding: 0 4px;
  background: transparent; border: 0;
  color: var(--accent); font-size: 16px; font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color 0.15s;
}
body.v2 .v2-btn.v2-btn--ghost:hover { color: var(--accent-hover); }

/* text links and "Learn more +" controls: the design-system link */
body.v2 .v2-link,
body.v2 .v2-learn {
  color: var(--accent); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color 0.15s;
}
body.v2 .v2-link:hover,
body.v2 .v2-learn:hover { color: var(--accent-hover); text-decoration-thickness: 1px; }
body.v2 .v2-link:focus-visible,
body.v2 .v2-learn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* "Learn more +": a soft accent pill with the plus in a filled circle, so it reads as one control that opens a sheet.
   No underline; focus keeps the ring. Its hover is the one hover effect on the site (Krish asked for it, Nov 1):
   the pill deepens a shade and the plus turns a quarter, only where hovering exists and motion is welcome. */
body.v2 .v2-learn.v2-learn--pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; margin-top: 14px; padding: 0 7px 0 18px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: 0;
  text-decoration: none; white-space: nowrap;
}
body.v2 .v2-learn.v2-learn--pill:hover { color: var(--accent); text-decoration: none; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.v2 .v2-learn.v2-learn--pill { transition: background-color .2s ease, box-shadow .2s ease; }
  body.v2 .v2-learn--pill .v2-learn__plus { transition: transform .3s cubic-bezier(.2, .7, .2, 1), background-color .2s ease; }
  body.v2 .v2-learn.v2-learn--pill:hover { background: color-mix(in srgb, var(--accent) 16%, var(--accent-soft)); box-shadow: 0 2px 10px -4px color-mix(in srgb, var(--accent) 45%, transparent); }
  body.v2 .v2-learn.v2-learn--pill:hover .v2-learn__plus { transform: rotate(90deg); background: var(--accent-hover, var(--accent)); }
  body.v2 .v2-learn.v2-learn--pill:active .v2-learn__plus { transform: rotate(90deg) scale(.92); }
  /* the link version (an arrow, opens another page) slides its arrow forward instead of turning */
  body.v2 .v2-learn.v2-learn--link:hover .v2-learn__plus { transform: translateX(3px); }
  body.v2 .v2-learn.v2-learn--link:active .v2-learn__plus { transform: translateX(3px) scale(.92); }
}
body.v2 .v2-learn.v2-learn--pill:focus-visible { outline-offset: 3px; border-radius: 999px; }
body.v2 .v2-learn--pill .v2-learn__plus {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent, #fff); font-size: 0; transform: none;
}
body.v2 .v2-learn--pill .v2-learn__plus svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* in a sentence that ends with its own "Learn more +", it stays an inline link */
body.v2 .v2-inline .v2-learn.v2-learn--pill { min-height: 0; margin-top: 0; padding: 0 2px; background: none; border-radius: 0; font-size: inherit; display: inline; }
body.v2 .v2-inline .v2-learn--pill .v2-learn__plus { display: none; }

/* the demo's filled controls darken instead of fading */
body.v2 .sim-wrap .btn:not(.btn--ghost):not(.sim-btn--quiet):hover { opacity: 1; background: var(--accent-hover); border-color: var(--accent-hover); }

/* the closing band on the older pages: left-aligned like the design system, actions in one row */
body.v2 .bv-deep { text-align: left; }
body.v2 .bv-deep .v2-actions { justify-content: flex-start; margin: var(--space-2) 0 0; }

/* =====================================================================
   Rhythm: one spacing system for every page, from the tokens at the top of this file.
   - Sections carry only a top padding (--section-gap), so two sections never add their paddings together.
     The deep band keeps the same gap above it and --band-pad inside it.
   - A page starts --hero-top below the header. A section that follows the hero without a heading of its own
     (the products, the founders, the demo) is the hero's content, so it sits --hero-bottom below it.
   - A section intro: label, then 16 to the headline, 24 to the lead, --space-intro to the content.
   - Cards: --card-pad-lg for the large ones, --card-pad for the rest, --grid-gap between them.
   - One content column (1160 max) and one side gutter (24, 16 on phones) on every page.
   ===================================================================== */
body.v2 { --v2-gutter: var(--gutter-ds); --v2-gap: var(--grid-gap); }

/* sections */
body.v2 .v2-hero { padding-top: var(--hero-top); padding-bottom: 0; }
body.v2 .v2-sec,
body.v2 .v2-sec--compact { padding-top: var(--section-gap); padding-bottom: 0; }
body.v2 .v2-hero + .v2-sec:not(:has(> .v2-wrap > .v2-head)) { padding-top: var(--hero-bottom); }
body.v2 .v2-page > .bv-deep:not(:first-child) { margin-top: var(--section-gap); }

/* section intros (the older v2 heads and the hero) */
body.v2 .v2-head { margin-bottom: var(--space-intro); }
body.v2 .v2-hero .v2-eyebrow,
body.v2 .v2-head .v2-eyebrow { margin: 0 0 var(--space-2); }
body.v2 .v2-head .v2-sub { margin-top: var(--space-3); max-width: 52ch; }
body.v2 .v2-hero .v2-sub { margin-top: var(--space-3); max-width: 52ch; }
body.v2 .v2-head .v2-links,
body.v2 .v2-hero .v2-links { margin-top: var(--space-1); }
.bv-intro .lead, .bv-deep .lead, .bv-deep .v2-sub { max-width: var(--lead-max); }
/* headline to lead is 24 in every intro (the flex gap is 16, the label keeps 16 to the headline) */
.bv-intro .h2 + .lead, .bv-deep :is(.h2, h1, h2) + :is(.lead, .v2-sub) { margin-top: var(--space-1); }
/* body copy breathes at the body line height */
body.v2 .v2-tile__line { line-height: var(--type-body-lh); }

/* the closing deep band: a lone button sits a step below the lead, like a row of actions */
.bv-deep__in > .bv-btn { margin-top: var(--space-2); }

/* the collapsed Sources line between the deep band and the footer: same column and gutter as the page,
   its own breathing room, and no second hairline right under the band */
body.v2 main > .section--sources { padding-block: var(--space-2); }
body.v2 main > .section--sources > .container { max-width: var(--content-max); padding-inline: var(--gutter-ds); }
body.v2 main > .v2-page:has(> .bv-deep:last-child) + .section--sources .deeper { border-top: 0; }

/* the old "Illustration" caption under drawings reads as unfinished; hidden everywhere */
.visual__label { display: none !important; }

/* Sources, folded into the closing dark band under its button (js/site.js injectSources) */
.bv-deep__sources { align-self: stretch; margin-top: var(--space-3, 48px); max-width: var(--content-max, 72ch); }
.bv-deep__sources .deeper { margin: 0; max-width: none; border-top: 1px solid rgba(232, 243, 250, .16); }
.bv-deep__sources .deeper > summary { min-height: 44px; padding: 10px 0; font-size: .875rem; font-weight: 500; color: var(--on-deep-muted); justify-content: flex-start; }
.bv-deep__sources .deeper > summary:hover { color: var(--on-deep-muted); }
.bv-deep__sources .deeper > summary:focus-visible { outline-color: var(--on-deep); }
.bv-deep__sources .deeper__body { padding: 4px 0 0; color: var(--on-deep-muted); }
.bv-deep__sources ol { max-width: 80ch; font-size: .8125rem; }
.bv-deep__sources li { line-height: 1.5; }
.bv-deep__sources a { color: var(--on-deep); }
.v2-how .bv-deep__sources { display: none; }
/* Footer easter egg (js/site.js buildFooter, eggBurst): a tiny, faint "psst" chip with a snowflake after the footer line,
   easy to miss on purpose. The snowflake twinkles every few seconds; on hover the chip turns light blue and the snowflake
   spins; clicking bursts it into tiny snowflakes and opens the 404 page's game. */
.bv-egg { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; margin-left: 6px; padding: 1px 7px 1px 5px; vertical-align: middle; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--gray-2, #b0c6d6); font-size: 10.5px; font-weight: 500; letter-spacing: .02em; text-decoration: none; }
.bv-egg svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bv-egg svg circle, .bv-egg-bit svg circle { fill: currentColor; stroke: none; }
.bv-egg:hover { color: var(--accent); text-decoration: none; box-shadow: none; }
.bv-egg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .bv-egg svg { animation: bv-twinkle 5s cubic-bezier(.3, .7, .2, 1) infinite; }
  .bv-egg { transition: background-color .2s ease, transform .2s ease; }
  @media (hover: hover) {
    .bv-egg:hover { background: var(--accent-soft); transform: translateY(-1px); }
    .bv-egg:hover svg { animation: bv-spin 1.2s linear infinite; }
  }
}
@keyframes bv-twinkle { 0%, 82% { transform: rotate(0deg) scale(1); } 90% { transform: rotate(60deg) scale(1.25); } 100% { transform: rotate(60deg) scale(1); } }
@keyframes bv-spin { to { transform: rotate(360deg); } }
.bv-egg-bit { position: fixed; z-index: 9999; width: 14px; height: 14px; color: var(--accent); pointer-events: none; }
.bv-egg-bit svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
