:root {
  --bg: #06111a;
  --bg-soft: rgba(9, 21, 32, 0.78);
  --bg-card: rgba(15, 28, 42, 0.7);
  --bg-card-strong: rgba(18, 35, 50, 0.9);
  --line: rgba(153, 203, 255, 0.16);
  --text: #edf7ff;
  --text-dim: #a9bfd0;
  --heading: #f8fbff;
  --accent: #57d4ff;
  --accent-2: #9cffb7;
  --accent-3: #ffd36e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --radius-sm: 14px;
  --content: min(1440px, calc(100vw - 32px));
  --transition: 240ms ease;
}

body[data-theme="warm"] {
  --bg: #180f0b;
  --bg-soft: rgba(33, 20, 12, 0.78);
  --bg-card: rgba(45, 23, 15, 0.68);
  --bg-card-strong: rgba(56, 29, 17, 0.92);
  --line: rgba(255, 200, 121, 0.18);
  --text: #fff7ef;
  --text-dim: #ddc7b7;
  --heading: #fffdfa;
  --accent: #ffa55b;
  --accent-2: #ffe284;
  --accent-3: #9cf0b9;
}

body[data-theme="light"] {
  --bg: #f2eadb;
  --bg-soft: rgba(255, 252, 244, 0.82);
  --bg-card: rgba(255, 255, 255, 0.76);
  --bg-card-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(24, 75, 105, 0.2);
  --text: #142433;
  --text-dim: #526a78;
  --heading: #071723;
  --accent: #007fa7;
  --accent-2: #0a8a67;
  --accent-3: #b36b00;
  --shadow: 0 24px 72px rgba(35, 73, 98, 0.14);
  color-scheme: light;
  background:
    radial-gradient(circle at top left, rgba(0, 127, 167, 0.16), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(10, 138, 103, 0.13), transparent 24%),
    linear-gradient(180deg, #fbf7ee 0%, var(--bg) 52%, #e9ddca 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

section[id],
details[id],
[data-manual-item],
.lesson-section[id],
.manual-detail,
.anchor-alias,
.chapter-card[id],
.translation-card[id] {
  scroll-margin-top: 150px;
}

.anchor-alias {
  display: block;
  height: 0;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.16), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(156, 255, 183, 0.12), transparent 24%),
    linear-gradient(180deg, #071018 0%, var(--bg) 45%, #050b10 100%);
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 24px rgba(87, 212, 255, 0.45);
}

.particle-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 32%, transparent 95%);
  pointer-events: none;
  opacity: 0.45;
}

.bg-orb {
  position: fixed;
  width: 36vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.18;
  pointer-events: none;
}

.orb-a {
  left: -8vw;
  top: 6vh;
  background: var(--accent);
}

.orb-b {
  right: -10vw;
  top: 42vh;
  background: var(--accent-2);
}

.orb-c {
  left: 35vw;
  bottom: -10vh;
  background: var(--accent-3);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: var(--content);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 16, 24, 0.68);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), transparent);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.3rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.topnav a,
.theme-toggle {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition), transform var(--transition);
}

.topnav a:hover,
.theme-toggle:hover {
  color: var(--heading);
  transform: translateY(-1px);
}

.nav-menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.nav-primary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.72;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 80;
  width: max-content;
  min-width: 190px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(123, 215, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(18, 42, 58, 0.96), rgba(9, 20, 30, 0.94)),
    rgba(6, 17, 26, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-menu-item:hover .nav-dropdown,
.nav-menu-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.topnav .nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  white-space: nowrap;
}

.topnav .nav-dropdown a:hover {
  color: var(--heading);
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.14), rgba(156, 255, 183, 0.1));
  transform: none;
}

body[data-theme="light"] .nav-dropdown {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 252, 248, 0.95)),
    rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 127, 167, 0.2);
  box-shadow: 0 22px 60px rgba(35, 73, 98, 0.18);
}

main a:not(.button):not(.anchor-card):not(.search-jump-chip):not(.brand):not(.hero-brand-tile):not(.media-link):not(.home-flow-tile):not(.home-product-card) {
  color: #8feaff;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(143, 234, 255, 0.8);
  font-weight: 600;
}

main a:not(.button):not(.anchor-card):not(.search-jump-chip):not(.brand):not(.hero-brand-tile):not(.media-link):not(.home-flow-tile):not(.home-product-card):hover {
  color: var(--accent-2);
  text-decoration-color: rgba(156, 255, 183, 0.95);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

body[data-theme="light"] .topbar {
  background: rgba(255, 252, 244, 0.74);
}

body[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(18, 64, 86, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 64, 86, 0.06) 1px, transparent 1px);
  opacity: 0.72;
}

body[data-theme="light"] .particle-layer {
  opacity: 0.2;
}

body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .command-launcher {
  background: rgba(255, 255, 255, 0.62);
}

body[data-theme="light"] main a:not(.button):not(.anchor-card):not(.search-jump-chip):not(.brand):not(.hero-brand-tile):not(.media-link):not(.home-flow-tile):not(.home-product-card) {
  color: #006f91;
  text-decoration-color: rgba(0, 111, 145, 0.72);
}

body[data-theme="light"] main a:not(.button):not(.anchor-card):not(.search-jump-chip):not(.brand):not(.hero-brand-tile):not(.media-link):not(.home-flow-tile):not(.home-product-card):hover {
  color: #0a7458;
  text-decoration-color: rgba(10, 116, 88, 0.86);
}

.command-launcher {
  position: fixed;
  right: 24px;
  bottom: 26px;
  z-index: 30;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.18), rgba(156, 255, 183, 0.12));
  color: var(--heading);
  backdrop-filter: blur(16px);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 13, 0.58);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .command-palette {
  background: rgba(248, 241, 228, 0.68);
}

.command-palette.is-open {
  display: grid;
}

.command-dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 20px;
}

.command-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.command-top h3,
.command-top button {
  margin: 0;
}

.command-top button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.command-dialog input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.command-list {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 480px);
  overflow: auto;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.command-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

main {
  width: var(--content);
  margin: 28px auto 0;
  padding-bottom: 80px;
}

.page-hero {
  margin-top: 10px;
  padding: 34px 32px;
  border-radius: calc(var(--radius) + 4px);
}

.page-hero h1 {
  margin: 6px 0 12px;
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.14;
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.section-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.14), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(156, 255, 183, 0.12), transparent 24%),
    rgba(255, 255, 255, 0.03);
}

.section-hero::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.section-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.section-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.page-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.page-stat {
  min-width: 132px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.page-stat strong,
.page-stat span {
  display: block;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.page-stat small {
  color: var(--text-dim);
}

.hero-side-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-content: start;
}

.hero-side-card {
  height: 100%;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 22, 34, 0.72);
}

.hero-side-card p {
  margin: 0;
}

.hero-side-card strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--heading);
  font-size: 1.02rem;
  line-height: 1.28;
}

.surface-note {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.compact-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.compact-list li {
  margin-bottom: 6px;
}

.quick-anchor-grid,
.insight-band {
  display: grid;
  gap: 18px;
}

.quick-anchor-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.anchor-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(9, 20, 31, 0.72);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.anchor-card:hover {
  transform: translateY(-2px);
  border-color: rgba(87, 212, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(87, 212, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(9, 20, 31, 0.8);
}

.anchor-card h3,
.insight-card h3 {
  margin: 8px 0 10px;
  color: var(--heading);
}

.anchor-card p:last-child,
.insight-card p:last-child {
  margin-bottom: 0;
}

.insight-band {
  grid-template-columns: repeat(3, 1fr);
}

.insight-card {
  min-height: 196px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.panel,
.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 28px;
  padding: 44px;
  border-radius: calc(var(--radius) + 10px);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 40%;
  height: 50%;
  background:
    linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at center, rgba(87, 212, 255, 0.22), transparent 70%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero h1,
.section h2 {
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 5rem);
  margin: 8px 0 18px;
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.hero-lead {
  max-width: none;
  font-size: 1.08rem;
  line-height: 1.72;
  color: var(--text);
}

.hero-lead,
.page-hero > p:not(.eyebrow),
.section-head > p:not(.eyebrow),
.manifesto-copy,
.hero-stage-link p,
.hero-card p,
.visual-copy p,
.insight-card p,
.product-card > p:not(.product-tag),
.principle-item p,
.surface-note,
.search-gateway-copy p,
.search-result-card p,
.search-result-excerpt,
.search-result-meta {
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 0;
  font: inherit;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #03111a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.button.secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero-meta {
  display: none;
}

.hero-meta > div {
  min-width: 140px;
}

.metric {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
}

.hero-visual {
  display: grid;
  gap: 18px;
  align-content: center;
}

.hero-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card-strong);
}

.hero-card ol,
.hero-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.spectrum {
  background:
    linear-gradient(180deg, rgba(87, 212, 255, 0.12), transparent),
    var(--bg-card-strong);
}

.radar {
  background:
    linear-gradient(180deg, rgba(255, 211, 110, 0.12), transparent),
    var(--bg-card-strong);
}

.live-panel {
  background:
    linear-gradient(180deg, rgba(156, 255, 183, 0.12), transparent),
    var(--bg-card-strong);
}

.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(156, 255, 183, 0.75);
  animation: pulse 1.8s infinite;
}

.hero-mini-chart,
.viz {
  width: 100%;
  min-height: 220px;
}

#turnoverStrategyChart,
#turnoverEvidenceChart {
  min-height: 360px;
}

