:root {
  color-scheme: light;
  --ink: #142128;
  --ink-muted: #526066;
  --paper: #fbfaf7;
  --paper-soft: #f3efe8;
  --white: #ffffff;
  --coral: #d96c55;
  --coral-dark: #a84635;
  --teal: #1d6d6c;
  --blue: #315f88;
  --gold: #b58a45;
  --line: rgba(20, 33, 40, 0.14);
  --shadow: 0 20px 60px rgba(20, 33, 40, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  color: var(--white);
}

.site-header-light {
  position: static;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.brand,
.site-nav,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  min-width: max-content;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--coral);
  color: var(--white);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(20, 33, 40, 0.22);
}

.site-nav {
  gap: clamp(0.75rem, 2vw, 1.6rem);
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a,
.footer-links a {
  padding: 0.25rem 0;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"],
.footer-links a:hover,
.footer-links a:focus-visible {
  border-color: currentColor;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(760px, 88svh);
  overflow: hidden;
  isolation: isolate;
  padding: 112px 16px 76px;
  background:
    radial-gradient(circle at 74% 28%, rgba(243, 179, 159, 0.18), transparent 0.7rem),
    radial-gradient(circle at 81% 57%, rgba(138, 208, 201, 0.22), transparent 0.55rem),
    radial-gradient(circle at 62% 70%, rgba(181, 138, 69, 0.18), transparent 0.5rem),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.045) 0 1px,
      transparent 1px 44px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 44px
    ),
    linear-gradient(118deg, #0e2020 0%, #123435 44%, #1d6d6c 74%, #7b7041 118%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::before,
.hero::after,
.hero-overlay::before,
.hero-overlay::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  z-index: -2;
  right: clamp(1rem, 5vw, 4.5rem);
  top: 17%;
  width: min(58vw, 690px);
  height: min(57vh, 500px);
  border: 1px solid rgba(138, 208, 201, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 54% 48%, rgba(243, 179, 159, 0.18) 0 6px, transparent 7px),
    repeating-radial-gradient(circle at 54% 48%, transparent 0 36px, rgba(255, 255, 255, 0.13) 37px 38px),
    conic-gradient(from 18deg at 54% 48%, transparent 0 9deg, rgba(138, 208, 201, 0.16) 9deg 10deg, transparent 10deg 43deg, rgba(243, 179, 159, 0.14) 43deg 44deg, transparent 44deg);
  opacity: 0.64;
  transform: rotate(-7deg);
}

.hero::after {
  z-index: -2;
  right: clamp(2rem, 9vw, 8rem);
  bottom: clamp(2rem, 8vw, 6.25rem);
  width: min(44vw, 540px);
  aspect-ratio: 1.9;
  background:
    radial-gradient(circle at 17% 76%, #f3b39f 0 5px, transparent 6px),
    radial-gradient(circle at 38% 56%, #8ad0c9 0 5px, transparent 6px),
    radial-gradient(circle at 63% 42%, #b58a45 0 5px, transparent 6px),
    radial-gradient(circle at 83% 27%, rgba(255, 255, 255, 0.88) 0 4px, transparent 5px),
    linear-gradient(30deg, transparent 0 36%, rgba(243, 179, 159, 0.42) 36% 37%, transparent 37%),
    linear-gradient(342deg, transparent 0 48%, rgba(138, 208, 201, 0.42) 48% 49%, transparent 49%),
    linear-gradient(22deg, transparent 0 62%, rgba(181, 138, 69, 0.38) 62% 63%, transparent 63%);
  opacity: 0.72;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(14, 32, 32, 0.96) 0%,
      rgba(14, 32, 32, 0.82) 41%,
      rgba(14, 32, 32, 0.35) 100%
    ),
    linear-gradient(180deg, rgba(14, 32, 32, 0.06), rgba(14, 32, 32, 0.54));
}

.hero-overlay::before {
  inset: 10% 0 10% 40%;
  z-index: -1;
  opacity: 0.5;
  background:
    linear-gradient(120deg, transparent 0 33%, rgba(243, 179, 159, 0.22) 33% 34%, transparent 34% 63%, rgba(138, 208, 201, 0.2) 63% 64%, transparent 64%),
    repeating-linear-gradient(156deg, transparent 0 32px, rgba(255, 255, 255, 0.08) 32px 33px);
  clip-path: polygon(6% 4%, 100% 0, 90% 94%, 0 100%);
}

.hero-overlay::after {
  right: clamp(1rem, 6vw, 5.5rem);
  top: 18%;
  z-index: -1;
  width: min(38vw, 460px);
  height: min(54vh, 470px);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(190deg, rgba(255, 255, 255, 0.1), transparent 42%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(255, 255, 255, 0.07) 62px 63px);
  clip-path: polygon(0 14%, 100% 0, 93% 100%, 8% 88%);
  opacity: 0.48;
}

.hero-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f3b39f;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  max-width: 12ch;
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 850;
}

h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 820;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.hero-copy {
  max-width: 680px;
  margin: 1.1rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.1rem, 2vw, 1.38rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 780;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary,
.button-small {
  background: var(--coral);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible,
.button-small:hover,
.button-small:focus-visible {
  background: var(--coral-dark);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.button-small {
  min-height: 42px;
  width: fit-content;
}

.text-link {
  color: #8ad0c9;
  font-weight: 780;
  text-underline-offset: 4px;
}

.proof-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-item {
  display: grid;
  gap: 0.45rem;
  min-height: 132px;
  align-content: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--white);
}

.proof-item strong {
  color: var(--teal);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1;
}

.proof-item span {
  max-width: 22rem;
  color: var(--ink-muted);
  font-weight: 650;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.7fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: start;
}

.section-copy,
.markdown-body {
  display: grid;
  gap: 1rem;
  color: var(--ink-muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.section-copy p,
.markdown-body p,
.markdown-body ul,
.markdown-body blockquote {
  margin: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  margin-top: 1rem;
}

.markdown-body a {
  color: var(--teal);
  font-weight: 760;
  text-underline-offset: 4px;
}

.markdown-body ul {
  padding-left: 1.2rem;
}

.markdown-body blockquote {
  border-left: 4px solid var(--gold);
  color: var(--ink);
  padding-left: 1rem;
}

.markdown-body pre {
  overflow-x: auto;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
}

.markdown-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.markdown-body table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: clamp(0.94rem, 1.5vw, 1.04rem);
}

.markdown-body th,
.markdown-body td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--paper-soft);
  color: var(--ink);
  font-weight: 820;
}

.markdown-body td {
  color: var(--ink-muted);
}

.markdown-body tbody tr:last-child td {
  border-bottom: 0;
}

.math-display {
  display: grid;
  gap: 0.3rem;
  overflow-x: auto;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-family: "Cambria Math", "STIX Two Math", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  white-space: nowrap;
}

.math-inline {
  color: var(--ink);
  font-family: "Cambria Math", "STIX Two Math", Georgia, serif;
  font-size: 1.04em;
}

.math-line {
  display: block;
}

.math-frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  margin: 0 0.12em;
  vertical-align: middle;
  text-align: center;
  line-height: 1.05;
}

.math-frac > span:first-child {
  border-bottom: 1px solid currentColor;
  padding: 0 0.16em 0.08em;
}

.math-frac > span:last-child {
  padding: 0.08em 0.16em 0;
}

.math-root > span {
  border-top: 1px solid currentColor;
  padding-left: 0.16em;
}

.service-section {
  width: 100%;
  max-width: none;
  background: var(--ink);
  color: var(--white);
  padding-inline: max(16px, calc((100% - 1180px) / 2));
}

.service-section .eyebrow,
.process-section .eyebrow {
  color: #eb8f75;
}

.science-groups,
.science-group {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.35rem);
}

.science-groups {
  gap: clamp(1.7rem, 4vw, 2.75rem);
}

.science-group .section-heading {
  max-width: 820px;
  margin-bottom: 0;
}

.science-group .section-heading h2 {
  color: var(--white);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
}

.notes-directory {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 4.75rem);
}

