/* ========================================
   Exam guide pages (/frcem-sba-exam, /frcem-osce-exam) - ported from MRCEM Ready
   Prefix: .exg-  ·  Builds on qbank-landing.css (.qbl tokens, hero, buttons, final CTA card)
   ======================================== */

/* Hero additions */

/* Layout: sticky contents + article */
.exg-body { background: #fff; }
.exg-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-block: clamp(48px, 6vw, 80px); }
.exg-toc { position: sticky; top: 100px; }
.exg-toc__title { margin-bottom: 10px !important; color: #6b7c90; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.exg-toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid #e2eaf4; }
.exg-toc a { display: block; margin-left: -2px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; color: #52647a; font-size: 14px; line-height: 1.4; text-decoration: none; transition: color .15s, border-color .15s; }
.exg-toc a:hover { color: var(--qbl-blue); }
.exg-toc a[aria-current] { border-left-color: var(--qbl-blue); color: var(--qbl-blue-dk); font-weight: 600; }

.exg-article { max-width: 780px; }
.exg-section { scroll-margin-top: 100px; }
.exg-section + .exg-section { margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid #e8eef6; }
.exg-section h2 { margin-bottom: 16px; font-size: clamp(24px, 2.4vw, 30px); }
.exg-section h3 { margin: 26px 0 10px; font-size: 18px; }
.exg-section p { color: #3d5066; font-size: 16.5px; line-height: 1.75; }
.exg-section p + p, .exg-section p + .exg-table-wrap, .exg-table-wrap + p, .exg-section ul + p, .exg-note + p { margin-top: 14px; }
.exg-section a:not(.qbl-btn) { color: var(--qbl-blue); text-underline-offset: 3px; }
.exg-section strong { color: var(--qbl-ink); }

/* Lists */
.exg-list { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.exg-list li { position: relative; padding-left: 22px; color: #3d5066; font-size: 16px; line-height: 1.7; }
.exg-list li::before { content: ''; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--qbl-blue); }
.exg-list--check li { padding-left: 30px; }
.exg-list--check li::before { left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%; background: var(--qbl-green-lt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231f9d6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.5 2.6 2.6L14 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* FRCEM components (two exams, either order) */
.exg-path { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 20px; padding: 0; list-style: none; counter-reset: none; }
.exg-path__item { position: relative; display: flex; flex-direction: column; padding: 18px 18px 16px; border: 1px solid #e2eaf4; border-radius: 12px; background: #fff; }
.exg-path__item + .exg-path__item::before { content: ''; position: absolute; top: 28px; left: -15px; width: 16px; height: 1px; background: #cfdbea; }
.exg-path__item.is-current { border-color: #b9cdea; background: linear-gradient(180deg, #f3f8ff 0%, #fff 100%); box-shadow: 0 6px 18px -10px rgba(17, 95, 197, .35); }
.exg-path__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 22px; margin-bottom: 10px; }
.exg-path__step { color: #6b7c90; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.is-current .exg-path__step { color: var(--qbl-blue); }
.exg-path__here { padding: 2px 8px; line-height: 1.5; border-radius: 999px; background: var(--qbl-blue); color: #fff; font-size: 11px; font-weight: 600; }
.exg-path__name { color: var(--qbl-ink); font: 650 16px/1.35 'Inter', system-ui, sans-serif; }
.exg-path__focus { margin-top: 2px; color: #52647a; font-size: 14px; }
.exg-path__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.exg-path__meta span { padding: 3px 9px; border-radius: 6px; background: #f1f5fa; color: #3d5066; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.is-current .exg-path__meta span { background: #e6effb; color: var(--qbl-blue-dk); }
.exg-path__go { display: inline-block; color: #6b7c90; font-size: 12px; font-weight: 600; transition: color .15s, transform .15s; }
.exg-path__item.is-link { transition: border-color .15s, box-shadow .15s; }
.exg-path__item.is-link:hover { border-color: #b9cdea; box-shadow: 0 6px 18px -12px rgba(17, 95, 197, .35); }
.exg-path__item.is-link:hover .exg-path__go { color: var(--qbl-blue); transform: translateX(2px); }
.exg-path a.exg-path__cover { color: var(--qbl-ink); text-decoration: none; }
.exg-path a.exg-path__cover::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.exg-path a.exg-path__cover:focus-visible { outline: none; }
.exg-path a.exg-path__cover:focus-visible::after { outline: 2px solid var(--qbl-blue); outline-offset: 2px; }
.exg-path__item.is-link:hover a.exg-path__cover { color: var(--qbl-blue-dk); }

/* Tables */
.exg-table-wrap { overflow-x: auto; border: 1px solid #dce6f2; border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.exg-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.exg-table th, .exg-table td { padding: 13px 16px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: top; }
.exg-table thead th { background: #f5f8fc; color: #52647a; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.exg-table tbody th { color: var(--qbl-ink); font-weight: 600; white-space: nowrap; }
.exg-table td { color: #3d5066; }
.exg-table tbody tr:last-child > * { border-bottom: 0; }
.exg-table tfoot > tr > * { border-top: 1px solid #dce6f2; border-bottom: 0; background: #f9fbfe; color: var(--qbl-ink); }
.exg-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.exg-table--keyval tbody th { width: 150px; color: #52647a; font-weight: 600; }
.exg-table tr.is-next > * { background: #f5f9ff; }
.exg-pill--muted { background: #eef2f7 !important; color: #6b7c90 !important; }
.exg-slo { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #eef3fa; color: #52647a; font-size: 11.5px; font-weight: 600; vertical-align: 1px; }
.exg-path a { color: inherit; text-decoration: underline; text-decoration-color: #b9cdea; text-underline-offset: 3px; }
.exg-path a:hover { color: var(--qbl-blue); }
.exg-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--qbl-blue); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; vertical-align: 2px; }

/* Blueprint table */
.exg-blueprint td.num { min-width: 150px; white-space: nowrap; }
.exg-blueprint td.num strong { display: inline-block; min-width: 24px; font-size: 16px; }
.exg-bar { display: inline-block; width: 64px; height: 6px; margin: 0 8px; overflow: hidden; border-radius: 6px; background: #edf2f8; vertical-align: middle; }
.exg-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--qbl-blue); }
.exg-blueprint small { display: inline-block; min-width: 32px; color: #6b7c90; font-size: 13px; }
.exg-blueprint td:last-child { font-size: 14.5px; }
.exg-blueprint tbody th { min-width: 150px; white-space: normal; }
.exg-blueprint .exg-slo { margin: 4px 0 0; }

/* Links inside tables and callouts */
.exg-table a, .exg-note a { color: var(--qbl-blue); text-underline-offset: 3px; }

/* Callout */
.exg-note { margin: 0 0 16px; padding: 16px 18px; border: 1px solid #cfe0f6; border-left: 4px solid var(--qbl-blue); border-radius: 10px; background: #f3f8ff; color: #2c4058; font-size: 15.5px; line-height: 1.7; }

/* Preparation tips */
.exg-tips { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: tip; }
.exg-tips li { position: relative; padding: 16px 18px 16px 58px; border: 1px solid #e2eaf4; border-radius: 12px; background: #fff; color: #3d5066; font-size: 15.5px; line-height: 1.65; counter-increment: tip; }
.exg-tips li::before { content: counter(tip); position: absolute; left: 16px; top: 15px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--qbl-blue-lt); color: var(--qbl-blue); font-size: 13px; font-weight: 700; }
.exg-tips strong { display: block; margin-bottom: 2px; }


/* End-of-page call to action (card styled like the homepage support card) */
.exg-final { padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid #e2eaf4; }
.exg-final .qbl-final__inner { width: calc(100% - 2 * clamp(18px, 3vw, 40px)); margin-inline: auto; }

@media (max-width: 980px) {
    .exg-layout { grid-template-columns: minmax(0, 1fr); }
    .exg-toc { position: static; padding: 16px 18px; border: 1px solid #e2eaf4; border-radius: 12px; background: #f9fbfe; }
    .exg-toc ol { columns: 2; column-gap: 24px; border-left: 0; }
    .exg-toc a { margin-left: 0; padding: 6px 0; border-left: 0; }
    .exg-article { max-width: none; }
}
@media (max-width: 680px) {
            .exg-path { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .exg-path__item + .exg-path__item::before { top: -11px; left: 28px; width: 1px; height: 12px; }
    .exg-toc ol { columns: 1; }
    .exg-section p { font-size: 16px; }
    .exg-table { font-size: 14px; }
    .exg-table th, .exg-table td { padding: 11px 12px; }
    .exg-table--keyval tbody th { width: 110px; white-space: normal; }
    /* Stacked tables: each row becomes a card */
    .exg-table-wrap:has(.exg-table--stack) { overflow: visible; border: 0; background: transparent; }
    .exg-table--stack thead { display: none; }
    .exg-table--stack, .exg-table--stack tbody, .exg-table--stack tfoot { display: block; }
    .exg-table--stack tr { display: block; margin-bottom: 10px; padding: 14px 16px; border: 1px solid #dce6f2; border-radius: 12px; background: #fff; }
    .exg-table--stack tr > * { display: block; padding: 0; border: 0 !important; text-align: left; white-space: normal; background: transparent !important; }
    .exg-table--stack tr.is-next { border-color: #b9cdea; background: #f5f9ff; }
    .exg-table--stack tbody th { margin-bottom: 8px; font-size: 15.5px; }
    .exg-dates tbody th .exg-pill { display: table; margin: 6px 0 0; }
    .exg-dates td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14.5px; }
    .exg-dates td::before { content: attr(data-label); color: #6b7c90; }
    .exg-blueprint tbody th { display: flex; justify-content: space-between; align-items: baseline; }
    .exg-blueprint td.num { display: flex; align-items: center; min-width: 0; margin-bottom: 8px; }
    .exg-blueprint td.num strong { order: -1; min-width: 28px; }
    .exg-blueprint .exg-bar { flex: 1; width: auto; margin: 0 10px 0 4px; }
    .exg-blueprint td:last-child { color: #52647a; font-size: 14px; line-height: 1.55; }
    .exg-blueprint tfoot tr { display: flex; justify-content: space-between; align-items: center; background: #f9fbfe; }
    .exg-blueprint tfoot td:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .exg-toc a { transition: none; } }
