:root {
  --ink: #10233f;
  --muted: #5f6f86;
  --line: #d8e3ef;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --blue: #2374e1;
  --blue-dark: #1556ad;
  --cyan: #43b7d8;
  --orange: #f27632;
  --red: #dd3c39;
  --green: #1f9f6b;
  --mint: #dff8ec;
  --yellow: #f7c948;
  --shadow: 0 18px 48px rgba(37, 64, 105, 0.16);
  --soft-shadow: 0 9px 24px rgba(36, 73, 118, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(67, 183, 216, 0.22), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(242, 118, 50, 0.14), transparent 24%),
    linear-gradient(135deg, #f6fbff 0%, #eef6ff 46%, #f7faf8 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(6px, 1.2vw, 14px);
}

.explainer-widget {
  width: min(100%, 1440px);
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 14px;
  overflow: visible;
  border: 1px solid rgba(151, 174, 199, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.94)),
    linear-gradient(120deg, rgba(35, 116, 225, 0.09), rgba(31, 159, 107, 0.08));
  box-shadow: var(--shadow);
  transition: background 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.explainer-widget[data-mode="use"] {
  border-color: rgba(35, 116, 225, 0.52);
  background:
    radial-gradient(circle at 88% 10%, rgba(67, 183, 216, 0.2), transparent 28%),
    radial-gradient(circle at 12% 12%, rgba(35, 116, 225, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 247, 255, 0.98)),
    linear-gradient(120deg, rgba(35, 116, 225, 0.16), rgba(67, 183, 216, 0.12));
  box-shadow: 0 18px 48px rgba(35, 84, 148, 0.17);
}

.explainer-widget[data-mode="train"] {
  border-color: rgba(242, 118, 50, 0.58);
  background:
    radial-gradient(circle at 12% 8%, rgba(242, 118, 50, 0.22), transparent 30%),
    radial-gradient(circle at 86% 14%, rgba(247, 201, 72, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 241, 231, 0.98)),
    linear-gradient(120deg, rgba(242, 118, 50, 0.18), rgba(247, 201, 72, 0.12));
  box-shadow: 0 18px 48px rgba(136, 72, 32, 0.18);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-tools {
  min-width: min(560px, 48vw);
  display: grid;
  gap: 7px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(118, 149, 183, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(237, 245, 253, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 8px 18px rgba(46, 76, 108, 0.08);
}

.mode-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(117, 147, 181, 0.38);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 253, 0.88));
  color: #2f4c68;
  font-size: 0.72rem;
  font-weight: 850;
  box-shadow:
    0 3px 8px rgba(36, 73, 118, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mode-button:hover {
  border-color: rgba(35, 116, 225, 0.38);
  color: #123f80;
  transform: translateY(-1px);
  box-shadow:
    0 6px 14px rgba(36, 73, 118, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.mode-button:active {
  transform: translateY(0);
  box-shadow:
    0 2px 6px rgba(36, 73, 118, 0.1),
    inset 0 2px 5px rgba(36, 73, 118, 0.08);
}

.mode-button.is-active {
  color: #0f4f9b;
  border-color: rgba(35, 116, 225, 0.52);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(226, 241, 255, 0.9));
  box-shadow:
    0 7px 16px rgba(35, 116, 225, 0.18),
    inset 0 0 0 1px rgba(35, 116, 225, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.explainer-widget[data-mode="train"] .mode-button.is-active {
  color: #943714;
  border-color: rgba(242, 118, 50, 0.54);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 237, 226, 0.9));
  box-shadow:
    0 7px 16px rgba(242, 118, 50, 0.18),
    inset 0 0 0 1px rgba(242, 118, 50, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.mode-button:focus-visible {
  outline: 3px solid rgba(35, 116, 225, 0.18);
  outline-offset: 2px;
}

.title-cluster {
  display: grid;
  gap: 4px;
}

.sample-badge {
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: 0 7px 18px rgba(35, 116, 225, 0.25);
}

.explainer-widget[data-mode="train"] .sample-badge {
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  box-shadow: 0 7px 18px rgba(242, 118, 50, 0.22);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: 0;
  color: #0c2a55;
}

.subtitle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 0;
  color: #41617f;
  font-size: clamp(0.92rem, 1.5vw, 1.12rem);
  font-weight: 650;
}

.subtitle span {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35, 116, 225, 0.58));
}

.subtitle span:last-child {
  background: linear-gradient(90deg, rgba(35, 116, 225, 0.58), transparent);
}

.explainer-widget[data-mode="train"] .subtitle span:first-child {
  background: linear-gradient(90deg, transparent, rgba(242, 118, 50, 0.52));
}

.explainer-widget[data-mode="train"] .subtitle span:last-child {
  background: linear-gradient(90deg, rgba(242, 118, 50, 0.52), transparent);
}

.subtitle strong {
  font: inherit;
}

.training-status {
  min-width: 274px;
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 7px;
  overflow: visible;
}

.training-status > .status-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px 9px;
  border: 1px solid rgba(142, 168, 194, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  transition: background 220ms ease, border-color 220ms ease;
}

.explainer-widget[data-mode="use"] .training-status > .status-card {
  border-color: rgba(35, 116, 225, 0.26);
  background: rgba(246, 252, 255, 0.86);
}

.explainer-widget[data-mode="train"] .training-status > .status-card {
  border-color: rgba(242, 118, 50, 0.4);
  background: rgba(255, 244, 236, 0.9);
}

.status-label {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.18;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.info-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: visible;
}

.info-icon {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(35, 116, 225, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.95), rgba(224, 240, 255, 0.92) 62%, rgba(35, 116, 225, 0.14));
  color: #2368c9;
  cursor: help;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
  box-shadow: 0 4px 10px rgba(35, 116, 225, 0.12);
}

.info-icon:focus-visible {
  outline: 2px solid rgba(35, 116, 225, 0.62);
  outline-offset: 2px;
}

.status-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 9px);
  right: -8px;
  z-index: 40;
  width: max-content;
  min-width: min(180px, calc(100vw - 32px));
  max-width: min(270px, calc(100vw - 32px));
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 31, 61, 0.94);
  color: #f8fbff;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 16px 34px rgba(10, 31, 61, 0.24);
}

