.console-body {
  min-height: 100vh;
  background: #f4f7fc;
  color: #263d5d;
  font-size: 16px;
  line-height: 1.55;
  --console-blue: #315f96;
  --console-ink: #233e65;
  --console-muted: #73839b;
  --console-line: #e3eaf3;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--console-muted);
  font-size: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.console-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 20px 32px 0;
  background: linear-gradient(#f4f7fc 76%, #f4f7fc00);
}
.topbar-inner {
  max-width: 1280px;
  min-height: 76px;
  margin: auto;
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 32px;
  border: 1px solid #ffffff52;
  border-radius: 18px;
  background: linear-gradient(110deg, #295c96, #476e9b 70%, #73899f);
  box-shadow:
    0 6px 16px #3154770b,
    inset 0 1px #ffffff25;
}
.console-topbar .brand {
  font-size: 30px;
  color: #fff;
  flex: none;
  letter-spacing: -1.7px;
  width: 132px;
}
.console-topbar .brand svg {
  width: 27px;
  height: 31px;
  fill: var(--gold);
  filter: none;
}
.console-topbar .brand-period {
  color: var(--gold);
}
.console-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
}
.console-nav > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 19px;
  color: #eff5ff;
  background: transparent;
  font-size: 15px;
  font-weight: 550;
  white-space: nowrap;
  border-radius: 9px;
  transition:
    background 0.16s,
    color 0.16s;
}
.console-nav > button svg {
  display: none;
}
.console-nav > button:hover {
  background: #ffffff12;
}
.console-nav > button.active {
  background: #ffffff20;
  color: #fff;
  box-shadow: inset 0 1px #ffffff17;
}
.nav-count {
  padding: 1px 6px;
  border-radius: 5px;
  background: #ffffff17;
  font-size: 11px;
  color: #e7effc;
  min-width: 24px;
}
.nav-settings {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #f4f7ff;
  background: #ffffff14;
  border: 1px solid #ffffff26;
  border-radius: 11px;
  flex: none;
  transition: background 0.16s;
}
.nav-settings:hover {
  background: #ffffff28;
}
.nav-settings svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.nav-settings circle {
  fill: #486e99;
}
.console-shell {
  margin: 0;
}
.console-body #workspace {
  width: min(1180px, calc(100% - 96px));
  margin: 0 auto;
  padding: 30px 0 0;
  outline: none;
}
.workspace-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 7px 0 35px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
  color: #6c7787;
}
.breadcrumb strong {
  font-weight: 450;
  color: #6c7e98;
}
.breadcrumb > span {
  color: #88909d;
}
.workspace-status {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}
.synthetic-badge {
  color: #69809e;
  background: #eaf0f8;
  border: 1px solid #e1e8f3;
  border-radius: 5px;
  padding: 4px 8px;
}
.local-badge {
  color: #667183;
  display: flex;
  align-items: center;
  gap: 6px;
}
.local-badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6fa38f;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}
.workspace-heading .eyebrow {
  font-size: 11px;
  font-weight: 550;
  color: #6a7788;
  letter-spacing: 0.13em;
}
.workspace-heading h1 {
  font-size: 38px;
  line-height: 1.2;
  font-weight: 450;
  letter-spacing: -1.2px;
  color: var(--console-ink);
  margin-top: 10px;
}
.workspace-heading p {
  color: #7d8da5;
  font-size: 14px;
  margin-top: 13px;
  line-height: 1.8;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.console-body .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 9px;
  white-space: nowrap;
  transition:
    background 0.16s,
    border-color 0.16s,
    box-shadow 0.16s;
}
.button svg {
  height: 16px;
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.button.primary {
  background: #315f96;
  border: 1px solid #315f96;
  color: #fff;
  box-shadow: 0 3px 0 #254d7c16;
}
.button.primary:hover {
  background: #264f83;
  border-color: #264f83;
}
.button.secondary {
  background: #fff;
  border: 1px solid #dde6f1;
  color: #6580a2;
}
.button.secondary:hover {
  border-color: #aabbce;
  background: #f8fbff;
}
.console-body .button.small {
  font-size: 12px;
  min-height: 36px;
  padding: 8px 12px;
}
.button.danger {
  color: #a76167;
  background: #fbf0f0;
  border: 1px solid #ecd4d6;
}
.button:disabled {
  opacity: 0.45;
  cursor: default;
}
.planning-settings {
  border-top: 1px solid #e1e8f2;
  border-bottom: 1px solid #e1e8f2;
  margin-bottom: 30px;
}
.planning-settings > summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px 0;
  cursor: pointer;
  list-style: none;
}
.planning-settings summary::-webkit-details-marker,
.algorithm-comparison summary::-webkit-details-marker {
  display: none;
}
.plan-label {
  font-size: 14px;
  font-weight: 500;
  color: #526e94;
}
#plan-summary {
  font-size: 12px;
  color: #707b8c;
}
.disclosure-mark {
  margin-left: auto;
  color: #6b7b91;
  font-size: 20px;
  font-weight: 350;
  line-height: 1;
  transition: transform 0.16s;
}
details[open] > summary .disclosure-mark {
  transform: rotate(45deg);
}
.control-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 4px 0 23px;
}
.control-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.control-field label {
  font-size: 12px;
  color: #667284;
}
.control-divider {
  height: 20px;
  width: 1px;
  background: #dce5f0;
}
.dataset-meta {
  margin-left: auto;
  font-size: 12px;
  color: #6b7789;
}
.console-body select {
  max-width: 100%;
  appearance: none;
  background-color: #fff;
  border: 1px solid #e0e7f1;
  border-radius: 7px;
  padding: 9px 31px 9px 12px;
  font-size: 13px;
  color: #617d9f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2378859c' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.algorithm-field select {
  max-width: 290px;
}
.notice {
  border: 1px solid #ecdfb7;
  background: #fffaf0;
  color: #99814f;
  border-radius: 9px;
  padding: 14px 18px;
  margin-bottom: 26px;
  font-size: 13px;
  line-height: 1.8;
}
.notice button {
  background: none;
  color: inherit;
  text-decoration: underline;
}
.glass {
  background: linear-gradient(130deg, #ffffffef, #fdfefeeb);
  border: 1px solid #fff;
  border-radius: 16px;
  box-shadow:
    0 1px 0 #d8e2ef,
    0 5px 20px #2a477704;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 26px 0;
  background: #fff;
  border: 1px solid #e6edf6;
  border-radius: 14px;
  margin-bottom: 32px;
}
.metric-grid .metric {
  background: none;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  padding: 0 28px;
  min-width: 0;
}
.metric + .metric {
  border-left: 1px solid #edf1f7;
}
.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #657183;
  gap: 10px;
}
.metric-icon {
  color: #818e9f;
  font-size: 14px;
}
.metric > strong {
  display: block;
  font-size: 34px;
  font-weight: 450;
  letter-spacing: -1px;
  line-height: 1.25;
  color: #365780;
  margin-top: 13px;
  font-variant-numeric: tabular-nums;
}
.metric:nth-child(2) > strong {
  color: #50857b;
}
.metric-caption {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: #75808e;
}
.metric-caption.positive {
  color: #74978b;
}
.panel-heading {
  padding: 29px 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.panel-heading h2 {
  font-size: 19px;
  font-weight: 500;
  color: #405e86;
  letter-spacing: -0.45px;
  line-height: 1.4;
}
.panel-heading p {
  font-size: 13px;
  line-height: 1.8;
  color: #6b7788;
  margin-top: 7px;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 13px;
}
.console-body .pill {
  display: inline-flex;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 5px;
  white-space: nowrap;
  background: #edf2fa;
  color: #5f718b;
}
.title-row .pill {
  background: #edf5f0;
  color: #83a392;
}
.panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.panel-actions select {
  font-size: 12px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #5e7087;
  border: 1px solid #e0e8f2;
  background: #fff;
  border-radius: 7px;
}
.icon-button:hover {
  background: #f1f6fd;
}
.icon-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.schedule-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 19px;
  padding: 0 30px 20px;
  font-size: 11px;
  color: #707c8d;
}
.schedule-legend > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.schedule-legend i {
  display: block;
  height: 7px;
  width: 7px;
  border-radius: 2px;
}
.legend-blue {
  background: #7f9edc;
}
.legend-purple {
  background: #8a82bb;
}
.legend-gold {
  background: #c4a45d;
}
.port-focus {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 12px;
  color: #6c7b8e;
}
.port-focus select {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 12px;
  min-height: 32px;
}
.timeline-scroll {
  overflow-x: auto;
  margin: 0 20px 12px;
}
.timeline-svg {
  width: 100%;
  height: auto;
  min-width: 850px;
  display: block;
}
.timeline-svg text {
  font-family: Inter, Arial, sans-serif;
  font-size: 11px;
  fill: #91a4bd;
}
.timeline-svg .port-label {
  fill: #6e86a6;
  font-size: 12px;
  font-weight: 500;
}
.timeline-svg .session-label {
  fill: #fff;
  font-size: 10px;
  font-weight: 450;
  pointer-events: none;
}
.hub-panel {
  margin-bottom: 32px;
}
.hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 28px;
  padding: 0 30px 28px;
  align-items: start;
}
.hub-svg {
  width: 100%;
  height: auto;
  display: block;
}
.hub-svg text {
  font-family: Inter, Arial, sans-serif;
}
.hub-svg .hub-region {
  fill: #b3c1d4;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.hub-svg .hub-river {
  fill: #9dbbe0;
  font-size: 10px;
  font-style: italic;
}
.hub-svg .hub {
  cursor: pointer;
}
.hub-svg .hub:focus {
  outline: none;
}
.hub-svg .hub-halo {
  fill: #315f96;
  fill-opacity: 0.1;
  transition: fill-opacity 0.15s;
}
.hub-svg .hub-core {
  fill: #fff;
  stroke: #315f96;
  stroke-width: 3;
}
.hub-svg .hub-tag {
  fill: #fff;
  stroke: #e3eaf3;
}
.hub-svg .hub-name {
  fill: #233e65;
  font-size: 11px;
  font-weight: 500;
}
.hub-svg .hub-meta {
  fill: #73839b;
  font-size: 10px;
}
.hub-svg .hub:hover .hub-halo,
.hub-svg .hub:focus .hub-halo {
  fill-opacity: 0.22;
}
.hub-svg .hub:focus .hub-tag {
  stroke: #315f96;
}
.hub-svg .hub.selected .hub-halo {
  fill: #e2b84c;
  fill-opacity: 0.28;
}
.hub-svg .hub.selected .hub-core {
  fill: #f2cd63;
  stroke: #b8923f;
}
.hub-svg .hub.selected .hub-tag {
  stroke: #e2c47d;
}
.hub-detail {
  padding-top: 6px;
}
.hub-detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}
.hub-detail h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  color: var(--console-ink);
  letter-spacing: -0.02em;
}
.hub-live {
  background: #e7f4ec;
  color: #3e8160;
}
.hub-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 0 0 20px;
}
.hub-stats dt {
  font-size: 12px;
  color: var(--console-muted);
}
.hub-stats dd {
  margin: 2px 0 0;
  font-size: 18px;
  color: var(--console-ink);
}
.hub-stats dd.positive {
  color: #3e8160;
}
.hub-bars {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 22px;
  font-size: 11px;
  color: var(--console-muted);
}
.hub-bars i {
  height: 8px;
  border-radius: 8px;
  background: #557bc9;
}
.hub-bars i.fcfs {
  background: #c9ab62;
}
.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hub-warning {
  margin: 0 0 12px;
  font-size: 13px;
  color: #8a6420;
}
.hub-note {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--console-muted);
}
@media (max-width: 1100px) {
  .hub-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .hub-layout {
    padding: 0 18px 22px;
  }
}
.timeline-svg .bay-label {
  fill: #7d8ea8;
  font-size: 10px;
  pointer-events: none;
}
.timeline-svg .slot {
  cursor: pointer;
}
.timeline-svg .slot:hover .bay,
.timeline-svg .slot:focus .bay {
  stroke: #315f96;
  stroke-width: 1.5;
}
.timeline-svg .slot:hover .car-body,
.timeline-svg .slot:focus .car-body {
  stroke: #315f96;
  stroke-width: 1.5;
}
.timeline-svg .slot:focus {
  outline: none;
}
.schedule-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 30px;
  border-top: 1px solid #edf2f7;
  font-size: 11px;
  color: #758294;
}
.schedule-footer > span:first-child:before {
  content: "✓";
  margin-right: 7px;
  color: #638171;
}
.algorithm-comparison {
  margin-top: 30px;
}
.algorithm-comparison > summary {
  padding: 23px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}
