/* Quantum-Like Lab by Ethan Dickey. */
/* Keep explanations close to the experiment without obscuring the network. */
body[data-level="normal"] [data-advanced] {
  display: none !important;
}
.experience-mode {
  display: flex;
  gap: 8px;
  align-items: center;
}
.experience-mode > span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.topbar {
  flex-wrap: wrap;
  min-height: 86px;
  height: auto;
  gap: 14px;
  padding-top: 15px;
  padding-bottom: 15px;
}
.top-actions {
  margin-left: auto;
}
.mode-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 15px;
  max-width: 950px;
}
.tutorial-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 22px;
  padding: 23px 26px;
  margin-bottom: 20px;
  border: 1px solid #467b79;
  border-radius: 14px;
  background: linear-gradient(125deg, #123536, #112431 65%);
}
.tutorial-card[hidden],
.error-notice[hidden] {
  display: none;
}
.tutorial-card h2 {
  font-size: 20px;
  margin: 0 0 9px;
  color: #effffb;
}
.tutorial-card p {
  max-width: 780px;
  margin: 0 0 9px;
  line-height: 1.55;
}
.tutorial-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 66px;
  padding-top: 6px;
}
.tutorial-progress i {
  height: 5px;
  width: 12px;
  background: #456368;
  border-radius: 3px;
}
.tutorial-progress i.active {
  background: var(--teal);
}
.tutorial-progress span {
  font-size: 12px;
  color: var(--muted);
  width: 100%;
  margin-top: 7px;
}
.tutorial-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.tutorial-actions button {
  white-space: normal;
  max-width: 185px;
}
.error-notice {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  background: #34222d;
  border: 1px solid #e199aa;
  color: #ffdee6;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}
.error-notice p {
  margin: 8px 0 0;
}
.error-notice button {
  align-self: start;
}
.error-notice .small-note {
  color: #e2c2cc;
}
.metric-explainer {
  color: #b9ccda;
  font-size: 12px;
  line-height: 1.55;
  margin: 17px 0 10px;
}
.text-link {
  padding: 0;
  border: 0;
  color: var(--teal);
  background: transparent;
  text-decoration: underline;
  font-size: inherit;
}
.metric-large > span:last-child {
  max-width: 130px;
}
.metric-pair button {
  line-height: 1.4;
}
.history-context {
  color: #b9ccda;
  line-height: 1.5;
  margin: 12px 0;
  font-size: 13px;
}
.branch-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 17px;
}
.branch-picker select {
  min-width: 190px;
  max-width: 75%;
}
.story-section h3 {
  color: var(--teal);
  margin-top: 22px;
}
.story-section p {
  line-height: 1.7;
}
.view-error {
  padding: 28px;
  line-height: 1.6;
}
.normal-mode-card p {
  line-height: 1.6;
}
.normal-mode-card .button-row {
  margin: 16px 0;
}
.normal-mode-card .small-note {
  font-size: 12px;
}
.inline-math {
  white-space: nowrap;
}
sub {
  font-size: 0.72em;
  vertical-align: sub;
  line-height: 0;
}
@media (max-width: 1000px) {
  .tutorial-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }
  .tutorial-progress {
    grid-column: 1/-1;
    width: auto;
    align-items: center;
    padding: 0;
  }
  .tutorial-progress span {
    width: auto;
    margin: 0 0 0 6px;
  }
  .top-actions {
    margin-left: 0;
  }
}
@media (max-width: 650px) {
  .tutorial-card {
    display: block;
    padding: 18px;
  }
  .tutorial-progress {
    display: flex;
    margin-bottom: 14px;
  }
  .tutorial-actions {
    flex-direction: row;
    align-items: center;
    margin-top: 15px;
  }
  .tutorial-actions button {
    max-width: none;
  }
  .experience-mode {
    flex: 1;
  }
  .experience-mode > span {
    display: none;
  }
  .top-actions {
    gap: 6px;
    flex-wrap: wrap;
  }
  .metric-explainer {
    font-size: 13px;
  }
  .mode-note {
    margin-top: 4px;
  }
  .branch-picker {
    flex-wrap: wrap;
  }
  .branch-picker select {
    max-width: 100%;
  }
}
.dialog-error {
  background: #34222d;
  color: #ffdee6;
  border-color: #e199aa;
  margin-bottom: 20px;
}
.graph-column > .primary-actions {
  margin: 10px 0 15px;
}
.reset-control {
  border: 1px solid #629f97;
  color: #d9fff5;
  background: #183d3b;
  white-space: nowrap;
  padding: 10px 17px;
  font-weight: 650;
}
.reset-control span {
  font-size: 19px;
  margin-right: 5px;
}
.reset-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 10px 0;
}
.reset-choices button {
  text-align: left;
  padding: 19px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 116px;
  white-space: normal;
}
.reset-choices strong {
  font-size: 16px;
  color: #d8fff5;
}
.reset-choices span {
  color: #c0d1dc;
  line-height: 1.55;
}
.edit-display-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.edit-display-controls button {
  font-size: 12px;
  color: #ffdaaa;
  border-color: #70583b;
}
.edit-display-controls span {
  font-size: 11px;
  color: #b8c8d4;
}
.edit-display-controls:has(button:disabled) {
  display: none;
}
@media (max-width: 600px) {
  .reset-choices {
    grid-template-columns: 1fr;
  }
  .reset-choices button {
    min-height: 90px;
  }
}
#alternative-view:has(.ql-matrix-view) {
  height: auto;
  min-height: 390px;
  max-height: none;
}
#alternative-view > .ql-matrix-view {
  height: auto;
  overflow: visible;
  padding-top: 12px;
}
.matrix-normal-intro,
.matrix-description {
  padding: 0 16px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #c3d5de;
}
.matrix-normal-intro h2 {
  font-size: 18px;
  color: #edf5f8;
  margin: 0 0 8px;
}
.matrix-normal-intro p {
  margin: 0 0 8px;
}
.matrix-description:empty {
  display: none;
}

/* A direct route back to Ethan Dickey’s main website in every experience mode. */
.top-actions .main-site-link { display:inline-flex; align-items:center; min-height:42px; padding:8px 10px; font-size:.9rem; line-height:1.4; white-space:nowrap; border-radius:6px; }
