:root {
  --bg: #f6f7f3;
  --paper: #ffffff;
  --paper-2: #eef4f1;
  --ink: #172024;
  --muted: #5b666c;
  --line: #d7ddd7;
  --teal: #117c78;
  --blue: #3569b7;
  --coral: #c85c45;
  --gold: #ad7b16;
  --violet: #7656a6;
  --green: #4e7f36;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(25, 34, 37, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 320px) auto;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 8px 22px;
  border-bottom: 1px solid rgba(23, 32, 36, 0.12);
  background: rgba(246, 247, 243, 0.92);
  backdrop-filter: blur(18px);
}

.topbar-menu-panel {
  display: contents;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.mobile-menu-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.brand {
  --brand-mark-size: 36px;
  --brand-mark-art-size: 30px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: var(--brand-mark-size);
  height: var(--brand-mark-size);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 36, 0.16), 0 4px 12px rgba(23, 32, 36, 0.08);
}

.brand-mark svg {
  width: var(--brand-mark-art-size);
  height: var(--brand-mark-art-size);
}

.brand-mark path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-world {
  stroke: #2f8793;
  stroke-width: 2.4;
}

.brand-action {
  stroke: #ad7b16;
  stroke-width: 2.2;
}

.brand-axis {
  stroke: #172024;
  stroke-width: 2.1;
}

.brand-logo {
  display: block;
  width: auto;
  height: calc(var(--brand-mark-art-size) * 0.8);
  max-width: calc(100% - 48px);
}

.nav-tabs,
.mode-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
}

.nav-tab,
.mode-button,
.plain-button,
.primary-button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-tab,
.mode-button {
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.nav-tab.is-active,
.mode-button.is-active {
  background: var(--ink);
  color: #fff;
}

.plain-button {
  padding: 0 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0 14px;
  border: 1px solid rgba(23, 32, 36, 0.12);
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.search-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.search-wrap span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
}

.github-link {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.github-link:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

.github-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 40%, transparent);
  outline-offset: 2px;
}

