/* ==========================================================================
   BioRadius: site styles
   1. Design tokens (dark default, light opt-in)
   2. Base & typography
   3. Layout primitives
   4. Components
   5. Page-specific sections
   6. Motion
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  /* Shape of every cell graphic (DNA, lab scenes, markers, background grids):
     "dots" or "pixels". Preview either with ?cells=dots or ?cells=pixels in the URL. */
  --cell-shape: dots;

  --bg: #0b0b0c;
  --bg-alt: #101012;
  --surface: #141416;
  --surface-2: #1b1b1e;
  --ink: #f2f2f3;
  --ink-2: #c8c8cd;
  --muted: #8b8b93;
  --line: #232327;
  --line-strong: #34343a;

  --accent: #ff6a33;          /* brand orange for graphics */
  --accent-strong: #ff7a45;   /* accent for text and buttons (AA on this background) */
  --accent-hover: #ff9466;
  --accent-soft: rgba(255, 106, 51, 0.12);
  --on-accent: #0b0b0c;
  --ref: #f2f2f3;             /* chart reference line */
  --success: #3ddc97;
  --danger: #f87171;

  --dna-strand: #ececee;
  --dna-rung: #6f6f78;
  --dna-accent: #ff6a33;
  --grid-line: rgba(255, 255, 255, 0.035);
  --grid-dot: rgba(255, 255, 255, 0.09);

  --header-bg: rgba(11, 11, 12, 0.72);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 10vw, 120px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafaf9;
  --bg-alt: #f2f2f0;
  --surface: #ffffff;
  --surface-2: #ededea;
  --ink: #0e0e10;
  --ink-2: #3a3a40;
  --muted: #66666e;
  --line: #e3e3df;
  --line-strong: #cfcfca;

  --accent: #ff4d12;
  --accent-strong: #d23a08;
  --accent-hover: #b53106;
  --accent-soft: rgba(255, 77, 18, 0.09);
  --on-accent: #ffffff;
  --ref: #0e0e10;
  --success: #0c8a55;
  --danger: #dc2626;

  --dna-strand: #1a1a1d;
  --dna-rung: #a3a3aa;
  --dna-accent: #ff4d12;
  --grid-line: rgba(0, 0, 0, 0.045);
  --grid-dot: rgba(0, 0, 0, 0.11);

  --header-bg: rgba(250, 250, 249, 0.78);
  --shadow-md: 0 12px 32px -12px rgba(14, 14, 16, 0.16);
  --shadow-lg: 0 30px 60px -20px rgba(14, 14, 16, 0.22);

  color-scheme: light;
}

/* 2. Base & typography --------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 5.25rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 300; }
h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
sub { font-size: 0.7em; }
address { font-style: normal; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* 3. Layout primitives --------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head h2 { margin-bottom: 16px; }
.section-head--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 24px 64px;
  max-width: none;
}
.section-head--split h2 { margin-bottom: 0; }

.section-sub { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
}

@media (max-width: 760px) {
  .section-head--split { grid-template-columns: 1fr; }
}

/* 4. Components ---------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent-strong); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--ink);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn .icon { grid-area: 1 / 1; width: 19px; height: 19px; transition: opacity 0.25s, transform 0.4s var(--ease); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 500;
}
.link-arrow .icon { transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; fill: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { color: var(--ink); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.03em; }
.brand-tag {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header--overlay { margin-bottom: calc(var(--header-h) * -1); }
.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.3s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 62px; }

.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-list { display: flex; gap: 2px; }
.nav-list a {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 0.2s, background-color 0.2s;
}
.nav-list a:hover { color: var(--ink); }
.nav-list a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.nav-list a[aria-current="page"]::before {     /* the same orange square as the eyebrows */
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: 0.12em;
  background: var(--accent);
}

.header-actions { display: flex; gap: 8px; }
.nav-cta[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent-strong); }
.menu-toggle { display: none; }

/* Theme toggle: show the icon for the theme you'd switch to */
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: none; }

