:root {
  --ink: #182434;
  --muted: #5a687a;
  --green: #1f50cd;
  --green-dark: #183e9f;
  --mint: #edf2fc;
  --paper: #f4f6f9;
  --line: #dce1e9;
  --white: #fff;
  --warm: #f9f0de;
  --warning: #80520b;
  --red: #a32927;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --heading: var(--sans);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #b36a06;
  outline-offset: 3px;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: var(--heading);
  line-height: 1.25;
}
h1 {
  font-size: clamp(23px, 2.15vw, 33px);
  font-weight: 650;
  letter-spacing: -1px;
  margin: 5px 0 0;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #eef1eb;
  padding: 2px 5px;
  border-radius: 3px;
}
button {
  border: 0;
  background: none;
}
button svg {
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 15px;
  z-index: 100;
  padding: 10px;
  background: white;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.app-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 44px;
  background: #fbfcf8;
}
.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--heading);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.wordmark > span:last-child {
  font-weight: 400;
}
.brand-symbol {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  margin-right: 11px;
  font-family: Georgia, serif;
  font-size: 29px;
  line-height: 1;
}
.app-header nav {
  display: flex;
  height: 100%;
  gap: 27px;
}
.app-header nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 14px;
  color: #4b5c55;
  border-bottom: 3px solid transparent;
  padding-top: 3px;
}
.app-header nav a[aria-current] {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}
.app-header > .quiet-button {
  margin-left: auto;
}
.workspace-heading {
  padding: 29px 32px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.65px;
  font-weight: 700;
  margin: 0;
  color: var(--muted);
}
.scope-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
  text-align: right;
}
.scope-note button {
  font-size: 12px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: 224px minmax(330px, 0.92fr) minmax(450px, 1.34fr);
  gap: 0;
  margin: 0 24px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  min-height: 760px;
  box-shadow: 0 6px 24px #23352a05;
}
.learning-sidebar {
  background: #f0f2eb;
  border-right: 1px solid var(--line);
  padding: 22px 13px;
  display: flex;
  flex-direction: column;
}
.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px;
}
.small-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.sidebar-intro {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  padding: 0 6px;
  margin: 12px 0 20px;
}
.lesson-link {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 8px;
  align-items: start;
  text-align: left;
  padding: 12px 9px;
  border-radius: 6px;
  margin: 2px 0;
  font-size: 12px;
  line-height: 1.4;
  color: #4a5c52;
}
.lesson-link:hover {
  background: #e5eae0;
}
.lesson-link[aria-current="step"] {
  background: var(--green);
  color: white;
  box-shadow: 0 3px 6px #133b2712;
}
.lesson-number {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}
.lesson-link strong {
  font-weight: 600;
}
.lesson-link small {
  grid-column: 2;
  font-size: 10px;
  opacity: 0.8;
  margin-top: 5px;
}
.explore-button {
  border: 1px solid #cbd4c6;
  border-radius: 6px;
  text-align: left;
  padding: 13px 11px;
  margin: 24px 3px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 12px;
  font-weight: 600;
  background: #fafbf7;
}
.explore-button[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}
.explore-button small {
  grid-column: 1/-1;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  margin-top: auto;
  padding: 12px 7px 0;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.lesson-pane {
  border-right: 1px solid var(--line);
  padding: 25px 26px;
}
.lesson-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 17px;
}
.step-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 22px;
}
.step-progress span {
  height: 4px;
  background: #e6ebe2;
  flex: 1;
  border-radius: 5px;
}
.step-progress span.done {
  background: #4b8b6e;
}
.step-progress span.active {
  background: var(--green);
}
#lesson-title {
  font-size: 25px;
  line-height: 1.22;
  letter-spacing: -0.7px;
  margin-bottom: 16px;
}
.lesson-explanation {
  font-size: 13px;
  color: #4d5d56;
  line-height: 1.75;
}
.task-card {
  border-left: 3px solid var(--green);
  padding: 12px 14px;
  background: #f1f5ed;
  border-radius: 0 5px 5px 0;
  margin: 21px 0 25px;
  font-size: 13px;
}
.task-card strong {
  display: block;
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.task-card p {
  margin: 0;
}
.pane-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}
.pane-heading h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
}
.shortcut {
  font-size: 10px;
  color: var(--muted);
}
.editor-wrap {
  display: flex;
  border: 1px solid #ced8cd;
  border-radius: 6px;
  background: #f9fbf7;
  min-height: 112px;
  box-shadow: inset 0 1px 3px #00000003;
}
.command-prompt {
  padding: 14px 0 0 12px;
  font-family: var(--mono);
  color: var(--green);
  font-size: 14px;
}
#command-editor {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  min-height: 110px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px 12px;
  color: #174c3b;
  border-radius: 6px;
  tab-size: 2;
}
.editor-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 11px;
  flex-wrap: wrap;
}
.primary-button {
  border: 1px solid var(--green);
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.primary-button:hover:not(:disabled) {
  background: var(--green-dark);
}
.primary-button span {
  margin-right: 4px;
}
.quiet-button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.5;
}
.quiet-button:hover:not(:disabled) {
  background: #f0f4ed;
  border-color: #bccabb;
}
.text-button {
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--green);
  font-size: 12px;
}
.helper {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 11px 0 0;
}
.exercise-check {
  font-size: 12px;
  margin: 16px 0;
  color: #526359;
}
.exercise-check.success {
  color: var(--green);
  background: #eff6eb;
  padding: 10px 12px;
  border-radius: 5px;
}
.exercise-check.error {
  color: var(--red);
  background: #fff2ef;
  padding: 10px 12px;
  border-radius: 5px;
}
.interpretation {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 19px;
}
.interpretation h3 {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  margin-bottom: 13px;
}
.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 7px 0;
  cursor: pointer;
}
.answer-option input {
  accent-color: var(--green);
  margin: 3px 0 0;
}
.answer-option:has(input:checked) {
  background: #f0f6eb;
  border-color: #80a18b;
}
.answer-feedback {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 12px 0;
}
.answer-feedback.incorrect {
  color: var(--red);
}
.lesson-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 23px 0;
}
.notes-section {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  font-size: 12px;
  color: var(--muted);
}
.notes-section summary {
  cursor: pointer;
  color: var(--ink);
}
.notes-section label {
  display: block;
  margin: 12px 0 6px;
  font-size: 11px;
}
.notes-section textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  font-size: 12px;
  resize: vertical;
}
.dataset-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  font-size: 12px;
  margin: 5px 0 16px;
}
.observation-pane {
  padding: 25px 23px;
  background: #fff;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dataset-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.dataset-heading h2 {
  font-size: 17px;
  margin: 7px 0 0;
  letter-spacing: -0.35px;
}
.dataset-heading .quiet-button {
  white-space: nowrap;
  font-size: 11px;
}
.dataset-meta {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  margin: 15px 0 23px;
  align-items: center;
}
.synthetic-badge {
  color: #52644a;
  background: #eff3e8;
  padding: 3px 7px;
  border: 1px solid #e0e7d8;
  border-radius: 4px;
}
.view-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.view-tabs button {
  padding: 0 0 11px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.view-tabs button[aria-selected="true"] {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}
.view-tabs #result-count {
  font-size: 9px;
  background: #edf0e9;
  border-radius: 10px;
  padding: 1px 5px;
  margin-left: 3px;
}
.data-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
  max-height: 506px;
  background: #fff;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font: 11px/1.6 var(--mono);
  white-space: nowrap;
}
.data-table th {
  position: sticky;
  top: 0;
  background: #edf1e9;
  color: #4d6254;
  z-index: 1;
  text-align: right;
  font-weight: 500;
  border-bottom: 1px solid #ced9cc;
}
.data-table th:first-child {
  width: 35px;
  color: #83917f;
  text-align: center;
}
.data-table td,
.data-table th {
  padding: 8px 11px;
  border-bottom: 1px solid #ecf0e9;
  text-align: right;
}
.data-table th button {
  font-family: inherit;
  padding: 0;
  white-space: nowrap;
  font-size: 11px;
}
.data-table tr:nth-child(even) {
  background: #fafbf8;
}
.data-table td:first-child {
  color: #798777;
  text-align: center;
  font-size: 10px;
}
.data-table td.missing {
  background: #fff5df;
  color: #8a6115;
}
.data-table tr.highlighted {
  background: #e6f1de;
}
.data-table td.new-column,
.data-table th.new-column {
  background: #e6f1de;
}
.variable-detail {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  background: #fafbf7;
}
.variable-detail strong {
  color: var(--ink);
}
.data-description {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin: 13px 0 0;
}
.workbench-note {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.workbench-note > span {
  color: var(--green);
  font-size: 17px;
  line-height: 1;
}
.workbench-note p {
  margin: 0;
}
.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 16px;
}
.results-heading button {
  font-size: 10px;
}
.results-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 3px;
}
.result-card {
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 19px;
}
.result-command {
  font: 11px/1.6 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--green);
  margin: 0 0 13px;
  background: #f3f6ee;
  padding: 9px 11px;
  border-radius: 4px;
}
.result-command.error {
  color: var(--red);
  background: #fff1ec;
}
.result-text {
  font-size: 11px;
  line-height: 1.65;
  color: #57675d;
}
.result-error {
  font-size: 12px;
  color: var(--red);
}
.result-table-wrap {
  overflow: auto;
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  font: 12px/1.65 var(--mono);
  white-space: nowrap;
}
.result-table th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid #b9c8b5;
  text-align: right;
}
.result-table td,
.result-table th {
  padding: 7px 8px;
  text-align: right;
}
.result-table td:first-child,
.result-table th:first-child {
  text-align: left;
}
.result-table tr:nth-child(even) {
  background: #f8faf5;
}
.result-table .coef-select {
  padding: 0;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font: inherit;
}
.result-metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0 17px;
}
.group-stat-count {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.group-inspect-button {
  display: block;
  padding: 0.35rem 0;
  margin-top: 0.2rem;
  min-height: 36px;
  font: 12px var(--sans);
}
#group-inspection .result-table-wrap {
  margin: 1.25rem 0;
}
.result-metric {
  font-size: 11px;
  color: var(--muted);
}
.result-metric strong {
  display: block;
  font: 16px var(--mono);
  color: var(--ink);
  margin-top: 4px;
}
.number-result {
  font: 28px var(--mono);
  color: var(--green);
  margin: 8px 0;
}
.result-annotation {
  font-size: 11px;
  background: #f0f5e9;
  border-left: 2px solid #829d70;
  padding: 10px 12px;
  margin: 13px 0 0;
  line-height: 1.7;
}
.output-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
}
.empty-state {
  padding: 50px 25px;
  text-align: center;
  background: #f7f9f2;
  border: 1px dashed #cbd6c5;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
.empty-state h3 {
  color: var(--ink);
  font-size: 17px;
}
.empty-state code {
  display: block;
  margin: 14px auto 0;
  width: max-content;
  max-width: 100%;
  font-size: 11px;
  white-space: pre-wrap;
}
.chart-title {
  font-size: 16px;
  margin: 3px 0 5px;
}
.chart-caption {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.plot {
  width: 100%;
  height: auto;
  display: block;
  background: #fafcf7;
  border: 1px solid #e5eadf;
  border-radius: 6px;
}
.plot text {
  font-family: var(--mono);
  font-size: 10px;
  fill: #60745f;
}
.plot .axis-title {
  font-family: var(--sans);
  font-size: 11px;
  fill: #334f37;
}
.plot .gridline {
  stroke: #e0e7d9;
  stroke-width: 1;
}
.plot .dot {
  fill: #3d795c;
  stroke: #fafff5;
  stroke-width: 1.5;
  cursor: pointer;
}
.plot .dot:hover,
.plot .dot:focus {
  fill: #bc7e29;
  r: 6;
}
.plot .fit-line {
  stroke: #c27d2e;
  stroke-width: 2.5;
}
.plot .residual-line {
  stroke: #99ae8c;
  stroke-width: 1;
}
.graph-reading {
  font: 11px var(--mono);
  min-height: 20px;
  color: var(--green);
  margin: 10px 0;
}
.graph-controls {
  background: #f2f5ec;
  border-radius: 6px;
  padding: 14px;
  margin-top: 12px;
}
.graph-controls h3 {
  font: 600 12px var(--sans);
  margin: 0 0 8px;
}
.graph-controls p {
  font-size: 11px;
  margin-bottom: 12px;
  color: var(--muted);
}
.slider-row {
  display: grid;
  grid-template-columns: 56px 1fr 65px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  margin: 10px 0;
}
.slider-row output {
  font-family: var(--mono);
  text-align: right;
  font-size: 10px;
}
.slider-row input {
  min-width: 0;
  width: 100%;
  accent-color: var(--green);
}
.sse-line {
  font: 11px var(--mono);
  margin: 10px 0 !important;
  color: var(--ink) !important;
}
.residual-toggle {
  font-size: 11px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.residual-toggle input {
  accent-color: var(--green);
}
.chart-data {
  margin: 14px 0;
  font-size: 11px;
}
.chart-data summary {
  cursor: pointer;
}
.app-footer {
  padding: 3px 32px 25px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}
.app-footer a {
  text-decoration: none;
}
.notice {
  padding: 14px 20px;
  margin: 0 24px 20px;
  border-radius: 6px;
  font-size: 12px;
}
.warning {
  background: var(--warm);
  color: var(--warning);
  border: 1px solid #e3cf9e;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 11px;
  max-width: 720px;
  width: calc(100% - 32px);
  max-height: 85vh;
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 18px 80px #14282130;
}
dialog::backdrop {
  background: #172c2877;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.dialog-header h2 {
  margin: 0;
}
dialog p {
  font-size: 13px;
  line-height: 1.75;
}
dialog .reference-group {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 17px;
}
.reference-group h3 {
  font-size: 14px;
}
.reference-command {
  margin: 12px 0;
}
.reference-command code {
  display: inline-block;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}
.reference-command p {
  font-size: 11px;
  margin: 5px 0;
  color: var(--muted);
}
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.completed-panel {
  background: #eef5e7;
  border: 1px solid #cbdcbe;
  border-radius: 7px;
  padding: 16px;
  margin: 18px 0;
}
.completed-panel h3 {
  font-size: 16px;
}
.completed-panel p {
  font-size: 12px;
  margin-bottom: 0;
}
@media (min-width: 1700px) {
  .workspace-grid {
    max-width: 1770px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 250px minmax(390px, 0.9fr) minmax(600px, 1.3fr);
  }
  .workspace-heading {
    max-width: 1834px;
    margin: auto;
  }
  .lesson-pane {
    padding: 30px 33px;
  }
  .observation-pane {
    padding: 30px;
  }
  .lesson-explanation,
  .task-card {
    font-size: 14px;
  }
  .data-table {
    font-size: 12px;
  }
  .data-table td,
  .data-table th {
    padding: 10px 14px;
  }
}
@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: 190px minmax(300px, 0.95fr) minmax(360px, 1.2fr);
    margin: 0 16px 20px;
  }
  .learning-sidebar {
    padding: 20px 9px;
  }
  .lesson-pane {
    padding: 22px 19px;
  }
  .observation-pane {
    padding: 22px 16px;
  }
  .dataset-heading {
    align-items: flex-start;
  }
  .dataset-heading h2 {
    font-size: 15px;
  }
  .dataset-heading > .quiet-button {
    padding: 6px;
    font-size: 10px;
  }
  .app-header {
    gap: 30px;
    padding: 0 24px;
  }
  .workspace-heading {
    padding: 24px;
  }
  .view-tabs {
    gap: 18px;
  }
  .editor-actions {
    gap: 5px;
  }
  .editor-actions .quiet-button {
    padding: 8px;
  }
  .lesson-link {
    font-size: 11px;
  }
  .sidebar-title .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .small-count {
    font-size: 10px;
  }
}
@media (max-width: 1000px) {
  .workspace-grid {
    grid-template-columns: 310px minmax(0, 1fr);
  }
  .learning-sidebar {
    grid-column: 1/-1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 15px;
  }
  .sidebar-title {
    padding: 0;
  }
  .sidebar-intro,
  .sidebar-foot {
    display: none;
  }
  #lesson-list {
    display: flex;
    overflow-x: auto;
    gap: 7px;
    margin-top: 9px;
    padding-bottom: 3px;
  }
  .lesson-link {
    flex: 0 0 180px;
    margin: 0;
  }
  .explore-button {
    margin: 12px 0 0;
    padding: 8px 11px;
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .explore-button small {
    margin: 0;
  }
  .lesson-pane {
    padding: 23px 20px;
  }
  .scope-note {
    font-size: 11px;
  }
  .app-header nav {
    gap: 19px;
  }
  .app-header {
    gap: 27px;
  }
  .observation-pane {
    padding: 23px 18px;
  }
}
@media (max-width: 720px) {
  .app-header {
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    padding: 15px 17px 0;
    gap: 12px;
  }
  .wordmark {
    font-size: 19px;
  }
  .brand-symbol {
    width: 29px;
    height: 29px;
    font-size: 25px;
  }
  .app-header > .quiet-button {
    order: 1;
    font-size: 11px;
    margin-left: auto;
  }
  .app-header nav {
    order: 2;
    width: 100%;
    height: 39px;
    gap: 26px;
  }
  .app-header nav a {
    font-size: 12px;
  }
  .workspace-heading {
    padding: 21px 18px 20px;
    display: block;
  }
  .workspace-heading h1 {
    font-size: 25px;
    max-width: 350px;
  }
  .scope-note {
    text-align: left;
    margin-top: 12px;
    font-size: 10px;
  }
  .scope-note br {
    display: none;
  }
  .workspace-grid {
    display: flex;
    flex-direction: column;
    margin: 0 10px 18px;
    min-height: 0;
    border-radius: 8px;
  }
  .learning-sidebar {
    padding: 14px;
  }
  .lesson-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 23px 20px;
  }
  .observation-pane {
    padding: 23px 18px;
  }
  .lesson-link {
    flex-basis: 165px;
  }
  .step-progress {
    margin-bottom: 17px;
  }
  #lesson-title {
    font-size: 24px;
  }
  .lesson-explanation {
    font-size: 13px;
  }
  .task-card {
    margin: 17px 0 20px;
  }
  .interpretation {
    margin-top: 17px;
  }
  .lesson-footer {
    margin-bottom: 17px;
  }
  .dataset-heading h2 {
    font-size: 17px;
  }
  .dataset-heading > .quiet-button {
    font-size: 11px;
    padding: 7px;
  }
  .dataset-meta {
    margin: 14px 0 20px;
    gap: 10px;
  }
  .data-table-wrap {
    max-height: 365px;
  }
  .results-list {
    max-height: 550px;
  }
  .app-footer {
    display: block;
    padding: 0 20px 24px;
    line-height: 2;
  }
  .app-footer a {
    display: block;
  }
  .export-grid {
    grid-template-columns: 1fr;
  }
  .notice {
    margin: 0 10px 15px;
  }
  .view-tabs {
    gap: 25px;
  }
  .scope-note .text-button {
    font-size: 10px;
  }
  .explore-button small {
    font-size: 10px;
  }
  dialog {
    padding: 20px;
  }
  .dialog-header h2 {
    font-size: 19px;
  }
  .dialog-header .quiet-button {
    white-space: nowrap;
  }
  .slider-row {
    grid-template-columns: 47px 1fr 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .app-header,
  .learning-sidebar,
  .editor-actions,
  .lesson-footer,
  .app-footer,
  dialog,
  .scope-note,
  .view-tabs {
    display: none;
  }
  .workspace-grid {
    display: block;
    border: 0;
    margin: 0;
  }
  .lesson-pane,
  .observation-pane {
    border: 0;
    padding: 15px;
  }
  .data-table-wrap,
  .results-list {
    max-height: none;
    overflow: visible;
  }
  .observation-pane [hidden] {
    display: block !important;
  }
  body {
    background: white;
    color: black;
  }
}

