:root {
  --bg: #f7f3ea; --surface: #ffffff; --surface-2: #f0ebdf; --ink: #1d2725; --muted: #5a6662; --line: #e4dece;
  --accent: #0f5c46; --accent-ink: #ffffff; --accent-soft: #e0f0e9; --gold: #a8781c; --gold-soft: #f8eed6; --danger: #b3412e;
  --ok: #0f7a56; --ok-soft: #dff2ea; --bar: #0e3d31; --bar-ink: #ffffff; --bar-muted: #c8dcd3; --bar-hover: #17574a;
  --hero: linear-gradient(120deg, #0e3d31, #14634d); --hero-ink: #ffffff; --hero-muted: #d4e5de;
  --radius: 14px; --shadow: 0 1px 2px rgba(30,40,35,.05), 0 6px 18px rgba(30,40,35,.07);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101715; --surface: #18211e; --surface-2: #212c28; --ink: #e8ece9; --muted: #9daaa5; --line: #2c3833;
    --accent: #4fc79c; --accent-ink: #0a1a14; --accent-soft: #173229; --gold: #e0b45a; --gold-soft: #33290f; --danger: #ef7a66;
    --ok: #4fc79c; --ok-soft: #173229; --bar: #0c1f19; --bar-ink: #e8ece9; --bar-muted: #9daaa5; --bar-hover: #18302a;
    --hero: linear-gradient(120deg, #0c2a21, #124a3a); --hero-ink: #f0f4f2; --hero-muted: #b8cbc3;
    --shadow: none; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "IBM Plex Sans", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: 1.6rem; margin-top: 1.6em; }
h3 { font-size: 1.15rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font: 600 1.2rem "Source Serif 4", Georgia, serif; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 9px; }
/* Official logo: green badge #0f5c46, white/mint book, gold check #e0b45a. Fixed colors so it never changes. */
.brand-logo { width: 32px; height: 32px; flex: none; }
.brand-logo .bl-bg { fill: #0f5c46; stroke: rgba(255,255,255,.55); stroke-width: 2.5; }
.brand-logo .bl-page { fill: #ffffff; opacity: .95; }
.brand-logo .bl-page2 { fill: #e0f0e9; }
.brand-logo .bl-spine { stroke: #0f5c46; stroke-width: 1.6; }
.brand-logo .bl-check { fill: none; stroke: #e0b45a; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.topbar .brand-mark { color: #e0b45a; }
.nav { display: flex; gap: 4px; overflow-x: auto; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 9px; white-space: nowrap; font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--ink); background: var(--surface-2); }
.pill { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 9px; font-size: .72rem; padding: 0 7px; margin-left: 2px; font-weight: 700; }

main { min-height: 70vh; padding-bottom: 48px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 18px 0 28px; }

/* Hero */
.hero { padding: 56px 0 28px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin-top: 20px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.stat b { display: block; font: 600 1.8rem "Source Serif 4", Georgia, serif; color: var(--accent); }
.stat span { color: var(--muted); font-size: .9rem; }

input[type=search], input[type=number], input[type=date], select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { font: 600 .95rem "IBM Plex Sans", system-ui, sans-serif; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 6px 10px; font-size: .85rem; }

/* Grids & cards */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--ink); display: block; }
a.card:hover { border-color: var(--accent); text-decoration: none; }
.card .abbr { font: 600 1.25rem "Source Serif 4", Georgia, serif; }
.card .name { color: var(--muted); font-size: .9rem; margin: 2px 0 10px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; padding: 2px 8px; border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.gold { color: var(--gold); }
.diff { letter-spacing: 1px; color: var(--gold); }
.cat-tile h3 { margin-bottom: 4px; }
.cat-tile .count { color: var(--accent); font-weight: 600; font-size: .85rem; }

/* Catalog */
.toolbar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin: 18px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 9px; padding: 5px 12px; cursor: pointer; font: 500 .85rem "IBM Plex Sans", system-ui, sans-serif; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }

/* Cert detail */
.crumbs { margin: 22px 0 8px; font-size: .88rem; color: var(--muted); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 20px 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.fact .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fact .v { font-weight: 600; margin-top: 2px; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.bar-row { margin: 10px 0; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.bar { height: 8px; background: var(--surface-2); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
ul.tips { padding-left: 18px; margin: 0; }
ul.tips li { margin: 6px 0; }

/* Track */
.track-setup { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius); padding: 16px; margin: 18px 0; }
.setup-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; }
.setup-grid label { font-size: .8rem; color: var(--muted); display: grid; gap: 4px; }
.summary { margin-top: 12px; font-size: .95rem; }
.progress { height: 10px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.phase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; overflow: hidden; }
.phase summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.phase summary::-webkit-details-marker { display: none; }
.phase summary h3 { margin: 0; }
.phase-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; margin-right: 8px; }
.phase-body { padding: 0 16px 12px; }
.task { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.task input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.t-when { font-size: .8rem; color: var(--muted); white-space: nowrap; text-align: right; }
.t-desc { font-size: .85rem; color: var(--muted); }

/* Careers */
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.path a { background: var(--surface-2); color: var(--ink); padding: 4px 10px; border-radius: 9px; font-weight: 600; font-size: .85rem; }
.path a.got { background: var(--accent); color: var(--accent-ink); }
.path .arrow { color: var(--muted); }
.career-icon { font-size: 1.6rem; }

/* Quizzes */
.quiz-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.quiz-actions select { width: auto; max-width: 100%; padding: 6px 10px; font-size: .85rem; }
.grid > * { min-width: 0; }
.quiz { max-width: 760px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--danger); }
.q-text { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin: 14px 0 18px; }
.options { display: grid; gap: 10px; margin-bottom: 18px; }
.option { display: flex; gap: 12px; align-items: flex-start; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; cursor: pointer; }
.option:hover:not(:disabled) { border-color: var(--accent); }
.option .key { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 9px; background: var(--surface-2); font-size: .8rem; font-weight: 700; color: var(--muted); }
.option:disabled { cursor: default; }
.option.right { border-color: var(--ok); background: var(--ok-soft); }
.option.right .key { background: var(--ok); color: var(--bg); }
.option.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.option.wrong .key { background: var(--danger); color: #fff; }
.option.dim { opacity: .55; }
.explain { border-left: 3px solid var(--ok); background: var(--surface); border-radius: 9px; padding: 12px 14px; margin: 0 0 16px; }
.explain.bad { border-left-color: var(--danger); }
.score-head { display: flex; gap: 20px; align-items: center; margin-top: 16px; }
.score { flex: none; display: grid; place-items: center; width: 104px; height: 72px; border-radius: 9px; font: 600 1.7rem "Source Serif 4", Georgia, serif; background: var(--accent-soft); color: var(--accent); }
.score.bad { background: var(--surface-2); color: var(--danger); }
.review { margin: 10px 0; }

.option.picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option.picked .key { background: var(--accent); color: var(--accent-ink); }

/* Task activity pages */
.task-head { max-width: 760px; margin: 0 auto; }
.task-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-top: 4px; }
.act { max-width: 760px; margin: 16px auto 0; }
.act > h3, .act h3 { margin-top: 18px; }
.task-foot { max-width: 760px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.foot-status { font-weight: 600; color: var(--muted); }
.foot-status.ok { color: var(--ok); }
.foot-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; justify-self: start; font: inherit; }
.t-title { color: var(--ink); font-weight: 500; }
.t-open { display: inline-block; margin-top: 2px; font-weight: 600; }
.checklist { display: grid; gap: 8px; }
.check-item { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; cursor: pointer; }
.check-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.check-item.on { border-color: var(--accent); background: var(--accent-soft); }
ol.steps { padding-left: 20px; margin: 0 0 10px; }
ol.steps li { margin: 6px 0; }
.launch h3 { margin-top: 0; }
.notice { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.notice h3 { margin-top: 0; }
.rate-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.rate-row .chips { margin: 0; }
textarea.notes { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 12px; resize: vertical; }
textarea.notes:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.reqs { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); }
.reqs .ok { color: var(--ok); font-weight: 600; }
.add-card { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; }
.card-list summary { cursor: pointer; color: var(--accent); margin: 4px 0 8px; }
.mini-card { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.mini-card span { color: var(--muted); }

/* Lessons */
.lesson { font-size: 1.02rem; line-height: 1.7; }
.lesson h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; }
.lesson h3:first-child { margin-top: 0; }
.lesson ul { padding-left: 20px; }
.lesson li { margin: 4px 0; }
.lesson-tip { background: var(--accent-soft); border-radius: 9px; padding: 12px 14px; margin: 16px 0; }
.lesson-end { margin-top: 24px; }
.lesson-end h3 { margin-top: 0; }

/* Flashcards */
.fc-wrap { display: grid; gap: 12px; }
.fc-top { display: flex; justify-content: space-between; gap: 10px; }
.flashcard { min-height: 200px; display: grid; place-content: center; gap: 14px; text-align: center; padding: 28px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); cursor: pointer; font: inherit; color: var(--ink); }
.flashcard .fc-front { font-size: 1.25rem; font-weight: 600; }
.flashcard .fc-back { font-size: 1.05rem; color: var(--accent); border-top: 1px dashed var(--line); padding-top: 14px; }
.fc-actions { display: flex; gap: 10px; justify-content: center; }
.fc-done { display: flex; gap: 18px; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 9px; font-weight: 600; z-index: 50; transition: opacity .4s; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.out { opacity: 0; }

/* Verification */
.verify { border-radius: 9px; padding: 10px 14px; margin: -8px 0 20px; font-size: .9rem; border: 1px solid var(--line); background: var(--surface); }
.verify.verified { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.verify.verified b { color: var(--ok); }
.verify.partial b { color: var(--gold); }
.verify.unverified b { color: var(--muted); }
ul.sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .88rem; }
ul.sources .tag { margin-right: 4px; }

/* My tracks */
.mytrack { display: grid; grid-template-columns: 1fr 220px; gap: 16px; align-items: center; }

/* House style: warm and rounded, with plain wording. */
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: 1.55rem; margin-top: 1.9em; }
h3 { font-size: 1.12rem; }
.topbar { background: var(--bar); backdrop-filter: none; border-bottom: 0; box-shadow: 0 2px 10px rgba(10,30,25,.18); }
.topbar-inner { height: 58px; }
.brand { color: var(--bar-ink); font-size: 1.22rem; }
.nav a { color: var(--bar-muted); }
.nav a:hover { background: var(--bar-hover); color: var(--bar-ink); }
.nav a.active { background: var(--bar-hover); color: var(--bar-ink); }
.pill { background: var(--gold); color: #fff; }

.hero { background: var(--hero); color: var(--hero-ink); border-radius: 18px; padding: 44px 36px 36px; margin: 22px 0 8px; box-shadow: var(--shadow); }
.hero h1 { color: var(--hero-ink); }
.hero p.lead { color: var(--hero-muted); font-size: 1.12rem; }
.hero .btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.hero input[type=search] { border-color: transparent; }
.stats { gap: 36px; padding-top: 22px; margin-top: 26px; border-top: 1px solid rgba(255,255,255,.2); }
.stat b { color: var(--hero-ink); font-family: "Source Serif 4", Georgia, serif; font-weight: 700; }
.stat span { color: var(--hero-muted); }

.card { padding: 16px 18px; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(30,40,35,.06), 0 10px 24px rgba(30,40,35,.11); }
.card .abbr { font-size: 1.28rem; color: var(--accent); font-weight: 700; }
.cat-tile { border-top: 4px solid var(--accent); }
.cat-tile:nth-child(4n+2) { border-top-color: var(--gold); }
.cat-tile:nth-child(4n+3) { border-top-color: #2f6f9f; }
.cat-tile:nth-child(4n+4) { border-top-color: #a4553a; }
.tag { padding: 3px 9px; border-radius: 99px; }
.tag.accent { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tag.gold { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.diff { letter-spacing: 1px; color: var(--gold); }
.chip { border-radius: 99px; }
.bar, .progress { height: 9px; border-radius: 99px; }
.bar > i, .progress > i { border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--gold))); }
.fact { box-shadow: var(--shadow); }
.phase { box-shadow: var(--shadow); }
.phase-num { width: 26px; height: 26px; border-radius: 50%; }
.path a { border-radius: 8px; }
.score { width: 96px; height: 96px; border-radius: 50%; }
.lesson-tip { border-left: 4px solid var(--gold); background: var(--gold-soft); }
.flashcard { border-top: 4px solid var(--accent); }
.option { box-shadow: 0 1px 2px rgba(30,40,35,.04); }

@media (max-width: 520px) {
  .brand { font-size: .98rem; }
  .hero { padding: 28px 20px 24px; }
  .stats { gap: 20px; }
  .topbar-inner { gap: 6px; }
  .nav { scrollbar-width: none; }
  .nav a { padding: 6px 4px; font-size: .8rem; }
  .nav a[data-nav=catalog] { font-size: 0; }
  .nav a[data-nav=catalog]::after { content: "Certs"; font-size: .8rem; }
  .nav .long { display: none; }
  .nav { gap: 0; }
}
@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar > :first-child { grid-column: 1 / -1; }
  .setup-grid { grid-template-columns: 1fr 1fr; }
  .mytrack { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .footer, .track-setup .btn, .no-print { display: none !important; }
  .phase { break-inside: avoid; }
  details.phase:not([open]) > .phase-body { display: block; }
}
.legal { max-width: 760px; } .legal h2 { margin-top: 1.4em; font-size: 1.15rem; } .legal li { margin: .4em 0; } .foot-links { margin-top: 10px; } .foot-links a { text-decoration: underline; }

/* accounts + locked content */
.lock-box{border-left:4px solid #c9a227;margin:12px 0}.lock-box h3{margin-top:0}.lock-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
#acct-link{white-space:nowrap}
.card input[type=email],.card select{padding:8px 10px;border:1px solid #c9d1cc;border-radius:8px;font:inherit}
