/* CodeStreak — clean, confident, a little bit Gen Z. Light + dark. */
:root {
  --bg: #f7f6f2;
  --bg-2: #efede6;
  --panel: #ffffff;
  --panel-2: #f8f7f4;
  --ink: #16141f;
  --text: #1d1b26;
  --muted: #6b6878;
  --line: #e4e1d8;
  --line-strong: #16141f;
  --brand: #6d4aff;
  --brand-ink: #ffffff;
  --brand-soft: #efeaff;
  --lime: #d4ff3a;
  --lime-ink: #16141f;
  --flame: #ff6b1a;
  --flame-soft: #fff0e6;
  --pink: #ff4f9a;
  --ok: #0f9d58;
  --ok-soft: #e3f6ec;
  --bad: #e5484d;
  --bad-soft: #fdecec;
  --code-bg: #1b1a24;
  --code-text: #ecebf5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 3px 3px 0 var(--line-strong);
  --shadow-soft: 0 1px 2px rgba(22, 20, 31, .06), 0 8px 24px rgba(22, 20, 31, .06);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0e14;
  --bg-2: #16151d;
  --panel: #18171f;
  --panel-2: #1f1e28;
  --ink: #f3f1fa;
  --text: #e9e7f2;
  --muted: #9a97a8;
  --line: #2c2a37;
  --line-strong: #3c3a4a;
  --brand: #8b6dff;
  --brand-soft: #251f42;
  --flame-soft: #3a2215;
  --ok-soft: #12301f;
  --bad-soft: #3a1618;
  --code-bg: #121119;
  --shadow: 3px 3px 0 #000;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e14; --bg-2: #16151d; --panel: #18171f; --panel-2: #1f1e28; --ink: #f3f1fa; --text: #e9e7f2;
    --muted: #9a97a8; --line: #2c2a37; --line-strong: #3c3a4a; --brand: #8b6dff; --brand-soft: #251f42;
    --flame-soft: #3a2215; --ok-soft: #12301f; --bad-soft: #3a1618; --code-bg: #121119;
    --shadow: 3px 3px 0 #000; --shadow-soft: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.15; color: var(--ink); }
code { font-family: var(--mono); font-size: .86em; background: var(--brand-soft); color: var(--brand); padding: 1px 6px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--lime-ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---------- buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 700 14px var(--body); color: var(--ink); background: var(--panel); text-decoration: none !important;
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 9px 18px; box-shadow: 2px 2px 0 var(--line-strong);
  transition: transform .08s, box-shadow .08s, background .15s; white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line-strong); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 var(--line-strong); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
:root[data-theme="dark"] .btn.primary { border-color: #000; box-shadow: 2px 2px 0 #000; }
.btn.lime { background: var(--lime); color: var(--lime-ink); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); transform: none; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.lg { padding: 13px 26px; font-size: 16px; }
.btn.block { width: 100%; }
input, select, textarea {
  font: inherit; color: var(--text); width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--panel); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error-text { color: var(--bad); min-height: 20px; font-size: 13.5px; font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
  font-weight: 700; background: var(--panel-2); border: 1.5px solid var(--line); color: var(--text); white-space: nowrap;
}
.chip.violet { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.lime { background: var(--lime); color: var(--lime-ink); border-color: var(--ink); }
.chip.flame { background: var(--flame-soft); color: var(--flame); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.card { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-soft); }
.card.pop { border-color: var(--line-strong); box-shadow: var(--shadow); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.choice {
  border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; background: var(--panel);
  text-align: left; font: inherit; color: inherit; transition: border-color .15s, transform .08s;
}
.choice:hover { border-color: var(--brand); }
.choice.on { border-color: var(--ink); background: var(--brand-soft); box-shadow: 2px 2px 0 var(--ink); }
.choice .big { font-size: 22px; display: block; }
.choice b { display: block; font-size: 14px; }
.choice span.sub { font-size: 12px; color: var(--muted); }

/* ---------- brand */
.brand { font-family: var(--display); font-weight: 800; letter-spacing: -.04em; font-size: 21px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none !important; }
.brand .logo { width: 32px; height: 32px; border-radius: 10px; background: var(--lime); border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 16px; transform: rotate(-6deg); box-shadow: 2px 2px 0 var(--ink); }
.brand .dot { color: var(--brand); }

/* ---------- toasts, confetti, modal */
#toasts { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-soft); animation: slideup .25s ease-out; max-width: 360px; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.xp { background: var(--lime); color: var(--lime-ink); border: 1.5px solid var(--ink); }
@keyframes slideup { from { transform: translateY(12px); opacity: 0; } }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 200; pointer-events: none; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }
.modal-back { position: fixed; inset: 0; background: rgba(15, 14, 20, .55); display: grid; place-items: center; z-index: 90; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1.5px solid var(--line-strong); border-radius: 22px; padding: 26px; width: 100%; max-width: 520px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }

/* ---------- app shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; border-right: 1.5px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--panel); }
.nav .brand { padding: 4px 8px 16px; }
.nav a.item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--text); font-weight: 600; text-decoration: none; }
.nav a.item:hover { background: var(--panel-2); }
.nav a.item.on { background: var(--ink); color: var(--bg); }
.nav a.item .ico { width: 22px; text-align: center; font-size: 17px; }
.nav a.item .lock { margin-left: auto; font-size: 11px; opacity: .7; }
.nav .foot { margin-top: auto; display: grid; gap: 8px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.topbar .title { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.stat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); font-weight: 800; font-size: 14px; }
.stat-pill.flame.alive { border-color: var(--flame); color: var(--flame); background: var(--flame-soft); }
.stat-pill.flame:not(.alive) { filter: grayscale(1); opacity: .7; }
.content { padding: 24px; max-width: 1180px; width: 100%; margin: 0 auto; }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; background: var(--brand-soft); border: 1.5px solid var(--brand); font-weight: 600; }
.banner.warn { background: var(--flame-soft); border-color: var(--flame); }
.mobile-nav { display: none; }

/* ---------- home */
.hero-card { background: var(--ink); color: var(--bg); border-radius: 22px; padding: 26px; position: relative; overflow: hidden; }
.hero-card h1 { color: var(--bg); margin: 0 0 6px; font-size: 30px; }
.hero-card .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.hero-card .blob { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: var(--brand); opacity: .55; filter: blur(2px); }
.hero-card .blob.b2 { right: 90px; top: 70px; width: 110px; height: 110px; background: var(--lime); opacity: .9; }
.hero-card > * { position: relative; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring > div { width: 64px; height: 64px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 800; font-size: 14px; text-align: center; line-height: 1.1; }
.track-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .1s, box-shadow .1s; text-decoration: none !important; color: inherit; }
.track-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.lang-logo { width: 16px; height: 16px; vertical-align: -3px; flex: none; object-fit: contain; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); grid-auto-columns: 12px; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 12px; height: 12px; border-radius: 3px; background: var(--line); }
.heat i.l1 { background: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.heat i.l2 { background: color-mix(in srgb, var(--brand) 60%, var(--line)); }
.heat i.l3 { background: var(--brand); }
.heat i.l4 { background: var(--lime); outline: 1px solid var(--ink); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge { text-align: center; padding: 10px 6px; border-radius: 14px; border: 1.5px solid var(--line); }
.badge .i { font-size: 26px; }
.badge b { display: block; font-size: 12px; }
.badge.off { opacity: .35; filter: grayscale(1); }

/* ---------- learn */
.learn { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 61px); }
.outline { border-right: 1.5px solid var(--line); padding: 16px 10px 40px; position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto; background: var(--panel); }
.outline .tracks { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 4px 12px; border-bottom: 1.5px solid var(--line); margin-bottom: 8px; }
.outline .sec { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 10px 6px; }
.outline a.t { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: 14px; text-decoration: none; border-left: 2px solid var(--line); margin-left: 8px; border-radius: 0 10px 10px 0; }
.outline a.t:hover { background: var(--panel-2); }
.outline a.t.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; border-left-color: var(--brand); }
.outline a.t .st { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; font-size: 9px; }
.outline a.t .st.read { background: var(--brand-soft); border-color: var(--brand); }
.outline a.t .st.full { background: var(--ok); border-color: var(--ok); color: #fff; }
.outline a.t .lk { margin-left: auto; font-size: 11px; opacity: .6; }
.lesson { padding: 26px 32px 80px; max-width: 900px; width: 100%; }
.lesson .crumbs { font-size: 13px; color: var(--muted); font-weight: 600; }
.lesson h1 { font-size: 36px; margin: 6px 0 8px; }
.lesson .summary { font-size: 17px; color: var(--muted); margin: 0 0 14px; }
.md { font-size: 15.5px; line-height: 1.75; }
.md h3 { font-size: 20px; margin: 26px 0 8px; }
.md p { margin: 0 0 14px; }
.md ul, .md ol { padding-left: 22px; margin: 0 0 14px; }
.md li { margin: 4px 0; }
.md pre { background: var(--code-bg); color: var(--code-text); padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.md pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.md table { border-collapse: collapse; margin: 0 0 14px; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md blockquote { margin: 0 0 14px; padding: 8px 16px; border-left: 4px solid var(--lime); background: var(--panel-2); border-radius: 0 10px 10px 0; }
.block-title { display: flex; align-items: center; gap: 10px; margin: 34px 0 12px; }
.block-title h2 { margin: 0; font-size: 23px; }
.block-title .num { font-family: var(--display); font-weight: 800; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 0 8px; font-size: 14px; }
.example { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: var(--panel); }
.example .head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1.5px solid var(--line); background: var(--panel-2); }
.example .head b { flex: 1; font-size: 14.5px; }
.editor { border-radius: 0; font-size: 13.5px; }
.editor .CodeMirror { height: auto; min-height: 60px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; background: var(--code-bg); color: var(--code-text); padding: 6px 0; }
.editor .CodeMirror-scroll { max-height: 520px; }
.editor.tall .CodeMirror { min-height: 220px; }
.output { background: #0b0a10; color: #d7f7c8; font: 13px/1.55 var(--mono); padding: 12px 14px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; border-top: 1.5px solid var(--line); }
.output .err { color: #ff9a9e; }
.output .dim { color: #8b88a0; }
.output.expected { color: #c9c6ff; }
.challenge { border: 1.5px solid var(--line-strong); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--panel); }
.challenge .prompt { padding: 18px 20px 6px; }
.challenge .bar-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 14px; background: var(--panel-2); border-top: 1.5px solid var(--line); }
.result { padding: 12px 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.result.pass { background: var(--ok-soft); color: var(--ok); }
.result.fail { background: var(--bad-soft); color: var(--bad); }
.qa { border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--panel); overflow: hidden; }
.qa summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; gap: 10px; align-items: flex-start; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .q { flex: none; background: var(--lime); color: var(--lime-ink); border: 1.5px solid var(--ink); border-radius: 8px; font-size: 12px; padding: 0 7px; margin-top: 2px; }
.qa summary .chev { margin-left: auto; transition: transform .2s; }
.qa[open] summary .chev { transform: rotate(180deg); }
.qa .a { padding: 0 16px 14px 16px; border-top: 1.5px dashed var(--line); padding-top: 12px; }
.usecase { border-left: 4px solid var(--brand); padding: 10px 14px; background: var(--panel); border-radius: 0 12px 12px 0; margin-bottom: 10px; border: 1.5px solid var(--line); border-left: 4px solid var(--brand); }
.usecase b { display: block; }
.next-row { display: flex; gap: 10px; justify-content: space-between; margin-top: 36px; flex-wrap: wrap; }
.locked-panel { text-align: center; padding: 36px 20px; border: 2px dashed var(--line); border-radius: 20px; margin-top: 20px; }
.locked-panel .big { font-size: 40px; }

/* ---------- weekend projects */
.project { border: 1.5px solid var(--line-strong); border-radius: 20px; padding: 20px; margin-top: 26px; box-shadow: var(--shadow); background: linear-gradient(160deg, var(--brand-soft), var(--panel) 40%); }
.project-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.project-head h2 { margin: 2px 0 0; font-size: 26px; }
.kicker-line { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.project-files { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.project-files .editor .CodeMirror { max-height: 520px; }
.file-tab { border: 1.5px solid var(--line); background: var(--panel-2); color: var(--text); font: 600 12.5px var(--mono); padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.file-tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sub-h { margin: 22px 0 10px; font-size: 19px; }
.steps-list { list-style: none; counter-reset: st; padding: 0; margin: 0; display: grid; gap: 8px; }
.steps-list > li { counter-increment: st; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); }
.steps-list summary { cursor: pointer; padding: 12px 14px; list-style: none; display: flex; gap: 10px; align-items: center; }
.steps-list summary::-webkit-details-marker { display: none; }
.steps-list summary::before { content: counter(st); flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--lime); color: var(--lime-ink); border: 1.5px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.steps-list summary .chev { margin-left: auto; transition: transform .2s; }
.steps-list details[open] summary .chev { transform: rotate(180deg); }
.steps-list .md { padding: 0 16px 12px 52px; }
ul.tick { padding-left: 0; list-style: none; margin: 0; display: grid; gap: 8px; }
ul.tick li { padding-left: 22px; position: relative; }
ul.tick li::before { content: "→"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
ul.tick li.md p { margin: 0; }
@media (max-width: 900px) { .steps-list .md { padding-left: 16px; } .project { padding: 14px; } }

/* ---------- leaderboard */
.lb-row { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1.5px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row.me { background: var(--brand-soft); }
.lb-row .rk { font-family: var(--display); font-weight: 800; font-size: 18px; text-align: center; }
.lb-row .nm b { display: block; }
.lb-row .nm span { font-size: 12.5px; color: var(--muted); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 18px; }
.podium .p { text-align: center; border: 1.5px solid var(--line-strong); border-radius: 18px; padding: 16px 8px; background: var(--panel); box-shadow: var(--shadow); }
.podium .p .medal { font-size: 30px; }
.podium .p.first { background: var(--lime); color: var(--lime-ink); padding-top: 26px; }
.podium .p b { display: block; font-family: var(--display); font-size: 17px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; font: 700 13px var(--body); color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); }

/* ---------- jobs */
.job { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: start; }
.job .logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-family: var(--display); background: var(--brand-soft); color: var(--brand); font-size: 18px; }
.job h3 { margin: 0 0 2px; font-size: 17px; }
.job > div { min-width: 0; overflow-wrap: anywhere; }
.job .meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.job .actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { max-width: 320px; }
.filters select { width: auto; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; cursor: pointer; margin: 0; }
.toggle input { width: auto; }

/* ---------- resume */
.resume-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.resume-form .sec { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; background: var(--panel); }
.resume-form .sec h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.resume-form .item { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; position: relative; }
.resume-form .item .rm { position: absolute; top: 8px; right: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paper-wrap { position: sticky; top: 80px; }
.paper { min-width: 0; background: #fff; color: #1a1a1a; aspect-ratio: 1 / 1.414; width: 100%; border-radius: 6px; box-shadow: var(--shadow-soft); border: 1px solid var(--line); overflow: hidden; }
.paper-inner { transform-origin: top left; width: 794px; padding: 44px 50px; font: 12.5px/1.5 "Plus Jakarta Sans", Arial, sans-serif; }
.cv h1 { font-family: "Plus Jakarta Sans", Arial, sans-serif; font-size: 28px; margin: 0; letter-spacing: -.02em; color: #111; }
.cv .contact { color: #555; font-size: 12px; margin: 4px 0 10px; }
.cv h2 { font-family: "Plus Jakarta Sans", Arial, sans-serif; font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; margin: 16px 0 6px; color: #111; border-bottom: 1.5px solid #111; padding-bottom: 3px; }
.cv .it { margin-bottom: 8px; }
.cv .it .top { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; color: #111; }
.cv .it .sub { color: #555; font-style: italic; }
.cv ul { margin: 3px 0 0; padding-left: 18px; }
.cv li { margin: 1px 0; }
.cv .skills span { display: inline-block; margin: 0 6px 4px 0; }
.cv.bold h1 { color: #4b2bd6; }
.cv.bold h2 { color: #4b2bd6; border-bottom-color: #4b2bd6; }
.cv.bold .skills span { background: #efeaff; color: #4b2bd6; padding: 1px 8px; border-radius: 99px; font-weight: 600; }
.cv.minimal h2 { border-bottom: 0; color: #777; letter-spacing: .18em; }
.cv.minimal h1 { font-weight: 400; font-size: 30px; }
.upload-box { border: 2px dashed var(--line); border-radius: 16px; padding: 20px; text-align: center; cursor: pointer; transition: border-color .15s; }
.upload-box:hover, .upload-box.drag { border-color: var(--brand); background: var(--brand-soft); }
.tabs-line { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin-bottom: 18px; }
.tabs-line button { border: 0; background: none; font: 700 14px var(--body); color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; }
.tabs-line button.on { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- pricing */
.plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 10px; border: 1.5px solid var(--line); border-radius: 20px; padding: 20px 16px; background: var(--panel); position: relative; }
.plan.hot { border-color: var(--line-strong); box-shadow: var(--shadow); background: var(--panel); }
.plan.hot::before { content: ""; position: absolute; inset: 0; border-radius: 19px; background: linear-gradient(160deg, var(--brand-soft), transparent 45%); pointer-events: none; }
.plan > * { position: relative; }
.plan .tag { position: absolute; top: -12px; left: 14px; }
.plan h3 { margin: 6px 0 0; font-size: 17px; }
.plan .price { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; font-family: var(--body); }
.plan ul { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13.5px; display: grid; gap: 6px; flex: 1; }
.plan li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "✕ "; color: var(--muted); }
.plan.current { outline: 3px solid var(--lime); }

/* ---------- landing */
.land-nav { display: flex; align-items: center; gap: 14px; padding: 16px 24px; max-width: 1200px; margin: 0 auto; }
.land { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 50px 0 60px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); margin: 14px 0 16px; letter-spacing: -.045em; line-height: 1; }
.hero h1 .hl { background: var(--lime); color: var(--lime-ink); padding: 0 10px; border-radius: 14px; display: inline-block; transform: rotate(-1.5deg); border: 2px solid var(--ink); }
.hero h1 .u { text-decoration: underline wavy var(--brand); text-underline-offset: 8px; text-decoration-thickness: 3px; }
.hero p.lead { font-size: 18.5px; color: var(--muted); max-width: 540px; }
.mock { background: var(--code-bg); border-radius: 22px; padding: 18px; border: 1.5px solid var(--line-strong); box-shadow: 8px 8px 0 var(--brand); color: var(--code-text); font: 13.5px/1.7 var(--mono); position: relative; transform: rotate(1deg); }
.mock .code { white-space: pre; overflow-x: auto; font-size: 13px; }
.mock .dots { display: flex; gap: 6px; margin-bottom: 12px; }
.mock .dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.mock .dots i:nth-child(2) { background: #febc2e; }
.mock .dots i:nth-child(3) { background: #28c840; }
.mock .k { color: #c792ea; } .mock .s { color: #c3e88d; } .mock .f { color: #82aaff; } .mock .c { color: #6f6c85; }
.mock .floaty { position: absolute; font-family: var(--body); font-weight: 800; border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; box-shadow: 3px 3px 0 var(--ink); font-size: 14px; white-space: nowrap; }
.section { padding: 56px 0; }
.section h2 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--brand-soft); margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.marquee { overflow: hidden; border-block: 1.5px solid var(--line-strong); background: var(--ink); color: var(--bg); padding: 12px 0; white-space: nowrap; }
.marquee div { display: inline-block; animation: scroll 40s linear infinite; font-family: var(--display); font-weight: 800; font-size: 20px; }
.marquee span { margin: 0 22px; }
.marquee span.alt { color: var(--lime); }
@keyframes scroll { to { transform: translateX(-50%); } }
.faq details { border-bottom: 1.5px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 16px; }
.faq p { color: var(--muted); margin: 8px 0 0; }
footer.foot { border-top: 1.5px solid var(--line); padding: 26px 24px; text-align: center; color: var(--muted); font-size: 13.5px; }

.logos-band { padding: 34px 24px 26px; text-align: center; border-bottom: 1.5px solid var(--line); }
.logos-title { font-family: var(--display); font-weight: 800; font-size: 18px; margin: 0 0 18px; color: var(--ink); }
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 34px; max-width: 1000px; margin: 0 auto; }
.logos img { width: 36px; height: 36px; opacity: .55; transition: opacity .15s, transform .15s; }
.logos img:hover { opacity: 1; transform: scale(1.08); }
:root[data-theme="dark"] .logos img { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logos img { filter: invert(1); } }
.logos-note { font-size: 11.5px; color: var(--muted); margin: 18px 0 0; }
.testimonials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.testimonial { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.testimonial .stars { color: var(--flame); letter-spacing: 2px; }
.testimonial blockquote { margin: 0; font-size: 15.5px; line-height: 1.6; flex: 1; }
.testimonial figcaption b { display: block; }
.testimonial figcaption span { font-size: 13px; color: var(--muted); }
.testimonial.empty { grid-column: 1 / -1; text-align: center; align-items: center; padding: 34px; }
@media (max-width: 900px) { .testimonials { grid-template-columns: minmax(0, 1fr); } .logos { gap: 18px 24px; } }

/* ---------- auth / onboarding */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: var(--bg); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: var(--bg); font-size: 40px; margin: 0; }
.auth-side .sticker { position: absolute; font-family: var(--display); font-weight: 800; border: 1.5px solid var(--bg); border-radius: 999px; padding: 8px 16px; font-size: 15px; white-space: nowrap; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 32px; margin: 18px 0 6px; }
.steps { display: flex; gap: 6px; margin: 18px 0 20px; }
.steps i { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.steps i.on { background: var(--brand); }
.seg-tabs { display: flex; gap: 4px; background: var(--panel-2); padding: 4px; border-radius: 999px; border: 1.5px solid var(--line); margin: 18px 0 18px; }
.seg-tabs button { flex: 1; border: 0; background: transparent; font: 700 14px var(--body); padding: 8px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-soft); }

.li-btn { background: #0a66c2; color: #fff; border-color: #084d91; box-shadow: 2px 2px 0 #084d91; margin-top: 14px; }
.li-btn img { background: #fff; border-radius: 4px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }

/* ---------- admin */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- responsive */
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resume-wrap { grid-template-columns: minmax(0, 1fr); }
  .paper-wrap { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--panel); border-top: 1.5px solid var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--muted); text-decoration: none; padding: 4px 6px; border-radius: 10px; }
  .mobile-nav a .ico { font-size: 19px; }
  .mobile-nav a.on { color: var(--ink); background: var(--panel-2); }
  .content { padding: 16px 16px 90px; }
  .topbar { padding: 10px 16px; }
  .learn { grid-template-columns: minmax(0, 1fr); }
  .outline { position: static; height: auto; max-height: none; border-right: 0; border-bottom: 1.5px solid var(--line); display: none; }
  .outline.open { display: block; }
  .lesson { padding: 18px 16px 100px; }
  .lesson h1 { font-size: 28px; }
  .grid-3, .grid-2, .feature-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .plans { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .two { grid-template-columns: 1fr; }
  .job { grid-template-columns: minmax(0, 1fr); }
  .job .logo { display: none; }
  .job .actions { flex-direction: row; }
  .land-nav .hide-sm { display: none; }
  .land { padding: 0 16px; }
}
.only-mobile { display: none; }
@media (max-width: 900px) { .only-mobile { display: inline-flex; } }

@media print {
  body * { visibility: hidden; }
  #print-root, #print-root * { visibility: visible; }
  #print-root { position: absolute; left: 0; top: 0; width: 100%; }
  #print-root .paper-inner { transform: none !important; width: auto; padding: 0; }
  @page { size: A4; margin: 14mm; }
}