/* Keep small metadata legible against the sidebar and table surfaces. */
.lesson-number,
.lesson-link small {
  opacity: 1;
}
.data-table th:first-child,
.data-table td:first-child {
  color: #5b6e55;
}
/* Keep the result immediately before its interpretation on narrow screens. */
.skip-link:not(:focus) {
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
}
@media (max-width: 720px) {
  .lesson-pane {
    display: contents;
  }
  .learning-sidebar {
    order: 0;
  }
  #lesson-content {
    order: 1;
    margin: 23px 20px 0;
  }
  .editor-section {
    order: 2;
    margin: 0 20px;
  }
  .exercise-check {
    order: 3;
    margin: 16px 20px;
  }
  .observation-pane {
    order: 4;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-top: 4px;
  }
  .interpretation {
    order: 5;
    margin: 23px 20px 0;
    border-top: 0;
    padding-top: 0;
  }
  .lesson-footer {
    order: 6;
    margin: 22px 20px;
  }
  .notes-section {
    order: 7;
    margin: 0 20px 22px;
    padding-top: 17px;
  }
  .scope-note br::after {
    content: " ";
  }
}

/* The command workbench: quiet surfaces, precise state and legible code. */
.app-header {
  height: 64px;
  background: #fff;
}
.brand-symbol {
  border-radius: 4px;
  background: #182434;
}
.app-header nav a {
  color: #526174;
}
.workspace-heading {
  padding: 22px 32px;
}
.workspace-heading h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
}
.workspace-grid {
  border-radius: 6px;
  box-shadow: none;
  grid-template-columns: 210px minmax(330px, 0.95fr) minmax(400px, 1.3fr);
}
.learning-sidebar {
  background: #f6f8fb;
}
.lesson-link {
  color: #35465a;
  border-radius: 3px;
  border-left: 2px solid transparent;
}
.lesson-link:hover {
  background: #eaf0fa;
}
.lesson-link[aria-current="step"] {
  background: #e7edfb;
  color: #163d9d;
  border-left-color: #2355d6;
  box-shadow: none;
}
.lesson-link small {
  font-size: 11px;
}
.lesson-number {
  font-size: 11px;
}
.explore-button {
  background: #fff;
  border-color: var(--line);
  border-radius: 4px;
}
.lesson-explanation {
  color: #465568;
  font-size: 14px;
  line-height: 1.65;
}
.lesson-topline {
  margin-bottom: 12px;
}
.step-progress {
  margin-bottom: 18px;
}
.step-progress span {
  background: #e5eaf2;
  height: 3px;
  border-radius: 0;
}
.step-progress span.done {
  background: #7a91bb;
}
.task-card {
  background: #f0f4fd;
  border-radius: 0;
  margin: 18px 0 22px;
}
.task-card strong {
  color: #244a9e;
  letter-spacing: 0.5px;
}
.editor-wrap {
  display: block;
  min-height: 150px;
  background: #fff;
  border-color: #bac8de;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  box-shadow: none;
}
.editor-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}
.cm-editor {
  min-height: 150px;
  max-width: 100%;
}
.cm-scroller {
  max-height: 380px;
  overflow: auto;
  font-family: var(--mono);
  line-height: 1.75;
}
.cm-editor.cm-focused {
  outline: none;
}
.cm-editor .cm-gutters {
  background: #f4f6fa;
  border-right: 1px solid #e3e8ef;
  color: #627087;
}
.cm-editor .cm-lineNumbers .cm-gutterElement {
  padding: 0 9px 0 6px;
  min-width: 35px;
}
.cm-editor .cm-activeLineGutter {
  background: #e8eef9;
  color: #244a9e;
}
.cm-editor .cm-activeLine {
  background: #f3f6fc;
}
#command-editor {
  min-height: 150px;
  padding: 11px 0;
  border-radius: 0;
  font: 12px/1.75 var(--mono);
  color: #17293f;
  resize: none;
}
#command-editor:focus-visible {
  outline: none;
}
.cm-editor .cm-line {
  padding: 0 12px;
}
.cm-editor .cm-executed {
  border-left: 2px solid #2f806a;
  background: #f1f8f5;
}
.cm-editor .cm-execution-error {
  border-left: 2px solid #bd3f3b;
  background: #fff0ee;
}
.cm-editor .cm-selectionBackground,
.cm-editor.cm-focused .cm-selectionBackground {
  background: #c9dbfd !important;
}
.cm-editor .cm-tooltip {
  border-color: #bac8de;
  background: #fff;
  color: #17293f;
  font-size: 12px;
}
.cm-editor .cm-tooltip-autocomplete > ul > li[aria-selected] {
  background: #2354cc;
  color: #fff;
}
.cm-editor .cm-search label {
  font-size: 12px;
}
.editor-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 9px;
  background: #f4f6fa;
  border: 1px solid #bac8de;
  border-top: 0;
  color: #59687c;
  font: 10px/1.5 var(--mono);
}
.editor-actions #run {
  background: #fff;
  color: #204cbb;
  border-color: #aabbdc;
}
.editor-actions #run:hover {
  background: #edf2fc;
}
#run-status {
  padding: 9px 11px;
  border-left: 2px solid var(--green);
  background: #f4f6fa;
}
#run-status.execution-problem {
  border-color: #a63d29;
  color: #7c2d21;
}
.editor-actions.run-together #run {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.editor-actions.run-together #run:hover {
  background: var(--green-dark);
}
.editor-actions.run-together #run-line {
  background: #fff;
  color: #204cbb;
  border-color: #aabbdc;
}
.editor-actions.run-together #run-line:hover {
  background: #edf2fc;
}
.shortcut {
  font-size: 10px;
}
.primary-button,
.quiet-button {
  border-radius: 4px;
}
.view-tabs {
  gap: 18px;
}
.view-tabs button {
  font-size: 12px;
}
.data-table th,
.data-table th:first-child {
  background: #f2f5fa;
  color: #4e617d;
}
.data-table td:first-child {
  color: #5d6c80;
}
.data-table tbody tr:nth-child(even) {
  background: #fafbfd;
}
.data-table .changed-cell {
  background: #fff1c8 !important;
  box-shadow: inset 0 -2px #bd8624;
}
.data-table .new-column {
  background: #edf5ff;
}
.data-table tr.highlighted {
  background: #e8efff;
}
.result-command {
  background: #f0f4fa;
  color: #25436c;
}
.result-source {
  display: block;
  padding: 7px 12px 0;
  font: 10px/1.5 var(--mono);
  color: #5c6b80;
  background: #f0f4fa;
}
.history-intro {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.history-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.history-marker {
  color: #53647b;
  font: 11px/1.7 var(--mono);
}
.history-body > code {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: none;
  padding: 0;
  color: #1d478f;
  font: 12px/1.7 var(--mono);
}
.history-body > p {
  font-size: 12px;
  margin: 8px 0 4px;
}
.history-dimensions {
  display: block;
  color: var(--muted);
  font: 10px/1.7 var(--mono);
  margin-bottom: 9px;
}
.history-entry.failed .history-body > p {
  color: #a32e29;
}
.history-entry .text-button {
  font-size: 11px;
}
.change-details {
  margin: 10px 0;
  font-size: 12px;
}
.change-details summary {
  cursor: pointer;
  color: #234eae;
  margin-bottom: 8px;
}
.lesson-switch,
.mobile-workflow {
  display: none;
}
@media (max-width: 1180px) and (min-width: 1001px) {
  .workspace-grid {
    grid-template-columns: 175px minmax(300px, 0.95fr) minmax(340px, 1.1fr);
  }
  .view-tabs {
    gap: 12px;
  }
}
@media (max-width: 1000px) {
  .workspace-grid {
    grid-template-columns: 310px minmax(0, 1fr);
  }
  .learning-sidebar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
    padding: 12px 18px;
  }
  .sidebar-title {
    grid-column: 1 / -1;
  }
  #lesson-list {
    display: none;
  }
  .lesson-switch {
    display: block;
    width: 100%;
    min-width: 0;
    border: 1px solid #bfcce0;
    border-radius: 4px;
    padding: 9px 28px 9px 10px;
    background: #fff;
    color: #243e65;
    font-size: 12px;
  }
  .explore-button {
    margin: 0;
    width: auto;
  }
  .explore-button small {
    display: none;
  }
}
@media (max-width: 720px) {
  body {
    padding-bottom: 65px;
  }
  .app-header {
    height: auto;
    padding: 13px 18px;
    gap: 15px;
  }
  .workspace-heading {
    padding: 18px;
  }
  .workspace-heading h1 {
    font-size: 23px;
  }
  .workspace-grid {
    display: flex;
    margin: 0 10px 20px;
    border-radius: 4px;
  }
  .learning-sidebar {
    padding: 12px;
  }
  .sidebar-title {
    margin: 0;
  }
  #lesson-content {
    margin-top: 20px;
  }
  .lesson-explanation {
    font-size: 14px;
  }
  .editor-actions {
    gap: 7px;
  }
  .editor-actions .primary-button,
  .editor-actions .quiet-button {
    font-size: 12px;
    min-height: 38px;
    padding: 8px 10px;
  }
  .shortcut {
    display: none;
  }
  .view-tabs {
    gap: 0;
    justify-content: space-between;
  }
  .view-tabs button {
    padding-left: 9px;
    padding-right: 9px;
  }
  .mobile-workflow {
    position: fixed;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 12px max(7px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #ccd6e6;
    box-shadow: 0 -3px 12px #17293f08;
    z-index: 20;
  }
  .mobile-workflow button {
    min-height: 40px;
    color: #234b9e;
    font-size: 12px;
  }
  .mobile-workflow button + button {
    border-left: 1px solid #e0e6f0;
  }
  .mobile-workflow span {
    font-size: 10px;
  }
  #lesson-content,
  .editor-section,
  .observation-pane {
    scroll-margin-top: 16px;
  }
}
@media print {
  .mobile-workflow,
  .lesson-switch {
    display: none;
  }
}

