:root {
  --ink: #17233a;
  --muted: #58708c;
  --paper: #f5f8fc;
  --surface: #ffffff;
  --border: #d6e0eb;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --yellow: #fef3c7;
  --code: #102033;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
button, textarea { font: inherit; }
button { cursor: pointer; min-height: 44px; border-radius: 10px; font-weight: 700; }
button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.app-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 48px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1, h2, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; } h2 { margin-bottom: 8px; font-size: 1.35rem; letter-spacing: -0.02em; }
.eyebrow { margin-bottom: 5px; color: var(--teal-dark); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #eab308; } .status.ready .status-dot { background: #16a34a; } .status.error .status-dot { background: #dc2626; }
.lesson-card, .task-card, .panel { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 7px 20px rgb(28 49 76 / 5%); }
.lesson-card { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 18px; padding: 22px; margin-bottom: 20px; }
.lesson-card p { margin-bottom: 0; color: var(--muted); } .lesson-number { padding: 5px 9px; border-radius: 7px; background: var(--yellow); color: #854d0e; font-size: .85rem; font-weight: 800; }
code { padding: .1em .3em; border-radius: 4px; background: #eaf2f6; color: #0f5260; font-family: var(--mono); font-size: .92em; }
details { max-width: 250px; color: var(--muted); font-size: .92rem; } summary { cursor: pointer; color: var(--teal-dark); font-weight: 700; } details p { margin-top: 10px; }
.workbench { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.panel { overflow: hidden; } .panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border); color: #34455d; font-weight: 800; }
.file-label { color: var(--muted); font-family: var(--mono); font-size: .82rem; font-weight: 400; }.editor-wrap { display: grid; grid-template-columns: 48px 1fr; min-height: 360px; background: var(--code); }
#line-numbers { padding: 18px 10px 18px 0; border-right: 1px solid #263e58; color: #6f8ba8; font-family: var(--mono); font-size: 15px; line-height: 1.6; text-align: right; white-space: pre; user-select: none; overflow: hidden; }
textarea { width: 100%; min-height: 360px; padding: 18px; border: 0; resize: vertical; outline: 0; background: var(--code); color: #f8fafc; font-family: var(--mono); font-size: 15px; line-height: 1.6; tab-size: 4; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); }.run-button { border: 1px solid var(--teal-dark); background: var(--teal); color: white; padding: 0 16px; }.run-button:hover { background: var(--teal-dark); }.run-button:disabled { cursor: wait; opacity: .65; }.secondary-button, .clear-button { border: 1px solid var(--border); background: white; color: #3b4c63; padding: 0 12px; }.secondary-button:hover, .clear-button:hover { background: #eef5f6; }.clear-button { min-height: 34px; font-size: .82rem; font-weight: 600; }
#output { min-height: 420px; margin: 0; padding: 18px; overflow: auto; background: #172033; color: #d9e6f4; font-family: var(--mono); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }.output-error { color: #fecaca; }.output-ok { color: #bbf7d0; }
.task-card { display: grid; grid-template-columns: .8fr 1.2fr; column-gap: 38px; margin-top: 20px; padding: 24px; }.task-card h2 { margin-bottom: 0; }.task-card ol { margin: 2px 0 12px; padding-left: 22px; }.task-card li + li { margin-top: 5px; }.small-note { grid-column: 2; margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .app-shell { width: min(100% - 24px, 620px); padding-top: 22px; }.topbar, .lesson-card, .task-card { display: block; }.status { margin-top: 14px; }.lesson-number { display: inline-block; margin-bottom: 12px; } details { max-width: none; margin-top: 14px; }.workbench { grid-template-columns: 1fr; }.task-card ol { margin-top: 18px; }.small-note { margin-top: 12px; }.editor-wrap, textarea { min-height: 300px; } }
@media (prefers-reduced-motion: no-preference) { button { transition: background .15s ease, transform .15s ease; }.run-button:hover { transform: translateY(-1px); } }