.note-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.note-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(280px, 1fr) auto;
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: center;
  min-height: 118px;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  background: rgba(255, 255, 255, 0.055);
}

.note-row h3 {
  margin-top: 0.35rem;
  color: var(--white);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.note-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.book-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.book-link {
  display: grid;
  min-height: 150px;
  align-content: start;
  gap: 0.6rem;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  text-decoration: none;
}

.book-link:hover,
.book-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.book-link span {
  color: var(--teal);
  font-weight: 800;
}

.book-link strong {
  font-size: clamp(1.18rem, 2vw, 1.5rem);
}

.book-link em {
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  line-height: 1.5;
}

.section-heading {
  display: grid;
  gap: 0.25rem;
  max-width: 760px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.science-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
  min-height: 284px;
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.card-number {
  color: #8ad0c9;
  font-weight: 820;
}

.service-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.process-section {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--paper-soft);
  padding-inline: max(16px, calc((100% - 1180px) / 2));
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.process-list li {
  display: grid;
  gap: 0.75rem;
  min-height: 220px;
  align-content: start;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  background: var(--paper);
}

.process-list span {
  color: var(--teal);
  font-size: 1.15rem;
  font-weight: 820;
}

.process-list p {
  margin: 0;
  color: var(--ink-muted);
}

.page-hero,
.legal-hero {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.page-hero h1,
.legal-hero h1 {
  max-width: none;
  color: var(--ink);
  font-size: clamp(3.3rem, 9vw, 7rem);
}

.page-hero p:last-child,
.legal-hero p:last-child {
  max-width: 760px;
  margin: 1.2rem 0 0;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.bloch-hero {
  padding-top: clamp(1.35rem, 2.4vw, 2rem);
  padding-bottom: clamp(1.3rem, 3vw, 2rem);
}

.bloch-hero .eyebrow {
  margin-bottom: 0.25rem;
}

.bloch-hero .hero-subtitle {
  max-width: none;
}

.qa-hero {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.qa-hero .eyebrow {
  margin-bottom: 0.3rem;
}

.qa-hero h1 {
  font-size: clamp(3.2rem, 7vw, 5.8rem);
}

.qa-hero p:last-child {
  margin-top: 0.9rem;
}

.qa-body {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(3rem, 5vw, 4.25rem);
  gap: 0.8rem;
}

.qa-body.markdown-body h1,
.qa-body.markdown-body h2 {
  max-width: none;
  margin-top: 0.55rem;
}

.qa-body .math-display {
  padding-block: 0.75rem;
}

.experiment-hero {
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
  padding-bottom: clamp(1.25rem, 2.8vw, 2rem);
}

.experiment-hero .eyebrow {
  margin-bottom: 0.3rem;
}

.experiment-hero h1 {
  font-size: clamp(3.2rem, 7.2vw, 5.9rem);
}

.experiment-hero p:last-child {
  max-width: none;
  margin-top: 0.75rem;
}

.experiment-body {
  padding-top: clamp(1.3rem, 3vw, 2.1rem);
  padding-bottom: clamp(1.4rem, 3vw, 2.3rem);
  gap: 0.8rem;
  font-size: clamp(0.98rem, 1.7vw, 1.1rem);
}

.experiment-body.markdown-body h1,
.experiment-body.markdown-body h2 {
  max-width: none;
  margin-top: 0.55rem;
}

.experiment-body .markdown-table-wrap {
  margin: 0.15rem 0 0.25rem;
}

.experiment-tool-section {
  padding-top: clamp(1.4rem, 3vw, 2.25rem);
  padding-bottom: clamp(1.4rem, 3vw, 2.25rem);
}

.experiment-tool-section .tool-panel {
  gap: clamp(1rem, 2vw, 1.35rem);
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

.experiment-followup {
  padding-top: clamp(1.4rem, 3vw, 2.2rem);
}

.bloch-intro {
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.bloch-detail {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(3rem, 5vw, 4.25rem);
}

.bloch-intro,
.bloch-detail {
  gap: 0.8rem;
}

.bloch-intro.markdown-body h1,
.bloch-detail.markdown-body h1,
.bloch-intro.markdown-body h2,
.bloch-detail.markdown-body h2 {
  max-width: none;
  margin-top: 0.55rem;
}

.bloch-intro .math-display {
  padding-block: 0.75rem;
}

@media (min-width: 760px) {
  .bloch-hero .hero-subtitle {
    white-space: nowrap;
  }
}

.legal-content {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto clamp(4rem, 8vw, 7rem);
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  background: var(--white);
}

.contact-hero {
  padding-bottom: clamp(1.75rem, 4vw, 3rem);
}

.contact-section {
  padding-top: 0;
}

.contact-form {
  display: grid;
  gap: 1rem;
  width: min(720px, 100%);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 760;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 0.9rem;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  width: fit-content;
}

.contact-trap {
  position: absolute;
  left: -10000px;
}

.form-notice {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-weight: 740;
}

.form-notice-success {
  background: rgba(29, 109, 108, 0.12);
  color: var(--teal);
}

.form-notice-error {
  background: rgba(217, 108, 85, 0.12);
  color: var(--coral-dark);
}

.product-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.product-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(260px, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--white);
}

.product-row p {
  margin: 0;
  color: var(--ink-muted);
}

.metric-stack {
  display: grid;
  gap: 1rem;
}

.analytics-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.metric-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.metric-card strong {
  color: var(--blue);
  font-size: 2.2rem;
  line-height: 1;
}

.metric-card span {
  font-weight: 820;
}

.metric-card p {
  margin: 0;
  color: var(--ink-muted);
}

.tool-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  background: var(--ink);
}

.tool-panel {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.tool-panel h2 {
  color: var(--white);
}

.qa-tool-section {
  padding-top: clamp(1.75rem, 3.5vw, 2.75rem);
  padding-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.qa-tool-panel {
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1rem, 2.2vw, 1.5rem);
}

.qa-tool-panel .coordinate-tool-grid {
  gap: clamp(1rem, 3vw, 2rem);
}

.qa-tool-panel .control-grid,
.qa-tool-panel .result-grid {
  gap: 0.75rem;
}

.qa-tool-panel .control-grid-three,
.qa-tool-panel .result-grid-three {
  margin-top: 0.7rem;
}

.qa-tool-panel .control-grid input {
  min-height: 42px;
  padding-block: 0.5rem;
}

.qa-tool-panel .result-grid div {
  min-height: 96px;
  padding: 0.85rem;
}

.qa-tool-panel .matrix-output {
  margin-top: 0.75rem;
}

.qa-tool-panel .matrix-output pre {
  min-height: 112px;
  padding: 0.85rem;
  line-height: 1.45;
}

.qa-tool-panel .coordinate-visual {
  min-height: 292px;
}

.bloch-tool-section {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.bloch-tool-panel {
  gap: clamp(0.9rem, 2vw, 1.4rem);
  padding: clamp(1rem, 2.2vw, 1.5rem);
}

.bloch-tool-panel .coordinate-tool-grid {
  gap: clamp(1rem, 3vw, 2rem);
}

.bloch-tool-panel .control-grid,
.bloch-tool-panel .result-grid {
  gap: 0.75rem;
}

.bloch-tool-panel .control-grid-two,
.bloch-tool-panel .result-grid-two {
  margin-top: 0.65rem;
}

.bloch-tool-panel .matrix-output {
  margin-top: 0.7rem;
}

.bloch-tool-panel .matrix-output pre {
  min-height: 118px;
  padding: 0.85rem;
  line-height: 1.45;
}

.bloch-tool-panel .result-grid div {
  min-height: 92px;
  padding: 0.85rem;
}

.bloch-tool-panel .control-grid input {
  min-height: 42px;
  padding-block: 0.5rem;
}

.bloch-tool-panel .coordinate-visual {
  min-height: 292px;
}

.bloch-tool-panel .camera-controls {
  padding: 0.75rem;
}

.control-grid,
.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.control-grid-three,
.result-grid-three {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}

.control-grid-two,
.result-grid-two {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1rem;
}

.camera-controls {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.bloch-visual {
  align-content: center;
  gap: 0.75rem;
  padding: 0.75rem;
}

.bloch-visual .camera-controls {
  width: 100%;
  margin-top: 0;
}

.range-head {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  justify-content: space-between;
}

.range-head output {
  color: var(--gold);
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.range-limits {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.8rem;
  font-weight: 680;
}

.number-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.number-field span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.88rem;
  font-weight: 760;
}

.control-grid label {
  display: grid;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 720;
}

.control-grid input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font: inherit;
  padding: 0.6rem 0.7rem;
}

.control-grid input[type="range"] {
  padding-inline: 0;
  accent-color: var(--coral);
}

.result-grid div {
  display: grid;
  gap: 0.35rem;
  min-height: 108px;
  align-content: center;
  padding: 1rem;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

.result-grid span {
  color: var(--ink-muted);
  font-weight: 720;
}

.result-grid strong {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1;
}

.bar-chart {
  display: grid;
  gap: 0.85rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) 1fr 90px;
  gap: 1rem;
  align-items: center;
  font-weight: 720;
}

.bar-row div {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-soft);
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}

.scientific-body {
  max-width: 880px;
}

.meter {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transition: width 180ms ease;
}

.coordinate-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.matrix-output {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.matrix-output span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 760;
}

.matrix-output pre {
  min-height: 138px;
  overflow-x: auto;
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.92rem;
  line-height: 1.55;
}

.coordinate-visual {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 109, 108, 0.3), rgba(49, 95, 136, 0.18)),
    rgba(255, 255, 255, 0.06);
}

.coordinate-visual svg {
  width: min(100%, 420px);
  height: auto;
}

.coordinate-visual text {
  fill: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 780;
}

.math-display sub,
.math-display sup {
  font-size: 0.72em;
  line-height: 0;
}

.axis,
.vector,
.angle {
  fill: none;
  stroke-linecap: round;
}

.axis {
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 2;
}

.axis-depth {
  stroke-dasharray: 6 7;
}

.vector {
  stroke: #8ad0c9;
  stroke-width: 5;
}

.angle {
  stroke: #f3b39f;
  stroke-width: 2;
}

.angle-radius {
  fill: none;
  stroke: rgba(138, 208, 201, 0.7);
  stroke-linecap: round;
  stroke-width: 3;
}

.angle-guide {
  fill: none;
  stroke: rgba(255, 255, 255, 0.34);
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  stroke-width: 2;
}

.projection-point {
  fill: #f3b39f;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 1.5;
}

.rotation-surface {
  fill: var(--gold);
  opacity: 0.16;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.rotation-axis {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-width: 4;
}

.rotation-arc {
  fill: none;
  stroke: var(--gold);
  stroke-dasharray: 3 6;
  stroke-linecap: round;
  stroke-width: 3;
}

.vector-muted {
  fill: none;
  stroke: rgba(255, 255, 255, 0.52);
  stroke-linecap: round;
  stroke-width: 4;
}

.point {
  fill: var(--coral);
  stroke: var(--white);
  stroke-width: 2;
}

.point-muted {
  fill: var(--teal);
  stroke: var(--white);
  stroke-width: 2;
}

.sphere-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.44);
  stroke-width: 2;
}

.sphere-ring.muted {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-dasharray: 5 7;
}

.bloch-operations {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(280px, 0.8fr);
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: center;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.operation-copy {
  display: grid;
  gap: 0.7rem;
}

.operation-copy h3 {
  color: var(--white);
  font-size: clamp(1.45rem, 3vw, 2.3rem);
}

.operation-copy p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.gate-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.gate-buttons button {
  min-width: 50px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 820;
}

.gate-buttons button:hover,
.gate-buttons button:focus-visible,
.gate-buttons button.is-active {
  background: var(--coral);
  border-color: var(--coral);
}

.operation-visual {
  display: grid;
  gap: 0.65rem;
  min-height: 238px;
  place-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(181, 138, 69, 0.18), rgba(49, 95, 136, 0.2)),
    rgba(255, 255, 255, 0.06);
}

.operation-visual svg {
  width: min(100%, 420px);
  height: auto;
}

.operation-label {
  fill: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 780;
}

.operation-axis-label {
  fill: rgba(255, 255, 255, 0.88);
}

.operation-state-label {
  fill: var(--white);
  font-weight: 860;
}

.operation-rotation-label {
  fill: var(--gold);
  font-weight: 860;
}

.operation-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 760;
}

.operation-key span {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.operation-key i {
  display: inline-block;
  width: 0.9rem;
  height: 0.35rem;
  border-radius: 999px;
}

.key-before {
  background: var(--teal);
}

.key-after {
  background: var(--coral);
}

.key-axis {
  background: var(--gold);
}

.key-surface {
  background: rgba(243, 187, 89, 0.32);
  border: 1px solid rgba(243, 187, 89, 0.8);
}

.key-rotation {
  background: repeating-linear-gradient(
    90deg,
    var(--gold),
    var(--gold) 4px,
    transparent 4px,
    transparent 7px
  );
  border: 1px solid rgba(243, 187, 89, 0.7);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.footer-links {
  gap: 1rem;
  font-weight: 720;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    width: 100%;
    padding: 1rem;
    background: var(--ink);
    color: var(--white);
  }

  .site-header-light {
    background: var(--paper);
    color: var(--ink);
  }

  .site-nav {
    overflow-x: auto;
    justify-content: flex-end;
    max-width: 100%;
    padding-bottom: 0.2rem;
    white-space: nowrap;
  }

  .hero {
    min-height: min(680px, 74svh);
    padding-top: 4.5rem;
  }

  .proof-band,
  .card-grid,
  .process-list,
  .split-section,
    .control-grid,
    .result-grid,
    .product-row,
    .note-row,
    .book-link-list,
    .coordinate-tool-grid,
    .bloch-operations,
    .analytics-overview,
    .science-card-grid {
    grid-template-columns: 1fr;
  }

  .proof-item {
    min-height: 112px;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
    width: 100%;
  }

  .hero {
    min-height: 66svh;
    padding-block: 3.5rem;
  }

  h1 {
    font-size: clamp(3.4rem, 20vw, 5.1rem);
  }

  .hero-actions,
  .hero-actions .button,
  .product-row .button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

}
