/* Part107Prep — styles */
:root {
  --navy: #0a2540;
  --navy-2: #123a5e;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --green: #059669;
  --green-soft: #ecfdf5;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 1px 2px rgba(10, 37, 64, .04), 0 8px 24px rgba(10, 37, 64, .06);
  --shadow-lg: 0 20px 48px rgba(10, 37, 64, .12);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

/* ---------- Container ---------- */
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.wrap-narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--navy); letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; }
.brand span b { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--navy); }
.nav-links a.active { color: var(--blue); }
.nav-cta { padding: 10px 18px !important; background: var(--blue) !important; color: white !important; border-radius: 10px; }
.nav-cta:hover { background: var(--blue-dark) !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; font-weight: 700; font-size: .97rem;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
}
.btn-primary { background: var(--blue); color: white; box-shadow: 0 4px 14px rgba(37,99,235,.25); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.32); }
.btn-dark { background: var(--navy); color: white; }
.btn-dark:hover { background: var(--navy-2); transform: translateY(-1px); }
.btn-outline { background: white; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-amber { background: var(--amber); color: #422006; }
.btn-amber:hover { background: #e69007; transform: translateY(-1px); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-sm { padding: 9px 14px; font-size: .86rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(37,99,235,.14), transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding: 80px 0 72px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  background: var(--blue-soft); color: var(--blue-dark); border: 1px solid #dbeafe;
  border-radius: 999px; font-size: .82rem; font-weight: 700; margin-bottom: 22px;
}
.badge .dot { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.45rem); line-height: 1.12; color: var(--navy); letter-spacing: -.035em; font-weight: 800; }
.hero h1 .accent { color: var(--blue); }
.hero p.lead { font-size: 1.12rem; color: var(--muted); margin: 22px 0 30px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .82rem; color: #94a3b8; }

.hero-card {
  background: white; border: 1px solid var(--line); border-radius: 22px;
  padding: 28px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--blue), var(--amber)); }
.hero-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.hero-card-head .tag { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero-card-head .score { font-size: .82rem; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 5px 10px; border-radius: 8px; }
.hero-q { font-weight: 700; color: var(--navy); margin-bottom: 16px; line-height: 1.45; }
.hero-opts { display: grid; gap: 10px; }
.hero-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; color: var(--ink); }
.hero-opt .key { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--bg); font-size: .76rem; font-weight: 800; color: var(--muted); flex: none; }
.hero-opt.correct { border-color: #a7f3d0; background: var(--green-soft); }
.hero-opt.correct .key { background: var(--green); color: white; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-sm { padding: 52px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .kicker { color: var(--blue); font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.35rem); color: var(--navy); letter-spacing: -.03em; margin: 10px 0 14px; line-height: 1.2; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); margin-bottom: 18px;
}
.feature .icon svg { width: 23px; height: 23px; }
.feature h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .92rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 16px; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.stat .label { color: var(--muted); font-size: .86rem; margin-top: 4px; }

.cta-band { background: linear-gradient(135deg, var(--navy) 0%, #164e78 100%); border-radius: 24px; padding: 56px 40px; text-align: center; color: white; }
.cta-band h2 { font-size: 2rem; letter-spacing: -.03em; margin-bottom: 12px; }
.cta-band p { color: #cbd5e1; max-width: 520px; margin: 0 auto 26px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: white; border-top: 1px solid var(--line); padding: 40px 0 28px; margin-top: 20px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); font-size: .88rem; max-width: 340px; margin-top: 12px; }
.footer-col h4 { color: var(--navy); font-size: .9rem; margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: #94a3b8; font-size: .8rem; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- App (practice / exam) ---------- */
.app-shell { padding: 36px 0 70px; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.app-top h1 { font-size: 1.6rem; color: var(--navy); letter-spacing: -.02em; }
.app-top .sub { color: var(--muted); font-size: .9rem; }
.app-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pill { padding: 7px 12px; border-radius: 999px; background: white; border: 1px solid var(--line); font-size: .84rem; font-weight: 700; color: var(--navy); }
.pill.timer { background: var(--amber-soft); border-color: #fde68a; color: #92400e; font-variant-numeric: tabular-nums; }
.pill.timer.low { background: var(--red-soft); border-color: #fecaca; color: var(--red); }

.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--blue), #60a5fa); border-radius: 999px; transition: width .3s ease; width: 0; }

.q-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.q-card .q-cat { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); background: var(--blue-soft); padding: 5px 10px; border-radius: 7px; margin-bottom: 16px; }
.q-card h2 { font-size: 1.22rem; color: var(--navy); line-height: 1.5; margin-bottom: 22px; }
.opts { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px; padding: 15px 18px;
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  background: white; text-align: left; transition: all .15s; width: 100%;
}
.opt:hover:not(:disabled) { border-color: #93c5fd; background: #f8fbff; }
.opt .letter { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--bg); color: var(--muted); font-weight: 800; font-size: .82rem; display: grid; place-items: center; }
.opt.selected { border-color: var(--blue); background: var(--blue-soft); }
.opt.selected .letter { background: var(--blue); color: white; }
.opt.correct { border-color: #6ee7b7; background: var(--green-soft); }
.opt.correct .letter { background: var(--green); color: white; }
.opt.wrong { border-color: #fca5a5; background: var(--red-soft); }
.opt.wrong .letter { background: var(--red); color: white; }
.opt:disabled { cursor: default; }

.explain { margin-top: 20px; padding: 18px 20px; border-radius: 12px; font-size: .92rem; line-height: 1.6; }
.explain.good { background: var(--green-soft); border: 1px solid #a7f3d0; color: #065f46; }
.explain.bad { background: var(--red-soft); border: 1px solid #fecaca; color: #991b1b; }
.explain strong { display: block; margin-bottom: 4px; }
.q-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.q-actions .hint { color: var(--muted); font-size: .86rem; }

/* Results */
.result-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); text-align: center; }
.result-score { font-size: 4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--navy); }
.result-score.pass { color: var(--green); }
.result-score.fail { color: var(--red); }
.result-label { color: var(--muted); margin: 10px 0 24px; }
.result-detail { display: flex; justify-content: center; gap: 30px; margin-bottom: 28px; flex-wrap: wrap; }
.result-detail div { min-width: 110px; }
.result-detail .v { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.result-detail .k { color: var(--muted); font-size: .84rem; }
.review-list { text-align: left; margin-top: 26px; display: grid; gap: 16px; }
.review-item { border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.review-item .rq { font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.review-item .ra { font-size: .9rem; color: var(--green); font-weight: 600; }
.review-item .re { font-size: .86rem; color: var(--muted); margin-top: 6px; }

/* Resources */
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.res-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.res-card .res-type { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--amber); }
.res-card h3 { color: var(--navy); margin: 8px 0 10px; font-size: 1.15rem; }
.res-card p { color: var(--muted); font-size: .92rem; flex: 1; }
.res-card .res-link { margin-top: 18px; color: var(--blue); font-weight: 700; font-size: .9rem; }
.res-card .res-link:hover { text-decoration: underline; }
.notice { background: var(--amber-soft); border: 1px solid #fde68a; border-radius: 12px; padding: 16px 20px; color: #92400e; font-size: .9rem; margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-card { max-width: 540px; }
  .features { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 620px) {
  .hero { padding: 52px 0 44px; }
  .section { padding: 52px 0; }
  .features, .stats, .res-grid { grid-template-columns: 1fr; }
  .q-card { padding: 22px; }
  .cta-band { padding: 40px 24px; }
  .footer-bottom { flex-direction: column; }
}