.github-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.page {
  width: min(1520px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.atlas-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 8px 0 16px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.stat-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-strip span,
.model-meta-grid div {
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.stat-strip strong,
.model-meta-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
}

.param-total {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.stat-strip span,
.model-meta-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.atlas-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.mode-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 16px;
  align-items: stretch;
}

.atlas-canvas-wrap,
.preview-panel,
.model-card,
.content-page section {
  border: 1px solid rgba(23, 32, 36, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.atlas-canvas-wrap {
  position: relative;
  min-height: 780px;
  overflow: hidden;
}

#atlasSvg {
  display: block;
  width: 100%;
  height: 780px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background:
    linear-gradient(rgba(23, 32, 36, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 36, 0.045) 1px, transparent 1px),
    #fbfcfa;
  background-size: 34px 34px;
}

.axis-label {
  fill: #5c686e;
  font-size: 12px;
  font-weight: 800;
}

.layout-label {
  fill: rgba(23, 32, 36, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.taxonomy-container rect {
  fill: none;
  fill-opacity: 0;
  stroke: rgba(23, 32, 36, 0.2);
  stroke-width: 1.6;
  stroke-dasharray: 7 7;
  rx: 18px;
  ry: 18px;
  vector-effect: non-scaling-stroke;
}

.taxonomy-container text {
  fill: rgba(23, 32, 36, 0.62);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  paint-order: stroke;
  stroke: #fbfcfa;
  stroke-width: 5px;
  pointer-events: none;
}

.taxonomy-family {
  cursor: default;
}

.taxonomy-family-hit {
  fill: transparent;
  pointer-events: all;
}

.taxonomy-family-label {
  font-size: 11px;
  font-weight: 900;
}

.taxonomy-glyph-bg {
  fill: rgba(255, 255, 255, 0.66);
  stroke: color-mix(in srgb, var(--tax-color) 62%, rgba(23, 32, 36, 0.18));
  stroke-width: 1.6;
  rx: 9px;
  ry: 9px;
  vector-effect: non-scaling-stroke;
}

.taxonomy-family,
.node {
  transition: transform 180ms cubic-bezier(.22,.61,.36,1), filter 180ms ease;
}

.taxonomy-family-paper-hover .taxonomy-node-body {
  transform: none;
}

.taxonomy-family.is-hovered .taxonomy-family-visual {
  filter: drop-shadow(0 12px 18px rgba(23, 32, 36, 0.14));
}

.taxonomy-gallery-container rect {
  fill: rgba(255, 255, 255, 0.24);
}

.taxonomy-gallery-family-bg {
  fill: color-mix(in srgb, var(--tax-color) 9%, rgba(255, 255, 255, 0.86));
  stroke: color-mix(in srgb, var(--tax-color) 52%, rgba(23, 32, 36, 0.24));
  stroke-width: 1.35;
  stroke-dasharray: 5 5;
  rx: 14px;
  ry: 14px;
  vector-effect: non-scaling-stroke;
}

.taxonomy-gallery-family-label {
  fill: color-mix(in srgb, var(--tax-color) 72%, #172024);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3px;
  pointer-events: none;
}

.taxonomy-gallery-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--family-color) 34%, rgba(23, 32, 36, 0.12));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(25, 34, 37, 0.08);
  cursor: pointer;
}

.taxonomy-gallery-card:hover {
  border-color: color-mix(in srgb, var(--family-color) 72%, rgba(23, 32, 36, 0.18));
  box-shadow: 0 12px 24px rgba(25, 34, 37, 0.14);
}

.taxonomy-gallery-title {
  position: absolute;
  z-index: 2;
  top: 5px;
  left: 7px;
  right: 7px;
  overflow: hidden;
  color: #172024;
  font-size: 9px;
  font-weight: 920;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxonomy-gallery-diagram {
  position: absolute;
  inset: 18px 5px 5px;
  overflow: hidden;
}

.taxonomy-gallery-diagram .wam-diagram {
  display: block;
  width: 100%;
  height: 100%;
}

.taxonomy-gallery-diagram .diagram-bg {
  fill: transparent;
}

.taxonomy-gallery-diagram .diagram-column-label,
.taxonomy-gallery-diagram .diagram-detail,
.taxonomy-gallery-diagram .diagram-badge text,
.taxonomy-gallery-diagram .diagram-head-title,
.taxonomy-gallery-diagram .diagram-module-title {
  font-size: 18px;
}

.taxonomy-tree-map .problem-link {
  opacity: 0.72;
}

.taxonomy-tree-node rect {
  fill: color-mix(in srgb, var(--tax-color) 13%, rgba(255, 255, 255, 0.94));
  stroke: color-mix(in srgb, var(--tax-color) 66%, rgba(23, 32, 36, 0.18));
  stroke-width: 1.25;
  rx: 8px;
  ry: 8px;
  vector-effect: non-scaling-stroke;
}

.taxonomy-tree-node text {
  fill: #172024;
  font-size: 17px;
  font-weight: 880;
  letter-spacing: 0;
  pointer-events: none;
}

.taxonomy-tree-root rect {
  fill: #172024;
  stroke: rgba(23, 32, 36, 0.18);
}

.taxonomy-tree-root text {
  fill: #ffffff;
  font-size: 18px;
  font-weight: 930;
}

.taxonomy-tree-major rect {
  fill: color-mix(in srgb, var(--tax-color) 24%, #ffffff);
}

.taxonomy-tree-major text {
  fill: color-mix(in srgb, var(--tax-color) 74%, #172024);
  font-size: 18px;
  font-weight: 930;
}

.taxonomy-tree-category text {
  font-size: 16px;
}

.taxonomy-tree-family text {
  font-size: 15px;
}

.taxonomy-tree-category rect {
  fill: color-mix(in srgb, var(--tax-color) 16%, #ffffff);
  stroke-dasharray: 5 4;
}

.taxonomy-tree-family {
  cursor: default;
}

.taxonomy-tree-family rect {
  fill: color-mix(in srgb, var(--tax-color) 18%, #ffffff);
  stroke: color-mix(in srgb, var(--tax-color) 78%, rgba(23, 32, 36, 0.12));
}

.taxonomy-tree-paper-container rect {
  fill: color-mix(in srgb, var(--tax-color) 6%, rgba(255, 255, 255, 0.72));
  stroke: color-mix(in srgb, var(--tax-color) 68%, rgba(23, 32, 36, 0.18));
  stroke-width: 1.35;
  stroke-dasharray: 6 5;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.family-hover-card {
  position: fixed;
  z-index: 32;
  width: min(390px, calc(100vw - 24px));
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--family-card-color, #117c78) 46%, rgba(23, 32, 36, 0.12));
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(25, 34, 37, 0.14);
  backdrop-filter: blur(18px) saturate(1.14);
  pointer-events: none;
}

.family-card-kicker {
  color: color-mix(in srgb, var(--family-card-color, #117c78) 78%, #172024);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.family-hover-card h3 {
  margin: 3px 0 7px;
  color: #172024;
  font-size: 1rem;
}

.family-hover-card p {
  margin: 0 0 9px;
  color: #263238;
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.35;
}

.family-hover-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.family-hover-card dl div {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 8px;
}

.family-hover-card dt {
  color: color-mix(in srgb, var(--family-card-color, #117c78) 72%, #172024);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.family-hover-card dd {
  margin: 0;
  color: #405057;
  font-size: 0.71rem;
  line-height: 1.32;
}

.family-card-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.family-card-examples > span {
  padding: 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--family-card-color, #117c78) 16%, #ffffff);
  color: #263238;
  font-size: 0.66rem;
  font-weight: 800;
}

.family-card-example {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.family-card-example img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border: 1px solid rgba(23, 32, 36, 0.14);
  border-radius: 50%;
  background: #ffffff;
}

.taxonomy-node-body {
  transition: filter 180ms ease;
}

.taxonomy-glyph-caption {
  fill: rgba(23, 32, 36, 0.68);
  font-size: 8px;
  font-weight: 850;
}

.glyph-block,
.glyph-sensor,
.glyph-world,
.glyph-core,
.glyph-action,
.glyph-state,
.glyph-physical,
.glyph-frame,
.glyph-latent-frame,
.glyph-code,
.glyph-codebook-shell,
.glyph-implicit-region,
.glyph-align-layer {
  vector-effect: non-scaling-stroke;
  rx: 5px;
  ry: 5px;
}

.glyph-sensor,
.glyph-block {
  fill: #ffffff;
  stroke: #9eb6df;
}

.glyph-world {
  fill: #e8f2ff;
  stroke: #5d8fc5;
}

.glyph-core {
  fill: color-mix(in srgb, var(--tax-color) 22%, #ffffff);
  stroke: color-mix(in srgb, var(--tax-color) 78%, #172024);
}

.glyph-core.dim {
  opacity: 0.46;
  stroke-dasharray: 4 3;
}

.glyph-action {
  fill: #fff2dc;
  stroke: #d49a3d;
}

.glyph-state {
  fill: #edf7ed;
  stroke: #72a36e;
}

.glyph-physical {
  fill: #f8eeee;
  stroke: #cf978f;
}

.glyph-frame {
  fill: #edf6ff;
  stroke: #5d8fc5;
}

.glyph-latent-frame {
  fill: #eef4f1;
  stroke: #72a36e;
  stroke-dasharray: 4 3;
}

.glyph-stack-back,
.glyph-stack-mid {
  opacity: 0.5;
}

.glyph-line,
.glyph-loop,
.glyph-bypass {
  fill: none;
  stroke: rgba(23, 32, 36, 0.44);
  stroke-width: 1.45;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.glyph-line.train {
  stroke-dasharray: 4 3;
  stroke: rgba(23, 32, 36, 0.32);
}

.glyph-bypass {
  stroke: #2d7c59;
  stroke-width: 1.7;
}

.glyph-loop {
  stroke: #a4493f;
  stroke-width: 1.55;
}

.glyph-cut {
  fill: none;
  stroke: rgba(23, 32, 36, 0.36);
  stroke-width: 1.4;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

.glyph-token {
  fill: #5d8fc5;
  stroke: rgba(23, 32, 36, 0.14);
  rx: 2px;
  ry: 2px;
  vector-effect: non-scaling-stroke;
}

.glyph-token.action {
  fill: #d49a3d;
}

.glyph-token.state {
  fill: #72a36e;
}

.glyph-token-letter {
  fill: rgba(255, 255, 255, 0.92);
  font-size: 5.6px;
  font-weight: 950;
  pointer-events: none;
}

.glyph-causal-sweep {
  fill: none;
  stroke: rgba(23, 32, 36, 0.36);
  stroke-width: 1.25px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.glyph-sequence-shell {
  fill: #ffffff;
  stroke: rgba(23, 32, 36, 0.18);
  stroke-width: 1.1;
  rx: 6px;
  ry: 6px;
  vector-effect: non-scaling-stroke;
}

.glyph-sequence-shell.direct {
  fill: color-mix(in srgb, var(--tax-color) 10%, #ffffff);
  stroke: color-mix(in srgb, var(--tax-color) 62%, rgba(23, 32, 36, 0.16));
}

.glyph-mini-label {
  fill: var(--ink);
  font-size: 7px;
  font-weight: 900;
}

.glyph-mini-label.light {
  fill: #172024;
}

.glyph-latent,
.glyph-latent-cloud {
  fill: rgba(255, 255, 255, 0.72);
  stroke: color-mix(in srgb, var(--tax-color) 70%, #3569b7);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.glyph-dot {
  fill: #5d8fc5;
  stroke: #ffffff;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.glyph-dot.action {
  fill: #d49a3d;
}

.glyph-dot.state {
  fill: #72a36e;
}

.glyph-codebook-shell,
.glyph-implicit-region,
.glyph-align-layer {
  fill: rgba(255, 255, 255, 0.7);
  stroke: color-mix(in srgb, var(--tax-color) 74%, #172024);
}

.glyph-code {
  fill: #efb156;
  stroke: #b8751f;
  rx: 2px;
  ry: 2px;
}

.glyph-value-curve,
.glyph-align-wave {
  fill: none;
  stroke: #ad7b16;
  stroke-width: 1.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}


.atlas-annotation {
  opacity: 1;
  transition: opacity 360ms ease;
}

.atlas-annotation.is-entering {
  opacity: 0;
}

.node {
  cursor: pointer;
}

.node-ring {
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 5px 8px rgba(23, 32, 36, 0.18));
}

.node-logo-bg {
  stroke: rgba(23, 32, 36, 0.18);
  stroke-width: 0.8;
}

.node-literal-dot {
  fill: #fff;
  stroke: rgba(23, 32, 36, 0.28);
  stroke-width: 0.8;
}

.node-name {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 4px;
  pointer-events: none;
}

.problem-node-body .node-name {
  font-size: 12.4px;
  font-weight: 850;
  stroke-width: 4.6px;
}

.problem-node-body .node-logo-bg {
  r: 10.8px;
}

.problem-node-body .node-logo-image {
  x: -9px;
  y: -9px;
  width: 18px;
  height: 18px;
}

.node-logo-image {
  pointer-events: none;
}

.node.is-muted {
  opacity: 0.18;
}

.node.is-filtered-out {
  opacity: 0 !important;
  pointer-events: none;
}

.node.is-active .node-ring {
  stroke: var(--ink);
  stroke-width: 3;
}

.taxonomy-node-body .node-halo {
  opacity: 0.1;
}

.taxonomy-node-body .node-ring {
  stroke-width: 1.7;
  filter: drop-shadow(0 3px 5px rgba(23, 32, 36, 0.14));
}

.taxonomy-node-body .node-logo-bg {
  r: var(--taxonomy-logo-radius, 5.8px);
}

.taxonomy-node-body .node-logo-image {
  x: calc(var(--taxonomy-logo-size, 9.6px) / -2);
  y: calc(var(--taxonomy-logo-size, 9.6px) / -2);
  width: var(--taxonomy-logo-size, 9.6px);
  height: var(--taxonomy-logo-size, 9.6px);
}

.taxonomy-node-body .node-literal-dot {
  r: 2px;
}

.taxonomy-node-body .node-name {
  font-size: var(--taxonomy-label-size, 7.2px);
  stroke-width: 2.2px;
}

.timeline-node-body .node-name {
  font-size: 9px;
  font-weight: 850;
  stroke-width: 3px;
}

.timeline-node-body .node-ring {
  stroke-width: 2;
}

.problem-link {
  fill: none;
  stroke-width: 7;
  stroke-linecap: butt;
}

.paper-tether {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.28;
  vector-effect: non-scaling-stroke;
}

.problem-root rect,
.problem-branch rect,
.problem-leaf-question rect {
  rx: 16px;
  ry: 16px;
  stroke: rgba(23, 32, 36, 0.09);
  vector-effect: non-scaling-stroke;
}

.problem-scale-target {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 180ms cubic-bezier(.22,.61,.36,1), filter 180ms ease;
}

.problem-pop:hover .problem-scale-target {
  transform: scale(1.16);
  filter: drop-shadow(0 10px 16px rgba(23, 32, 36, 0.12));
}

.problem-root:hover .problem-scale-target {
  transform: scale(1.09);
}

.problem-tree.is-portrait {
  transition: none;
}

.problem-tree.is-portrait .problem-branch .problem-question {
  font-size: 40px !important;
}

.problem-tree.is-portrait .problem-leaf-question .problem-question {
  font-size: 18px !important;
}

.problem-tree.is-portrait .problem-eyebrow {
  font-size: 11px;
}

.portrait-problem-node-body .node-name {
  font-size: 17px;
}

.problem-leaf-question:hover .problem-scale-target {
  transform: scale(1.24);
}

.problem-root rect {
  fill: #f2f4f3;
}

.problem-question {
  fill: #3f4a50;
  font-size: 12px;
  font-weight: 750;
}

.problem-root .problem-question {
  fill: #263238;
  font-size: 14px;
  font-weight: 850;
}

.problem-eyebrow {
  fill: rgba(23, 32, 36, 0.68);
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-spine {
  fill: none;
  stroke: rgba(23, 32, 36, 0.18);
  stroke-width: 8;
  stroke-linecap: round;
}

.timeline-tick,
.timeline-branch,
.timeline-bead,
.speed-axis,
.speed-grid,
.metrics-axis,
.metrics-grid,
.metrics-lane {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.timeline-tick {
  stroke: rgba(23, 32, 36, 0.16);
  stroke-width: 1.2;
}

.timeline-tick.is-major {
  stroke: rgba(23, 32, 36, 0.3);
  stroke-width: 1.8;
}

.timeline-date {
  fill: #7a858a;
  font-size: 8.5px;
  font-weight: 760;
}

.timeline-date.is-major {
  fill: #445057;
  font-size: 10px;
  font-weight: 900;
}

.timeline-map.is-vertical .timeline-date {
  fill: #5e6a70;
  font-size: 11px;
}

.timeline-map.is-vertical {
  transition: none;
}

.timeline-map.is-vertical .timeline-date.is-major {
  font-size: 13px;
}

.timeline-map.is-vertical .timeline-spine {
  stroke: rgba(23, 32, 36, 0.3);
  stroke-width: 6;
}

.timeline-map.is-vertical .timeline-branch {
  stroke-width: 2.8;
  opacity: 0.72;
}

.timeline-branch {
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.52;
}

.timeline-bead {
  stroke: #ffffff;
  stroke-width: 1.4;
  filter: drop-shadow(0 2px 3px rgba(23, 32, 36, 0.12));
}

.speed-axis {
  stroke: rgba(23, 32, 36, 0.28);
  stroke-width: 1.8;
}

.speed-grid {
  stroke: rgba(23, 32, 36, 0.07);
  stroke-width: 1;
}

.metrics-axis {
  stroke: rgba(23, 32, 36, 0.28);
  stroke-width: 1.8;
}

.metrics-grid {
  stroke: rgba(23, 32, 36, 0.07);
  stroke-width: 1;
}

.metrics-lane {
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.26;
}

.metrics-lane-label {
  fill: rgba(39, 52, 58, 0.78);
  font-size: 10px;
  font-weight: 860;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4px;
}

.metrics-bar {
  stroke-linecap: round;
  opacity: 0.42;
}

.metrics-bar-label {
  fill: rgba(39, 52, 58, 0.66);
  font-size: 8.5px;
  font-weight: 820;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
}

.metrics-frontier {
  fill: none;
  stroke: #172024;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.metrics-frontier.is-dashed {
  stroke-dasharray: 7 7;
}

.metrics-frontier.is-anti {
  stroke: #c74336;
  opacity: 0.72;
}

.metrics-frontier-label {
  fill: #172024;
  font-size: 9px;
  font-weight: 820;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3px;
}

.metrics-frontier-label.is-anti {
  fill: #c74336;
}

.metrics-tick {
  fill: #6d797f;
  font-size: 9px;
  font-weight: 760;
}

.metrics-axis-label {
  font-size: 12px;
  fill: #2f3b41;
}

.metrics-axis-caption {
  fill: #6d797f;
  font-size: 10px;
  font-weight: 800;
}

.metrics-node-body .node-name {
  font-size: 9px;
}

.preview-panel {
  min-height: 780px;
  padding: 18px;
}

.preview-empty {
  display: grid;
  place-items: center;
  min-height: 710px;
  color: transparent;
  text-align: center;
  line-height: 1.55;
}

.preview-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-content h2 {
  margin: 12px 0 8px;
  font-size: 1.22rem;
  line-height: 1.18;
}

.preview-content .preview-kicker,
.preview-content h2,
.preview-content p,
#previewOpen {
  display: none;
}

.preview-panel .diagram.mini {
  height: 730px;
  margin: 0;
}

.preview-panel.is-metric {
  width: min(420px, calc(100vw - 24px));
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 11px;
  overflow: hidden;
}

.preview-panel.is-metric .preview-content {
  position: static;
  inset: auto;
  display: block;
}

.preview-panel.is-metric .preview-content .preview-kicker,
.preview-panel.is-metric .preview-content h2 {
  display: block;
  position: static;
  text-align: left;
  paint-order: normal;
  stroke-width: 0;
}

.preview-panel.is-metric .preview-kicker {
  display: none;
}

.preview-panel.is-metric .preview-content h2 {
  margin: 0 0 7px;
  font-size: 0.92rem;
  line-height: 1.12;
}

.preview-panel.is-metric .diagram,
.preview-panel.is-metric #previewOpen {
  display: none;
}

.metric-audit {
  display: grid;
  gap: 7px;
}

.metric-audit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(23, 32, 36, 0.1);
}

.metric-audit-head strong {
  color: #172024;
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1.15;
}

.metric-audit-head span {
  color: #172024;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.metric-audit-summary {
  display: block;
  margin: 0;
  color: #263238;
  font-size: 0.72rem;
  font-weight: 680;
  line-height: 1.32;
}

.preview-panel.is-metric .metric-audit-summary {
  display: block;
}

.metric-audit-secondary {
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.44);
  color: #35464d;
  font-size: 0.66rem;
  line-height: 1.25;
}

.metric-audit-secondary b {
  color: #172024;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.metric-audit-source {
  display: grid;
  gap: 2px;
  color: #405057;
  font-size: 0.66rem;
  line-height: 1.25;
}

.metric-audit-source b {
  color: #68787f;
  font-size: 0.62rem;
}

.metric-audit-assumptions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.metric-audit-assumptions span {
  display: inline-flex;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.54);
  color: #405057;
  font-size: 0.68rem;
}

.metric-audit-assumptions b {
  color: #172024;
}

.metric-audit-formula {
  display: grid;
  gap: 2px;
  color: #3c4b51;
  font-size: 0.66rem;
  line-height: 1.25;
}

.metric-audit-formula b {
  color: #68787f;
  font-size: 0.62rem;
}

.metric-audit-formula code {
  white-space: normal;
  color: #172024;
  font-size: 0.69rem;
}

.metric-audit-quotes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #314147;
  font-size: 0.72rem;
  line-height: 1.28;
}

.metric-audit-quotes li span {
  display: block;
  margin-bottom: 2px;
  color: #68787f;
  font-size: 0.65rem;
  font-weight: 820;
}

.page-atlas {
  position: relative;
  width: 100%;
  height: calc(100dvh - 62px);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.page-atlas .atlas-header {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 8;
  align-items: flex-end;
  margin: 0;
  pointer-events: none;
}

.page-atlas .stat-strip span,
.page-atlas .mode-group,
.hover-preview {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 45px rgba(25, 34, 37, 0.1);
  backdrop-filter: blur(18px) saturate(1.18);
}

.page-atlas .stat-strip {
  margin-left: 0;
  pointer-events: auto;
}

.page-atlas .stat-strip span {
  min-width: 86px;
}

.page-atlas .atlas-controls {
  position: absolute;
  top: 10px;
  left: 16px;
  right: 16px;
  bottom: auto;
  z-index: 8;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
  justify-content: center;
  align-items: flex-start;
}

.page-atlas .mode-group,
.page-atlas .mode-meta,
.page-atlas .taxonomy-gallery-toggle,
.page-atlas .taxonomy-tree-toggle {
  pointer-events: auto;
}

.page-atlas .mode-group {
  justify-content: center;
}

.metrics-controls {
  position: fixed;
  top: 132px;
  left: 50%;
  z-index: 9;
  display: flex;
  transform: translateX(-50%);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: min(1120px, calc(100vw - 24px));
  pointer-events: auto;
}

.metrics-controls[hidden] {
  display: none;
}

.metric-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 32px rgba(25, 34, 37, 0.1);
  backdrop-filter: blur(18px) saturate(1.16);
}

.metric-button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: #506066;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.metric-button.is-active {
  background: #172024;
  color: #ffffff;
}

.metric-chart-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(23, 32, 36, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.metric-chart-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #61717a;
  cursor: pointer;
}

.metric-chart-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-chart-button circle {
  fill: currentColor;
}

.metric-chart-button .dashed {
  stroke-dasharray: 3 3;
}

.metric-chart-button.is-active {
  background: #172024;
  color: #ffffff;
}

.icon-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 32, 36, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #506066;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(25, 34, 37, 0.08);
}

.icon-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.icon-toggle.is-active {
  background: #172024;
  color: #ffffff;
}

.original-diagram-toggle {
  position: fixed;
  top: 74px;
  left: 18px;
  z-index: 21;
}

.model-diagram-wrap {
  position: relative;
}

.model-diagram-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: auto;
  height: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 10px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
}

.model-diagram-toggle-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.original-diagram-toggle.is-pulsing {
  animation: original-diagram-pulse-ring 1.3s ease-out 3;
}

@keyframes original-diagram-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(23, 32, 36, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(23, 32, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 32, 36, 0); }
}

.original-diagram-hint {
  position: fixed;
  top: 80px;
  left: 62px;
  z-index: 22;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  color: #172024;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.original-diagram-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.original-diagram-hint-arrow {
  width: 34px;
  height: 28px;
  flex: none;
}

.original-diagram-hint-bubble {
  background: #172024;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(23, 32, 36, 0.25);
}

.wam-diagram-original .diagram-bg {
  fill: #ffffff;
}

.diagram-original-caption-text {
  font-size: 13px;
  fill: #6b7680;
}

.metric-chart-button.is-disabled,
.metric-chart-button:disabled {
  opacity: 0.34;
  cursor: default;
}

.metrics-controls select {
  max-width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  padding: 8px 28px 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #263238;
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  box-shadow: 0 14px 32px rgba(25, 34, 37, 0.1);
  backdrop-filter: blur(18px) saturate(1.16);
}

.metric-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #263238;
  font-size: 11px;
  font-weight: 820;
  box-shadow: 0 14px 32px rgba(25, 34, 37, 0.1);
  backdrop-filter: blur(18px) saturate(1.16);
}

.metric-filter-toggle[hidden] {
  display: none;
}

.metric-filter-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #172024;
}

.metric-filter-toggle input[type="number"] {
  width: 44px;
  border: 0;
  border-radius: 999px;
  padding: 4px 5px;
  background: rgba(23, 32, 36, 0.08);
  color: #172024;
  font: inherit;
  font-size: 11px;
  font-weight: 860;
}

.metric-filter-toggle input[type="number"]:disabled {
  opacity: 0.46;
}

.page-atlas .mode-meta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.reset-zoom-button {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(1.18);
}

.timeline-floating-legend {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 9;
  display: grid;
  grid-template-columns: max-content;
  gap: 5px 10px;
  align-items: center;
  pointer-events: auto;
}

.timeline-floating-legend[hidden] {
  display: none;
}

.timeline-floating-legend .timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(39, 52, 58, 0.88);
  font-size: 10px;
  font-weight: 820;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.76);
  white-space: nowrap;
  cursor: pointer;
}

.timeline-floating-legend .timeline-legend-item.is-unchecked {
  opacity: 0.42;
}

.timeline-legend-box {
  display: grid;
  width: 10px;
  height: 10px;
  place-items: center;
  border: 1px solid rgba(23, 32, 36, 0.32);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.78);
  color: #172024;
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
}

.timeline-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 1px 3px rgba(23, 32, 36, 0.16);
  flex: 0 0 auto;
}

.page-atlas .atlas-layout {
  display: block;
  width: 100%;
  height: 100%;
}

.page-atlas .atlas-canvas-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-atlas #atlasSvg {
  width: 100%;
  height: 100%;
}

.hover-preview {
  position: fixed;
  z-index: 30;
  width: min(720px, 48vw);
  height: calc((min(720px, 48vw) * 452 / 1160) + 31px);
  min-height: 0;
  padding: 0;
  border: 2.5px solid var(--preview-outline, rgba(23, 32, 36, 0.24));
  border-radius: var(--radius);
  opacity: 1;
  pointer-events: none;
  overflow: hidden;
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--preview-outline, rgba(23, 32, 36, 0.24)) 18%, transparent),
    0 16px 38px rgba(25, 34, 37, 0.12);
  transition: opacity 160ms ease, transform 160ms ease;
}

.hover-preview .preview-content {
  position: absolute;
  inset: 0;
  display: block;
  height: auto;
}

.hover-preview .preview-content h2 {
  position: absolute;
  top: 7px;
  left: 24px;
  right: 24px;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.25vw, 1.2rem);
  font-weight: 950;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 5px;
}

.hover-preview .diagram-title,
.hover-preview .diagram-kicker,
.hover-preview .diagram-subtitle {
  display: none;
}

.hover-preview .preview-kicker,
.hover-preview .preview-content p,
.hover-preview #previewOpen {
  display: none;
}

.hover-preview .diagram.mini {
  position: absolute;
  inset: 31px 0 0;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fbfcfa;
}

.hover-preview .wam-diagram {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
}

.hover-preview.preview-panel.is-metric {
  width: min(420px, calc(100vw - 24px));
  height: auto;
  max-height: none;
  padding: 11px;
  overflow: hidden;
}

.hover-preview.preview-panel.is-metric .preview-content {
  position: static;
  inset: auto;
}

.hover-preview.preview-panel.is-metric .preview-kicker {
  display: none;
}

.hover-preview.preview-panel.is-metric .diagram.mini,
.hover-preview.preview-panel.is-metric #previewDiagram,
.hover-preview.preview-panel.is-metric #previewOpen {
  display: none;
}

