/* Aral Code — one stylesheet, no frameworks */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --text: #1d2321;
  --muted: #5b6662;
  --line: #e3e0d6;
  --brand: #0f5c4d;
  --brand-2: #127a65;
  --brand-soft: #e3f1ec;
  --accent: #f2b33d;
  --accent-soft: #fdf3dc;
  --danger: #b4372b;
  --danger-soft: #fbe9e6;
  --ok: #1d7a43;
  --ok-soft: #e4f4e9;
  --code-bg: #1e2421;
  --code-text: #e8ece9;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.05);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121615; --surface: #191e1c; --text: #e6ebe8; --muted: #a2aea9;
    --line: #2c3431; --brand: #5cc7a8; --brand-2: #7ad6bb; --brand-soft: #1a2f29; --accent: #f2b33d;
    --accent-soft: #2e2817; --danger: #f08a7e; --danger-soft: #33201d; --ok: #6fd295; --ok-soft: #18291f;
    --code-bg: #0c0f0e; --surface-2: #1f2523; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #121615; --surface: #191e1c; --surface-2: #1f2523; --text: #e6ebe8; --muted: #a2aea9;
  --line: #2c3431; --brand: #5cc7a8; --brand-2: #7ad6bb; --brand-soft: #1a2f29; --accent: #f2b33d;
  --accent-soft: #2e2817; --danger: #f08a7e; --danger-soft: #33201d; --ok: #6fd295; --ok-soft: #18291f;
  --code-bg: #0c0f0e; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--font); }
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--brand); color: #fff; }
:root[data-theme='dark'] .topbar { background: #0d211c; border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .topbar { background: #0d211c; border-bottom: 1px solid var(--line); } }
.topbar-in { height: var(--top); max-width: 1400px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand-mark { display: inline-grid; place-items: center; background: var(--accent); color: #1d2321; font: 800 0.8rem/1 var(--mono); border-radius: 8px; padding: 7px 6px; }
.topnav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topnav a { color: #e4f3ee; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; white-space: nowrap; }
.topnav a:hover { background: rgb(255 255 255 / 0.12); color: #fff; }
.theme-btn, .menu-btn { background: transparent; border: 1px solid rgb(255 255 255 / 0.3); color: #fff; border-radius: 8px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; flex: none; }
.menu-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }

/* ---------- shell ---------- */
.shell { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.has-sidebar .shell { grid-template-columns: 270px minmax(0, 1fr); }
@media (min-width: 1240px) { .has-sidebar .shell { grid-template-columns: 270px minmax(0, 1fr) 300px; } }
.main { padding: 28px 20px 60px; min-width: 0; }
.has-sidebar .main { padding: 28px 40px 60px; }
.main > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.shell-wide .main > * { max-width: 1300px; }
.rail { display: none; }
@media (min-width: 1240px) { .rail { display: block; padding: 28px 16px 0 0; } .ad-rail { position: sticky; top: calc(var(--top) + 20px); } }

/* ---------- sidebar ---------- */
.sidebar { border-right: 1px solid var(--line); background: var(--surface); }
.side-in { position: sticky; top: var(--top); max-height: calc(100vh - var(--top)); overflow-y: auto; padding: 18px 12px 40px; overscroll-behavior: contain; }
.side-title { margin: 0 8px 10px; font-weight: 800; font-size: 1.05rem; }
.side-title a { color: var(--text); text-decoration: none; }
.side-progress { margin: 0 8px 14px; font-size: 0.82rem; color: var(--muted); }
.side-progress p { margin: 4px 0 0; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; transition: width 0.3s; }
.side-group { margin: 16px 8px 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.94rem; line-height: 1.35; }
.sidebar li a:hover { background: var(--surface-2); }
.sidebar li a[aria-current='page'] { background: var(--brand); color: #fff; font-weight: 600; }
:root[data-theme='dark'] .sidebar li a[aria-current='page'] { color: #0c1714; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .sidebar li a[aria-current='page'] { color: #0c1714; } }
.sidebar li a.done::after { content: '✓'; margin-left: auto; color: var(--ok); font-weight: 800; }
.sidebar li a.done[aria-current='page']::after { color: inherit; }

@media (max-width: 900px) {
  .has-sidebar .shell { grid-template-columns: minmax(0, 1fr); }
  .has-sidebar .main { padding: 22px 18px 50px; }
  .menu-btn { display: flex; }
  .sidebar { position: fixed; inset: var(--top) auto 0 0; width: min(320px, 86vw); z-index: 35; transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .side-in { max-height: none; height: 100%; }
  .scrim { position: fixed; inset: var(--top) 0 0 0; background: rgb(0 0 0 / 0.35); z-index: 30; }
  .topnav a:not(:first-child) { display: none; }
}
@media (max-width: 420px) { .topnav { display: none; } .theme-btn { margin-left: auto; } }

/* ---------- lesson ---------- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 3px; }
.kicker { margin: 0; color: var(--brand-2); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.15; margin: 4px 0 18px; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2em 0 0.5em; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; }
.prose p, .prose li { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.25em 0; }
code { font: 0.88em var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 0.08em 0.38em; border-radius: 6px; word-break: break-word; }
kbd { font: 0.85em var(--mono); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: 0 6px; background: var(--surface); }
.prose table:not(.plain) { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose table:not(.plain) th, .prose table:not(.plain) td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose table:not(.plain) th { background: var(--surface-2); }
.prose table:not(.plain) td:first-child code { white-space: nowrap; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 34px 0 8px; }
.pager a { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); line-height: 1.3; }
.pager a:hover { border-color: var(--brand-2); }
.pager small { color: var(--brand-2); font-weight: 700; font-size: 0.8rem; }
.pager span { font-weight: 600; }
.pager-next { text-align: right; grid-column: 2; }
.pager-top { margin: 0 0 26px; }
.pager-top a { padding: 7px 14px; flex-direction: row; gap: 6px; align-items: center; justify-content: center; }
.pager-top a span { display: none; }
.pager-top small { font-size: 0.9rem; }
.pager-top { display: flex; justify-content: space-between; }
.updated { color: var(--muted); font-size: 0.85rem; margin-top: 24px; }
.done-row { margin: 34px 0 0; padding: 14px 16px; background: var(--ok-soft); border-radius: var(--radius); }
.done-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.done-check input { width: 20px; height: 20px; accent-color: var(--ok); }

/* ---------- callouts ---------- */
.box { border-radius: var(--radius); padding: 14px 18px; margin: 1.5em 0; border-left: 5px solid; }
.box > :last-child { margin-bottom: 0; }
.box p { margin: 0.4em 0; }
.box-label { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 4px !important; }
.box-tl { background: var(--accent-soft); border-color: var(--accent); }
.box-tl .box-label::before { content: '🇵🇭 '; }
.box-note { background: var(--brand-soft); border-color: var(--brand-2); }
.box-tip { background: var(--ok-soft); border-color: var(--ok); }
.box-warn { background: var(--danger-soft); border-color: var(--danger); }

/* ---------- code ---------- */
pre.code { margin: 0; background: var(--code-bg); color: var(--code-text); padding: 16px 18px; overflow-x: auto; font: 0.9rem/1.6 var(--mono); tab-size: 2; }
pre.code code { background: none; border: 0; padding: 0; font: inherit; color: inherit; word-break: normal; }
.code-static { border-radius: var(--radius); margin: 1.2em 0 !important; }
.t-tag { color: #7fd1b9; }
.t-attr { color: #f2c46d; }
.t-str { color: #f29b85; }
.t-punc { color: #8e9b96; }
.t-com { color: #7b8a84; font-style: italic; }
.t-ent { color: #c9a4f5; }
.t-inner { color: #c8d3ce; }

.example { margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.example figcaption { padding: 10px 16px; font-weight: 600; font-size: 0.93rem; border-bottom: 1px solid var(--line); }
.ex-label { display: inline-block; background: var(--brand); color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
:root[data-theme='dark'] .ex-label { color: #0c1714; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .ex-label { color: #0c1714; } }
.ex-actions { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.ex-status { font-size: 0.8rem; color: var(--muted); margin-left: auto; }

.btn { font: 600 0.92rem/1 var(--font); background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 9px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--brand-2); color: #fff; }
:root[data-theme='dark'] .btn { color: #0c1714; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn { color: #0c1714; } }
.btn-ghost { background: transparent; color: var(--text) !important; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-big { padding: 14px 22px; font-size: 1.02rem; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #1d2321 !important; }
.btn-accent:hover { background: #f5c25f; }

/* editor */
.editor { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 1100px) { .editor.side { grid-template-columns: 1fr 1fr; } }
.editor-pane { display: flex; flex-direction: column; min-width: 0; }
.pane-label { font: 700 0.72rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.editor textarea { width: 100%; min-height: 220px; resize: vertical; border: 0; margin: 0; padding: 14px 16px; background: var(--code-bg); color: var(--code-text); font: 0.92rem/1.6 var(--mono); tab-size: 2; outline: none; white-space: pre; overflow: auto; }
.editor textarea:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.editor iframe { width: 100%; height: 260px; border: 0; background: #fff; display: block; }
.editor.side .editor-pane + .editor-pane { border-left: 1px solid var(--line); }

/* quiz */
.quiz { margin: 3em 0 0; padding: 22px 22px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.quiz h2 { margin-top: 0; }
.quiz-intro { color: var(--muted); margin-top: 0; }
.q { border: 0; padding: 0; margin: 0 0 20px; }
.q legend { font-weight: 650; margin-bottom: 8px; padding: 0; }
.q-num { color: var(--brand-2); }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg); }
.opt:hover { border-color: var(--brand-2); }
.opt input { margin-top: 0.4em; accent-color: var(--brand); flex: none; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.q-why { font-size: 0.93rem; margin: 6px 2px 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.quiz-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 0 14px; }
.quiz-score { margin: 0; font-weight: 700; }

/* ---------- ads ---------- */
.ad { margin: 2em 0; text-align: center; }
.ad-label { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 4px; }

/* ---------- pages ---------- */
.page h1 { margin-top: 8px; }
.hero { text-align: left; padding: 36px 0 10px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.3rem); max-width: 18ch; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 1.5em 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-2); margin-bottom: 8px; }
.card .tag.soon { background: var(--surface-2); color: var(--muted); }
a.card { text-decoration: none; color: var(--text); display: block; }
a.card:hover { border-color: var(--brand-2); }
.course-group h2 { font-size: 1.15rem; color: var(--brand-2); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2em; }
.lesson-list { padding-left: 0; list-style: none; counter-reset: none; margin: 0; display: grid; gap: 8px; }
.lesson-list a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--text); }
.lesson-list a:hover { border-color: var(--brand-2); }
.lesson-list strong { display: block; }
.lesson-list span { color: var(--muted); font-size: 0.92rem; }
.lesson-list a.done strong::after { content: ' ✓'; color: var(--ok); }
.todo { color: var(--danger); }
.tag-filter { width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); margin: 8px 0 4px; }

/* playground */
.playground .editor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; grid-template-columns: 1fr; }
@media (min-width: 900px) { .playground .editor { grid-template-columns: 1fr 1fr; } .playground .editor-pane + .editor-pane { border-left: 1px solid var(--line); } }
.playground .editor textarea { min-height: 60vh; }
.playground .editor iframe { height: 100%; min-height: 60vh; }
.pg-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; align-items: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; font-size: 0.93rem; color: var(--muted); }
.footer-in { max-width: 1200px; margin: 0 auto; padding: 30px 20px 10px; display: flex; flex-wrap: wrap; gap: 24px 60px; justify-content: space-between; }
.footer-in > div { max-width: 380px; }
.brand-foot { color: var(--text); margin: 0 0 6px; }
.footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 32px; align-content: start; }
.footer nav a { color: var(--muted); }
.copy { text-align: center; padding: 10px 20px 26px; margin: 0; font-size: 0.85rem; }

@media print { .topbar, .sidebar, .rail, .pager, .ad, .footer, .ex-actions, .done-row { display: none !important; } .has-sidebar .shell { display: block; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =========================================================
   Design layer v2 — warmer, friendlier look
   ========================================================= */
@font-face {
  font-family: 'Jakarta';
  src: url('../fonts/jakarta.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
:root { --display: 'Jakarta', var(--font); --ph-blue: #0038a8; --ph-red: #ce1126; --ph-yellow: #fcd116; }
h1, h2, h3, .brand, .btn, .pager span, .side-title, .kicker, .eyebrow, .card h3, .feature h3 { font-family: var(--display); }
h1 { font-weight: 800; letter-spacing: -0.025em; }
h2 { font-weight: 750; }

/* flag stripe under the top bar */
.flag-stripe { display: flex; height: 4px; }
.flag-stripe i { flex: 1; }
.flag-stripe i:nth-child(1) { background: var(--ph-blue); }
.flag-stripe i:nth-child(2) { background: var(--ph-red); }
.flag-stripe i:nth-child(3) { background: var(--ph-yellow); }
.topbar { box-shadow: 0 2px 12px rgb(0 0 0 / 0.12); }
.topbar-in { height: calc(var(--top) - 4px); }
.topnav a { font-weight: 600; }

/* sidebar numbers */
.sidebar li a .num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 0.72rem/1 var(--display); background: var(--surface-2); color: var(--muted); }
.sidebar li a[aria-current='page'] .num { background: rgb(255 255 255 / 0.22); color: inherit; }
.sidebar li a.done .num { background: var(--ok-soft); color: var(--ok); }
.sidebar li a.done::after { display: none; }
.sidebar li a.done .num { font-size: 0; }
.sidebar li a.done .num::before { content: '✓'; font-size: 0.8rem; }

/* lesson header */
.lesson-head { margin-bottom: 18px; }
.lesson-head .kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.chip { display: inline-block; background: var(--brand-soft); color: var(--brand-2); padding: 3px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; }
.lesson-desc { color: var(--muted); font-size: 1.08rem; margin: -6px 0 16px; max-width: 64ch; }
.course-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.course-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--accent)); }
.prose h2 { position: relative; padding-left: 16px; }
.prose h2::before { content: ''; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 5px; border-radius: 4px; background: var(--accent); }
.quiz h2::before { display: none; }
.quiz h2 { padding-left: 0; }
.quiz { border-top: 5px solid var(--accent); }
.pager a { transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.pager a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pager-next:not(.pager-top a) { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-next:not(.pager-top a) small { color: #ffe9b0; }
.pager:not(.pager-top) .pager-next { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager:not(.pager-top) .pager-next small { color: #ffe9b0; }
.example { border-radius: 14px; }
.btn-try { background: var(--accent); border-color: var(--accent); color: #1d2321 !important; }
.btn-try:hover { background: #f5c25f; }
.btn { border-radius: 10px; transition: transform 0.12s, background 0.15s; }
.btn:active { transform: translateY(1px); }

/* ---------- home ---------- */
.main > .page-home { max-width: 1160px; }
.page-home .hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  margin: 4px 0 20px; padding: 56px 48px; border-radius: 28px; color: #fff;
  background:
    radial-gradient(600px 300px at 90% -10%, rgb(242 179 61 / 0.35), transparent 70%),
    radial-gradient(500px 300px at -10% 110%, rgb(92 199 168 / 0.35), transparent 70%),
    linear-gradient(135deg, #0f5c4d, #0b3f35);
}
.page-home .hero::after { /* banig-style weave pattern */
  content: ''; position: absolute; inset: 0; opacity: 0.07; pointer-events: none;
  background-image: repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 14px), repeating-linear-gradient(-45deg, #fff 0 2px, transparent 2px 14px);
}
.hero-text { position: relative; z-index: 1; }
.page-home .hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 15ch; margin: 14px 0 16px; }
.hl { background: linear-gradient(transparent 62%, rgb(242 179 61 / 0.55) 62%); padding: 0 4px; border-radius: 4px; }
.page-home .hero .lead { color: #d9efe8; font-size: 1.12rem; max-width: 52ch; }
.pill { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 99px; background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.2); font-size: 0.88rem; font-weight: 600; }
.btn-glass { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.35); color: #fff !important; }
.btn-glass:hover { background: rgb(255 255 255 / 0.2); }
.hero-stats { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: #bfe0d6; font-size: 0.92rem; }
.hero-stats strong { display: block; color: #fff; font: 800 1.5rem/1.1 var(--display); }

.hero-art { position: relative; z-index: 1; min-height: 340px; }
.win { position: absolute; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px rgb(0 0 0 / 0.35); }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; font: 600 0.75rem/1 var(--font); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; } .win-bar i:nth-child(3) { background: #28c840; }
.win-bar span { margin-left: 8px; opacity: 0.7; }
.win-code { top: 0; left: 0; width: 88%; background: #161b19; color: #e8ece9; transform: rotate(-2deg); }
.win-code .win-bar { background: #20262400; background: #1f2523; color: #cfd8d4; }
.win-code pre { margin: 0; padding: 14px 16px 18px; font: 0.82rem/1.65 var(--mono); white-space: pre; overflow: hidden; }
.win-out { right: 0; bottom: 0; width: 62%; background: #fff; color: #1d2321; transform: rotate(2.5deg); }
.win-out .win-bar { background: #f1efe8; color: #555; }
.out { padding: 12px 16px 16px; font: 0.88rem/1.4 Georgia, serif; }
.out-h { font: 700 1.15rem/1.2 Georgia, serif; margin: 0 0 4px; }
.out-p { margin: 0 0 6px; }
.out ul { margin: 0 0 10px; padding-left: 20px; }
.out-btn { display: inline-block; font: 0.8rem system-ui; padding: 3px 10px; border: 1px solid #888; border-radius: 4px; background: #efefef; }

.band { margin: 64px 0 0; }
.eyebrow { margin: 0 0 4px; color: var(--brand-2); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.band > h2 { margin-top: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.band-lead { color: var(--muted); max-width: 60ch; margin-top: -4px; }

.course { position: relative; padding-top: 22px; transition: transform 0.15s, box-shadow 0.15s; }
a.course:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgb(0 0 0 / 0.1); }
.course-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font: 800 1rem/1 var(--mono); margin-bottom: 14px; color: #fff; }
.course-html .course-icon { background: linear-gradient(135deg, #e44d26, #f16529); }
.course-css .course-icon { background: linear-gradient(135deg, #2465f1, #3c9cd7); }
.course-js .course-icon { background: linear-gradient(135deg, #f0c419, #f7df1e); color: #222; }
.course .tag { position: absolute; top: 22px; right: 18px; margin: 0; }
.course h3 { font-size: 1.3rem; }
.course-css, .course-js { opacity: 0.85; }
.card-go { display: inline-block; margin-top: 12px; color: var(--brand-2); font-weight: 700; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.feature h3 { margin: 10px 0 6px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.f-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); font-size: 1.4rem; }

.roadmap { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; counter-reset: none; }
.roadmap a { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--text); height: 100%; transition: border-color 0.15s, transform 0.15s; }
.roadmap a:hover { border-color: var(--brand-2); transform: translateY(-2px); }
.rm-num { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font: 800 1rem/1 var(--display); }
:root[data-theme='dark'] .rm-num { color: #0c1714; }
.rm-body strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.rm-body small { color: var(--muted); font-size: 0.88rem; line-height: 1.45; display: block; margin-top: 2px; }

.steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 54px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.steps li::before { content: counter(step); position: absolute; top: 16px; left: 18px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #1d2321; font: 800 0.95rem/1 var(--display); }
.steps strong { display: block; font-family: var(--display); font-size: 1.08rem; }
.steps span { color: var(--muted); font-size: 0.95rem; }

.teachers { margin: 64px 0 0; padding: 32px 36px; border-radius: 24px; background: var(--accent-soft); border: 1px solid rgb(242 179 61 / 0.5); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.teachers > div { max-width: 640px; }
.teachers h2 { margin: 0 0 8px; }
.teachers p { margin: 0; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin: 10px 0; max-width: 820px; }
.faq summary { cursor: pointer; padding: 15px 0; font: 700 1.02rem/1.4 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--brand-2); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* course index list */
.lesson-list a { transition: border-color 0.15s, transform 0.15s; }
.lesson-list a:hover { transform: translateX(3px); }

/* footer */
.footer { background: #0b3f35; color: #bcd6ce; border-top: 0; }
.footer .brand-foot { color: #fff; }
.footer nav a { color: #d8ebe5; }
.footer .copy { color: #8fb3a8; border-top: 1px solid rgb(255 255 255 / 0.08); padding-top: 16px; }

@media (max-width: 900px) {
  .page-home .hero { grid-template-columns: 1fr; padding: 36px 24px 28px; border-radius: 22px; }
  .hero-art { min-height: 300px; max-width: 460px; }
}
@media (max-width: 520px) {
  .hero-art { min-height: 270px; }
  .win-code pre { font-size: 0.72rem; }
  .win-out { width: 70%; }
  .teachers { padding: 24px 20px; }
  .band { margin-top: 48px; }
}
.hl { background: none; padding: 0; color: var(--accent); }
@media (max-width: 520px) {
  .pill { font-size: 0.78rem; padding: 5px 12px; }
  .page-home .hero .lead { font-size: 1.02rem; }
  .hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 0.75rem; }
  .hero-stats strong { font-size: 1.2rem; }
  .cta .btn-big { width: 100%; justify-content: center; }
}
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Multi-course layer ---------- */
.coursebar { background: #1b2421; border-bottom: 1px solid #2b3632; }
.coursebar-in { max-width: 1400px; margin: 0 auto; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 8px; }
.coursebar-in::-webkit-scrollbar { display: none; }
.coursebar a { flex: none; color: #dfe7e3; text-decoration: none; font-size: 0.84rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 11px 16px; border-bottom: 3px solid transparent; white-space: nowrap; }
.coursebar a:hover { background: rgb(255 255 255 / 0.07); color: #fff; }
.coursebar a[aria-current] { color: #fff; border-bottom-color: var(--accent); background: rgb(255 255 255 / 0.05); }
.coursebar .cb-more { color: var(--accent); text-transform: none; letter-spacing: 0; margin-left: auto; }
.has-sidebar .side-in { top: var(--top); }

.card.course[style*='--c'] .course-icon { background: var(--c); color: #fff; }
.card.course[style*='--c'] { border-top: 4px solid var(--c); }
.card.course.is-soon { opacity: 0.78; }
.card.course.is-soon .course-icon { filter: saturate(0.7); }
.cards-courses { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.t-sel { color: #f2c46d; }
.t-prop { color: #7fd1b9; }
.t-num { color: #c9a4f5; }
.t-kw { color: #f29bd2; }

/* ===== Program output + SQL runner ===== */
.code-out { margin: 0 0 1.2em; border-radius: var(--radius); background: #0b0f0e; border: 1px solid #26302c; overflow: hidden; }
.code-out .out-label { margin: 0; padding: 6px 14px; font: 600 0.72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8fd3b5; background: #121816; border-bottom: 1px solid #26302c; }
.code-out pre { margin: 0; padding: 12px 16px; color: #d8e6df; font: 0.88rem/1.55 var(--mono); overflow-x: auto; white-space: pre; }
.code-static:has(+ .code-out) { margin-bottom: 0 !important; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.code-static:has(+ .code-out) + .code-out { margin-top: 0 !important; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.code-out .out-label, .code-out pre { max-width: none; }

/* ===== Spreadsheet-style tables (Excel course) ===== */
table.xl { border-collapse: collapse; font: 0.88rem/1.4 var(--mono); margin: 1em 0; background: var(--surface); }
table.xl th, table.xl td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; white-space: nowrap; }
table.xl thead th, table.xl tbody th { background: var(--brand-soft); color: var(--muted); font-weight: 600; text-align: center; min-width: 2.2em; }
table.xl td.n { text-align: right; }
table.xl td.f { color: var(--brand-2); }
table.xl td.hl { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.xl-wrap { overflow-x: auto; }
