/* PassForge design system - dark, modern, focused. */
:root {
  --bg: #0b0f1a;
  --bg-soft: #0f1524;
  --surface: #141b2e;
  --surface-2: #1a2340;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ebf4;
  --text-dim: #9aa3b8;
  --text-faint: #6b7488;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --grad: linear-gradient(120deg, #6366f1, #8b5cf6 55%, #22d3ee);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { opacity: 0.9; }
img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 15, 26, 0.8);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 62px;
}
.logo {
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px;
}
.logo .mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff;
}
.nav-links { display: flex; gap: 22px; align-items: center; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600;
  font-size: 0.93rem; cursor: pointer; font-family: var(--font);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}
.btn-ghost { background: transparent; }
.btn-green { background: var(--green); border: none; color: #052e1c; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; border-radius: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto;
  height: 480px; filter: blur(110px); opacity: 0.35; z-index: -1;
  background: radial-gradient(circle at 30% 40%, #6366f1, transparent 60%),
    radial-gradient(circle at 70% 30%, #22d3ee, transparent 55%);
}
.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 18px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  color: var(--text-dim); font-size: 1.12rem; max-width: 640px;
  margin: 0 auto 30px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 14px; color: var(--text-faint); font-size: 0.85rem; }

/* ---------- Sections / cards ---------- */
.section { padding: 56px 0; }
.section h2 {
  font-size: 1.7rem; font-weight: 750; letter-spacing: -0.02em;
  margin-bottom: 8px; text-align: center;
}
.section .lead { color: var(--text-dim); text-align: center; margin-bottom: 36px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; font-weight: 700; }
.card p { color: var(--text-dim); font-size: 0.92rem; }
.feature-ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; margin-bottom: 14px; font-size: 1.1rem;
}

/* ---------- Track cards ---------- */
.track-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; display: flex;
  flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s;
}
.track-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.track-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tc-accent, var(--accent));
}
.track-vendor {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-faint); font-weight: 700;
}
.track-card h3 { font-size: 1.06rem; font-weight: 700; color: var(--text); }
.track-meta { display: flex; gap: 14px; color: var(--text-dim); font-size: 0.84rem; }
.track-card .desc { color: var(--text-dim); font-size: 0.89rem; flex: 1; }
.track-cta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price-tag { font-weight: 800; font-size: 1.05rem; }
.price-tag .per { color: var(--text-faint); font-weight: 500; font-size: 0.8rem; }

