/* ==========================================================================
   NextMocks — public pages (loaded after css/style.css)
   Contents
     1. Header and footer refinements
     2. Shared: buttons, icons, eyebrow, breadcrumb, section heads, filters
     3. Home
     4. Directory: vendors, vendor page, all exams (rows)
     5. Exam page (free questions)
     6. Free mock exam
     7. Buy page tweaks, 404, prose
   ========================================================================== */


/* ==========================================================================
   1. Header and footer
   ========================================================================== */
.sh { background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); }
.sh-top { display: none; }
.sh-logo { gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.sh-logo:hover { color: var(--ink); }
.sh-mark { display: block; width: 30px; height: 30px; background: none; border-radius: 0; }
.sh-mark svg { display: block; width: 30px; height: 30px; }
.sh-mark rect { fill: var(--night); }
.sh-mark path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sh-mark circle { fill: #f97316; stroke: none; }
.sh-word b, .sh-logo .sh-word b { font-weight: 700; color: var(--accent); }
.sh-tag { margin-left: 2px; padding-left: 12px; font-size: 13px; font-weight: 500; }
.sh-links a { padding: 8px 12px; font-size: 14.5px; font-weight: 500; color: var(--text); border-radius: var(--r-sm); }
.sh-links a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.sh-links a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: none; background: var(--surface-2); }
.sh-actions a { min-height: 38px; border-radius: var(--r); font-size: 14.5px; }
.sh-actions a.is-primary, .sh-actions a:only-child { background: var(--ink); border-color: var(--ink); color: #fff; }
.sh-actions a.is-primary:hover, .sh-actions a:only-child:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.sf { background: var(--night); border-top: 0; color: var(--on-night-muted); }
.sf .sh-logo, .sf .sh-logo:hover { color: #fff; }
.sf .sh-word b { color: var(--sky); }
.sf .sh-mark rect { fill: var(--accent); }
.sf .sh-mark circle { fill: #fff; }
.sf-brand p { color: var(--on-night-muted); }
.sf-cols h2 { color: #fff; font-size: 12.5px; letter-spacing: .08em; }
.sf-cols a { color: var(--on-night-muted); }
.sf-cols a:hover { color: #fff; }
.sf-bottom { border-top: 1px solid var(--night-line); color: #a39a91; }
.sf-disc { font-size: 12.5px; }


/* ==========================================================================
   2. Shared
   ========================================================================== */
.nm-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.nm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border: 1px solid var(--accent); border-radius: var(--r);
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.nm-btn:hover, .nm-btn:focus-visible { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.nm-btn:disabled { opacity: .45; cursor: default; }
.nm-btn--light { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.nm-btn--light:hover, .nm-btn--light:focus-visible { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.nm-btn--white { background: #fff; border-color: #fff; color: var(--ink); }
.nm-btn--white:hover, .nm-btn--white:focus-visible { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--ink); }
.nm-btn--lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.nm-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.nm-btn--block { display: flex; width: 100%; }
.nm-btn .nm-i { width: 17px; height: 17px; }

.nm-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--accent); white-space: nowrap; }
.nm-link:hover { color: var(--accent-ink); }
.nm-link .nm-i { width: 16px; height: 16px; transition: transform .15s; }
.nm-link:hover .nm-i { transform: translateX(3px); }

.nm-eyebrow { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.nm-eyebrow--night { color: var(--sky); }
.nm-lead { max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--muted); }

.nm-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 14px; color: var(--muted); }
.nm-crumb a { color: var(--muted); }
.nm-crumb a:hover { color: var(--accent); }
.nm-crumb span[aria-hidden] { color: var(--line-3); }

.nm-section { padding: 72px 0; }
.nm-section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nm-section--tight { padding: 40px 0 56px; }
.nm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.nm-head h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 700; letter-spacing: -.025em; }
.nm-head p { margin-top: 8px; color: var(--muted); font-size: 16.5px; }
.nm-head--center { justify-content: center; text-align: center; }

.nm-page-hero { padding: 40px 0 36px; background: var(--surface); border-bottom: 1px solid var(--line); }
.nm-page-hero h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; letter-spacing: -.03em; margin-bottom: 12px; }

/* Search / filter inputs */
.nm-search { position: relative; display: flex; align-items: center; max-width: 620px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 1px 2px rgba(28, 25, 23, .05); transition: border-color .15s, box-shadow .15s; }
.nm-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.nm-search > .nm-i { margin: 0 4px 0 12px; color: var(--muted); }
.nm-search input { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border: 0; background: none; font-size: 16px; color: var(--ink); }
.nm-search input::placeholder { color: var(--line-3); }
.nm-search .nm-btn { min-height: 44px; }

.nm-filterbar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.nm-filter { position: relative; display: flex; align-items: center; gap: 10px; flex: 1 1 360px; max-width: 560px; height: 48px; margin: 24px 0 0; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.nm-filterbar .nm-filter { margin: 0; }
.nm-filter:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.nm-filter .nm-i { color: var(--muted); }
.nm-filter input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 15.5px; color: var(--ink); }
.nm-filter-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.nm-filter--sm { flex: 0 1 320px; height: 42px; margin: 0; }
.nm-select select { height: 48px; padding: 0 40px 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6779' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; font-size: 15px; color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer; }
.nm-select select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

.nm-empty { margin-top: 24px; color: var(--muted); }
.nm-empty-box { margin-top: 24px; padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.nm-empty-box h2 { font-size: 20px; margin-bottom: 8px; }
.nm-empty-box p { color: var(--muted); margin-bottom: 18px; }
.nm-soon { font-size: 13px; color: var(--muted); }


/* ==========================================================================
   3. Home
   ========================================================================== */
.nm-hero { position: relative; overflow: hidden; padding: 72px 0 80px; background: var(--surface); border-bottom: 1px solid var(--line); }
.nm-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; opacity: .45; -webkit-mask-image: radial-gradient(ellipse 60% 70% at 80% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 80% 40%, #000 20%, transparent 75%); pointer-events: none; }
.nm-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; }
.nm-hero h1 { margin-bottom: 18px; font-size: clamp(36px, 5vw, 56px); font-weight: 750; line-height: 1.06; letter-spacing: -.035em; }
.nm-hero .nm-lead { margin-bottom: 28px; }
.nm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.nm-chips a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); }
.nm-chips a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }

/* decorative exam window */
.nm-hero-art { position: relative; padding: 8px 0 40px; }
.nm-art-exam { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(28, 25, 23, .14), 0 2px 6px rgba(28, 25, 23, .06); overflow: hidden; }
.nm-art-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--night); color: #fff; font-size: 13px; }
.nm-art-title { font-weight: 600; }
.nm-art-timer { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-family: var(--mono); font-size: 12.5px; }
.nm-art-timer .nm-i { width: 14px; height: 14px; }
.nm-art-progress { height: 3px; background: var(--surface-2); }
.nm-art-progress i { display: block; width: 38%; height: 100%; background: var(--accent); }
.nm-art-q { padding: 18px 18px 6px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.nm-art-q b { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nm-art-opts { display: grid; gap: 8px; padding: 8px 18px 16px; }
.nm-art-opts li { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; color: var(--text); }
.nm-art-opts li.is-picked { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.nm-art-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.nm-art-foot span { display: inline-flex; align-items: center; gap: 6px; }
.nm-art-foot .nm-i { width: 14px; height: 14px; }
.nm-art-next { padding: 5px 14px; border-radius: var(--r-sm); background: var(--accent); color: #fff; font-weight: 600; }
.nm-art-result { position: absolute; right: -14px; bottom: 0; display: grid; gap: 2px; min-width: 190px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(28, 25, 23, .16); }
.nm-art-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nm-art-score { font-size: 40px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.nm-art-score small { font-size: 20px; color: var(--muted); }
.nm-art-pass { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--score); }
.nm-art-pass .nm-i { width: 15px; height: 15px; stroke-width: 2.6; }

/* stats strip */
.nm-stats { background: var(--night); color: #fff; }
.nm-stats ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.nm-stats li { display: grid; gap: 2px; padding: 26px 24px; border-left: 1px solid var(--night-line); }
.nm-stats li:first-child { border-left: 0; padding-left: 0; }
.nm-stats b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.nm-stats span { font-size: 14px; color: var(--on-night-muted); }

/* vendor tiles */
.nm-vendors { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.nm-vendor { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; height: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.nm-vendor:hover { border-color: var(--accent-line); box-shadow: var(--shadow-soft); color: var(--ink); transform: translateY(-1px); }
.nm-vendor-mark { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.nm-vendor-mark--lg { width: 72px; height: 72px; border-radius: 16px; font-size: 24px; }
.nm-vendor-name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.nm-vendor-meta { font-size: 13.5px; color: var(--muted); }
.nm-section--alt .nm-vendor { background: var(--bg); }

/* exam cards */
.nm-exams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.nm-exam { position: relative; display: flex; flex-direction: column; height: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, box-shadow .15s; }
.nm-section--alt .nm-exam { background: var(--bg); }
.nm-exam:hover { border-color: var(--accent-line); box-shadow: var(--shadow-soft); background: var(--surface); }
.nm-exam-vendor { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nm-exam h3 { margin: 8px 0 14px; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.nm-exam h3 a { color: var(--ink); }
.nm-exam h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.nm-exam-code { display: block; margin-bottom: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.nm-exam-facts { display: grid; gap: 6px; margin-bottom: 18px; font-size: 13.5px; color: var(--muted); }
.nm-exam-facts li { display: flex; align-items: center; gap: 8px; }
.nm-exam-facts .nm-i { width: 15px; height: 15px; }
.nm-exam-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); }
.nm-exam-go .nm-i { width: 15px; height: 15px; transition: transform .15s; }
.nm-exam:hover .nm-exam-go .nm-i { transform: translateX(3px); }

/* plans */
.nm-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 920px; margin: 0 auto; }
.nm-plan { display: flex; flex-direction: column; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.nm-plan h3 { margin: 10px 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.nm-plan > p { color: var(--muted); margin-bottom: 20px; }
.nm-plan ul { display: grid; gap: 12px; margin-bottom: 28px; }
.nm-plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.nm-plan li .nm-i { margin-top: 3px; color: var(--accent); }
.nm-plan .nm-btn { margin-top: auto; align-self: flex-start; }
.nm-plan-tag { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--text); }
.nm-plan--full { background: var(--night); border-color: var(--night); color: var(--on-night-muted); }
.nm-plan--full h3 { color: #fff; }
.nm-plan--full > p { color: var(--on-night-muted); }
.nm-plan--full li { color: #eee8e2; }
.nm-plan--full li .nm-i { color: var(--sky); }
.nm-plan--full .nm-plan-tag { background: rgba(253, 186, 140, .16); color: var(--sky); }
.nm-plan--full .nm-btn { background: #fff; border-color: #fff; color: var(--ink); }
.nm-plan--full .nm-btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); }

/* steps */
.nm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.nm-steps li { counter-increment: s; display: grid; gap: 6px; padding-top: 20px; border-top: 2px solid var(--line); }
.nm-steps li::before { content: "0" counter(s); font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.nm-steps b { font-size: 17px; color: var(--ink); }
.nm-steps span { color: var(--muted); font-size: 15px; }

/* CTA */
.nm-cta { padding: 56px 0; background: var(--night); color: #fff; }
.nm-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nm-cta h2 { color: #fff; font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; }
.nm-cta p { margin-top: 6px; color: var(--on-night-muted); }
.nm-cta .nm-btn--white { background: var(--accent); border-color: var(--accent); color: #fff; }
.nm-cta .nm-btn--white:hover { background: #ea580c; border-color: #ea580c; color: #fff; }

@media (max-width: 991px) {
  .nm-hero { padding: 48px 0 56px; }
  .nm-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .nm-hero-art { max-width: 520px; }
  .nm-art-result { right: 8px; }
  .nm-exams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-steps { grid-template-columns: 1fr 1fr; }
  .nm-stats ul { grid-template-columns: 1fr 1fr; }
  .nm-stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .nm-stats li { padding: 20px 16px; }
}
@media (max-width: 700px) {
  .nm-section { padding: 52px 0; }
  .nm-head { flex-direction: column; align-items: flex-start; }
  .nm-plans { grid-template-columns: 1fr; }
  .nm-cta-inner { flex-direction: column; align-items: flex-start; }
  .nm-search { flex-wrap: wrap; }
  .nm-search .nm-btn { width: 100%; margin-top: 6px; }
  .nm-hero-art { display: none; }
}
@media (max-width: 520px) {
  .nm-exams, .nm-steps { grid-template-columns: 1fr; }
  .nm-vendors { grid-template-columns: 1fr 1fr; }
  .nm-vendor { grid-template-columns: 1fr; row-gap: 8px; }
  .nm-vendor-mark { grid-row: auto; }
}


/* ==========================================================================
   4. Directory: vendors, vendor page, all exams
   ========================================================================== */
.nm-vhero { display: flex; gap: 24px; align-items: flex-start; }
.nm-vhero h1 { margin-bottom: 10px; }
.nm-vhero-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.nm-vhero-facts b { color: var(--ink); }

.nm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.nm-toolbar-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

.nm-group { margin-bottom: 36px; }
.nm-group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 19px; font-weight: 700; }
.nm-group-title a { color: var(--ink); }
.nm-group-title a:hover { color: var(--accent); }
.nm-group-title span { padding: 1px 9px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); }

.nm-rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.nm-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); transition: background .12s; }
.nm-row:first-child { border-top: 0; }
.nm-row:hover { background: var(--accent-wash); }
.nm-row-code { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.nm-row-name { font-weight: 500; color: var(--ink); }
.nm-row-name:hover { color: var(--accent); }
.nm-row-meta { display: flex; gap: 16px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.nm-row-meta span { display: inline-flex; align-items: center; gap: 6px; }
.nm-row-meta .nm-i { width: 15px; height: 15px; }
.nm-row-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 860px) {
  .nm-row { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .nm-row-code { grid-column: 1; }
  .nm-row-name { grid-column: 1; }
  .nm-row-meta { grid-column: 1; }
  .nm-row-actions { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; }
}
@media (max-width: 520px) {
  .nm-vhero { flex-direction: column; gap: 16px; }
  .nm-row-meta { flex-wrap: wrap; gap: 4px 12px; }
}

.nm-bundle { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 24px 28px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-lg); }
.nm-bundle h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.nm-bundle p { color: var(--text); font-size: 15px; }
@media (max-width: 700px) { .nm-bundle { flex-direction: column; align-items: flex-start; } }

.nm-prose-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.nm-prose-cols h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.nm-prose-cols p { color: var(--muted); }
.nm-ticks { display: grid; gap: 12px; }
.nm-ticks li { display: flex; gap: 10px; }
.nm-ticks .nm-i { margin-top: 3px; color: var(--score); stroke-width: 2.4; }
@media (max-width: 760px) { .nm-prose-cols { grid-template-columns: 1fr; gap: 20px; } }


/* ==========================================================================
   5. Exam page
   ========================================================================== */
.ex-hero { padding: 36px 0 44px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ex-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.ex-hero h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 750; letter-spacing: -.035em; line-height: 1.08; }
.ex-h1-page { display: inline-block; margin-left: 8px; padding: 2px 12px; border-radius: 999px; background: var(--surface-2); font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--muted); vertical-align: middle; }
.ex-name { margin: 8px 0 16px; font-size: 19px; font-weight: 500; color: var(--text); }
.ex-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ex-cta-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

.ex-format { padding: 22px 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ex-format h2 { margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ex-format dl { margin: 0; }
.ex-format dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.ex-format dl > div:first-child { border-top: 0; }
.ex-format dt { font-weight: 400; color: var(--muted); }
.ex-format dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

.ex-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 40px; padding-bottom: 64px; align-items: start; }
.ex-main-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.ex-main-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.ex-main-head span { font-size: 14px; color: var(--muted); white-space: nowrap; }

.ex-topic { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 14px; }
.ex-topic span { padding: 2px 8px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ex-topic a { font-weight: 600; color: var(--ink); }
.ex-topic a:hover { color: var(--accent); }
.ex-main-head + .ex-topic { margin-top: 0; }

.ex-q { margin-bottom: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); scroll-margin-top: calc(var(--header-h) + 16px); }
.ex-q-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.ex-q-num { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.ex-q-type { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ex-q-text { font-size: 16px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.ex-q-text p + p, .ex-q-text p + ul, .ex-q-text ul + p { margin-top: 10px; }
.ex-q-text ul, .ex-q-text ol { padding-left: 22px; list-style: disc; }
.ex-q-text img, .ex-exp img, .fm-q img, .fm-exp img { max-width: 100%; height: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r); }
.ex-q-text table, .fm-q table { width: 100%; margin: 10px 0; border-collapse: collapse; font-size: 14px; }
.ex-q-text td, .ex-q-text th, .fm-q td, .fm-q th { padding: 6px 10px; border: 1px solid var(--line); }
.ex-q-text pre, .fm-q pre { padding: 12px; background: var(--bg); border-radius: var(--r); overflow-x: auto; font-size: 13.5px; }

.ex-opts { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ex-opt { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.ex-opt:hover { border-color: var(--line-3); }
.ex-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ex-letter { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); }
.ex-opt-text { padding-top: 2px; font-size: 15px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.ex-opt-text p { margin: 0; }
.ex-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.ex-opt input:checked + .ex-letter { background: var(--accent); border-color: var(--accent); color: #fff; }
.ex-opt input:focus-visible + .ex-letter { box-shadow: var(--ring); }
.ex-opt.is-correct { border-color: var(--score); background: var(--score-soft); }
.ex-opt.is-correct .ex-letter { background: var(--score); border-color: var(--score); color: #fff; }
.ex-opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.ex-opt.is-wrong .ex-letter { background: var(--bad); border-color: var(--bad); color: #fff; }

.ex-ans { margin-top: 16px; }
.ex-ans summary { display: inline-flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.ex-ans summary::-webkit-details-marker { display: none; }
.ex-ans-show, .ex-ans-hide { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); }
.ex-ans summary:hover .ex-ans-show, .ex-ans summary:hover .ex-ans-hide { border-color: var(--ink); }
.ex-ans-hide { display: none; }
.ex-ans[open] .ex-ans-show { display: none; }
.ex-ans[open] .ex-ans-hide { display: inline-flex; }
.ex-verdict { font-size: 14px; font-weight: 600; }
.ex-verdict.is-ok { color: var(--score); }
.ex-verdict.is-bad { color: var(--bad); }
.ex-ans-body { margin-top: 14px; padding: 16px 18px; background: var(--bg); border-radius: var(--r); border-left: 3px solid var(--score); font-size: 15px; line-height: 1.65; }
.ex-correct { margin-bottom: 10px; color: var(--ink); }
.ex-correct b { display: block; color: var(--score-ink); }
.ex-correct span { display: block; }
.ex-exp h3, .fm-exp h3 { margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ex-exp p + p, .fm-exp p + p { margin-top: 8px; }
.ex-exp ul, .ex-exp ol, .fm-exp ul, .fm-exp ol { padding-left: 22px; list-style: disc; }
.ex-exp a, .fm-exp a { overflow-wrap: anywhere; }

.ex-inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 8px 0 24px; padding: 16px 20px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-lg); }
.ex-inline-cta b { display: block; color: var(--ink); }
.ex-inline-cta span { font-size: 14px; color: var(--text); }

.ex-unlock { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin: 24px 0; padding: 24px; background: var(--night); border-radius: var(--r-lg); color: var(--on-night-muted); }
.ex-unlock h2 { color: #fff; font-size: 19px; margin-bottom: 4px; }
.ex-unlock-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(253, 186, 140, .14); color: var(--sky); }
.ex-unlock .nm-btn { background: #fff; border-color: #fff; color: var(--ink); }
.ex-unlock .nm-btn:hover { background: var(--accent-soft); }

.ex-pager { margin-top: 28px; }
.ex-pager-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.ex-pager-row > :last-child { justify-self: end; }
.ex-pager-info { font-size: 14px; color: var(--muted); }
.ex-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.ex-pages a, .ex-pages span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: var(--r); font-size: 14px; font-weight: 500; color: var(--text); }
.ex-pages a { border: 1px solid var(--line); background: var(--surface); }
.ex-pages a:hover { border-color: var(--ink); color: var(--ink); }
.ex-pages a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.ex-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.ex-card { position: relative; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ex-card h2 { margin: 10px 0 14px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.ex-card ul { display: grid; gap: 10px; margin-bottom: 18px; font-size: 14.5px; }
.ex-card li { display: flex; align-items: center; gap: 10px; }
.ex-card li .nm-i { width: 17px; height: 17px; color: var(--accent); }
.ex-card-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--score-soft); color: var(--score-ink); font-size: 12px; font-weight: 600; }
.ex-card--mock { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-wash); }
.ex-card--full { background: var(--night); border-color: var(--night); color: #eee8e2; }
.ex-card--full h2 { color: #fff; }
.ex-card--full .ex-card-tag { background: rgba(253, 186, 140, .16); color: var(--sky); }
.ex-card--full li .nm-i { color: var(--sky); }

.ex-topics { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ex-topics summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; list-style: none; cursor: pointer; }
.ex-topics summary::-webkit-details-marker { display: none; }
.ex-topics summary h2 { font-size: 15px; font-weight: 700; }
.ex-topics summary .nm-i { transition: transform .2s; color: var(--muted); }
.ex-topics[open] summary .nm-i { transform: rotate(180deg); }
.ex-topics ul { max-height: 420px; overflow-y: auto; padding: 0 8px 10px; }
.ex-topics a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--text); }
.ex-topics a:hover { background: var(--bg); color: var(--ink); }
.ex-topics a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.ex-topics b { font-weight: 500; color: var(--muted); font-size: 13px; }

.ex-promo { padding: 64px 0; background: var(--night); color: var(--on-night-muted); }
.ex-promo-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.ex-promo h2 { margin-bottom: 12px; color: #fff; font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -.025em; }
.ex-promo p { margin-bottom: 24px; font-size: 16.5px; }
.ex-promo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--night-line); border: 1px solid var(--night-line); border-radius: var(--r-lg); overflow: hidden; }
.ex-promo-list li { display: grid; gap: 2px; padding: 22px; background: var(--night); }
.ex-promo-list b { color: #fff; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.ex-promo-list span { font-size: 14px; }

.ex-guide { padding: 56px 0 72px; background: var(--surface); }

@media (max-width: 991px) {
  .ex-hero-grid, .ex-layout, .ex-promo-grid { grid-template-columns: 1fr; }
  .ex-hero-grid { gap: 28px; }
  .ex-side { position: static; order: -1; grid-template-columns: 1fr 1fr; }
  .ex-topics { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ex-side { grid-template-columns: 1fr; }
  .ex-side .ex-card--full { display: none; }
  .ex-q { padding: 18px; }
  .ex-unlock { grid-template-columns: 1fr; }
  .ex-inline-cta { flex-direction: column; align-items: flex-start; }
  .ex-pager-row { grid-template-columns: 1fr 1fr; }
  .ex-pager-info { display: none; }
  .ex-cta .nm-btn { width: 100%; }
}


/* ==========================================================================
   6. Free mock exam
   ========================================================================== */
.fm-body { background: var(--bg); }
.fm-bar { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.fm-bar-inner { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.fm-bar .sh-logo { font-size: 18px; }
.fm-bar-title { display: grid; padding-left: 20px; border-left: 1px solid var(--line); line-height: 1.2; }
.fm-bar-title small { font-size: 12px; color: var(--muted); }
.fm-bar-title b { font-size: 15px; color: var(--ink); }
.fm-bar-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fm-count { font-size: 14px; color: var(--muted); }
.fm-count b { color: var(--ink); }
.fm-timer { display: inline-flex; align-items: center; gap: 8px; min-width: 96px; height: 38px; padding: 0 14px; border-radius: var(--r); background: var(--night); color: #fff; font-family: var(--mono); font-size: 15px; font-weight: 600; }
.fm-timer .nm-i { width: 16px; height: 16px; }
.fm-timer.is-warn { background: var(--warn-mark); color: var(--ink); }
.fm-timer.is-danger { background: var(--bad); animation: fm-pulse 1s ease-in-out infinite; }
@keyframes fm-pulse { 50% { opacity: .75; } }
.fm-tool { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.fm-tool:hover { border-color: var(--ink); }
.fm-tool--end { border-color: var(--ink); background: var(--ink); color: #fff; }
.fm-tool--end:hover { background: var(--bad); border-color: var(--bad); }
.fm-exit { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); }
.fm-progress { height: 3px; background: var(--surface-2); }
.fm-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .3s; }

.fm { padding: 40px 0 72px; min-height: calc(100vh - 63px); }
.fm-screen { max-width: 860px; margin: 0 auto; }

.fm-intro { padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fm-intro h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 750; letter-spacing: -.03em; margin-bottom: 6px; }
.fm-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.fm-facts li { display: grid; gap: 2px; padding: 18px 20px; background: var(--bg); }
.fm-facts b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.fm-facts span { font-size: 14px; color: var(--muted); }
.fm-rules { display: grid; gap: 12px; margin-bottom: 28px; }
.fm-rules li { display: flex; gap: 12px; font-size: 15px; }
.fm-rules .nm-i { margin-top: 3px; color: var(--accent); }
.fm-intro-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fm-intro-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }

.fm-card { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.fm-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fm-num { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.fm-type { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.fm-flag { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.fm-flag .nm-i { width: 16px; height: 16px; }
.fm-flag[aria-pressed="true"] { border-color: var(--warn-mark); background: var(--warn-soft); color: var(--warn); }
.fm-flag[aria-pressed="true"] .nm-i { fill: var(--warn-mark); stroke: var(--warn); }
.fm-q { font-size: 16.5px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.fm-q p + p { margin-top: 10px; }
.fm-q ul, .fm-q ol { padding-left: 22px; list-style: disc; }
.fm-opts { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.fm-opt { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.fm-opt:hover { border-color: var(--line-3); }
.fm-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fm-letter { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); }
.fm-opt-text { padding-top: 3px; font-size: 15.5px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; flex: 1; }
.fm-opt-text p { margin: 0; }
.fm-opt.is-on { border-color: var(--accent); background: var(--accent-wash); }
.fm-opt.is-on .fm-letter { background: var(--accent); border-color: var(--accent); color: #fff; }
.fm-opt input:focus-visible + .fm-letter { box-shadow: var(--ring); }
.fm-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.fm-nav .nm-btn:last-child { margin-left: auto; }
.fm-clear { margin: 0 auto; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fm-clear:hover { color: var(--ink); }

.fm-h { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.fm-h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.fm-card > p { color: var(--muted); }
.fm-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 14px; font-size: 13px; color: var(--muted); }
.fm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fm-legend i { width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); }
.fm-legend i.a { background: var(--accent); border-color: var(--accent); }
.fm-legend i.f { background: var(--warn-mark); border-color: var(--warn-mark); }
.fm-legend i.c { box-shadow: 0 0 0 2px var(--ink); }
.fm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.fm-tile { position: relative; height: 46px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.fm-tile:hover { border-color: var(--ink); }
.fm-tile.is-a { background: var(--accent); border-color: var(--accent); color: #fff; }
.fm-tile.is-f::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-mark); box-shadow: 0 0 0 2px var(--surface); }
.fm-tile.is-c { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.fm-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: var(--shadow-pop); }
.fm-dialog::backdrop { background: rgba(28, 25, 23, .5); }
.fm-dialog-body { padding: 26px; }
.fm-dialog h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.fm-dialog p { color: var(--muted); }
.fm-dialog-head { display: flex; justify-content: space-between; align-items: center; }
.fm-dialog-head h2 { margin: 0; }
.fm-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r); background: none; color: var(--muted); cursor: pointer; }
.fm-x:hover { background: var(--bg); color: var(--ink); }
.fm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* result */
.fm-result { display: grid; gap: 20px; }
.fm-score-card { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fm-ring { position: relative; width: 168px; height: 168px; }
.fm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fm-ring circle { fill: none; stroke-width: 10; }
.fm-ring .bg { stroke: var(--surface-2); }
.fm-ring .fg { stroke: var(--bad); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .2, 1); }
.fm-ring.is-pass .fg { stroke: var(--score); }
.fm-ring .mk { stroke: var(--ink); stroke-width: 3; }
.fm-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; font-weight: 750; letter-spacing: -.03em; color: var(--ink); }
.fm-badge { display: inline-block; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.fm-badge.is-pass { background: var(--score-soft); color: var(--score-ink); }
.fm-badge.is-fail { background: var(--bad-soft); color: var(--bad); }
.fm-score-copy h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.fm-score-copy > p { color: var(--muted); }
.fm-score-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; }
.fm-score-facts li { display: grid; }
.fm-score-facts b { font-size: 22px; font-weight: 700; color: var(--ink); }
.fm-score-facts span { font-size: 13px; color: var(--muted); }

.fm-upsell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 32px; background: var(--night); border-radius: 16px; color: var(--on-night-muted); }
.fm-upsell h2 { color: #fff; font-size: clamp(21px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.fm-upsell p { margin-bottom: 18px; }
.fm-upsell ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.fm-upsell li { display: flex; gap: 10px; font-size: 14.5px; color: #eee8e2; }
.fm-upsell li .nm-i { margin-top: 2px; color: var(--sky); }

.fm-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fm-topics { display: grid; gap: 14px; margin-top: 16px; }
.fm-topic-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 14px; color: var(--ink); }
.fm-topic-top b { font-weight: 600; color: var(--muted); }
.fm-topic-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.fm-topic-bar i { display: block; height: 100%; border-radius: 99px; background: var(--bad); }
.fm-topic-bar.is-ok i { background: var(--score); }
.fm-next-steps { display: grid; gap: 10px; align-content: start; }
.fm-next-steps .fm-h2 { margin-bottom: 6px; }
.fm-step { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; color: var(--text); font-size: 14px; cursor: pointer; }
.fm-step:hover { border-color: var(--accent-line); background: var(--accent-wash); color: var(--text); }
.fm-step .nm-i { margin-top: 2px; color: var(--accent); }
.fm-step b { display: block; color: var(--ink); font-size: 15px; }

.fm-answers { margin-top: 12px; }
.fm-answers-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.fm-filter { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: var(--r); }
.fm-filter button { padding: 6px 14px; border: 0; border-radius: var(--r-sm); background: none; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.fm-filter button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 25, 23, .1); }
.fm-ans { margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.fm-ans summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; list-style: none; cursor: pointer; }
.fm-ans summary::-webkit-details-marker { display: none; }
.fm-ans-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--ink); }
.fm-ans-tag { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.fm-ans.is-right .fm-ans-tag { background: var(--score-soft); color: var(--score-ink); }
.fm-ans.is-wrong .fm-ans-tag { background: var(--bad-soft); color: var(--bad); }
.fm-ans-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; color: var(--muted); }
.fm-ans-body { padding: 0 18px 20px; }
.fm-opts--review .fm-opt { cursor: default; }
.fm-opt.is-correct { border-color: var(--score); background: var(--score-soft); }
.fm-opt.is-correct .fm-letter { background: var(--score); border-color: var(--score); color: #fff; }
.fm-opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.fm-opt.is-wrong .fm-letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.fm-mine { flex: none; align-self: center; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); }
.fm-exp { margin-top: 16px; padding: 16px 18px; background: var(--bg); border-left: 3px solid var(--accent); border-radius: var(--r); font-size: 15px; line-height: 1.65; }

@media (max-width: 760px) {
  .fm { padding: 20px 0 48px; }
  .fm-intro, .fm-card, .fm-score-card, .fm-upsell { padding: 22px; }
  .fm-bar-title, .fm-count, .fm-bar .sh-logo .sh-word { display: none; }
  .fm-tool span { display: none; }
  .fm-tool--end span { display: inline; }
  .fm-bar-inner { gap: 10px; }
  .fm-score-card { grid-template-columns: 1fr; justify-items: start; }
  .fm-upsell, .fm-panels { grid-template-columns: 1fr; }
  .fm-upsell ul { grid-template-columns: 1fr; }
  .fm-facts b { font-size: 21px; }
  .fm-facts li { padding: 14px; }
  .fm-nav { flex-wrap: wrap; }
  .fm-nav .nm-btn span { display: none; }
  .fm-next .nm-btn span, #fm-next span { display: inline; }
}


/* ==========================================================================
   7. Buy page tweaks, 404, prose
   ========================================================================== */
.bx-hero h1 { font-weight: 750; letter-spacing: -.03em; }
.bx-name { margin: 6px 0 14px; font-size: 18px; font-weight: 500; color: var(--text); }
.bx-btn { border-radius: var(--r); }

.nm-404 { padding: 96px 0; text-align: center; }
.nm-404 h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 750; letter-spacing: -.03em; margin-bottom: 12px; }
.nm-404 .nm-lead { margin: 0 auto 28px; }
.nm-404 .nm-search { margin: 0 auto; }
.nm-404-links { display: flex; justify-content: center; gap: 24px; margin-top: 24px; font-weight: 600; }

.nm-prose { max-width: 780px; font-size: 16.5px; line-height: 1.75; color: var(--text); }
.nm-prose h1, .nm-prose h2 { margin: 36px 0 12px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.nm-prose h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 700; }
.nm-prose > :first-child { margin-top: 0; }
.nm-prose p { margin: 0 0 14px; }
.nm-prose ul, .nm-prose ol { margin: 0 0 16px; padding-left: 24px; list-style: disc; }
.nm-prose ol { list-style: decimal; }
.nm-prose li + li { margin-top: 6px; }
.nm-prose table { width: 100%; margin: 16px 0 24px; border-collapse: collapse; font-size: 15px; }
.nm-prose th, .nm-prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.nm-prose th { background: var(--bg); color: var(--ink); }
.nm-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Grid/flex children must be allowed to shrink below their content width (long words, tables, images) */
.fm-result > *, .fm-panels > *, .fm-upsell > *, .fm-score-card > *, .ex-layout > *, .ex-hero-grid > *, .nm-hero-grid > * { min-width: 0; }
.fm-ans summary { min-width: 0; }
.fm-ans-title { min-width: 0; }
.fm-answers-head { flex-wrap: wrap; }
.fm-q, .fm-exp, .ex-q-text, .ex-exp { overflow-x: auto; }

/* Pricing page (packages.php) */
.pk-head h1 { font-weight: 750; letter-spacing: -.03em; }
.pk-single { display: flex; align-items: center; justify-content: space-between; gap: 28px; max-width: 920px; margin: 0 auto 56px; padding: 28px 32px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-lg); box-shadow: 0 0 0 4px var(--accent-wash); }
.pk-single h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.pk-single p { color: var(--muted); }
.pk-head--sub { margin-bottom: 28px; }
.pk-head--sub h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.pk-card { height: 100%; }
.pk-card.is-popular { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pk-price { font-weight: 750; }
.pk-buy { margin-top: auto; }
.pk-list { margin-bottom: 22px; }
.pk-grid { align-items: stretch; }
@media (max-width: 700px) { .pk-single { flex-direction: column; align-items: flex-start; padding: 22px; } }


/* Charcoal and burnt orange: on dark surfaces the main button is orange, not white */
.nm-plan--full .nm-btn, .ex-unlock .nm-btn, .ex-promo .nm-btn--white, .fm-upsell .nm-btn--white, .ex-card--full .nm-btn--white { background: var(--accent); border-color: var(--accent); color: #fff; }
.nm-plan--full .nm-btn:hover, .ex-unlock .nm-btn:hover, .ex-promo .nm-btn--white:hover, .fm-upsell .nm-btn--white:hover, .ex-card--full .nm-btn--white:hover { background: #ea580c; border-color: #ea580c; color: #fff; }
.sh-actions a.is-primary:hover, .sh-actions a:only-child:hover { background: var(--accent); border-color: var(--accent); }
.nm-hero::before { opacity: .55; }
.nm-cta { background: var(--accent-soft); border-top: 1px solid var(--accent-line); color: var(--ink); }
.nm-cta h2 { color: var(--ink); }
.nm-cta p { color: var(--text); }