.diagram {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.model-diagram-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}

.model-diagram-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
}

.diagram.mini {
  height: 300px;
  margin: 14px 0;
}

.diagram.large {
  height: clamp(560px, 64vw, 760px);
  min-height: 560px;
}

.diagram svg {
  display: block;
  width: 100%;
  height: 100%;
}

.wam-diagram text {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  pointer-events: none;
}

.diagram-bg {
  fill: #fbfcf9;
}

.diagram-kicker {
  fill: var(--teal);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.diagram-title {
  fill: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.diagram-subtitle {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.diagram-panel,
.core-panel,
.training-panel {
  vector-effect: non-scaling-stroke;
  rx: 8px;
  ry: 8px;
}

.diagram-panel {
  fill: rgba(255, 255, 255, 0.84);
  stroke: rgba(174, 184, 174, 0.74);
}

.core-panel {
  stroke: rgba(23, 32, 36, 0.2);
}

.training-panel {
  fill: #f8faf7;
  stroke: #d9dfd9;
}

.panel-title,
.stack-title {
  fill: #536068;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.floating-column-title {
  fill: #68757d;
}

.token-rail,
.encoder-block,
.head-block,
.output-block,
.action-output,
.runtime-step,
.stage-chip,
.data-chip {
  vector-effect: non-scaling-stroke;
  rx: 7px;
  ry: 7px;
}

.token-rail {
  stroke-width: 1.2px;
}

.io-hit-area {
  fill: transparent;
  stroke: none;
}

.token-cell,
.core-token,
.action-cell,
.output-cell,
.noise-step {
  vector-effect: non-scaling-stroke;
  rx: 3px;
  ry: 3px;
}

.io-frame,
.io-language-box {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(23, 32, 36, 0.26);
  stroke-width: 1.1px;
  rx: 4px;
  ry: 4px;
  vector-effect: non-scaling-stroke;
}

.io-language-box {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(23, 32, 36, 0.42);
  stroke-width: 1.25px;
}

.io-sky {
  fill: rgba(93, 143, 197, 0.2);
  rx: 2px;
  ry: 2px;
}

.io-ground,
.io-stem,
.io-state-line,
.io-state-lane,
.io-action-path,
.io-action-arrow {
  fill: none;
  stroke: rgba(23, 32, 36, 0.72);
  stroke-width: 1.45px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.io-ground {
  stroke: rgba(90, 143, 99, 0.74);
}

.io-stem {
  stroke: rgba(90, 143, 99, 0.95);
}

.io-sun {
  fill: #f2b84b;
  stroke: rgba(174, 112, 28, 0.5);
  vector-effect: non-scaling-stroke;
}

.io-flower-petal {
  fill: #f2c94c;
  stroke: rgba(153, 95, 18, 0.24);
  vector-effect: non-scaling-stroke;
}

.io-flower-core {
  fill: #8f5e28;
}

.io-action-point {
  fill: rgba(208, 138, 46, 0.8);
}

.io-noise-cell {
  vector-effect: non-scaling-stroke;
}

.io-quote-mark,
.io-language-line {
  fill: none;
  stroke: rgba(23, 32, 36, 0.72);
  stroke-width: 1.35px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.io-language-line {
  stroke: rgba(23, 32, 36, 0.42);
}

.io-quote-mark {
  stroke-width: 1.75px;
}

.io-language-line {
  stroke: rgba(23, 32, 36, 0.5);
}

.io-detail-badge rect {
  fill: rgba(255, 255, 255, 0.88);
  stroke: rgba(23, 32, 36, 0.16);
  rx: 5px;
  ry: 5px;
  vector-effect: non-scaling-stroke;
}

.io-detail-badge text {
  fill: var(--ink);
  font-size: 8.5px;
  font-weight: 900;
}

.io-state-faint {
  fill: none;
  stroke: rgba(23, 32, 36, 0.2);
  stroke-width: 1px;
  stroke-linecap: round;
}

.io-state-lane {
  stroke: rgba(65, 104, 75, 0.78);
  stroke-width: 1.25px;
}

.io-state-joint {
  fill: #edf7ed;
  stroke: rgba(65, 104, 75, 0.9);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.io-action-path {
  stroke-width: 1.35px;
}

.io-action-a {
  stroke: rgba(180, 111, 25, 0.95);
}

.io-action-b {
  stroke: rgba(208, 138, 46, 0.62);
}

.io-action-c {
  stroke: rgba(151, 107, 184, 0.58);
}

.io-action-d {
  stroke: rgba(47, 135, 147, 0.52);
}

.io-action-arrow {
  stroke: rgba(180, 111, 25, 0.92);
}

.io-latent-cell {
  fill: rgba(47, 135, 147, 0.24);
  stroke: rgba(47, 135, 147, 0.64);
  rx: 1.5px;
  ry: 1.5px;
  vector-effect: non-scaling-stroke;
}

.rail-label,
.block-label,
.block-title,
.output-label,
.core-title {
  fill: var(--ink);
  font-weight: 900;
}

.rail-label,
.block-label,
.block-title,
.output-label {
  font-size: 11px;
}

.rail-detail,
.block-detail,
.output-detail,
.core-detail,
.stream-detail,
.training-detail,
.runtime-text {
  fill: var(--muted);
  font-weight: 650;
}

.rail-detail,
.core-detail {
  font-size: 10.5px;
}

.block-detail,
.output-detail,
.stream-detail,
.training-detail,
.runtime-text {
  font-size: 9.5px;
}

.block-title {
  dominant-baseline: middle;
}

.block-detail-badge rect {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(23, 32, 36, 0.18);
  rx: 4px;
  ry: 4px;
  vector-effect: non-scaling-stroke;
}

.block-detail-badge text {
  fill: #3c4a52;
  font-size: 7.5px;
  font-weight: 850;
  stroke: none;
  paint-order: normal;
}

.encoder-block {
  fill: #f8fbff;
  stroke: #b9cbe0;
}

.encoder-node,
.head-node {
  filter: drop-shadow(0 3px 4px rgba(23, 32, 36, 0.08));
}

.encoder-node text,
.head-node text {
  stroke: none;
  paint-order: normal;
}

.encoder-funnel,
.encoder-vlm,
.encoder-text,
.decoder-reverse-funnel,
.head-vlm,
.head-text {
  stroke-width: 1.25px;
  vector-effect: non-scaling-stroke;
}

.encoder-funnel,
.decoder-reverse-funnel {
  stroke-linejoin: round;
}

.encoder-vlm,
.head-vlm {
  rx: 9px;
  ry: 9px;
}

.encoder-text,
.head-text {
  rx: 14px;
  ry: 14px;
}

.encoder-vlm-screen {
  fill: rgba(255, 255, 255, 0.62);
  stroke: rgba(23, 32, 36, 0.16);
  vector-effect: non-scaling-stroke;
}

.encoder-glyph {
  opacity: 0.72;
}

.encoder-language {
  fill: #f5ecfb;
  stroke: #b48bd0;
}

.encoder-action {
  fill: #fff5e4;
  stroke: #d49a3d;
}

.encoder-state {
  fill: #edf7ed;
  stroke: #72a36e;
}

.encoder-latent,
.encoder-future {
  fill: #eaf7f6;
  stroke: #2f8793;
}

.head-block {
  fill: #fff8ed;
  stroke: #d8b16f;
}

.head-glyph {
  color: #b87422;
}

.head-transformer-block {
  rx: 5px;
  ry: 5px;
}

.head-seq-token {
  rx: 2px;
  ry: 2px;
}

.head-layer-line {
  stroke-width: 1.8px;
}

.head-glyph-label {
  fill: color-mix(in srgb, currentColor 62%, #172024);
  font-size: 7px;
  font-weight: 950;
}

.head-cnn-slice {
  rx: 4px;
  ry: 4px;
}

.idm-frame {
  fill: #eef6ff;
  stroke: #5d8fc5;
  stroke-width: 1px;
  rx: 4px;
  ry: 4px;
  vector-effect: non-scaling-stroke;
}

.latent-idm-frame {
  fill: #eaf7f6;
  stroke: #2f8793;
}

.latent-idm-z {
  fill: #2f6970;
  font-size: 10px;
  font-weight: 950;
}

.idm-back-arrow {
  fill: none;
  stroke: #9a651e;
  stroke-width: 1.4px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.idm-back-arrow-head {
  fill: #9a651e;
  stroke: none;
}

.idm-time-badge rect {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(23, 32, 36, 0.18);
  rx: 3px;
  ry: 3px;
}

.idm-time-badge text {
  fill: #172024;
  font-size: 5.5px;
  font-weight: 950;
}

.output-block {
  fill: #f4f7fb;
  stroke: #bdc9d6;
}

.action-output {
  fill: #fff2dd;
  stroke: #cf8c2d;
}

.output-cell {
  fill: #dbe5f0;
  stroke: #95aabe;
}

.action-cell {
  fill: #efb156;
  stroke: #b8751f;
}

.io-hand-glyph path,
.io-tactile-glyph path {
  fill: none;
  stroke: #9a651e;
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.io-hand-glyph path:first-child,
.io-tactile-glyph .finger-body {
  fill: rgba(255, 242, 220, 0.72);
}

.io-tactile-glyph .fingerprint-line {
  stroke: #2f8793;
  stroke-width: 1.7px;
}

.future-stage-block {
  fill: rgba(255, 255, 255, 0.74);
  stroke: rgba(47, 135, 147, 0.46);
  rx: 7px;
  ry: 7px;
  vector-effect: non-scaling-stroke;
}

.future-stage-node {
  filter: drop-shadow(0 2px 3px rgba(23, 32, 36, 0.07));
}

.core-title {
  font-size: 15px;
}

.shared-attn-band {
  fill: rgba(255, 255, 255, 0.48);
  stroke: rgba(23, 32, 36, 0.12);
  stroke-dasharray: 4 4;
  rx: 8px;
  ry: 8px;
}

.shared-attention-marker path {
  fill: none;
  stroke: rgba(82, 96, 102, 0.78);
  stroke-width: 2.6px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.shared-attention-marker text {
  fill: #526066;
  font-size: 9px;
  font-weight: 950;
}

.transformer-stack {
  fill: rgba(255, 255, 255, 0.64);
  stroke: rgba(23, 32, 36, 0.16);
  rx: 8px;
  ry: 8px;
}

.stream-row {
  fill: #ffffff;
  stroke: var(--stream);
  stroke-width: 1.2px;
  rx: 7px;
  ry: 7px;
}

.stream-label {
  fill: var(--ink);
  font-size: 10.5px;
  font-weight: 900;
}

.core-token {
  stroke: rgba(23, 32, 36, 0.18);
}

.sequence-panel,
.codebook-panel,
.idm-panel,
.enhancement-shell,
.latent-space {
  vector-effect: non-scaling-stroke;
}

.sequence-panel {
  fill: #ffffff;
  stroke: rgba(23, 32, 36, 0.16);
  rx: 8px;
  ry: 8px;
}

.sequence-token {
  rx: 4px;
  ry: 4px;
  stroke: rgba(23, 32, 36, 0.16);
  stroke-width: 0.8px;
  vector-effect: non-scaling-stroke;
}

.unified-core {
  stroke-width: 1.8px;
}

.joint-latent-core {
  stroke-dasharray: 7 4;
}

.unified-stream-shell {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(23, 32, 36, 0.12);
  stroke-width: 1px;
  rx: 11px;
  ry: 11px;
  vector-effect: non-scaling-stroke;
}

.unified-stream-core {
  color: #4f7fb5;
}

.unified-stream-token {
  fill: #5d8fc5;
  stroke: rgba(23, 32, 36, 0.15);
  stroke-width: 0.85px;
  rx: 5px;
  ry: 5px;
  vector-effect: non-scaling-stroke;
}

.unified-stream-token.state {
  fill: #72a36e;
}

.unified-stream-token.action {
  fill: #d49a3d;
}

.unified-stream-token.future {
  fill: #7ca8c8;
}

.unified-stream-token.noise {
  fill: #a9b1b8;
}

.unified-stream-tokens text {
  fill: rgba(255, 255, 255, 0.94);
  font-size: 10px;
  font-weight: 950;
  pointer-events: none;
}

.unified-stream-tokens.target {
  opacity: 0.86;
}

.unified-token-legend {
  pointer-events: none;
}

.unified-token-legend .unified-stream-token {
  stroke-width: 0.75px;
}

.unified-token-legend .legend-letter {
  fill: rgba(255, 255, 255, 0.94);
  font-size: 8px;
  font-weight: 950;
}

.unified-token-legend .legend-label {
  fill: rgba(23, 32, 36, 0.68);
  font-size: 7.7px;
  font-weight: 850;
}

.unified-causal-sweep {
  fill: none;
  stroke: rgba(23, 32, 36, 0.36);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 1 6;
  vector-effect: non-scaling-stroke;
}

.unified-stream-mode {
  fill: rgba(23, 32, 36, 0.58);
  font-size: 10px;
  font-weight: 900;
}

.unified-layer {
  fill: rgba(23, 32, 36, 0.84);
  stroke: rgba(255, 255, 255, 0.72);
  rx: 7px;
  ry: 7px;
  vector-effect: non-scaling-stroke;
}

.core-visual-transformer {
  color: #4f7fb5;
}

.core-visual-dit {
  color: #8f6bb8;
}

.core-visual-diffusion {
  color: #2f8793;
}

.core-visual-cnn {
  color: #5a8f63;
}

.core-visual-mlp {
  color: #d08a2e;
}

.core-visual-act {
  color: #c47a2c;
}

.core-transformer-block,
.core-cnn-slice {
  fill: color-mix(in srgb, currentColor 18%, white);
  stroke: color-mix(in srgb, currentColor 75%, #172024);
  stroke-width: 1.3px;
  rx: 7px;
  ry: 7px;
  vector-effect: non-scaling-stroke;
}

.core-seq-token {
  fill: color-mix(in srgb, currentColor 38%, white);
  stroke: color-mix(in srgb, currentColor 72%, #172024);
  rx: 3px;
  ry: 3px;
  vector-effect: non-scaling-stroke;
}

.core-layer-line,
.core-diffusion-loop,
.core-diffusion-arrow,
.core-mlp-edge {
  fill: none;
  stroke: color-mix(in srgb, currentColor 72%, #172024);
  stroke-width: 1.35px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.core-diffusion-loop {
  stroke-width: 2.8px;
}

.core-diffusion-arrow {
  fill: color-mix(in srgb, currentColor 78%, #172024);
  stroke: none;
}

.core-layer-line {
  stroke-width: 2.35px;
}

.causal-mask-cell {
  fill: color-mix(in srgb, currentColor 18%, white);
  stroke: color-mix(in srgb, currentColor 62%, #172024);
  stroke-width: 0.7px;
  rx: 2.2px;
  ry: 2.2px;
  vector-effect: non-scaling-stroke;
}

.causal-mask-cell.dark {
  fill: color-mix(in srgb, currentColor 78%, #172024);
  stroke: color-mix(in srgb, currentColor 82%, #172024);
}

.core-glyph-label {
  fill: color-mix(in srgb, currentColor 55%, #172024);
  font-size: 16px;
  font-weight: 950;
}

.core-mlp-node {
  fill: color-mix(in srgb, currentColor 30%, white);
  stroke: color-mix(in srgb, currentColor 75%, #172024);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.stream-lane {
  fill: rgba(255, 255, 255, 0.82);
  stroke: var(--stream);
  stroke-width: 2px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.attention-hub {
  fill: #172024;
  opacity: 0.92;
  rx: 14px;
  ry: 14px;
}

.attention-hub-label,
.latent-label {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.stream-to-hub {
  opacity: 0.5;
}

.stream-flow {
  fill: none;
  stroke-width: 4.5px;
  stroke-linecap: round;
  opacity: 0.76;
  vector-effect: non-scaling-stroke;
  mix-blend-mode: multiply;
}

.sankey-layer {
  opacity: 0.9;
  pointer-events: none;
}

.idm-sankey-layer {
  opacity: 0.82;
}

.sankey-ribbon {
  opacity: 0.42;
  mix-blend-mode: multiply;
}

.sankey-ribbon-edge {
  fill: none;
  stroke-width: 1.1px;
  stroke-linecap: round;
  opacity: 0.24;
  vector-effect: non-scaling-stroke;
}

.sankey-flow-label {
  fill: rgba(23, 32, 36, 0.55);
  font-size: 8.5px;
  font-weight: 850;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(251, 252, 249, 0.86);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.sankey-flow-label.is-output {
  fill: rgba(23, 32, 36, 0.48);
}

.flow-chevron {
  fill: none;
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
  vector-effect: non-scaling-stroke;
}

.stream-edge-label {
  paint-order: stroke;
  stroke: #fbfcf9;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.stream-attention-link {
  fill: none;
  stroke: rgba(23, 32, 36, 0.34);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}

.head-split-badge {
  fill: #f8faf7;
  stroke: #d5ddd4;
  rx: 7px;
  ry: 7px;
  vector-effect: non-scaling-stroke;
}

.head-split-text {
  fill: #536068;
  font-size: 9px;
  font-weight: 850;
}

.latent-space {
  fill: rgba(255, 255, 255, 0.76);
  stroke: rgba(53, 105, 183, 0.5);
  stroke-width: 2px;
}

.latent-node {
  stroke: #ffffff;
  stroke-width: 3px;
  filter: drop-shadow(0 6px 8px rgba(23, 32, 36, 0.16));
}

.codebook-panel {
  fill: #fffaf0;
  stroke: #d8b16f;
  stroke-width: 1.5px;
  rx: 10px;
  ry: 10px;
}

.codebook-cell {
  fill: #f2bd63;
  stroke: #b8751f;
  stroke-width: 1px;
  rx: 4px;
  ry: 4px;
  vector-effect: non-scaling-stroke;
}

.action-head-large {
  fill: #fff2dd;
  stroke: #cf8c2d;
  stroke-width: 1.4px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.future-core {
  stroke-width: 1.8px;
}

.future-pipeline-arrow path {
  fill: none;
  stroke: var(--future-flow);
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.future-pipeline-arrow .future-pipeline-arrow-head {
  fill: var(--future-flow);
  stroke: none;
}

.future-model-box rect {
  fill: rgba(255, 255, 255, 0.76);
  stroke: rgba(47, 105, 112, 0.48);
  stroke-width: 1.35px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.future-model-box text {
  fill: #2f6970;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.future-mini-badge rect,
.future-stage-chip rect {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(47, 105, 112, 0.22);
  rx: 5px;
  ry: 5px;
  vector-effect: non-scaling-stroke;
}

.future-mini-badge text {
  fill: #31484f;
  font-size: 8px;
  font-weight: 900;
}

.future-stage-chip rect {
  fill: rgba(236, 248, 246, 0.9);
  stroke: rgba(47, 135, 147, 0.32);
}

.future-stage-chip text {
  fill: #2f6970;
  font-size: 8.3px;
  font-weight: 900;
}

.compact-latent-frame {
  fill: rgba(234, 247, 246, 0.92);
}

.implicit-panel {
  fill: #f2fbfa;
  stroke: #86bfc0;
  stroke-width: 1.6px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.implicit-slot {
  fill: #ffffff;
  stroke: #2f8793;
  stroke-width: 1.4px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.implicit-slot.compact {
  rx: 6px;
  ry: 6px;
  fill: #ffffff;
}

.implicit-latent-shell {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(47, 135, 147, 0.26);
  stroke-width: 1.2px;
  rx: 12px;
  ry: 12px;
  vector-effect: non-scaling-stroke;
}

.implicit-stage text,
.implicit-future-slots text,
.implicit-policy-mini text {
  fill: #405057;
  font-size: 9px;
  font-weight: 900;
}

.implicit-flow {
  fill: none;
  stroke: #2f8793;
  stroke-width: 2.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.68;
  vector-effect: non-scaling-stroke;
}

.implicit-flow.condition {
  stroke: #d08a2e;
}

.implicit-slot-label {
  fill: #2f6970;
  font-size: 10px;
  font-weight: 900;
}

.conditioned-policy {
  stroke-width: 1.8px;
}

.condition-row {
  fill: rgba(255, 255, 255, 0.82);
  stroke: var(--stream);
  stroke-width: 1.5px;
  rx: 8px;
  ry: 8px;
  vector-effect: non-scaling-stroke;
}

.value-contour {
  fill: none;
  stroke: #ad7b16;
  stroke-width: 3px;
  stroke-linecap: round;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
}

.value-contour.compact {
  stroke-width: 2.2px;
  opacity: 0.58;
}

.alignment-core {
  stroke-width: 1.8px;
}

.alignment-feature-stack {
  fill: rgba(255, 255, 255, 0.68);
  stroke-width: 1.5px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.alignment-feature-stack.teacher {
  stroke: #6b7280;
}

.alignment-feature-stack.student {
  stroke: #2f8793;
}

.alignment-feature-cell {
  rx: 2px;
  ry: 2px;
  opacity: 0.74;
}

.alignment-teacher text,
.alignment-student text {
  fill: #405057;
  font-size: 9px;
  font-weight: 900;
}

.alignment-match-line {
  fill: none;
  stroke: #6b7280;
  stroke-width: 2.2px;
  stroke-linecap: round;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
}

.alignment-match-line.second {
  stroke: #2f8793;
  stroke-dasharray: 5 4;
}

.alignment-loss-chip {
  fill: rgba(255, 255, 255, 0.8);
  stroke: rgba(23, 32, 36, 0.16);
  rx: 9px;
  ry: 9px;
  vector-effect: non-scaling-stroke;
}

.alignment-loss-text {
  fill: #263238;
  font-size: 9px;
  font-weight: 950;
}

.future-frame,
.latent-frame {
  rx: 9px;
  ry: 9px;
  vector-effect: non-scaling-stroke;
}

.future-frame {
  fill: #e8f2ff;
  stroke: #5d8fc5;
}

.latent-frame {
  fill: #eef4f1;
  stroke: #72a36e;
  stroke-dasharray: 5 4;
}

.idm-panel {
  fill: #ffffff;
  stroke: #d9ad67;
  stroke-width: 1.5px;
  rx: 10px;
  ry: 10px;
}

.enhancement-shell {
  fill: none;
  fill-opacity: 0;
  stroke: rgba(23, 32, 36, 0.34);
  stroke-width: 1.8px;
  stroke-dasharray: 8 7;
  rx: 12px;
  ry: 12px;
}

.enhancement-chip {
  fill: rgba(255, 255, 255, 0.7);
  stroke: rgba(23, 32, 36, 0.18);
  rx: 8px;
  ry: 8px;
  vector-effect: non-scaling-stroke;
}

.encoder-policy-core {
  stroke-width: 1.8px;
}

.encoder-only-train rect,
.encoder-only-runtime rect {
  fill: rgba(255, 255, 255, 0.52);
  stroke: rgba(23, 32, 36, 0.16);
  stroke-width: 1.3px;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.encoder-only-train rect {
  fill: rgba(255, 246, 226, 0.66);
  stroke: rgba(173, 123, 22, 0.28);
  stroke-dasharray: 5 4;
}

.encoder-only-runtime rect {
  fill: rgba(236, 248, 246, 0.68);
  stroke: rgba(47, 135, 147, 0.28);
}

.encoder-only-train text,
.encoder-only-runtime text {
  fill: #405057;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.encoder-only-runtime-arrow,
.encoder-only-train-link {
  fill: none;
  stroke: #2f8793;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.encoder-only-train-link {
  stroke: rgba(173, 123, 22, 0.72);
  stroke-dasharray: 5 4;
}

.encoder-only-policy-glyph {
  color: #d08a2e;
}

.encoder-only-aux {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(23, 32, 36, 0.36);
  stroke-width: 1.7px;
  stroke-dasharray: 8 7;
  rx: 10px;
  ry: 10px;
  vector-effect: non-scaling-stroke;
}

.aux-head-block {
  fill: #f4f7fb;
  stroke: #bdc9d6;
  rx: 7px;
  ry: 7px;
  vector-effect: non-scaling-stroke;
}

.encoder-only-cut {
  fill: none;
  stroke: #b94844;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.layer-chip {
  fill: #172024;
  opacity: 0.9;
  rx: 6px;
  ry: 6px;
}

.layer-text {
  fill: #ffffff;
  font-size: 9.5px;
  font-weight: 850;
}

.attention-badge {
  fill: #eef4f1;
  stroke: #bdd4cf;
  rx: 10px;
  ry: 10px;
}

.attention-text,
.core-note {
  fill: #536068;
  font-size: 9px;
  font-weight: 850;
}

.noise-step {
  fill: #e7edf1;
  stroke: #7d8b94;
}

.diagram-flow,
.dashed-flow {
  fill: none;
  stroke: rgba(23, 32, 36, 0.42);
  stroke-width: 1.7px;
  vector-effect: non-scaling-stroke;
}

.dashed-flow {
  stroke-dasharray: 5 5;
  stroke: rgba(23, 32, 36, 0.32);
}

.edge-label {
  fill: #5f6b70;
  font-size: 9px;
  font-weight: 850;
}

.data-chip {
  fill: #eef4f1;
  stroke: #c6d9d3;
}

.data-text {
  fill: #32665f;
  font-size: 9.5px;
  font-weight: 850;
}

.stage-chip {
  fill: #ffffff;
  stroke: #d9dfd9;
}

.stage-chip.is-loss {
  fill: #fff7ed;
  stroke: #d9ad67;
}

.stage-chip.is-stage {
  fill: #f3f7ff;
  stroke: #b8cce7;
}

.training-label {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.runtime-step {
  fill: #ffffff;
  stroke: #d9dfd9;
}

.diagram-node:hover rect,
.training-chip:hover rect {
  stroke-width: 2px;
}

.diagram .module rect {
  stroke-width: 1.4;
  rx: 7;
  ry: 7;
}

.diagram .module text {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.diagram .module .detail {
  fill: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.diagram .edge {
  fill: none;
  stroke: rgba(23, 32, 36, 0.36);
  stroke-width: 1.7;
}

.diagram .stage-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.diagram .is-dim {
  opacity: 0.24;
}

.back-button {
  margin-bottom: 14px;
}

.model-card {
  padding: 22px;
}

.model-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.model-card-head h1 {
  margin-top: 10px;
}

.paper-link-mobile {
  display: none;
}

.model-card-head .preview-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--family-color, var(--accent)) 78%, #ffffff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--family-color, var(--accent)) 22%, #ffffff);
  color: color-mix(in srgb, var(--family-color, var(--accent)) 62%, #18242a);
}

.model-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.model-meta-grid div {
  min-width: 0;
  padding: 9px 10px;
}

.model-meta-grid strong {
  font-size: clamp(0.9rem, 1vw, 1.04rem);
  line-height: 1.15;
}

.model-meta-grid .param-total {
  display: inline-block;
  font-size: 0.76rem;
  text-transform: none;
  white-space: nowrap;
}

.model-section {
  margin-top: 22px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 28px;
}

.insight-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.insight-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.insight-carousel-controls {
  display: none;
}

.insight-list div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.insight-list dt {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.related-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.related-link-list a,
.related-link-list span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(17, 124, 120, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef4f1;
  color: #173c3a;
  font-size: 0.82rem;
  font-weight: 820;
  text-decoration: none;
}

.related-link-list a:hover {
  border-color: rgba(17, 124, 120, 0.42);
  background: #dcece8;
}

.stage-list {
  margin: 0;
  padding-left: 22px;
}

.stage-list li {
  margin-bottom: 12px;
  color: var(--ink);
  line-height: 1.48;
}

.stage-list strong {
  display: block;
  color: var(--ink);
}

.stage-list span,
.runtime-path,
.uncertainty-note {
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.content-page {
  width: min(1120px, calc(100vw - 32px));
}

.content-page section {
  margin-top: 16px;
  padding: 20px;
}

.grammar-grid,
.family-grid,
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.grammar-item,
.family-item,
.research-item,
.methodology-list div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #fff;
}

.methodology-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  counter-reset: methodology;
}

.methodology-list div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
}

.methodology-list strong {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #172024;
  color: #fff;
  font-size: 0.68rem;
}

.learn-flow {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 34px minmax(150px, 1.2fr) 34px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.learn-flow-step {
  display: grid;
  min-height: 54px;
  place-items: center;
  border-radius: var(--radius);
  color: #172024;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.learn-flow-step.is-input {
  border: 1px solid #aad0c7;
  background: #eaf5f2;
}

.learn-flow-step.is-core {
  border: 1px solid #d8ad58;
  background: #fff3dc;
}

.learn-flow-step.is-action {
  border: 1px solid #b79bd0;
  background: #f4edf8;
}

.learn-flow-arrow {
  position: relative;
  height: 2px;
  background: rgba(23, 32, 36, 0.28);
}

.learn-flow-arrow::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(23, 32, 36, 0.36);
}

.learn-flow-note {
  grid-column: 1 / -1;
  color: #506066;
  font-size: 0.78rem;
  font-weight: 720;
}

.grammar-item {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--grammar-color, #117c78) 18%, #ffffff), #ffffff 58%);
}

.grammar-input { --grammar-color: #117c78; }
.grammar-tokenizer { --grammar-color: #3569b7; }
.grammar-backbone { --grammar-color: #ad7b16; }
.grammar-attention { --grammar-color: #c85c45; }
.grammar-head { --grammar-color: #7656a6; }
.grammar-objective { --grammar-color: #4e7f36; }

.grammar-glyph {
  height: 40px;
  margin-bottom: 5px;
}

.grammar-glyph svg {
  display: block;
  width: 92px;
  height: 40px;
}

.grammar-glyph-block,
.grammar-glyph-token,
.grammar-glyph-funnel {
  fill: color-mix(in srgb, var(--grammar-color, #117c78) 16%, #ffffff);
  stroke: color-mix(in srgb, var(--grammar-color, #117c78) 72%, #172024);
  stroke-width: 1.5;
}

.grammar-glyph-line,
.grammar-glyph-action {
  fill: none;
  stroke: color-mix(in srgb, var(--grammar-color, #117c78) 78%, #172024);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.grammar-glyph-line.dashed {
  stroke-dasharray: 4 4;
}

.grammar-glyph-action {
  stroke: #ad7b16;
}

.grammar-glyph-number {
  fill: color-mix(in srgb, var(--grammar-color, #117c78) 80%, #172024);
  font-size: 18px;
  font-weight: 950;
}

.grammar-item strong,
.family-item strong,
.research-item strong {
  display: block;
  margin-bottom: 4px;
}

.grammar-item p,
.family-item p,
.research-item p,
.methodology-list p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.grammar-item p {
  font-size: 0.8rem;
  line-height: 1.34;
}

.methodology-list p {
  font-size: 0.8rem;
  line-height: 1.35;
}

.family-item {
  background: linear-gradient(180deg, color-mix(in srgb, var(--family-color, #117c78) 14%, #ffffff), #ffffff 58%);
}

.learn-family-diagram {
  display: block;
  width: 100%;
  height: 96px;
  margin-bottom: 8px;
}

.family-item span {
  display: block;
  margin-top: 9px;
  color: #4d5b61;
  font-size: 0.78rem;
  font-weight: 720;
}

.research-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.research-item {
  border-color: color-mix(in srgb, var(--research-accent, #117c78) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--research-accent, #117c78) 20%, #ffffff), #ffffff 62%);
}

.paper-table {
  overflow-x: auto;
}

.paper-table table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.paper-table th,
.paper-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.paper-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.paper-table td {
  font-size: 0.9rem;
}

.paper-family-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--paper-color, #117c78) 42%, #ffffff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-color, #117c78) 14%, #ffffff);
  color: color-mix(in srgb, var(--paper-color, #117c78) 58%, #172024);
  font-size: 0.78rem;
  font-weight: 850;
}

@media (max-width: 1050px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: grid;
  }

  .topbar-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 10px;
    z-index: 24;
    display: none;
    width: min(340px, calc(100vw - 20px));
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(23, 32, 36, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(25, 34, 37, 0.18);
    backdrop-filter: blur(18px);
  }

  .topbar-menu-panel.is-open {
    display: grid;
  }

  .topbar-menu-panel .nav-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar-menu-panel .nav-tab {
    width: 100%;
  }

  .topbar-menu-panel .github-link {
    width: 100%;
  }

  .mode-group {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mode-group::-webkit-scrollbar {
    display: none;
  }

  .atlas-header,
  .atlas-controls,
  .model-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .paper-link-default {
    display: none;
  }

  .paper-link-mobile {
    display: inline;
  }

  .atlas-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    min-height: auto;
  }

  .preview-empty {
    min-height: 160px;
  }

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

  .methodology-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page {
    width: min(100vw - 18px, 1520px);
  }

  .topbar {
    min-height: 58px;
    padding: 8px 10px;
  }

  .brand {
    --brand-mark-size: 36px;
    --brand-mark-art-size: 29px;
  }

  .page-atlas {
    height: calc(100dvh - 58px);
  }

  .page-atlas .atlas-controls {
    top: 8px;
    left: 8px;
    right: 8px;
    flex-direction: row;
  }

  .page-atlas .mode-group {
    width: min(100%, 390px);
    justify-content: stretch;
    gap: 2px;
    padding: 3px;
  }

  .page-atlas .mode-button {
    flex: 1 0 auto;
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .metrics-controls {
    top: 106px;
    gap: 5px;
    width: calc(100vw - 16px);
  }

  .metric-switch {
    max-width: 100%;
    gap: 1px;
    padding: 3px;
  }

  .metric-button {
    padding: 6px 7px;
    font-size: 9.5px;
  }

  .metrics-controls select {
    max-width: 152px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 10px;
  }

  .page-atlas .mode-meta {
    right: 10px;
    bottom: 10px;
  }

  .page-atlas .stat-strip {
    display: none;
  }

  .page-atlas .taxonomy-gallery-toggle,
  .page-atlas .taxonomy-tree-toggle {
    display: none !important;
  }

  .original-diagram-toggle {
    top: auto;
    bottom: 10px;
    left: 10px;
  }

  .original-diagram-hint {
    display: none;
  }

  .timeline-floating-legend {
    top: auto;
    right: auto;
    bottom: 58px;
    left: 10px;
    grid-template-columns: repeat(2, max-content);
  }

  .taxonomy-container text {
    font-size: 18px;
  }

  .taxonomy-family-label {
    font-size: 16px;
  }

  .family-hover-card {
    top: auto !important;
    right: 10px;
    bottom: 10px;
    left: 10px !important;
    width: auto;
    max-height: min(58dvh, 470px);
    overflow-y: auto;
    padding: 14px;
    pointer-events: none;
  }

  .atlas-canvas-wrap,
  #atlasSvg {
    min-height: 560px;
    height: 560px;
  }

  .model-meta-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .model-meta-grid div {
    min-width: 0;
    padding: 8px 4px;
    text-align: center;
  }

  .model-meta-grid span {
    font-size: 0.58rem;
    letter-spacing: -0.01em;
  }

  .model-meta-grid strong {
    overflow-wrap: anywhere;
    font-size: 0.7rem;
    line-height: 1.15;
  }

  .model-meta-grid .param-total {
    display: block;
    font-size: 0.58rem;
    white-space: normal;
  }

  .insight-carousel {
    min-width: 0;
  }

  .insight-carousel-head {
    margin-bottom: 10px;
  }

  .insight-carousel-head h2 {
    margin: 0;
  }

  .insight-carousel-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .insight-carousel-controls button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
  }

  .insight-carousel-controls button:disabled {
    opacity: 0.35;
    cursor: default;
  }

  .insight-carousel-controls span {
    min-width: 38px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 850;
    text-align: center;
  }

  .insight-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 1px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }

  .insight-list::-webkit-scrollbar {
    display: none;
  }

  .insight-list div {
    display: block;
    flex: 0 0 calc(100% - 2px);
    min-height: 168px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--teal) 5%, #ffffff);
    scroll-snap-align: start;
  }

  .insight-list dt {
    margin-bottom: 9px;
  }

  .insight-list dd {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .diagram.large {
    height: 620px;
    min-height: 620px;
  }

  .diagram.large .wam-diagram {
    width: 980px;
    height: 610px;
    max-width: none;
  }

  .diagram.mini .wam-diagram {
    width: 760px;
    max-width: none;
  }
}