.viz.viz-tall {
  min-height: 340px;
}

.viz.viz-xl {
  min-height: 430px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 6px;
  margin-top: 14px;
  align-items: end;
  height: 56px;
}

.signal-strip span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.85;
  transform-origin: bottom;
  animation: bounce 1.8s infinite ease-in-out;
}

.section {
  margin-top: 74px;
}

.section-head {
  margin-bottom: 26px;
  max-width: 100%;
}

.section h2 {
  font-size: clamp(1.72rem, 2.65vw, 2.7rem);
  margin: 8px 0 14px;
  line-height: 1.16;
}

.overview-grid,
.frontier-grid,
.product-matrix,
.playbook-grid,
.takeaways,
.portal-grid,
.case-grid {
  display: grid;
  gap: 18px;
}

.overview-grid {
  grid-template-columns: repeat(4, 1fr);
}

.portal-grid {
  grid-template-columns: repeat(3, 1fr);
}

.case-grid {
  grid-template-columns: repeat(3, 1fr);
}

.portal-card {
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(87, 212, 255, 0.46);
  background: linear-gradient(180deg, rgba(87, 212, 255, 0.08), transparent), var(--bg-card);
}

.card {
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  margin: 0 0 10px;
  color: var(--heading);
}

.big-diagram {
  margin-top: 18px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.pipeline-step {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.pipeline-step span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(87, 212, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.tabs {
  display: grid;
  gap: 16px;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-buttons button,
.scenario-buttons button,
#literatureFilter {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.tab-buttons button:hover,
.scenario-buttons button:hover,
#literatureFilter:hover {
  transform: translateY(-1px);
}

.tab-buttons button.is-active,
.scenario-buttons button.is-active {
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.24), rgba(156, 255, 183, 0.16));
  border-color: rgba(87, 212, 255, 0.5);
}

.tab-panel {
  display: none;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.tab-panel.is-active {
  display: block;
}

.bullet-list,
.number-list {
  padding-left: 20px;
  margin: 0;
}

.bullet-list.compact li,
.number-list li {
  margin-bottom: 6px;
}

.frontier-grid,
.playbook-grid {
  grid-template-columns: repeat(2, 1fr);
}

.curriculum-grid,
.faq-list,
.atlas-grid,
.qc-grid,
.milestone-rail,
.masterclass-grid,
.advanced-topic-grid,
.reading-room-grid,
.abbr-grid {
  display: grid;
  gap: 18px;
}

.curriculum-grid {
  grid-template-columns: repeat(3, 1fr);
}

.atlas-grid,
.qc-grid {
  grid-template-columns: repeat(2, 1fr);
}

.masterclass-grid,
.advanced-topic-grid,
.reading-room-grid {
  grid-template-columns: repeat(2, 1fr);
}

.abbr-grid {
  grid-template-columns: repeat(2, 1fr);
}

.course-evidence-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  margin-bottom: 18px;
}

.course-evidence-summary {
  min-height: 100%;
}

.evidence-track-grid,
.evidence-stage-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.evidence-track-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.evidence-stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.evidence-track-card,
.evidence-stage-card {
  position: relative;
  overflow: hidden;
}

.evidence-track-card::after,
.evidence-stage-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.1;
  background: var(--accent);
  pointer-events: none;
}

.evidence-focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}

.evidence-paper-list {
  margin-top: 14px;
}

.evidence-paper-list strong {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--heading);
}

.evidence-paper-list a {
  color: var(--heading);
  text-decoration: underline;
  text-decoration-color: rgba(87, 212, 255, 0.42);
  text-underline-offset: 3px;
}

.evidence-paper-list a:hover {
  color: var(--accent-2);
  text-decoration-color: rgba(156, 255, 183, 0.52);
}

.literature-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.literature-toolbar label {
  display: block;
  margin-bottom: 10px;
  color: var(--heading);
}

.curriculum-card {
  position: relative;
  overflow: hidden;
}

.curriculum-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-bottom: 12px;
  background: rgba(87, 212, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.curriculum-level {
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.atlas-card,
.qc-card,
.milestone-card,
.masterclass-card,
.advanced-topic-card,
.reading-card {
  position: relative;
  overflow: hidden;
}

.masterclass-card::after,
.advanced-topic-card::after,
.reading-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.12;
  background: var(--accent);
  pointer-events: none;
}

.reading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.reading-card h3 {
  margin-bottom: 8px;
}

.reading-card a {
  color: var(--accent-2);
  text-decoration: none;
}

.reading-card a:hover {
  text-decoration: underline;
}

.comparison-table-wrap {
  overflow: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  color: var(--heading);
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.04);
}

.comparison-table td {
  color: var(--text-dim);
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.media-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.media-figure {
  display: block;
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(8, 19, 30, 0.76);
  box-shadow: var(--shadow);
}

.media-link {
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.media-link:hover {
  transform: translateY(-2px);
  border-color: rgba(87, 212, 255, 0.34);
  box-shadow: 0 22px 42px rgba(4, 10, 16, 0.32);
}

[data-card-link] {
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

[data-card-link]:hover {
  transform: translateY(-2px);
  border-color: rgba(87, 212, 255, 0.3);
  box-shadow: 0 22px 42px rgba(4, 10, 16, 0.3);
}

[data-card-link]:focus-visible {
  outline: 2px solid rgba(87, 212, 255, 0.9);
  outline-offset: 4px;
}

.media-figure.wide {
  grid-column: span 2;
}

.media-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  box-sizing: border-box;
  padding: 12px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.08), transparent 32%),
    rgba(4, 10, 16, 0.92);
}

.media-figure.logo img {
  object-fit: contain;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.12), transparent 34%),
    rgba(8, 19, 30, 0.92);
}

.media-figure.contain img {
  object-fit: contain;
  padding: 12px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.08), transparent 32%),
    rgba(8, 19, 30, 0.92);
}

.media-figure figcaption,
.media-caption {
  display: block;
  padding: 14px 16px 18px;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.68;
}

.media-figure figcaption strong,
.media-caption strong {
  display: block;
  margin-bottom: 6px;
  color: var(--heading);
  font-size: 1rem;
}

.visual-card {
  overflow: hidden;
}

.visual-card.wide {
  grid-column: 1 / -1;
}

.visual-copy {
  margin-bottom: 12px;
}

.visual-copy h3 {
  margin-bottom: 8px;
}

.module dl {
  margin: 14px 0 0;
}

.module dt {
  color: var(--accent-2);
  font-weight: 700;
  margin-top: 8px;
}

.module dd {
  margin: 4px 0 0;
  color: var(--text-dim);
}

.product-matrix {
  grid-template-columns: repeat(3, 1fr);
}

.product-tag {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.scenario-selector {
  margin-top: 20px;
}

.selector-head {
  margin-bottom: 14px;
}

.scenario-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scenario-output {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.decision-lab {
  display: grid;
  gap: 18px;
}

.decision-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.decision-controls label {
  display: grid;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.decision-controls select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.resource-catalog-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(180px, 1fr));
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: var(--radius);
}

.resource-catalog-controls label {
  display: grid;
  gap: 8px;
  color: var(--text-dim);
  font-weight: 650;
}

.resource-catalog-controls input,
.resource-catalog-controls select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

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

.resource-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: var(--radius);
}

.resource-card img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  padding: 12px;
  background: rgba(4, 10, 16, 0.92);
  border-bottom: 1px solid var(--line);
}

.resource-card-body {
  padding: 20px;
}

.resource-card-body h3 {
  margin: 6px 0 10px;
  line-height: 1.28;
}

.resource-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.resource-card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.decision-result {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.decision-result h3 {
  margin-top: 0;
}

.faq-item {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.milestone-rail {
  grid-template-columns: repeat(5, 1fr);
}

.milestone-card::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -40px;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.milestone-card:first-child::before {
  display: none;
}

.milestone-step {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(87, 212, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.faq-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.faq-button span:last-child {
  color: var(--accent);
  font-size: 1.2rem;
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--text-dim);
}

.faq-item.is-open .faq-answer {
  display: block;
}

.literature-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.glossary-toolbar {
  margin-bottom: 14px;
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.8rem;
}

.literature-grid,
.glossary-list {
  display: grid;
  gap: 14px;
}

.literature-grid {
  grid-template-columns: repeat(2, 1fr);
}

.literature-card {
  position: relative;
  overflow: hidden;
}

.literature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.literature-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.8rem;
}

.literature-card a {
  color: var(--accent-2);
  text-decoration: none;
}

.literature-card a:hover {
  text-decoration: underline;
}

.glossary-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0 16px;
  margin-bottom: 18px;
  font-size: 1rem;
}

.glossary-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.glossary-item h3 {
  margin: 0 0 8px;
}

.glossary-extra {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.glossary-extra p {
  margin: 0 0 8px;
}

.related-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.related-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
}

.related-link:hover {
  border-color: rgba(87, 212, 255, 0.48);
  color: var(--heading);
}

.abbr-card h3 {
  margin-bottom: 6px;
}

.software-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(87, 212, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(156, 255, 183, 0.16), transparent 30%),
    rgba(255, 255, 255, 0.03);
}