.status-tooltip::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 12px;
  width: 9px;
  height: 9px;
  background: rgba(10, 31, 61, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(45deg);
}

.info-wrap:hover .status-tooltip,
.info-wrap:focus-within .status-tooltip {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.training-status strong {
  color: var(--ink);
  font-size: 0.98rem;
  text-transform: none;
}

.visual-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: clamp(520px, 66vh, 720px);
}

.zone {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(154, 177, 202, 0.34);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.explainer-widget[data-mode="train"] .zone {
  border-color: rgba(242, 118, 50, 0.44);
  box-shadow: 0 9px 24px rgba(136, 72, 32, 0.13);
}

.explainer-widget[data-mode="use"] .zone {
  border-color: rgba(35, 116, 225, 0.34);
  box-shadow: 0 9px 24px rgba(35, 84, 148, 0.12);
}

.zone-heading {
  display: grid;
  gap: 2px;
}

.zone-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.zone-heading h2 {
  margin-bottom: 0;
  color: #14345f;
  font-size: clamp(0.95rem, 1.35vw, 1.18rem);
  line-height: 1.05;
}

.example-stack {
  display: grid;
  gap: 9px;
}

.example-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(170, 189, 209, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.example-item strong {
  display: block;
  margin-bottom: 4px;
  color: #193a66;
  font-size: 0.88rem;
}

.thumb {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(145deg, #e7f3ff, #ffffff);
  border: 1px solid rgba(35, 116, 225, 0.22);
  overflow: hidden;
}

.thumb::before,
.thumb::after,
.thumb i,
.thumb i::before,
.thumb i::after {
  content: "";
  position: absolute;
  display: block;
}

.thumb-cat::before {
  width: 18px;
  height: 14px;
  left: 10px;
  top: 14px;
  border-radius: 9px 9px 7px 7px;
  background: #2374e1;
}

.thumb-cat::after {
  width: 6px;
  height: 6px;
  left: 10px;
  top: 10px;
  transform: rotate(45deg);
  background: #2374e1;
  box-shadow: 12px -12px 0 -1px #2374e1;
}

.thumb-cat i {
  width: 17px;
  height: 8px;
  left: 12px;
  bottom: 7px;
  border-bottom: 2px solid #43b7d8;
  border-radius: 0 0 12px 12px;
}

.thumb-dog::before {
  width: 20px;
  height: 15px;
  left: 10px;
  top: 14px;
  border-radius: 9px;
  background: #1f9f6b;
}

.thumb-dog::after {
  width: 8px;
  height: 11px;
  left: 7px;
  top: 14px;
  border-radius: 8px 2px 7px 5px;
  background: #147d55;
  box-shadow: 18px 0 0 #147d55;
}

.thumb-dog i {
  width: 10px;
  height: 5px;
  right: 8px;
  bottom: 8px;
  border-radius: 0 0 8px 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.95);
}

.thumb-shoe::before {
  width: 24px;
  height: 11px;
  left: 7px;
  top: 19px;
  border-radius: 12px 12px 7px 5px;
  background: #f27632;
}

.thumb-shoe::after {
  width: 28px;
  height: 3px;
  left: 5px;
  top: 29px;
  border-radius: 99px;
  background: #c9501c;
}

.thumb-shoe i {
  width: 10px;
  height: 5px;
  left: 15px;
  top: 16px;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  transform: rotate(12deg);
}

.feature-dots {
  display: flex;
  gap: 4px;
}

.feature-dots i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.9;
}

.feature-dots i:nth-child(2) {
  opacity: 0.62;
}

.feature-dots i:nth-child(3) {
  width: 18px;
  border-radius: 99px;
  opacity: 0.72;
}

.feature-dots i:nth-child(4) {
  background: var(--cyan);
}

.feature-dots--mixed i:nth-child(2),
.feature-dots--mixed i:nth-child(4) {
  background: var(--green);
}

.feature-dots--low i:nth-child(1),
.feature-dots--low i:nth-child(3) {
  background: var(--orange);
}

.input-arrows {
  display: grid;
  gap: 11px;
  padding-left: 62px;
}

.input-arrows span {
  position: relative;
  width: min(78px, 70%);
  height: 2px;
  background: linear-gradient(90deg, rgba(35, 116, 225, 0.24), var(--blue));
}

.input-arrows span::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--blue);
  border-top: 2px solid var(--blue);
  transform: rotate(45deg);
}