/* ---------- Badges / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 99px; font-size: 0.74rem; font-weight: 700;
  border: 1px solid var(--border-strong); color: var(--text-dim);
}
.pill-free { color: var(--green); border-color: rgba(52, 211, 153, 0.4); }
.pill-pro { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.45); }
.pill-pass { color: var(--green); border-color: rgba(52, 211, 153, 0.4); }
.pill-fail { color: var(--red); border-color: rgba(248, 113, 113, 0.4); }

/* ---------- Forms ---------- */
.form-card {
  max-width: 420px; margin: 60px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.form-card h1 { font-size: 1.4rem; margin-bottom: 20px; letter-spacing: -0.02em; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.84rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-soft);
  color: var(--text); font-size: 0.95rem; font-family: var(--font);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.form-err {
  background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5; border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 0.87rem; margin-bottom: 16px;
}
.form-foot { margin-top: 18px; font-size: 0.87rem; color: var(--text-dim); text-align: center; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 12px 16px; text-align: left; }
table.data th {
  color: var(--text-faint); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.07em; border-bottom: 1px solid var(--border);
}
table.data tr + tr td { border-top: 1px solid var(--border); }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* ---------- Exam list on track page ---------- */
.exam-row {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px; flex-wrap: wrap;
}
.exam-row .info { flex: 1; min-width: 220px; }
.exam-row h3 { font-size: 1rem; font-weight: 700; }
.exam-row .meta { color: var(--text-dim); font-size: 0.83rem; }
.exam-row .actions { display: flex; gap: 10px; align-items: center; }
.lock-note { color: var(--text-faint); font-size: 0.85rem; display: flex; gap: 6px; align-items: center; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column;
}
.plan.hot { border-color: rgba(139, 92, 246, 0.55); box-shadow: 0 0 40px rgba(99, 102, 241, 0.18); position: relative; }
.plan.hot::before {
  content: "Most popular"; position: absolute; top: -11px; left: 50%;
  transform: translateX(-50%); background: var(--grad); color: #fff;
  font-size: 0.7rem; font-weight: 800; padding: 3px 12px; border-radius: 99px;
  letter-spacing: 0.04em;
}
.plan h3 { font-size: 1rem; color: var(--text-dim); font-weight: 700; }
.plan .amount { font-size: 2.1rem; font-weight: 800; margin: 8px 0 2px; letter-spacing: -0.03em; }
.plan .amount .per { font-size: 0.9rem; color: var(--text-faint); font-weight: 500; }
.plan ul { list-style: none; margin: 18px 0 22px; flex: 1; }
.plan li { padding: 6px 0; color: var(--text-dim); font-size: 0.9rem; display: flex; gap: 9px; }
.plan li::before { content: "✓"; color: var(--green); font-weight: 800; }
.plan li.no::before { content: "✕"; color: var(--text-faint); }

/* ---------- Player ---------- */
.player-shell { max-width: 1100px; margin: 0 auto; padding: 18px 20px 40px; }
.player-top {
  display: flex; align-items: center; gap: 16px; padding: 12px 0 16px;
  flex-wrap: wrap;
}
.player-top .exam-title { font-weight: 700; font-size: 0.98rem; }
.player-top .exam-sub { color: var(--text-faint); font-size: 0.8rem; }
.timer {
  margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800;
  font-size: 1.05rem; background: var(--surface); border: 1px solid var(--border-strong);
  padding: 7px 16px; border-radius: 10px;
}
.timer.low { color: var(--red); border-color: rgba(248, 113, 113, 0.5); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }
.progressbar { height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.progressbar > div { height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.25s ease; }

.player-grid { display: grid; grid-template-columns: 1fr 240px; gap: 24px; }
@media (max-width: 860px) { .player-grid { grid-template-columns: 1fr; } }

.qcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.qnum { font-weight: 800; color: var(--text-faint); font-size: 0.85rem; }
.qdomain { font-size: 0.72rem; color: var(--accent-2); background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.25); padding: 2px 10px; border-radius: 99px; font-weight: 700; }
.qtext { font-size: 1.06rem; line-height: 1.65; margin-bottom: 22px; white-space: pre-wrap; }
.multi-hint { color: var(--amber); font-size: 0.82rem; font-weight: 700; margin-bottom: 14px; }

.opt {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  margin-bottom: 10px; cursor: pointer; transition: border-color 0.12s, background 0.12s;
  font-size: 0.96rem;
}
.opt:hover { border-color: var(--accent); background: rgba(99, 102, 241, 0.06); }
.opt .key {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--border-strong); display: flex; align-items: center;
  justify-content: center; font-size: 0.78rem; font-weight: 800; color: var(--text-dim);
  margin-top: 1px;
}
.opt.selected { border-color: var(--accent); background: rgba(99, 102, 241, 0.13); }
.opt.selected .key { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt.correct { border-color: var(--green); background: rgba(52, 211, 153, 0.1); }
.opt.correct .key { background: var(--green); border-color: var(--green); color: #052e1c; }
.opt.wrong { border-color: var(--red); background: rgba(248, 113, 113, 0.09); }
.opt.wrong .key { background: var(--red); border-color: var(--red); color: #450a0a; }
.opt.reveal-dim { opacity: 0.6; }

.feedback {
  border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 16px;
  font-size: 0.92rem; border: 1px solid;
}
.feedback.ok { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.35); }
.feedback.ko { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); }
.feedback .verdict { font-weight: 800; margin-bottom: 6px; }
.feedback .ref { margin-top: 8px; font-size: 0.83rem; }

.player-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.flag-btn.on { color: var(--amber); border-color: rgba(251, 191, 36, 0.5); }
.spacer { flex: 1; }

.navigator { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: 80px; }
.navigator h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 12px; }
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 7px; }
.navgrid button {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-dim); font-weight: 700;
  font-size: 0.78rem; cursor: pointer; font-family: var(--font);
}
.navgrid button.answered { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.navgrid button.flagged { border-color: var(--amber); color: var(--amber); }
.navgrid button.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-legend { margin-top: 14px; font-size: 0.75rem; color: var(--text-faint); display: flex; flex-direction: column; gap: 5px; }
.nav-legend span { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Results ---------- */
.result-hero { text-align: center; padding: 48px 0 12px; }
.score-ring { position: relative; width: 190px; height: 190px; margin: 0 auto 18px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .val {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800;
}
.score-ring .val small { font-size: 0.8rem; color: var(--text-faint); font-weight: 600; }
.verdict-line { font-size: 1.25rem; font-weight: 750; margin-bottom: 6px; }
.verdict-line.pass { color: var(--green); }
.verdict-line.fail { color: var(--red); }
.result-sub { color: var(--text-dim); }

.domainbar { margin-bottom: 14px; }
.domainbar .row { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 6px; }
.domainbar .row .pct { font-weight: 700; }
.domainbar .bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.domainbar .bar > div { height: 100%; border-radius: 99px; }

.locked-box {
  border: 1px dashed rgba(139, 92, 246, 0.5); border-radius: var(--radius);
  padding: 30px; text-align: center; background: rgba(99, 102, 241, 0.05);
}
.locked-box h3 { margin-bottom: 8px; }
.locked-box p { color: var(--text-dim); margin-bottom: 18px; }

.blur-teaser { filter: blur(6px); pointer-events: none; user-select: none; opacity: 0.55; }

/* ---------- Review ---------- */
.review-filters { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.review-filters .btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.review-q { margin-bottom: 18px; }
.review-q .status-ico { font-weight: 800; }
.explain {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 14px;
  font-size: 0.92rem; color: var(--text-dim);
}
.explain b { color: var(--text); }

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.tile .k { color: var(--text-faint); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; }
.tile .v { font-size: 1.5rem; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 60px; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-faint); font-size: 0.84rem; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-note { flex-basis: 100%; margin-top: 4px; }

/* ---------- Legal pages ---------- */
.legal-page { padding: 40px 0 20px; }
.legal-page h3 { margin: 28px 0 8px; font-size: 1.05rem; }
.legal-page p, .legal-page li { color: var(--text-dim); font-size: 0.95rem; }
.legal-page ul { margin: 8px 0 8px 20px; }
.legal-page li { margin: 4px 0; }
.form-hint a { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Page headers ---------- */
.page-head { padding: 44px 0 10px; }
.page-head h1 { font-size: 1.9rem; letter-spacing: -0.025em; font-weight: 800; }
.page-head p { color: var(--text-dim); margin-top: 6px; }

.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.center { text-align: center; }
.muted { color: var(--text-dim); }
.small { font-size: 0.85rem; }