.hero-chapter-status {
  display: grid;
  gap: 6px;
  margin: -2px 0 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(87, 212, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.12), rgba(156, 255, 183, 0.07)),
    rgba(255, 255, 255, 0.03);
}

.hero-chapter-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-chapter-title {
  color: var(--heading);
  font-size: 1.08rem;
  line-height: 1.45;
}

.hero-chapter-step {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.hero-chapter-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.hero-chapter-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(87, 212, 255, 0.28);
  transition: width 220ms ease;
}

.study-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.study-sidebar {
  position: sticky;
  top: 108px;
}

.lesson-nav {
  display: grid;
  gap: 10px;
}

.lesson-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.lesson-nav a:hover {
  border-color: rgba(87, 212, 255, 0.42);
  color: var(--heading);
  transform: translateX(4px);
}

.lesson-status {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.lesson-status-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lesson-status-title {
  display: block;
  color: var(--heading);
  font-size: 1.06rem;
  line-height: 1.45;
}

.lesson-status-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.lesson-status-hint {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

.study-content,
.lesson-section {
  display: grid;
  gap: 18px;
}

.lesson-switch-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.lesson-switch-progress {
  min-width: 132px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}

.lesson-step-button {
  width: 100%;
  min-height: 52px;
  padding: 10px 18px;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.lesson-step-button[disabled] {
  opacity: 0.42;
  cursor: default;
  box-shadow: none;
}

.study-table {
  width: 100%;
  border-collapse: collapse;
}

.study-table th,
.study-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.study-table th {
  color: var(--heading);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.study-table a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(87, 212, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.18), rgba(156, 255, 183, 0.1)),
    rgba(255, 255, 255, 0.04);
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.study-table a:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 255, 183, 0.44);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.24), rgba(156, 255, 183, 0.16)),
    rgba(255, 255, 255, 0.06);
  color: var(--heading);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(5, 10, 18, 0.2);
}

.study-table td a + a {
  margin-left: 6px;
}

.manual-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manual-jump-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(87, 212, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.2), rgba(156, 255, 183, 0.12)),
    rgba(255, 255, 255, 0.03);
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  white-space: normal;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    color var(--transition);
}

.manual-jump-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 255, 183, 0.46);
  box-shadow: 0 12px 28px rgba(5, 10, 18, 0.24);
}

.manual-map,
.translation-grid,
.manual-gallery,
.dual-grid,
.source-list,
.appendix-grid {
  display: grid;
  gap: 16px;
}

.manual-map,
.translation-grid,
.manual-gallery,
.dual-grid,
.appendix-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter-card,
.translation-card,
.source-item {
  position: relative;
  overflow: hidden;
}

.chapter-card::before,
.translation-card::before,
.source-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.chapter-card p > a,
.translation-card p > a,
.source-item p > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(87, 212, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.22), rgba(156, 255, 183, 0.12)),
    rgba(255, 255, 255, 0.03);
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(5, 10, 18, 0.24);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}

.chapter-card p > a:hover,
.translation-card p > a:hover,
.source-item p > a:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 255, 183, 0.52);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.3), rgba(156, 255, 183, 0.2)),
    rgba(255, 255, 255, 0.05);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 32px rgba(5, 10, 18, 0.3);
}

.manual-figure {
  margin: 0;
}