.network-zone {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 7px;
  padding: 14px 16px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(242, 248, 255, 0.92)),
    radial-gradient(circle at 52% 52%, rgba(35, 116, 225, 0.12), transparent 55%);
}

.explainer-widget[data-mode="train"] .network-zone {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 241, 232, 0.94)),
    radial-gradient(circle at 52% 52%, rgba(242, 118, 50, 0.2), transparent 58%);
}

.explainer-widget[data-mode="use"] .network-zone {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(237, 248, 255, 0.94)),
    radial-gradient(circle at 52% 52%, rgba(35, 116, 225, 0.18), transparent 58%);
}

.network-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.network-chip {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(35, 116, 225, 0.1);
  color: var(--blue-dark);
  font-size: 0.74rem;
  font-weight: 800;
}

.explainer-widget[data-mode="use"] .network-chip {
  background: rgba(35, 116, 225, 0.16);
  box-shadow: inset 0 0 0 1px rgba(35, 116, 225, 0.12);
}

.layer-labels {
  display: grid;
  grid-template-columns: 1fr 2.15fr 1fr;
  color: #536c86;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.layer-labels span:nth-child(2) {
  text-align: center;
}

.layer-labels span:nth-child(3) {
  text-align: right;
}

.network-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(35, 116, 225, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 116, 225, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(236, 247, 255, 0.5)),
    radial-gradient(circle at 50% 48%, rgba(35, 116, 225, 0.11), transparent 58%);
  background-size: 34px 34px, 34px 34px, auto, auto;
  border: 1px solid rgba(161, 184, 208, 0.32);
}

.macro-network-canvas {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.network-stage.is-intro .macro-network-canvas {
  opacity: 1;
}

.network-stage.is-intro #networkSvg {
  opacity: 0;
  filter: blur(2px) saturate(0.82);
  transform: scale(0.985);
}

.network-stage.is-intro .phase-rail,
.network-stage.is-intro .flow-label {
  opacity: 0;
}

.network-stage.is-settling #networkSvg {
  animation: networkSettle 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.network-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(35, 116, 225, 0.08) 46%, rgba(67, 183, 216, 0.16) 50%, rgba(35, 116, 225, 0.08) 54%, transparent 100%);
  opacity: 0;
  transform: translateX(-74%);
  animation: stageSweep 5.2s ease-in-out infinite;
  pointer-events: none;
}