/* Curriculum navigation and graduated help. */
.track-label {
  display: block;
  margin: 15px 0 6px;
  font-size: 12px;
  color: var(--ink, #172a3a);
  font-weight: 650;
}
.track-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b9c5ce;
  border-radius: 5px;
  background: #fff;
  color: #203648;
  padding: 8px;
  font: inherit;
  font-size: 13px;
}
.lesson-help {
  margin: 12px 0 18px;
}
.lesson-help .text-button {
  min-height: 36px;
  text-align: left;
}
.lesson-help .text-button:disabled {
  color: #526474;
  cursor: default;
}
.task-hints {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #384f61;
  font-size: 14px;
  line-height: 1.65;
}
.task-hints:empty {
  display: none;
}
.task-hints li + li {
  margin-top: 9px;
}
.answer-choices {
  border: 0;
  padding: 0;
  margin: 0;
}
#check-answer {
  margin-top: 12px;
}
.numeric-label {
  display: block;
  color: #455b6c;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
}
.numeric-answer {
  display: block;
  width: min(100%, 260px);
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #9cabb7;
  border-radius: 5px;
  background: #fff;
  color: #132b3e;
  font:
    500 18px/1.5 ui-monospace,
    monospace;
}
.numeric-answer:focus-visible,
.track-select:focus-visible {
  outline: 3px solid #176ca2;
  outline-offset: 3px;
}
.preserve-status {
  padding: 4px 7px;
  border: 1px solid #8aadb9;
  border-radius: 4px;
  background: #edf7f9;
  color: #294c5c;
  font-size: 11px;
}
@media (max-width: 850px) {
  .track-label {
    margin-top: 8px;
  }
  .track-select {
    max-width: 100%;
  }
  .learning-sidebar #track-description {
    display: block;
    margin: 8px 0;
  }
  .task-hints {
    font-size: 14px;
  }
}
@media (max-width: 1000px) {
  .learning-sidebar .track-label,
  .learning-sidebar .track-select,
  .learning-sidebar #track-description,
  .learning-sidebar .save-status {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .learning-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
  .learning-sidebar .lesson-switch {
    grid-column: 1;
  }
  .learning-sidebar #track-description {
    display: none;
  }
  .mobile-workflow button {
    padding-left: 4px;
    padding-right: 4px;
  }
  #mobile-output-state {
    display: block;
    font-size: 10px;
  }
}