.menu-toggle .icon-close { opacity: 0; transform: rotate(-90deg); }
.menu-toggle[aria-expanded="true"] .icon-open { opacity: 0; transform: rotate(90deg); }
.menu-toggle[aria-expanded="true"] .icon-close { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .menu-toggle { display: grid; }
  .header-actions { margin-left: auto; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin: 0;
    padding: 12px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .site-header.is-scrolled .nav { top: 62px; }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav-list { flex-direction: column; }
  .nav-list a {
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 1.05rem;
  }
  .nav-list a[aria-current="page"] { background: none; box-shadow: none; color: var(--accent-strong); }
  .nav-cta { min-height: 52px; }
}

/* DNA canvas (drawn by js/main.js) */
.dna {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Cards */
.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card-grid .card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card h3 { margin: 22px 0 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--accent-strong);
}
.card-icon .icon { width: 20px; height: 20px; }

/* Cursor-follow highlight (position set from JS) */
.spotlight { isolation: isolate; }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.spotlight:hover::before { opacity: 1; }

/* Stats band */
.stats-band {
  padding-block: clamp(48px, 7vw, 80px);
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; border-left: 1px solid var(--line-strong); }
.stat-num {
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-num small { font-size: 0.55em; }
.stat-label { color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* CTA band */
.cta-section { padding-top: 0; }
.stats-band + .cta-section,
.section-alt + .cta-section { padding-top: var(--section-y); }
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 120% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 12px; }
.cta-band p { max-width: 520px; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer {
  position: relative;
  padding-top: clamp(56px, 8vw, 88px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(50% 80% at 100% 100%, var(--accent-soft), transparent 70%),
    var(--bg-alt);
  font-size: 0.93rem;
}
.site-footer::before {                  /* pixel-cell strip, fading out towards the edges */
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 11px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  opacity: 0.7;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { max-width: 300px; margin-top: 18px; color: var(--muted); }
.footer-brand address { margin-top: 18px; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.footer-brand address a:hover { color: var(--ink); }
.footer-title {
  margin-bottom: 16px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer ul { display: grid; gap: 10px; }
.site-footer nav a { color: var(--muted); transition: color 0.2s; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer nav a[aria-current="page"] { color: var(--ink); }
.site-footer nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: 0.12em;
  background: var(--accent);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-block: 24px;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - var(--gutter) * 2) 1px no-repeat;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-bottom .mono { font-size: 0.7rem; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* 5. Page-specific sections --------------------------------------------- */

/* Shared: faint 120px grid behind heroes */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: center center;
}

/* Home hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 40px) 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero::after {                          /* keeps the headline readable over the helix */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 50% 38% at 50% 52%, color-mix(in srgb, var(--bg) 92%, transparent) 30%, transparent 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero h1 { max-width: 15ch; margin: 0 auto 24px; font-size: clamp(2.6rem, 7vw, 5.75rem); }
.hero h1 em { font-style: normal; color: var(--accent-strong); }
.hero .lead { max-width: 520px; margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.eyebrow--center::before { display: none; }

.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.68rem;
}
@media (max-width: 600px) {
  .hero-foot { justify-content: center; }
  .hero-foot > span:not(.hero-scroll) { display: none; }
}
.hero-scroll { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-scroll::after {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--muted), transparent);
  animation: scroll-hint 2.2s var(--ease) infinite;
}
@keyframes scroll-hint {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Sub-page hero */
.page-hero {
  position: relative;
  padding-block: calc(var(--section-y) * 0.9) calc(var(--section-y) * 0.7);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::after {                     /* fades the helix out behind the text */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--bg) 20%, color-mix(in srgb, var(--bg) 40%, transparent) 55%, transparent);
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 2; }

.breadcrumb { margin-bottom: 22px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.breadcrumb li + li::before { content: "/"; margin: 0 12px; color: var(--line-strong); }
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current="page"] { color: var(--accent-strong); }
.breadcrumb [aria-current="page"]::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 10px;
  background: var(--accent);
}
.page-hero h1 { max-width: 16ch; margin-bottom: 20px; font-size: clamp(2.4rem, 5.5vw, 4.25rem); }
.page-hero .lead { max-width: 560px; }

@media (min-width: 701px) {
  .page-hero .dna {
    -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 70%);
    mask-image: linear-gradient(90deg, transparent 30%, #000 70%);
  }
}
@media (max-width: 700px) {
  .page-hero::after { background: color-mix(in srgb, var(--bg) 88%, transparent); }
}

/* Home lab strip: pixel-cell wet-lab scenes (drawn by js/main.js) */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.lab-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s;
}
.lab-card:hover { border-color: var(--line-strong); }
.lab-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.lab-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-card figcaption {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 18px 20px 22px;
}
.lab-step { color: var(--accent-strong); font-size: 0.68rem; }
.lab-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lab-readout::before {                  /* status light */
  content: "";
  width: 6px;
  height: 6px;
  background: var(--success);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.lab-title { grid-column: 1 / -1; color: var(--ink); font-weight: 500; line-height: 1.4; }

@keyframes blink {
  50% { opacity: 0.25; }
}

@media (max-width: 900px) {
  /* Swipeable row on small screens instead of a tall stack */
  .lab-grid {
    display: flex;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .lab-grid::-webkit-scrollbar { display: none; }
  .lab-card { flex: 0 0 min(78%, 340px); scroll-snap-align: start; }
}

/* Home service index: compact two-column list */
.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.service-row {
  display: grid;
  grid-template-columns: 20px minmax(150px, auto) 1fr 20px;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 20px 4px;
  border-top: 1px solid var(--line);
}
.service-row-icon { color: var(--accent-strong); }
.service-row-icon .icon { width: 20px; height: 20px; }
.service-row-title { color: var(--ink); font-weight: 500; letter-spacing: -0.01em; transition: color 0.2s; }
.service-row-text { color: var(--muted); font-size: 0.9rem; }
.service-row-arrow { color: var(--muted); transition: color 0.2s, transform 0.3s var(--ease); }
.service-row:hover .service-row-title,
.service-row:hover .service-row-arrow { color: var(--accent-strong); }
.service-row:hover .service-row-arrow { transform: translateX(4px); }

@media (max-width: 1100px) {
  .service-row { grid-template-columns: 20px 1fr 20px; row-gap: 2px; }
  .service-row-text { grid-column: 2; grid-row: 2; }
  .service-row-arrow { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 700px) {
  .service-list { grid-template-columns: 1fr; }
}

/* Services: tabs */
.tabs {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.tab-list { display: flex; flex-direction: column; gap: 4px; }
.tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); }
.tab[aria-selected="true"] .icon { color: var(--accent-strong); }

.tab-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  animation: panel-in 0.45s var(--ease);
}
.tab-panel[hidden] { display: none; }
.tab-panel h3 { margin-bottom: 16px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 300; letter-spacing: -0.03em; }
.tab-panel p { max-width: 560px; }
.panel-copy .link-arrow { margin-top: 28px; }
.panel-art {
  display: grid;
  place-items: center;
  width: clamp(120px, 14vw, 160px);
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
}
.panel-art .icon { width: 42%; height: 42%; stroke-width: 1.1; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
}

.checklist { display: grid; gap: 10px; margin-top: 22px; }
.checklist li { position: relative; padding-left: 26px; color: var(--ink-2); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

@media (max-width: 900px) {
  .tabs { grid-template-columns: 1fr; }
  .tab-list {
    flex-direction: row;
    gap: 8px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab {
    flex: none;
    width: auto;
    padding: 10px 16px;
    border-color: var(--line);
    border-radius: 999px;
    scroll-snap-align: start;
    white-space: nowrap;
  }
  .tab-panel { grid-template-columns: 1fr; }
  .panel-art { display: none; }
}

/* Services: science + chart */
.science-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.science-copy h2 { margin-bottom: 16px; }
.science-list { display: grid; gap: 22px; margin: 36px 0 0; }
.science-list dt { display: flex; align-items: baseline; gap: 12px; color: var(--ink); font-weight: 500; }
.science-list dt .mono { min-width: 64px; color: var(--accent-strong); font-size: 0.78rem; }
.science-list dd { margin: 6px 0 0 76px; color: var(--muted); font-size: 0.95rem; }

.chart-figure { margin: 0; }
.chart-card {
  position: relative;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.chart-title { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: 0.8rem; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ""; width: 16px; height: 2.5px; border-radius: 2px; }
.key-ref::before { background: var(--ref); }
.key-test::before { background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 8px); }

.pk-chart { width: 100%; height: auto; overflow: visible; }
.pk-chart .grid line { stroke: var(--line); stroke-width: 1; }
.pk-chart .auc { fill: var(--accent-soft); }
.pk-chart .curve { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pk-chart .curve-ref { stroke: var(--ref); }
.pk-chart .curve-test { stroke: var(--accent); stroke-dasharray: 7 5; }
.pk-chart .cmax line { stroke: var(--muted); stroke-dasharray: 3 4; }
.pk-chart .cmax circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.pk-chart text { fill: var(--muted); font-family: var(--font-sans); font-size: 12px; }
.pk-chart .cmax text { fill: var(--ink); font-weight: 600; }
.pk-chart .auc-label { fill: var(--accent-strong); font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; }

.ci-card {
  margin-top: 16px;
  padding: 16px 18px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.ci-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 0.85rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 500;
}
.badge .icon { width: 14px; height: 14px; stroke-width: 2.5; }

.ci-track { position: relative; height: 8px; margin-inline: 8px; border-radius: 99px; background: var(--line); }
.ci-zone { position: absolute; inset: 0; border-radius: inherit; background: var(--accent-soft); outline: 1px dashed var(--accent); outline-offset: 2px; }
.ci-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 32%;               /* ~94% on a log scale between 80 and 125 */
  width: 32%;              /* up to ~106% */
  border-radius: inherit;
  background: var(--accent-strong);
}
.ci-tick {
  position: absolute;
  top: 16px;
  left: var(--x);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  transform: translateX(-50%);
}
.chart-caption { margin-top: 12px; color: var(--muted); font-size: 0.8rem; text-align: center; }

@media (max-width: 980px) {
  .science-grid { grid-template-columns: 1fr; }
}

/* Services: process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.9s var(--ease) 0.2s;
}
.step.is-visible::before { width: 100%; }
.step-num { display: block; margin-bottom: 14px; color: var(--accent-strong); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.97rem; }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* About */
.story-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.story-copy { display: grid; gap: 20px; color: var(--muted); font-size: 1.08rem; }
.story-copy p:first-child { color: var(--ink-2); }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; }
}

/* Detail pages: prose + sticky fact card */
.prose-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.prose { display: grid; gap: 18px; max-width: 680px; font-size: 1.05rem; }
.prose h2 { margin-bottom: 6px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.prose h3 { margin-top: 18px; }
.prose > p { color: var(--muted); }
.prose > p:first-of-type { color: var(--ink-2); }

.aside-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.aside-card > .mono { color: var(--accent-strong); }
.facts { display: grid; gap: 16px; margin: 0; }
.facts div { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.facts div:last-child { padding-bottom: 0; border-bottom: 0; }
.facts dt { color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; color: var(--ink); }
.facts a:hover { color: var(--accent-strong); }

@media (max-width: 900px) {
  .prose-grid { grid-template-columns: 1fr; }
  .aside-card { position: static; }
}

/* Tags */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* Card grid variants */
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--5 { grid-template-columns: repeat(5, 1fr); }
.card--compact { padding: 24px; }
.card--compact .card-kicker { margin-top: 22px; }
.card--compact h3 { margin: 8px 0 0; font-size: 1.05rem; }

.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split-head { position: sticky; top: calc(var(--header-h) + 24px); margin-bottom: 0; }
.card--wide { grid-column: span 2; }
.card-kicker { display: block; color: var(--accent-strong); font-size: 0.7rem; }
.card-kicker + h3 { margin-top: 14px; }
.card .card-kicker:last-child { margin-top: 10px; color: var(--muted); }

@media (max-width: 1100px) {
  .card-grid--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .card-grid--3 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-head { position: static; }
}
@media (max-width: 600px) {
  .card-grid--5 { grid-template-columns: 1fr 1fr; }
  .card-grid--5 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .card-grid--3 { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
}

/* About: the four "bases" (A, T, G, C) */
.bases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.base {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.base-letter {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, var(--accent-soft) 5px 6px),
    repeating-linear-gradient(0deg, transparent 0 5px, var(--accent-soft) 5px 6px);
}
.base h3 { margin-bottom: 10px; }
.base p { color: var(--muted); font-size: 0.97rem; }
/* Base pairs: A–T and G–C are linked by a rung */
.base:nth-child(odd)::after {
  content: "";
  position: absolute;
  top: 60px;
  right: -1px;
  width: 28px;
  border-top: 1px dashed var(--accent);
}

@media (max-width: 900px) {
  .bases { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .bases { grid-template-columns: 1fr; }
  .base:nth-child(odd)::after { display: none; }
}

/* Team */
.monogram {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, var(--grid-line) 5px 6px),
    repeating-linear-gradient(0deg, transparent 0 5px, var(--grid-line) 5px 6px);
}
.monogram--lg { width: 88px; height: 88px; font-size: 1.5rem; border-radius: 16px; }

.person-mini {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.2s;
}
.person-mini:hover { border-color: var(--line-strong); }
.person-mini > span:nth-child(2) { flex: 1; }
.person-mini .icon { color: var(--muted); transition: transform 0.25s var(--ease), color 0.2s; }
.person-mini:hover .icon { color: var(--accent-strong); transform: translateX(4px); }
.person-name { display: block; color: var(--ink); font-size: 1.1rem; font-weight: 500; letter-spacing: -0.015em; }
.person-role { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* Expandable profile (about page): a person-mini whose name opens the full bio in place. */
.people-teaser { display: grid; gap: 16px; max-width: 880px; }
.person-expand { display: block; padding: 0; }
.person-expand[open] { border-color: var(--line-strong); }
.person-expand summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: inherit;
  cursor: pointer;
  list-style: none;
}
.person-expand summary::-webkit-details-marker { display: none; }
.person-expand summary > span:nth-child(2) { flex: 1; }
.person-expand .icon { transform: rotate(90deg); }
.person-expand:hover .icon { transform: rotate(90deg) translateX(3px); }
.person-expand[open] .icon,
.person-expand[open]:hover .icon { color: var(--accent-strong); transform: rotate(-90deg); }
.person-expand .person-body { padding: 4px 24px 26px; }
/* Slide open where the browser can animate to height: auto; elsewhere it just opens. */
@supports (interpolate-size: allow-keywords) {
  .person-expand { interpolate-size: allow-keywords; }
  .person-expand::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.4s var(--ease), content-visibility 0.4s allow-discrete;
  }
  .person-expand[open]::details-content { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .person-expand::details-content { transition: none; }
}

.people { display: grid; gap: 24px; }
.person {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.person-head { display: grid; gap: 20px; align-content: start; }
.person-head .person-name { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.15; }
.person-head .person-role { margin-top: 10px; color: var(--accent-strong); }
.person-body { display: grid; gap: 16px; color: var(--muted); }
.person-body p:first-child { color: var(--ink-2); }

@media (max-width: 900px) {
  .person { grid-template-columns: 1fr; }
  .person-head { grid-template-columns: auto 1fr; align-items: center; }
  .monogram--lg { width: 64px; height: 64px; font-size: 1.15rem; }
}

/* Forms: radio groups */
.choice-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.choice-group legend { margin-bottom: 8px; padding: 0; color: var(--ink); font-size: 0.88rem; font-weight: 500; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-width: 96px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.choice:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-soft); }
.choice input { margin: 0; accent-color: var(--accent-strong); }
.choice-group[aria-invalid="true"] .choice { border-color: var(--danger); }

/* Contact: office hours */
.hours { display: grid; grid-template-columns: auto auto; gap: 2px 16px; color: var(--ink); }
.hours span:nth-child(odd) { color: var(--muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Insights: FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 300px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.faq { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  position: relative;
  padding: 20px 56px 20px 24px;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  background:
    linear-gradient(var(--accent-strong), var(--accent-strong)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--accent-strong), var(--accent-strong)) center / 1.5px 12px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 22px; color: var(--muted); }

.faq-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.faq-aside .mono { color: var(--accent-strong); }
.faq-aside p:not(.mono) { color: var(--muted); }

@media (max-width: 900px) {
  .faq-wrap { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-grid h2 { margin-bottom: 16px; }
.contact-list { display: grid; gap: 28px; }
.contact-list li { display: flex; align-items: flex-start; gap: 16px; }
.contact-list small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contact-list a { color: var(--ink); transition: color 0.2s; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent-strong); }

.contact-form { display: grid; gap: 18px; padding: clamp(24px, 4vw, 40px); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink); font-size: 0.88rem; font-weight: 500; }
.optional { color: var(--muted); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1rem;           /* 16px prevents iOS zoom on focus */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.82rem; }

.form-status { min-height: 1.4em; font-size: 0.92rem; text-align: center; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

/* 6. Cell shape: dots ---------------------------------------------------
   Active when --cell-shape is "dots" (top of this file) or the URL has
   ?cells=dots. Overrides the default square "pixel" motifs; delete this
   block to keep pixels only. */
[data-cells="dots"] .eyebrow::before,
[data-cells="dots"] .checklist li::before,
[data-cells="dots"] .nav-list a[aria-current="page"]::before,
[data-cells="dots"] .breadcrumb [aria-current="page"]::after,
[data-cells="dots"] .site-footer nav a[aria-current="page"]::before,
[data-cells="dots"] .lab-readout::before { border-radius: 50%; }

/* Dot-matrix backgrounds instead of grid lines */
[data-cells="dots"] .hero::before,
[data-cells="dots"] .page-hero::before {
  background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.6px);
  background-size: 24px 24px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 35%, transparent 90%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 35%, transparent 90%);
}
[data-cells="dots"] .lab-screen {
  background-image: radial-gradient(circle, var(--grid-dot) 0.8px, transparent 1.4px);
  background-size: 12px 12px;
}

/* Footer strip: a row of dots */
[data-cells="dots"] .site-footer::before {
  top: -3px;
  height: 6px;
  background: radial-gradient(circle, var(--accent) 0 2.2px, transparent 2.8px) 0 50% / 11px 6px repeat-x;
}

/* Round badges with a fine dot texture */
[data-cells="dots"] .base-letter,
[data-cells="dots"] .monogram {
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 1px, transparent 1.6px) 0 0 / 6px 6px;
}
[data-cells="dots"] .monogram { background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.6px); }
[data-cells="dots"] .base:nth-child(odd)::after { border-top: 2px dotted var(--accent); }

/* Dotted rather than dashed lines */
[data-cells="dots"] .pk-chart .curve-test { stroke-dasharray: 0.1 6; stroke-width: 3.2; }
[data-cells="dots"] .key-test::before {
  height: 4px;
  background: radial-gradient(circle, var(--accent) 1.4px, transparent 1.8px) 0 50% / 5px 4px repeat-x;
}
[data-cells="dots"] .ci-zone { outline-style: dotted; }
[data-cells="dots"] .panel-art { border-style: dotted; border-width: 2px; }

/* 7. Motion -------------------------------------------------------------- */
/* .reveal content is only hidden when JS runs (html.js), so it's never lost. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.js .pk-chart .reveal-rect {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
}
.js .pk-chart .cmax { opacity: 0; transition: opacity 0.6s ease 1.6s; }
.js .ci-bar { transform: scaleX(0); transition: transform 1s var(--ease) 1.8s; }

.js .is-visible .pk-chart .reveal-rect { transform: none; transition: transform 2s var(--ease) 0.3s; }
.js .is-visible .pk-chart .cmax { opacity: 1; }
.js .is-visible .ci-bar { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
