/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ===== TOKENS — exact from your zip ===== */
:root {
  --aplus: #e05a00; --aplus-light: #fff3eb; --aplus-dark: #7a2e00;
  --netplus: #0068c9; --netplus-light: #e8f2ff; --netplus-dark: #003a73;
  --secplus: #1a9657; --secplus-light: #e6f7ee; --secplus-dark: #0d4f2d;
  --easy: #1a9657; --easy-light: #e6f7ee;
  --medium: #d97706; --medium-light: #fef3c7;
  --hard: #dc2626; --hard-light: #fee2e2;
  --bg: #f5f3ef; --surface: #ffffff; --border: #e0ddd7; --border2: #c8c4bc;
  --text: #1a1917; --muted: #6b6860; --faint: #9c9690;
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Syne', sans-serif;
  --body: 'Lora', Georgia, serif;
  --r: 10px; --r2: 16px;
}

/* ===== BASE ===== */
body { font-family: var(--body); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 13px; background: var(--border); padding: 1px 5px; border-radius: 4px; }
.page { display: none; }
.page.active { display: block; animation: fadeUp .2s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ===== TOPNAV — matches screenshots exactly ===== */
.topnav {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 52px;
  background: var(--text);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-brand { font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; user-select: none; }
.nav-links { display: flex; gap: 4px; }
.nav-pill { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: 20px; transition: .15s; color: rgba(255,255,255,.6); cursor: pointer; border: none; background: none; }
.nav-pill:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-pill.nl-ap:hover, .nav-pill.nl-ap.active { background: var(--aplus); color: #fff; }
.nav-pill.nl-np:hover, .nav-pill.nl-np.active { background: var(--netplus); color: #fff; }
.nav-pill.nl-sp:hover, .nav-pill.nl-sp.active { background: var(--secplus); color: #fff; }
.nav-right { display: flex; gap: 6px; align-items: center; }
.nav-action { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 5px 13px; border-radius: 20px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.6); transition: .15s; cursor: pointer; background: none; }
.nav-action:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.nav-action.active { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }

/* ===== HOME HERO — big bold text on black like screenshots ===== */
.home-hero { background: var(--text); color: #fff; padding: 80px 2rem 72px; }
.hero-inner { max-width: 960px; margin: 0 auto; }
.hero-tag { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 16px; }
.home-hero h1 { font-family: var(--display); font-size: clamp(38px, 6vw, 72px); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; margin-bottom: 20px; }
.hero-sub { font-size: 18px; color: rgba(255,255,255,.6); max-width: 520px; margin-bottom: 56px; font-family: var(--body); }

/* ===== CERT CARDS in hero — matches screenshot cards ===== */
.cert-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.cert-card { position: relative; display: flex; flex-direction: column; padding: 28px 28px 24px; border-radius: var(--r2); border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); transition: .18s; cursor: pointer; }
.cert-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.08); }
.cc-code { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; opacity: .5; }
.cc-name { font-family: var(--display); font-size: 42px; font-weight: 800; line-height: 1; margin-bottom: 12px; }
.ap-card .cc-name { color: #ff8a40; }
.np-card .cc-name { color: #5aadff; }
.sp-card .cc-name { color: #40d68a; }
.cc-desc { font-size: 14px; color: rgba(255,255,255,.55); flex: 1; margin-bottom: 18px; font-family: var(--body); }
.cc-meta { display: flex; gap: 8px; margin-bottom: 20px; }
.cc-badge { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 20px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.cc-arrow { font-size: 20px; opacity: .4; transition: .15s; }
.cert-card:hover .cc-arrow { opacity: 1; transform: translateX(4px); }

/* ===== HOME CONTENT AREA — warm cream bg ===== */
.home-content { background: var(--bg); padding: 52px 2rem 72px; }
.home-inner { max-width: 960px; margin: 0 auto; }
.content-head { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.divider { height: 1px; background: var(--border); margin: 36px 0; }

/* ===== STAT BOXES ===== */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 32px; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; }
.stat-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.stat-val { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1; }
.stat-sub { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 3px; }

/* ===== FILTER PANEL ===== */
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 22px 24px; margin-bottom: 18px; }
.filter-row { margin-bottom: 16px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-lbl { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .04em; padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: transparent; color: var(--muted); transition: .12s; cursor: pointer; }
.pill:hover { border-color: var(--border2); color: var(--text); }
.pill.on { border-color: var(--text); background: var(--text); color: #fff; }
.pill.on.pe { border-color: var(--easy); background: var(--easy-light); color: var(--easy); }
.pill.on.pm { border-color: var(--medium); background: var(--medium-light); color: var(--medium); }
.pill.on.ph { border-color: var(--hard); background: var(--hard-light); color: var(--hard); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: var(--r); font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .04em; transition: .15s; border: 1.5px solid transparent; cursor: pointer; }
.btn-pri { background: var(--text); color: #fff; border-color: var(--text); }
.btn-pri:hover { opacity: .85; }
.btn-out { background: transparent; color: var(--text); border-color: var(--border2); }
.btn-out:hover { border-color: var(--text); }
.btn-danger { background: var(--hard); color: #fff; border-color: var(--hard); }
.btn-lg { padding: 13px 28px; font-size: 14px; border-radius: var(--r2); }
.btn-row { display: flex; gap: 10px; }

/* ===== PROGRESS BAR ===== */
.prog { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.prog-fill { height: 100%; border-radius: 2px; transition: width .4s; }
.pf-ap { background: var(--aplus); } .pf-np { background: var(--netplus); } .pf-sp { background: var(--secplus); }
.pf-dark { background: var(--text); }

/* ===== CERT HEADER — colored like screenshots ===== */
.cert-header { padding: 56px 2rem 48px; color: #fff; }
.cert-header.ap-hdr { background: var(--aplus-dark); }
.cert-header.np-hdr { background: var(--netplus-dark); }
.cert-header.sp-hdr { background: var(--secplus-dark); }
.cert-hdr-inner { max-width: 960px; margin: 0 auto; }
.back-link { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.5); display: inline-block; margin-bottom: 22px; letter-spacing: .04em; transition: .15s; cursor: pointer; }
.back-link:hover { color: rgba(255,255,255,.9); }
.cert-header h2 { font-family: var(--display); font-size: clamp(32px,5vw,60px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 10px; }
.cert-exam-code { font-family: var(--mono); font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 14px; }
.cert-intro { font-family: var(--body); font-size: 17px; color: rgba(255,255,255,.65); max-width: 560px; }

/* ===== DOMAIN NAV (sticky below cert header) — matches screenshot tabs ===== */
.domain-nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 2rem; position: sticky; top: 52px; z-index: 100; }
.dn-inner { max-width: 960px; margin: 0 auto; display: flex; overflow-x: auto; scrollbar-width: none; }
.dn-inner::-webkit-scrollbar { display: none; }
.dn-link { font-family: var(--display); font-size: 13px; font-weight: 600; white-space: nowrap; padding: 13px 16px; border-bottom: 2px solid transparent; color: var(--muted); transition: .15s; cursor: pointer; user-select: none; }
.dn-link:hover { color: var(--text); }
.dn-ap { color: var(--aplus); border-color: var(--aplus); }
.dn-np { color: var(--netplus); border-color: var(--netplus); }
.dn-sp { color: var(--secplus); border-color: var(--secplus); }

/* ===== NOTES CONTENT — white cards on cream bg like screenshots ===== */
.notes-wrap { background: var(--bg); }
.notes-inner { max-width: 960px; margin: 0 auto; padding: 44px 2rem 80px; }
.domain-sec { margin-bottom: 60px; scroll-margin-top: 108px; }
.domain-hdr { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--border); }
.domain-tag { font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 20px; letter-spacing: .06em; }
.dt-ap { background: var(--aplus-light); color: var(--aplus-dark); }
.dt-np { background: var(--netplus-light); color: var(--netplus-dark); }
.dt-sp { background: var(--secplus-light); color: var(--secplus-dark); }
.domain-title { font-family: var(--display); font-size: 22px; font-weight: 700; }
.domain-pct { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.sec-h3 { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 28px 0 12px; }
.sec-h3::before { content: '▸ '; font-size: 12px; color: var(--border2); }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 14px; margin-bottom: 18px; }
.topic-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; }
.topic-card h4 { font-family: var(--display); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.topic-card ul { list-style: none; padding: 0; margin: 0; }
.topic-card li { font-family: var(--body); font-size: 13px; color: var(--muted); padding: 4px 0 4px 14px; position: relative; border-bottom: 1px solid var(--bg); }
.topic-card li:last-child { border-bottom: none; }
.topic-card li::before { content: '›'; position: absolute; left: 0; color: var(--border2); font-weight: 700; }
.def-block { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px; margin-bottom: 10px; }
.db-ap { border-left-color: var(--aplus); } .db-np { border-left-color: var(--netplus); } .db-sp { border-left-color: var(--secplus); }
.def-term { font-family: var(--display); font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.def-text { font-family: var(--body); font-size: 13px; color: var(--muted); margin: 0; }
.n-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); margin: 18px 0; font-size: 14px; }
.n-tip.ap { background: var(--aplus-light); color: var(--aplus-dark); }
.n-tip.np { background: var(--netplus-light); color: var(--netplus-dark); }
.n-tip.sp { background: var(--secplus-light); color: var(--secplus-dark); }
.n-tip p { margin: 0; font-family: var(--body); }
.n-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 13px; background: var(--surface); border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.n-table th { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 9px 13px; background: var(--bg); color: var(--muted); text-align: left; border-bottom: 1px solid var(--border); }
.n-table td { padding: 8px 13px; border-bottom: 1px solid var(--bg); font-family: var(--body); color: var(--muted); vertical-align: top; }
.n-table tr:last-child td { border-bottom: none; }
.mn { font-family: var(--mono) !important; font-size: 13px !important; color: var(--text) !important; }
.tc { font-family: var(--mono) !important; color: var(--netplus) !important; }
.tu { font-family: var(--mono) !important; color: var(--secplus) !important; }
.tb { font-family: var(--mono) !important; color: var(--aplus) !important; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 10px; margin: 14px 0 20px; }
.ac-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 11px 13px; }
.ac-abbr { font-family: var(--mono); font-size: 13px; font-weight: 500; display: block; margin-bottom: 3px; color: var(--text); }
.ac-full { font-family: var(--body); font-size: 12px; color: var(--muted); }

/* ===== QUIZ ===== */
.quiz-wrap { max-width: 740px; margin: 0 auto; padding: 32px 2rem 80px; min-height: 100vh; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.quiz-meta { display: flex; align-items: center; gap: 8px; }
.q-counter { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.d-badge { font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.db-e { background: var(--easy-light); color: var(--easy); }
.db-m { background: var(--medium-light); color: var(--medium); }
.db-h { background: var(--hard-light); color: var(--hard); }
.c-badge { font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.cb-ap { background: var(--aplus-light); color: var(--aplus); }
.cb-np { background: var(--netplus-light); color: var(--netplus); }
.cb-sp { background: var(--secplus-light); color: var(--secplus); }
.bkmk { width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); transition: .15s; cursor: pointer; }
.bkmk:hover { border-color: var(--border2); }
.bkmk.on { border-color: var(--aplus); color: var(--aplus); background: var(--aplus-light); }
.quiz-prog { height: 2px; background: var(--border); border-radius: 1px; margin-bottom: 28px; overflow: hidden; }
.quiz-prog-fill { height: 100%; background: var(--text); border-radius: 1px; transition: width .3s; }
.timer-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.t-fill { height: 100%; border-radius: 2px; transition: width .1s linear; background: var(--netplus); }
.t-fill.tw { background: var(--medium); } .t-fill.td { background: var(--hard); }
.t-txt { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; margin-bottom: 14px; }
.q-dom { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 5px; }
.q-top { font-family: var(--body); font-style: italic; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.q-text { font-family: var(--body); font-size: 20px; line-height: 1.6; color: var(--text); margin-bottom: 24px; font-weight: 500; }
.option { width: 100%; text-align: left; padding: 14px 18px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--body); font-size: 15px; margin-bottom: 10px; transition: .12s; cursor: pointer; display: flex; align-items: flex-start; gap: 12px; line-height: 1.55; }
.option:hover:not(:disabled) { border-color: var(--border2); background: var(--bg); }
.option:disabled { cursor: default; }
.option.correct { border-color: var(--easy); background: var(--easy-light); color: #064e3b; }
.option.wrong { border-color: var(--hard); background: var(--hard-light); color: #7f1d1d; }
.option.faded { opacity: .35; }
.opt-l { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--faint); flex-shrink: 0; padding-top: 2px; min-width: 14px; }
.ex-box { border-radius: var(--r); padding: 16px 20px; margin-top: 14px; }
.ex-c { background: var(--easy-light); border: 1px solid rgba(26,150,87,.25); }
.ex-w { background: var(--hard-light); border: 1px solid rgba(220,38,38,.25); }
.ex-title { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.ex-title.c { color: var(--easy); } .ex-title.w { color: var(--hard); }
.ex-text { font-family: var(--body); font-size: 14px; color: var(--muted); line-height: 1.75; }
.tip-box { background: var(--aplus-light); border: 1px solid rgba(224,90,0,.2); border-radius: var(--r); padding: 12px 16px; margin-top: 12px; }
.tip-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--aplus); font-weight: 600; margin-bottom: 4px; }
.tip-text { font-family: var(--body); font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ===== RESULTS ===== */
.result-wrap { max-width: 740px; margin: 0 auto; padding: 40px 2rem 80px; min-height: 100vh; }
.result-score { font-family: var(--display); font-size: 80px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.result-score.pass { color: var(--easy); } .result-score.fail { color: var(--hard); }
.r-grade { font-family: var(--display); font-size: 18px; font-weight: 700; margin-top: 6px; }
.r-detail { font-family: var(--body); font-size: 14px; color: var(--muted); margin-top: 6px; }
.r-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 28px; }
.r-topic-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rtb-label { font-size: 13px; color: var(--muted); width: 140px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--body); }
.rtb-track { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.rtb-fill { height: 100%; border-radius: 3px; }
.rtb-pct { font-family: var(--mono); font-size: 11px; width: 34px; text-align: right; }
.rv-item { border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; background: var(--surface); }
.rv-item.rv-c { border-left: 3px solid var(--easy); } .rv-item.rv-w { border-left: 3px solid var(--hard); }
.rv-q { font-family: var(--body); font-size: 14px; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.rv-ans { font-family: var(--mono); font-size: 12px; }

/* ===== SAVED ===== */
.sv-item { border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; background: var(--surface); cursor: pointer; transition: .15s; }
.sv-item:hover { border-color: var(--border2); }
.sv-item.sv-c { border-left: 3px solid var(--easy); } .sv-item.sv-w { border-left: 3px solid var(--hard); } .sv-item.sv-u { border-left: 3px solid var(--border2); }
.sv-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ===== FLASHCARD ===== */
.fc-shell { cursor: pointer; perspective: 1200px; min-height: 260px; margin-bottom: 20px; }
.fc-inner { position: relative; width: 100%; min-height: 260px; transition: transform .45s ease; transform-style: preserve-3d; }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r2); padding: 40px 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 260px; }
.fc-back { transform: rotateY(180deg); }
.fc-tag-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.fc-term-text { font-family: var(--display); font-size: clamp(20px,4vw,30px); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--text); }
.fc-hint-text { font-family: var(--body); font-size: 13px; color: var(--faint); margin-top: 20px; }
.fc-def-text { font-family: var(--body); font-size: 15px; line-height: 1.75; color: var(--text); }
.fc-extra { font-family: var(--mono); font-size: 11px; color: var(--aplus); margin-top: 14px; padding: 7px 14px; background: var(--aplus-light); border-radius: var(--r); max-width: 100%; }
.fc-rate-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 14px; }
.fcr { padding: 10px 6px; border-radius: var(--r); font-family: var(--display); font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s; border: 1.5px solid; }
.fcr-h { border-color: var(--hard); background: var(--hard-light); color: var(--hard); }
.fcr-m { border-color: var(--medium); background: var(--medium-light); color: var(--medium); }
.fcr-e { border-color: var(--easy); background: var(--easy-light); color: var(--easy); }

/* ===== STATS ===== */
.streak-num { font-family: var(--display); font-size: 60px; font-weight: 800; line-height: 1; color: var(--aplus); }
.ach-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); font-family: var(--display); font-size: 15px; font-weight: 700; margin-top: 8px; }
.cert-stat-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; margin-bottom: 10px; }
.s-topic-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.stb-l { font-size: 13px; color: var(--muted); width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--body); }
.stb-t { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.stb-f { height: 100%; border-radius: 2px; }
.stb-p { font-family: var(--mono); font-size: 11px; width: 34px; text-align: right; }
.stb-n { font-family: var(--mono); font-size: 10px; color: var(--faint); width: 22px; text-align: right; }
.sess-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }

/* ===== SETTINGS ===== */
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 20px 24px; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-lbl { font-family: var(--display); font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.set-desc { font-family: var(--body); font-size: 12px; color: var(--muted); }
.tgl { position: relative; width: 42px; height: 22px; flex-shrink: 0; }
.tgl input { opacity: 0; width: 0; height: 0; position: absolute; }
.tgl-track { position: absolute; inset: 0; background: var(--border); border-radius: 22px; cursor: pointer; transition: .2s; border: 1.5px solid var(--border2); }
.tgl-track::before { content: ''; position: absolute; height: 16px; width: 16px; left: 2px; bottom: 1px; background: var(--muted); border-radius: 50%; transition: .2s; }
.tgl input:checked + .tgl-track { background: var(--text); border-color: var(--text); }
.tgl input:checked + .tgl-track::before { transform: translateX(19px); background: #fff; }
.seg { display: flex; border: 1.5px solid var(--border2); border-radius: var(--r); overflow: hidden; flex-shrink: 0; }
.seg-o { font-family: var(--display); font-weight: 700; font-size: 12px; padding: 7px 16px; color: var(--muted); transition: .15s; cursor: pointer; border-right: 1px solid var(--border2); }
.seg-o:last-child { border-right: none; }
.seg-o.on { background: var(--text); color: #fff; }
.seg-o:not(.on):hover { background: var(--border); color: var(--text); }
.set-sel { font-family: var(--mono); font-size: 12px; padding: 7px 12px; border: 1.5px solid var(--border2); border-radius: var(--r); background: var(--surface); color: var(--text); cursor: pointer; outline: none; }

/* ===== RESOURCES ===== */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; }
.res-item { display: flex; gap: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.res-icon { font-size: 22px; flex-shrink: 0; }
.res-body strong { font-family: var(--display); font-size: 14px; font-weight: 700; display: block; margin-bottom: 3px; }
.res-body p { font-family: var(--body); font-size: 13px; color: var(--muted); margin: 0; }

/* ===== CHEAT SHEET ===== */
.cs-port-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 8px; }
.cs-port-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.cs-pn { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); }
.cs-pp { font-family: var(--display); font-size: 13px; font-weight: 700; margin: 3px 0; }
.cs-pt { font-family: var(--mono); font-size: 10px; }
.cs-osi { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin-bottom: 16px; }
.cs-osi-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 6px; text-align: center; }
.cs-ln { font-family: var(--mono); font-weight: 700; font-size: 18px; }
.cs-lname { font-family: var(--display); font-weight: 700; font-size: 11px; margin: 4px 0; }
.cs-lex { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ===== FOOTER ===== */
.site-footer { text-align: center; padding: 24px 2rem; font-family: var(--body); font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .cert-cards { grid-template-columns: 1fr; }
  .stat-row, .r-grid { grid-template-columns: 1fr 1fr; }
  .cs-osi { grid-template-columns: repeat(4,1fr); }
  .domain-pct { display: none; }
  .topic-grid { grid-template-columns: 1fr; }
  .home-hero { padding: 48px 1rem 40px; }
  .cert-header { padding: 40px 1rem 36px; }
  .quiz-wrap, .result-wrap { padding: 24px 1rem 60px; }
  .notes-inner { padding: 32px 1rem 60px; }
  .home-content { padding: 36px 1rem 52px; }
  .btn-row { flex-direction: column; }
}

/* ===== CLEAN NAV / FLOW UPDATE ===== */
.nav-context { display:none; }
.context-nav .nav-home-only { display:none; }
.context-nav .nav-context { display:inline-flex; }
.site-footer { text-align:center; padding:22px 2rem; font-family:var(--mono); font-size:11px; color:var(--faint); border-top:1px solid var(--border); background:var(--surface); }
.cert-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:26px; }
.btn-light { background:#fff; color:var(--text); border-color:#fff; }
.btn-light:hover { opacity:.9; }
.btn-light-outline { border-color:rgba(255,255,255,.35); color:#fff; background:transparent; }
.btn-light-outline:hover { border-color:#fff; }
.notes-bottom { text-align:center; padding:0 2rem 42px; background:var(--bg); }
.section-kicker { font-family:var(--mono); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); margin-bottom:8px; }
.practice-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:8px 0 24px; }
.practice-title { font-family:var(--display); font-size:clamp(28px,4vw,46px); font-weight:800; letter-spacing:-.02em; line-height:1.05; }
.practice-sub { color:var(--muted); font-size:15px; max-width:620px; margin-top:10px; }
.practice-head-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.filter-panel-clean { overflow:visible; }
.dropdown-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; align-items:start; }
.filter-dd { position:relative; }
.dd-toggle { width:100%; border:1.5px solid var(--border); background:var(--surface); border-radius:var(--r); padding:12px 14px; text-align:left; display:flex; flex-direction:column; gap:3px; transition:.15s; }
.dd-toggle:hover { border-color:var(--border2); }
.dd-toggle span { font-family:var(--mono); font-size:9px; letter-spacing:.12em; text-transform:uppercase; color:var(--faint); }
.dd-toggle strong { font-family:var(--display); font-size:13px; color:var(--text); }
.dd-menu { display:none; position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:20; background:var(--surface); border:1px solid var(--border); border-radius:var(--r); box-shadow:0 14px 35px rgba(0,0,0,.12); padding:8px; max-height:260px; overflow:auto; }
.dd-menu.open { display:block; }
.dd-menu label { display:flex; align-items:center; gap:8px; padding:8px 9px; border-radius:8px; font-family:var(--body); font-size:13px; color:var(--muted); cursor:pointer; line-height:1.35; }
.dd-menu label:hover { background:var(--bg); color:var(--text); }
.dd-menu input { accent-color:var(--text); }
.question-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:22px 0 14px; font-family:var(--body); color:var(--muted); }
.question-toolbar strong { color:var(--text); font-family:var(--display); }
.question-list { display:grid; gap:10px; }
.question-row { background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--text); border-radius:var(--r); padding:14px 16px; display:flex; gap:16px; align-items:center; justify-content:space-between; }
.question-row.ql-ap { border-left-color:var(--aplus); }
.question-row.ql-np { border-left-color:var(--netplus); }
.question-row.ql-sp { border-left-color:var(--secplus); }
.qrow-main { min-width:0; }
.qrow-title { font-family:var(--body); font-size:15px; color:var(--text); line-height:1.45; }
.qrow-meta { margin-top:6px; font-family:var(--mono); font-size:10px; color:var(--faint); text-transform:uppercase; letter-spacing:.04em; }
.empty-list { padding:34px; text-align:center; color:var(--faint); background:var(--surface); border:1px dashed var(--border2); border-radius:var(--r); }
.q-text { font-size:var(--quiz-font-size, 20px); }

/* ===== DARK MODE ===== */
body.dark-mode {
  --bg:#111315; --surface:#1a1d20; --border:#2b3035; --border2:#3b434a;
  --text:#f3f0e8; --muted:#bbb4aa; --faint:#827b72;
  --aplus-light:#3a2114; --netplus-light:#13293d; --secplus-light:#123323;
  --easy-light:#123323; --medium-light:#38270f; --hard-light:#3b1515;
}
body.dark-mode .topnav { background:#0b0c0d; }
body.dark-mode .home-hero { background:#0b0c0d; }
body.dark-mode .cert-card { background:rgba(255,255,255,.05); }
body.dark-mode .dd-menu { box-shadow:0 14px 35px rgba(0,0,0,.45); }
body.dark-mode .option.correct { color:#d7fbe8; }
body.dark-mode .option.wrong { color:#ffd6d6; }

@media (max-width: 760px){
  .topnav { padding:0 .85rem; gap:8px; }
  .nav-brand { font-size:12px; }
  .nav-action { padding:5px 9px; }
  .practice-head, .question-toolbar { flex-direction:column; align-items:stretch; }
  .cert-cards { grid-template-columns:1fr; }
  .cc-name { font-size:36px; }
}
.cc-name { white-space:nowrap; letter-spacing:-.04em; }
.mn { font-family:var(--display) !important; font-size:15px !important; font-weight:800; letter-spacing:0 !important; font-variant-numeric:tabular-nums; }


/* ===== POLISH PASS: cleaner navigation, even cards, better number typography ===== */
.topnav{
  display:grid;
  grid-template-columns:minmax(170px,1fr) auto minmax(170px,1fr);
  gap:18px;
  height:60px;
  padding:0 clamp(18px,4vw,56px);
  backdrop-filter: blur(14px);
}
.nav-brand{font-size:13px; letter-spacing:.08em; opacity:.95;}
.nav-links{
  justify-self:center;
  display:flex;
  gap:8px;
  padding:5px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.055);
  border-radius:999px;
}
.nav-pill{min-width:82px; padding:7px 14px; border-radius:999px; text-align:center;}
.nav-right{justify-self:end; gap:8px; flex-wrap:nowrap;}
.nav-action{padding:7px 12px; font-size:10px; border-radius:999px;}
.context-nav .nav-right{
  padding:4px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
  border-radius:999px;
}
.context-nav .nav-action{border-color:transparent; padding:6px 10px;}
.context-nav .nav-action.active{background:#fff; color:var(--text); border-color:#fff;}
.home-hero{padding-top:88px;}
.hero-inner{max-width:1080px;}
.home-hero h1{max-width:760px;}
.cert-cards{grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:20px;}
.cert-card{min-height:252px; justify-content:space-between; overflow:hidden;}
.cert-card::after{content:''; position:absolute; inset:auto 22px 0 22px; height:3px; border-radius:99px 99px 0 0; opacity:.85;}
.ap-card::after{background:var(--aplus);} .np-card::after{background:var(--netplus);} .sp-card::after{background:var(--secplus);}
.cc-code{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; font-weight:700; letter-spacing:.14em; font-size:10px;}
.cc-name{font-size:clamp(34px,3.3vw,48px); white-space:nowrap; letter-spacing:-.06em; line-height:.95; margin-bottom:14px;}
.ap-card .cc-name{font-size:clamp(42px,4.3vw,58px); letter-spacing:-.035em;}
.cc-desc{min-height:72px; max-width:310px;}
.cc-meta{flex-wrap:wrap; margin-bottom:18px;}
.cc-badge{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; font-weight:700; letter-spacing:.02em; font-size:11px;}
.mn,.cs-pn,.cs-ln,.cc-code,.cert-exam-code,.domain-pct,.q-counter,.qrow-meta,.stat-sub,.stat-lbl,.ac-abbr{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
  font-variant-numeric:tabular-nums !important;
  letter-spacing:0 !important;
}
.mn{font-size:14px !important; font-weight:800 !important; color:var(--text) !important;}
.cs-pn{font-size:17px !important; letter-spacing:-.01em !important;}
.cs-ln{font-size:20px !important; letter-spacing:-.02em !important;}
.n-table td:first-child{white-space:nowrap;}
.domain-nav{top:60px;}
.domain-sec{scroll-margin-top:118px;}
.mega-notes{margin:44px 0 0;}
.mega-title{font-family:var(--display); font-size:clamp(24px,3vw,34px); font-weight:800; letter-spacing:-.03em; margin:0 0 8px;}
.mega-sub{color:var(--muted); max-width:760px; margin:0 0 24px;}
.mega-domain{background:var(--surface); border:1px solid var(--border); border-radius:var(--r2); padding:22px; margin:16px 0; box-shadow:0 1px 0 rgba(0,0,0,.02);}
.mega-domain h3{font-family:var(--display); font-size:22px; letter-spacing:-.02em; margin:0 0 10px;}
.mega-domain p{color:var(--muted); margin:0 0 14px;}
.mega-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px;}
.mega-card{border:1px solid var(--border); background:var(--bg); border-radius:var(--r); padding:14px 15px;}
.mega-card h4{font-family:var(--display); font-size:14px; margin:0 0 8px;}
.mega-card ul{margin:0; padding-left:18px; color:var(--muted); font-size:13px; line-height:1.65;}
.mega-card li{margin:4px 0;}
.mega-callout{border-left:4px solid var(--text); background:var(--bg); border-radius:0 var(--r) var(--r) 0; padding:12px 14px; color:var(--muted); font-size:13px; margin:14px 0 0;}
.mega-ap{border-top:4px solid var(--aplus);} .mega-np{border-top:4px solid var(--netplus);} .mega-sp{border-top:4px solid var(--secplus);}
body.dark-mode .context-nav .nav-action.active{background:var(--text); color:#111315;}
body.dark-mode .mega-card, body.dark-mode .mega-callout{background:#151719;}
@media (max-width:900px){
  .topnav{grid-template-columns:1fr; height:auto; padding:12px 1rem; gap:10px;}
  .nav-brand,.nav-links,.nav-right{justify-self:center;}
  .nav-right{flex-wrap:wrap; justify-content:center;}
  .context-nav .nav-right{border-radius:18px;}
  .domain-nav{top:110px;}
  .cert-cards{grid-template-columns:1fr;}
  .cert-card{min-height:210px;}
}

/* ===== FINAL HOME + NAV FIXES ===== */
.topnav{
  display:grid !important;
  grid-template-columns:1fr auto 1fr !important;
  align-items:center !important;
  height:60px !important;
  padding:0 clamp(18px,3vw,42px) !important;
}
.nav-brand{justify-self:start !important; white-space:nowrap !important;}
.nav-links{
  justify-self:center !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:5px !important;
  background:rgba(255,255,255,.055) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:999px !important;
}
.nav-pill{
  min-width:62px !important;
  text-align:center !important;
  padding:7px 14px !important;
  border-radius:999px !important;
  line-height:1 !important;
}
.nav-right{justify-self:end !important; display:flex !important; align-items:center !important; gap:8px !important;}
.nav-home-only{display:inline-flex !important;}
.nav-context{display:none;}
body.cert-context .nav-home-only{display:none !important;}
body.cert-context .nav-context{display:inline-flex !important;}

.home-hero{padding-top:92px !important; padding-bottom:76px !important;}
.hero-inner{max-width:1120px !important;}
.cert-cards{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:22px !important;
  align-items:stretch !important;
}
.cert-card{
  min-width:0 !important;
  min-height:270px !important;
  padding:30px 30px 26px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  overflow:hidden !important;
}
.cc-code{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
  font-size:11px !important;
  font-weight:700 !important;
  letter-spacing:.055em !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
}
.cc-name{
  font-family:var(--display) !important;
  font-weight:800 !important;
  line-height:.92 !important;
  letter-spacing:-.045em !important;
  white-space:nowrap !important;
  max-width:100% !important;
  overflow:visible !important;
  text-overflow:clip !important;
  margin-bottom:16px !important;
}
.ap-card .cc-name{font-size:clamp(46px,4.2vw,62px) !important; letter-spacing:-.035em !important;}
.np-card .cc-name{font-size:clamp(33px,3.15vw,42px) !important; letter-spacing:-.055em !important;}
.sp-card .cc-name{font-size:clamp(32px,3.05vw,40px) !important; letter-spacing:-.055em !important;}
.cc-desc{min-height:64px !important; max-width:32ch !important; font-size:15px !important; line-height:1.55 !important;}
.cc-meta{display:flex !important; flex-wrap:wrap !important; gap:8px !important; margin-top:auto !important; margin-bottom:22px !important;}
.cc-badge{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
  font-size:11px !important;
  font-weight:700 !important;
  letter-spacing:.015em !important;
  white-space:nowrap !important;
}

@media (max-width:1050px){
  .hero-inner{max-width:900px !important;}
  .cert-cards{grid-template-columns:1fr !important;}
  .cert-card{min-height:210px !important;}
  .np-card .cc-name,.sp-card .cc-name{font-size:clamp(42px,9vw,58px) !important;}
}
@media (max-width:760px){
  .topnav{grid-template-columns:1fr !important; height:auto !important; padding:12px 16px !important; gap:10px !important;}
  .nav-brand,.nav-links,.nav-right{justify-self:center !important;}
  .nav-right{flex-wrap:wrap !important; justify-content:center !important;}
}

/* ===== CARD TITLE BALANCE FIX ===== */
.ap-card .cc-name{
  font-size:clamp(40px,3.6vw,52px) !important;
  letter-spacing:-.025em !important;
}
.np-card .cc-name{
  font-size:clamp(35px,3.05vw,43px) !important;
  letter-spacing:-.018em !important;
}
.sp-card .cc-name{
  font-size:clamp(34px,2.95vw,42px) !important;
  letter-spacing:-.018em !important;
}
@media (max-width:900px){
  .ap-card .cc-name,.np-card .cc-name,.sp-card .cc-name{
    font-size:clamp(42px,10vw,58px) !important;
    letter-spacing:-.025em !important;
  }
}


/* ===== CERTPRO LOGO / FAVICON UPDATE ===== */
.nav-brand{
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  text-transform:none !important;
  letter-spacing:.01em !important;
  font-size:15px !important;
}
.nav-logo{
  width:32px;
  height:32px;
  border-radius:8px;
  object-fit:cover;
  display:block;
  box-shadow:0 0 0 1px rgba(255,255,255,.10), 0 8px 18px rgba(0,0,0,.22);
}
.nav-brand span{
  color:#fff;
  font-family:var(--display);
  font-weight:800;
  line-height:1;
}
@media (max-width:760px){
  .nav-logo{width:30px;height:30px;}
  .nav-brand{font-size:14px !important;}
}


/* ===== Favicon-only branding update ===== */
.nav-brand{
  display:inline-flex !important;
  align-items:center !important;
  gap:0 !important;
  text-transform:none !important;
  letter-spacing:.01em !important;
  font-size:15px !important;
}
.nav-brand img{display:none !important;}
.nav-logo{display:none !important;}
.nav-brand span{
  color:#fff;
  font-family:var(--display);
  font-weight:800;
  line-height:1;
}