/* Local data review and larger dataset navigation. */
.import-open {
  margin: 12px 0;
  width: 100%;
}
.remove-import {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  text-align: left;
}
#import-dialog {
  width: min(1000px, calc(100vw - 32px));
}
.file-label {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  font-weight: 600;
}
.file-label input {
  font: inherit;
  max-width: 100%;
}
.csv-settings-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) 1fr 1.4fr;
  gap: 16px;
  align-items: end;
}
.csv-settings-grid label,
.csv-column label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #334c60;
}
.csv-settings-grid input,
.csv-settings-grid select,
.csv-column input,
.csv-column select {
  min-height: 40px;
  width: 100%;
  min-width: 0;
  border: 1px solid #aab8c4;
  background: #fff;
  color: #183044;
  border-radius: 4px;
  padding: 8px;
  font: inherit;
}
.csv-settings-grid .csv-checkbox {
  display: flex;
  align-items: center;
  min-height: 40px;
}
.csv-checkbox input {
  width: 18px;
}
.csv-details {
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.csv-status {
  color: #235c52;
  font-size: 13px;
}
.csv-status.error,
.csv-conversion-error {
  color: #982c25;
}
.csv-columns {
  border-top: 1px solid #d5dfe7;
  margin-top: 20px;
}
.csv-limits summary {
  cursor: pointer;
}
.csv-limits p {
  margin: 8px 0;
}
.csv-columns:empty {
  border: 0;
}
.csv-column {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) minmax(
      160px,
      1fr
    );
  gap: 10px 18px;
  padding: 16px 0;
  border-bottom: 1px solid #d5dfe7;
}
.csv-source-name {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.csv-source-name span {
  font-size: 11px;
  color: #506473;
}
.csv-column-reason,
.csv-conversion-error {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.csv-column-reason {
  color: #506473;
}
.csv-preview {
  overflow: auto;
  max-height: 360px;
  margin-top: 20px;
  border: 1px solid #d5dfe7;
}
.csv-preview:empty {
  display: none;
}
.csv-preview table {
  border-collapse: collapse;
  width: 100%;
  font:
    12px/1.5 ui-monospace,
    monospace;
}
.csv-preview th,
.csv-preview td {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #d5dfe7;
  white-space: pre-wrap;
  min-width: 100px;
  max-width: 300px;
  overflow-wrap: anywhere;
}
.csv-preview th {
  background: #f1f5f8;
}
.csv-preview small {
  display: block;
  color: #506473;
  font:
    11px/1.6 system-ui,
    sans-serif;
}
.csv-preview caption {
  padding: 12px;
  text-align: left;
  font:
    600 13px/1.5 system-ui,
    sans-serif;
}
.csv-preview .invalid-cell {
  background: #fff0ec;
  color: #982c25;
}
.empty-cell {
  color: #576a77;
  font-style: italic;
}
.import-footer {
  position: sticky;
  bottom: -24px;
  display: flex;
  gap: 16px;
  align-items: center;
  border-top: 1px solid #d5dfe7;
  background: #fff;
  padding: 16px 0;
  margin-top: 20px;
}
.import-footer span {
  font-size: 12px;
  color: #506473;
}
#data-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 12px;
  color: #385368;
}
#data-pagination input {
  width: 55px;
  padding: 6px;
  border: 1px solid #aab8c4;
  border-radius: 4px;
  font: inherit;
}
@media (max-width: 1000px) {
  .import-open {
    grid-column: 1 / -1;
    margin: 0;
  }
}
@media (max-width: 720px) {
  .csv-settings-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .csv-column {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  .csv-source-name {
    grid-column: 1 / -1;
  }
  .import-footer {
    display: grid;
    bottom: -20px;
  }
  .import-footer .primary-button {
    width: 100%;
  }
}
