:root {
  color-scheme: light;
  --bg-1: #f9fbff;
  --bg-2: #eef3ff;
  --panel: rgba(255, 255, 255, 0.94);
  --text: #141a2a;
  --muted: #5a6480;
  --line: #cfd8ef;
  --accent: #295ccf;
  --callout: #f3f7ff;
  --paper-main: #fbf9f4;
  --paper-soft: #f3f5f9;
  --paper-line: rgba(135, 150, 185, 0.22);
  --night-panel: rgba(10, 13, 22, 0.78);
  --night-line: rgba(166, 183, 221, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(960px 560px at 12% 10%, #ffffff 0%, var(--bg-1) 45%, transparent 82%),
    radial-gradient(980px 620px at 92% 95%, #f7f9ff 0%, var(--bg-2) 54%, #e8efff 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(23, 41, 83, 0.1);
  padding: 20px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem);
  color: #0f1730;
}

.hero p {
  margin: 10px 0 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: #3d66bd;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 10px 26px rgba(23, 41, 83, 0.08);
}

.card h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #0f1730;
}

.card p {
  margin: 8px 0 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.meta {
  font-size: 0.88rem;
}

.home-shell {
  width: min(1240px, 100%);
}

body.home-page {
  color: #eef2ff;
  background:
    radial-gradient(920px 520px at 82% 12%, rgba(37, 73, 152, 0.18) 0%, rgba(10, 14, 26, 0) 58%),
    radial-gradient(760px 420px at 18% 0%, rgba(100, 130, 204, 0.12) 0%, rgba(8, 10, 16, 0) 62%),
    linear-gradient(180deg, #020305 0%, #070910 46%, #030407 100%);
}

body.home-page a {
  color: #dfe8ff;
}

.landing-shell {
  width: min(1360px, 100%);
  padding-top: 32px;
  padding-bottom: 48px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(460px, 1.18fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.equation-card,
.route-block {
  border: 1px solid var(--night-line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10, 13, 22, 0.82) 0%, rgba(10, 13, 22, 0.68) 100%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.landing-copy {
  position: relative;
  z-index: 2;
  padding: 0;
  margin-right: 0;
  align-self: center;
}

.landing-media {
  position: relative;
  z-index: 1;
  padding: 0;
  justify-self: end;
  width: min(100%, 760px);
}

.landing-video {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 24px;
  border: 1px solid rgba(173, 191, 231, 0.14);
  background: rgb(8, 10, 16);
  object-fit: cover;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.landing-title {
  margin: 0;
  font-size: clamp(2.4rem, 1.4rem + 3vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
  color: #fbfcff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
}

.landing-route {
  margin: 18px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 164, 203, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #c6d0ec;
  font-size: 0.84rem;
  line-height: 1;
}

.landing-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-entry {
  display: flex;
  justify-content: center;
  margin: 28px 0 44px 0;
}

.home-entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fbfcff !important;
  text-decoration: none;
  text-align: center;
  transition: none;
}

.home-entry-link:hover {
  text-decoration: none;
}

.home-entry-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(12, 16, 27, 0.08);
  background: #ffffff;
  color: #111827;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.home-entry-link:hover .home-entry-cta {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.landing-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #edf2ff;
  color: #0f1730 !important;
  border: 1px solid #edf2ff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.08);
}

.landing-link:hover {
  text-decoration: none;
  background: #ffffff;
}

.landing-link--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 164, 203, 0.22);
  color: #dfe8ff !important;
}

.landing-link--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.equation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.equation-card {
  padding: 22px 22px 18px 22px;
}

.equation-label {
  margin: 0;
  color: #9cb5ff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.equation-title {
  margin: 10px 0 0 0;
  color: #fbfcff;
  font-size: 1.24rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.equation-math {
  margin: 14px 0;
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 164, 203, 0.12);
  color: #f3f6ff;
  overflow-x: auto;
}

.equation-text {
  margin: 0;
  color: #a8b3cf;
  line-height: 1.5;
}

.equation-card mjx-container {
  color: #f3f6ff !important;
}

.home-contact {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 8px;
}

.home-contact-photo-frame,
.home-contact-copy {
  border: 1px solid var(--night-line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10, 13, 22, 0.82) 0%, rgba(10, 13, 22, 0.68) 100%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.home-contact-photo-frame {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.home-contact-photo-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(10, 13, 22, 0) 0%, rgba(10, 13, 22, 0.58) 100%);
  pointer-events: none;
}

.home-contact-photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
  object-position: center 24%;
}

.home-contact-copy {
  padding: 26px 26px 24px 26px;
}

.home-contact-copy h2 {
  margin: 10px 0 0 0;
  color: #fbfcff;
  font-size: clamp(1.5rem, 1.15rem + 1vw, 2.1rem);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.home-contact-copy p {
  margin: 14px 0 0 0;
  color: #aeb9d3;
  line-height: 1.62;
  max-width: 58ch;
}

.home-contact-note {
  color: #8795b6 !important;
  font-size: 0.95rem;
}

.home-contact-actions {
  margin-top: 20px;
}

.route-section {
  margin-top: 34px;
}

.route-header {
  margin-bottom: 22px;
}

.route-header h2 {
  margin: 0;
  color: #fbfcff;
  font-size: clamp(1.45rem, 1.1rem + 1vw, 2rem);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.route-header p {
  margin: 8px 0 0 0;
  color: #99a6c6;
  line-height: 1.5;
  max-width: 64ch;
}

.route-blocks {
  display: grid;
  gap: 24px;
}

.route-block {
  padding: 24px;
}

.route-block-header {
  margin-bottom: 18px;
}

.route-block-kicker {
  margin: 0 0 6px 0;
  color: #91aaf0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.route-block-header h3 {
  margin: 0;
  color: #fbfcff;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.65rem);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.route-block-header p {
  margin: 8px 0 0 0;
  color: #a7b3d1;
  line-height: 1.48;
  max-width: 66ch;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.route-grid--narrow {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.route-card {
  padding: 18px;
  border: 1px solid rgba(173, 191, 231, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: none;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.route-card:hover {
  transform: translateY(-2px);
  border-color: rgba(173, 191, 231, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 100%);
}

.route-index {
  margin: 0 0 10px 0;
  color: #90a7e7;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.route-card h3 {
  margin: 0;
  color: #fbfcff;
  font-size: 1.08rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.route-card p {
  margin: 10px 0 0 0;
  color: #9ba8c8;
  line-height: 1.45;
}

.route-note {
  color: #bdc9e4;
  font-size: 0.94rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.comparison-card {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(246, 249, 255, 0.96) 0%, rgba(238, 243, 255, 0.98) 100%);
  box-shadow: 0 12px 24px rgba(31, 49, 86, 0.08);
}

.comparison-kicker {
  margin: 0 0 8px 0;
  color: #5574b8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-card h3 {
  margin: 0;
  color: #142551;
  font-size: 1.1rem;
}

.comparison-card p,
.comparison-card li {
  color: #24324e;
}

.comparison-card ul {
  margin: 12px 0 0 1.2rem;
}

.matrix-plain-list {
  margin: 14px 0;
  padding-left: 1.25rem;
  color: #24324e;
}

.matrix-plain-list li + li {
  margin-top: 0.45rem;
}

.comparison-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 18px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(159, 177, 220, 0.18);
}

.comparison-table th {
  background: rgba(228, 236, 255, 0.92);
  color: #142551;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.comparison-table td {
  color: #24324e;
  line-height: 1.45;
}

.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-table--dense th,
.comparison-table--dense td {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.comparison-table--center th,
.comparison-table--center td {
  text-align: center;
}

.route-link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f5f7ff !important;
  font-weight: 700;
  text-decoration: none;
  opacity: 0.94;
}

.route-link:hover {
  text-decoration: underline;
}

.hero-home {
  padding: 28px 24px;
}

.hero-home h1 {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem);
  letter-spacing: 0.01em;
}

.chapter-stack {
  display: grid;
  gap: 16px;
}

.chapter-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.4fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(23, 41, 83, 0.08);
  padding: 14px;
  align-items: stretch;
}

.chapter-copy {
  padding: 8px;
}

.chapter-kicker {
  margin: 0 0 4px 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3f66bd;
  font-weight: 700;
}

.chapter-copy h2 {
  margin: 0;
  font-size: 1.28rem;
}

.chapter-copy p {
  margin: 10px 0 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chapter-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #c8d5f6;
  background: #f4f8ff;
  color: #274b98;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.chapter-link:hover {
  background: #ebf2ff;
  text-decoration: none;
}

.chapter-preview {
  border: 1px solid #d5def3;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  min-height: 420px;
}

.chapter-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chapter-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.chapter-preview--interactive {
  background: radial-gradient(circle at 18% 12%, #ffffff, #f2f6ff 58%, #e9eefb 100%);
}

.chapter-preview--placeholder {
  background:
    radial-gradient(500px 240px at 18% 14%, rgba(255, 255, 255, 0.96), rgba(242, 246, 255, 0.88) 58%, rgba(233, 238, 251, 0.96) 100%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 52%, #e5ecfb 100%);
  display: grid;
  align-items: stretch;
}

.chapter-preview-copy {
  display: grid;
  align-content: end;
  gap: 10px;
  height: 100%;
  padding: 18px;
}

.chapter-preview-copy h3 {
  margin: 0;
  font-size: 1.18rem;
  color: #223762;
}

.chapter-preview-copy p {
  margin: 0;
  color: #526383;
  line-height: 1.45;
  max-width: 28ch;
}

.preview-tag {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 224, 0.12);
  border: 1px solid rgba(47, 111, 224, 0.2);
  color: #2f5fba;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.chapter-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 20px 18px;
}

.toc h2 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: #0f1730;
}

.toc-chapter-switcher {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.toc-group {
  margin: 0;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  overflow: hidden;
}

.toc-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}

.toc-group-summary::-webkit-details-marker {
  display: none;
}

.toc-group-title {
  position: relative;
  padding-left: 14px;
  font-size: 0.96rem;
  line-height: 1.2;
  font-weight: 760;
  color: #10203f;
}

.toc-group-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
  opacity: 0.48;
}

.toc-group-range {
  margin-left: auto;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6078ad;
}

.toc-group-links {
  display: grid;
  gap: 3px;
  padding: 0 0 8px 10px;
}

.toc-block {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid #dde5f6;
}

.toc-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.toc-block-kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5574b8;
  font-weight: 700;
}

.toc-block-title {
  margin: -2px 0 0 0;
  font-size: 1.02rem;
  line-height: 1.2;
  color: #10203f;
}

.toc-block-text {
  margin: 0;
  color: #5a6788;
  font-size: 0.8rem;
  line-height: 1.5;
}

.toc-chapter-chip {
  display: block;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #31456f;
  padding: 9px 10px 9px 14px;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.toc-group .toc-chapter-chip {
  font-size: 0.88rem;
}

.toc-chapter-chip:hover {
  background: rgba(47, 111, 224, 0.08);
  border-left-color: rgba(47, 111, 224, 0.35);
  text-decoration: none;
  transform: translateX(2px);
}

.toc-chapter-chip.is-active {
  background: linear-gradient(90deg, rgba(63, 114, 224, 0.96) 0%, rgba(63, 114, 224, 0.8) 100%);
  border-left-color: rgba(255, 255, 255, 0.88);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(47, 111, 224, 0.18);
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.toc li {
  margin: 0.28rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.content {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.content h1 {
  margin-top: 0;
  font-size: clamp(2rem, 1.35rem + 1.8vw, 3.25rem);
  color: #0f1730;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 0.8rem;
}

.chapter-block-kicker {
  margin: 0 0 0.9rem 0;
  color: #355eb9;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.content h2 {
  margin-top: 1.9rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.28rem, 1.12rem + 0.55vw, 1.55rem);
  color: #132446;
  letter-spacing: -0.02em;
}

.content h3 {
  color: #254581;
}

.content p,
.content li,
.content blockquote {
  line-height: 1.7;
  color: #27324a;
}

.content p,
.content ul,
.content ol,
.content blockquote {
  margin: 0.7rem 0;
}

.content blockquote {
  border-left: 3px solid #7e99d4;
  padding: 0.25rem 0.75rem;
  background: #f6f9ff;
  color: #36466f;
}

.definition-box {
  border: 1px solid #b6c7ef;
  border-radius: 10px;
  background: var(--callout);
  padding: 12px;
  margin: 12px 0;
}

.definition-box h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #2c4d96;
}

.definition-box ol {
  margin: 0.6rem 0 0 1.2rem;
  padding: 0;
}

.definition-box li {
  margin: 0.42rem 0;
  color: #27324a;
  line-height: 1.65;
}

.figure {
  margin: 14px 0;
  border: 1px solid var(--paper-line);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(244, 247, 252, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.figure-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(149, 164, 196, 0.2);
  background: #fff;
}

.figure figcaption {
  display: none;
}

.rich-block {
  margin: 0.7rem 0;
  line-height: 1.52;
}

.rich-block ul,
.rich-block ol {
  margin: 0.6rem 0 0 1.2rem;
  padding: 0;
}

.section-meta {
  margin: 0.15rem 0 0.75rem 0;
  color: #4e6394;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-subtopics {
  margin: 0.95rem 0 1rem 0;
  border: 1px solid #d7e0f3;
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
}

.section-subtopics h3 {
  margin: 0 0 8px 0;
  font-size: 0.96rem;
  color: #2c4d96;
}

.section-subtopics ul {
  margin: 0;
  padding-left: 1.1rem;
}

.section-fallback {
  color: #5b6a87;
  font-style: italic;
}

.scroll-x {
  overflow-x: auto;
  margin: 10px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2px 0;
}

body.chapter-page mjx-container[display="true"] {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.scroll-x--compact mjx-container[display="true"] {
  font-size: clamp(0.78rem, 1.7vw, 0.96rem) !important;
}

.equation-flow {
  margin: 24px 0 28px;
  border: 1px solid rgba(159, 177, 220, 0.28);
  border-radius: 24px;
  background:
    radial-gradient(780px 340px at 12% 6%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, rgba(243, 247, 255, 0.96) 0%, rgba(236, 242, 255, 0.98) 100%);
  box-shadow: 0 18px 40px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.equation-flow-header {
  display: grid;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.22);
}

.equation-flow--plain {
  margin: 18px 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.equation-flow--plain .equation-flow-header {
  padding: 0 0 12px;
  border-bottom: 0;
}

.equation-flow--plain .equation-flow-stage {
  border: 1px solid rgba(159, 177, 220, 0.22);
  border-radius: 20px;
  overflow: hidden;
}

.equation-flow-intro {
  display: grid;
  gap: 8px;
}

.equation-flow-title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.45rem);
  line-height: 1.08;
}

.equation-flow-lead,
.equation-flow-caption {
  margin: 0;
  color: #465577;
  line-height: 1.52;
}

.equation-flow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equation-flow-tab {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(119, 142, 197, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #24365f;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease,
    box-shadow 120ms ease;
}

.equation-flow-tab:hover,
.equation-flow-tab:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(70, 100, 184, 0.42);
  box-shadow: 0 8px 18px rgba(41, 72, 142, 0.08);
}

.equation-flow-tab[aria-selected="true"] {
  background: #295ccf;
  color: #f6f8ff;
  border-color: #295ccf;
  box-shadow: 0 12px 24px rgba(41, 92, 207, 0.18);
}

.equation-flow-stage {
  position: relative;
  min-height: 560px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(249, 251, 255, 0.94) 100%);
}

.equation-flow-overlay,
.equation-flow-content {
  position: relative;
}

.equation-flow-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.equation-flow-content {
  z-index: 1;
  display: grid;
  gap: 18px;
}

.equation-flow-section {
  display: grid;
  gap: 14px;
}

.equation-flow-section--support {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(159, 177, 220, 0.2);
}

.equation-flow-row {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.equation-flow-row--unlabeled {
  grid-template-columns: minmax(0, 1fr);
}

.equation-flow-row--split {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.62fr);
  column-gap: 14px;
  align-items: center;
}

.equation-flow-row--hero {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: 18px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(239, 244, 255, 0.92) 0%, rgba(247, 249, 255, 0.95) 100%);
  border: 1px solid rgba(159, 177, 220, 0.22);
}

.equation-flow-row--support {
  grid-template-columns: 96px minmax(0, 1fr);
}

.equation-flow-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(159, 177, 220, 0.26);
  background: rgba(255, 255, 255, 0.82);
  color: #233458;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.equation-flow-label--gauss {
  color: #a63a3a;
  border-color: rgba(242, 92, 92, 0.26);
  background: rgba(242, 92, 92, 0.12);
}

.equation-flow-label--ampere {
  color: #2c4da5;
  border-color: rgba(92, 140, 255, 0.24);
  background: rgba(92, 140, 255, 0.12);
}

.equation-flow-label--nomono {
  color: #8a5800;
  border-color: rgba(255, 184, 77, 0.28);
  background: rgba(255, 184, 77, 0.14);
}

.equation-flow-label--faraday {
  color: #247a46;
  border-color: rgba(51, 204, 102, 0.24);
  background: rgba(51, 204, 102, 0.12);
}

.equation-flow-expression {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
  align-items: center;
  min-height: 38px;
}

.equation-flow-expression--center {
  justify-content: center;
}

.equation-flow-expression--rhs {
  justify-content: flex-start;
}

.equation-flow-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  color: #0f1730;
  font-size: 1.15rem;
  line-height: 1;
}

.equation-flow-token {
  display: inline-flex;
  align-items: center;
  color: #17213b;
  will-change: transform, opacity;
  transform-origin: center;
}

.equation-flow-token mjx-container {
  margin: 0 !important;
}

.equation-flow-token--dense {
  font-size: 0.88rem;
}

.equation-flow-row--hero .equation-flow-token {
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 2rem);
}

.equation-flow-row--support .equation-flow-token {
  font-size: 0.94rem;
}

.equation-flow-token--gauss {
  color: #cf5858;
}

.equation-flow-token--ampere {
  color: #4b79f6;
}

.equation-flow-token--nomono {
  color: #d4902f;
}

.equation-flow-token--faraday {
  color: #2db562;
}

.equation-flow-token--ghost {
  position: absolute;
  z-index: 3;
  margin: 0;
  transition: transform 320ms ease, opacity 220ms ease;
}

.equation-flow-token-fallback {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.96em;
}

.figure--interactive {
  margin-top: 18px;
}

.figure--field-tabs {
  margin-top: 18px;
}

.field-tabs {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.field-tabs__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.field-tabs__tab {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(119, 142, 197, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #24365f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease,
    box-shadow 120ms ease;
}

.field-tabs__tab:hover,
.field-tabs__tab:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(70, 100, 184, 0.42);
  box-shadow: 0 8px 18px rgba(41, 72, 142, 0.08);
}

.field-tabs__tab[aria-selected="true"] {
  background: #295ccf;
  color: #f6f8ff;
  border-color: #295ccf;
}

.field-tabs__stage {
  position: relative;
  aspect-ratio: 730 / 703;
  background: #fefefe;
}

.field-tabs__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.field-tabs__view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.field-tabs__view--vector {
  opacity: 1;
}

.field-tabs[data-field-view="curl"] .field-tabs__view--vector,
.field-tabs[data-field-view="divergence"] .field-tabs__view--vector {
  opacity: 0;
}

.field-tabs[data-field-view="curl"] .field-tabs__view--curl {
  opacity: 1;
}

.field-tabs[data-field-view="divergence"] .field-tabs__view--divergence {
  opacity: 1;
}

.minkowski-globe {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.minkowski-globe__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.minkowski-globe__label {
  color: #24365f;
  font-weight: 700;
}

.minkowski-globe__slider {
  width: 100%;
  accent-color: #295ccf;
}

.minkowski-globe__value {
  min-width: 3.2rem;
  color: #0f1730;
  font-weight: 700;
  text-align: right;
}

.minkowski-globe__stage {
  min-height: 420px;
  padding: 16px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.minkowski-globe__svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
}

.minkowski-globe__grid-line {
  fill: none;
  stroke: rgba(132, 132, 132, 0.72);
  stroke-width: 1.65;
}

.minkowski-globe__axis {
  fill: none;
  stroke: rgba(137, 137, 137, 0.92);
  stroke-width: 2.2;
}

.minkowski-globe__tick {
  fill: none;
  stroke: rgba(137, 137, 137, 0.9);
  stroke-width: 1.6;
}

.minkowski-globe__label-text {
  fill: rgba(137, 137, 137, 0.92);
  stroke: rgba(252, 252, 254, 0.96);
  stroke-width: 6px;
  paint-order: stroke fill;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 22px;
  font-weight: 600;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.minkowski-globe__person-line,
.minkowski-globe__person-outline {
  fill: none;
  stroke: #55c1df;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.minkowski-globe__ball-line,
.minkowski-globe__ball-outline {
  fill: none;
  stroke: #ff6356;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.minkowski-globe__grid-line,
.minkowski-globe__person-line,
.minkowski-globe__person-outline,
.minkowski-globe__ball-line,
.minkowski-globe__ball-outline {
  transition: d 180ms ease;
}

.worldtube-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.worldtube-figure__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.worldtube-figure__intro {
  display: grid;
  gap: 6px;
}

.worldtube-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.worldtube-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.worldtube-figure__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.worldtube-figure__label {
  color: #24365f;
  font-weight: 700;
}

.worldtube-figure__slider {
  width: 100%;
  accent-color: #295ccf;
}

.worldtube-figure__value {
  min-width: 3.2rem;
  color: #0f1730;
  font-weight: 700;
  text-align: right;
}

.worldtube-figure__stage {
  position: relative;
  min-height: 600px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.worldtube-figure__canvas {
  display: block;
  width: 100%;
  height: 572px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
}

.rotor-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.rotor-figure__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.rotor-figure__intro {
  display: grid;
  gap: 6px;
}

.rotor-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.rotor-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.rotor-figure__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.rotor-figure__label {
  color: #24365f;
  font-weight: 700;
}

.rotor-figure__slider {
  width: 100%;
  accent-color: #295ccf;
}

.rotor-figure__value {
  min-width: 3.2rem;
  color: #0f1730;
  font-weight: 700;
  text-align: right;
}

.rotor-figure__stage {
  position: relative;
  min-height: 600px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.rotor-figure__canvas {
  display: block;
  width: 100%;
  height: 572px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
}

.maxwell-boost-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.maxwell-boost-figure__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.maxwell-boost-figure__intro {
  display: grid;
  gap: 6px;
}

.maxwell-boost-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.maxwell-boost-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.maxwell-boost-figure__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.maxwell-boost-figure__label {
  color: #24365f;
  font-weight: 700;
}

.maxwell-boost-figure__slider {
  width: 100%;
  accent-color: #295ccf;
}

.maxwell-boost-figure__value {
  min-width: 3.2rem;
  color: #0f1730;
  font-weight: 700;
  text-align: right;
}

.maxwell-boost-figure__stage {
  position: relative;
  min-height: 540px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.maxwell-boost-figure__canvas {
  display: block;
  width: 100%;
  height: 512px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
  cursor: grab;
}

.maxwell-boost-figure__canvas:active {
  cursor: grabbing;
}

.magnetic-bivector-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.magnetic-bivector-figure__header {
  display: grid;
  gap: 10px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.magnetic-bivector-figure__intro {
  display: grid;
  gap: 6px;
}

.magnetic-bivector-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.magnetic-bivector-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.magnetic-bivector-figure__stage {
  position: relative;
  min-height: 560px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.magnetic-bivector-figure__canvas {
  display: block;
  width: 100%;
  height: 532px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
  cursor: grab;
}

.magnetic-bivector-figure__canvas:active {
  cursor: grabbing;
}

.maxwell-source-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.maxwell-source-figure__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.maxwell-source-figure__intro {
  display: grid;
  gap: 6px;
}

.maxwell-source-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.maxwell-source-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.maxwell-source-figure__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maxwell-source-figure__mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(119, 142, 197, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #24365f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease,
    box-shadow 120ms ease;
}

.maxwell-source-figure__mode:hover,
.maxwell-source-figure__mode:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(70, 100, 184, 0.42);
  box-shadow: 0 8px 18px rgba(41, 72, 142, 0.08);
}

.maxwell-source-figure__mode.is-active {
  background: #295ccf;
  color: #f6f8ff;
  border-color: #295ccf;
}

.maxwell-source-figure__stage {
  position: relative;
  min-height: 540px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.maxwell-source-figure__canvas {
  display: block;
  width: 100%;
  height: 512px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
  cursor: grab;
}

.maxwell-source-figure__canvas:active {
  cursor: grabbing;
}

.complex-phase-tool {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.complex-phase-tool__header {
  display: grid;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.complex-phase-tool__intro {
  display: grid;
  gap: 6px;
}

.complex-phase-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.complex-phase-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.complex-phase-tool__hint {
  margin: 0;
  color: #5a6887;
  line-height: 1.5;
}

.complex-phase-tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.complex-phase-tool__plane-shell {
  padding: 18px;
  border-right: 1px solid rgba(159, 177, 220, 0.2);
  background: linear-gradient(180deg, #fbfcff 0%, #eef3ff 100%);
}

.complex-phase-tool__canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: grab;
  touch-action: none;
}

.complex-phase-tool__canvas:active {
  cursor: grabbing;
}

.complex-phase-tool__canvas:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(41, 92, 207, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.complex-phase-tool__panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px 20px;
  background: rgba(248, 251, 255, 0.72);
}

.complex-phase-tool__panel-title {
  margin: 0;
  color: #5a6480;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.complex-phase-tool__swatch {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.88), 0 6px 14px rgba(41, 72, 142, 0.08);
}

.complex-phase-tool__sample {
  display: flex;
  align-items: center;
  gap: 12px;
}

.complex-phase-tool__sample-value {
  margin: 0;
  color: #13213d;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.complex-phase-tool__expression {
  margin: 0;
  color: #13213d;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.96rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.complex-phase-tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.complex-phase-tool__button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #295ccf;
  border-radius: 999px;
  background: #295ccf;
  color: #f6f8ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.complex-phase-tool__button:hover,
.complex-phase-tool__button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(41, 72, 142, 0.12);
}

.complex-phase-tool__button--ghost {
  border-color: rgba(119, 142, 197, 0.32);
  background: rgba(255, 255, 255, 0.82);
  color: #24365f;
}

.hydrogen-disc-tool {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.hydrogen-disc-tool__header {
  display: grid;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.hydrogen-disc-tool__intro {
  display: grid;
  gap: 6px;
}

.hydrogen-disc-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.hydrogen-disc-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.hydrogen-disc-tool__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.hydrogen-disc-tool__control-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hydrogen-disc-tool__control-label {
  margin: 0;
  color: #30406a;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.hydrogen-disc-tool__choice-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid rgba(119, 142, 197, 0.16);
  border-radius: 999px;
  background: rgba(246, 249, 255, 0.86);
  scrollbar-width: none;
}

.hydrogen-disc-tool__choice-row::-webkit-scrollbar {
  display: none;
}

.hydrogen-disc-tool__choice {
  min-height: 36px;
  min-width: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #24365f;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.hydrogen-disc-tool__choice:hover,
.hydrogen-disc-tool__choice:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(70, 100, 184, 0.18);
}

.hydrogen-disc-tool__choice.is-active {
  background: #295ccf;
  color: #f6f8ff;
  box-shadow: 0 6px 14px rgba(41, 72, 142, 0.16);
}

.hydrogen-disc-tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.hydrogen-disc-tool__canvas-shell {
  padding: 18px;
  border-right: 1px solid rgba(159, 177, 220, 0.2);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.08) 46%, transparent 72%),
    linear-gradient(180deg, #fbfcff 0%, #eef3ff 100%);
}

.hydrogen-disc-tool__canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hydrogen-disc-tool__panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.96) 0%, rgba(240, 245, 255, 0.98) 100%);
}

.hydrogen-disc-tool__metric {
  padding: 12px 14px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.hydrogen-disc-tool__metric-label {
  margin: 0 0 6px 0;
  color: #5a6480;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hydrogen-disc-tool__metric-value {
  margin: 0;
  color: #13213d;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.94rem;
  line-height: 1.45;
}

.hydrogen-disc-tool__note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(119, 142, 197, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #314468;
  line-height: 1.55;
}

.hydrogen-phase-tool {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.hydrogen-phase-tool__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.hydrogen-phase-tool__intro {
  display: grid;
  gap: 6px;
}

.hydrogen-phase-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.hydrogen-phase-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.hydrogen-phase-tool__formula {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(119, 142, 197, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: #223455;
}

.hydrogen-phase-tool__controls {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.96) 0%, rgba(244, 248, 255, 0.98) 100%);
}

.hydrogen-phase-tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
}

.hydrogen-phase-tool__canvas-shell {
  padding: 18px;
  border-right: 1px solid rgba(159, 177, 220, 0.2);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.08) 46%, transparent 72%),
    linear-gradient(180deg, #fbfcff 0%, #eef3ff 100%);
}

.hydrogen-phase-tool__canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hydrogen-phase-tool__panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.96) 0%, rgba(240, 245, 255, 0.98) 100%);
}

.hydrogen-phase-tool__metric {
  padding: 12px 14px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.hydrogen-phase-tool__metric-label {
  margin: 0 0 6px 0;
  color: #5a6480;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hydrogen-phase-tool__metric-value {
  margin: 0;
  color: #13213d;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.94rem;
  line-height: 1.5;
}

.hydrogen-phase-tool__control-block {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.hydrogen-phase-tool__control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.hydrogen-phase-tool__control-label {
  color: #5a6480;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hydrogen-phase-tool__control-value {
  color: #20345a;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.9rem;
}

.hydrogen-phase-tool__slider {
  width: 100%;
  margin: 0;
  accent-color: #295ccf;
}

.hydrogen-phase-tool__slider-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5a6480;
  font-size: 0.82rem;
}

.hydrogen-spacetime-tool__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.hydrogen-spacetime-tool__intro {
  display: grid;
  gap: 6px;
}

.hydrogen-spacetime-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.hydrogen-spacetime-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.hydrogen-spacetime-tool__hint {
  margin: 0;
  color: #556481;
  line-height: 1.45;
  font-size: 0.95rem;
}

.hydrogen-spacetime-tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  min-height: 620px;
}

.hydrogen-spacetime-tool__stage {
  position: relative;
  min-height: 620px;
  padding: 14px;
  border-right: 1px solid rgba(159, 177, 220, 0.2);
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.hydrogen-spacetime-tool__canvas {
  display: block;
  width: 100%;
  height: 592px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
  cursor: grab;
}

.hydrogen-spacetime-tool__canvas:active {
  cursor: grabbing;
}

.hydrogen-spacetime-tool__panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.hydrogen-spacetime-tool__metric {
  display: grid;
  gap: 5px;
}

.hydrogen-spacetime-tool__metric-label {
  margin: 0;
  color: #5d6a87;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hydrogen-spacetime-tool__metric-value {
  margin: 0;
  color: #17213d;
  line-height: 1.55;
  font-size: 1.01rem;
}

.hydrogen-spacetime-tool__note {
  margin: 0;
  color: #52617f;
  line-height: 1.52;
}

.orbital-overlap-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.orbital-overlap-figure__header {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.orbital-overlap-figure__intro {
  display: grid;
  gap: 6px;
}

.orbital-overlap-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.orbital-overlap-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.orbital-overlap-figure__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.orbital-overlap-figure__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #2b3a5c;
  font-weight: 700;
}

.orbital-overlap-figure__swatch {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(18, 26, 48, 0.14);
}

.orbital-overlap-figure__swatch--a {
  background: linear-gradient(135deg, #ffb07c 0%, #ea6f42 100%);
}

.orbital-overlap-figure__swatch--b {
  background: linear-gradient(135deg, #9ae7f2 0%, #45b7d1 100%);
}

.orbital-overlap-figure__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.orbital-overlap-figure__label {
  color: #24365f;
  font-weight: 700;
}

.orbital-overlap-figure__slider {
  width: 100%;
  accent-color: #295ccf;
}

.orbital-overlap-figure__value {
  min-width: 3.4rem;
  color: #0f1730;
  font-weight: 700;
  text-align: right;
}

.orbital-overlap-figure__stage {
  position: relative;
  min-height: 620px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.orbital-overlap-figure__canvas {
  display: block;
  width: 100%;
  height: 592px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
  cursor: grab;
}

.orbital-overlap-figure__canvas:active {
  cursor: grabbing;
}

.quaternion-wave-tool {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.quaternion-wave-tool__header {
  display: grid;
  gap: 10px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.quaternion-wave-tool__intro {
  display: grid;
  gap: 6px;
}

.quaternion-wave-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.quaternion-wave-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.quaternion-wave-tool__formula,
.quaternion-field-figure__formula {
  margin: 0;
  color: #1c2a4a;
  line-height: 1.5;
}

.quaternion-wave-tool__controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.quaternion-wave-tool__control {
  display: grid;
  gap: 9px;
}

.quaternion-wave-tool__control-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.quaternion-wave-tool__control-label {
  color: #24365f;
  font-weight: 700;
}

.quaternion-wave-tool__control-value {
  color: #0f1730;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.quaternion-wave-tool__slider {
  width: 100%;
  accent-color: #295ccf;
}

.quaternion-wave-tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.quaternion-wave-tool__panel {
  display: grid;
  gap: 12px;
}

.quaternion-wave-tool__panel-title {
  margin: 0;
  color: #24365f;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.quaternion-wave-tool__canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  background: #fcfcfe;
}

.quaternion-wave-tool__readout {
  display: grid;
  gap: 6px;
  padding: 0 18px 18px;
}

.quaternion-wave-tool__expression,
.quaternion-wave-tool__meta {
  margin: 0;
}

.quaternion-wave-tool__expression {
  color: #0f1730;
  font-weight: 700;
  line-height: 1.45;
}

.quaternion-wave-tool__meta {
  color: #465577;
  line-height: 1.5;
}

.quaternion-field-figure {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.quaternion-field-figure__header {
  display: grid;
  gap: 10px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.quaternion-field-figure__intro {
  display: grid;
  gap: 6px;
}

.quaternion-field-figure__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.quaternion-field-figure__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.quaternion-field-figure__body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 18px;
}

.quaternion-field-figure__stage {
  position: relative;
  min-height: 620px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
}

.quaternion-field-figure__canvas {
  display: block;
  width: 100%;
  height: 620px;
  background: #fcfcfe;
  cursor: grab;
}

.quaternion-field-figure__canvas:active {
  cursor: grabbing;
}

.quaternion-field-figure__panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.quaternion-field-figure__metric {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 16px;
  background: rgba(252, 253, 255, 0.78);
}

.quaternion-field-figure__metric-label {
  color: #5a6d92;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quaternion-field-figure__metric-value {
  color: #0f1730;
  line-height: 1.48;
}

.quaternion-field-figure__note {
  margin: 2px 0 0;
  color: #465577;
  line-height: 1.52;
}

.quaternion-field-figure--scene .quaternion-field-figure__body {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.quaternion-field-figure--scene .quaternion-field-figure__stage {
  min-height: 700px;
}

.quaternion-field-figure--scene .quaternion-field-figure__canvas {
  height: 700px;
}

.quaternion-field-figure__scene-note {
  margin: 0;
  padding: 0 18px 18px;
  color: #465577;
  line-height: 1.52;
}

.hydrogen-orbital-tool {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.hydrogen-orbital-tool__header {
  display: grid;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.hydrogen-orbital-tool__intro {
  display: grid;
  gap: 6px;
}

.hydrogen-orbital-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.hydrogen-orbital-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.hydrogen-orbital-tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.86fr);
}

.hydrogen-orbital-tool__stage {
  position: relative;
  min-height: 640px;
  padding: 18px;
  border-right: 1px solid rgba(159, 177, 220, 0.2);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.08) 46%, transparent 72%),
    linear-gradient(180deg, #fbfcff 0%, #eef3ff 100%);
}

.hydrogen-orbital-tool__canvas {
  display: block;
  width: 100%;
  height: 604px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 20px;
  background: #ffffff;
  cursor: grab;
}

.hydrogen-orbital-tool__canvas:active {
  cursor: grabbing;
}

.hydrogen-orbital-tool__panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.hydrogen-orbital-tool__metric {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 16px;
  background: rgba(252, 253, 255, 0.78);
}

.hydrogen-orbital-tool__metric-label {
  color: #5a6d92;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hydrogen-orbital-tool__metric-value {
  color: #0f1730;
  line-height: 1.48;
}

.hydrogen-orbital-tool__note {
  margin: 2px 0 0;
  color: #465577;
  line-height: 1.52;
}

.matrix-generator-tool {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(237, 242, 255, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.matrix-generator-stack {
  display: grid;
  gap: 18px;
}

.matrix-generator-tool__header {
  display: grid;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(159, 177, 220, 0.2);
}

.matrix-generator-tool__header--simple {
  gap: 14px;
  padding: 18px 20px 16px;
}

.matrix-generator-tool__intro {
  display: grid;
  gap: 6px;
}

.matrix-generator-tool__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.1;
}

.matrix-generator-tool__lead {
  margin: 0;
  color: #465577;
  line-height: 1.48;
}

.matrix-generator-tool__summary {
  display: grid;
  gap: 0;
}

.matrix-generator-tool__summary-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(159, 177, 220, 0.16);
}

.matrix-generator-tool__summary-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.matrix-generator-tool__controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.matrix-generator-tool__control {
  display: grid;
  gap: 6px;
  padding: 0;
}

.matrix-generator-tool__control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.matrix-generator-tool__control-label {
  color: #506181;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.matrix-generator-tool__control-value {
  color: #0f1730;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.92rem;
}

.matrix-generator-tool__slider {
  width: 100%;
}

.matrix-generator-tool__stage {
  position: relative;
  min-height: 592px;
  padding: 16px 20px 20px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.08) 46%, transparent 72%),
    linear-gradient(180deg, #fbfcff 0%, #eef3ff 100%);
}

.matrix-generator-tool__canvas {
  display: block;
  width: 100%;
  height: 556px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 20px;
  background: #ffffff;
}

.matrix-generator-tool--visual .matrix-generator-tool__stage {
  border-bottom: 0;
}

.matrix-generator-tool__board {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.matrix-generator-tool__expression-card,
.matrix-generator-tool__basis-card,
.matrix-generator-tool__matrix-card {
  display: grid;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid rgba(159, 177, 220, 0.18);
  border-radius: 16px;
  background: rgba(252, 253, 255, 0.8);
}

.matrix-generator-tool__metric-label {
  color: #5a6d92;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.matrix-generator-tool__expression,
.matrix-generator-tool__basis-value,
.matrix-generator-tool__note {
  margin: 0;
  color: #0f1730;
  line-height: 1.5;
}

.matrix-generator-tool__summary .matrix-generator-tool__expression {
  font-size: 1.02rem;
}

.matrix-generator-tool__basis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.matrix-generator-tool__matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.matrix-generator-tool__matrix {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  color: #13213d;
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.matrix-generator-tool__matrix-paren {
  font-size: 2rem;
  line-height: 1;
  color: #7b8cab;
  align-self: center;
}

.matrix-generator-tool__matrix-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 8px 18px;
  align-content: center;
  justify-content: center;
}

.matrix-generator-tool__matrix-cell {
  min-width: 54px;
  text-align: right;
  font-size: 0.95rem;
}

.interactive-figure-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(159, 177, 220, 0.2);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #f6f8ff 0%, #edf2ff 100%);
  box-shadow: 0 14px 30px rgba(31, 49, 86, 0.08);
}

.interactive-figure-frame {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
  background: transparent;
}

@media (max-width: 900px) {
  .quaternion-wave-tool__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quaternion-wave-tool__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .quaternion-field-figure__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .quaternion-field-figure__stage {
    min-height: 520px;
  }

  .quaternion-field-figure__canvas {
    height: 520px;
  }

  .hydrogen-orbital-tool__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .hydrogen-orbital-tool__stage {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid rgba(159, 177, 220, 0.2);
  }

  .hydrogen-orbital-tool__canvas {
    height: 484px;
  }

  .matrix-generator-tool__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-generator-tool__stage {
    min-height: 500px;
  }

  .matrix-generator-tool__canvas {
    height: 464px;
  }

  .matrix-generator-tool__basis-grid,
  .matrix-generator-tool__matrix-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .equation-flow-stage {
    min-height: 500px;
    padding: 18px;
  }

  .equation-flow-overlay {
    inset: 0;
  }

  .equation-flow-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .equation-flow-row--split {
    grid-template-columns: 1fr;
  }

  .equation-flow-row--support {
    grid-template-columns: 1fr;
  }

  .equation-flow-separator {
    min-height: 18px;
    justify-content: flex-start;
  }

  .interactive-figure-stage {
    min-height: 400px;
  }

  .interactive-figure-frame {
    height: 400px;
  }

  .field-tabs__controls {
    padding: 12px;
  }

  .complex-phase-tool__body {
    grid-template-columns: 1fr;
  }

  .complex-phase-tool__plane-shell {
    border-right: 0;
    border-bottom: 1px solid rgba(159, 177, 220, 0.2);
    padding: 14px;
  }

  .complex-phase-tool__panel {
    padding: 14px;
  }

  .hydrogen-disc-tool__body {
    grid-template-columns: 1fr;
  }

  .hydrogen-disc-tool__canvas-shell {
    border-right: 0;
    border-bottom: 1px solid rgba(159, 177, 220, 0.2);
    padding: 14px;
  }

  .hydrogen-disc-tool__panel {
    padding: 14px;
  }

  .hydrogen-phase-tool__body {
    grid-template-columns: 1fr;
  }

  .hydrogen-phase-tool__controls {
    padding: 14px;
  }

  .hydrogen-phase-tool__canvas-shell {
    border-right: 0;
    border-bottom: 1px solid rgba(159, 177, 220, 0.2);
    padding: 14px;
  }

  .hydrogen-phase-tool__panel {
    padding: 14px;
  }

  .hydrogen-phase-tool__control-head {
    align-items: start;
    flex-direction: column;
  }

  .hydrogen-spacetime-tool__body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hydrogen-spacetime-tool__stage {
    min-height: 420px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(159, 177, 220, 0.2);
  }

  .hydrogen-spacetime-tool__canvas {
    height: 392px;
  }

  .hydrogen-spacetime-tool__panel {
    padding: 14px;
  }

  .orbital-overlap-figure__controls {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .orbital-overlap-figure__value {
    min-width: 0;
    text-align: left;
  }

  .orbital-overlap-figure__stage {
    min-height: 420px;
  }

  .orbital-overlap-figure__canvas {
    height: 392px;
  }

  .minkowski-globe__controls {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .minkowski-globe__value {
    min-width: 0;
    text-align: left;
  }

  .minkowski-globe__stage {
    min-height: 320px;
  }

  .worldtube-figure__controls {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .worldtube-figure__value {
    min-width: 0;
    text-align: left;
  }

  .worldtube-figure__stage {
    min-height: 420px;
  }

  .worldtube-figure__canvas {
    height: 392px;
  }

  .rotor-figure__controls {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .rotor-figure__value {
    min-width: 0;
    text-align: left;
  }

  .rotor-figure__stage {
    min-height: 420px;
  }

  .rotor-figure__canvas {
    height: 392px;
  }

  .maxwell-boost-figure__controls {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .maxwell-boost-figure__value {
    min-width: 0;
    text-align: left;
  }

  .maxwell-boost-figure__stage {
    min-height: 420px;
  }

  .maxwell-boost-figure__canvas {
    height: 392px;
  }

  .magnetic-bivector-figure__stage {
    min-height: 420px;
  }

  .magnetic-bivector-figure__canvas {
    height: 392px;
  }

  .maxwell-source-figure__stage {
    min-height: 420px;
  }

  .maxwell-source-figure__canvas {
    height: 392px;
  }
}

@media (max-width: 640px) {
  .equation-flow-header {
    padding: 16px 16px 14px;
  }

  .equation-flow-stage {
    min-height: 440px;
    padding: 16px;
  }

  .equation-flow-overlay {
    inset: 0;
  }

  .equation-flow-tab {
    width: 100%;
    justify-content: center;
  }

  .equation-flow-row--hero {
    padding: 16px 10px;
  }

  .field-tabs__tab {
    width: 100%;
    justify-content: center;
  }
}

.algebra-table-stack {
  display: grid;
  grid-template-columns: max-content;
  gap: 10px;
  width: max-content;
}

.algebra-table {
  --algebra-cell-size: 84px;
  border-collapse: collapse;
  width: max-content;
  max-width: none;
  background: #ffffff;
  border: 1px solid #d6dff4;
  table-layout: fixed;
  margin: 0 auto;
}

.algebra-table th,
.algebra-table td {
  border: 1px solid #d6dff4;
  width: var(--algebra-cell-size);
  min-width: var(--algebra-cell-size);
  height: var(--algebra-cell-size);
  padding: 6px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.9rem;
  line-height: 1.2;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.algebra-table th {
  background: #f4f7ff;
  color: #24355f;
  font-weight: 700;
}

.wide-table {
  --algebra-cell-size: 74px;
}

.ultra-wide-table {
  --algebra-cell-size: 62px;
}

.algebra-table.is-interactive .algebra-body-cell {
  cursor: pointer;
}

.algebra-table.is-interactive .algebra-body-cell:focus-visible {
  outline: 2px solid #2f6fe0;
  outline-offset: -2px;
}

.algebra-row-active {
  background: rgba(255, 96, 96, 0.16) !important;
}

.algebra-col-active {
  background: rgba(71, 130, 255, 0.18) !important;
}

.algebra-cell-active {
  background: rgba(43, 202, 139, 0.26) !important;
  box-shadow: inset 0 0 0 2px #2eb786;
}

.algebra-equation {
  margin: 0;
  border: 1px solid #d6dff4;
  border-radius: 8px;
  background: #f8faff;
  padding: 8px 10px;
  color: #2a3552;
  font-size: 0.95rem;
  line-height: 1.35;
  min-height: 36px;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.algebra-equation--html {
  gap: 0.45rem;
  flex-wrap: wrap;
}

.algebra-equation-fragment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
}

.algebra-equation-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2a3552;
  font-weight: 700;
}

.clifford-table-tool {
  margin: 12px 0;
  border: 1px solid #d6dff4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
  padding: 12px;
}

.clifford-motivation {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 16px;
  margin-top: 16px;
}

.clifford-question {
  border: 1px solid #d5def4;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
  padding: 18px;
}

.clifford-question-kicker {
  margin: 0 0 10px 0;
  color: #4060b2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clifford-question-equation {
  margin: 0 0 12px 0;
  border: 1px solid #d8e2f6;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
}

.pythagoras-stepper {
  margin-top: 16px;
  border: 1px solid #d5def4;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f6f9ff 100%);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.pythagoras-stepper-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pythagoras-stepper-tab {
  appearance: none;
  border: 1px solid #d0dbf3;
  border-radius: 999px;
  background: #ffffff;
  color: #36538f;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.pythagoras-stepper-tab:hover {
  border-color: #aebfe9;
  transform: translateY(-1px);
}

.pythagoras-stepper-tab.is-active {
  background: linear-gradient(135deg, #315fc9 0%, #4e78dd 100%);
  border-color: transparent;
  color: #ffffff;
}

.pythagoras-intro-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.82fr);
  gap: 18px;
  align-items: start;
  margin-top: 14px;
  margin-bottom: 18px;
}

.pythagoras-intro-copy {
  display: grid;
  gap: 14px;
}

.pythagoras-intro-copy p {
  margin: 0;
}

.pythagoras-intro-note {
  margin: 0;
}

.pythagoras-intro-figure {
  margin: 0;
}

.pythagoras-stepper-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.pythagoras-copy-card,
.pythagoras-visual-card {
  border: 1px solid #d7e1f5;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
}

.pythagoras-copy-card {
  display: grid;
}

.pythagoras-stepper-panel {
  display: grid;
  gap: 12px;
}

.pythagoras-stepper-panel[hidden] {
  display: none !important;
}

.pythagoras-visual-note {
  margin: 12px 0 0 0;
  color: #536785;
  font-size: 0.96rem;
  line-height: 1.55;
}

.pythagoras-copy-kicker {
  margin: 0 0 10px 0;
  color: #4060b2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pythagoras-equation {
  margin: 0 0 12px 0;
  border: 1px solid #d8e2f6;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
}

.pythagoras-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.orientation-counts-formula {
  margin-top: 16px;
  border: 1px solid #d8e2f6;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 14px;
}

.orientation-counts-lead {
  margin: 0;
  font-size: 1.03rem;
  color: #30426a;
}

.orientation-counts-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.orientation-counts-card {
  margin: 0;
  display: grid;
  gap: 12px;
}

.orientation-counts-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #d8e2f6;
  background: #fbfcff;
}

.orientation-counts-caption {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.orientation-counts-dim {
  margin: 0;
  color: #4060b2;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.orientation-counts-value {
  margin: 0;
  color: #28498b;
  font-size: clamp(1.8rem, 2.7vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
}

.orientation-counts-copy {
  margin: 0;
  color: #536785;
  font-size: 0.96rem;
  line-height: 1.5;
  text-align: center;
}

.orientation-counts-note {
  margin: 0;
  padding-top: 4px;
  color: #536785;
  font-size: 0.98rem;
}

.bivector-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.bivector-gallery-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.bivector-gallery-image {
  width: 100%;
  display: block;
  border: 1px solid #d9e2f4;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(92, 126, 221, 0.08) 0%, rgba(92, 126, 221, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 12px 28px rgba(25, 42, 86, 0.08);
}

.bivector-gallery-caption {
  display: grid;
  gap: 4px;
}

.bivector-gallery-title {
  color: #1f3f7d;
  font-size: 1rem;
  font-weight: 800;
}

.bivector-gallery-copy {
  color: #455982;
  font-size: 0.97rem;
  line-height: 1.45;
}

.basis-symbol-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.basis-symbol-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.basis-symbol-copy {
  display: grid;
  gap: 6px;
}

.basis-symbol-copy h3,
.basis-symbol-copy p {
  margin: 0;
}

.basis-symbol-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.basis-symbol-inline-svg {
  display: block !important;
  height: 1.12em !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 auto;
}

.signature-symbol-inline-svg {
  height: 1.18em !important;
}

.signature-symbol-inline-png {
  display: block;
  height: 1.6em;
  width: auto;
  max-width: none;
  margin: 0 auto;
}

.basis-symbol-inline-combo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
}

.basis-symbol-inline-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.12em;
  line-height: 1;
  color: #1a2648;
  font-size: 1.02em;
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif;
}

.basis-symbol-notation-table {
  width: max-content;
  border-collapse: collapse;
  table-layout: fixed;
}

.basis-symbol-notation-table th,
.basis-symbol-notation-table td {
  padding: 7px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.basis-symbol-notation-table th {
  text-align: left;
  padding-left: 0;
  color: #607190;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.basis-symbol-notation-table td {
  min-width: 3.2rem;
  color: #21345f;
  font-size: 1rem;
}

.basis-symbol-notation-table tr + tr td,
.basis-symbol-notation-table tr + tr th {
  border-top: 1px solid #e2e8f7;
}

.notation-toggle-card {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.notation-toggle-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notation-toggle-button {
  border: 1px solid #d5def4;
  border-radius: 999px;
  background: #fff;
  color: #243968;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.notation-toggle-button:hover,
.notation-toggle-button:focus-visible {
  border-color: #315fc9;
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 95, 201, 0.16);
}

.notation-toggle-button.is-active {
  background: #315fc9;
  border-color: #315fc9;
  color: #fff;
  box-shadow: 0 14px 28px rgba(49, 95, 201, 0.16);
}

.notation-toggle-panel[hidden] {
  display: none !important;
}

.cl20-notation-table td,
.cl20-notation-table th {
  min-width: 4.2rem;
}

.product-structure-tabs {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.product-structure-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-structure-button {
  border: 1px solid #d5def4;
  border-radius: 999px;
  background: #fff;
  color: #243968;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.product-structure-button:hover,
.product-structure-button:focus-visible {
  border-color: #315fc9;
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 95, 201, 0.16);
}

.product-structure-button.is-active {
  background: #315fc9;
  border-color: #315fc9;
  color: #fff;
  box-shadow: 0 14px 28px rgba(49, 95, 201, 0.16);
}

.product-structure-panel[hidden] {
  display: none !important;
}

.product-structure-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 8px;
}

.clifford-logic-rail {
  display: grid;
  gap: 10px;
}

.clifford-logic-step {
  border: 1px solid #d5def4;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
  padding: 14px 15px;
}

.clifford-logic-step h3 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  color: #28498b;
}

.clifford-logic-step p {
  margin: 0;
  font-size: 0.95rem;
}

.clifford-construction {
  margin-top: 16px;
  border: 1px solid #d5def4;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f6f9ff 100%);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.clifford-construction-toolbar {
  display: grid;
  gap: 12px;
}

.clifford-construction-group {
  display: grid;
  gap: 6px;
}

.clifford-construction-label {
  color: #3c5186;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clifford-construction-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clifford-construction-button {
  border: 1px solid #c9d7f4;
  border-radius: 999px;
  background: #ffffff;
  color: #31456f;
  padding: 8px 14px;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease;
}

.clifford-construction-button:hover {
  transform: translateY(-1px);
  border-color: #adc2ef;
  background: #eef4ff;
}

.clifford-construction-button.is-active {
  background: linear-gradient(90deg, rgba(63, 114, 224, 0.96) 0%, rgba(63, 114, 224, 0.82) 100%);
  border-color: rgba(63, 114, 224, 0.96);
  color: #ffffff;
}

.clifford-construction-copy {
  display: grid;
  gap: 6px;
}

.clifford-construction-kicker {
  margin: 0;
  color: #4060b2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clifford-construction-copy h3 {
  margin: 0;
  max-width: 26ch;
  font-size: 1.18rem;
  color: #17326b;
}

.clifford-construction-copy p {
  margin: 0;
  max-width: 76ch;
}

.clifford-construction-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.clifford-construction-meta {
  border: 1px solid #d7e0f3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 14px 16px;
}

.clifford-construction-insight {
  margin: 0;
  color: #30406a;
}

.clifford-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bivector-planar-explorer {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(111, 136, 205, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(84, 120, 223, 0.1) 0%, rgba(84, 120, 223, 0) 48%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7ff 100%);
  box-shadow: 0 18px 36px rgba(25, 42, 86, 0.08);
}

.bivector-planar-head {
  display: grid;
  gap: 14px;
}

.bivector-planar-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bivector-planar-count-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(71, 101, 168, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #40598f;
  font-size: 0.9rem;
  font-weight: 700;
}

.bivector-planar-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bivector-planar-tab {
  appearance: none;
  border: 1px solid #d7e0f3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #304d91;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease, box-shadow 160ms ease;
}

.bivector-planar-tab:hover {
  border-color: #b8c8ef;
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.bivector-planar-tab.is-active {
  border-color: #2f60d4;
  background: linear-gradient(180deg, #3d6fe0 0%, #315fc8 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(49, 95, 200, 0.2);
}

.bivector-planar-panel {
  margin-top: 18px;
}

.bivector-planar-panel[hidden] {
  display: none;
}

.bivector-planar-lead {
  margin: 0 0 14px 0;
  color: #2f426f;
}

.bivector-planar-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bivector-planar-view {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border: 1px solid #d7e0f3;
  border-radius: 18px;
  background: rgba(250, 252, 255, 0.96);
}

.bivector-planar-view-kicker {
  margin: 0;
  color: #4765a8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bivector-planar-view h3 {
  margin: 0;
  color: #1d3b77;
  font-size: 1rem;
}

.bivector-planar-canvas {
  width: 100%;
  min-height: 240px;
  border: 1px solid #d8e2f6;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(95, 127, 221, 0.1) 0%, rgba(95, 127, 221, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.clifford-insight-card {
  border: 1px solid #d7e0f3;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98) 0%, rgba(245, 249, 255, 0.96) 100%);
  padding: 15px 16px;
}

.clifford-insight-kicker {
  margin: 0 0 6px 0;
  color: #4060b2;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clifford-insight-card h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #1d3b77;
}

.clifford-insight-card p {
  margin: 0;
  font-size: 0.95rem;
}

.clifford-split-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.sandwich-motion-callout {
  margin: 14px 0 0 0;
  color: #2f426f;
}

.clifford-split-card {
  border: 1px solid #d7e0f3;
  border-radius: 16px;
  background: rgba(250, 252, 255, 0.92);
  padding: 6px 4px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.clifford-split-card h3 {
  margin: 0;
  color: #1d3b77;
  font-size: 1rem;
}

.clifford-split-card p {
  margin: 0;
}

.sandwich-motion-demo {
  display: grid;
  gap: 10px;
}

.sandwich-sign-line {
  color: #2f426f;
}

.sandwich-motion-canvas {
  width: 100%;
  min-height: 240px;
  border: 1px solid #d8e2f6;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(95, 127, 221, 0.1) 0%, rgba(95, 127, 221, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.sandwich-motion-scrubber {
  display: grid;
  gap: 6px;
  padding: 0;
}

.sandwich-motion-scrubber-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sandwich-motion-label {
  color: #1d3b77;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sandwich-motion-range {
  width: 100%;
  accent-color: #335fc8;
}

.sandwich-motion-readout {
  color: #24345f;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
}

.sandwich-motion-transition {
  min-height: 0;
}

.sandwich-motion-note {
  min-height: 0;
}

.clifford-split-equation {
  margin: 0;
  padding: 0;
}

.clifford-build-table {
  --algebra-cell-size: 86px;
}

.clifford-build-table.is-2d {
  --algebra-cell-size: 94px;
}

.clifford-build-table.is-3d-final,
.clifford-build-table.is-3d-extension {
  --algebra-cell-size: 82px;
}

.clifford-build-table th,
.clifford-build-table td {
  vertical-align: middle;
}

.clifford-symbol {
  display: inline-flex;
  min-width: 54px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #25375f;
}

.clifford-symbol.is-text {
  min-width: 24px;
  min-height: 24px;
  font-weight: 700;
}

.clifford-symbol-sign {
  color: #586b96;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.clifford-symbol-glyph {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.clifford-symbol-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.clifford-symbol-label {
  color: #5c6d92;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.clifford-table-tool .algebra-table {
  --algebra-cell-size: 74px;
}

.clifford-table-tool .wide-table {
  --algebra-cell-size: 64px;
}

.clifford-table-tool .ultra-wide-table {
  --algebra-cell-size: 48px;
}

.clifford-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.clifford-control {
  display: grid;
  gap: 6px;
  color: #31456f;
  font-size: 0.92rem;
  font-weight: 600;
}

.clifford-button-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.clifford-choice {
  min-width: 42px;
  border: 1px solid #cdd8f2;
  border-radius: 8px;
  background: #ffffff;
  color: #23355d;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.clifford-choice:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #b7caef;
}

.clifford-choice.is-active {
  background: #2f6fe0;
  border-color: #2f6fe0;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.clifford-choice:disabled {
  background: #f1f4fb;
  color: #8a97b8;
  border-color: #d8e0f2;
  cursor: not-allowed;
  transform: none;
}

.clifford-meta {
  margin: 10px 0 0 0;
  color: #44557f;
  font-size: 0.94rem;
  line-height: 1.4;
}

.algebra-overview-tool {
  margin: 12px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 12px;
}

.algebra-overview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.algebra-overview-choice {
  border: 1px solid #cdd8f2;
  border-radius: 999px;
  background: #ffffff;
  color: #23355d;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.algebra-overview-choice:hover {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #b7caef;
}

.algebra-overview-choice.is-active {
  background: #2f6fe0;
  border-color: #2f6fe0;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.algebra-overview-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.algebra-overview-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #30406a;
}

.algebra-overview-summary {
  margin: 8px 0 0 0;
  color: #58688f;
  font-size: 0.95rem;
  line-height: 1.45;
}

.algebra-overview-rule {
  margin: 8px 0 0 0;
  color: #31456f;
  font-size: 0.94rem;
  line-height: 1.4;
}

.vector-objects-tool {
  margin: 12px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 10px;
}

.vector-objects-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vector-objects-choice {
  border: 1px solid #cdd8f2;
  border-radius: 999px;
  background: #ffffff;
  color: #23355d;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.vector-objects-choice:hover {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #b7caef;
}

.vector-objects-choice.is-active {
  background: #2f6fe0;
  border-color: #2f6fe0;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.vector-objects-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 6px;
}

.vector-objects-readout {
  margin: 0;
  display: grid;
  gap: 4px;
}

.vector-objects-readout-row {
  display: grid;
  grid-template-columns: minmax(112px, 148px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px solid rgba(214, 223, 242, 0.75);
}

.vector-objects-readout-row:first-child {
  border-top: none;
}

.vector-objects-label {
  margin: 0;
  color: #31456f;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vector-objects-value {
  margin: 0;
  color: #1d2c51;
  min-height: 0;
}

.vector-objects-math {
  margin: 0;
  color: #1d2c51;
  min-height: 0;
}

.vector-objects-math--inline {
  display: flex;
  align-items: center;
  min-height: 30px;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.attention-card {
  border: 1px solid rgba(214, 223, 242, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(240, 245, 255, 0.98) 100%);
  padding: 18px 20px;
}

.attention-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: #30406a;
}

.attention-card p {
  margin: 0;
  color: #4f618b;
}

.attention-card--warm {
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.96) 0%, rgba(255, 243, 225, 0.96) 100%);
}

.structure-constants-tool {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.structure-constants-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.structure-constants-choice {
  border: 1px solid #cdd8f2;
  border-radius: 999px;
  background: #ffffff;
  color: #23355d;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.structure-constants-choice:hover {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #b7caef;
}

.structure-constants-choice.is-active {
  background: #2f6fe0;
  border-color: #2f6fe0;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.structure-constants-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.structure-constants-panel {
  border: 1px solid rgba(214, 223, 242, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(240, 245, 255, 0.98) 100%);
  padding: 18px 20px;
}

.structure-constants-kicker {
  margin: 0 0 6px;
  color: #5a73b5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.structure-constants-panel h3 {
  margin: 0;
  color: #30406a;
  font-size: 1.02rem;
}

.structure-constants-claim {
  margin: 6px 0 0;
  color: #556688;
  line-height: 1.45;
}

.structure-constants-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 78px));
  gap: 0;
  margin-top: 16px;
  justify-content: start;
}

.structure-constants-cell {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  border: 1px solid #d6dff4;
  background: #ffffff;
  color: #24355f;
  font-weight: 700;
}

.structure-constants-cell--header {
  background: #f4f7ff;
}

.structure-constants-cell--axis {
  color: #30406a;
}

.structure-constants-cell--zero {
  color: #93a1c1;
}

.structure-constants-cell--positive {
  background: linear-gradient(180deg, rgba(229, 240, 255, 0.96) 0%, rgba(242, 247, 255, 0.98) 100%);
  color: #264790;
}

.structure-constants-cell--negative {
  background: linear-gradient(180deg, rgba(255, 239, 234, 0.96) 0%, rgba(255, 247, 243, 0.98) 100%);
  color: #92413a;
}

.structure-constants-list {
  display: grid;
  gap: 10px;
}

.structure-constants-list p {
  margin: 0;
  color: #4f618b;
}

.structure-constants-entry {
  border-top: 1px solid rgba(214, 223, 242, 0.75);
  padding-top: 10px;
}

.structure-constants-entry:first-child {
  border-top: none;
  padding-top: 0;
}

.structure-constants-entry strong {
  color: #30406a;
}

@media (max-width: 900px) {
  .algebra-table {
    --algebra-cell-size: 72px;
  }

  .wide-table {
    --algebra-cell-size: 62px;
  }

  .ultra-wide-table {
    --algebra-cell-size: 54px;
  }

  .algebra-table th,
  .algebra-table td {
    font-size: 0.82rem;
    padding: 4px;
  }

  .algebra-overview-choice {
    padding: 7px 10px;
    font-size: 0.88rem;
  }

  .clifford-table-tool .algebra-table {
    --algebra-cell-size: 64px;
  }

  .clifford-table-tool .wide-table {
    --algebra-cell-size: 56px;
  }

  .clifford-table-tool .ultra-wide-table {
    --algebra-cell-size: 42px;
  }

  .vector-objects-choice {
    padding: 7px 10px;
    font-size: 0.88rem;
  }

  .vector-objects-readout-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .attention-grid,
  .structure-constants-layout {
    grid-template-columns: 1fr;
  }

  .structure-constants-grid {
    grid-template-columns: repeat(4, minmax(0, 68px));
  }
}

.operator-decomposition {
  border: 1px solid rgba(152, 171, 214, 0.26);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(245, 248, 255, 0.98) 0%, rgba(237, 242, 255, 0.99) 100%);
  box-shadow: 0 16px 34px rgba(31, 49, 86, 0.08);
  overflow: hidden;
}

.operator-decomposition__header {
  display: grid;
  gap: 16px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(152, 171, 214, 0.18);
}

.operator-decomposition__intro {
  display: grid;
  gap: 7px;
}

.operator-decomposition__title {
  margin: 0;
  color: #0f1730;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.34rem);
  line-height: 1.1;
}

.operator-decomposition__lead {
  margin: 0;
  color: #4a587a;
  line-height: 1.52;
}

.operator-decomposition__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operator-decomposition__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(119, 142, 197, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #24365f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease;
}

.operator-decomposition__tab:hover,
.operator-decomposition__tab:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(70, 100, 184, 0.42);
  box-shadow: 0 8px 18px rgba(41, 72, 142, 0.08);
}

.operator-decomposition__tab.is-active,
.operator-decomposition__tab[aria-selected="true"] {
  background: #295ccf;
  color: #f6f8ff;
  border-color: #295ccf;
}

.operator-decomposition__formula-panels {
  display: grid;
  padding: 16px 20px 0;
}

.operator-decomposition__formula-panel {
  display: none;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(152, 171, 214, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.operator-decomposition__formula-panel.is-active {
  display: grid;
}

.operator-decomposition__formula-kicker {
  margin: 0;
  color: #4d68a8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operator-decomposition__formula {
  margin: 0;
  color: #0f1730;
}

.operator-decomposition__formula mjx-container {
  margin: 0 !important;
}

.operator-decomposition__board-shell {
  overflow-x: auto;
  padding: 12px 16px 0;
}

.operator-decomposition__board {
  display: grid;
  grid-template-columns: 150px repeat(4, minmax(128px, 1fr));
  gap: 8px;
  min-width: 700px;
}

.operator-decomposition__corner,
.operator-decomposition__axis {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 74px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(152, 171, 214, 0.16);
  background: rgba(255, 255, 255, 0.54);
}

.operator-decomposition__corner {
  color: #41557f;
}

.operator-decomposition__corner-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operator-decomposition__corner-main,
.operator-decomposition__axis-main {
  font-size: 1rem;
  font-weight: 800;
  color: #0f1730;
}

.operator-decomposition__corner-sub,
.operator-decomposition__axis-sub {
  color: #5f7094;
  font-size: 0.82rem;
}

.operator-decomposition__cell {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 92px;
  padding: 10px 12px 9px;
  border-radius: 18px;
  border: 1px solid rgba(152, 171, 214, 0.18);
  background: rgba(255, 255, 255, 0.56);
  color: #24365f;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease;
}

.operator-decomposition__cell-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #cf4d5a;
  font-size: 0.76rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity 180ms ease;
}

.operator-decomposition__cell-top {
  display: none;
  padding-right: 1.35rem;
  color: #0f1730;
  font-size: 0.89rem;
  font-weight: 800;
  line-height: 1.15;
}

.operator-decomposition__cell-bottom {
  color: #607291;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.operator-decomposition__board[data-mode="dot"] .operator-decomposition__cell-top--dot,
.operator-decomposition__board[data-mode="wedge"] .operator-decomposition__cell-top--wedge,
.operator-decomposition__board[data-mode="together"] .operator-decomposition__cell-top--together {
  display: block;
}

.operator-decomposition__board[data-mode="dot"] .operator-decomposition__cell--diag,
.operator-decomposition__board[data-mode="together"] .operator-decomposition__cell--diag {
  background: linear-gradient(180deg, rgba(213, 226, 255, 0.96) 0%, rgba(199, 218, 255, 0.98) 100%);
  border-color: rgba(77, 111, 198, 0.34);
  box-shadow: 0 12px 24px rgba(70, 100, 184, 0.08);
}

.operator-decomposition__board[data-mode="wedge"] .operator-decomposition__cell--diag {
  opacity: 0.38;
  background: rgba(255, 255, 255, 0.42);
}

.operator-decomposition__board[data-mode="dot"] .operator-decomposition__cell--upper,
.operator-decomposition__board[data-mode="dot"] .operator-decomposition__cell--lower {
  opacity: 0.3;
}

.operator-decomposition__board[data-mode="wedge"] .operator-decomposition__cell--upper,
.operator-decomposition__board[data-mode="wedge"] .operator-decomposition__cell--lower,
.operator-decomposition__board[data-mode="together"] .operator-decomposition__cell--upper,
.operator-decomposition__board[data-mode="together"] .operator-decomposition__cell--lower {
  background: linear-gradient(180deg, rgba(255, 231, 226, 0.96) 0%, rgba(255, 220, 214, 0.98) 100%);
  border-color: rgba(220, 109, 95, 0.32);
  box-shadow: 0 12px 24px rgba(210, 102, 89, 0.08);
}

.operator-decomposition__board[data-mode="together"] .operator-decomposition__cell {
  transform: translateY(-1px);
}

.operator-decomposition__board[data-mode="wedge"] .operator-decomposition__cell--lower .operator-decomposition__cell-badge {
  opacity: 1;
}

.operator-decomposition__notes {
  display: grid;
  padding: 14px 20px 18px;
}

.operator-decomposition__note {
  display: none;
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #445474;
  line-height: 1.5;
  border: 1px solid rgba(152, 171, 214, 0.16);
}

.operator-decomposition__note.is-active {
  display: block;
}

.note-box {
  border: 1px solid rgba(144, 159, 190, 0.2);
  border-left-width: 4px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(246, 248, 253, 0.88) 0%, rgba(242, 245, 250, 0.92) 100%);
  padding: 16px 18px;
  margin: 18px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.note-box h3 {
  margin: 0 0 8px 0;
  font-size: 0.98rem;
  color: #2c4d96;
}

.note-box.warning {
  border-color: rgba(226, 173, 74, 0.36);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.96) 0%, rgba(255, 246, 227, 0.96) 100%);
}

.note-box.warning h3 {
  color: #87590f;
}

.note-box.convention {
  border-color: rgba(90, 159, 130, 0.28);
  background: linear-gradient(180deg, rgba(242, 251, 247, 0.96) 0%, rgba(235, 246, 240, 0.96) 100%);
}

.note-box.block-note {
  border-color: rgba(101, 126, 196, 0.24);
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96) 0%, rgba(238, 243, 253, 0.96) 100%);
}

.note-box.block-note h3 {
  color: #274b98;
}

.note-box.convention h3 {
  color: #245b49;
}

.chapter-nav {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chapter-nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #f6f8ff;
  border: 1px solid #f6f8ff;
  color: #0f1730 !important;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.chapter-nav-pill:hover {
  text-decoration: none;
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(255, 255, 255, 0.12);
}

.site-rights-notice {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(159, 177, 220, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.92) 0%, rgba(242, 246, 255, 0.96) 100%);
  color: #4a5a78;
  line-height: 1.6;
}

.site-rights-notice p {
  margin: 0;
}

.site-rights-notice a {
  color: #213e84;
  font-weight: 700;
}

.site-rights-notice time {
  font-variant-numeric: tabular-nums;
}

.kvector-explorer {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px;
  display: grid;
  direction: ltr;
  grid-template-columns: minmax(380px, 1.25fr) minmax(320px, 0.95fr);
  grid-template-areas: "view side";
  gap: 10px;
}

.kvector-tabs {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.kvector-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kvector-tab-button {
  border: 1px solid #c9d7f4;
  background: #f8fbff;
  color: #30406a;
  border-radius: 999px;
  min-width: 88px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 760;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease;
}

.kvector-tab-button:hover {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #adc2ef;
}

.kvector-tab-button.is-active {
  background: linear-gradient(90deg, rgba(63, 114, 224, 0.96) 0%, rgba(63, 114, 224, 0.82) 100%);
  border-color: rgba(63, 114, 224, 0.96);
  color: #ffffff;
}

.kvector-tab-panel {
  display: grid;
  gap: 8px;
}

.kvector-tab-panel[hidden] {
  display: none;
}

.kvector-tab-lead {
  margin: 0;
  color: #516384;
}

.matrix-basis-tabs {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.matrix-basis-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matrix-basis-tab-button {
  border: 1px solid #c9d7f4;
  background: #f8fbff;
  color: #30406a;
  border-radius: 999px;
  min-width: 88px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 760;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease;
}

.matrix-basis-tab-button:hover {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #adc2ef;
}

.matrix-basis-tab-button.is-active {
  background: linear-gradient(90deg, rgba(63, 114, 224, 0.96) 0%, rgba(63, 114, 224, 0.82) 100%);
  border-color: rgba(63, 114, 224, 0.96);
  color: #ffffff;
}

.matrix-basis-tab-panel {
  display: grid;
  gap: 10px;
}

.matrix-basis-tab-panel[hidden] {
  display: none;
}

.matrix-basis-tab-lead {
  margin: 0;
  color: #516384;
}

.kvector-view {
  grid-area: view;
  padding: 0;
  background: transparent;
}

.kvector-image-stack {
  position: relative;
  width: min(100%, 640px);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  display: block;
  overflow: hidden;
  background: transparent;
}

.kvector-base-image,
.kvector-overlay-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.kvector-overlay-image {
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}

.kvector-caption {
  margin: 6px 0 0 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #40527d;
}

.kvector-side {
  grid-area: side;
  border: 1px solid #d8e1f4;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  display: grid;
  align-content: start;
  gap: 8px;
}

.kvector-side h3 {
  margin: 0;
  font-size: 1rem;
  color: #30406a;
}

.kvector-side p {
  margin: 0;
  color: #58688f;
  font-size: 0.9rem;
  line-height: 1.35;
}

.kvector-pyramid {
  display: grid;
  gap: 8px;
}

.kvector-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
}

.kvector-symbol {
  border: 1px solid #cfd8ef;
  background: #f8fbff;
  color: #283759;
  border-radius: 8px;
  min-width: 34px;
  padding: 5px 5px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.kvector-symbol:hover {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: #b6c8f0;
}

.kvector-symbol.is-active {
  border-color: var(--kv-color, #2b3e67);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--kv-color, #2b3e67) 65%, white);
  background: color-mix(in srgb, var(--kv-color, #2b3e67) 16%, white);
}

.migration-note {
  border: 1px dashed #9cb1df;
  border-radius: 10px;
  padding: 10px;
  color: #3f4e73;
  background: #f5f8ff;
  margin-top: 16px;
}

.alice-widget {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.alice-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.alice-combined-panel {
  padding: 0;
  overflow: hidden;
}

.alice-container {
  position: relative;
  width: 100%;
  border-bottom: 1px solid #dde5f7;
}

.alice-panel h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #30406a;
}

.alice-space {
  width: 100%;
  height: clamp(380px, 52vw, 620px);
  display: block;
  background: radial-gradient(circle at 18% 12%, #ffffff, #f2f6ff 58%, #e9eefb 100%);
}

.alice-overlay {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(221, 229, 247, 0.8);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.alice-line-overlay {
  width: 100%;
  height: auto;
  min-height: 80px;
  display: block;
  background: transparent;
}

.alice-footer {
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.alice-controls h3 {
  margin: 0 0 4px 0;
  color: #274b98;
}

.alice-hint {
  margin: 0;
  font-size: 0.9rem;
  color: #58688f;
}

.vector-shift-figure {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  margin: 24px 0 18px;
}

.vector-shift-panel {
  border: 1px solid rgba(214, 223, 242, 0.95);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.96) 100%);
  padding: 18px 18px 20px;
}

.vector-shift-panel--old {
  opacity: 0.86;
}

.vector-shift-panel--new {
  box-shadow: 0 16px 34px rgba(68, 99, 168, 0.08);
}

.vector-shift-kicker {
  margin: 0 0 10px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #5370b8;
}

.vector-shift-svg {
  width: 100%;
  height: auto;
  display: block;
}

.vector-shift-svg text {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  fill: #42537f;
}

.vector-shift-caption {
  margin: 8px 0 0;
  color: #4e5d82;
}

.vector-shift-formula {
  margin: 12px 0 0;
  color: #18315f;
}

.basis-elements-lead {
  max-width: 58rem;
}

.basis-elements-image {
  display: block;
  width: min(100%, 1120px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 14px;
}

.basis-elements-image-frame {
  margin: 18px 0 20px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(214, 223, 242, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.96) 100%);
  overflow: hidden;
}

.basis-elements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.basis-elements-card {
  border: 1px solid rgba(214, 223, 242, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.96) 100%);
  padding: 18px 20px;
}

.basis-elements-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: #30406a;
}

.basis-elements-card p {
  margin: 0;
}

.basis-elements-card--attention {
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.96) 0%, rgba(255, 244, 225, 0.96) 100%);
}

.chapter-more {
  margin-top: 22px;
  border: 1px solid rgba(211, 221, 241, 0.95);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.92) 0%, rgba(242, 246, 255, 0.92) 100%);
  overflow: hidden;
}

.chapter-more-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 760;
  color: #28448c;
}

.chapter-more-summary::-webkit-details-marker {
  display: none;
}

.chapter-more-summary::after {
  content: "+";
  float: right;
  color: #5a73b5;
  font-size: 1.2rem;
}

.chapter-more[open] .chapter-more-summary::after {
  content: "\2212";
}

.chapter-more-body {
  padding: 0 22px 22px;
  border-top: 1px solid rgba(211, 221, 241, 0.9);
}

.chapter-more-intro {
  margin: 18px 0 12px;
  color: #556688;
}

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

  .basis-elements-grid {
    grid-template-columns: 1fr;
  }
}

.alice-readout {
  margin: 0;
  font-size: 0.95rem;
  background: #f4f7ff;
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid #d6dff4;
  color: #49597f;
  line-height: 1.35;
}

@media (max-width: 940px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .landing-copy {
    margin-right: 0;
    padding-right: 12px;
  }

  .landing-media {
    width: 100%;
    max-width: 760px;
    justify-self: center;
  }

  .equation-grid {
    grid-template-columns: 1fr;
  }

  .home-contact {
    grid-template-columns: 1fr;
  }

  .chapter-card {
    grid-template-columns: 1fr;
  }

  .chapter-preview {
    min-height: 360px;
  }

  .kvector-explorer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "view"
      "side";
  }

  .kvector-image-stack {
    width: 100%;
  }

  .chapter-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .alice-widget {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .shell {
    padding: 12px;
  }

  .landing-shell {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .landing-copy,
  .equation-card,
  .home-entry-link,
  .home-contact-photo-frame,
  .home-contact-copy,
  .route-card,
  .route-block {
    border-radius: 18px;
  }

  .landing-hero {
    padding: 12px;
    gap: 14px;
  }

  .landing-copy {
    padding: 18px;
  }

  .landing-media {
    padding: 0;
  }

  .landing-title {
    max-width: none;
  }

  .content,
  .hero,
  .card,
  .toc {
    padding: 14px;
  }

  .figure-grid {
    grid-template-columns: 1fr;
  }
}

/* Styling for large interactive tables (like the 97x97 mod tables) */
.large-algebra-table {
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0 auto;
}

.large-algebra-table td {
  width: 5px;
  max-width: 5px;
  min-width: 5px;
  height: 5px;
  padding: 0;
  margin: 0;
  border: none;
  /* remove standard borders to look like pixels */
  cursor: crosshair;
}

.large-algebra-table td:hover {
  outline: 2px solid white;
  z-index: 10;
  position: relative;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.large-table-scroll {
  width: 100%;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.large-table-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  width: 100%;
}

.large-table-equation {
  min-height: 2em;
  margin-top: 0.5rem;
}

/* Styling for 3-tab layout on large tables */
.large-tables-tool {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-block: 2rem;
}

.large-tables-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.large-tables-buttons button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #ccc);
  background: var(--surface-bg, #fff);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.large-tables-buttons button[aria-selected="true"] {
  background: var(--primary-color, #2b5797);
  color: white;
  border-color: var(--primary-color, #2b5797);
}

.large-table-tab-panel {
  display: none;
  width: 100%;
}

.large-table-tab-panel.is-active {
  display: block;
}

.interactive-large-table-host {
  width: 100%;
}

.large-table-container {
  width: 100%;
  justify-items: center;
}

.large-table-scroll {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.large-table-canvas {
  display: block;
  width: min(100%, 768px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;
}

/* Side-by-side algebra definitions */
.algebra-definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.definition-card {
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  background: white;
  border: 1px solid var(--line);
}

.definition-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.definition-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-card {
  border-left: 4px solid #ff9d00;
  background: linear-gradient(to right, #fff9f0, #ffffff);
}

.history-card h3 {
  color: #b36e00;
}

.math-card {
  border-left: 4px solid #0066cc;
  background: linear-gradient(to right, #f0f7ff, #ffffff);
}

.math-card h3 {
  color: #004c99;
}

.math-callout {
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #cce0ff;
}

.field-note {
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
  margin-top: 10px;
}

/* Math comparison diptych (Addition vs Algebra Product) */
.math-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.math-comparison-card {
  border-radius: 12px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.math-comparison-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.math-comparison-card .card-icon {
  font-size: 1.4rem;
}

.addition-card {
  border-top: 4px solid #4CAF50;
}

.addition-card h3 {
  color: #2E7D32;
}

.multiplication-card {
  border-top: 4px solid #F44336;
}

.multiplication-card h3 {
  color: #C62828;
}

.math-comparison-card p {
  margin-bottom: 16px;
  flex-grow: 1;
}

.math-comparison-card .mjx-container[display="true"] {
  margin: 0.8rem auto;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.math-comparison-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-top: auto;
}

/* Modern Card-Based Section Layout — scoped to chapter pages only */
body.chapter-page {
  background:
    radial-gradient(1100px 580px at 12% 0%, rgba(54, 87, 165, 0.14) 0%, rgba(8, 11, 17, 0) 60%),
    radial-gradient(900px 540px at 88% 0%, rgba(121, 141, 190, 0.08) 0%, rgba(8, 11, 17, 0) 62%),
    linear-gradient(180deg, #05070d 0%, #090c15 52%, #05070d 100%);
}

body.chapter-page .shell {
  width: min(1320px, 100%);
  padding-top: 28px;
  padding-bottom: 42px;
}

/* Remove the white frame from the content area on chapter pages */
.chapter-layout .content {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border: none;
  border-radius: 0;
}

/* Dark-themed sidebar TOC */
.chapter-layout .toc {
  background: linear-gradient(180deg, rgba(9, 12, 20, 0.72) 0%, rgba(12, 16, 27, 0.58) 100%);
  border: 1px solid rgba(168, 184, 220, 0.12);
  color: #c6d0ec;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chapter-layout .toc .toc-block-kicker {
  color: #afc2ff;
}

.chapter-layout .toc .toc-block-title {
  color: #eef3ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.chapter-layout .toc .toc-block-text {
  color: #c0cde8;
  max-width: 24ch;
}

.chapter-layout .toc .toc-block {
  gap: 4px;
  padding-bottom: 0;
  border-bottom: 0;
}

.chapter-layout .toc .toc-block-kicker,
.chapter-layout .toc .toc-block-title,
.chapter-layout .toc .toc-block-text {
  display: none;
}

.chapter-layout .toc .toc-chapter-chip {
  color: rgba(222, 231, 255, 0.72);
  font-size: 0.96rem;
}

.chapter-layout .toc .toc-group {
  border-color: rgba(168, 184, 220, 0.08);
}

.chapter-layout .toc .toc-group[open] {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(156, 181, 255, 0.12);
}

.chapter-layout .toc .toc-group-summary {
  transition: background-color 120ms ease, color 120ms ease;
}

.chapter-layout .toc .toc-group-summary:hover {
  background: rgba(255, 255, 255, 0.035);
}

.chapter-layout .toc .toc-group-title {
  color: #edf3ff;
}

.chapter-layout .toc .toc-group-range {
  color: rgba(173, 191, 240, 0.72);
}

.chapter-layout .toc .toc-group-links {
  padding-left: 10px;
}

.chapter-layout .toc .toc-group .toc-chapter-chip {
  font-size: 0.92rem;
}

.chapter-layout .toc .toc-home-link {
  margin-bottom: 10px;
  color: #eef3ff;
  font-weight: 760;
}

.chapter-layout .toc .toc-home-link::before {
  content: "";
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.58rem;
  vertical-align: -0.12rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23eef3ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.2 10 3l7 6.2'/%3E%3Cpath d='M5.5 8.6V17h9V8.6'/%3E%3Cpath d='M8.5 17v-4h3v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.chapter-layout .toc .toc-chapter-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(156, 181, 255, 0.42);
  color: #eef3ff;
}

.chapter-layout .toc .toc-chapter-chip.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(63, 114, 224, 0.95) 0%, rgba(47, 98, 208, 0.72) 100%);
  border-left-color: rgba(255, 255, 255, 0.6);
}

.chapter-layout .toc h2 {
  color: #dfe8ff;
}

.chapter-layout .toc a {
  color: #9cb5ff;
}

.chapter-layout .toc li {
  color: #8899bb;
}

/* Each section becomes a floating white card */
.chapter-layout .content {
  display: grid;
  gap: 26px;
}

.chapter-layout .content>section {
  background: linear-gradient(180deg, rgba(251, 249, 245, 0.985) 0%, rgba(243, 245, 249, 0.975) 100%);
  border-radius: 28px;
  padding: 36px 42px;
  margin-bottom: 0;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.45);
  position: relative;
  overflow: hidden;
}

.chapter-layout .content>section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(49, 90, 181, 0.04) 0%, rgba(49, 90, 181, 0.28) 50%, rgba(49, 90, 181, 0.04) 100%);
}

/* Specific adjustment for the first section */
.chapter-layout .content>section:first-of-type {
  margin-top: 8px;
  padding-top: 42px;
}

/* Ensure headings inside cards don't have excessive top margins */
.chapter-layout .content>section h2:first-child {
  margin-top: 0;
}

.chapter-layout .content>section>p,
.chapter-layout .content>section>ul,
.chapter-layout .content>section>ol,
.chapter-layout .content>section>blockquote {
  max-width: 72ch;
}

.chapter-layout .content>section>h1,
.chapter-layout .content>section>h2,
.chapter-layout .content>section>h3 {
  max-width: 22ch;
}

/* Inside the white chapter cards, interactive blocks should not become full cards again. */
.chapter-layout .content > section > .figure.figure--interactive,
.chapter-layout .content > section > .figure.figure--field-tabs {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* Avoid a second full "card" layer inside the white chapter sections. */
.chapter-layout .content > section .figure--interactive > :is(
  .field-tabs,
  .minkowski-globe,
  .worldtube-figure,
  .rotor-figure,
  .equation-flow,
  .maxwell-boost-figure,
  .magnetic-bivector-figure,
  .maxwell-source-figure,
  .complex-phase-tool,
  .hydrogen-disc-tool,
  .hydrogen-phase-tool,
  .hydrogen-spacetime-tool,
  .orbital-overlap-figure,
  .quaternion-wave-tool,
  .quaternion-field-figure,
  .hydrogen-orbital-tool,
  .matrix-generator-tool,
  .operator-decomposition,
  .clifford-table-tool,
  .large-tables-tool,
  .interactive-figure-stage
) {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

/* Keep the outer interactive block, but remove the extra stage frame inside it. */
.chapter-layout .content > section .figure--interactive :is(
  .minkowski-globe__stage,
  .worldtube-figure__stage,
  .rotor-figure__stage,
  .maxwell-boost-figure__stage,
  .magnetic-bivector-figure__stage,
  .maxwell-source-figure__stage,
  .hydrogen-spacetime-tool__stage,
  .orbital-overlap-figure__stage,
  .quaternion-field-figure__stage,
  .hydrogen-orbital-tool__stage,
  .matrix-generator-tool__stage
) {
  padding: 12px 16px 16px !important;
  border: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.chapter-layout .content > section .figure--interactive :is(
  .minkowski-globe__svg,
  .worldtube-figure__canvas,
  .rotor-figure__canvas,
  .maxwell-boost-figure__canvas,
  .magnetic-bivector-figure__canvas,
  .maxwell-source-figure__canvas,
  .hydrogen-spacetime-tool__canvas,
  .orbital-overlap-figure__canvas,
  .quaternion-field-figure__canvas,
  .hydrogen-orbital-tool__canvas,
  .matrix-generator-tool__canvas
) {
  border: 0 !important;
  box-shadow: none !important;
}

/* Mobile responsive padding for cards */
@media (max-width: 768px) {
  .chapter-layout .content>section {
    padding: 24px 20px;
    border-radius: 12px;
    margin-bottom: 0;
  }

  .pythagoras-stepper-layout,
  .pythagoras-intro-layout,
  .clifford-motivation,
  .clifford-construction-stage,
  .clifford-insight-grid,
  .clifford-split-board,
  .bivector-planar-stage {
    grid-template-columns: 1fr;
  }

  .orientation-counts-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .basis-symbol-grid {
    gap: 18px;
  }

  .basis-symbol-notation-table th,
  .basis-symbol-notation-table td {
    padding: 6px 8px;
  }

  .sandwich-motion-scrubber {
    gap: 8px;
  }

  .sandwich-motion-scrubber-top {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .sandwich-motion-readout {
    text-align: left;
  }

  .sandwich-motion-transition,
  .sandwich-motion-note {
    min-height: 0;
  }

  .clifford-build-table,
  .clifford-build-table.is-2d,
  .clifford-build-table.is-3d-final,
  .clifford-build-table.is-3d-extension {
    --algebra-cell-size: 74px;
  }

  .bivector-gallery {
    grid-template-columns: 1fr;
  }
}

.home-overview-section {
  text-align: center;
}

.home-overview-page .content > section {
  scroll-margin-top: 96px;
}

.home-mobile-header,
.home-mobile-backdrop {
  display: none;
}

.home-mobile-header {
  position: sticky;
  top: 0;
  z-index: 70;
  margin-bottom: 16px;
}

.home-mobile-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(168, 184, 220, 0.16);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(8, 11, 19, 0.92) 0%, rgba(12, 17, 28, 0.9) 100%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.home-mobile-current {
  display: grid;
  gap: 2px;
}

.home-mobile-kicker {
  color: rgba(184, 201, 244, 0.82);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-mobile-title {
  color: #f5f8ff;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 760;
}

.home-mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(179, 197, 241, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f8ff;
  font-size: 0.86rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.home-mobile-progress {
  height: 3px;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.home-mobile-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #7db4ff 0%, #3f72e0 58%, #2857c4 100%);
}

.home-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  border: 0;
  padding: 0;
  background: rgba(4, 7, 13, 0.54);
}

.home-overview-title {
  margin-left: auto;
  margin-right: auto;
  max-width: 14ch !important;
  text-wrap: balance;
}

.home-overview-section > h2,
.home-overview-section > p {
  margin-left: auto;
  margin-right: auto;
}

.home-overview-figure {
  width: min(100%, 760px);
  margin: 24px auto 28px;
}

.home-overview-video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  border: 1px solid rgba(173, 191, 231, 0.18);
  background: rgb(8, 10, 16);
  object-fit: cover;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.24);
}

.home-claim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.home-claim-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px 24px;
  border: 1px solid rgba(159, 177, 220, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.home-claim-card h3 {
  margin: 0;
  color: #0f1730;
  font-size: 1.3rem;
}

.home-claim-card p {
  margin: 0;
}

.home-route-list {
  display: grid;
  gap: 10px;
  line-height: 1.6;
}

.home-route-embed-section {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 28px;
  overflow: visible !important;
  scroll-margin-top: 22px;
}

#route-ch1.home-route-embed-section {
  margin-top: 16px;
}

.home-route-embed-section + .home-route-embed-section {
  margin-top: 34px;
}

.home-route-embed-section::before {
  display: none !important;
}

.home-route-frame {
  display: block;
  width: 100%;
  min-height: 1200px;
  border: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.home-route-frame.is-ready {
  opacity: 1;
  visibility: visible;
}

.home-contact-panel {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 8px;
}

.home-snapshot-panel {
  margin-top: 8px;
  padding: 24px 26px;
  border: 1px solid rgba(159, 177, 220, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.home-snapshot-panel p {
  margin: 0;
  color: #4d5d7b;
  line-height: 1.62;
  max-width: 72ch;
}

.home-snapshot-list {
  margin: 16px 0 0;
  padding-left: 1.2rem;
  color: #4d5d7b;
  line-height: 1.66;
}

.home-snapshot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.rights-page .content > section > p,
.rights-page .content > section > ul {
  max-width: 74ch;
}

.rights-page .content ul {
  padding-left: 1.2rem;
  line-height: 1.66;
  color: #485878;
}

.rights-page .content li + li {
  margin-top: 8px;
}

.home-overview-page .home-contact-photo-frame,
.home-overview-page .home-contact-copy {
  border: 1px solid rgba(159, 177, 220, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: none;
}

.home-overview-page .home-contact-photo-frame::after {
  background: linear-gradient(180deg, rgba(244, 247, 255, 0) 0%, rgba(244, 247, 255, 0.46) 100%);
}

.home-overview-page .home-contact-copy {
  padding: 24px 26px;
}

.home-overview-page .home-contact-copy p {
  margin: 0;
  color: #4d5d7b;
  line-height: 1.62;
  max-width: 54ch;
}

.home-overview-page .home-contact-actions {
  margin-top: 18px;
}

.home-overview-page .chapter-nav {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .home-claim-grid,
  .home-contact-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 940px) {
  .home-mobile-header {
    display: block;
  }

  .home-overview-page .shell {
    padding-top: 0;
  }

  .home-overview-page .toc {
    position: fixed;
    top: 14px;
    left: 14px;
    bottom: 14px;
    width: min(84vw, 320px);
    z-index: 60;
    overflow: auto;
    transform: translateX(calc(-100% - 22px));
    transition: transform 180ms ease;
  }

  body.home-mobile-nav-open {
    overflow: hidden;
  }

  body.home-mobile-nav-open .home-mobile-backdrop {
    display: block;
  }

  body.home-mobile-nav-open .toc {
    transform: translateX(0);
  }

  .home-overview-page .chapter-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .home-overview-page .content {
    min-width: 0;
  }
}

.schrodinger-limit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(111, 136, 205, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(84, 120, 223, 0.12) 0%, rgba(84, 120, 223, 0) 48%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7ff 100%);
  box-shadow: 0 18px 36px rgba(25, 42, 86, 0.08);
}

.schrodinger-limit-hero__main,
.schrodinger-limit-hero__stats {
  display: grid;
  gap: 12px;
}

.schrodinger-limit-hero__eyebrow {
  margin: 0;
  color: #5876bb;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schrodinger-limit-hero__formula {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(128, 152, 214, 0.24);
}

.schrodinger-limit-hero__formula .mjx-container[display="true"] {
  margin: 0.2rem auto;
}

.schrodinger-limit-hero__text {
  margin: 0;
  color: #314264;
  line-height: 1.55;
}

.schrodinger-limit-hero__stats {
  align-content: start;
}

.schrodinger-limit-hero__stat {
  padding: 16px 16px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(128, 152, 214, 0.22);
}

.schrodinger-limit-hero__stat-label {
  display: block;
  color: #6880b1;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.schrodinger-limit-hero__stat-value {
  display: block;
  margin-top: 8px;
  color: #18284d;
  font-size: 1rem;
  line-height: 1.35;
}

.schrodinger-limit-hero__stat-text {
  margin: 8px 0 0 0;
  color: #4b5d84;
  font-size: 0.93rem;
  line-height: 1.45;
}

.schrodinger-derivation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.schrodinger-derivation-card {
  border: 1px solid rgba(159, 177, 220, 0.24);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(239, 244, 255, 0.98) 100%);
  box-shadow: 0 12px 24px rgba(31, 49, 86, 0.06);
}

.schrodinger-derivation-card--accent {
  background:
    radial-gradient(circle at top right, rgba(49, 111, 224, 0.12) 0%, rgba(49, 111, 224, 0) 44%),
    linear-gradient(180deg, rgba(246, 249, 255, 0.98) 0%, rgba(232, 239, 255, 0.98) 100%);
  border-color: rgba(93, 129, 216, 0.32);
}

.schrodinger-derivation-card__step {
  margin: 0 0 8px 0;
  color: #5875bb;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schrodinger-derivation-card h3 {
  margin: 0;
  color: #17284d;
  font-size: 1.04rem;
}

.schrodinger-derivation-card__formula {
  margin-top: 14px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(132, 154, 212, 0.2);
}

.schrodinger-derivation-card__formula .mjx-container[display="true"] {
  margin: 0.1rem auto;
}

.schrodinger-derivation-card p:last-child {
  margin-bottom: 0;
  color: #35486f;
  line-height: 1.5;
}

.schrodinger-formula-panel {
  margin-top: 20px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(157, 176, 220, 0.22);
  background:
    radial-gradient(circle at top left, rgba(87, 122, 216, 0.1) 0%, rgba(87, 122, 216, 0) 42%),
    linear-gradient(180deg, #fcfdff 0%, #f5f8ff 100%);
  box-shadow: 0 16px 30px rgba(31, 49, 86, 0.06);
}

.schrodinger-formula-panel--spotlight {
  margin-top: 0;
}

.schrodinger-spotlight {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.schrodinger-spotlight__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schrodinger-spotlight__tab {
  border: 1px solid rgba(135, 157, 214, 0.22);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.92);
  color: #31476f;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.schrodinger-spotlight__tab:hover,
.schrodinger-spotlight__tab:focus-visible {
  transform: translateY(-1px);
  background: #eef4ff;
  border-color: rgba(98, 132, 215, 0.38);
  outline: none;
}

.schrodinger-spotlight__tab.is-active {
  background: #275fca;
  border-color: #275fca;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.schrodinger-spotlight__panels {
  display: grid;
}

.schrodinger-spotlight__panel {
  display: none;
}

.schrodinger-spotlight__panel.is-active {
  display: block;
}

.schrodinger-formula-panel__kicker {
  margin: 0 0 12px 0;
  color: #5a76ba;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schrodinger-formula-panel__formula {
  padding: 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(129, 153, 214, 0.22);
}

.schrodinger-formula-panel__formula .mjx-container[display="true"] {
  margin: 0.15rem auto;
  overflow-x: auto;
  overflow-y: hidden;
}

.schrodinger-formula-panel__note {
  margin: 14px 0 0 0;
  color: #405277;
  line-height: 1.5;
}

.schrodinger-term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.schrodinger-term-card {
  padding: 18px;
  border-radius: 18px;
  background: #fbfcff;
  border: 1px solid rgba(158, 176, 220, 0.22);
  box-shadow: 0 10px 24px rgba(31, 49, 86, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.schrodinger-term-card--dominant {
  background: linear-gradient(180deg, #f4fbf8 0%, #f9fffc 100%);
  border-color: rgba(78, 178, 126, 0.22);
}

.schrodinger-term-card--suppressed {
  background: linear-gradient(180deg, #fff8f6 0%, #fffdfc 100%);
  border-color: rgba(219, 121, 88, 0.22);
}

.schrodinger-term-card__label {
  margin: 0 0 10px 0;
  color: #5b76b4;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schrodinger-term-card__formula {
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(133, 155, 213, 0.18);
}

.schrodinger-term-card__formula .mjx-container[display="true"] {
  margin: 0.1rem auto;
}

.schrodinger-term-card p:last-child {
  margin-bottom: 0;
  color: #3f5178;
  line-height: 1.5;
}

.schrodinger-term-card.is-emphasized,
.schrodinger-result-box.is-emphasized {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(31, 49, 86, 0.1);
}

.schrodinger-term-card.is-muted,
.schrodinger-result-box.is-muted {
  opacity: 0.5;
}

.schrodinger-term-card--dominant.is-emphasized {
  border-color: rgba(69, 166, 112, 0.42);
}

.schrodinger-term-card--suppressed.is-emphasized {
  border-color: rgba(217, 123, 89, 0.42);
}

.schrodinger-result-box {
  margin-top: 18px;
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(26, 92, 199, 0.08) 0%, rgba(255, 255, 255, 0.96) 46%, rgba(65, 159, 121, 0.08) 100%);
  border: 1px solid rgba(101, 132, 213, 0.24);
  box-shadow: 0 16px 30px rgba(31, 49, 86, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.schrodinger-result-box__kicker {
  margin: 0 0 10px 0;
  color: #5674b8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schrodinger-result-box__formula {
  padding: 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(132, 154, 214, 0.22);
}

.schrodinger-result-box__formula .mjx-container[display="true"] {
  margin: 0.1rem auto;
}

.schrodinger-result-box__text {
  margin: 14px 0 0 0;
  color: #32456b;
  line-height: 1.55;
}

.schrodinger-result-box.is-emphasized {
  border-color: rgba(74, 119, 215, 0.36);
}

.schrodinger-comparison-formula {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(129, 153, 214, 0.18);
  background: rgba(255, 255, 255, 0.76);
}

.schrodinger-comparison-formula .mjx-container[display="true"] {
  margin: 0.1rem auto;
}

@media (max-width: 980px) {
  .schrodinger-limit-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .schrodinger-limit-hero,
  .schrodinger-formula-panel,
  .schrodinger-result-box {
    padding: 18px;
    border-radius: 18px;
  }

  .schrodinger-spotlight__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .schrodinger-spotlight__tab {
    width: 100%;
    justify-content: center;
  }

  .schrodinger-derivation-card,
  .schrodinger-term-card {
    padding: 16px;
  }

  .schrodinger-limit-hero__formula,
  .schrodinger-derivation-card__formula,
  .schrodinger-formula-panel__formula,
  .schrodinger-term-card__formula,
  .schrodinger-result-box__formula,
  .schrodinger-comparison-formula {
    padding: 12px;
  }
}
