/* Shared by every certificate CBT surface: exam tiles. */
.cbt-tile {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: #5a6676;
    color: #fff;
}
.cbt-tile svg { width: 28px; height: 28px; }
.cbt-tile--sm { width: 36px; height: 36px; border-radius: 9px; }
.cbt-tile--sm svg { width: 23px; height: 23px; }
.cbt-tile--lg { width: 60px; height: 60px; border-radius: 15px; }
.cbt-tile--lg svg { width: 38px; height: 38px; }
.cbt-tile--driver-license { background: #d4650f; }
.cbt-tile--motorcycle-license { background: #8f6a1a; }
.cbt-tile--real-estate-agent { background: #6e56cf; }
.cbt-tile--housing-manager { background: #0b7fab; }
.cbt-tile--social-worker { background: #cc3d7f; }
.cbt-tile--appraiser { background: #23804f; }
.cbt-tile--labor-attorney { background: #b23a3a; }

/* Past-exam board: library section and CBT hub. */
.cbx { margin: 0 0 26px; color: var(--wq-text, #e8edf3); word-break: keep-all; overflow-wrap: anywhere; }
.cbx [hidden], .cbx-resume[hidden] { display: none !important; }
html.dark .cbx a { color: inherit; text-decoration: none; }
.cbx a:focus-visible { outline: 2px solid var(--wq-accent, #4da3f7); outline-offset: 3px; }
.cbx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cbx-head h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.03em; line-height: 1.35; }
.cbx-head p { margin: 3px 0 0; color: var(--wq-text-muted, #a8b5c5); font-size: 14px; line-height: 1.5; }
html.dark .cbx .cbx-head > a { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; margin-bottom: -10px; color: var(--wq-text-muted, #a8b5c5); font-size: 14px; }
.cbx-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.cbx-panel { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--wq-border, #374351); border-radius: 14px; background: var(--wq-surface, #20262e); overflow: hidden; }
.cbx-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--wq-border, #374351); }
.cbx-panel__head h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.cbx-panel__head span { color: var(--wq-text-muted, #a8b5c5); font-size: 14px; }

.cbx-btn, html.dark .cbx a.cbx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 18px; border: 1px solid var(--wq-border-strong, #516983); border-radius: 10px; background: transparent; color: var(--wq-text, #e8edf3); font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
html.dark .cbx a.cbx-btn--primary { border-color: var(--wq-primary, #2873dc); background: var(--wq-primary, #2873dc); color: #fff; }
html.dark .cbx a.cbx-btn--quiet { border-color: transparent; background: var(--wq-surface-3, #333e4b); }

/* Question bank card with figures taken from the bank itself */
.cbx-license { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.cbx-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--wq-border, #374351); }
.cbx-shots a { position: relative; display: block; height: 100%; overflow: hidden; background: var(--wq-bg, #15191f); }
.cbx-shots img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cbx-shots .is-sign img { padding: 16px 12px 34px; background: #fff; object-fit: contain; }
.cbx-shots span { position: absolute; left: 0; bottom: 0; padding: 4px 10px; border-top-right-radius: 8px; background: #15191f; color: #fff; font-size: 13px; font-weight: 600; }
.cbx-license__body { display: flex; flex-direction: column; flex: 1 1 auto; gap: 14px; padding: 18px; }
.cbx-license__head { display: flex; align-items: center; gap: 12px; }
.cbx-license__head h3 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -.03em; line-height: 1.35; }
.cbx-license__head h3 span { color: var(--wq-text-muted, #a8b5c5); font-size: 15px; font-weight: 500; }
.cbx-facts { display: flex; gap: 0; margin: 0; padding: 12px 0; border-block: 1px solid var(--wq-border, #374351); }
.cbx-facts > div { flex: 1 1 0; min-width: 0; padding: 0 14px; border-left: 1px solid var(--wq-border, #374351); }
.cbx-facts > div:first-child { padding-left: 0; border-left: 0; }
.cbx-facts dt { color: var(--wq-text-muted, #a8b5c5); font-size: 13px; font-weight: 400; }
.cbx-facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cbx-license__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
html.dark .cbx a.cbx-more { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 18px; border-top: 1px solid var(--wq-border, #374351); }
.cbx-more strong { font-size: 15px; font-weight: 650; }
.cbx-more span:not(.cbt-tile) { margin-left: auto; color: var(--wq-text-muted, #a8b5c5); font-size: 14px; white-space: nowrap; }
.cbx-more i { color: var(--wq-text-muted, #a8b5c5); font-size: 20px; font-style: normal; line-height: 1; }

/* One row per exam; every year is its own start link */
.cbx-rows { display: flex; flex-direction: column; flex: 1 1 auto; margin: 0; padding: 0; list-style: none; }
.cbx-row, .cbx-hit { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-height: 78px; padding: 10px 18px; }
.cbx-row + .cbx-row { border-top: 1px solid var(--wq-border, #374351); }
.cbx-row__main, .cbx-hit__main { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; min-height: 48px; }
.cbx-row__copy { min-width: 0; }
.cbx-row__copy strong, .cbx-row__copy > span { display: block; line-height: 1.45; }
.cbx-row__copy strong { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.cbx-row__copy > span { color: var(--wq-text-muted, #a8b5c5); font-size: 14px; }
.cbx-row__years { display: flex; gap: 6px; flex: 0 0 auto; }
html.dark .cbx .cbx-row__years a { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 44px; padding: 0 10px; border-radius: 9px; background: var(--wq-surface-3, #333e4b); color: var(--wq-text, #e8edf3); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Unfinished exam */
.cbx-resume { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 220px) auto; align-items: center; gap: 18px; margin-bottom: 12px; padding: 14px 18px; border: 1px solid var(--wq-border-strong, #516983); border-radius: 14px; background: var(--wq-surface, #20262e); }
.cbx-resume strong, .cbx-resume span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.cbx-resume strong { font-size: 16px; font-weight: 700; }
.cbx-resume span { color: var(--wq-text-muted, #a8b5c5); font-size: 14px; font-variant-numeric: tabular-nums; }
.cbx-resume i { height: 6px; border-radius: 3px; background: var(--wq-surface-3, #333e4b); overflow: hidden; }
.cbx-resume b { display: block; height: 100%; background: var(--wq-accent, #4da3f7); }

/* Library search names an exam */
.cbx--hits { border: 1px solid var(--wq-border, #374351); border-radius: 14px; background: var(--wq-surface, #20262e); overflow: hidden; }
.cbx-hit + .cbx-hit { border-top: 1px solid var(--wq-border, #374351); }

@media (hover: hover) {
    html.dark .cbx .cbx-head > a:hover { color: var(--wq-accent, #4da3f7); }
    html.dark .cbx a.cbx-btn:hover { border-color: var(--wq-accent, #4da3f7); }
    html.dark .cbx a.cbx-btn--primary:hover { border-color: var(--wq-primary-hover, #3480e6); background: var(--wq-primary-hover, #3480e6); }
    html.dark .cbx a.cbx-more:hover, .cbx-row:hover { background: var(--wq-surface-2, #29313b); }
    html.dark .cbx .cbx-row__main:hover strong, html.dark .cbx .cbx-license__head a:hover, html.dark .cbx .cbx-hit__main:hover strong { color: var(--wq-accent, #4da3f7); }
    html.dark .cbx .cbx-row__years a:hover { background: var(--wq-border-strong, #516983); }
    .cbx-shots a:hover img { opacity: .86; }
}
@media (max-width: 860px) {
    .cbx-board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .cbx-head { margin-bottom: 10px; }
    .cbx-head p { font-size: 13.5px; }
    .cbx-license__body { padding: 16px; gap: 12px; }
    .cbx-facts > div { padding: 0 10px; }
    .cbx-facts dd { font-size: 15px; }
    .cbx-shots .is-sign img { padding: 8px 4px 28px; }
    .cbx-shots span { padding: 3px 8px; font-size: 12.5px; }
    .cbx-panel__head { padding: 14px 16px 10px; }
    .cbx-row, .cbx-hit, html.dark .cbx a.cbx-more { padding-inline: 16px; }
    .cbx-row { min-height: 68px; padding-block: 8px; }
    .cbx-row .cbx-row__years { display: none; }
    .cbx-row__main::after, .cbx-hit__main::after { content: "›"; margin-left: auto; color: var(--wq-text-muted, #a8b5c5); font-size: 20px; line-height: 1; }
    .cbx-hit { flex-direction: column; align-items: stretch; }
    .cbx-hit .cbx-row__years a { flex: 1 1 0; }
    .cbx-resume { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px 16px; }
    .cbx-resume i { grid-column: 1 / -1; grid-row: 2; }
    .cbx-btn, html.dark .cbx a.cbx-btn { padding-inline: 12px; }
}
@media (max-width: 560px) { .cbx-panel__hint { display: none; } }

/* CBT hub */
.cbx-hub { max-width: 1080px; margin: 0 auto; padding: 12px 0 56px; }
.cbx-hub section { margin-top: 34px; }
.cbx-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--wq-text-muted, #a8b5c5); font-size: 14px; }
.cbx-crumb > * { display: inline-flex; align-items: center; min-height: 36px; }
.cbx-crumb [aria-current] { color: var(--wq-text-soft, #c9d3df); }
.cbx-hero { margin: 6px 0 22px; }
.cbx-hero h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.3; }
.cbx-hero p { max-width: 74ch; margin: 8px 0 0; color: var(--wq-text-soft, #c9d3df); font-size: 16px; line-height: 1.6; }
.cbx-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 18px 0; border-block: 1px solid var(--wq-border, #374351); list-style: none; counter-reset: how; }
.cbx-how li { padding: 0 22px; border-left: 1px solid var(--wq-border, #374351); }
.cbx-how li:first-child { padding-left: 0; border-left: 0; }
.cbx-how strong { display: block; font-size: 16px; }
.cbx-how span { display: block; margin-top: 4px; color: var(--wq-text-muted, #a8b5c5); font-size: 14.5px; line-height: 1.6; }
.cbx-others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cbx-others li { display: flex; flex-direction: column; border: 1px solid var(--wq-border, #374351); border-radius: 14px; background: var(--wq-surface, #20262e); overflow: hidden; }
.cbx-others li > a:first-child { display: flex; align-items: center; gap: 12px; padding: 16px; }
html.dark .cbx .cbx-others a.cbx-official { display: flex; align-items: center; min-height: 46px; padding: 8px 16px; border-top: 1px solid var(--wq-border, #374351); color: var(--wq-text-muted, #a8b5c5); font-size: 14px; }
.cbx-official::after { content: "↗"; margin-left: auto; }
.cbx-glyph { font-size: 19px; font-weight: 750; line-height: 1; }
.cbx-glyph--excel { background: #17975a; font-family: Georgia, 'Times New Roman', serif; font-style: italic; }
.cbx-glyph--info { background: #3a5fc8; font-size: 16px; letter-spacing: -.06em; }
.cbx-glyph--history { background: #e5484d; }
@media (hover: hover) {
    html.dark .cbx .cbx-crumb a:hover, html.dark .cbx .cbx-others a.cbx-official:hover, html.dark .cbx .cbx-others a:hover strong { color: var(--wq-accent, #4da3f7); }
}
@media (max-width: 860px) { .cbx-others { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
    .cbx-how { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cbx-how li { padding: 0; border: 0; }
}
@media (max-width: 560px) { .cbx-hub { padding-top: 0; } .cbx-hero p { font-size: 15px; } }

/* Set page: past-paper sets lead to the real exam */
.cbx-set { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 14px 0; padding: 14px 16px; border: 1px solid var(--wq-border, #374351); border-radius: 14px; background: var(--wq-bg, #15191f); }
.cbx-set .cbx-hit__main { flex: 1 1 260px; }
.cbx-set__links { display: flex; flex-wrap: wrap; gap: 8px; }
html.dark .cbx.cbx-set a.cbx-btn { padding-inline: 14px; font-size: 14.5px; }
@media (max-width: 720px) {
    .cbx-set__links { width: 100%; }
    .cbx-set__links .cbx-btn { flex: 1 1 auto; }
    .cbx-set .cbx-hit__main::after { content: none; }
}