.network-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(246, 251, 255, 0.64), transparent 6%, transparent 94%, rgba(246, 251, 255, 0.64)),
    linear-gradient(180deg, rgba(246, 251, 255, 0.5), transparent 10%, transparent 90%, rgba(246, 251, 255, 0.5));
  pointer-events: none;
}

#networkSvg {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 1;
  transform-origin: center;
  transition: opacity 520ms ease, filter 520ms ease, transform 520ms ease;
}

.context-connection {
  stroke: rgba(35, 116, 225, 0.12);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 2 8;
  pointer-events: none;
}

.context-node {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(35, 116, 225, 0.2);
  stroke-width: 2;
  filter: url(#nodeGlow);
  pointer-events: none;
}

.context-node--deep {
  fill: rgba(236, 247, 255, 0.55);
  stroke: rgba(100, 132, 165, 0.16);
}

.context-depth-ring {
  fill: none;
  stroke: rgba(35, 116, 225, 0.12);
  stroke-width: 2;
  stroke-dasharray: 12 14;
  pointer-events: none;
}

.context-depth-ring--warm {
  stroke: rgba(242, 118, 50, 0.13);
}

.layer-field {
  opacity: 0.2;
  transition: opacity 240ms ease, transform 240ms ease;
}

.layer-field--input {
  fill: url(#fieldBlue);
}

.layer-field--hidden {
  fill: url(#fieldCyan);
}

.layer-field--output {
  fill: url(#fieldGreen);
}

.layer-focus-halo {
  fill: rgba(35, 116, 225, 0.045);
  stroke: rgba(35, 116, 225, 0.18);
  stroke-width: 2;
  stroke-dasharray: 10 12;
  filter: url(#blueGlow);
  pointer-events: none;
}

.layer-meter {
  pointer-events: none;
}

.layer-meter-segment {
  fill: rgba(35, 116, 225, 0.13);
  transition: fill 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.layer-meter-segment.is-active {
  fill: url(#packetBlue);
  filter: url(#packetGlow);
}

.memory-trail {
  stroke: rgba(31, 159, 107, 0.22);
  stroke-width: 10;
  stroke-linecap: round;
  filter: url(#greenGlow);
  pointer-events: none;
}

.connection {
  fill: none;
  stroke-linecap: round;
  transition: stroke-width 240ms ease, opacity 240ms ease, stroke 240ms ease;
}

.connection--weak {
  stroke: rgba(100, 132, 165, 0.26);
}

.connection--strong {
  stroke: rgba(35, 116, 225, 0.84);
  filter: url(#blueGlow);
}

.connection--primary {
  stroke: rgba(5, 108, 226, 0.96);
  filter: url(#blueGlow);
}

.connection--adjust {
  stroke: rgba(242, 118, 50, 0.86);
  stroke-dasharray: 8 8;
  filter: url(#orangeGlow);
  animation: backflow 1.9s linear infinite;
}

.connection--signal {
  stroke-dasharray: 4 14;
  animation: signalflow 1.45s linear infinite;
}

.weight-label {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 5;
  fill: #1c4677;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
}

.weight-label--negative {
  fill: #b94724;
}

.weight-label--attention {
  fill: #2368c9;
}

.signal-packet,
.error-packet,
.attention-packet {
  pointer-events: none;
  transition: opacity 120ms linear;
}

.signal-packet {
  fill: url(#packetBlue);
  filter: url(#packetGlow);
}

.error-packet {
  fill: url(#packetOrange);
  filter: url(#orangeGlow);
}

.attention-packet {
  fill: url(#packetBlue);
  filter: url(#packetGlow);
}

.weight-spark {
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
}

.weight-spark circle {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(242, 118, 50, 0.82);
  stroke-width: 2;
  filter: url(#orangeGlow);
}

.weight-spark path {
  stroke: rgba(242, 118, 50, 0.9);
  stroke-width: 2;
  stroke-linecap: round;
}

.weight-delta {
  opacity: 0;
  pointer-events: none;
}

.weight-delta rect {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(242, 118, 50, 0.38);
  stroke-width: 1.5;
  filter: url(#orangeGlow);
}

.weight-delta text {
  fill: #b94724;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 4;
}

.error-wave {
  fill: none;
  stroke: rgba(242, 118, 50, 0.58);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 12;
  filter: url(#orangeGlow);
  pointer-events: none;
}

.attention-wave {
  fill: none;
  stroke: rgba(67, 183, 216, 0.52);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 13;
  filter: url(#blueGlow);
  pointer-events: none;
}

.explainer-widget[data-mode="use"] .error-wave {
  stroke: rgba(35, 116, 225, 0.42);
  filter: url(#blueGlow);
}

.activation-ring,
.output-ring {
  fill: none;
  pointer-events: none;
}

.activation-ring {
  stroke: rgba(35, 116, 225, 0.32);
  stroke-width: 2;
}

.output-ring {
  stroke: rgba(31, 159, 107, 0.66);
  stroke-width: 3;
  filter: url(#greenGlow);
}

.loss-ripple {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 7 9;
  pointer-events: none;
}

.loss-ripple--target {
  stroke: rgba(31, 159, 107, 0.46);
  filter: url(#greenGlow);
}

.loss-ripple--error {
  stroke: rgba(242, 118, 50, 0.5);
  filter: url(#orangeGlow);
}

.explainer-widget[data-mode="use"] .loss-ripple--error {
  stroke: rgba(35, 116, 225, 0.26);
  filter: url(#blueGlow);
}

.output-probability {
  pointer-events: none;
}

.output-probability rect:first-child {
  fill: rgba(35, 116, 225, 0.13);
}

.output-probability-fill {
  fill: url(#nodeGreen);
  filter: url(#greenGlow);
}

.output-probability-text {
  fill: #244767;
  font-size: 16px;
  font-weight: 900;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 5;
}

.neuron circle {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2;
  filter: url(#nodeGlow);
}

.neuron text {
  fill: #163150;
  font-size: 10.4px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.neuron--hot circle {
  filter: url(#hotGlow);
}

.output-label {
  fill: #36536f;
  font-size: 15px;
  font-weight: 800;
}

.flow-label {
  position: absolute;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(167, 187, 207, 0.52);
  box-shadow: 0 8px 16px rgba(39, 68, 100, 0.1);
}

.flow-label--forward {
  top: 12px;
  left: 16px;
  color: var(--blue-dark);
}

.flow-label--backward {
  right: clamp(86px, 10vw, 150px);
  bottom: 112px;
  color: #ba4b21;
}

.explainer-widget[data-mode="use"] .flow-label--backward {
  color: #0d6c8d;
  border-color: rgba(67, 183, 216, 0.28);
  background: rgba(245, 252, 255, 0.86);
}

.flow-label--adjust {
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  color: #1b7a53;
}

.chat-context {
  position: absolute;
  z-index: 4;
  width: min(264px, 24vw);
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(154, 177, 202, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #18365c;
  box-shadow: 0 12px 24px rgba(36, 73, 118, 0.11);
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.chat-context span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.chat-context strong {
  color: #12345f;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.18;
}

.chat-context i {
  color: #2368c9;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1.16;
}

.chat-context--prompt {
  left: 24px;
  bottom: 28px;
}

.chat-context--reply {
  right: 86px;
  top: 48px;
  border-color: rgba(31, 159, 107, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 255, 249, 0.76));
}

.chat-context--reply i {
  color: #1b7a53;
}

.explainer-widget[data-mode="train"] .network-chip {
  color: #943714;
  background: rgba(242, 118, 50, 0.18);
  box-shadow: inset 0 0 0 1px rgba(242, 118, 50, 0.16);
}

.explainer-widget[data-mode="train"] .chat-context--reply {
  border-color: rgba(242, 118, 50, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 244, 236, 0.76));
}

.explainer-widget[data-mode="train"] .chat-context--reply i {
  color: #a9481f;
}

.phase-rail {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 12px;
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(151, 174, 199, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(38, 68, 102, 0.1);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.phase-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 78px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #49647d;
  font-size: 0.68rem;
  font-weight: 850;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.phase-step i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(73, 100, 125, 0.32);
}

.phase-step.is-active {
  color: #0f4f9b;
  background: rgba(35, 116, 225, 0.12);
  box-shadow: inset 0 0 0 1px rgba(35, 116, 225, 0.16);
}

.phase-step.is-active i {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(35, 116, 225, 0.12);
}

.phase-step[data-phase="backprop"].is-active {
  color: #ad421d;
  background: rgba(242, 118, 50, 0.13);
}

.phase-step[data-phase="backprop"].is-active i {
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(242, 118, 50, 0.12);
}

.explainer-widget[data-mode="use"] .phase-step[data-phase="backprop"].is-active {
  color: #0d6c8d;
  background: rgba(67, 183, 216, 0.14);
}

.explainer-widget[data-mode="use"] .phase-step[data-phase="backprop"].is-active i {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(67, 183, 216, 0.14);
}

.phase-step[data-phase="update"].is-active {
  color: #18724d;
  background: rgba(31, 159, 107, 0.13);
}

.phase-step[data-phase="update"].is-active i {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(31, 159, 107, 0.12);
}

.network-caption {
  margin: 1px 0 0;
  color: #264563;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.prediction-loop {
  display: grid;
  gap: 4px;
}

.loop-step {
  padding: 6px 8px;
  border: 1px solid rgba(165, 184, 203, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.loop-step span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.loop-step strong {
  color: #18385e;
  font-size: 0.78rem;
  line-height: 1.12;
}

.loop-step--green,
.loop-step--improved {
  border-color: rgba(31, 159, 107, 0.28);
  background: linear-gradient(180deg, rgba(223, 248, 236, 0.72), rgba(255, 255, 255, 0.76));
}

.loop-step--error {
  border-color: rgba(242, 118, 50, 0.34);
  background: linear-gradient(180deg, rgba(255, 230, 217, 0.78), rgba(255, 255, 255, 0.8));
}

.loop-step--improved b {
  color: var(--green);
}

.loop-arrow {
  width: 2px;
  height: 10px;
  margin-left: 18px;
  background: linear-gradient(180deg, var(--blue), transparent);
  position: relative;
}

.loop-arrow::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(35, 116, 225, 0.7);
  border-bottom: 2px solid rgba(35, 116, 225, 0.7);
  transform: rotate(45deg);
}

.process-strip {
  display: grid;
  grid-template-columns: 1fr 18px 1fr 18px 1fr 18px 1fr 18px 1fr;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(154, 177, 202, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 18px rgba(46, 76, 108, 0.08);
  transition: background 220ms ease, border-color 220ms ease;
}

.explainer-widget[data-mode="train"] .process-strip {
  border-color: rgba(242, 118, 50, 0.38);
  background: rgba(255, 244, 236, 0.82);
}

.explainer-widget[data-mode="use"] .process-strip {
  border-color: rgba(35, 116, 225, 0.32);
  background: rgba(245, 252, 255, 0.82);
}

.process-step {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #244767;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.process-step i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--cyan));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.36);
}

.process-step--error i {
  background: linear-gradient(145deg, var(--orange), var(--red));
}

.explainer-widget[data-mode="use"] .process-step--error i {
  background: linear-gradient(145deg, var(--cyan), var(--blue));
}

.process-step--adjust i {
  background: linear-gradient(145deg, var(--yellow), var(--orange));
}

.process-step--improve i {
  background: linear-gradient(145deg, var(--green), #65c78e);
}

.process-strip b {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(35, 116, 225, 0.34), rgba(35, 116, 225, 0.72));
  position: relative;
}

.process-strip b::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(35, 116, 225, 0.72);
  border-top: 2px solid rgba(35, 116, 225, 0.72);
  transform: rotate(45deg);
}

.legend-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(154, 177, 202, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 249, 255, 0.76)),
    radial-gradient(circle at 12% 8%, rgba(35, 116, 225, 0.08), transparent 38%);
  box-shadow: 0 8px 18px rgba(46, 76, 108, 0.08);
  transition: background 220ms ease, border-color 220ms ease;
}

.explainer-widget[data-mode="train"] .legend-card {
  border-color: rgba(242, 118, 50, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 243, 235, 0.84)),
    radial-gradient(circle at 12% 8%, rgba(242, 118, 50, 0.15), transparent 40%);
}

.explainer-widget[data-mode="use"] .legend-card {
  border-color: rgba(35, 116, 225, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 249, 255, 0.84)),
    radial-gradient(circle at 12% 8%, rgba(35, 116, 225, 0.13), transparent 40%);
}

.legend-heading {
  min-width: 116px;
  display: grid;
  gap: 2px;
}

.legend-heading h3 {
  margin: 0;
  color: #14345f;
  font-size: 0.9rem;
  line-height: 1.05;
}

.legend-heading span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.2;
  text-transform: uppercase;
}

.legend-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 7px 10px;
  margin: 0;
}

.legend-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.legend-item dt {
  margin: 0 0 1px;
  color: #17395f;
  font-size: 0.71rem;
  font-weight: 850;
}

.legend-item dd {
  margin: 0;
  color: #556b82;
  font-size: 0.65rem;
  font-weight: 620;
  line-height: 1.24;
}

.legend-mark {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.legend-mark--neuron::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 1px solid rgba(35, 116, 225, 0.36);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffffff, #dff0ff 70%, rgba(35, 116, 225, 0.2));
  box-shadow: 0 0 0 4px rgba(35, 116, 225, 0.08);
}

.legend-mark--weight::before {
  content: "";
  width: 23px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(35, 116, 225, 0.18), rgba(35, 116, 225, 0.88));
  transform: rotate(-24deg);
}

.legend-mark--forward::before,
.legend-mark--error::before,
.legend-mark--update::before {
  content: "";
  width: 23px;
  height: 3px;
  border-radius: 999px;
}

.legend-mark--forward::before {
  background: linear-gradient(90deg, rgba(35, 116, 225, 0.16), var(--blue));
  box-shadow: 6px 0 10px rgba(35, 116, 225, 0.22);
}

.legend-mark--error::before {
  background: linear-gradient(90deg, rgba(242, 118, 50, 0.18), var(--orange));
  box-shadow: 6px 0 10px rgba(242, 118, 50, 0.22);
}

.legend-mark--update::before {
  background: linear-gradient(90deg, rgba(31, 159, 107, 0.18), var(--green));
  box-shadow: 6px 0 10px rgba(31, 159, 107, 0.22);
}

.legend-mark--forward::after,
.legend-mark--error::after,
.legend-mark--update::after {
  content: "";
  position: absolute;
  right: 1px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.legend-mark--forward {
  color: var(--blue);
}

.legend-mark--error {
  color: var(--orange);
}

.explainer-widget[data-mode="use"] .legend-mark--error {
  color: var(--blue);
}

.explainer-widget[data-mode="use"] .legend-mark--error::before {
  background: linear-gradient(90deg, rgba(67, 183, 216, 0.18), var(--cyan));
  box-shadow: 6px 0 10px rgba(67, 183, 216, 0.22);
}

.legend-mark--update {
  color: var(--green);
}

.legend-mark--metric::before {
  content: "";
  width: 21px;
  height: 16px;
  border: 1px solid rgba(142, 168, 194, 0.5);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(35, 116, 225, 0.13), rgba(35, 116, 225, 0.13)) 4px 4px / 13px 2px no-repeat,
    linear-gradient(180deg, rgba(31, 159, 107, 0.72), rgba(31, 159, 107, 0.72)) 4px 10px / 8px 2px no-repeat,
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 5px 12px rgba(36, 73, 118, 0.08);
}

.control-row {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid rgba(154, 177, 202, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.control-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(143, 164, 187, 0.45);
  border-radius: 8px;
  color: #17395f;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
  box-shadow: 0 4px 10px rgba(36, 73, 118, 0.08);
}

.control-button:hover,
.control-button:focus-visible {
  border-color: rgba(35, 116, 225, 0.48);
  outline: 3px solid rgba(35, 116, 225, 0.16);
}

.control-button span {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.control-button--start span::before {
  content: "";
  position: absolute;
  inset: 1px 1px 1px 3px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: var(--green);
}

#pauseButton span::before,
#pauseButton span::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 4px;
  border-radius: 2px;
  background: var(--blue);
}

#pauseButton span::before {
  left: 2px;
}

#pauseButton span::after {
  right: 2px;
}

#pauseButton.is-paused span::before {
  left: 3px;
  width: 10px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: var(--blue);
}

#pauseButton.is-paused span::after {
  display: none;
}

.control-button--reset span::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  border-left-color: transparent;
}

.progress-control {
  display: grid;
  gap: 6px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #526b86;
  font-size: 0.76rem;
  font-weight: 850;
}

.progress-label strong {
  color: #17395f;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(35, 116, 225, 0.13);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  box-shadow: 0 0 18px rgba(35, 116, 225, 0.35);
  transition: width 160ms linear;
}

html.embed-mode,
body.embed-mode,
.embed-mode {
  min-height: 1px;
  height: auto;
  overflow: hidden;
  background: transparent;
}

.embed-mode .page-shell {
  min-height: auto;
  padding: 2px;
}

.embed-mode .explainer-widget {
  width: 100%;
  max-width: none;
  min-height: 0;
  border-radius: 18px;
  box-shadow: none;
}

@keyframes signalflow {
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes backflow {
  to {
    stroke-dashoffset: 32;
  }
}

@keyframes stageSweep {
  0%, 28% {
    opacity: 0;
    transform: translateX(-74%);
  }

  42%, 64% {
    opacity: 0.56;
  }

  100% {
    opacity: 0;
    transform: translateX(74%);
  }
}

@keyframes networkSettle {
  0% {
    transform: scale(1.035);
    filter: saturate(1.12);
  }

  100% {
    transform: scale(1);
    filter: saturate(1);
  }
}

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

@media (max-width: 1060px) {
  .explainer-widget {
    aspect-ratio: auto;
    min-height: 0;
  }

  .visual-grid {
    grid-template-columns: 1fr;
  }

  .legend-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  #networkSvg {
    height: auto;
    min-height: 459px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    display: block;
    padding: 0;
  }

  .explainer-widget {
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 12px;
  }

  .widget-header,
  .network-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .training-status {
    min-width: 0;
  }

  .process-strip {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 7px;
  }

  .process-strip b {
    width: 2px;
    height: 14px;
    justify-self: center;
    background: linear-gradient(180deg, rgba(35, 116, 225, 0.48), rgba(35, 116, 225, 0.16));
  }

  .process-strip b::after {
    right: -4px;
    top: auto;
    bottom: -1px;
    transform: rotate(135deg);
  }

  .legend-card {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .legend-heading {
    min-width: 0;
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }

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

  .button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .control-button {
    justify-content: center;
  }

  #networkSvg {
    height: 510px;
    min-height: 510px;
  }

  .flow-label--backward {
    right: 16px;
    bottom: 142px;
  }

  .flow-label--adjust {
    left: 50%;
    bottom: 13px;
  }

  .chat-context {
    width: min(168px, 43vw);
    gap: 2px;
    padding: 7px 8px;
  }

  .chat-context span {
    font-size: 0.55rem;
  }

  .chat-context strong {
    font-size: 0.64rem;
  }

  .chat-context i {
    font-size: 0.56rem;
  }

  .chat-context--prompt {
    left: 9px;
    bottom: 44px;
  }

  .chat-context--reply {
    right: auto;
    left: min(148px, 38vw);
    top: 80px;
  }

  .flow-label--forward {
    top: 39px;
    left: 16px;
  }

  .phase-rail {
    top: 6px;
    left: 50%;
    max-width: calc(100% - 18px);
    gap: 3px;
    padding: 4px;
  }

  .phase-step {
    min-width: 0;
    padding: 4px 6px;
    font-size: 0.58rem;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 2rem;
  }

  .training-status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-tooltip {
    right: auto;
    left: 50%;
    width: max-content;
    min-width: min(168px, calc(100vw - 24px));
    max-width: min(250px, calc(100vw - 24px));
    transform: translate(-50%, -4px) scale(0.98);
    transform-origin: top center;
  }

  .status-tooltip::before {
    right: auto;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }

  .info-wrap:hover .status-tooltip,
  .info-wrap:focus-within .status-tooltip {
    transform: translate(-50%, 0) scale(1);
  }

  .training-status > .status-card:first-child .status-tooltip {
    left: 0;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top left;
  }

  .training-status > .status-card:first-child .status-tooltip::before {
    left: 8px;
    transform: rotate(45deg);
  }

  .training-status > .status-card:first-child .info-wrap:hover .status-tooltip,
  .training-status > .status-card:first-child .info-wrap:focus-within .status-tooltip {
    transform: translateY(0) scale(1);
  }

  .training-status > .status-card:last-child .status-tooltip {
    right: 0;
    left: auto;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
  }

  .training-status > .status-card:last-child .status-tooltip::before {
    right: 8px;
    left: auto;
    transform: rotate(45deg);
  }

  .training-status > .status-card:last-child .info-wrap:hover .status-tooltip,
  .training-status > .status-card:last-child .info-wrap:focus-within .status-tooltip {
    transform: translateY(0) scale(1);
  }

  .button-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .layer-labels {
    font-size: 0.62rem;
  }

  .flow-label {
    font-size: 0.62rem;
  }
}
