:root {
  color-scheme: light;
  --page: #f5f5f5;
  --surface: #ffffff;
  --ink: #282829;
  --muted: #59595d;
  --line: #d9d9dc;
  --accent: #282829;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --radius: 8px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid #5757b5;
  outline-offset: 4px;
}
button {
  transition:
    background-color 180ms ease,
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover {
  filter: brightness(0.94);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
button[data-state="loading"] {
  cursor: progress;
}
.shell {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: var(--space-4) var(--space-3);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  background: var(--surface);
}
.brand {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand span {
  color: var(--ink);
}
.tag {
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--space-1);
}
.nav {
  display: grid;
  gap: var(--space-1);
}
.nav button {
  text-align: left;
  background: transparent;
  padding: var(--space-2);
  border-radius: var(--radius);
  color: var(--muted);
}
.nav button.active {
  background: var(--ink);
  color: white;
  font-weight: 600;
}
.nav button span {
  display: none;
}
.sidefoot {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.main {
  padding: var(--space-4) var(--space-6) 64px;
  min-width: 0;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
  gap: var(--space-2);
}
.crumb {
  font-size: 14px;
  color: var(--muted);
}
.language {
  display: flex;
  background: #e8e8eb;
  padding: 4px;
  border-radius: var(--radius);
}
.language button {
  padding: var(--space-1) var(--space-2);
  background: transparent;
  border-radius: 4px;
  min-height: 40px;
}
.language button.active {
  background: var(--surface);
}
.eyebrow {
  font-size: 14px;
  color: var(--muted);
}
h1 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin: var(--space-2) 0;
  font-weight: 650;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 20px;
  letter-spacing: -0.3px;
}
p {
  line-height: 1.7;
  color: var(--muted);
  max-width: 72ch;
}
.intro {
  max-width: 64ch;
}
.feature {
  margin: var(--space-4) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
}
.feature .copy {
  padding: var(--space-4);
}
.feature p {
  color: #d4d4d7;
  max-width: 50ch;
}
.feature h2 {
  font-size: 32px;
  margin: var(--space-2) 0;
}
.pill {
  font-size: 12px;
  display: inline-block;
  color: #d4d4d7;
}
.primary {
  background: var(--ink);
  color: white;
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  min-height: 48px;
}
.feature .primary {
  background: white;
  color: var(--ink);
}
.secondary {
  background: #e8e8eb;
  padding: var(--space-2);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 48px;
}
.art {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-3);
}
.project-preview {
  width: 100%;
  max-width: 320px;
  color: var(--ink);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px #0003;
}
.preview-toolbar {
  padding: var(--space-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.preview-body {
  padding: var(--space-3);
}
.preview-body strong {
  display: block;
  font-size: 24px;
  margin-bottom: var(--space-2);
}
.preview-body p {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  color: var(--muted);
}
.preview-service {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: var(--space-2) 0;
  font-size: 13px;
  gap: var(--space-2);
}
.preview-action {
  margin-top: var(--space-1);
  padding: var(--space-2);
  color: white;
  background: var(--ink);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}
.sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
  gap: var(--space-2);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.card {
  background: transparent;
  border-top: 1px solid var(--line);
  padding: var(--space-3) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.card p {
  font-size: 14px;
  flex: 1;
}
.number {
  font-size: 12px;
  color: var(--muted);
}
.card h3 {
  margin: var(--space-2) 0 0;
}
.meta {
  font-size: 12px;
  color: var(--muted);
  margin: var(--space-2) 0;
}
.card button {
  margin-top: auto;
}
.badge {
  background: #e8e8eb;
  border-radius: 4px;
  font-size: 12px;
  padding: var(--space-1) var(--space-2);
}
.lessonlayout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.lessonnav {
  display: grid;
  align-content: start;
  gap: var(--space-1);
}
.lessonnav button {
  text-align: left;
  padding: var(--space-2);
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  line-height: 1.5;
}
.lessonnav button.active {
  background: #e8e8eb;
  border-color: var(--ink);
  color: var(--ink);
}
.lesson {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  min-width: 0;
}
.lesson h2 {
  margin-top: var(--space-2);
}
.lesson textarea {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  border: 1px solid #939397;
  border-radius: 4px;
  padding: var(--space-2);
  margin: var(--space-2) 0;
  background: #fafafa;
  line-height: 1.65;
}
.feedback {
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: #efeff2;
  line-height: 1.7;
  border-radius: var(--radius);
}
.choice {
  display: block;
  width: 100%;
  background: #f3f3f5;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: var(--space-2);
  text-align: left;
  margin: var(--space-2) 0;
}
.progress {
  height: 8px;
  background: #e0e0e4;
  border-radius: 4px;
  margin: var(--space-2) 0;
  width: 100%;
  border: 0;
}
progress::-webkit-progress-bar {
  background: #e0e0e4;
}
progress::-webkit-progress-value {
  background: var(--ink);
}
progress::-moz-progress-bar {
  background: var(--ink);
}
.small {
  font-size: 13px;
}
.resource {
  width: 100%;
  margin: var(--space-2) 0;
  background: #f1f1f4;
  padding: var(--space-2);
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    14px/1.7 "SFMono-Regular",
    Consolas,
    monospace;
}
footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--space-6);
}
.skip-link {
  position: absolute;
  top: -80px;
  left: var(--space-2);
  z-index: 10;
  padding: var(--space-2);
  background: white;
}
.skip-link:focus {
  top: var(--space-2);
}
@media (max-width: 1100px) {
  .main {
    padding: var(--space-4);
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }
  .sidebar {
    padding: var(--space-4) var(--space-2);
  }
  .lessonlayout {
    grid-template-columns: 1fr;
  }
  .lessonnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: var(--space-2);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: var(--space-2);
  }
  .nav {
    display: flex;
    overflow-x: auto;
    gap: var(--space-1);
  }
  .nav button {
    white-space: nowrap;
    padding: var(--space-2);
  }
  .sidefoot,
  .tag {
    display: none;
  }
  .main {
    padding: var(--space-3) var(--space-2) var(--space-4);
  }
  .top {
    margin-bottom: var(--space-3);
  }
  .feature {
    grid-template-columns: 1fr;
  }
  .feature .copy {
    padding: var(--space-3);
  }
  .art {
    padding: 0 var(--space-3) var(--space-3);
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .lesson {
    padding: var(--space-3);
  }
  .lessonnav {
    grid-template-columns: 1fr;
  }
  h1 {
    letter-spacing: -1px;
  }
  .sectionhead {
    align-items: baseline;
  }
  .sectionhead h2 {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Codeless: playful learning, with Flowify's graphite identity. */
:root {
  --page: #fff;
  --ink: #282829;
  --muted: #68686f;
  --line: #e4e4e8;
  --accent: #6752dd;
  --radius: 16px;
}
body { font-size: 16px; }
h1, h2, h3 { font-weight: 800; }
.primary, .secondary {
  border-radius: 16px;
  font-weight: 800;
  min-height: 56px;
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  padding: 14px 24px;
}
.primary { background: var(--accent); border-color: #4937a7; color: #fff; }
.secondary { background: #fff; color: var(--accent); }
button:active { transform: translateY(3px); }
.brand { font-weight: 850; }
.brand span { color: var(--accent); }
.brand small { display: block; font-size: 13px; letter-spacing: 0; color: var(--muted); margin-top: 4px; }
.landing-header { max-width: 1160px; padding: 24px 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.language { background: #f5f5f7; border-radius: 12px; }
.language button { border-radius: 8px; font-weight: 700; }
.landing-main { max-width: 1100px; margin: auto; padding: 0 32px; }
.landing-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; min-height: 620px; padding: 64px 0; }
.hero-copy h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.15; letter-spacing: -1.5px; }
.hero-copy p { font-size: 18px; margin-bottom: 32px; }
.hero-copy button { width: 100%; margin-bottom: 16px; }
.hero-note { display: block; font-size: 14px; text-align: center; color: var(--muted); }
.eyebrow { font-weight: 750; color: var(--accent); }
.hero-demo { border: 2px solid var(--ink); border-bottom-width: 8px; border-radius: 32px; padding: 32px; background: #f5f3ff; transform: rotate(-4deg); }
.demo-label { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: #686080; }
.demo-code { display: grid; gap: 16px; margin: 24px 0; background: var(--ink); border-radius: 16px; padding: 24px; color: #fff; }
.demo-code span { color: #b9adff; font-family: monospace; }
.demo-code strong { font-size: 28px; line-height: 1.3; }
.demo-task { display: flex; align-items: center; gap: 16px; font-weight: 700; margin: 16px 0; }
.demo-check { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: var(--accent); flex-shrink: 0; }
.demo-progress { height: 16px; background: #ddd6fb; border-radius: 16px; margin: 32px 0 16px; overflow: hidden; }
.demo-progress span { display: block; width: 72%; height: 100%; background: var(--accent); border-radius: inherit; }
.landing-strip { display: flex; justify-content: space-around; gap: 24px; padding: 24px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); color: var(--muted); font-weight: 750; }
.landing-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; padding: 80px 0; }
.landing-section h2, .landing-cta h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.25; }
.landing-section.reverse > :first-child { order: 2; }
.mini-path { display: flex; align-items: center; justify-content: center; }
.mini-path span { background: #ede9ff; color: var(--accent); display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; border-bottom: 6px solid #c8bff3; font-weight: 850; font-size: 28px; flex-shrink: 0; }
.mini-path i { width: 32px; height: 8px; background: #e4dff7; }
.example-card { border: 2px solid var(--line); border-bottom-width: 6px; padding: 32px; border-radius: 24px; background: #fafafa; }
.example-card > span { font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.landing-courses { padding: 32px 0 64px; }
.card { border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; padding: 24px; background: #fff; }
.card p { font-size: 16px; }
.meta, .badge, footer, .tag, .sidefoot { font-size: 14px; }
.badge { border-radius: 8px; }
.landing-cta { text-align: center; padding: 64px 24px; background: #f5f3ff; border-radius: 32px; }
.landing-cta p { margin: 24px auto 0; }
.landing-footer { max-width: 1100px; margin: 64px auto 0; padding: 32px; border-top: 2px solid var(--line); }
.landing-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.landing-footer button { background: transparent; color: var(--muted); min-height: 44px; padding: 8px; }
.shell { max-width: 1400px; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { border-right: 2px solid var(--line); position: sticky; top: 0; height: 100vh; }
.nav button { font-weight: 750; border: 2px solid transparent; border-radius: 14px; }
.nav button.active { background: #f0ecff; border-color: #d2c9ff; color: var(--accent); }
.top { border-bottom: 0; }
.learning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
.unit-banner { padding: 24px; background: var(--accent); color: #fff; border-radius: 20px; }
.unit-banner > span { font-size: 12px; letter-spacing: 1px; font-weight: 800; color: #e2dcff; }
.unit-banner h1 { font-size: 28px; letter-spacing: -.5px; }
.unit-banner p { color: #fff; margin-bottom: 0; }
.learning-path { display: grid; justify-items: center; gap: 40px; padding: 40px 48px; position: relative; }
.path-stop { display: grid; justify-items: center; gap: 8px; position: relative; text-align: center; width: 240px; }
.path-stop:not(:last-child)::after { content: ''; position: absolute; width: 8px; height: 32px; border-radius: 8px; background: #e8e4f6; top: calc(100% + 4px); }
.stop-1 { transform: translateX(-48px); }
.stop-2 { transform: translateX(48px); }
.path-node { width: 80px; height: 80px; border-radius: 50%; background: #f0edf8; color: #857e9d; border: 2px solid #dcd7eb; border-bottom-width: 8px; font-size: 28px; font-weight: 850; margin-bottom: 8px; }
.path-node.current { background: var(--accent); color: #fff; border-color: #4937a7; outline: 6px solid #ede8ff; outline-offset: 5px; }
.path-node.completed { background: #e7f5e5; color: #327847; border-color: #aecfaa; }
.path-stop > span { color: var(--muted); font-size: 14px; }
.summary-card { border: 2px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 24px; }
.summary-card h2 { font-size: 20px; margin-top: 0; }
.summary-card p { font-size: 14px; }
.summary-card button { width: 100%; }
.score { font-size: 48px; }
.score small { font-size: 20px; color: var(--muted); }
.progress { height: 16px; border-radius: 16px; overflow: hidden; }
progress::-webkit-progress-value, progress::-moz-progress-bar { background: var(--accent); }
.path-finish { padding: 24px; text-align: center; border-top: 2px solid var(--line); }
.path-finish p { font-size: 14px; }
.lesson { border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 24px; }
.lessonnav button { border: 2px solid transparent; border-radius: 14px; }
.lessonnav button.active { background: #f0ecff; border-color: #d2c9ff; color: var(--accent); }
.lesson-meter { display: flex; align-items: center; gap: 16px; font-weight: 800; }
.lesson-meter > span { white-space: nowrap; }
.lesson textarea { border: 2px solid var(--line); border-radius: 16px; font-size: 16px; }
.choice { border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 16px; background: #fff; }
.feedback { border: 2px solid #d2c9ff; background: #f5f3ff; border-radius: 16px; }
.feedback.success { background: #eaf7e8; border-color: #aecfaa; }
.feedback .primary { margin-top: 16px; }
.resource { border-radius: 16px; }
@media(max-width: 1100px) {
  .learning-layout { grid-template-columns: 1fr; }
  .learning-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .landing-hero, .landing-section { gap: 40px; }
  .landing-courses .grid { grid-template-columns: 1fr; gap: 16px; }
}
@media(max-width: 700px) {
  .landing-header { padding: 16px; }
  .header-actions { gap: 8px; }
  .header-actions > .secondary { display: none; }
  .landing-main { padding: 0 24px; }
  .landing-hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; min-height: 0; }
  .hero-demo { max-width: 350px; margin: auto; padding: 24px; transform: rotate(-2deg); }
  .hero-copy { text-align: center; }
  .hero-copy h1 { font-size: 36px; }
  .landing-strip { flex-wrap: wrap; font-size: 14px; gap: 16px; }
  .landing-section { grid-template-columns: 1fr; padding: 48px 0; gap: 32px; }
  .landing-section.reverse > :first-child { order: 0; }
  .landing-cta { padding: 32px 16px; }
  .sidebar { position: static; height: auto; border-right: 0; }
  .nav button { padding: 12px; }
  .learning-aside { grid-template-columns: 1fr; }
  .learning-path { padding: 40px 0; }
  .path-stop { width: 200px; }
  .stop-1 { transform: translateX(-32px); }
  .stop-2 { transform: translateX(32px); }
  .grid { gap: 16px; }
  .mini-path span { width: 64px; height: 64px; font-size: 24px; }
}
/* Задание отделено от объяснения; результат различается текстом и цветом. */
.exercise { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line, #ddd); }
.exercise-choices { display: grid; gap: 8px; margin: 16px 0; }
.exercise-choices .choice { margin: 0; text-align: left; width: 100%; }
.exercise-choices .answer-correct { border-color: #317348; background: #eef8f0; color: #235234; }
.exercise-choices .answer-retry { border-color: #a15d27; background: #fff7ed; color: #754018; }
.exercise > .primary { margin-top: 16px; }
.exercise .choice:disabled { opacity: 1; cursor: default; }
.school-reader { max-width: 800px; margin-top: 24px; }
.school-reader h2 { margin-top: 32px; }
.school-program { padding-left: 24px; line-height: 2; }
.school-table { max-width: 100%; overflow-x: auto; margin: 24px 0; }
.school-table table { width: 100%; border-collapse: collapse; text-align: left; }
.school-table th, .school-table td { padding: 16px 8px; border-bottom: 1px solid var(--line, #ddd); overflow-wrap: anywhere; }
.school-table caption { text-align: left; margin-bottom: 16px; }
.vault-resource { margin: 24px 0; }
.vault-resource .resource { white-space: pre-wrap; overflow-wrap: anywhere; }
.project-stage { padding: 16px; border-bottom: 1px solid var(--line, #ddd); }
.project-stage.active { font-weight: 700; color: var(--accent, #6752dd); }
.project-workspace form { display: grid; gap: 16px; margin: 24px 0; }
.project-workspace input:not([type=checkbox]) { width: 100%; padding: 16px; border: 1px solid #999; border-radius: 8px; font: inherit; }
.project-workspace fieldset { min-width: 0; padding: 16px; border: 1px solid #999; border-radius: 8px; }
.project-check { display: flex; gap: 16px; align-items: flex-start; margin: 16px 0; }
.project-check input { flex-shrink: 0; margin-top: 8px; }
.project-workspace input:focus-visible { outline: 3px solid var(--accent, #6752dd); outline-offset: 4px; }
.next-step { padding: 24px; margin: 24px 0; border-left: 4px solid var(--accent, #6752dd); background: var(--surface, #f8f8fa); border-radius: 8px; }
.next-step h2 { margin-top: 8px; }
.learning-links { margin: 32px 0; padding: 24px 0; border-top: 1px solid var(--line, #ddd); }
.learning-links button { margin: 8px 8px 0 0; }