.manual-figure img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.manual-figure figcaption {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

.pill.subtle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

.figure-atlas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.figure-atlas-card {
  display: grid;
  gap: 16px;
}

.figure-atlas-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.figure-note {
  margin: 0;
  color: var(--text);
}

body[data-page="software"] .manual-gallery {
  grid-template-columns: 1fr;
  gap: 24px;
}

body[data-page="software"] .page-hero {
  padding: 28px 30px 24px;
}

body[data-page="software"] main > .section {
  margin-top: 14px;
}

body[data-page="software"] .page-hero h1 {
  max-width: 1120px;
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.76rem, 2.2vw, 2.28rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

body[data-page="software"] .page-hero > p:not(.eyebrow) {
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="software"] .hero-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: stretch;
}

body[data-page="software"] .hero-actions .button {
  min-height: 40px;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
}

body[data-page="software"] .study-shell {
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-page="software"] .study-sidebar {
  position: sticky;
  top: 86px;
  order: -1;
  z-index: 8;
  display: grid;
  gap: 6px;
}

body[data-page="software"] .lesson-nav {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 6px;
  padding: 8px;
  align-items: center;
}

body[data-page="software"] .lesson-nav-track {
  display: grid;
  grid-template-columns: repeat(var(--lesson-visible, 6), minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  grid-column: 2;
}

body[data-page="software"] .lesson-nav-arrow {
  min-height: 34px;
  width: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

body[data-page="software"] .lesson-nav-arrow:hover:not(:disabled) {
  border-color: rgba(87, 212, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body[data-page="software"] .lesson-nav-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="software"] .lesson-nav.is-single-page {
  grid-template-columns: 1fr;
}

body[data-page="software"] .lesson-nav.is-single-page .lesson-nav-track {
  grid-column: 1;
}

body[data-page="software"] .lesson-nav.is-single-page .lesson-nav-arrow {
  display: none !important;
}

body[data-page="software"] .lesson-nav a {
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  justify-content: center;
  text-align: center;
}

body[data-page="software"] .lesson-nav a:hover {
  transform: translateY(-1px);
}

body[data-page="software"] .lesson-nav a.is-current {
  border-color: rgba(138, 245, 211, 0.44);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.18), rgba(156, 255, 183, 0.14)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 28px rgba(5, 10, 18, 0.2);
  color: var(--heading);
}

body[data-page="software"] .study-content .translation-grid,
body[data-page="software"] .study-content .dual-grid,
body[data-page="software"] .study-content .appendix-grid,
body[data-page="software"] .study-content .source-list,
body[data-page="software"] .study-content .step-list {
  grid-template-columns: 1fr;
}

body[data-page="software"] .media-showcase {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body[data-page="software"] .media-figure img {
  max-height: none;
  aspect-ratio: auto;
}

body[data-page="software"] .study-content .translation-card,
body[data-page="software"] .study-content .step-item {
  width: 100%;
}

body[data-page="software"] .section-head {
  max-width: 100%;
}

body[data-page="software"] .section h2 {
  font-size: clamp(1.58rem, 2.15vw, 2.1rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
  text-wrap: normal;
}

body[data-page="software"] h3 {
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: normal;
}

body[data-page="software"] .section-head p,
body[data-page="software"] .card p,
body[data-page="software"] .manual-figure figcaption {
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="software"] .search-gateway-copy h3,
body[data-page="software"] .search-side-note h2,
body[data-page="software"] .search-result-card h3 {
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="software"] .search-gateway {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  width: fit-content;
  min-width: 0;
  margin-left: auto;
}

body[data-page="software"] .search-gateway-copy,
body[data-page="software"] .search-gateway-tags {
  display: none !important;
}

body[data-page="software"] .search-gateway-actions .button {
  min-height: 34px;
  padding: 7px 12px;
}

body[data-page="software"] .hero-badges span {
  min-height: 54px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  border-radius: 18px;
  padding: 12px 14px;
}

body[data-page="software"] .hero-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: -6px 0 24px;
}

body[data-page="software"] .study-table th,
body[data-page="software"] .study-table td {
  overflow-wrap: break-word;
  word-break: normal;
}

body[data-page="software"] .study-content {
  min-height: 42vh;
}

body[data-page="software"] .lesson-section {
  animation: lessonSectionFade 220ms ease;
}

body[data-page="software"] .lesson-section[hidden] {
  display: none !important;
}

body[data-page="software"] .lesson-status {
  display: none;
}

body[data-page="software"] .lesson-status-progress {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 0.82rem;
  align-items: center;
}

body[data-page="software"] .lesson-status-title {
  font-size: 0.86rem;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="software"] .lesson-status-step,
body[data-page="software"] .lesson-status-total {
  color: var(--text-dim);
}

body[data-page="software"] .lesson-status-bar {
  width: 88px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

body[data-page="software"] .lesson-status-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(87, 212, 255, 0.92), rgba(156, 255, 183, 0.92));
}

body[data-page="software"] .lesson-switch-footer {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

body[data-page="software"] .comparison-table-wrap .study-table {
  min-width: 860px;
}

body[data-page="software"] .visual-grid {
  grid-template-columns: 1fr;
}

body[data-page="software"] .visual-card {
  width: 100%;
}

body[data-page="software"] .visual-card.wide {
  grid-column: auto;
}

body[data-page="software"] .visual-copy p {
  max-width: none;
}

body[data-page="software"] .viz {
  min-height: 290px;
}

body[data-page="software"] #softwareRouteChart {
  min-height: 720px;
}

body[data-page="software"] .viz.viz-tall {
  min-height: 370px;
}

body[data-page="software"] .viz.viz-xl {
  min-height: 470px;
}

body[data-page="software"] .manual-figure {
  padding: 18px;
}

body[data-page="software"] .manual-figure img {
  width: min(100%, 1240px);
  margin: 0 auto;
  max-height: none;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

body[data-page="software"] .manual-figure figcaption {
  max-width: 1120px;
  margin: 14px auto 0;
  font-size: 1rem;
  line-height: 1.8;
}

body[data-page="software"] .figure-atlas-card .manual-figure {
  padding: 16px;
}

body[data-page="software"] .figure-atlas-card .manual-figure img {
  width: min(100%, 1280px);
}

body[data-page="software"] .figure-note {
  max-width: none;
  line-height: 1.72;
}

body[data-page="software"] .manual-jump-links a,
body[data-page="software"] .search-jump-chip,
body[data-page="software"] .software-filter-button {
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

body[data-page="software"] .lesson-nav a {
  min-height: 34px;
  display: flex;
  align-items: center;
  line-height: 1.18;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="software"] .lesson-section .section-head .eyebrow {
  display: none;
}

body[data-page="software"] .lesson-nav a[hidden] {
  display: none !important;
}

body[data-page="software"] .manual-jump-links a {
  min-height: 46px;
  padding: 10px 14px;
}

body[data-page="software"] .search-result-top {
  align-items: flex-start;
}

body[data-page="software"] .search-result-top > div {
  min-width: 0;
  flex: 1;
}

body[data-page="software"] .search-result-excerpt,
body[data-page="software"] .search-result-meta,
body[data-page="software"] .search-result-link {
  overflow-wrap: break-word;
  word-break: normal;
}

.manual-toolbar {
  display: grid;
  gap: 12px;
}

.manual-toolbar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0 16px;
  font-size: 1rem;
}

.manual-toolbar p {
  margin: 0;
  color: var(--text-dim);
}

.search-gateway {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.03);
}

.search-gateway-copy h3,
.search-result-card h3,
.search-result-empty h3 {
  margin: 6px 0 10px;
  color: var(--heading);
}

.search-gateway-copy p:last-child,
.search-result-excerpt,
.search-result-empty p,
.search-panel p {
  color: var(--text-dim);
}

.search-gateway-actions,
.search-gateway-tags,
.software-search-filters,
.software-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.search-jump-chip,
.software-filter-button {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--heading);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.search-jump-chip:hover,
.software-filter-button:hover,
.software-filter-button.is-active {
  transform: translateY(-1px);
  border-color: rgba(138, 245, 211, 0.4);
  background: rgba(138, 245, 211, 0.1);
}

.software-search-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.search-side-note,
.search-panel {
  padding: 22px 24px;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--heading);
  font-weight: 600;
}

.search-panel input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
}

.search-panel mark,
.search-result-card mark {
  padding: 0 0.2em;
  border-radius: 0.35em;
  background: rgba(255, 211, 110, 0.22);
  color: var(--heading);
}

.software-search-summary {
  margin: 16px 0 0;
  color: var(--text-dim);
}

.search-results {
  display: grid;
  gap: 16px;
}

.search-result-card,
.search-result-empty {
  padding: 22px 24px;
}

.search-result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.search-result-meta,
.search-result-link {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.search-result-link {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-result-link code {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
}

.chart-note {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.chart-support-links {
  margin-top: 16px;
}

.manual-search-status {
  font-size: 0.95rem;
  color: var(--text-dim);
}

.manual-search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manual-search-controls button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--heading);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.manual-search-controls button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(138, 245, 211, 0.4);
  background: rgba(138, 245, 211, 0.1);
}

.manual-search-controls button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.manual-toolbar input.is-no-result {
  border-color: rgba(255, 122, 122, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 122, 122, 0.18);
}

.comparison-table-wrap[hidden],
.lesson-section[hidden],
.section[hidden],
.study-table tbody tr[hidden],
.translation-card[hidden],
.chapter-card[hidden],
.manual-figure[hidden],
.card[hidden] {
  display: none;
}

[data-manual-item].search-hit,
.study-table tbody tr.search-hit {
  border-color: rgba(138, 245, 211, 0.42);
}

[data-manual-item].search-active,
.study-table tbody tr.search-active {
  box-shadow: 0 0 0 1px rgba(138, 245, 211, 0.45), 0 18px 60px rgba(30, 207, 156, 0.12);
  background: linear-gradient(180deg, rgba(138, 245, 211, 0.12), rgba(255, 255, 255, 0.03));
  scroll-margin-top: 120px;
}

.manual-detail {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.manual-detail summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  color: var(--heading);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.manual-detail summary::-webkit-details-marker {
  display: none;
}

.manual-detail summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
  flex: 0 0 auto;
}

.manual-detail[open] summary::after {
  content: "−";
}

.manual-detail > div {
  padding: 0 20px 20px;
}

.manual-detail[hidden] {
  display: none;
}

.manual-bullets {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.manual-bullets li {
  color: var(--text);
}

@media (max-width: 880px) {
  .software-search-layout {
    grid-template-columns: 1fr;
  }

  .search-result-top {
    flex-direction: column;
  }
}

.portal-hero {
  min-height: auto;
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.2), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(156, 255, 183, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.portal-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.portal-hero-copy,
.portal-hero-visual {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.hero-badges {
  display: none;
}

.hero-badges span {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.82rem;
}

.portal-hero-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  align-content: start;
}

.hero-stage-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.hero-brand-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.hero-brand-tile {
  display: block;
  margin: 0;
  position: relative;
  overflow: hidden;
  min-height: 136px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(8, 19, 30, 0.84);
  box-shadow: var(--shadow);
  color: var(--heading);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.hero-brand-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(87, 212, 255, 0.32);
  box-shadow: 0 18px 36px rgba(5, 10, 18, 0.28);
}

.hero-brand-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-sizing: border-box;
  padding: 12px 12px 54px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.08), transparent 32%),
    rgba(8, 19, 30, 0.92);
}

.hero-brand-tile span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(6, 17, 26, 0.72);
  backdrop-filter: blur(10px);
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.hero-stage-link {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.hero-stage-link:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 255, 183, 0.28);
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.hero-stage-link span {
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-stage-link strong {
  color: var(--heading);
  font-size: 1.04rem;
  line-height: 1.2;
}

.hero-stage-link p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.portal-live-panel {
  min-height: 250px;
}

body[data-page="home"] main {
  width: min(1560px, calc(100vw - 32px));
  margin-top: 24px;
}

.home-main {
  display: grid;
  gap: 56px;
}

.home-screen {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 128px);
  padding: clamp(24px, 3vw, 46px);
  border: 1px solid rgba(123, 215, 255, 0.18);
  border-radius: calc(var(--radius) + 14px);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(87, 212, 255, 0.24), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(156, 255, 183, 0.22), transparent 28%),
    radial-gradient(circle at 62% 82%, rgba(255, 211, 110, 0.13), transparent 28%),
    linear-gradient(135deg, rgba(10, 26, 38, 0.92), rgba(8, 17, 25, 0.76));
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.32);
}

.home-screen::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.home-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(87, 212, 255, 0.08) 46%, transparent 52%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 74px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: homeSweep 9s linear infinite;
}

.home-screen-copy,
.home-flow-panel,
.home-flow-tiles {
  position: relative;
  z-index: 1;
}

.home-screen-copy {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  text-align: center;
}

