* { box-sizing: border-box; }
:root {
  --ink: #172033; --muted: #5c667a; --paper: #f5f7fb; --card: #fff;
  --line: #dce2ed; --brand: #174ea6; --brand2: #0b766e; --soft: #eaf1ff;
}
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; background: var(--paper); color: var(--ink); line-height: 1.6; }
.site-header { display: flex; gap: 16px; align-items: center; padding: 25px max(20px, calc((100vw - 1320px)/2)); color: white; background: linear-gradient(120deg, #102a56, #174ea6 65%, #0b766e); }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid #fff9; border-radius: 16px; font-weight: 900; font-size: 30px; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .14em; opacity: .8; font-weight: 800; }
h1 { margin: 2px 0; line-height: 1.2; font-size: clamp(25px, 3vw, 38px); }
.subtitle { margin: 4px 0 0; opacity: .9; }
.layout { max-width: 1320px; margin: 22px auto; padding: 0 18px; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.sidebar { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
input[type=search] { width: 100%; padding: 10px 12px; border: 1px solid #c9d2e2; border-radius: 9px; font: inherit; }
#topicNav { display: grid; gap: 5px; margin-top: 14px; }
.topic-link { border: 0; background: transparent; text-align: left; border-radius: 8px; padding: 9px 10px; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; }
.topic-link:hover, .topic-link.active { background: var(--soft); color: var(--brand); font-weight: 750; }
.sidebar-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
main { min-width: 0; }
.intro-card, .lesson-card, .corrections { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; box-shadow: 0 5px 20px #17203308; }
.intro-card { background: linear-gradient(120deg, #fff, #edf5ff); }
.intro-card h2 { margin: 9px 0; }
.pill { display: inline-block; border-radius: 999px; background: #dce9ff; color: #174ea6; padding: 4px 9px; font-size: 10px; letter-spacing: .1em; font-weight: 900; }
.lesson-heading { display: flex; gap: 12px; align-items: flex-start; }
.lesson-number { background: var(--brand); color: white; min-width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 900; }
h2 { font-size: clamp(20px, 2.4vw, 27px); line-height: 1.25; }
h3 { margin-bottom: 6px; font-size: 15px; }
.hindi { color: #34445d; border-left: 3px solid var(--brand2); padding-left: 12px; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
button { cursor: pointer; }
.run-btn, .copy-btn { border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 800; }
.run-btn { color: white; background: var(--brand2); }
.copy-btn { color: var(--brand); background: var(--soft); }
pre { overflow: auto; padding: 16px; border-radius: 11px; background: #111827; color: #e5edff; font-size: 13px; line-height: 1.55; }
.output { background: #f1f8f5; border: 1px solid #cbe7d8; border-radius: 10px; padding: 12px 14px; min-height: 48px; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.output-label { color: #126143; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; margin: 12px 0 5px; }
.note { background: #fff8e7; border-left: 3px solid #e7a62a; padding: 10px 12px; border-radius: 5px; font-size: 13px; }
.project-frame { width: 100%; min-height: 300px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.corrections li { margin: 8px 0; }
footer { color: var(--muted); text-align: center; font-size: 12px; padding: 16px; }
a { color: var(--brand); }
@media (max-width: 850px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; max-height: none; } #topicNav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }

.extra-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.extra-card { padding:18px; border:1px solid #dce2ed; border-radius:14px; background:white; }
.extra-card h2 { font-size:18px; margin:0 0 8px; }
.extra-card p { color:#5c667a; font-size:14px; }
.extra-card a { font-weight:800; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.field { display:flex; flex-direction:column; gap:5px; }
.field label { font-weight:700; font-size:13px; }
.field input, .field select, .field textarea { width:100%; border:1px solid #c9d2e2; padding:10px 11px; border-radius:8px; font:inherit; background:#fff; }
fieldset { border:1px solid #dce2ed; border-radius:10px; padding:14px; margin:16px 0; }
legend { font-weight:800; padding:0 6px; }
.actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.primary { background:#174ea6; color:white; border:0; border-radius:8px; padding:10px 14px; font-weight:800; }
.secondary { background:#eaf1ff; color:#174ea6; border:0; border-radius:8px; padding:10px 14px; font-weight:800; }
.result-box { margin-top:16px; padding:14px; background:#eff9f4; border:1px solid #cbe7d8; border-radius:10px; white-space:pre-wrap; }
.notice { background:#fff8e7; border-left:4px solid #e7a62a; padding:12px 14px; border-radius:6px; }
.backlink { display:inline-block; margin:16px 0; }
