:root {
  --bg: #f4f1eb;
  --ink: #171717;
  --muted: #706b63;
  --line: #d7cfc3;
  --panel: #fffaf2;
  --panel-2: #e9e1d6;
  --accent: #0f766e;
  --alert: #b13b2f;
  --violet: #4f46e5;
  --shadow: 0 18px 48px rgba(30, 28, 24, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100svh;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  animation: enter 500ms ease both;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4rem, 56px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  line-height: 1.2;
}

.run-status {
  min-width: 116px;
  text-align: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 250, 242, 0.72);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 17px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: enter 620ms ease both;
}

.field {
  display: grid;
  gap: 8px;
}

.field-help,
.section-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-help {
  margin: -6px 0 14px;
}

label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

select,
input[type="number"] {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  padding: 0 10px;
  border-radius: 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

output {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.button-row {
  display: flex;
  gap: 10px;
}

.primary-button,
.icon-button,
.small-button {
  height: 42px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-button {
  flex: 1;
}

.icon-button {
  width: 44px;
  font-size: 20px;
  line-height: 1;
}

.small-button {
  height: 32px;
  min-width: 58px;
  padding: 0 10px;
  background: #fffdf8;
  color: var(--ink);
  border-color: var(--line);
}

.primary-button:hover,
.icon-button:hover,
.small-button:hover {
  transform: translateY(-1px);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.selected-task {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.selected-task span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.selected-task strong {
  font-size: 14px;
  line-height: 1.45;
}

.main-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: enter 680ms ease both;
}

.metric {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.metric strong {
  display: block;
  font-size: clamp(22px, 2.3rem, 38px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.comparison-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.rank-section,
.chart-section,
.timeline-section,
.inspection-section,
.task-section {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.inspection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.zoom-stage {
  display: grid;
  gap: 10px;
}

.zoom-window {
  position: relative;
  min-height: 126px;
  border: 1px solid var(--line);
  background:
    linear-gradient(to right, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    #fffdf8;
  background-size: 40px 100%;
  overflow: hidden;
}

.zoom-block {
  position: absolute;
  top: 34px;
  height: 44px;
  min-width: 4px;
  background: var(--accent);
  border: 1px solid rgba(23, 23, 23, 0.18);
  color: white;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.zoom-block:nth-child(3n) {
  background: var(--violet);
}

.zoom-block:nth-child(4n) {
  background: var(--alert);
}

.zoom-playhead {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 2px;
  background: var(--ink);
  z-index: 5;
}

.zoom-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.candidate-grid {
  display: grid;
  gap: 8px;
}

.candidate-row {
  display: grid;
  grid-template-columns: 54px repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 9px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.candidate-row.is-chosen {
  border-color: var(--accent);
  background: #ecfdf5;
}

.candidate-row span {
  color: var(--muted);
  font-size: 11px;
}

.candidate-row strong {
  display: block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.decision-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.decision-card {
  padding: 12px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.decision-card strong {
  display: block;
  margin-bottom: 6px;
}

.decision-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.scheduler-table {
  display: grid;
  gap: 10px;
}

.scheduler-row {
  display: grid;
  grid-template-columns: 108px repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  transition: transform 180ms ease;
}

.scheduler-row:hover {
  transform: translateX(2px);
}

.scheduler-name {
  font-weight: 700;
}

.cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cell strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: #fffdf8;
}

.segment {
  min-width: 58px;
  height: 30px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segment:last-child {
  border-right: 0;
}

.segment.is-active {
  background: var(--ink);
  color: #fff;
}

.bar-chart {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.bar-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 74px;
  gap: 12px;
  align-items: center;
}

.bar-label,
.bar-value {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 30px;
  background: var(--panel-2);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 380ms cubic-bezier(.2, .8, .2, 1);
}

.bar-fill.warn {
  background: var(--alert);
}

.bar-fill.cool {
  background: var(--violet);
}

.timeline {
  display: grid;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.playback-panel {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) 78px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 11px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.playback-buttons {
  display: flex;
  gap: 8px;
}

.time-readout {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.live-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  background: var(--line);
  border: 1px solid var(--line);
}

.live-cell {
  min-height: 58px;
  padding: 10px;
  background: #fffdf8;
}

.live-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-cell strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.lane {
  min-width: 720px;
}

.lane-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.lane-track {
  position: relative;
  height: 34px;
  background:
    linear-gradient(to right, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    var(--panel-2);
  background-size: 48px 100%;
  overflow: hidden;
}

.playhead {
  position: absolute;
  inset: 0 auto 0 var(--playhead-left, 0%);
  z-index: 5;
  width: 2px;
  background: var(--ink);
  box-shadow: 0 0 0 9999px rgba(255, 250, 242, 0.46);
  pointer-events: none;
}

.segment-block {
  position: absolute;
  top: 4px;
  height: 26px;
  min-width: 2px;
  background: var(--accent);
  cursor: crosshair;
  transition: filter 140ms ease, transform 140ms ease;
}

.segment-block.is-past {
  opacity: 0.42;
}

.segment-block.is-active {
  outline: 2px solid var(--ink);
  z-index: 4;
  transform: scaleY(1.2);
}

.segment-block.is-future {
  opacity: 0.2;
}

.segment-block:nth-child(3n) {
  background: var(--violet);
}

.segment-block:nth-child(4n) {
  background: var(--alert);
}

.segment-block:hover {
  filter: brightness(1.12);
  transform: scaleY(1.15);
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.task-tile {
  min-height: 68px;
  padding: 10px;
  background: #fffdf8;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.task-tile:hover,
.task-tile.is-selected {
  background: #ecfdf5;
  transform: translateY(-1px);
}

.task-tile strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.task-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.explainer-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.explainer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.explainer-main,
.explainer-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.explainer-main {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.explainer-main h2 {
  font-size: 22px;
}

.explainer-main p,
.body-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.formula-box {
  padding: 18px;
  background: var(--ink);
  color: white;
  font-size: clamp(18px, 1.8rem, 28px);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.pipeline-diagram {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 34px minmax(130px, 1fr) 34px minmax(130px, 1fr) 34px minmax(130px, 1fr) 34px minmax(130px, 1fr);
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}

.pipe-node {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 13px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.pipe-node span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.pipe-node strong,
.pipe-node em {
  display: block;
}

.pipe-node em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.pipe-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.model-facts {
  margin-bottom: 18px;
}

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

.fact-grid div {
  min-height: 86px;
  padding: 14px;
  background: #fffdf8;
}

.fact-grid span,
.fact-grid strong {
  display: block;
}

.fact-grid span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fact-grid strong {
  font-size: 15px;
  line-height: 1.35;
}

.feature-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.feature-table div {
  min-height: 78px;
  padding: 12px;
  background: #fffdf8;
}

.feature-table strong,
.feature-table span {
  display: block;
}

.feature-table strong {
  margin-bottom: 7px;
}

.feature-table span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.plain-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.explainer-steps {
  margin-top: 18px;
}

.manual-shell {
  max-width: 1480px;
  margin: 0 auto;
}

.manual-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.manual-controls {
  position: sticky;
  top: 22px;
}

.queue-panel,
.manual-output {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.legend-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.legend-box strong {
  margin-bottom: 2px;
}

.legend-box span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.legend-box b {
  color: var(--accent);
}

.manual-table {
  display: grid;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.manual-head,
.manual-row {
  display: grid;
  grid-template-columns: 80px repeat(4, minmax(78px, 1fr)) 54px;
  gap: 14px;
  align-items: center;
  min-width: 720px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.manual-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--panel-2);
}

.manual-row:last-child {
  border-bottom: 0;
}

.manual-row strong {
  color: var(--accent);
  font-size: 17px;
}

.manual-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 0;
  border-bottom: 2px solid #b8def5;
  background: transparent;
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.delete-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: #fee2e2;
  color: var(--alert);
  cursor: pointer;
  font-weight: 800;
}

.manual-gantt {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fffdf8;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.gantt-track {
  position: relative;
  min-width: 720px;
  height: 68px;
  background: var(--panel-2);
  border-radius: 10px;
  overflow: hidden;
}

.gantt-block {
  position: absolute;
  inset: 0 auto 0 0;
  display: grid;
  place-items: center;
  min-width: 28px;
  color: #15304a;
  font-weight: 800;
  border-right: 1px solid rgba(23, 23, 23, 0.12);
}

.gantt-ticks {
  position: relative;
  min-width: 720px;
  height: 22px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.gantt-ticks span {
  position: absolute;
  transform: translateX(-50%);
}

.metrics-table {
  display: grid;
  border: 1px solid var(--line);
  background: #fffdf8;
  overflow-x: auto;
}

.metrics-head,
.metrics-row {
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(56px, 1fr));
  min-width: 720px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.metrics-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--panel-2);
}

.metrics-row:last-child {
  border-bottom: 0;
}

.metrics-row strong,
.metrics-row span {
  font-variant-numeric: tabular-nums;
}

.metrics-row.is-missed {
  background: #fff1f0;
}

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

.prediction-row {
  display: grid;
  grid-template-columns: 52px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.prediction-row strong {
  color: var(--accent);
}

.prediction-row span {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

body.manual-page {
  --manual-blue: #0d8fd3;
  --manual-blue-2: #2fb2f3;
  --manual-deep: #0f4770;
  --manual-line: #afe2ff;
  --manual-panel: rgba(255, 255, 255, 0.76);
  --manual-bg: #e9f8ff;
  background:
    radial-gradient(circle at 72% 12%, rgba(194, 237, 255, 0.78), transparent 32%),
    linear-gradient(135deg, #f2fbff 0%, #e4f6ff 44%, #dff5ff 100%);
  color: #123047;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-x: hidden;
}

.manual-page .app-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 18px 32px;
  overflow-x: hidden;
}

.manual-page .manual-shell {
  max-width: none;
}

.manual-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  margin: 0 -18px 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--manual-line);
  background: rgba(244, 251, 255, 0.88);
}

.manual-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--manual-blue);
  color: white;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 9px 18px rgba(13, 143, 211, 0.22);
}

.manual-brand h1 {
  color: var(--manual-deep);
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.manual-brand p {
  margin-top: 6px;
  color: var(--manual-blue-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.manual-page .top-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.manual-page .text-link {
  color: var(--manual-deep);
  border-bottom-color: var(--manual-line);
  font-weight: 800;
  white-space: nowrap;
}

.reset-pill {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #fff0ef;
  color: #ef4444;
  text-transform: uppercase;
  font-weight: 900;
  cursor: pointer;
}

.manual-page .manual-grid {
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 16px;
}

.manual-page .control-panel,
.manual-page .queue-panel,
.manual-page .manual-output,
.manual-page .rank-section,
.manual-page .chart-section {
  background: var(--manual-panel);
  border: 2px solid var(--manual-line);
  border-radius: 22px;
  box-shadow: 0 3px 0 rgba(13, 143, 211, 0.04), 0 18px 44px rgba(13, 71, 112, 0.08);
  min-width: 0;
}

.manual-page .control-panel {
  padding: 18px;
  gap: 14px;
}

.manual-page label,
.manual-page h2,
.manual-page .manual-head,
.manual-page .metrics-head {
  color: var(--manual-blue-2);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.manual-page select,
.manual-page input[type="number"] {
  height: 40px;
  border: 2px solid var(--manual-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--manual-deep);
  font-size: 17px;
  font-weight: 900;
}

.manual-page input[type="range"] {
  accent-color: var(--manual-blue);
}

.manual-page output {
  color: var(--manual-blue);
  font-size: 17px;
  font-weight: 900;
}

.manual-page .primary-button {
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--manual-blue);
  color: white;
  box-shadow: 0 10px 18px rgba(13, 143, 211, 0.24);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.manual-page .legend-box {
  border: 2px solid var(--manual-line);
  border-radius: 14px;
  background: rgba(233, 248, 255, 0.72);
  color: var(--manual-blue);
}

.manual-page .legend-box span {
  color: #1b9be4;
  font-size: 13px;
  font-weight: 700;
}

.manual-page .field-help,
.manual-page .section-help {
  color: #4d8db6;
  font-size: 13px;
  font-weight: 700;
}

.manual-page .section-help {
  max-width: 860px;
  margin: 0 0 14px;
  padding: 0;
  overflow-wrap: anywhere;
}

.manual-page .queue-panel {
  padding: 0;
  overflow: hidden;
}

.manual-page .queue-panel .section-heading {
  min-height: 58px;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #cfeeff;
}

.queue-count {
  padding: 7px 14px;
  border: 2px solid var(--manual-line);
  border-radius: 12px;
  background: #dff3ff;
  color: var(--manual-blue);
  font-size: 18px;
  font-weight: 900;
}

.manual-page .manual-table {
  border: 0;
  background: transparent;
}

.manual-page .manual-head,
.manual-page .manual-row {
  grid-template-columns: 68px repeat(4, minmax(74px, 1fr)) 44px;
  min-width: 0;
  padding: 9px 14px;
  border-bottom: 1px solid #d3efff;
}

.manual-page .manual-head {
  background: rgba(232, 247, 255, 0.68);
}

.manual-page .manual-row {
  min-height: 54px;
}

.manual-page .manual-row strong {
  color: var(--manual-blue);
  font-size: 18px;
}

.manual-page .manual-row input {
  height: 30px;
  border-bottom: 3px solid var(--manual-line);
  color: var(--manual-deep);
  font-size: 17px;
}

.manual-page .delete-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 17px;
}

.add-process-wrap {
  display: grid;
  place-items: center;
  min-height: 56px;
  background: rgba(232, 247, 255, 0.38);
}

.add-process-button {
  min-width: 168px;
  height: 40px;
  border: 3px dashed var(--manual-line);
  border-radius: 16px;
  background: transparent;
  color: var(--manual-blue-2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.manual-page .manual-output {
  width: 100%;
  margin-left: 0;
  padding: 0;
}

.manual-page .manual-output .section-heading {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #cfeeff;
  min-width: 0;
}

.manual-page #manualBadge {
  max-width: min(220px, 42vw);
  padding: 8px 12px;
  border: 2px solid var(--manual-line);
  border-radius: 12px;
  background: #e7f6ff;
  color: var(--manual-blue);
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.panel-body {
  padding: 14px 18px 18px;
}

.manual-page .manual-gantt {
  padding: 0;
  border: 0;
  background: transparent;
}

.manual-page .gantt-track {
  min-width: 0;
  height: 64px;
  border-radius: 16px;
  background: #e7f6ff;
}

.manual-page .gantt-block {
  color: #123047;
  font-size: 14px;
  border-right: 0;
}

.manual-page .gantt-ticks {
  min-width: 0;
  color: #123047;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  padding: 0 2px;
}

.manual-page .gantt-ticks span:first-child {
  transform: translateX(0);
}

.manual-page .gantt-ticks span:last-child {
  transform: translateX(-100%);
}

.manual-page .comparison-layout {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  margin: 16px 0 0;
}

.manual-page .chart-section {
  margin-top: 14px;
}

.manual-page .rank-section,
.manual-page .chart-section {
  padding: 0;
  overflow: hidden;
}

.manual-page .rank-section .section-heading,
.manual-page .chart-section .section-heading {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 2px solid var(--manual-deep);
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.manual-page #manualAverages {
  color: #8da0b7;
  font-size: 15px;
  font-weight: 900;
  max-width: 100%;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-align: right;
}

.manual-page #manualAverages b {
  color: var(--manual-blue);
}

.manual-page .metrics-table {
  border: 0;
  background: transparent;
}

.manual-page .metrics-head,
.manual-page .metrics-row {
  grid-template-columns: 70px repeat(7, minmax(42px, 1fr));
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 2px solid var(--manual-deep);
  text-align: center;
}

.manual-page .metrics-row {
  min-height: 48px;
  color: #8da0b7;
  font-size: 17px;
  font-weight: 900;
}

.manual-page .metrics-row strong {
  justify-self: center;
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #b7d4f8;
  color: #162c73;
  font-size: 14px;
}

.manual-page .metrics-row span:nth-child(n + 5) {
  color: var(--manual-blue);
}

.manual-page .prediction-list {
  padding: 0;
}

.manual-page .model-summary {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 2px solid var(--manual-line);
  border-radius: 12px;
  background: rgba(231, 246, 255, 0.82);
}

.manual-page .model-summary.is-loading,
.manual-page .prediction-row.is-loading {
  position: relative;
  overflow: hidden;
}

.manual-page .model-summary.is-loading::after,
.manual-page .prediction-row.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: loading-sweep 900ms linear infinite;
  pointer-events: none;
}

.manual-page .model-summary strong {
  color: var(--manual-deep);
}

.manual-page .model-summary span {
  color: #557087;
  font-size: 13px;
  font-weight: 800;
}

.manual-page .prediction-row {
  grid-template-columns: 60px repeat(3, minmax(0, 1fr));
  border-color: var(--manual-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  min-width: 0;
}

.manual-page .prediction-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.manual-page .primary-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.manual-page .contribution-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--manual-line);
}

.manual-page .contribution-list em {
  color: #557087;
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

body.lab-page {
  --manual-blue: #0d8fd3;
  --manual-blue-2: #2fb2f3;
  --manual-deep: #0f4770;
  --manual-line: #afe2ff;
  --manual-panel: rgba(255, 255, 255, 0.76);
  --manual-bg: #e9f8ff;
  background:
    radial-gradient(circle at 72% 12%, rgba(194, 237, 255, 0.78), transparent 32%),
    linear-gradient(135deg, #f2fbff 0%, #e4f6ff 44%, #dff5ff 100%);
  color: #123047;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-x: hidden;
}

.lab-page .app-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 18px 32px;
  overflow-x: hidden;
}

.lab-page .explainer-shell {
  max-width: 1280px;
}

.lab-page .topbar {
  align-items: center;
  min-height: 80px;
  margin: 0 -18px 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--manual-line);
  background: rgba(244, 251, 255, 0.88);
}

.lab-page .top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.lab-page .text-link {
  color: var(--manual-deep);
  border-bottom-color: var(--manual-line);
  font-weight: 800;
  white-space: nowrap;
}

.lab-page h1 {
  color: var(--manual-deep);
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.05;
  font-weight: 900;
}

.lab-page h2,
.lab-page label {
  color: var(--manual-blue-2);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.lab-page .workspace {
  grid-template-columns: minmax(250px, 292px) minmax(0, 1fr);
}

.lab-page .control-panel,
.lab-page .metric-strip,
.lab-page .rank-section,
.lab-page .chart-section,
.lab-page .timeline-section,
.lab-page .inspection-section,
.lab-page .task-section,
.lab-page .explainer-main {
  background: var(--manual-panel);
  border: 2px solid var(--manual-line);
  border-radius: 22px;
  box-shadow: 0 3px 0 rgba(13, 143, 211, 0.04), 0 18px 44px rgba(13, 71, 112, 0.08);
  min-width: 0;
}

.lab-page .control-panel {
  gap: 14px;
  padding: 18px;
}

.lab-page select,
.lab-page input[type="number"] {
  border: 2px solid var(--manual-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--manual-deep);
  font-weight: 900;
}

.lab-page input[type="range"] {
  accent-color: var(--manual-blue);
}

.lab-page output,
.lab-page .run-status {
  color: var(--manual-blue);
  font-weight: 900;
}

.lab-page .run-status {
  border: 2px solid var(--manual-line);
  border-radius: 12px;
  background: #e7f6ff;
}

.lab-page .primary-button,
.lab-page .segment.is-active {
  border-color: var(--manual-blue);
  background: var(--manual-blue);
  color: white;
}

.lab-page .icon-button,
.lab-page .small-button {
  border-color: var(--manual-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--manual-deep);
  font-weight: 900;
}

.lab-page .section-heading {
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
}

.lab-page .section-heading span,
.lab-page .field-help,
.lab-page .section-help,
.lab-page .body-copy,
.lab-page .explainer-main p,
.lab-page .decision-card p,
.lab-page .feature-table span,
.lab-page .fact-grid span,
.lab-page .pipe-node em,
.lab-page .plain-list {
  color: #4d8db6;
}

.lab-page .section-heading span,
.lab-page .selected-task strong,
.lab-page .decision-card p,
.lab-page .body-copy,
.lab-page .explainer-main p,
.lab-page .feature-table span,
.lab-page .fact-grid strong,
.lab-page .pipe-node em,
.lab-page code {
  overflow-wrap: anywhere;
}

.lab-page .metric {
  border-right-color: var(--manual-line);
}

.lab-page .metric span,
.lab-page .cell span,
.lab-page .live-cell span,
.lab-page .fact-grid span {
  color: #6f91aa;
}

.lab-page .metric strong,
.lab-page .cell strong,
.lab-page .scheduler-name,
.lab-page .live-cell strong,
.lab-page .task-tile strong,
.lab-page .decision-card strong,
.lab-page .feature-table strong,
.lab-page .fact-grid strong,
.lab-page .pipe-node strong {
  color: var(--manual-deep);
}

.lab-page .scheduler-row,
.lab-page .selected-task {
  border-color: var(--manual-line);
}

.lab-page .playback-panel,
.lab-page .decision-card,
.lab-page .candidate-row,
.lab-page .live-cell,
.lab-page .task-tile,
.lab-page .pipe-node,
.lab-page .fact-grid div,
.lab-page .feature-table div {
  border-color: var(--manual-line);
  background: rgba(255, 255, 255, 0.72);
}

.lab-page .segmented,
.lab-page .bar-track,
.lab-page .live-strip,
.lab-page .task-grid,
.lab-page .fact-grid,
.lab-page .feature-table {
  border-color: var(--manual-line);
  background: var(--manual-line);
}

.lab-page .bar-fill,
.lab-page .pipe-node span {
  background: var(--manual-blue);
}

.lab-page .bar-fill.cool {
  background: #7cc7ff;
}

.lab-page .bar-fill.warn {
  background: #ff8a8a;
}

.lab-page .lane-label,
.lab-page .time-readout,
.lab-page .bar-label,
.lab-page .bar-value,
.lab-page .candidate-row span,
.lab-page .zoom-scale {
  color: #557087;
}

.lab-page .lane,
.lab-page .gantt-track,
.lab-page .gantt-ticks {
  min-width: min(720px, 100%);
}

.lab-page .lane-track,
.lab-page .zoom-window {
  background:
    linear-gradient(to right, rgba(13, 143, 211, 0.14) 1px, transparent 1px),
    #e7f6ff;
}

.lab-page .formula-box {
  border-radius: 14px;
  background: var(--manual-deep);
  font-size: clamp(16px, 2vw, 24px);
  overflow-wrap: anywhere;
}

.lab-page .explainer-grid,
.lab-page .comparison-layout,
.lab-page .inspection-layout {
  align-items: start;
}

.lab-page .pipeline-diagram {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.lab-page .pipe-arrow {
  display: none;
}

.lab-page code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #e7f6ff;
  color: var(--manual-deep);
  font-family: inherit;
  font-size: 0.94em;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loading-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 980px) {
  .workspace,
  .comparison-layout,
  .inspection-layout,
  .explainer-grid,
  .manual-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-diagram {
    grid-template-columns: 1fr;
  }

  .lab-page .workspace,
  .lab-page .explainer-grid,
  .lab-page .comparison-layout,
  .lab-page .inspection-layout,
  .lab-page .pipeline-diagram {
    grid-template-columns: 1fr;
  }

  .pipe-arrow {
    min-height: 24px;
  }

  .manual-controls {
    position: static;
  }

  .control-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button-row,
  .selected-task {
    grid-column: 1 / -1;
  }

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

  .manual-topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .lab-page .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .manual-page .manual-grid {
    grid-template-columns: 1fr;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

@media (max-width: 620px) {
  .app-shell {
    padding: 14px;
  }

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

  .manual-brand {
    align-items: flex-start;
  }

  .manual-brand h1 {
    white-space: normal;
  }

  .manual-brand p {
    letter-spacing: 0.1em;
  }

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

  .metric-strip,
  .task-grid,
  .live-strip,
  .feature-table,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .playback-panel {
    grid-template-columns: 1fr;
  }

  .time-readout {
    text-align: left;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