.home-screen-copy h1 {
  margin: 0;
  max-width: 980px;
  color: var(--heading);
  font-size: clamp(2.25rem, 4vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.home-screen-copy .hero-lead {
  max-width: 980px;
  font-size: clamp(0.98rem, 1.05vw, 1.16rem);
}

.home-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-flow-legend a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(143, 234, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--heading);
  text-decoration: none;
}

.home-flow-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(520px, 1fr);
  min-height: 610px;
  border: 1px solid rgba(143, 234, 255, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 26%, rgba(87, 212, 255, 0.2), transparent 30%),
    radial-gradient(circle at 78% 68%, rgba(156, 255, 183, 0.13), transparent 34%),
    radial-gradient(circle at 52% 46%, rgba(255, 255, 255, 0.065), transparent 22%),
    rgba(5, 14, 22, 0.54);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.home-flow-panel::before,
.home-flow-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-flow-panel::before {
  inset: 42px 5%;
  border-radius: 48% 52% 46% 54% / 58% 42% 56% 44%;
  border: 1px solid rgba(143, 234, 255, 0.18);
  background:
    radial-gradient(circle at 28% 32%, rgba(117, 225, 255, 0.16), transparent 22%),
    radial-gradient(circle at 68% 64%, rgba(156, 255, 183, 0.12), transparent 24%),
    radial-gradient(circle at 50% 54%, rgba(255, 255, 255, 0.045), transparent 35%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
  box-shadow:
    inset 0 0 80px rgba(87, 212, 255, 0.12),
    0 0 120px rgba(87, 212, 255, 0.08);
  opacity: 0.9;
  animation: cellMembraneFloat 13s ease-in-out infinite alternate;
  z-index: 0;
}

.home-flow-panel::after {
  width: min(28vw, 320px);
  aspect-ratio: 1;
  left: 36%;
  top: 32%;
  border-radius: 50% 46% 54% 48%;
  background:
    radial-gradient(circle at 45% 42%, rgba(255, 255, 255, 0.12), transparent 14%),
    radial-gradient(circle at 50% 50%, rgba(117, 225, 255, 0.11), rgba(156, 255, 183, 0.045) 62%, transparent 72%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  filter: blur(0.2px);
  opacity: 0.68;
  animation: nucleusDrift 16s ease-in-out infinite alternate;
  z-index: 0;
}

.flow-panel-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.flow-panel-top span {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.flow-panel-top strong {
  color: var(--heading);
  font-size: 0.9rem;
}

.proteomics-flow-graph {
  position: relative;
  z-index: 2;
  min-height: 560px;
}

.protein-flow-canvas {
  position: relative;
  min-height: 560px;
  height: 100%;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  cursor: default;
}

.cell-network-svg,
.protein-node-layer,
.protein-bloom-layer {
  position: absolute;
  inset: 0;
}

.cell-network-svg {
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.network-link {
  fill: none;
  stroke: var(--line-color, rgba(143, 234, 255, 0.58));
  stroke-linecap: round;
  filter: url("#proteinGlow");
}

.network-link-main {
  stroke-width: 3.1;
  opacity: 0.52;
  animation: lineAwake 4.8s ease-in-out infinite alternate;
  animation-delay: var(--line-delay, 0ms);
}

.network-link-literature {
  stroke-width: 1.35;
  stroke-dasharray: 5 11;
  opacity: 0.46;
  animation: literatureLineDrift 8s linear infinite;
}

.network-link-bloom {
  stroke-width: 2;
  stroke-dasharray: 2 8;
  opacity: 0.8;
  animation: bloomLineOpen 760ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
  animation-delay: var(--line-delay, 0ms);
}

.network-particle {
  fill: var(--particle-color, #ffffff);
  opacity: 0.95;
  filter: url("#proteinGlow");
}

.cell-organelle {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.cell-organelle-a {
  width: 170px;
  height: 72px;
  left: 7%;
  top: 66%;
  background: radial-gradient(circle at 35% 50%, rgba(117, 225, 255, 0.16), transparent 68%);
  border: 1px solid rgba(117, 225, 255, 0.12);
  transform: rotate(-18deg);
  animation: organelleDrift 11s ease-in-out infinite alternate;
}

.cell-organelle-b {
  width: 220px;
  height: 88px;
  right: 8%;
  top: 20%;
  background: radial-gradient(circle at 45% 50%, rgba(156, 255, 183, 0.14), transparent 68%);
  border: 1px solid rgba(156, 255, 183, 0.12);
  transform: rotate(16deg);
  animation: organelleDrift 14s ease-in-out infinite alternate-reverse;
}

.protein-node-layer,
.protein-bloom-layer {
  z-index: 3;
  pointer-events: none;
}

.protein-bloom-layer {
  z-index: 5;
}

.protein-node,
.protein-petal {
  position: absolute;
  border: 0;
  font: inherit;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  cursor: pointer;
}

.protein-node {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #04131d;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18) 18%, transparent 20%),
    radial-gradient(circle at 52% 54%, color-mix(in srgb, var(--node-color) 72%, #ffffff 28%), var(--node-color) 52%, rgba(5, 16, 24, 0.86) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26) inset,
    0 18px 40px color-mix(in srgb, var(--node-color) 36%, transparent),
    0 0 46px color-mix(in srgb, var(--node-color) 32%, transparent);
  transform: translate(-50%, -50%);
  transition:
    left 360ms cubic-bezier(0.18, 0.78, 0.2, 1),
    top 360ms cubic-bezier(0.18, 0.78, 0.2, 1),
    transform 240ms ease,
    box-shadow 240ms ease,
    filter 240ms ease;
}

.protein-node-small {
  width: 78px;
  height: 78px;
}

.protein-node-large {
  width: 108px;
  height: 108px;
}

.protein-node-paper {
  width: 84px;
  height: 84px;
  border-radius: 44% 56% 48% 52%;
}

.protein-node:hover,
.protein-node.is-active,
.protein-node.is-dragging {
  z-index: 8;
  filter: saturate(1.18);
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.52) inset,
    0 22px 56px color-mix(in srgb, var(--node-color) 42%, transparent),
    0 0 68px color-mix(in srgb, var(--node-color) 48%, transparent);
}

.protein-node:hover .protein-node-action,
.protein-node.is-active .protein-node-action,
.protein-node:focus-visible .protein-node-action {
  opacity: 1;
  translate: -50% 0;
}

.protein-node:focus-visible,
.protein-petal:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--node-color) 72%, #ffffff 28%);
  outline-offset: 5px;
}

.protein-node.is-dragging {
  cursor: grabbing;
}

.protein-node-halo,
.protein-node-core {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.protein-node-halo {
  inset: -9px;
  border: 1px solid color-mix(in srgb, var(--node-color) 44%, transparent);
  opacity: 0.72;
  animation: proteinPulse 3.6s ease-in-out infinite;
}

.protein-node-core {
  inset: 9px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.42), transparent 20%),
    radial-gradient(circle at 50% 54%, color-mix(in srgb, var(--node-color) 64%, transparent), transparent 70%);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12);
}

.protein-node-label {
  position: relative;
  z-index: 2;
  max-width: 86%;
  padding: 0 6px;
  text-align: center;
  color: #03131d;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.protein-node-action {
  position: absolute;
  left: 50%;
  bottom: -18px;
  z-index: 4;
  min-width: 42px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #04131d;
  background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--node-color) 70%, #ffffff 30%));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--node-color) 32%, transparent);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  translate: -50% -4px;
  transition: opacity 180ms ease, translate 180ms ease;
}

.protein-node-small .protein-node-label,
.protein-node-paper .protein-node-label {
  font-size: 0.76rem;
}

.protein-petal {
  min-width: 96px;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #04131d;
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.84), transparent 22%),
    linear-gradient(135deg, color-mix(in srgb, var(--node-color) 72%, #ffffff 28%), var(--node-color));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.36) inset,
    0 14px 28px color-mix(in srgb, var(--node-color) 34%, transparent),
    0 0 34px color-mix(in srgb, var(--node-color) 30%, transparent);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.16;
  text-align: center;
  transform: translate(calc(-50% + var(--origin-x, 0%)), calc(-50% + var(--origin-y, 0%))) scale(0.18) rotate(-16deg);
  opacity: 0;
  animation: petalBloom 680ms cubic-bezier(0.18, 0.9, 0.18, 1.18) forwards;
  animation-delay: var(--petal-delay, 0ms);
}

.protein-petal:hover,
.protein-petal:focus-visible {
  z-index: 9;
  outline: 2px solid color-mix(in srgb, var(--node-color) 72%, #ffffff 28%);
  outline-offset: 5px;
  transform: translate(-50%, -50%) scale(1.08);
  filter: saturate(1.16) brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.62) inset,
    0 18px 34px color-mix(in srgb, var(--node-color) 42%, transparent),
    0 0 52px color-mix(in srgb, var(--node-color) 42%, transparent);
}

.protein-petal-more {
  color: #06121a;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, #ffffff, #dff8ff 46%, #bdf6d6);
  border: 1px solid rgba(4, 19, 29, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.68) inset,
    0 18px 36px rgba(87, 212, 255, 0.25),
    0 0 46px rgba(156, 255, 183, 0.28);
}

.home-flow-tiles {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-flow-tile {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(143, 234, 255, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.home-flow-tile:hover,
.home-product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(156, 255, 183, 0.42);
}

.home-flow-tile span {
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.home-flow-tile strong {
  color: var(--heading);
  font-size: 1.05rem;
}

.home-flow-tile p,
.home-product-card p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.home-product-nav {
  margin-top: 0;
}

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

.home-product-card {
  position: relative;
  display: grid;
  grid-template-rows: 210px auto auto auto;
  gap: 8px;
  min-height: 420px;
  padding: 14px 14px 18px;
  border: 1px solid rgba(143, 234, 255, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(8, 19, 30, 0.7);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.home-product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(87, 212, 255, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.88);
}

.home-product-card span {
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-product-card strong {
  color: var(--heading);
  font-size: 1.18rem;
  line-height: 1.25;
}

body[data-theme="light"] .home-screen {
  background:
    radial-gradient(circle at 14% 18%, rgba(0, 127, 167, 0.18), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(10, 138, 103, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 234, 219, 0.72));
}

body[data-theme="light"] .home-flow-panel,
body[data-theme="light"] .home-flow-tile,
body[data-theme="light"] .home-product-card {
  background: rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .home-flow-panel::before {
  border-color: rgba(0, 127, 167, 0.2);
  background:
    radial-gradient(circle at 28% 32%, rgba(0, 127, 167, 0.14), transparent 22%),
    radial-gradient(circle at 68% 64%, rgba(10, 138, 103, 0.13), transparent 24%),
    radial-gradient(circle at 50% 54%, rgba(255, 255, 255, 0.52), transparent 35%),
    repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.026) 0 1px, transparent 1px 18px);
}

body[data-theme="light"] .home-flow-panel::after {
  background:
    radial-gradient(circle at 45% 42%, rgba(255, 255, 255, 0.8), transparent 14%),
    radial-gradient(circle at 50% 50%, rgba(0, 127, 167, 0.11), rgba(10, 138, 103, 0.08) 62%, transparent 72%);
  border-color: rgba(0, 127, 167, 0.12);
}

body[data-theme="light"] .network-link-main {
  opacity: 0.58;
}

body[data-theme="light"] .network-link-literature {
  opacity: 0.52;
}

body[data-theme="light"] .protein-node,
body[data-theme="light"] .protein-petal {
  color: #05131a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.58) inset,
    0 18px 34px color-mix(in srgb, var(--node-color) 26%, transparent),
    0 0 42px color-mix(in srgb, var(--node-color) 22%, transparent);
}

body[data-theme="light"] .home-product-card img {
  background: #ffffff;
}

@keyframes homeSweep {
  from {
    background-position: -40vw 0, 0 0;
  }
  to {
    background-position: 80vw 0, 74px 0;
  }
}

@keyframes cellMembraneFloat {
  from {
    transform: rotate(-1.5deg) scale(0.985);
  }
  to {
    transform: rotate(1.6deg) scale(1.015);
  }
}

@keyframes nucleusDrift {
  from {
    transform: translate3d(-2%, 1%, 0) rotate(-6deg);
  }
  to {
    transform: translate3d(4%, -3%, 0) rotate(7deg);
  }
}

@keyframes organelleDrift {
  from {
    translate: -8px 4px;
  }
  to {
    translate: 10px -8px;
  }
}

@keyframes lineAwake {
  from {
    opacity: 0.34;
    stroke-width: 2.4;
  }
  to {
    opacity: 0.68;
    stroke-width: 3.5;
  }
}

@keyframes literatureLineDrift {
  to {
    stroke-dashoffset: -64;
  }
}

@keyframes bloomLineOpen {
  from {
    opacity: 0;
    stroke-dashoffset: 32;
  }
  to {
    opacity: 0.82;
    stroke-dashoffset: 0;
  }
}

@keyframes proteinPulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.32;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.78;
  }
}

@keyframes petalBloom {
  from {
    opacity: 0;
    transform: translate(calc(-50% + var(--origin-x, 0%)), calc(-50% + var(--origin-y, 0%))) scale(0.18) rotate(-16deg);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12) rotate(4deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

body[data-page="home"] .hero h1 {
  max-width: none;
  font-size: clamp(2.28rem, 3.7vw, 4rem);
  line-height: 1.08;
}

body[data-page="home"] .hero-lead {
  max-width: none;
}

body[data-page="home"] .section-head {
  max-width: 100%;
}

body[data-page="home"] .section-head h2 {
  max-width: none;
  font-size: clamp(1.72rem, 2.35vw, 2.46rem);
  line-height: 1.16;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="courses"] .page-hero h1,
body[data-page="courses"] .section-head h2,
body[data-page="courses"] .curriculum-card h3,
body[data-page="courses"] .atlas-card h3,
body[data-page="courses"] .evidence-track-card h3,
body[data-page="courses"] .evidence-stage-card h3,
body[data-page="courses"] .literature-card h3 {
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="courses"] .page-hero h1 {
  font-size: clamp(2.08rem, 3.55vw, 3.14rem);
}

body[data-page="courses"] .section-head h2 {
  font-size: clamp(1.78rem, 2.55vw, 2.42rem);
  line-height: 1.16;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.manifesto-lead {
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(87, 212, 255, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.03);
}

.manifesto-lead h2 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(1.68rem, 2.2vw, 2.28rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.manifesto-copy {
  max-width: none;
  color: var(--text);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.principle-item {
  min-height: 188px;
}

.district-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.district-card h3,
.solution-card h3,
.audience-card h3,
.principle-item h3 {
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  line-height: 1.18;
}

.solutions-grid,
.audience-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.district-card {
  min-height: 220px;
  padding: 28px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(8, 19, 30, 0.72);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition);
}

.district-card:hover {
  transform: translateY(-3px);
  border-color: rgba(87, 212, 255, 0.26);
}

.district-card.featured {
  grid-column: 1 / -1;
  min-height: 250px;
}

.district-card h3,
.anchor-card h3,
.insight-card h3,
.product-card h3,
.hero-side-card strong,
.principle-item h3 {
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.district-card h3,
.route-step h3,
.solution-card h3,
.audience-card h3,
.principle-item h3 {
  margin: 8px 0 10px;
  color: var(--heading);
}

.district-card p:last-child,
.route-step p:last-child,
.solution-card p:last-child,
.audience-card p:nth-of-type(2),
.principle-item p:last-child {
  margin-bottom: 0;
}

.route-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.route-step {
  min-height: 220px;
  padding: 22px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.route-step:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 211, 110, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.route-index {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.22), rgba(255, 211, 110, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--heading);
  font-weight: 700;
}

.solutions-grid,
.audience-grid {
  display: grid;
  gap: 18px;
}

.solutions-grid {
  grid-template-columns: repeat(4, 1fr);
}

.audience-grid {
  grid-template-columns: repeat(4, 1fr);
}

.solution-card,
.audience-card {
  min-height: 238px;
}

.solution-path {
  color: var(--heading);
  font-weight: 600;
}

.audience-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.audience-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(87, 212, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.18), rgba(156, 255, 183, 0.1)),
    rgba(255, 255, 255, 0.04);
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.study-table a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  margin: 3px 8px 3px 0;
  padding: 2px 12px;
  border-radius: 999px;
  border: 1px solid rgba(87, 212, 255, 0.34);
  line-height: 1.35;
  white-space: normal;
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.14), rgba(156, 255, 183, 0.08)),
    rgba(255, 255, 255, 0.04);
  color: var(--heading) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  line-height: 1.3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.study-table a:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 255, 183, 0.44);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.22), rgba(156, 255, 183, 0.14)),
    rgba(255, 255, 255, 0.06);
  color: var(--heading) !important;
}

.hero-stage-link strong,
.district-card h3,
.route-step h3,
.solution-card h3,
.audience-card h3,
.principle-item h3,
.card h3 {
  max-width: none;
  text-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.audience-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 255, 183, 0.44);
  background:
    linear-gradient(135deg, rgba(87, 212, 255, 0.24), rgba(156, 255, 183, 0.16)),
    rgba(255, 255, 255, 0.06);
  color: var(--heading);
}

.reading-card a,
.literature-card a {
  color: var(--heading);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(87, 212, 255, 0.48);
  text-underline-offset: 3px;
}

.reading-card a:hover,
.literature-card a:hover {
  color: var(--accent-2);
  text-decoration-color: rgba(156, 255, 183, 0.55);
}

.step-list {
  display: grid;
  gap: 14px;
  counter-reset: lesson-step;
}

.step-item {
  position: relative;
  padding-left: 78px;
}

.step-item::before {
  counter-increment: lesson-step;
  content: counter(lesson-step, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.22), rgba(156, 255, 183, 0.24));
  border: 1px solid rgba(87, 212, 255, 0.3);
  color: var(--heading);
  font-weight: 700;
}

.footer {
  width: var(--content);
  margin: 0 auto 36px;
  padding: 20px 0 0;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.topnav a.is-current {
  color: var(--heading);
}

body.palette-open {
  overflow: hidden;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(156, 255, 183, 0.75);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(156, 255, 183, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(156, 255, 183, 0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: scaleY(0.4);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes lessonSectionFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .topbar {
    border-radius: 26px;
  }

  .home-screen {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .home-flow-panel {
    min-height: 500px;
  }

  .home-flow-tiles,
  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .section-hero-grid,
  .overview-grid,
  .detail-grid,
  .pipeline,
  .product-matrix,
  .media-showcase,
  .curriculum-grid,
  .course-evidence-shell,
  .manifesto-grid,
  .principle-grid,
  .visual-grid,
  .atlas-grid,
  .qc-grid,
  .masterclass-grid,
  .advanced-topic-grid,
  .reading-room-grid,
  .evidence-track-grid,
  .evidence-stage-grid,
  .abbr-grid,
  .district-mosaic,
  .solutions-grid,
  .audience-grid,
  .route-rail,
  .portal-grid,
  .case-grid,
  .manual-map,
  .translation-grid,
  .manual-gallery,
  .dual-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .milestone-rail {
    grid-template-columns: repeat(3, 1fr);
  }

  .study-shell {
    grid-template-columns: 1fr;
  }

  .study-sidebar {
    position: static;
  }

  .district-card.featured {
    grid-column: span 1;
  }

  .media-figure.wide {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .topnav {
    justify-content: space-between;
  }

  .nav-menu-item {
    position: static;
  }

  .nav-dropdown {
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
    transform: translateY(8px) scale(0.98);
  }

  .nav-menu-item:hover .nav-dropdown,
  .nav-menu-item:focus-within .nav-dropdown {
    transform: translateY(0) scale(1);
  }

  .overview-grid,
  .detail-grid,
  .frontier-grid,
  .product-matrix,
  .media-showcase,
  .resource-catalog-controls,
  .resource-catalog-grid,
  .quick-anchor-grid,
  .insight-band,
  .manifesto-grid,
  .principle-grid,
  .visual-grid,
  .curriculum-grid,
  .atlas-grid,
  .qc-grid,
  .masterclass-grid,
  .advanced-topic-grid,
  .reading-room-grid,
  .evidence-track-grid,
  .evidence-stage-grid,
  .abbr-grid,
  .district-mosaic,
  .milestone-rail,
  .solutions-grid,
  .audience-grid,
  .route-rail,
  .portal-grid,
  .case-grid,
  .playbook-grid,
  .takeaways,
  .literature-grid,
  .pipeline,
  .manual-map,
  .translation-grid,
  .manual-gallery,
  .dual-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .card,
  .tab-panel {
    padding: 20px;
  }

  .district-card,
  .route-step,
  .solution-card,
  .audience-card,
  .manifesto-lead,
  .anchor-card,
  .insight-card,
  .hero-side-card {
    min-height: auto;
  }

  .hero h1 {
    max-width: none;
  }

  .portal-hero-visual {
    grid-template-columns: 1fr;
  }

  .hero-stage-stack {
    grid-template-columns: 1fr;
  }

  .hero-brand-strip {
    grid-template-columns: 1fr;
  }

  .command-launcher {
    right: 14px;
    bottom: 14px;
  }

  body[data-page="software"] .page-hero {
    padding: 26px 22px 24px;
  }

  .literature-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-page="software"] .page-hero h1 {
    max-width: none;
    font-size: clamp(1.95rem, 7vw, 2.65rem);
  }

  body[data-page="home"] .hero h1,
  body[data-page="home"] .section-head h2 {
    max-width: none;
    font-size: clamp(1.9rem, 6vw, 2.75rem);
  }

  body[data-page="software"] .hero-actions {
    grid-template-columns: 1fr;
  }

  body[data-page="software"] .study-sidebar {
    position: sticky;
    top: 12px;
  }

  body[data-page="software"] .lesson-nav {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  body[data-page="software"] .lesson-nav a {
    font-size: 0.86rem;
  }

  body[data-page="software"] .section h2 {
    font-size: clamp(1.55rem, 5.8vw, 2.2rem);
  }

  body[data-page="software"] .hero-badges {
    grid-template-columns: 1fr;
  }

  body[data-page="software"] .viz.viz-xl {
    min-height: 390px;
  }

  .decision-controls {
    grid-template-columns: 1fr;
  }

  .step-item {
    padding-left: 20px;
    padding-top: 72px;
  }

  .step-item::before {
    left: 20px;
    top: 18px;
  }
}

@media (max-width: 1080px) {
  .lesson-switch-footer {
    grid-template-columns: 1fr;
  }

  .lesson-switch-progress {
    order: -1;
    min-width: 0;
  }
}

@media (max-width: 820px) {
  body[data-page="software"] .search-gateway {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="software"] .lesson-status {
    grid-template-columns: 1fr;
  }

  .home-flow-tiles,
  .home-product-grid {
    grid-template-columns: 1fr;
  }

  .home-screen {
    padding: 22px;
  }

  .home-screen-copy h1 {
    font-size: clamp(2rem, 9vw, 3.4rem);
  }

  .home-flow-panel {
    min-height: 430px;
    grid-template-rows: auto minmax(360px, 1fr);
  }

  .proteomics-flow-graph {
    min-height: 360px;
  }

  .home-product-card {
    min-height: auto;
    grid-template-rows: 190px auto auto auto;
  }

  body[data-page="software"] .lesson-status-progress {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    gap: 8px;
  }

  body[data-page="software"] .lesson-status-bar {
    width: 84px;
  }
}

body[data-theme="light"] .panel,
body[data-theme="light"] .card,
body[data-theme="light"] .media-figure,
body[data-theme="light"] .district-card,
body[data-theme="light"] .route-step,
body[data-theme="light"] .decision-result,
body[data-theme="light"] .visual-card,
body[data-theme="light"] .hero-side-card,
body[data-theme="light"] .hero-brand-tile {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 242, 231, 0.78)),
    var(--bg-card-strong);
  border-color: rgba(24, 75, 105, 0.22);
  box-shadow: 0 18px 46px rgba(38, 71, 91, 0.13);
}

body[data-theme="light"] .media-figure img,
body[data-theme="light"] .media-figure.logo img,
body[data-theme="light"] .media-figure.contain img,
body[data-theme="light"] .resource-card img,
body[data-theme="light"] .hero-brand-tile img {
  background:
    radial-gradient(circle at top left, rgba(0, 127, 167, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 235, 224, 0.82));
  border-bottom: 1px solid rgba(24, 75, 105, 0.18);
}

body[data-theme="light"] .media-figure figcaption,
body[data-theme="light"] .media-caption,
body[data-theme="light"] .card p,
body[data-theme="light"] .product-card > p:not(.product-tag),
body[data-theme="light"] .resource-card-body p,
body[data-theme="light"] .surface-note,
body[data-theme="light"] .hero-side-card,
body[data-theme="light"] .hero-side-card p,
body[data-theme="light"] .hero-side-card li,
body[data-theme="light"] .section-head > p:not(.eyebrow) {
  color: #314a5b;
}

body[data-theme="light"] .media-figure figcaption strong,
body[data-theme="light"] .media-caption strong,
body[data-theme="light"] .card h3,
body[data-theme="light"] .product-card h3,
body[data-theme="light"] .resource-card-body h3,
body[data-theme="light"] .district-card h3,
body[data-theme="light"] .solution-card h3,
body[data-theme="light"] .audience-card h3,
body[data-theme="light"] .hero-side-card strong {
  color: #071723;
}

body[data-theme="light"] .hero-brand-tile span {
  background: linear-gradient(135deg, rgba(5, 16, 24, 0.82), rgba(5, 16, 24, 0.54));
  color: #f7fbff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.36);
}

body[data-theme="light"] .product-tag,
body[data-theme="light"] .eyebrow {
  color: #006f91;
}

body[data-theme="light"] .resource-card-meta,
body[data-theme="light"] .search-result-meta {
  color: #526a78;
}

body[data-theme="light"] .resource-card-meta span,
body[data-theme="light"] .hero-badges span,
body[data-theme="light"] .manual-jump-links a,
body[data-theme="light"] .search-jump-chip,
body[data-theme="light"] .software-filter-button {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(24, 75, 105, 0.2);
  color: #163044;
}

body[data-theme="light"] .media-link:hover,
body[data-theme="light"] [data-card-link]:hover {
  border-color: rgba(0, 127, 167, 0.34);
  box-shadow: 0 24px 48px rgba(38, 71, 91, 0.18);
}

.full-dia-hero .section-hero-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.full-dia-cover-section {
  padding-top: 18px;
}

.full-dia-cover {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
}

.full-dia-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1800 / 766;
  object-fit: cover;
  border-radius: 16px;
}

.article-copy {
  width: min(980px, 100%);
  margin: 22px auto 0;
  color: var(--text-dim);
  font-size: 1.03rem;
}

.article-copy p {
  margin: 0 0 16px;
}

.full-dia-figure {
  width: min(1180px, 100%);
  margin: 22px auto;
  padding: 18px;
}

.full-dia-figure img {
  display: block;
  width: 100%;
  max-height: 980px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.full-dia-figure.paper-figure img {
  background: #fff;
  padding: 6px;
}

.full-dia-figure figcaption {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.55;
}

.full-dia-page .reveal {
  opacity: 1;
  transform: none;
}

.source-card {
  width: min(1060px, 100%);
  margin: 0 auto;
}

@media (max-width: 860px) {
  .full-dia-hero .section-hero-grid {
    grid-template-columns: 1fr;
  }

  .full-dia-cover {
    padding: 8px;
  }

  .full-dia-cover img {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    object-position: left center;
  }

  .full-dia-figure {
    padding: 12px;
  }

  .full-dia-figure img {
    max-height: none;
  }
}

.portal-side-rail {
  display: none;
}

.card-deep-links {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-deep-links a,
main .card-deep-links a:not(.button):not(.anchor-card):not(.search-jump-chip):not(.brand):not(.hero-brand-tile):not(.media-link) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
}

.card-deep-links a::after {
  content: "→";
  color: var(--accent-2);
}

@media (min-width: 1320px) {
  body.portal-rail-ready {
    --portal-rail-width: clamp(160px, 11vw, 220px);
    overflow-x: hidden;
  }

  body.portal-rail-ready main {
    width: min(1320px, calc(100vw - (var(--portal-rail-width) * 2) - 72px));
  }

  body.portal-rail-ready .inline-nav-source,
  body.portal-rail-ready main > .section > .section-head > p:not(.eyebrow),
  body.portal-rail-ready main > .section .section-head .section-links {
    display: none !important;
  }

  body.portal-rail-ready .section {
    margin-top: 46px;
  }

  body.portal-rail-ready .section-head {
    margin-bottom: 16px;
  }

  body.portal-rail-ready .page-hero,
  body.portal-rail-ready .hero.panel,
  body.portal-rail-ready .section-hero {
    margin-bottom: 22px;
  }

  body.portal-rail-ready .portal-side-rail {
    position: fixed;
    top: 112px;
    bottom: 18px;
    z-index: 35;
    display: block;
    width: var(--portal-rail-width);
    pointer-events: none;
  }

  body.portal-rail-ready .portal-side-rail-left {
    left: 18px;
  }

  body.portal-rail-ready .portal-side-rail-right {
    right: 18px;
  }

  .portal-rail-panel {
    max-height: calc(100vh - 130px);
    padding: 13px;
    overflow: auto;
    pointer-events: auto;
    border: 1px solid rgba(133, 215, 255, 0.18);
    border-radius: 20px;
    background:
      radial-gradient(circle at top left, rgba(87, 212, 255, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(15, 30, 44, 0.9), rgba(8, 18, 28, 0.82));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
    scrollbar-width: thin;
  }

  .portal-rail-panel::-webkit-scrollbar {
    width: 6px;
  }

  .portal-rail-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(143, 234, 255, 0.28);
  }

  .portal-rail-kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .portal-rail-panel nav {
    display: grid;
    gap: 8px;
  }

  .portal-rail-link,
  .portal-rail-action {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid rgba(153, 203, 255, 0.12);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
  }

  .portal-rail-link span,
  .portal-rail-action {
    font-size: 0.88rem;
    font-weight: 780;
    line-height: 1.35;
  }

  .portal-rail-link small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-dim);
    font-size: 0.72rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .portal-rail-link:hover,
  .portal-rail-action:hover,
  .portal-rail-link.is-active {
    color: var(--heading);
    border-color: rgba(87, 212, 255, 0.42);
    background: linear-gradient(135deg, rgba(87, 212, 255, 0.16), rgba(156, 255, 183, 0.08));
    transform: translateY(-1px);
  }

  .portal-rail-link.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .portal-rail-empty {
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.5;
  }

  body[data-theme="light"] .portal-rail-panel {
    border-color: rgba(24, 75, 105, 0.2);
    background:
      radial-gradient(circle at top left, rgba(0, 127, 167, 0.1), transparent 32%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(248, 242, 231, 0.82));
    box-shadow: 0 18px 46px rgba(38, 71, 91, 0.13);
  }

  body[data-theme="light"] .portal-rail-link,
  body[data-theme="light"] .portal-rail-action {
    color: #142433;
    border-color: rgba(24, 75, 105, 0.16);
    background: rgba(255, 255, 255, 0.68);
  }

  body[data-theme="light"] .portal-rail-link small,
  body[data-theme="light"] .portal-rail-empty {
    color: #526a78;
  }

  body[data-theme="light"] .portal-rail-link:hover,
  body[data-theme="light"] .portal-rail-action:hover,
  body[data-theme="light"] .portal-rail-link.is-active {
    color: #071723;
    border-color: rgba(0, 127, 167, 0.36);
    background: linear-gradient(135deg, rgba(0, 127, 167, 0.12), rgba(10, 138, 103, 0.08));
  }
}

@media (max-width: 1319px) {
  body.portal-rail-ready .portal-side-rail {
    display: none;
  }
}

body[data-subpage="spectronaut"] .spectronaut-entry-hero {
  padding: 30px;
}

.spectronaut-entry-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.spectronaut-entry-visual {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(87, 212, 255, 0.14), transparent 54%),
    rgba(255, 255, 255, 0.04);
}

.spectronaut-entry-visual img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 16px;
}

.spectronaut-entry-strip,
.spectronaut-entry-path-grid,
.spectronaut-feature-list {
  display: grid;
  gap: 16px;
}

.spectronaut-entry-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spectronaut-entry-strip .card,
.spectronaut-path-card,
.spectronaut-feature-list .card {
  min-height: 0;
  padding: 20px;
}

.spectronaut-path-card {
  position: relative;
  overflow: hidden;
}

.spectronaut-path-card span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid rgba(87, 212, 255, 0.34);
  border-radius: 14px;
  color: var(--accent);
  background: rgba(87, 212, 255, 0.08);
  font-weight: 850;
}

