.certification-page { width: calc(100% - 24px); max-width: 1120px; margin: 4px auto; padding: 14px 20px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgba(20,36,51,.08); }
.certification-details .cert-start-title { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.15; margin: 0 0 12px; color: #142433; overflow-wrap: anywhere; }
.certification-details .cert-exam-changes { display: inline-block; margin: 8px 12px 0 0; font-size: 14px; font-weight: 600; color: #2e7d32; }
.certification-details .cert-exam-changes[hidden] { display: none; }
.certification-details .cert-detail-grid { display: block; width: 100%; max-width: 100%; padding: 22px 14px 14px; border: 1px solid #dbe7f1; border-radius: 14px; background: linear-gradient(135deg, #f4f8fc, #eef6fb); overflow: hidden; }
.certification-details .cert-note-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; align-items: center; }
/* The header (badge, title, description, details, More Exam Info) sits on a yellow sticky note with a torn bottom edge.
   The wrapper casts the shadow because clip-path would cut off a shadow on the note itself. */
.certification-details .cert-note-wrap { filter: drop-shadow(2px 5px 5px rgba(0,0,0,.25)); }
.certification-details .cert-note { position: relative; padding: 24px 22px; border-radius: 2px; color: #364337; min-width: 0; transform: rotate(-.4deg); transform-origin: 50% 0;
    background:
        radial-gradient(circle at 0 0, #fff6c8d9 0, #fff6c800 38%),
        radial-gradient(circle at 100% 0, #fff6c8d9 0, #fff6c800 38%),
        radial-gradient(circle at 0 100%, #fff6c8d9 0, #fff6c800 38%),
        radial-gradient(circle at 100% 100%, #fff6c8d9 0, #fff6c800 38%),
        radial-gradient(ellipse at 50% 45%, #ffdc4d 0, #ffe066 60%, #fbe27e 100%);
    box-shadow: inset 0 0 22px #b8930022;
    clip-path: polygon(0 -12px, 100% -12px, 100% calc(100% - 5px), 97% calc(100% - 1px), 93% calc(100% - 7px), 90% calc(100% - 3px), 85% calc(100% - 8px), 81% calc(100% - 2px), 76% calc(100% - 6px), 72% 100%, 67% calc(100% - 4px), 61% calc(100% - 8px), 58% calc(100% - 2px), 52% calc(100% - 6px), 47% calc(100% - 1px), 41% calc(100% - 7px), 37% calc(100% - 3px), 31% calc(100% - 8px), 26% calc(100% - 2px), 21% calc(100% - 5px), 15% calc(100% - 1px), 10% calc(100% - 7px), 5% calc(100% - 3px), 0 calc(100% - 6px)); }
.certification-details .cert-note::before { content: ''; position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: #c53929; box-shadow: 0 2px 3px #0006, inset -2px -2px 3px #0003; }
.certification-details .cert-note::after { content: ''; position: absolute; top: 5px; left: calc(50% - 1px); width: 2px; height: 10px; background: #0002; }
.certification-details .cert-note .cert-description { color: #364337; }
.certification-details .cert-note .cert-exam-changes { color: #1b5e20; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .certification-details .cert-note { transform: none; } }
.certification-details .cert-detail-grid { scrollbar-width: none; }
.certification-details .cert-detail-grid > .cert-resources { grid-template-columns: 1fr; gap: 12px; margin: 16px 0 0; }
.certification-details .cert-detail-grid::-webkit-scrollbar { display: none; }
.certification-details .cert-badge-wrap { width: 220px; height: 180px; display: flex; align-items: center; justify-content: center; padding: 0; box-sizing: border-box; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
.certification-details .cert-badge { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; transform: none; mix-blend-mode: multiply; }
.certification-details .cert-detail-copy { min-width: 0; }
.certification-details .cert-description { color: #536270; font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
.certification-details .cert-details { display: inline-block; margin: 0; padding: 10px 14px; border-radius: 8px; color: #334e68; background: rgba(255,255,255,.8); font-size: 14px; line-height: 1.5; }
.certification-details .cert-resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin: 18px 0 0; }
.certification-details h3 { font-size: 19px; margin: 0 0 6px; color: #142433; }
.certification-details .cert-resource-box { min-height: 58px; padding: 10px 14px; border: 1px solid rgba(20,36,51,.08); border-radius: 10px; box-shadow: 0 3px 10px rgba(20,36,51,.04); }
.certification-details .cert-resources > section:first-child .cert-resource-box { background: #fff; }
.certification-details .cert-resources > section:nth-child(2) .cert-resource-box { background: #fff8e8; }
.certification-details .cert-resource-box p { margin: 0 0 8px; }
.certification-details .cert-resource-box p:last-child { margin-bottom: 0; }
.certification-details .cert-resource-table { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 14px; }
.certification-details .cert-resource-table { width: 95%; }
.certification-details .cert-resource-table, .certification-details .cert-resource-table p { text-align: left; }
.certification-details .cert-resource-table > [data-cert="official-links"], .certification-details .cert-resource-table > [data-cert="purchase-section"] { display: block; }
.certification-details .cert-resource-table > [data-cert="purchase-section"] { padding-left: 14px; border-left: 1px solid rgba(20,36,51,.12); }
.certification-details .cert-resource-table p { display: block; }
.certification-details .cert-resource-box a { color: #2e7d32; text-decoration: none; }
.certification-details [hidden] { display: none !important; }
@media (max-width: 560px) { .certification-page { margin: 12px; padding: 18px 14px; } .certification-details .cert-note-grid { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; } .certification-details .cert-note { padding: 22px 14px; } .certification-details .cert-detail-grid { padding: 20px 12px 12px; } .certification-details .cert-badge-wrap { width: 76px; height: 76px; padding: 0; border-radius: 0; } .certification-details .cert-description { font-size: 14px; } .certification-details .cert-details { font-size: 12px; } .certification-details .cert-resource-table { width: 100%; grid-template-columns: 1fr; } .certification-details .cert-resource-table > [data-cert="purchase-section"] { padding-left: 0; padding-top: 12px; border-left: 0; border-top: 1px solid rgba(20,36,51,.12); } }
.certification-page { background: #fff; }
body:has(.certification-page) { padding-bottom: 0 !important; }
body:has(.certification-page) .site-footer { position: static; }
@media (min-width: 769px) {
    body:has(.certification-page) { padding-bottom: 70px !important; }
    body:has(.certification-page) .site-footer { position: fixed; left: 0; right: 0; bottom: 0; }
}
.cert-back-link { display: inline-block; margin-bottom: 10px; color: #1976d2; font-size: 14px; text-decoration: none; }
.quiz-setup-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid #d4dde5; border-radius: 8px; padding: 10px 14px; background: #f8fafb; font-size: 14px; }
.quiz-setup-group label { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; }
.certification-page .test-options-inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.certification-page .actions { display: flex; flex-direction: row !important; align-items: center !important; flex-wrap: wrap; gap: 12px 18px; margin: 0; padding: 0 16px; min-height: 0; border: 1px solid #dbe3eb; border-radius: 18px; background: #f8fafc; box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(20,36,51,.05); }
.certification-page .actions .button { margin-top: 0; margin-bottom: 0; }
.certification-page .actions .test-options-inline { flex: 1 1 520px; }
.certification-page .actions .cert-start-actions { margin: 0; }
.sample-options-disabled .quiz-setup-group { opacity: .65; }
.sample-options-disabled label { cursor: not-allowed; }
main:has(> .certification-page) { padding: 0; background: transparent; }

/* Keep the public setup, including an attempt-limit alert, compact on laptops.
   Let longer content and smaller windows scroll naturally rather than clipping. */
body:has(.short-quiz-setup) main { max-width: min(1450px, calc(100% - 32px)); margin-bottom: 12px; }
.short-quiz-setup .short-quiz-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin: 12px 0; padding: 14px 16px; border: 1px solid #dbe3eb; border-radius: 18px; background: #f8fafc; box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(20,36,51,.05); }
.short-quiz-setup .cert-start-actions { margin: 0; }
/* Top-align every item in the controls row (button, count, Test Mode, Question Order). */
.short-quiz-setup .short-quiz-controls, .short-quiz-setup .short-quiz-controls .cert-start-actions, .short-quiz-setup .short-quiz-controls .test-options-inline { align-items: flex-start; }
.short-quiz-setup .short-quiz-controls .cert-start-actions .button { margin-top: 0; margin-bottom: 0; }
/* Match the signed-in certification page: same button, count select, and visible selected options. */
.short-quiz-setup .cert-start-actions .button { padding: 12px 24px; border-radius: 6px; background: #4CAF50; font-size: 14px; font-weight: 600; }
.short-quiz-setup .cert-start-actions .button:hover:not(:disabled) { background: #45a049; }
.short-quiz-setup #question-count-select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; color: #333; }
.short-quiz-setup .sample-options-disabled .quiz-setup-group { opacity: 1; }
.short-quiz-setup .sample-options-disabled label:has(input:not(:checked)) { opacity: .55; }
.short-quiz-setup .sample-options-disabled input:disabled:checked { accent-color: #1976d2; }
.short-quiz-setup > [data-cert-page="controls"] > .cert-description { margin: 8px 0 0; line-height: 1.45; }
@media (min-width: 769px) and (max-height: 900px) {
    body:has(.short-quiz-setup) main { margin-top: 4px; }
    body:has(.short-quiz-setup) main > .error { margin: 8px 0 12px; padding: 10px 14px; font-size: 14px; line-height: 1.4; }
    .short-quiz-setup { padding: 16px 20px; }
    .short-quiz-setup .cert-start-title { margin: 0 0 8px; }
    .short-quiz-setup .cert-description, .short-quiz-setup .cert-details { margin-bottom: 8px; }
    .short-quiz-setup .cert-resources { gap: 16px; margin: 12px 0; }
    .short-quiz-setup .cert-resource-box { padding: 10px 14px; }
    .short-quiz-setup .cert-resource-box p { margin-bottom: 6px; line-height: 1.4; }
    .short-quiz-setup .quiz-setup-group { padding: 8px 10px; gap: 8px; }
    .short-quiz-setup .button, .short-quiz-setup .cert-start-actions .button { padding: 10px 14px; }
    /* Fit the whole setup page above the fixed footer on a 15" laptop, with no page scrollbar. */
    body:has(.short-quiz-setup) { padding-bottom: calc(var(--site-footer-height, 62px) + var(--cookie-banner-height, 0px)) !important; }
    body:has(.short-quiz-setup) main { margin-bottom: 4px; }
    body:has(.short-quiz-setup) .quiz-page-status { margin-bottom: 4px; }
    .short-quiz-setup { padding: 10px 20px; }
    .short-quiz-setup .cert-detail-grid { padding: 18px 10px 8px; }
    .short-quiz-setup .cert-description { line-height: 1.45; }
    .short-quiz-setup .cert-detail-grid > .cert-resources { margin-top: 10px; }
    .short-quiz-setup .short-quiz-controls { margin: 8px 0; padding: 8px 16px; }
}
/* Badge fills its whole cell (full row height and width) without making the cell any bigger. */
@media (min-width: 561px) {
    .certification-details .cert-note-grid { grid-template-columns: 242px minmax(0, 1fr); }
    .certification-details .cert-badge-wrap { position: relative; align-self: stretch; width: 242px; height: auto; }
    .certification-details .cert-badge { position: absolute; inset: 0; }
}
/* Small italic notes: visible on touch screens, where hover tooltips never appear. */
.hint-note { display: block; font-size: 12px; font-style: italic; font-weight: 400; line-height: 1.4; color: inherit; opacity: .75; margin: 8px 0 0; white-space: normal; }
.hint-note[hidden] { display: none; }
.hint-note strong, .test-options-inline .hint-note strong { font-size: inherit; font-weight: 700; }
/* Full-width row inside a wrapping flex group, without widening the group. */
.hint-note-fit { flex: 1 0 100%; width: 0; min-width: 100%; margin: 0; }
.quiz-setup-group:has(input[value="practice"]:checked) [data-mode-note="exam_sim"],
.quiz-setup-group:has(input[value="exam_sim"]:checked) [data-mode-note="practice"],
.quiz-setup-group:has(input[value="random"]:checked) [data-order-note="sequential"],
.quiz-setup-group:has(input[value="sequential"]:checked) [data-order-note="random"] { display: none; }
/* Signed-in certification page: top-align the controls row, same as the Short Quiz page. */
.certification-page .actions { align-items: flex-start !important; padding-top: 8px; padding-bottom: 8px; }
.certification-page .actions .test-setup { margin-top: 0; }
.certification-page .actions .test-setup, .certification-page .actions .test-setup-start, .certification-page .actions .test-options-inline { align-items: flex-start; }
.ordered-restart-link { border: 0; background: none; padding: 0; font: inherit; color: #1976d2; text-decoration: underline; cursor: pointer; }
.ordered-restart-link:disabled { opacity: .6; cursor: default; }

/* Exam Info popup (static/version-history.js). */
.version-history-overlay { display: none; position: fixed; inset: 0; height: 100%; padding: 12px; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; }
.version-history-overlay.show { display: flex; }
.version-history-box { background: #fff; border: 1px solid #d4a017; border-radius: 8px; width: 100%; box-sizing: border-box; max-height: calc(100vh - 24px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; overflow-wrap: anywhere; padding: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.25); max-width: 640px; color: #333; }
.version-history-disclaimer { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e2e8f0; font-size: 12px; line-height: 1.5; color: #667788; font-style: italic; }
.version-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: -24px -24px 16px; position: sticky; top: -24px; padding: 20px 24px 14px; background: #eef6fb; border-bottom: 1px solid #dbe7f1; border-radius: 8px 8px 0 0; z-index: 1; }
html[data-theme="dark"] .version-history-head { background: #26323f; border-bottom-color: #3a4756; }
.version-history-box h3 { margin: 0; font-size: 18px; }
.version-history-asof { margin: -8px 0 14px; font-size: 13px; font-weight: 600; color: #536270; }
html[data-theme="dark"] .version-history-asof { color: #94a3b8; }
.version-history-x { flex: none; width: 44px; height: 44px; margin: -6px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 36px; font-weight: 700; line-height: 1; cursor: pointer; }
.version-history-x:hover, .version-history-x:focus-visible { background: rgba(0,0,0,.08); }
html[data-theme="dark"] .version-history-box { background: #1e2730; color: #e2e8f0; }
html[data-theme="dark"] .version-history-section { color: #cbd5e1; }
.version-history-section { margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: #333; }
.version-history-section p { margin: 2px 0 0; }
.version-history-section ul { margin: 4px 0 0 20px; }
.version-history-section a { color: #1976d2; word-break: break-all; }
.version-history-group { margin: 18px 0 10px; padding: 6px 10px; font-size: 15px; border-left: 4px solid #2e7d32; background: #f1f7f1; color: #142433; }
html[data-theme="dark"] .version-history-group { background: #26323f; color: #e2e8f0; }

/* Signed-in and public certification page: wider on large screens, and compact enough on a 15" laptop
   to show the whole panel (details, resources and test controls) above the fixed footer without scrolling. */
@media (min-width: 1200px) { .certification-page { max-width: 1380px; } }
@media (min-width: 769px) and (max-height: 900px) {
    .certification-page { margin-top: 2px; padding: 8px 18px; }
    .certification-details .cert-start-title { font-size: clamp(20px, 2vw, 24px); margin: 0 0 6px; }
    .certification-details .cert-detail-grid { padding: 18px 10px 8px; }
    .certification-details .cert-note { padding-top: 20px; padding-bottom: 20px; }
    .certification-details .cert-description { font-size: 15px; line-height: 1.4; margin: 0 0 8px; }
    .certification-details .cert-details { padding: 6px 12px; font-size: 13px; line-height: 1.4; }
    .certification-details .cert-detail-grid > .cert-resources { margin: 8px 0 0; gap: 8px; }
    .certification-details h3 { font-size: 17px; margin: 0 0 4px; }
    .certification-details .cert-resource-box { min-height: 0; padding: 6px 12px; }
    .certification-details .cert-resource-box p { margin: 0 0 4px; line-height: 1.35; font-size: 15px; }
    .certification-page .actions { gap: 8px 14px; padding-top: 6px; padding-bottom: 6px; }
    .certification-page .quiz-setup-group { padding: 6px 10px; gap: 6px 10px; }
}
