@font-face {
  font-family: "Golos Text";
  src: url("/fonts/golos-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  src: url("/fonts/golos-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Lora;
  src: url("/fonts/lora-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Lora;
  src: url("/fonts/lora-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --canvas: #f5f6f0;
  --paper: #fff;
  --ink: #20281e;
  --muted: #586153;
  --stroke: #d9dfd3;
  --rule: #e4e9df;
  --green: #315634;
  --leaf: #c8ed83;
  --leaf-edge: #8aab5d;
  --herb: #edf3e7;
  --code-bg: #f7f8f5;
  --rail: #fafbf7;
  --violet: #5a4195;
  --radius: 16px;
  --workspace-inset: 20px;
  --header-height: 64px;
  --sans: "Golos Text", system-ui, sans-serif;
  --serif: Lora, Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html { scroll-padding-block-start: calc(var(--header-height) + 1px); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1rem / 1.55 var(--sans);
}

button, textarea { font: inherit; }
button { color: inherit; }
button, summary { cursor: pointer; }
button[aria-disabled="true"] { opacity: .58; cursor: wait; }
a { color: inherit; }
p, h1, h2, h3, pre { margin: 0; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid #3c733f; outline-offset: 4px; }
::selection { background: #dcecbc; color: var(--ink); }

.container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 3;
  inset-block-start: 0;
  border-bottom: 1px solid var(--stroke);
  background: #fbfcf8;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--header-height);
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  flex: none;
  width: auto;
  height: 31px;
}

.lesson-nav { display: flex; align-items: center; gap: 10px; }
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  color: var(--green);
  background: var(--paper);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}
.nav-button[href]:hover { background: var(--herb); }
.nav-button[href]:active { background: #e2ecd8; }
.nav-button[aria-disabled="true"] { color: #77816d; border-color: var(--rule); background: transparent; }
.lesson-position {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-inline: 3px;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 550;
  white-space: nowrap;
}
.lesson-track { display: flex; gap: 4px; }
.lesson-track i {
  width: 17px;
  height: 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #dfe5d9;
  transition: background 180ms ease, border-color 180ms ease;
}
.lesson-track .current { border-color: #6b914b; background: #d7efb1; }
.lesson-track .completed { background: #648d46; }

#lesson { padding-block: 40px; }

h1 {
  margin-block-end: 8px;
  font: 600 2.125rem / 1.2 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.prompt { max-width: 72ch; font-size: .9375rem; line-height: 1.55; }
.prompt code, .hint code, .review p code {
  padding: .1em .29em;
  border-radius: 4px;
  background: #eaf0e4;
  color: #344934;
  font-size: .88em;
  white-space: nowrap;
}

.practice-panel {
  margin-block-start: 16px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #fbfcf8;
}

.practice-overview {
  display: grid;
  grid-template-columns: minmax(0, 250px) 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 54px;
  padding: 9px 15px;
  border-radius: 11px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.35;
}

.practice-overview:hover, .practice-panel[open] .practice-overview { background: #f3f6ed; }
.practice-panel[open] .practice-overview { border-end-start-radius: 0; border-end-end-radius: 0; }

.daily-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 9px;
}
.daily-stat strong { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.goal-met #daily-label { color: var(--green); font-weight: 650; }
.practice-meter {
  grid-column: 1 / -1;
  appearance: none;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 6px;
  background: #dfe7d7;
  accent-color: #76994f;
}
.practice-meter::-webkit-progress-bar { border-radius: 6px; background: #dfe7d7; }
.practice-meter::-webkit-progress-value { border-radius: 6px; background: #76994f; transition: width 200ms ease-out; }
.practice-meter::-moz-progress-bar { border-radius: 6px; background: #76994f; }

.streak-stat, .practice-disclosure { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.streak-stat { justify-self: start; font-variant-numeric: tabular-nums; }
.streak-stat.has-streak { color: #794c24; font-weight: 650; }
.streak-mark {
  position: relative;
  width: 13px;
  height: 15px;
  border-radius: 9px 2px 8px 8px;
  background: #c0cbb8;
  transform: rotate(-14deg);
}
.streak-mark::after {
  position: absolute;
  inset: auto 4px 2px;
  height: 6px;
  border-radius: 5px 1px 5px 5px;
  background: #e9eee3;
  content: "";
}
.has-streak .streak-mark { background: #c88643; }
.has-streak .streak-mark::after { background: #ffe4a9; }
.practice-disclosure { color: var(--green); font-weight: 650; }

.practice-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  padding: 15px;
  border-top: 1px solid var(--rule);
}
.practice-content h2 { font-size: .9375rem; font-weight: 670; }
.practice-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.practice-heading > span, .practice-review p { color: var(--muted); font-size: .8125rem; }
.practice-heading > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.practice-lessons { margin: 6px 0 0; padding: 0; list-style: none; }
.practice-lessons a {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: .875rem;
  text-decoration: none;
}
.practice-lessons a:hover { background: var(--herb); }
.practice-lessons a[aria-current="step"] { background: #eef3e8; font-weight: 650; }
.practice-task-mark {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1px solid #a7b39c;
  border-radius: 50%;
}
.practice-task-status { color: var(--green); font-size: .75rem; font-weight: 550; }
[data-state="done"] .practice-task-mark { border-color: #99b278; background: #dcedc2; }
[data-state="done"] .practice-task-mark::after {
  position: absolute;
  inset: 2px auto auto 4px;
  width: 5px;
  height: 7px;
  border: solid var(--green);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  content: "";
}
[data-state="review"] .practice-task-mark { border-color: #cb9c68; background: #f8ecd8; }
[data-state="review"] .practice-task-mark::after {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #9b682f;
  content: "";
}
[data-state="review"] .practice-task-status { color: #794c24; }
.practice-review { min-width: 0; padding-inline-start: 20px; border-inline-start: 1px solid var(--rule); }
.practice-review p { margin-block: 4px 10px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(0, 1fr);
  margin-top: 24px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--paper);
}

.panel-head { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 8px; padding-inline: var(--workspace-inset); }
.panel-head h2 { font-size: .9375rem; font-weight: 670; line-height: 1.25; }
.panel-head h2, .panel-head label { display: flex; align-items: center; gap: 10px; }
.panel-head h2 { scroll-margin-block-start: 16px; }
.editor { min-width: 0; }
.editor-tools { display: flex; align-items: center; gap: 10px; }

.query-icon {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--green);
  background: var(--herb);
}
.query-icon::before, .query-icon::after { position: absolute; content: ""; }
.query-icon::before { inset: 8px auto auto 6px; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.query-icon::after { inset: 14px auto auto 12px; width: 6px; border-top: 1.5px solid currentColor; }

.editor-source {
  --code-line: 26px;
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  height: 146px;
  margin-inline: var(--workspace-inset);
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font: 500 .875rem / var(--code-line) var(--mono);
}

.editor-source:focus-within { outline: 2px solid #527749; outline-offset: -2px; z-index: 1; }
[data-lesson="select"] .editor-source { --code-line: 29px; height: 114px; font-size: 1rem; }
.line-numbers, .editor-field, .highlight { position: relative; min-width: 0; overflow: hidden; }
.line-numbers { border-right: 1px solid #e4eae0; color: #5a6956; text-align: right; }
.line-numbers pre { padding: 12px 10px 12px 0; }
.editor-field textarea, .highlight pre {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-variant-ligatures: none;
  letter-spacing: normal;
  text-align: left;
  white-space: pre;
  tab-size: 2;
}

.highlight { position: absolute; inset: 0; pointer-events: none; }
.highlight pre { width: max-content; min-width: 100%; color: #242d26; }
.line-numbers pre { font: inherit; }

.editor-field textarea {
  position: absolute;
  inset: 0;
  height: 100%;
  overflow: auto;
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: #243c2b;
  -webkit-text-fill-color: transparent;
  outline: none;
}

.editor-field textarea::selection { background: #b7dd9b88; }
.keyword { color: var(--violet); font-weight: 700; }
.literal { color: #2c673f; }
.comment { color: #566656; }

.editor-actions { display: flex; align-items: center; gap: 9px; padding: 13px var(--workspace-inset) 16px; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #ced8c7;
  border-radius: 10px;
  background: var(--paper);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 2px 2px #2b42241a;
  transition: background 140ms, box-shadow 140ms, transform 140ms;
}

.button:not([aria-disabled="true"]):hover, .text-button:not([aria-disabled="true"]):hover { background: var(--herb); }
.button.primary { background: var(--leaf); border-color: #9fc668; box-shadow: 0 2px 1px var(--leaf-edge); }
.button.primary:not([aria-disabled="true"]):hover { background: #bce373; }
.button:not([aria-disabled="true"]):active { box-shadow: none; transform: translateY(2px); }
.play { width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid #2d4725; margin-left: 1px; }

.text-button {
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--green);
  font-size: .8125rem;
  font-weight: 650;
  white-space: nowrap;
}
.mobile-jump { display: none; }

.editor-output { min-height: 80px; padding: 13px var(--workspace-inset) 16px; border-top: 1px solid var(--rule); border-end-start-radius: calc(var(--radius) - 1px); }
.editor-output.is-success { border-top-color: #d0e2b7; background: #edf7df; }
.editor-output.is-stale { background: var(--rail); }
.editor-output.is-error { border-top-color: #eddcd7; background: #fff9f6; }
.output-head, .output-feedback { display: flex; align-items: center; gap: 10px; }
.output-head { justify-content: space-between; flex-wrap: wrap; }
.output-feedback { min-width: 0; align-items: flex-start; }
.success-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  align-self: center;
  border: 1px solid #aaca75;
  border-radius: 50%;
  background: #d5eea9;
  color: #315824;
}
.success-mark::before {
  content: "";
  width: 8px;
  height: 14px;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
}
.editor-output h3 { margin-bottom: 4px; font-size: .8125rem; font-weight: 670; }
.result-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-block-end: 4px; }
.result-title h3 { margin: 0; }
.xp-award {
  padding: 2px 6px;
  border-radius: 5px;
  background: #d4ebac;
  color: #365625;
  font-size: .75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
#status { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
#status[data-tone="warn"] { color: #855326; }
#status[data-tone="error"] { color: #a3322b; }
#status[data-tone="good"] { color: #2b652e; }
.error-details { margin-top: 2px; color: #78352f; font-size: .8125rem; }
.error-details p {
  max-width: 70ch;
  padding: 8px 10px;
  border: 1px solid #eddcd7;
  border-radius: 6px;
  background: var(--paper);
  font-family: var(--mono);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
#result:not(:empty) { margin-top: 10px; }
#result .table-wrap { max-height: 246px; }
.result-enter { animation: show-result 220ms ease-out both; }
.celebrate .success-mark { animation: success-pop 380ms ease-out both; }

.resources {
  min-width: 0;
  border-inline-start: 1px solid var(--stroke);
  border-start-end-radius: calc(var(--radius) - 1px);
  border-end-end-radius: calc(var(--radius) - 1px);
  background: var(--rail);
}
.data-table-name {
  display: inline-flex;
  margin-block-end: -1px;
  padding: 3px 9px;
  border: 1px solid var(--stroke);
  border-radius: 7px 7px 0 0;
  background: var(--herb);
  color: #365735;
  font-size: .8125rem;
  font-weight: 650;
}
.data-table-name:not([hidden]) ~ #table-panels .table-wrap { border-start-start-radius: 0; }

.table-icon {
  position: relative;
  width: 18px;
  height: 15px;
  border: 1.5px solid #43683e;
  border-radius: 3px;
}

.table-icon::before, .table-icon::after { content: ""; position: absolute; }
.table-icon::before { inset: 3.5px 0 auto; border-top: 1.5px solid #43683e; }
.table-icon::after { inset: 4px auto 0 6px; border-left: 1.5px solid #43683e; }

.data-content { padding: 0 var(--workspace-inset) 16px; }
.table-tabs { display: flex; gap: 5px; min-height: 44px; margin-bottom: 8px; }
.table-tabs button {
  max-width: 100%;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #4a5c47;
  font: 600 .8125rem / 1.2 var(--mono);
  overflow-wrap: anywhere;
}

.table-tabs button:hover { background: #e8efe2; }
.table-tabs button[aria-selected="true"] { border-color: #c0d0b5; background: var(--herb); color: #2d4e2c; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: var(--paper);
}

table { width: 100%; border-collapse: collapse; text-align: left; font-size: .8125rem; }
th, td { padding: 7px 10px; white-space: nowrap; }
th { background: #f9fbf8; color: #445640; font: 650 .75rem / 1.4 var(--mono); }
td { color: var(--ink); font-family: var(--mono); }
tr + tr td, tbody tr:first-child td { border-top: 1px solid #e8ece6; }
td.natural-text { min-width: 98px; white-space: normal; font-family: var(--sans); }
td.number, th.number { text-align: right; }
td[data-swatch]::before {
  display: inline-block;
  width: .6875rem;
  height: .6875rem;
  margin-inline-end: .5rem;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px #20281e33;
  content: "";
}
td[data-swatch="red"] { --swatch: #e99382; }
td[data-swatch="green"] { --swatch: #9cc566; }
td[data-swatch="purple"] { --swatch: #b39ddd; }
td[data-swatch="yellow"] { --swatch: #e8cb69; }

.query-guide {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-inline: var(--workspace-inset);
  padding-block: 14px 17px;
  border-top: 1px solid var(--rule);
}

.query-guide h2 { margin-bottom: 5px; color: #3e3159; font-size: .875rem; font-weight: 700; }
.query-guide dl { display: grid; gap: 4px; margin: 0; color: #514660; font-size: .8125rem; }
.query-guide dl div { display: grid; grid-template-columns: 7ch minmax(0, 1fr); align-items: baseline; gap: 5px; }
.query-guide dd { margin: 0; }
.query-guide code { color: var(--violet); font-size: .8125rem; font-weight: 700; }

.table-buddy {
  position: relative;
  display: block;
  width: 44px;
  height: 37px;
  border: 2px solid #7d65b1;
  border-radius: 10px;
  background: #e4d8fb;
  box-shadow: 0 3px 0 #c6b3ec;
  transform: rotate(-8deg);
}

.table-buddy::before {
  position: absolute;
  inset: 0 0 auto;
  height: 9px;
  border-bottom: 2px solid #7d65b1;
  border-radius: 7px 7px 0 0;
  background: #bea8ec;
  content: "";
}

.table-buddy i {
  position: absolute;
  top: 15px;
  left: 10px;
  width: 4px;
  height: 5px;
  border-radius: 50%;
  background: #402e5f;
  box-shadow: 16px 0 #402e5f;
}

.table-buddy::after {
  position: absolute;
  top: 19px;
  left: 15px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #402e5f;
  border-radius: 0 0 10px 10px;
  content: "";
}

.celebrate .table-buddy { animation: buddy-bounce 480ms ease-out; }

@keyframes show-result {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes success-pop {
  0% { transform: scale(.82); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes buddy-bounce {
  0%, 100% { transform: rotate(-8deg); }
  42% { transform: translateY(-7px) rotate(5deg); }
}

.hint { margin: 0 var(--workspace-inset) 12px; border-top: 1px solid var(--rule); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.hint summary, .review summary, .error-details summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  font-size: .875rem;
  font-weight: 630;
}

.hint summary { padding: 6px 6px 6px 1px; border-radius: 6px; }
.hint summary:hover { background: #f2f6ed; }
.hint p { padding: 0 6px 10px 1px; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.error-details summary { width: fit-content; min-height: 44px; font-size: inherit; }
.error-details summary:hover { text-decoration: underline; text-underline-offset: 3px; }

.question {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #c6d7bd;
  border-radius: 50%;
  background: #edf3e7;
  color: var(--green);
  font-size: .75rem;
}

.expand { position: relative; margin-left: auto; width: 14px; height: 14px; color: var(--green); }
.expand::before, .expand::after { content: ""; position: absolute; top: 6px; left: 1px; width: 12px; height: 1.5px; background: currentColor; }
.expand::after { transform: rotate(90deg); }
.hint[open] .expand::after { transform: none; }

.review { margin-top: 12px; }
.review summary { width: fit-content; padding-inline: 3px; color: var(--muted); }
.review summary:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin-inline: 2px 4px; }
details[open] > summary .chevron { transform: translateY(-2px) rotate(45deg); }
.review-content { max-width: 680px; padding-block: 5px 10px; }
.review-content p { margin-bottom: 13px; color: var(--muted); font-size: .9375rem; }
.solution-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--paper);
}
.copy-status { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.copy-status:not(:empty) { padding: 0 16px 10px; }
.copy-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  margin-block-start: 4px;
  margin-inline-end: 8px;
  padding: 0;
}
.copy-icon { position: relative; width: 16px; height: 16px; }
.copy-icon::before, .copy-icon::after {
  position: absolute;
  width: 10px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: var(--paper);
  content: "";
}
.copy-icon::before { inset: 1px auto auto 1px; }
.copy-icon::after { inset: 4px auto auto 4px; }
.copy-button:hover .copy-icon::after { background: var(--herb); }
.solution-panel pre { overflow: auto; padding: 16px 8px 16px 16px; font-size: .8125rem; line-height: 20px; }

.arrow { position: relative; flex: 0 0 13px; width: 13px; height: 10px; }
.arrow::before, .arrow::after { position: absolute; content: ""; }
.arrow::before { inset: 4px 1px auto 0; border-top: 1.5px solid currentColor; }
.arrow::after { inset: 1.5px 1px auto auto; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.arrow-back { transform: rotate(180deg); }

@media (max-width: 850px) {
  :root { --workspace-inset: 14px; }
  .container { width: calc(100% - 48px); }
  .workspace { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

@media (max-width: 690px) {
  :root { --header-height: 58px; }
  .container { width: calc(100% - 32px); }
  .header-inner { gap: 8px; }
  .brand { font-size: 1.125rem; gap: 7px; }
  .brand-mark { height: 28px; }
  .lesson-nav { gap: 6px; }
  .lesson-position { font-size: .75rem; }
  .lesson-track i { width: 13px; }

  #lesson { padding-block: 26px 32px; }
  h1 { font-size: 1.625rem; text-wrap: pretty; }
  .workspace { grid-template-columns: minmax(0, 1fr); margin-top: 19px; }
  .panel-head { min-height: 49px; }
  .mobile-jump { display: block; }
  .editor-tools { gap: 4px; }
  .editor-source { --code-line: 24px; grid-template-columns: 32px minmax(0, 1fr); height: 125px; }
  [data-lesson="select"] .editor-source { --code-line: 27px; height: 100px; }
  .editor-field textarea, .highlight pre { padding: 12px 9px; font-size: 16px; }
  .line-numbers pre { padding-top: 12px; padding-right: 8px; }
  .editor-actions { padding-block: 12px 14px; }
  .editor-output { min-height: 72px; padding-block: 11px 14px; border-end-start-radius: 0; }
  .resources { border-inline-start: 0; border-top: 1px solid var(--stroke); border-start-end-radius: 0; border-end-start-radius: calc(var(--radius) - 1px); }
  .review { margin-top: 8px; }
}

@media (max-width: 540px) {
  .nav-label, .lesson-count-prefix { display: none; }
  .nav-button { padding-inline: 0; }
  .practice-overview { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding-inline: 12px; }
  .disclosure-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .practice-content { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; }
  .practice-review { padding: 12px 0 0; border-inline-start: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 380px) {
  .brand { font-size: 1rem; gap: 6px; }
  .brand-mark { height: 26px; }
  .lesson-nav { gap: 4px; }
  .editor-tools { gap: 2px; }
  .editor-tools .text-button { padding-inline: 5px; }
  .editor-head h2 label { gap: 6px; }
  .button { padding-inline: 12px; }
  .editor-actions { gap: 6px; }
  .daily-stat { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (max-width: 310px) {
  .brand-mark { display: none; }
}

@media (forced-colors: active) {
  .highlight { display: none; }
  .editor-field textarea { color: CanvasText; -webkit-text-fill-color: CanvasText; }
  .table-tabs button[aria-selected="true"] { border-color: Highlight; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:not([aria-disabled="true"]):active { transform: none; }
}
