:root {
  --navy: #0B1F3A;
  --navy-2: #13294B;
  --orange: #FF6B2C;
  --orange-soft: #FFE8D6;
  --green: #1F9D55;
  --green-soft: #E3F6EB;
  --red: #D9480F;
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --text: #1B2433;
  --muted: #5B6678;
  --line: #E3E0DA;
  --code-bg: #F3EFE8;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--navy-2); }
code, .mono { font-family: Consolas, "SF Mono", Menlo, monospace; }
code { background: var(--code-bg); color: #B3360B; padding: 1px 6px; border-radius: 4px; }

.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
.topbar a { color: #fff; text-decoration: none; }
.brand { font-weight: 800; letter-spacing: .2px; }
.brand span { color: var(--orange); }
.topbar .spacer { flex: 1; }
.pill { background: rgba(255,255,255,.12); border-radius: 999px; padding: 3px 12px; font-size: 14px; white-space: nowrap; }

.btn { display: inline-block; border: 0; border-radius: 10px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: 6px 14px; font-size: 14px; }

/* landing */
.hero { max-width: 880px; margin: 0 auto; padding: 64px 20px 24px; }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 0 0 16px; color: var(--navy); }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; }
.checks { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.checks li::before { content: "✓ "; color: var(--green); font-weight: 800; }
.section { max-width: 880px; margin: 0 auto; padding: 8px 20px 48px; }
.section h2 { color: var(--navy); }
.footer { text-align: center; color: var(--muted); font-size: 14px; padding: 24px; }

/* lessons list */
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; min-width: 150px; }
.stat b { display: block; font-size: 26px; color: var(--navy); }
.stat small { color: var(--muted); }
.group-title { margin: 28px 0 10px; color: var(--navy); }
.lesson-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; text-decoration: none; color: var(--text); }
.lesson-row:hover { border-color: var(--orange); }
.lesson-row .num { width: 32px; height: 32px; border-radius: 50%; background: var(--code-bg); display: grid; place-items: center; font-weight: 700; flex: none; }
.lesson-row.done .num { background: var(--green); color: #fff; }
.lesson-row.practice .num { background: var(--orange); color: #fff; }
.lesson-row .title { flex: 1; font-weight: 600; }
.tag { font-size: 12px; font-weight: 800; letter-spacing: .5px; border-radius: 6px; padding: 2px 8px; }
.tag-free { background: var(--green-soft); color: var(--green); }
.tag-lock { background: var(--orange-soft); color: #B3360B; }
.tag-soon { background: var(--code-bg); color: var(--muted); }
.lesson-row.soon { opacity: .6; pointer-events: none; }
.unlock-box { background: var(--card); border: 2px dashed var(--orange); border-radius: 14px; padding: 18px 20px; margin: 8px 0 20px; }
.unlock-box input { font: inherit; padding: 9px 12px; border: 2px solid var(--line); border-radius: 8px; width: 200px; text-transform: uppercase; }
.msg-ok { color: var(--green); font-weight: 700; }
.msg-err { color: var(--red); font-weight: 700; }

/* practice */
.practice { display: grid; grid-template-columns: 240px 1fr; gap: 20px; max-width: 1280px; margin: 0 auto; padding: 18px 20px 120px; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; align-self: start; position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.side a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 14px; }
.side a.active { background: var(--orange-soft); font-weight: 700; }
.side a:has(.lnum) { padding-left: 42px; text-indent: -32px; }
.side .lnum { display: inline-block; width: 32px; text-indent: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.side a.done::after { content: " ✓"; color: var(--green); font-weight: 800; }
.side a.practice::after { content: " !"; color: var(--orange); font-weight: 800; }
.side a.locked { color: var(--muted); }
.side a.locked::after { content: " 🔒"; }
.main h1 { margin: 0 0 6px; color: var(--navy); font-size: 28px; }
.progress { height: 10px; background: #E9E5DE; border-radius: 6px; overflow: hidden; margin: 6px 0 16px; }
.progress div { height: 100%; width: 0; background: var(--green); transition: width .3s; }
.card { background: var(--card); border: 1px solid #1B2433; border-radius: 12px; padding: 18px 22px; }
.card .text { font-size: 18px; }
.card .task { font-size: 19px; font-weight: 700; margin-top: 12px; }
.sheet { height: 440px; margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sql-editor { width: 100%; min-height: 110px; margin-top: 16px; padding: 12px; font: 16px/1.5 Consolas, Menlo, monospace; border: 2px solid #1B2433; border-radius: 10px; resize: vertical; }
.sql-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.sql-actions small { color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.table-wrap h4 { margin: 10px 0 6px; color: var(--muted); font-size: 13px; letter-spacing: .5px; text-transform: uppercase; }
table.data { border-collapse: collapse; font-size: 14px; min-width: 50%; }
table.data th { background: #4A5568; color: #fff; padding: 6px 12px; text-align: left; }
table.data td { border-bottom: 1px solid var(--line); padding: 6px 12px; }
.sql-error { color: var(--red); font-family: Consolas, monospace; margin-top: 10px; }

.ai-quote { margin: 12px 0 0; padding: 10px 14px; background: var(--code-bg); border-left: 4px solid var(--orange); border-radius: 6px; }
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.choice { text-align: left; font-weight: 600; }
.choice:disabled { cursor: default; }
.choice-right { background: var(--green-soft); border-color: var(--green); }
.choice-wrong { background: var(--orange-soft); border-color: var(--orange); opacity: .75; }
#choiceOut .hint { margin: 14px 0 0; }

.bottombar { position: fixed; left: 0; right: 0; bottom: 0; background: #ECE8E1; display: flex; align-items: center; gap: 20px; padding: 14px 28px; min-height: 76px; z-index: 50; }
.bottombar.correct { background: var(--navy); }
.bottombar .verdict { font-size: 24px; font-weight: 800; color: #3DDC84; display: none; }
.bottombar.correct .verdict { display: block; }
.bottombar .pts { color: #3DDC84; font-weight: 700; margin-left: 8px; font-size: 18px; }
.bottombar .spacer { flex: 1; }
.bottombar .hint-enter { color: #9AA6B8; font-size: 12px; display: block; text-align: center; }
#continueBtn[style*="none"] + .hint-enter { display: none; }

.wrong-panel { position: fixed; top: 0; right: 0; width: 320px; height: 100vh; background: var(--card); border-left: 1px solid var(--line); box-shadow: -6px 0 24px rgba(0,0,0,.08); display: none; z-index: 60; }
.wrong-panel.open { display: block; }
.wrong-head { background: var(--orange); color: #fff; padding: 14px 18px; display: flex; align-items: center; }
.wrong-head b { font-size: 20px; flex: 1; }
.wrong-head button { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
.wrong-body { padding: 18px; }
.hint { background: var(--code-bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.answer { margin-top: 10px; display: none; }
.answer.open { display: block; }
.ai-box { margin-top: 16px; border-top: 1px solid var(--line, #E3E8EF); padding-top: 12px; }
.ai-box h5 { margin: 0 0 8px; font-size: 13px; }
.ai-box p { background: var(--code-bg); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.ai-box small { color: #7A8799; font-size: 11px; display: block; }
.ai-rate { display: flex; gap: 8px; margin-bottom: 8px; }
.ai-rate button { background: none; border: 0; color: #7A8799; cursor: pointer; font-size: 12px; padding: 2px 4px; }
.ai-rate button:hover { color: inherit; text-decoration: underline; }

.overlay { position: fixed; inset: 0; background: rgba(11,31,58,.75); display: none; place-items: center; z-index: 100; padding: 20px; }
.overlay.open { display: grid; }
.modal { background: var(--card); border-radius: 16px; max-width: 520px; padding: 28px; }
.modal h2 { margin-top: 0; color: var(--navy); }
.modal .or { color: var(--muted); text-align: center; margin: 14px 0; }

.mobile-note { display: none; background: var(--orange-soft); padding: 12px 20px; text-align: center; }
@media (max-width: 860px) {
  .mobile-note { display: block; }
  .practice { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .hero h1 { font-size: 34px; }
  .wrong-panel { width: 100%; height: auto; top: auto; bottom: 76px; }
}

/* v2: navigation, dashboard, rails, auth, premium, certificate */
.topbar { flex-wrap: wrap; }
.track-switch { display: flex; background: rgba(255,255,255,.1); border-radius: 8px; padding: 2px; }
.track-switch a { padding: 3px 14px; border-radius: 6px; font-size: 14px; }
.track-switch a.on { background: var(--orange); font-weight: 700; }
.who { color: #C9D3E2; font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.wide { display: block; width: 100%; text-align: center; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 10px; color: var(--navy); font-size: 16px; }
.dash { display: grid; grid-template-columns: 1fr 320px; gap: 22px; max-width: 1180px; margin: 0 auto; padding: 24px 20px 50px; align-items: start; }
.hero-panel h1 { margin: 0 0 6px; color: var(--navy); }
.total { font-size: 18px; margin-bottom: 8px; }
.stack { display: flex; height: 14px; background: #E9E5DE; border-radius: 8px; overflow: hidden; }
.stack i.good { background: var(--navy-2); } .stack i.stale { background: #E0A100; } .stack i.low { background: var(--red); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.legend .good::before { background: var(--navy-2); } .legend .stale::before { background: #E0A100; } .legend .low::before { background: var(--red); }
.note { margin: 10px 0 0; font-size: 14px; }
.sec { color: var(--navy); margin: 26px 0 10px; font-size: 19px; }
.proj-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.proj { position: relative; display: block; background: var(--navy); color: #fff; border-radius: 12px; padding: 14px 16px; text-decoration: none; }
.proj small { display: block; color: #C9D3E2; margin-top: 4px; padding-right: 70px; }
.proj .tag { position: absolute; right: 10px; bottom: 10px; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 0 14px; }
.group summary { display: flex; align-items: center; gap: 12px; padding: 13px 0; cursor: pointer; list-style: none; }
.group summary b { flex: 1; color: var(--navy); }
.group .count { color: var(--muted); font-size: 13px; }
.mini { width: 90px; height: 6px; background: #E9E5DE; border-radius: 4px; overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--navy-2); }
.group .lesson-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; padding: 9px 2px; background: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.lesson-row.done .dot { background: var(--navy-2); border-color: var(--navy-2); }
.lesson-row.stale .dot { background: #E0A100; border-color: #E0A100; }
.lesson-row.low .dot { background: var(--red); border-color: var(--red); }
.reset { font-size: 13px; text-align: right; } .reset a { color: var(--muted); }
.board { list-style: none; counter-reset: b; margin: 0; padding: 0; font-size: 14px; }
.board li { display: flex; justify-content: space-between; padding: 3px 0; counter-increment: b; }
.board li span::before { content: counter(b) ". "; color: var(--muted); }
.mine { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin: 8px 0 0; padding-top: 8px; font-size: 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-bottom: 6px; }
.bars span { flex: 1; height: 100%; background: #F1EDE6; border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.bars i { display: block; width: 100%; background: var(--orange); }
.practice { grid-template-columns: 240px minmax(0, 1fr) 250px; max-width: 1500px; }
.side h5 { margin: 10px 10px 4px; color: var(--muted); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; }
.side a.low::after { content: " !"; color: var(--red); font-weight: 800; }
.side a.stale::after { content: " ↻"; color: #E0A100; font-weight: 800; }
.rail { align-self: start; }
.keybox { text-align: center; padding: 24px; margin-top: 16px; border: 2px dashed var(--line); border-radius: 12px; outline: none; }
.pressed { font: 700 26px Consolas, monospace; color: var(--navy); }
.pivot-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 16px; }
.pivot-fields label { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; gap: 4px; }
.pivot-fields select { font: inherit; padding: 8px; border: 2px solid var(--line); border-radius: 8px; }
.cta { background: var(--orange-soft); border-radius: 10px; padding: 14px; margin: 12px 0; }
.cta .btn { margin-top: 8px; }
.auth { max-width: 400px; margin: 40px auto; padding: 0 20px; }
.auth h1 { color: var(--navy); margin-bottom: 6px; }
.auth form label { display: block; font-weight: 600; margin: 14px 0; font-size: 14px; }
.auth form small { color: var(--muted); font-weight: 400; }
.auth input { display: block; width: 100%; font: inherit; padding: 10px 12px; margin-top: 4px; border: 2px solid var(--line); border-radius: 8px; }
#google { margin: 14px 0; }
input#code, input#certName, input#q { font: inherit; padding: 8px 12px; border: 2px solid var(--line); border-radius: 8px; }
.premium h1 { color: var(--navy); margin-bottom: 4px; }
.premium .lead { color: var(--muted); font-size: 18px; margin-top: 0; }
.pay-only { display: none !important; }
.payments-on .pay-only { display: revert !important; }
.notice { background: var(--orange-soft); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.two-ways { display: grid; grid-template-columns: minmax(0, 560px); gap: 16px; }
.payments-on .two-ways { grid-template-columns: 1.3fr 1fr; }
.two-ways h2 { margin: 0 0 12px; color: var(--navy); font-size: 19px; }
.plans { display: grid; gap: 8px; margin-bottom: 12px; }
.plan { display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; align-items: center; position: relative; border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.plan input { grid-row: span 2; }
.plan big { font-size: 20px; font-weight: 800; color: var(--navy); grid-row: span 2; grid-column: 3; grid-row-start: 1; }
.plan small { color: var(--muted); }
.plan:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.flag { position: absolute; top: -10px; left: 12px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 8px; }
.faq { border-top: 1px solid var(--line); padding: 10px 0; } .faq summary { cursor: pointer; font-weight: 600; }
.certificate { background: #fff; border: 8px double var(--navy); padding: 40px; text-align: center; margin: 16px 0; }
.certificate h1 { font-size: 38px; color: var(--navy); margin: 12px 0; } .certificate h2 { margin: 6px 0; color: var(--orange); }
@media print { .no-print, .topbar { display: none; } }
@media (max-width: 1100px) { .practice { grid-template-columns: 200px minmax(0, 1fr); } .practice .rail { display: none; } .dash, .two-ways { grid-template-columns: 1fr; } }

.downloads { margin-top: 10px; }
.chart { font-size: 15px; font-weight: 400; margin: 6px 0 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.bar-row span { width: 60px; }
.bar-row i { display: block; height: 18px; background: var(--orange); border-radius: 4px; }
.longread { line-height: 1.7; }
.longread p code { overflow-wrap: anywhere; } /* long formulas wrap on phones instead of widening the page */
.longread h1 { color: var(--navy); line-height: 1.2; font-size: 34px; }
.longread .lead { color: var(--muted); font-size: 18px; }
.longread h2 { margin-top: 32px; }
.longread h3 { color: var(--navy); margin-bottom: 4px; }
.code { background: var(--code-bg); padding: 12px 14px; border-radius: 8px; overflow-x: auto; font: 14px/1.5 Consolas, Menlo, monospace; }
.yt-video { max-width: 640px; margin: 20px 0 8px; }
.yt { display: block; position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--navy); cursor: pointer; }
.yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: var(--orange); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: transform .15s; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-play, .yt:focus-visible .yt-play { transform: scale(1.08); }
.yt:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.yt-video figcaption { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 8px; }

/* Phone layout (16. 11. 2026): one column; the lesson list folds behind a button. Must stay last so it beats the 1100px rule. */
.side-toggle { display: none; }
@media (max-width: 860px) {
  .topbar { gap: 6px 14px; padding: 8px 14px; font-size: 15px; }
  .practice { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 14px 130px; }
  .practice .rail { display: none; }
  .side-toggle { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; }
  .side { display: none; position: static; max-height: 55vh; overflow: auto; }
  .side.open { display: block; }
  .main h1 { font-size: 24px; }
  .card { padding: 14px 16px; }
  .card .text { font-size: 17px; }
  .card .task { font-size: 17px; }
  .sheet { height: 380px; }
  .bottombar { gap: 12px; padding: 10px 14px; min-height: 64px; }
  .bottombar .verdict { font-size: 20px; }
  .wrong-panel { bottom: 64px; max-height: 60vh; overflow: auto; }
}

/* PDF guide page (interview-guide.html): waiting list form and sample pages */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notify form { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.notify form .btn { margin-top: 0; }
.notify form[hidden] { display: none; }
.notify input[type=email] { flex: 1 1 220px; min-width: 0; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 8px; background: #fff; }
.notify .msg-err:empty, .notify .msg-ok:empty { display: none; }
.guide-samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 14px 0 8px; }
.guide-samples img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(11, 31, 58, .12); }