.spectronaut-entry-path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spectronaut-feature-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.spectronaut-feature-layout .media-figure {
  margin: 0;
}

.spectronaut-feature-layout .media-figure img {
  max-height: 520px;
  object-fit: contain;
}

.spectronaut-feature-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spectronaut-flowline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.spectronaut-flowline a {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.spectronaut-flowline a:hover {
  border-color: rgba(87, 212, 255, 0.45);
  background: linear-gradient(135deg, rgba(87, 212, 255, 0.14), rgba(156, 255, 183, 0.08));
  transform: translateY(-2px);
}

.spectronaut-flowline span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.spectronaut-flowline strong {
  font-size: 0.95rem;
  line-height: 1.5;
}

body[data-theme="light"] .spectronaut-entry-visual {
  background:
    radial-gradient(circle at center, rgba(0, 127, 167, 0.12), transparent 54%),
    rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .spectronaut-flowline a {
  color: #142433;
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .spectronaut-flowline a:hover {
  background: linear-gradient(135deg, rgba(0, 127, 167, 0.12), rgba(10, 138, 103, 0.08));
}

.resource-pack-grid,
.validator-mode-grid,
.validator-summary-grid,
.json-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.resource-pack-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 100%;
}

.resource-pack-card .resource-type {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(87, 212, 255, 0.28);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-actions,
.validator-toolbar,
.validator-file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.validator-file-row input[type="file"] {
  max-width: 100%;
  color: var(--text-dim);
}

.validator-file-row input[type="file"]::file-selector-button {
  margin-right: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--heading);
  font-weight: 760;
  cursor: pointer;
}

.resource-actions {
  margin-top: auto;
}

.resource-actions a,
.resource-actions button {
  min-height: 38px;
}

.resource-inline-code {
  display: block;
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(6, 17, 26, 0.76);
  color: #e9f7ff;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  cursor: text;
}

.validator-repair-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.validator-repair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.validator-repair-head span {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.validator-repair-head .button.compact {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 0.86rem;
}

.validator-repair-report {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 149, 164, 0.28);
  border-radius: 18px;
  background: rgba(0, 149, 164, 0.08);
  color: var(--text);
}

.validator-repair-report > strong {
  color: var(--heading);
  font-size: 1.02rem;
}

.validator-repair-report ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.validator-repair-report li {
  padding-left: 4px;
}

.validator-repair-report b {
  color: var(--heading);
}

.validator-repair-report p {
  margin: 6px 0 8px;
}

.repair-diff {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.repair-diff span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.repair-diff code {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 17, 26, 0.68);
  color: #e9f7ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.json-workbench {
  display: grid;
  gap: 18px;
}

.validator-mode-grid label {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.validator-mode-grid input {
  width: 18px;
  height: 18px;
}

.json-workbench textarea,
.json-workbench input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(6, 17, 26, 0.72);
  color: var(--heading);
  font: 0.92rem/1.62 "Cascadia Code", Consolas, "Microsoft YaHei", monospace;
}

.json-workbench textarea {
  min-height: 360px;
  padding: 16px;
  resize: vertical;
}

.json-workbench input[type="text"] {
  min-height: 46px;
  padding: 0 14px;
}

.validator-output {
  display: grid;
  gap: 12px;
}

.validator-message {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.validator-message.is-ok {
  border-color: rgba(156, 255, 183, 0.42);
  background: rgba(156, 255, 183, 0.1);
}

.validator-message.is-warn {
  border-color: rgba(255, 211, 110, 0.42);
  background: rgba(255, 211, 110, 0.1);
}

.validator-message.is-error {
  border-color: rgba(255, 126, 126, 0.46);
  background: rgba(255, 126, 126, 0.1);
}

.validator-output code,
.json-field-card code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.validator-result-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.validator-result-list li {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

body[data-theme="light"] .resource-inline-code,
body[data-theme="light"] .json-workbench textarea,
body[data-theme="light"] .json-workbench input[type="text"] {
  background: rgba(255, 255, 255, 0.88);
  color: #132635;
}

body[data-theme="light"] .validator-mode-grid label,
body[data-theme="light"] .validator-message,
body[data-theme="light"] .validator-result-list li {
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1180px) {
  .spectronaut-entry-hero-grid,
  .spectronaut-feature-layout {
    grid-template-columns: 1fr;
  }

  .spectronaut-entry-strip,
  .spectronaut-entry-path-grid,
  .spectronaut-feature-list,
  .spectronaut-flowline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-subpage="spectronaut"] .spectronaut-entry-hero {
    padding: 22px;
  }

  .spectronaut-entry-strip,
  .spectronaut-entry-path-grid,
  .spectronaut-feature-list,
  .spectronaut-flowline {
    grid-template-columns: 1fr;
  }

  .spectronaut-entry-visual img,
  .spectronaut-feature-layout .media-figure img {
    max-height: none;
  }
}