.algorithm-comparison summary strong {
  font-size: 15px;
  font-weight: 500;
  color: #5a7599;
}
.algorithm-comparison summary small {
  margin-top: 5px;
  font-size: 12px;
  color: #717e8f;
}
.comparison-chart {
  display: grid;
  gap: 21px;
  padding: 12px 30px 30px;
}
.comparison-row {
  display: grid;
  grid-template-columns: 185px 1fr 100px;
  align-items: center;
  gap: 25px;
  font-size: 13px;
  color: #627288;
}
.comparison-bar-track {
  height: 9px;
  overflow: hidden;
  background: #eef3fb;
  border-radius: 3px;
}
.comparison-bar {
  height: 100%;
  background: #c8d5ec;
  border-radius: 3px;
}
.comparison-row:first-child .comparison-bar {
  background: #6c91c7;
}
.comparison-value {
  font-size: 14px;
  text-align: right;
  font-weight: 500;
  color: #6180a9;
}
.comparison-share {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #778497;
  margin-top: 3px;
}
.table-toolbar,
.history-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 30px 24px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e8f3;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  min-width: 220px;
}
.search-box svg {
  height: 16px;
  width: 16px;
  fill: none;
  stroke: #9bacc3;
  stroke-width: 1.5;
}
.search-box input {
  width: 200px;
  max-width: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 13px;
  color: #657f9f;
}
.search-box input::placeholder {
  color: #7d8896;
}
.table-toolbar > .muted {
  margin-left: auto;
  font-size: 12px;
}
.table-scroll {
  overflow-x: auto;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
.data-table th {
  padding: 14px 22px;
  background: #f8fafd;
  border-top: 1px solid #edf1f7;
  border-bottom: 1px solid #e9eff7;
  font-size: 12px;
  font-weight: 450;
  color: #727e91;
  white-space: nowrap;
}
.data-table td {
  padding: 20px 22px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  color: #5c6f84;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.data-table td:first-child,
.data-table th:first-child {
  padding-left: 30px;
}
.data-table td:first-child {
  font-weight: 500;
  color: #55759e;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #f9fbff;
}
.data-table td small {
  font-size: 11px;
  color: #7c8795;
  margin-top: 4px;
}
.data-table td strong {
  font-size: 14px;
  font-weight: 450;
  white-space: nowrap;
}
.status-accepted {
  background: #edf5ef !important;
  color: #80a08b !important;
}
.status-rejected {
  background: #faf1ef !important;
  color: #886e69 !important;
}
.status-unplanned {
  background: #f0f3f8 !important;
  color: #707e92 !important;
}
.edit-button {
  padding: 5px 8px;
  background: none;
  color: #647792;
  font-size: 12px;
}
.edit-button:hover {
  color: #315f96;
  background: #eff4fb;
}
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 30px;
  border-top: 1px solid #edf1f7;
  font-size: 12px;
  color: #778394;
}
.table-pagination > div {
  display: flex;
  gap: 10px;
}
.import-guide {
  font-size: 12px;
  color: #6b788b;
  margin: 23px 5px 0;
}
.import-guide summary {
  cursor: pointer;
  color: #5e7089;
}
.import-guide p {
  max-width: 700px;
  margin-top: 12px;
  line-height: 1.9;
}
.footnote {
  font-size: 12px;
  line-height: 1.9;
  color: #758294;
  margin-top: 20px;
}
.lab-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin: 4px 0 28px;
  padding-bottom: 27px;
  border-bottom: 1px solid #e2eaf5;
}
.lab-intro p {
  font-size: 14px;
  color: #68778b;
  max-width: 630px;
  line-height: 1.8;
}
.lab-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.lab-tabs button {
  padding: 11px 20px;
  min-height: 44px;
  font-size: 14px;
  color: #69778d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background 0.16s;
}
.lab-tabs button:hover {
  background: #eaf0f9;
}
.lab-tabs button.active {
  background: #fff;
  border-color: #e2eaf5;
  box-shadow: 0 2px 4px #315f9605;
  color: #5379aa;
}
.trace-content,
.lab-result {
  padding: 0 30px 30px;
  overflow-x: auto;
}
.trace-formula {
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  background: #f2f6fd;
  color: #5f748f;
  border: 1px solid #e9eff8;
  border-radius: 9px;
  font-size: 13px;
  padding: 17px 19px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.trace-explorer {
  margin: 0 0 25px;
}
.trace-range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #6a7a91;
  font-size: 13px;
}
.trace-range-label output {
  color: #5e80aa;
}
.trace-explorer input[type="range"] {
  width: 100%;
  accent-color: #688ebf;
  margin: 18px 0 23px;
  cursor: pointer;
}
.trace-focus {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  padding: 25px;
  background: #f5f8fd;
  border: 1px solid #e6eef8;
  border-radius: 12px;
}
.trace-focus h3 {
  font-size: 18px;
  font-weight: 450;
  color: #5f7fa9;
}
.trace-focus p {
  font-size: 12px;
  color: #718195;
  margin-top: 7px;
  line-height: 1.8;
}
.trace-focus dt {
  font-size: 12px;
  color: #718094;
}
.trace-focus dd {
  font-size: 23px;
  font-weight: 400;
  margin: 7px 0 0;
  color: #556f8d;
}
.trace-focus dl {
  margin: 0;
}
.trace-table-details {
  border-top: 1px solid #e8eef6;
  padding-top: 18px;
}
.trace-table-details > summary {
  font-size: 13px;
  color: #6c7d94;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.trace-table-scroll {
  max-height: 440px;
  overflow: auto;
  margin-top: 22px;
}
.trace-table-scroll .data-table th {
  position: sticky;
  top: 0;
  background: #f8fafd;
  z-index: 1;
}
.trace-decision {
  padding: 4px 7px;
  border-radius: 5px;
  background: #eef5f0;
  color: #89a592;
  font-size: 11px;
}
.trace-decision.skip {
  background: #f1f4f9;
  color: #788495;
}
.trace-export {
  margin-top: 22px;
}
.flow-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 27px;
  flex-wrap: wrap;
}
.flow-summary > span {
  font-size: 13px;
  color: #6b7a90;
  padding: 13px 18px;
  border-radius: 9px;
  background: #f3f7fc;
}
.flow-summary strong {
  color: #566f8f;
  font-size: 23px;
  font-weight: 400;
  margin-right: 9px;
}
.flow-step {
  border-top: 1px solid #e9eff7;
  padding: 17px 0;
}
.flow-step:last-of-type {
  border-bottom: 1px solid #e9eff7;
}
.flow-step > summary {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  list-style: none;
}
.flow-step-number {
  display: grid;
  place-items: center;
  height: 34px;
  width: 34px;
  background: #edf3fc;
  border: 1px solid #e3ecf9;
  border-radius: 8px;
  color: #6d809b;
  font-size: 12px;
  flex: none;
}
.flow-step strong {
  font-weight: 450;
  font-size: 14px;
  color: #536987;
}
.flow-value {
  font-size: 15px;
  color: #7ba595;
  margin-left: auto;
  white-space: nowrap;
}
.flow-step p {
  font-size: 13px;
  line-height: 1.9;
  color: #748398;
  padding: 18px 0 0 49px;
  max-width: 900px;
  overflow-wrap: anywhere;
}
.empty-state {
  padding: 65px 25px;
  text-align: center;
  max-width: 660px;
  margin: auto;
}
.empty-icon {
  display: block;
  font-size: 35px;
  color: #b3c3dc;
  line-height: 1;
  margin-bottom: 23px;
}
.empty-state h3 {
  font-size: 18px;
  font-weight: 450;
  color: #64768e;
  line-height: 1.6;
}
.empty-state p {
  font-size: 14px;
  color: #7d8898;
  line-height: 1.9;
  max-width: 480px;
  margin: 12px auto 0;
}
.verification-success {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 30px;
  border: 1px solid #e3eee8;
  background: #f2f8f4;
  border-radius: 12px;
}
.verification-success > span {
  display: grid;
  place-items: center;
  flex: none;
  height: 58px;
  width: 58px;
  border-radius: 50%;
  background: #e3f0e8;
  color: #638370;
  font-size: 25px;
  box-shadow:
    inset 0 1px #fff,
    0 4px 0 #d9e9de;
}
.verification-success h3 {
  color: #759b84;
  font-size: 25px;
  font-weight: 450;
  letter-spacing: -0.5px;
}
.verification-success p {
  font-size: 13px;
  color: #74877a;
  margin-top: 8px;
}
.verify-checks {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #77877b;
  margin-top: 25px;
}
.lab-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 330px;
}
.lab-chart text {
  font-family: Inter, Arial, sans-serif;
  fill: #91a6c2;
  font-size: 11px;
}
.lab-chart-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: #6b7e95;
}
.lab-chart-legend > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-chart-legend i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.lab-result .data-table {
  margin-top: 30px;
}
.model-notes {
  margin-top: 28px;
  font-size: 14px;
  color: #6b7b93;
}
.model-notes summary {
  padding: 20px 27px;
  font-size: 13px;
  cursor: pointer;
  color: #5e728d;
}
.model-notes > div {
  padding: 0 27px 27px;
  line-height: 1.95;
  max-width: 1000px;
}
.model-notes p + p {
  margin-top: 20px;
}
.history-toolbar {
  border-bottom: 1px solid #edf1f7;
  margin-bottom: 4px;
}
.history-toolbar .button {
  margin-left: auto;
}
.history-list {
  padding: 0 30px;
}
.run-card {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 27px 0;
  border-bottom: 1px solid #edf2f8;
}
.run-card:last-child {
  border-bottom: 0;
}
.run-card input {
  accent-color: #6489b8;
  width: 17px;
  height: 17px;
  cursor: pointer;
}
.run-card h3 {
  font-size: 15px;
  font-weight: 450;
  color: #526783;
}
.run-card p {
  font-size: 12px;
  color: #778699;
  margin-top: 8px;
  line-height: 1.8;
}
.run-card time {
  font-size: 12px;
  color: #728197;
}
.run-card-profit {
  min-width: 130px;
  text-align: right;
}
.run-card-profit strong {
  font-size: 22px;
  font-weight: 400;
  color: #57708e;
  letter-spacing: -0.5px;
  display: block;
}
.run-card-profit small {
  font-size: 12px;
  color: #7a8798;
  margin-top: 5px;
}
.history-open {
  background: #f1f5fc;
  border: 1px solid #e4edf9;
  color: #637892;
  padding: 9px 15px;
  border-radius: 7px;
  font-size: 13px;
}
.history-open:hover {
  background: #e7f0fd;
  color: #557ba9;
}
#compare-count {
  font-size: 11px;
  color: #78889c;
}
.history-empty {
  padding: 50px;
  text-align: center;
  color: #707f94;
}
.comparison-note {
  font-size: 13px;
  line-height: 1.8;
  color: #708196;
  margin: 20px 0 25px;
}
.run-comparison-table th,
.run-comparison-table td {
  padding: 16px 10px;
  font-size: 13px;
}
.run-comparison-table th {
  white-space: normal;
  font-weight: 450;
}
.run-comparison-table td:first-child,
.run-comparison-table th:first-child {
  padding-left: 10px;
}
.run-comparison-table td strong {
  font-size: 15px;
}
.run-comparison-table .button {
  font-size: 12px;
}
.run-comparison-table {
  table-layout: fixed;
}
#history-compare-dialog {
  max-width: 720px;
}
.console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 45px;
  border-top: 1px solid #e2eaf4;
  padding: 22px 0 28px;
  font-size: 11px;
  color: #7e8a9b;
}
.console-footer i {
  font-style: normal;
  margin: 0 9px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(660px, calc(100% - 36px));
  z-index: 150;
  padding: 14px 22px;
  font-size: 13px;
  border-radius: 10px;
  background: #315f96;
  color: #fff;
  box-shadow: 0 8px 25px #264f831c;
}
.toast.error {
  background: #9c6068;
}
.console-body dialog {
  max-width: 480px;
  width: calc(100% - 36px);
  padding: 0;
  background: #fbfdff;
  color: #586a83;
  border: 1px solid #fff;
  border-radius: 18px;
  box-shadow: 0 25px 90px #17335c2b;
}
.console-body dialog::backdrop {
  background: #20395c55;
}
.console-body dialog form,
.session-details {
  padding: 32px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.dialog-heading .eyebrow {
  font-size: 11px;
  color: #778699;
}
.close-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  background: #eff4fb;
  color: #7e8b9d;
  border: 1px solid #e4ecf7;
  font-size: 22px;
  line-height: 1;
}
.close-button:hover {
  background: #e3edfa;
}
.console-body dialog h2 {
  font-size: 27px;
  line-height: 1.35;
  font-weight: 450;
  letter-spacing: -0.7px;
  color: #55769e;
}
.console-body dialog p {
  font-size: 14px;
  color: #748398;
  line-height: 1.85;
  margin: 16px 0 24px;
}
.console-body dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 21px;
  color: #6e7f95;
  font-size: 13px;
}
.console-body dialog input {
  width: 100%;
  border: 1px solid #dde7f5;
  background: #fff;
  color: #546c89;
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
}
.console-body dialog input[type="hidden"] {
  display: none;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-error {
  font-size: 12px;
  color: #8f6266;
  line-height: 1.8;
  margin-top: 15px;
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #e5edf8;
  margin-top: 28px;
  padding-top: 22px;
}
.dialog-actions .danger {
  margin-right: auto;
  font-size: 12px;
}
.request-preview {
  font-size: 13px;
  color: #6b7f98;
  background: #f0f6ff;
  border-radius: 8px;
  padding: 14px;
  margin-top: 23px;
}
.session-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 28px;
}
.session-grid dt {
  font-size: 12px;
  color: #78879b;
}
.session-grid dd {
  font-size: 17px;
  color: #617894;
  margin: 8px 0 0;
}
.session-details > .button {
  width: 100%;
  margin-top: 27px;
}
.noscript {
  position: fixed;
  inset: auto 20px 20px;
  background: #fff4d4;
  padding: 20px;
  color: #7c6940;
  z-index: 200;
}
@media (min-width: 1600px) {
  .console-body #workspace {
    padding-top: 36px;
  }
  .workspace-heading {
    margin-bottom: 36px;
  }
  .workspace-heading h1 {
    font-size: 42px;
  }
  .metric-grid {
    padding-block: 30px;
  }
  .metric-grid .metric {
    padding-inline: 34px;
  }
  .metric > strong {
    font-size: 38px;
  }
  .panel-heading {
    padding-top: 33px;
    padding-bottom: 28px;
  }
}
@media (max-width: 1100px) {
  .console-topbar {
    padding: 16px 22px 0;
  }
  .topbar-inner {
    gap: 20px;
    padding: 12px 20px;
  }
  .console-topbar .brand {
    width: 100px;
    font-size: 28px;
  }
  .console-nav {
    gap: 5px;
  }
  .console-nav > button {
    font-size: 14px;
    padding-inline: 14px;
  }
  .console-body #workspace {
    width: calc(100% - 64px);
  }
  .workspace-heading h1 {
    font-size: 32px;
  }
  .heading-actions {
    gap: 10px;
  }
  .console-body .heading-actions .button {
    font-size: 13px;
    padding-inline: 13px;
  }
  .metric-grid .metric {
    padding-inline: 21px;
  }
  .metric > strong {
    font-size: 30px;
  }
  .control-strip {
    gap: 18px;
  }
  .dataset-meta {
    width: 100%;
    margin: 0;
  }
  .comparison-row {
    grid-template-columns: 160px 1fr 95px;
    gap: 20px;
  }
  .console-body .control-field select {
    max-width: 270px;
  }
  .run-card {
    gap: 20px;
  }
}
@media (max-width: 800px) {
  .console-topbar {
    padding: 12px 16px 0;
  }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 16px 16px 10px;
    border-radius: 14px;
  }
  .console-topbar .brand {
    width: auto;
    margin-right: auto;
    font-size: 28px;
  }
  .nav-settings {
    height: 35px;
    width: 35px;
    border-radius: 9px;
  }
  .console-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #ffffff17;
    gap: 5px;
  }
  .console-nav > button {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 7px;
  }
  .nav-count {
    font-size: 10px;
    padding-inline: 4px;
    min-width: 20px;
  }
  .console-body #workspace {
    width: calc(100% - 44px);
    padding-top: 23px;
  }
  .workspace-context {
    margin: 0 0 28px;
  }
  .local-badge {
    display: none;
  }
  .workspace-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 25px;
  }
  .workspace-heading h1 {
    font-size: 32px;
    line-height: 1.25;
  }
  .workspace-heading .eyebrow {
    font-size: 10px;
  }
  .workspace-heading p {
    font-size: 14px;
    margin-top: 10px;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .button {
    flex: 1;
  }
  .planning-settings {
    margin-bottom: 24px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    margin-bottom: 25px;
  }
  .metric-grid .metric {
    padding: 23px;
  }
  .metric + .metric {
    border: 0;
  }
  .metric:nth-child(even) {
    border-left: 1px solid #edf1f7;
  }
  .metric:nth-child(n + 3) {
    border-top: 1px solid #edf1f7;
  }
  .metric-label {
    font-size: 12px;
  }
  .metric > strong {
    font-size: 29px;
  }
  .metric-caption {
    font-size: 11px;
  }
  .panel-heading {
    padding: 24px;
    align-items: flex-start;
  }
  .panel-heading h2 {
    font-size: 18px;
  }
  .panel-heading p {
    font-size: 12px;
  }
  .title-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .schedule-panel .panel-heading {
    gap: 15px;
  }
  .panel-actions {
    gap: 8px;
  }
  .schedule-panel .panel-actions {
    justify-content: flex-end;
  }
  .panel-actions select {
    max-width: 165px;
    font-size: 11px;
  }
  .schedule-legend {
    padding: 0 24px 17px;
    gap: 12px;
    font-size: 10px;
  }
  .port-focus {
    font-size: 11px;
    gap: 7px;
  }
  .port-focus select {
    font-size: 11px;
  }
  .timeline-scroll {
    margin-inline: 14px;
  }
  .schedule-footer {
    padding: 17px 24px;
    font-size: 10px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .algorithm-comparison {
    margin-top: 25px;
  }
  .algorithm-comparison > summary {
    padding: 22px 24px;
  }
  .comparison-chart {
    padding: 5px 24px 26px;
    gap: 20px;
  }
  .comparison-row {
    grid-template-columns: 140px 1fr 90px;
    gap: 16px;
    font-size: 12px;
  }
  .comparison-value {
    font-size: 13px;
  }
  .comparison-share {
    font-size: 10px;
  }
  .requests-panel .panel-heading {
    flex-direction: column;
    gap: 20px;
  }
  .table-toolbar,
  .history-toolbar {
    padding: 0 24px 22px;
    gap: 10px;
  }
  .search-box {
    min-width: 0;
    flex: 1;
  }
  .search-box input {
    width: 100%;
  }
  .table-toolbar .muted {
    width: 100%;
    font-size: 11px;
  }
  .data-table td {
    padding: 18px 17px;
    font-size: 13px;
  }
  .data-table td strong {
    font-size: 13px;
  }
  .data-table th {
    padding: 13px 17px;
    font-size: 11px;
  }
  .data-table td:first-child,
  .data-table th:first-child {
    padding-left: 24px;
  }
  .table-pagination {
    padding: 19px 24px;
    font-size: 11px;
  }
  .lab-intro {
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
  }
  .lab-intro p {
    font-size: 13px;
  }
  .lab-intro .button {
    font-size: 12px;
    flex: none;
  }
  .lab-tabs {
    gap: 6px;
    margin-bottom: 24px;
  }
  .lab-tabs button {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 40px;
  }
  .lab-panel .panel-heading {
    flex-wrap: wrap;
  }
  .trace-content,
  .lab-result {
    padding: 0 24px 27px;
  }
  .trace-formula {
    font-size: 11px;
    padding: 15px;
  }
  .trace-focus {
    padding: 21px;
    gap: 15px;
  }
  .trace-focus h3 {
    font-size: 16px;
  }
  .trace-focus dd {
    font-size: 21px;
  }
  .trace-focus p {
    font-size: 11px;
  }
  .trace-focus dt {
    font-size: 11px;
  }
  .flow-summary {
    gap: 10px;
  }
  .flow-summary > span {
    font-size: 12px;
    padding: 11px 14px;
  }
  .flow-summary strong {
    font-size: 20px;
  }
  .verification-success {
    padding: 24px;
    gap: 18px;
  }
  .verification-success h3 {
    font-size: 22px;
  }
  .verification-success p {
    font-size: 12px;
  }
  .model-notes > div {
    font-size: 13px;
  }
  .model-notes summary {
    font-size: 12px;
  }
  .history-toolbar .button {
    margin: 0;
  }
  .history-list {
    padding-inline: 24px;
  }
  .run-card {
    grid-template-columns: 20px 1fr auto;
    gap: 16px;
    padding: 25px 0;
  }
  .run-card > .history-open {
    grid-column: 2;
    justify-self: start;
  }
  .run-card h3 {
    font-size: 14px;
  }
  .run-card-profit strong {
    font-size: 20px;
  }
  .run-card-profit {
    min-width: 105px;
  }
  .console-footer {
    margin-top: 35px;
    font-size: 10px;
    flex-wrap: wrap;
    gap: 9px;
  }
  .console-body dialog form,
  .session-details {
    padding: 28px;
  }
  .console-body dialog h2 {
    font-size: 25px;
  }
}
@media (max-width: 520px) {
  .console-nav > button {
    font-size: 12px;
    padding-inline: 8px;
    gap: 5px;
  }
  .console-nav {
    gap: 0;
  }
  .nav-count {
    font-size: 9px;
    min-width: 17px;
  }
  .console-body #workspace {
    width: calc(100% - 36px);
  }
  .workspace-heading h1 {
    font-size: 29px;
    letter-spacing: -0.8px;
  }
  .workspace-heading .eyebrow {
    font-size: 9px;
  }
  .workspace-heading p {
    font-size: 13px;
  }
  .workspace-status {
    font-size: 10px;
  }
  .synthetic-badge {
    padding: 3px 6px;
  }
  .breadcrumb {
    font-size: 11px;
    gap: 9px;
  }
  .workspace-context {
    gap: 10px;
  }
  .metric-grid .metric {
    padding: 19px 17px;
  }
  .metric > strong {
    font-size: 27px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-icon {
    display: none;
  }
  .metric-caption {
    font-size: 11px;
  }
  .plan-label {
    font-size: 13px;
  }
  #plan-summary {
    font-size: 11px;
  }
  .planning-settings > summary {
    gap: 12px;
  }
  .control-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 17px;
  }
  .control-field {
    justify-content: space-between;
    gap: 10px;
  }
  .control-field label {
    font-size: 11px;
  }
  .control-divider {
    display: none;
  }
  .control-field select {
    font-size: 12px;
    max-width: 225px !important;
  }
  .dataset-meta {
    font-size: 11px;
  }
  .schedule-panel .panel-heading {
    flex-direction: column;
    gap: 18px;
  }
  .schedule-panel .panel-actions {
    width: 100%;
    justify-content: space-between;
  }
  .schedule-panel .panel-actions select {
    max-width: none;
    flex: 1;
  }
  .panel-heading {
    padding: 23px 20px;
  }
  .panel-heading h2 {
    font-size: 17px;
  }
  .schedule-legend {
    padding-inline: 20px;
    font-size: 10px;
    gap: 11px;
  }
  .port-focus {
    width: 100%;
    justify-content: space-between;
    margin: 7px 0 0;
    border-top: 1px solid #edf2f7;
    padding-top: 12px;
  }
  .schedule-footer {
    padding: 17px 20px;
    font-size: 10px;
  }
  .algorithm-comparison > summary {
    padding: 21px 20px;
  }
  .algorithm-comparison summary strong {
    font-size: 14px;
  }
  .algorithm-comparison summary small {
    font-size: 11px;
    max-width: 230px;
  }
  .comparison-chart {
    padding-inline: 20px;
  }
  .comparison-row {
    grid-template-columns: 107px 1fr 75px;
    gap: 10px;
    font-size: 11px;
  }
  .comparison-value {
    font-size: 12px;
  }
  .comparison-share {
    font-size: 9px;
  }
  .table-toolbar,
  .history-toolbar {
    padding-inline: 20px;
  }
  .search-box {
    flex-basis: 100%;
  }
  .table-toolbar select {
    flex: 1;
    font-size: 12px;
    min-width: 0;
  }
  .data-table td:first-child,
  .data-table th:first-child {
    padding-left: 20px;
  }
  .table-pagination {
    padding: 18px 20px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .lab-intro {
    flex-direction: column;
    gap: 17px;
  }
  .lab-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .lab-tabs button {
    font-size: 12px;
  }
  .trace-content,
  .lab-result {
    padding-inline: 20px;
  }
  .trace-focus {
    grid-template-columns: 1fr 1fr;
    padding: 20px;
    gap: 22px;
  }
  .trace-focus > div:first-child {
    grid-column: 1/-1;
  }
  .trace-range-label {
    font-size: 12px;
  }
  .trace-focus h3 {
    font-size: 18px;
  }
  .trace-formula {
    font-size: 10px;
  }
  .flow-summary > span {
    font-size: 10px;
    padding: 10px;
  }
  .flow-summary strong {
    font-size: 18px;
    margin-right: 5px;
  }
  .flow-step strong {
    font-size: 12px;
  }
  .flow-value {
    font-size: 13px;
  }
  .flow-step p {
    font-size: 12px;
    padding-left: 0;
  }
  .verification-success {
    padding: 22px;
    gap: 15px;
  }
  .verification-success > span {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
  .verification-success h3 {
    font-size: 19px;
  }
  .verification-success p {
    font-size: 11px;
  }
  .verify-checks {
    gap: 15px;
    font-size: 11px;
  }
  .footnote {
    font-size: 11px;
  }
  .history-list {
    padding-inline: 20px;
  }
  .run-card {
    grid-template-columns: 20px 1fr;
    gap: 14px;
  }
  .run-card-profit {
    grid-column: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 13px;
  }
  .run-card-profit strong {
    font-size: 22px;
  }
  .run-card-profit small {
    font-size: 11px;
    margin: 0;
  }
  .run-card .history-open {
    grid-column: 2;
    justify-self: start;
  }
  .run-card p {
    font-size: 11px;
  }
  .run-card time {
    font-size: 11px;
  }
  .history-toolbar {
    gap: 10px;
  }
  .history-toolbar select {
    flex: 1;
    font-size: 12px;
    min-width: 0;
  }
  .history-toolbar .button {
    width: 100%;
    margin-top: 3px;
  }
  .console-body dialog form,
  .session-details {
    padding: 24px;
  }
  .console-body dialog h2 {
    font-size: 24px;
  }
  .console-body dialog p {
    font-size: 13px;
  }
  .console-body dialog label {
    font-size: 12px;
  }
  .console-body dialog input {
    font-size: 14px;
  }
  .form-grid {
    gap: 0 13px;
  }
  .dialog-actions .button {
    font-size: 12px;
    padding-inline: 12px;
  }
  .session-grid {
    gap: 23px 15px;
  }
  .session-grid dd {
    font-size: 15px;
  }
  .run-comparison-table th,
  .run-comparison-table td {
    font-size: 11px;
    padding: 15px 5px;
  }
  .run-comparison-table td strong {
    font-size: 13px;
  }
  .run-comparison-table .button {
    font-size: 10px;
    padding: 6px 9px;
  }
  .comparison-note {
    font-size: 12px;
  }
  .console-footer > span:last-child {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .console-body *,
  .console-body *:before,
  .console-body *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: more) {
  .console-body {
    --console-muted: #4c6484;
  }
  .metric-caption,
  .panel-heading p,
  .data-table td,
  .workspace-heading p,
  .console-footer,
  .dataset-meta,
  .schedule-legend {
    color: #546e91;
  }
  .glass {
    border-color: #becde1;
  }
}
.nav-guide {
  margin-right: -20px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}
.tour-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.tour-spotlight {
  position: fixed;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px #f2cd63,
    0 0 0 9999px #14264dad;
  pointer-events: none;
  transition:
    top 0.22s ease,
    left 0.22s ease,
    width 0.22s ease,
    height 0.22s ease;
}
.tour-card {
  position: fixed;
  background: #fff;
  color: #263d5d;
  border: 1px solid #e3eaf3;
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow: 0 18px 50px #0f234a33;
  transition:
    top 0.22s ease,
    left 0.22s ease;
}
.tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-skip {
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--console-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tour-skip:hover {
  color: var(--console-blue);
  text-decoration: underline;
}
.tour-card h2 {
  margin: 10px 0 6px;
  font-size: 21px;
  font-weight: 500;
  color: var(--console-ink);
  letter-spacing: -0.02em;
}
.tour-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #5b6d86;
}
.tour-dots {
  display: flex;
  gap: 5px;
  margin: 16px 0 14px;
}
.tour-dots i {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: #dbe3ee;
  transition: width 0.2s;
}
.tour-dots i.active {
  width: 18px;
  background: var(--console-blue);
}
.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 800px) {
  .nav-guide {
    margin-right: -12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spotlight,
  .tour-card,
  .tour-dots i {
    transition: none;
  }
}
/* Minimum-cost flow trace: the loop diagram and Dijkstra routes. */
.flow-loop {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 4px 0 46px;
}
.flow-stage {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 14px 14px 12px;
  border: 1px solid #e3eaf3;
  border-radius: 14px;
  background: #fbfcfe;
  transition:
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}
.flow-stage.active {
  border-color: #e2c47d;
  background: #fffaf0;
  box-shadow: 0 6px 18px #c9a85a26;
}
.flow-stage-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8eefa;
  color: #315f96;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.flow-stage.active .flow-stage-icon {
  background: #f2cd63;
  color: #4b3a12;
}
.flow-stage strong {
  font-size: 14px;
  font-weight: 550;
  color: var(--console-ink);
}
.flow-stage small {
  font-size: 12px;
  color: var(--console-muted);
}
.flow-stage em {
  font-style: normal;
  font-size: 11px;
  color: #315f96;
  margin-top: 4px;
}
.flow-arrow {
  flex: none;
  width: 26px;
  align-self: center;
  fill: none;
  stroke: #9fb3d6;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-repeat {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 100%;
  height: 34px;
  display: flex;
  justify-content: center;
}
.flow-repeat svg {
  position: absolute;
  inset: 0 0 8px;
  width: 100%;
  height: 26px;
  fill: none;
  stroke: #c9d5e8;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.flow-repeat span {
  position: relative;
  align-self: end;
  padding: 0 10px;
  background: #fff;
  font-size: 11px;
  color: var(--console-muted);
  transform: translateY(4px);
}
.route-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.route-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--console-ink);
}
.route-step .icon-button {
  font-size: 20px;
  line-height: 1;
}
.route-summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #f6f8fc;
  margin-bottom: 14px;
}
.route-gain {
  display: grid;
  padding-left: 14px;
  border-left: 4px solid var(--route);
}
.route-gain span {
  font-size: 12px;
  color: var(--console-muted);
}
.route-gain strong {
  font-size: 26px;
  font-weight: 450;
  color: var(--console-ink);
  letter-spacing: -0.02em;
}
.route-facts {
  display: flex;
  gap: 22px;
  margin: 0;
}
.route-facts dt {
  font-size: 11px;
  color: var(--console-muted);
}
.route-facts dd {
  margin: 0;
  font-size: 18px;
  color: var(--console-ink);
}
.route-summary p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #5b6d86;
}
.route-map {
  overflow-x: auto;
}
.route-svg {
  width: 100%;
  min-width: 850px;
  height: auto;
  display: block;
}
.route-svg text {
  font-family: Inter, Arial, sans-serif;
}
.route-tick {
  fill: #9aabc2;
  font-size: 11px;
}
.route-name {
  fill: var(--console-ink);
  font-size: 12px;
  font-weight: 550;
}
.route-value {
  fill: var(--console-muted);
  font-size: 11px;
}
.route-lane.future .route-name {
  fill: #a9b7ca;
}
.route-road {
  stroke: #edf1f7;
  stroke-width: 9;
  stroke-linecap: round;
}
.route-lane.current .route-road {
  stroke: #e6edf8;
}
.route-seg {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3;
}
.route-lane.past .route-seg {
  opacity: 0.45;
}
.seg-idle,
.seg-undo-idle {
  stroke: var(--route);
  stroke-width: 2.5;
}
.seg-take {
  stroke: #c9a85a;
}
.seg-undo,
.seg-swapped {
  stroke: #cf6b62;
  stroke-dasharray: 0.02 0.015;
}
.seg-undo-idle {
  stroke-dasharray: 0.01 0.012;
}
.route-lane.current .route-seg.seg-undo-idle.drawn {
  stroke-dasharray: 0.01 0.012;
}
.route-lane.current .route-seg {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition-property: stroke-dashoffset;
  transition-timing-function: linear;
}
.route-lane.current .route-seg.drawn {
  stroke-dashoffset: 0;
}
.route-lane.current .route-seg.seg-undo.drawn {
  stroke-dasharray: 0.02 0.015;
}
.route-arc-label {
  font-size: 9.5px;
  fill: #9a7a2c;
  pointer-events: none;
}
.route-arc-label.undo {
  fill: #b5534b;
}
.route-lane.past .route-arc-label {
  opacity: 0.5;
}
.route-seg:hover {
  stroke-width: 5;
}
.flow-dot-halo {
  fill: #f2cd63;
  opacity: 0.35;
}
.flow-dot-core {
  fill: #f2cd63;
  stroke: #fff;
  stroke-width: 2;
}
.route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 18px;
  font-size: 12px;
  color: var(--console-muted);
}
.route-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.route-legend i {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 3px solid #557bc9;
  border-radius: 3px;
}
.route-legend .legend-take {
  height: 9px;
  border: 3px solid #c9a85a;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.route-legend .legend-undo {
  height: 9px;
  border: 3px dashed #cf6b62;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
.route-legend .legend-dot {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f2cd63;
  box-shadow: 0 0 0 3px #f2cd6359;
}
.route-stack-bar {
  display: flex;
  gap: 3px;
  height: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f8;
}
.route-stack-bar span {
  background: var(--route);
  opacity: 0.18;
  transition: opacity 0.35s;
}
.route-stack-bar span.on {
  opacity: 1;
}
.route-stack-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--console-muted);
}
@media (max-width: 900px) {
  .flow-loop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .flow-arrow,
  .flow-repeat {
    display: none;
  }
  .route-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .route-lane.current .route-seg,
  .flow-stage {
    transition: none;
  }
}
/* Dynamic programming explorer. */
.dp-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.dp-controls input[type="range"] {
  width: 100%;
  accent-color: #315f96;
  cursor: pointer;
}
.dp-controls .trace-range-label {
  gap: 10px;
}
.dp-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}
.dp-window {
  padding: 14px 16px 12px;
  border: 1px solid #e6eef8;
  border-radius: 14px;
  background: #fff;
}
.dp-svg {
  width: 100%;
  height: auto;
  display: block;
}
.dp-svg text {
  font-family: Inter, Arial, sans-serif;
}
.dp-j {
  fill: #9aabc2;
  font-size: 10px;
}
.dp-row rect {
  transition: fill 0.2s;
}
.dp-row.fits rect {
  fill: #cfdcf3;
}
.dp-row.overlap rect {
  fill: #eef1f6;
  stroke: #dfe5ee;
  stroke-dasharray: 3 3;
}
.dp-row.current rect {
  fill: #f2cd63;
}
.dp-label {
  font-size: 10px;
  fill: #3d5577;
  pointer-events: none;
}
.dp-row.current .dp-label {
  fill: #4b3a12;
  font-weight: 600;
}
.dp-selected {
  fill: #5fa88a;
}
.dp-boundary {
  stroke: #c9a85a;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.dp-boundary-label {
  font-size: 10px;
  fill: #9a7a2c;
}
.dp-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--console-muted);
}
.dp-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dp-key i {
  width: 14px;
  height: 9px;
  border-radius: 3px;
  background: #cfdcf3;
}
.dp-key i.overlap {
  background: #eef1f6;
  outline: 1px dashed #cdd6e3;
}
.dp-key i.current {
  background: #f2cd63;
}
.dp-key i.selected {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fa88a;
}
.trace-focus.dp-choice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px;
}
.dp-choice h3 {
  margin: 0;
  color: var(--console-ink);
}
.dp-choice > p {
  margin: -6px 0 2px;
  line-height: 1.5;
}
.dp-option {
  padding: 12px 14px;
  border: 1px solid #e3eaf3;
  border-radius: 12px;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.dp-option.win {
  border-color: #9fc9b4;
  box-shadow: 0 4px 14px #5fa88a1f;
}
.dp-option-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: #5b6d86;
}
.dp-option.win .dp-option-head span::after {
  content: "  ✓ chosen";
  color: #3e8160;
  font-size: 11px;
}
.dp-option-head strong {
  font-size: 18px;
  font-weight: 450;
  color: var(--console-ink);
}
.dp-bar {
  display: flex;
  height: 9px;
  margin: 8px 0 6px;
  border-radius: 9px;
  background: #eef2f8;
  overflow: hidden;
}
.dp-bar i {
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}
.dp-own {
  background: #f2cd63;
}
.dp-prev {
  background: #557bc9;
}
.dp-option small {
  font-size: 11px;
  color: var(--console-muted);
}
.dp-curve {
  padding: 14px 16px 10px;
  border: 1px solid #e6eef8;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 18px;
}
.dp-curve-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--console-muted);
  margin-bottom: 6px;
}
.dp-curve-head strong {
  font-size: 16px;
  font-weight: 500;
  color: var(--console-ink);
}
.dp-curve-svg {
  width: 100%;
  height: 90px;
  display: block;
}
.dp-curve-all,
.dp-curve-done {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.dp-curve-all {
  stroke: #dde5f1;
  stroke-width: 2;
}
.dp-curve-done {
  stroke: #315f96;
  stroke-width: 2.5;
}
.dp-curve-now {
  stroke: #c9a85a;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.dp-curve-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9aabc2;
}
@media (max-width: 900px) {
  .dp-stage {
    grid-template-columns: 1fr;
  }
  .dp-controls {
    grid-template-columns: 1fr auto;
  }
  .dp-controls input[type="range"] {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dp-bar i,
  .dp-row rect,
  .dp-option {
    transition: none;
  }
}
/* GitHub Pages build: shown while Python starts in the browser. */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f4f7fcd9;
}
.boot-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 28px 30px;
  text-align: center;
  background: #fff;
  border: 1px solid #e3eaf3;
  border-radius: 16px;
  box-shadow: 0 18px 50px #0f234a1f;
}
.boot-card strong {
  font-size: 17px;
  font-weight: 550;
  color: var(--console-ink);
}
.boot-card small {
  font-size: 13px;
  line-height: 1.55;
  color: var(--console-muted);
}
.boot-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #e3eaf6;
  border-top-color: #315f96;
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin {
  to {
    transform: rotate(360deg);
  }
}
