* { box-sizing: border-box; }

:root {
  --ink: #142033;
  --muted: #5c6b7a;
  --page: #f2f5f8;
  --surface: #ffffff;
  --line: #c9d4e0;
  --accent: #0d7a6f;
  --accent-deep: #085c54;
  --focus: #0d7a6f;
  --max: 72rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius: 0.75rem;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  padding: var(--space-6);
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}

a { color: var(--accent-deep); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.page {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.lesson-nav,
nav[aria-label$="lessons"] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel {
  margin: 0 0 var(--space-6);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel h2, .panel h3 { margin-top: 0; }
.explain { color: var(--muted); }
.code-sample {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  background: #eef3f6;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
}

:root {
  --max-width: 72rem;
}

.section-container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 5rem 1rem;
}

.band {
  background: var(--surface);
}

.band-alt {
  background: #e6eef2;
}

.hero.section-container {
  padding-block: 4rem;
}

.hero h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-card {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-card h3 { margin: 0 0 var(--space-2); }

.demo-shell {
  border: 1px dashed #8aa0ad;
  border-radius: var(--radius);
  overflow: hidden;
}

.demo-shell .band,
.demo-shell .band-alt {
  border-block: 0;
}

.width-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
