html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f6f7f9;
    color: #1f2933;
}

a, .btn-link {
    color: var(--primary);
}

.btn-primary {
    color: var(--brand-contrast);
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(22, 143, 126, .55);
}

.content {
    padding-top: 1.1rem;
}

.page-header {
    align-items: center;
    border-bottom: 1px solid #d9dee7;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    line-height: 1.15;
    margin: 0;
}

.heading-with-help {
    align-items: center;
    display: flex;
    gap: .55rem;
    min-width: 0;
}

.heading-with-help h1,
.heading-with-help h2,
.heading-with-help h3 {
    line-height: 1.15;
}

.help-tip {
    display: inline-flex;
    flex: 0 0 auto;
    position: relative;
    vertical-align: middle;
    z-index: 20;
}

.help-tip__trigger,
.help-tip__example {
    -webkit-appearance: none;
    align-items: center;
    appearance: none;
    background: none;
    border: 0;
    color: var(--primary, #1b6ec2);
    cursor: pointer;
    display: inline-flex;
    flex: none;
    height: 1.2rem;
    justify-content: center;
    line-height: 0;
    min-height: 0;
    padding: 0;
    vertical-align: middle;
    width: 1.2rem;
}

.help-tip__icon {
    display: block;
    fill: currentColor;
    flex: none;
    height: 1.2rem;
    width: 1.2rem;
}

.help-tip__trigger:hover,
.help-tip__trigger:focus {
    color: var(--primary-strong, #184d86);
    outline: none;
}

.help-tip__popover {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 9px;
    box-shadow: var(--shadow-lg, 0 16px 38px rgba(17, 24, 39, .2));
    color: var(--text, #1f2933);
    display: none;
    gap: .4rem;
    max-width: 320px;
    padding: .85rem;
    position: fixed;
    width: max-content;
}

.help-tip__popover::before {
    content: "";
    height: .45rem;
    left: 0;
    position: absolute;
    right: 0;
    top: -.4rem;
}

.help-tip__popover strong,
.help-tip__popover span,
.help-tip__popover a {
    display: block;
}

.help-tip__popover span {
    color: var(--muted, #5f6b7a);
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.45;
}

.help-tip__popover a {
    font-size: .85rem;
    font-weight: 800;
}

.help-tip:hover .help-tip__popover,
.help-tip:focus-within .help-tip__popover {
    display: grid;
}

/* Help layout shell: the shared site nav (SiteNav) on top, a help-topics sidebar on the left, and
   content on the right. Used by both the user help (HelpLayout) and the admin help (AdminHelpLayout)
   so navigation is consistent. SiteNav is ~3.3rem tall and sticky, so the sidebar sits below it. */
.help-shell {
    align-items: stretch;
    display: flex;
    min-height: calc(100vh - 3.3rem);
}

.help-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-line);
}

.help-main {
    background: var(--app-bg);
    flex: 1;
    min-width: 0;
}

.help-brand {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: grid;
    gap: .2rem;
    padding: 1.2rem 1rem;
}

.help-brand a {
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
    text-decoration: none;
}

.help-brand span,
.help-nav__label {
    color: rgba(255, 255, 255, .52);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.help-nav {
    display: grid;
    gap: .2rem;
    padding: .8rem .65rem;
}

.help-nav__label {
    margin: .9rem .7rem .25rem;
}

.help-nav a {
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, .72);
    font-weight: 750;
    padding: .7rem .85rem;
    text-decoration: none;
}

.help-nav a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.help-nav a.active {
    background: rgba(84, 198, 166, .16);
    border-color: rgba(84, 198, 166, .3);
    color: #fff;
}

.help-content {
    margin: 0 auto;
    max-width: 1050px;
    padding: 2rem;
}

@media (min-width: 821px) {
    .help-sidebar {
        flex: 0 0 264px;
    }
}

@media (max-width: 820px) {
    .help-shell {
        flex-direction: column;
    }

    .help-content {
        padding: 1rem;
    }
}

.help-eyebrow {
    color: var(--primary, #1b6ec2);
    display: block;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .09em;
    margin-bottom: .3rem;
    text-transform: uppercase;
}

.help-topic-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.help-topic-grid a {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: .45rem;
    padding: 1.15rem;
    text-decoration: none;
    transition: border-color .14s ease, transform .14s ease;
}

.help-topic-grid a:hover {
    border-color: var(--primary, #1b6ec2);
    transform: translateY(-2px);
}

.help-topic-grid strong {
    color: var(--text, #1f2933);
    font-size: 1.05rem;
}

.help-topic-grid span {
    color: var(--muted, #5f6b7a);
    line-height: 1.5;
}

.help-article {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-top: 1.25rem;
    padding: 1.35rem;
}

.help-article h2 {
    color: var(--text, #1f2933);
    font-size: 1.15rem;
    margin: 1.3rem 0 .4rem;
}

.help-article h2:first-child {
    margin-top: 0;
}

.help-article p {
    color: var(--muted, #5f6b7a);
    line-height: 1.65;
    margin: 0;
}

.help-article ul,
.help-article ol {
    color: var(--muted, #5f6b7a);
    line-height: 1.65;
    margin: .55rem 0 0;
    padding-left: 1.35rem;
}

.help-article li + li {
    margin-top: .35rem;
}

.help-callout {
    background: var(--surface-soft, #eef2f7);
    border-left: 4px solid var(--primary, #1b6ec2);
    border-radius: 7px;
    color: var(--text, #1f2933);
    margin-top: 1rem;
    padding: .9rem 1rem;
}

.help-callout strong {
    display: block;
    margin-bottom: .25rem;
}

.help-steps {
    counter-reset: help-step;
    display: grid;
    gap: .75rem;
    list-style: none;
    padding: 0 !important;
}

.help-steps li {
    background: var(--surface-soft, #eef2f7);
    border-radius: 8px;
    counter-increment: help-step;
    display: grid;
    gap: .2rem;
    grid-template-columns: 2rem 1fr;
    padding: .8rem;
}

.help-steps li::before {
    align-items: center;
    background: var(--primary, #1b6ec2);
    border-radius: 50%;
    color: #fff;
    content: counter(help-step);
    display: flex;
    font-size: .82rem;
    font-weight: 850;
    grid-row: span 2;
    height: 1.7rem;
    justify-content: center;
    width: 1.7rem;
}

.account-detail-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-top: .85rem;
}

.user-account-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: .85rem;
}

.account-verification-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    margin-top: .9rem;
}

.account-verification-row .form-check {
    margin: 0;
}

.account-save-actions {
    border-bottom: 1px solid var(--line, #dfe4ec);
    margin-top: .9rem;
    padding-bottom: 1rem;
}

.account-system-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.account-detail {
    background: var(--surface-soft, #eef2f7);
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 8px;
    display: grid;
    gap: .3rem;
    min-width: 0;
    padding: .8rem;
}

.account-detail span {
    color: var(--muted, #5f6b7a);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-detail strong {
    color: var(--text, #1f2933);
    overflow-wrap: anywhere;
}

.password-reset-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: .85rem 0;
}

.password-field-host {
    position: relative;
}

.password-field-input {
    padding-right: 4.75rem !important;
}

.password-reveal-toggle {
    align-items: center;
    background: var(--surface-soft, #f4f7fa);
    border: 0;
    border-left: 1px solid var(--line, #dfe4ec);
    color: var(--primary, #1b6ec2);
    display: flex;
    font-size: .8rem;
    font-weight: 800;
    height: calc(100% - 2px);
    justify-content: center;
    min-width: 4rem;
    padding: 0 .75rem;
    position: absolute;
    right: 1px;
    top: 1px;
    z-index: 6;
}

.password-field-host:not(.form-floating) .password-reveal-toggle {
    border-radius: 0 calc(var(--bs-border-radius, .375rem) - 1px) calc(var(--bs-border-radius, .375rem) - 1px) 0;
}

.password-field-host.form-floating .password-reveal-toggle {
    border-radius: 0 calc(var(--bs-border-radius, .375rem) - 1px) calc(var(--bs-border-radius, .375rem) - 1px) 0;
}

.password-reveal-toggle:hover,
.password-reveal-toggle:focus-visible {
    background: var(--surface, #fff);
    color: var(--text, #1f2933);
    outline: none;
}

.user-management-grid {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.user-account-panel {
    min-width: 0;
}

.user-roles-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-width: 190px;
}

.role-toggle-row {
    display: grid;
    gap: .75rem;
    margin-top: .75rem;
}

.role-toggle-item {
    align-items: flex-start;
    background: var(--surface-soft, #eef2f7);
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto 1fr;
    padding: .8rem;
}

.role-toggle-item:hover {
    border-color: var(--line-strong, #c3ccd8);
}

.role-toggle-item .form-check-input {
    margin: .15rem 0 0;
}

.role-toggle-item span {
    display: grid;
    gap: .2rem;
}

.role-toggle-item strong {
    color: var(--text, #1f2933);
}

.role-toggle-item small {
    color: var(--muted, #5f6b7a);
    line-height: 1.4;
}

.user-actions-panel {
    grid-column: 1 / -1;
}

.user-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: .85rem;
}

.user-action-item {
    align-content: start;
    background: var(--surface-soft, #eef2f7);
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    padding: 1rem;
}

.user-action-item h3 {
    color: var(--text, #1f2933);
    font-size: 1rem;
    margin: 0 0 .25rem;
}

.user-action-item p {
    margin: 0;
}

.user-action-item .btn {
    justify-self: start;
}

@media (max-width: 900px) {
    .user-management-grid {
        grid-template-columns: 1fr;
    }

    .user-roles-panel,
    .user-actions-panel {
        grid-column: auto;
    }

    .user-action-grid {
        grid-template-columns: 1fr;
    }

    .user-account-form,
    .account-system-grid {
        grid-template-columns: 1fr;
    }
}

.password-reveal-toggle:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary, #1b6ec2);
}

.form-floating.password-field-host > .password-field-input {
    padding-right: 4.75rem !important;
}

.form-floating.password-field-host > label {
    right: 4rem;
    width: auto;
}


.page-header p {
    color: #5f6b7a;
    margin: .35rem 0 0;
}

.mode-grid,
.exam-grid,
.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-section-title {
    margin: 1.75rem 0 .85rem;
    font-size: 1.15rem;
}

.admin-section-title:first-of-type {
    margin-top: .25rem;
}

.chart-grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: .9rem;
    min-width: 0;
    padding: 1.1rem;
}

.chart-card__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.chart-card h2 {
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 850;
    margin: 0;
}

.chart-card p {
    color: var(--muted);
    margin: .25rem 0 0;
}

.chart-card__canvas {
    height: 280px;
    min-height: 240px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.chart-card__canvas canvas {
    display: block;
    max-width: 100%;
}

.mode-grid article,
.exam-card,
.stats-grid article,
.settings-panel,
.objective-item {
    background: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    padding: 1rem;
}

.mode-grid h2,
.exam-card h2,
.objective-item h2,
.settings-panel h2 {
    font-size: 1.15rem;
    margin: 0 0 .5rem;
}

.exam-card__meta {
    color: #5f6b7a;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.home-hero {
    max-width: 720px;
    padding: 1.5rem 0 1rem;
}

.home-hero h1 {
    font-size: 2.4rem;
    line-height: 1.12;
    margin: 0 0 .6rem;
}

.home-hero p {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0 0 1.2rem;
}

.home-search {
    display: flex;
    gap: .5rem;
    margin-bottom: .6rem;
}

.home-search .form-control {
    flex: 1 1 auto;
}

.home-search-label {
    color: var(--text);
    display: block;
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.home-search__icon {
    align-items: center;
    color: var(--muted);
    display: flex;
    left: 1rem;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.home-search__icon svg {
    height: 1.3rem;
    width: 1.3rem;
}

.home-search__input {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    font-size: 1.05rem;
    padding: .9rem 1rem .9rem 2.9rem;
}

.home-search__input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.home-search__btn {
    font-size: 1rem;
    padding: .9rem 1.5rem;
}

.exam-rail {
    display: flex;
    gap: 1rem;
    margin: 0 -.25rem;
    overflow-x: auto;
    padding: .25rem .25rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.exam-rail > .exam-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.eyebrow {
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-strong);
    display: inline-block;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .05em;
    padding: .3rem .75rem;
    text-transform: uppercase;
}

.hero {
    align-items: center;
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1.05fr .95fr;
    padding: 1.5rem 0 1rem;
}

.hero__content {
    max-width: 600px;
}

.hero__content h1 {
    font-size: 2.9rem;
    letter-spacing: -.02em;
    line-height: 1.07;
    margin: 1rem 0 .85rem;
}

.hero__accent {
    color: var(--primary-strong);
}

.hero__content > p {
    color: var(--muted);
    font-size: 1.08rem;
    margin: 0 0 1.5rem;
    max-width: 540px;
}

.hero__trust {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-preview {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    overflow: hidden;
}

.hero-preview__bar {
    align-items: center;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: .4rem;
    padding: .7rem .9rem;
}

.hero-preview__bar span {
    background: var(--line-strong);
    border-radius: 50%;
    height: .6rem;
    width: .6rem;
}

.hero-preview__body {
    display: grid;
    gap: .6rem;
    padding: 1.25rem;
}

.hero-preview__tag {
    color: var(--primary-strong);
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hero-preview__prompt {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .2rem;
}

.hero-preview__opt {
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-size: .9rem;
    padding: .6rem .8rem;
}

.hero-preview__opt--correct {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
    font-weight: 700;
}

.hero-preview__exp {
    background: var(--surface-soft);
    border-radius: 10px;
    color: var(--muted);
    font-size: .82rem;
    padding: .6rem .8rem;
}

.stat-strip {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    margin: 1.5rem 0 .5rem;
    padding: 1.4rem 1rem;
    text-align: center;
}

.stat-strip__num {
    color: var(--text);
    display: block;
    font-size: 1.7rem;
    font-weight: 850;
    line-height: 1.1;
}

.stat-strip__label {
    color: var(--muted);
    font-size: .85rem;
}

.home-section {
    margin: 3.25rem 0;
}

.home-section__head {
    margin: 0 auto 1.75rem;
    max-width: 640px;
    text-align: center;
}

.home-section__head h2 {
    font-size: 1.9rem;
    letter-spacing: -.01em;
    margin: .65rem 0 .5rem;
}

.home-section__head p {
    color: var(--muted);
    margin: 0;
}

.feature-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.4rem;
    transition: border-color .15s ease, transform .15s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.feature-card__icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 11px;
    color: var(--primary-strong);
    display: inline-flex;
    height: 2.7rem;
    justify-content: center;
    margin-bottom: .9rem;
    width: 2.7rem;
}

.feature-card__icon svg {
    height: 1.5rem;
    width: 1.5rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin: 0 0 .4rem;
}

.feature-card p {
    color: var(--muted);
    font-size: .92rem;
    margin: 0;
}

.steps {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.4rem;
}

.step__num {
    align-items: center;
    background: var(--primary);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 2.1rem;
    justify-content: center;
    margin-bottom: .8rem;
    width: 2.1rem;
}

.step h3 {
    font-size: 1.1rem;
    margin: 0 0 .4rem;
}

.step p {
    color: var(--muted);
    font-size: .92rem;
    margin: 0;
}

.catalog-filters--center {
    justify-content: center;
}

.home-cta {
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
    border: 1px solid var(--line);
    border-radius: 18px;
    margin: 3.25rem 0 1rem;
    padding: 2.75rem 1.5rem;
    text-align: center;
}

.home-cta h2 {
    font-size: 1.85rem;
    margin: 0 0 .5rem;
}

.home-cta p {
    color: var(--muted);
    margin: 0 auto 1.5rem;
    max-width: 520px;
}

.home-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .hero__content h1 {
        font-size: 2.3rem;
    }

    .stat-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 520px) {
    .hero__content h1 {
        font-size: 1.95rem;
    }

    .home-section__head h2,
    .home-cta h2 {
        font-size: 1.55rem;
    }
}

.typeahead {
    flex: 1 1 auto;
    position: relative;
}

.typeahead__menu {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    left: 0;
    list-style: none;
    margin: .35rem 0 0;
    max-height: 360px;
    overflow-y: auto;
    padding: .35rem;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 30;
}

.typeahead__item {
    align-items: center;
    border-radius: 8px;
    color: var(--text);
    display: grid;
    gap: .75rem;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    padding: .55rem .7rem;
    text-decoration: none;
}

.typeahead__item:hover {
    background: var(--surface-soft);
}

.typeahead__code {
    background: var(--primary-soft);
    border-radius: 6px;
    color: var(--primary-strong);
    font-size: .78rem;
    font-weight: 800;
    padding: .15rem .5rem;
    white-space: nowrap;
}

.typeahead__name {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.typeahead__vendor {
    color: var(--muted);
    font-size: .8rem;
    white-space: nowrap;
}

.catalog-hero {
    padding: 1rem 0 1.75rem;
    text-align: center;
}

.catalog-hero h1 {
    font-size: 2.2rem;
    margin: 0 0 .5rem;
}

.catalog-hero p {
    color: var(--muted);
    margin: 0 auto 1.25rem;
    max-width: 600px;
}

.catalog-hero .catalog-search {
    margin: 0 auto;
    max-width: 620px;
}

.catalog-layout {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 260px minmax(0, 1fr);
}

.catalog-rail {
    position: sticky;
    top: 5rem;
}

.catalog-rail__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.catalog-rail__card h2 {
    font-size: 1rem;
    margin: 0 0 .75rem;
}

.catalog-vendor {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: .6rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .4rem 0;
}

.catalog-vendor__name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-vendor__count {
    background: var(--surface-soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    padding: .1rem .55rem;
}

.catalog-group {
    margin-bottom: 1.75rem;
}

.catalog-group__head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
}

.catalog-group__head h2 {
    font-size: 1.25rem;
    margin: 0;
}

.catalog-group__count {
    background: var(--surface-soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    padding: .2rem .7rem;
}

.catalog-group__meta {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: .75rem;
}

.catalog-group__link {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: .6rem;
    text-decoration: none;
}

.catalog-group__link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.vendor-hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    padding: 1.75rem;
}

.vendor-hero__top {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-hero__heading {
    flex: 1 1 auto;
    min-width: 0;
}

.vendor-hero__heading h1 {
    font-size: 1.9rem;
    letter-spacing: -.01em;
    margin: 0 0 .2rem;
}

.vendor-hero__count {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 600;
}

.vendor-hero__blurb {
    color: var(--muted);
    margin: 0 0 1.1rem;
    max-width: 780px;
}

.vendor-hero__trust {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .5rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vendor-hero__trust li {
    align-items: center;
    display: flex;
    gap: .4rem;
}

.vendor-hero__trust li::before {
    color: var(--primary-strong);
    content: "\2713";
    font-weight: 800;
}

@media (max-width: 600px) {
    .vendor-hero__top {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .vendor-hero__heading h1 {
        font-size: 1.5rem;
    }
}

.catalog-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.exam-tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.1rem;
    text-decoration: none;
    transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.exam-tile:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.exam-tile__code {
    align-self: flex-start;
    background: var(--surface-soft);
    border-radius: 6px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: .15rem .55rem;
}

.exam-tile__title {
    font-size: 1.05rem;
    font-weight: 800;
}

.exam-tile__desc {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--muted);
    display: -webkit-box;
    font-size: .92rem;
    line-clamp: 2;
    overflow: hidden;
}

.exam-tile__foot {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: .7rem;
}

.exam-tile__count {
    color: var(--muted);
    font-size: .85rem;
}

.exam-tile__link {
    color: var(--primary);
    font-size: .9rem;
    font-weight: 700;
}

.exam-tile__topline {
    align-items: center;
    display: flex;
    gap: .4rem;
}

.owned-badge {
    background: var(--accent-soft);
    border-radius: 999px;
    color: var(--accent);
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .04em;
    padding: .12rem .5rem;
    text-transform: uppercase;
}

.owned-rail {
    margin-bottom: 1.75rem;
}

/* Bundle building in the catalog */
.bundle-promo {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding: .75rem 1rem;
}

.bundle-promo--active {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.bundle-promo__strike {
    color: var(--muted);
    text-decoration: line-through;
}

.exam-tile--select {
    cursor: pointer;
}

.exam-tile--select:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.exam-tile--selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary) inset;
}

.exam-tile--limit {
    opacity: .55;
}

.exam-tile__add {
    color: var(--primary);
    font-size: .9rem;
    font-weight: 700;
}

.exam-tile--selected .exam-tile__add {
    color: var(--accent);
}

.catalog-layout--bundling {
    padding-bottom: 5rem;
}

.bundle-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    align-items: center;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .12);
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    padding: .8rem 1.25rem;
}

.bundle-bar__info {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.bundle-bar__count {
    color: var(--muted);
    font-weight: 700;
}

.bundle-bar__chips {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: .4rem;
}

.bundle-bar__empty {
    color: var(--muted);
    font-size: .92rem;
}

.bundle-chip {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 700;
    padding: .2rem .35rem .2rem .7rem;
}

.bundle-chip__remove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 .25rem;
}

.bundle-chip__remove:hover {
    color: var(--danger);
}

.bundle-bar__action {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    justify-content: flex-end;
    margin-left: auto;
}

.bundle-bar__hint {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

a.bundle-bar__hint:hover {
    color: var(--primary);
}

.bundle-bar-spacer {
    height: 4.75rem;
}

.exam-tile-stack {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    height: 100%;
}

.exam-tile-stack > .exam-tile {
    flex: 1;
}

.bundle-add-link {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary);
    font-size: .85rem;
    font-weight: 700;
    padding: .4rem;
    text-align: center;
    text-decoration: none;
    transition: border-color .14s ease, background .14s ease;
}

.bundle-add-link:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.bundle-add-link--in {
    border-color: var(--accent);
    color: var(--accent);
}

.exam-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 0 0 1.5rem;
}

.access-banner {
    align-items: center;
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.access-banner strong {
    display: block;
    font-size: 1.1rem;
}

.exam-request-cta {
    margin: 2rem 0 0;
}

.exam-request {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.1rem 1.4rem;
}

.exam-request__copy {
    display: grid;
    gap: .15rem;
}

.exam-request__copy strong {
    font-size: 1.05rem;
}

.exam-request__copy span {
    color: var(--muted);
    font-size: .9rem;
}

.promo-form {
    flex-basis: 100%;
    margin-top: .35rem;
}

.promo-form form {
    align-items: center;
    display: flex;
    gap: .5rem;
    max-width: 22rem;
}

.promo-form input {
    text-transform: uppercase;
}

.promo-form--inline {
    align-items: center;
    display: flex;
    flex-basis: auto;
    gap: .5rem;
    margin-top: 0;
}

.promo-form--inline input {
    width: 10rem;
}

.promo-message {
    font-size: .85rem;
    margin: .4rem 0 0;
}

.promo-remove-btn {
    font-size: 1.1rem;
    line-height: 1;
    padding-top: 0;
    padding-bottom: 0;
}

.bundle-bar__promo-message {
    font-size: .8rem;
    margin: .25rem 0 0;
    text-align: right;
}

.access-banner > div span {
    color: var(--muted);
}

.access-banner--owned {
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 700;
}

.pricing-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin: 1.5rem 0 2rem;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    position: relative;
}

.pricing-card--featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.pricing-card__badge {
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: .25rem .7rem;
    position: absolute;
    right: 1.25rem;
    top: -.75rem;
    text-transform: uppercase;
}

.pricing-card h2 {
    font-size: 1.3rem;
    margin: 0 0 .5rem;
}

.pricing-card__price {
    font-size: 2.2rem;
    font-weight: 850;
    line-height: 1.1;
}

.pricing-card__price span {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
}

.pricing-card__sub {
    color: var(--primary-strong);
    font-weight: 600;
    margin: .35rem 0 0;
}

.pricing-card__strike {
    color: var(--muted);
    font-size: 1.4rem;
    font-weight: 700;
    margin-right: .35rem;
    text-decoration: line-through;
}

.pricing-card__features {
    color: var(--muted);
    display: grid;
    gap: .5rem;
    list-style: none;
    margin: 1.1rem 0 1.5rem;
    padding: 0;
}

.pricing-card__features li {
    padding-left: 1.5rem;
    position: relative;
}

.pricing-card__features li::before {
    color: var(--primary-strong);
    content: "\2713";
    font-weight: 800;
    left: 0;
    position: absolute;
}

.pricing-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.bundle-exam-list {
    max-height: 360px;
    overflow-y: auto;
}

.check-row--disabled {
    opacity: .5;
}

.demo-runner {
    margin: 0 auto;
    max-width: 760px;
}

.demo-runner__bar {
    color: var(--muted);
    display: flex;
    font-size: .85rem;
    font-weight: 700;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.demo-runner__prompt {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.demo-choices {
    border: 0;
    display: grid;
    gap: .6rem;
    margin: 0 0 1rem;
    padding: 0;
}

.demo-runner__actions {
    margin-top: 1.25rem;
}

.demo-wall {
    margin: 2rem auto;
    max-width: 620px;
    text-align: center;
}

.demo-wall h1 {
    font-size: 1.8rem;
    margin: 0 0 .6rem;
}

.demo-wall p {
    color: var(--muted);
    margin: 0 auto 1.5rem;
}

.demo-wall__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.breadcrumb {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .4rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb__current {
    color: var(--text);
    font-weight: 700;
}

.breadcrumb__vendor {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
}

.breadcrumb .vendor-mark {
    border-radius: 4px;
    font-size: .58rem;
    height: 1.15rem;
    min-width: 1.15rem;
    padding: 0 .2rem;
}

.exam-detail-hero {
    margin-bottom: 1.5rem;
}

.exam-detail-hero__meta {
    align-items: center;
    display: flex;
    gap: .6rem;
    margin-bottom: .6rem;
}

.exam-detail-hero h1 {
    font-size: 2rem;
    line-height: 1.15;
    margin: 0 0 .5rem;
}

.exam-detail-hero p {
    color: var(--muted);
    margin: 0;
    max-width: 760px;
}

.exam-modes {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 1rem;
}

.exam-modes__note {
    margin: 0 0 1.75rem;
    font-size: .9rem;
}

.exam-mode-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.4rem;
}

.exam-mode-card__head {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.exam-mode-card__icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 12px;
    color: var(--primary);
    display: flex;
    flex: 0 0 auto;
    height: 2.6rem;
    justify-content: center;
    width: 2.6rem;
}

.exam-mode-card__icon svg {
    fill: currentColor;
    height: 1.4rem;
    width: 1.4rem;
}

.exam-mode-card h2 {
    font-size: 1.2rem;
    margin: 0;
}

.exam-mode-card p {
    color: var(--muted);
    margin: 0 0 .5rem;
}

.exam-mode-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.quick-facts__grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-top: 1rem;
}

.fact {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .85rem .95rem;
}

.fact__label {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fact__value {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--text);
    display: -webkit-box;
    font-size: 1rem;
    font-weight: 700;
    line-clamp: 3;
    line-height: 1.35;
    overflow: hidden;
}

.fact__value[title] {
    cursor: help;
}

.exam-detail-section {
    margin: 1.75rem 0;
}

.exam-detail-section > h2 {
    font-size: 1.35rem;
    margin: 0 0 1rem;
}

.faq {
    display: grid;
    gap: .6rem;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .85rem 1.1rem;
}

.faq summary {
    cursor: pointer;
    font-weight: 700;
}

.faq details[open] summary {
    margin-bottom: .5rem;
}

.faq p {
    color: var(--muted);
    margin: 0;
}

.objective-item header .objective-weight {
    background: var(--surface-soft);
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    padding: .2rem .65rem;
    white-space: nowrap;
}

.objective-desc {
    color: var(--muted);
    margin: .5rem 0 0;
}

.prose-block {
    line-height: 1.6;
    max-width: 760px;
}

.vendor-mark {
    align-items: center;
    background: var(--vendor-color, var(--primary));
    border-radius: 7px;
    box-sizing: border-box;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 800;
    height: 1.7rem;
    justify-content: center;
    letter-spacing: .01em;
    line-height: 1;
    min-width: 1.7rem;
    padding: 0 .3rem;
}

.vendor-mark--lg {
    border-radius: 10px;
    font-size: 1rem;
    height: 2.6rem;
    min-width: 2.6rem;
    padding: 0 .45rem;
}

.catalog-group__head h2,
.vendor-head__title {
    align-items: center;
    display: flex;
    gap: .6rem;
}

.filter-chip--vendor {
    align-items: center;
    display: inline-flex;
    gap: .45rem;
}

.exam-card__meta {
    align-items: center;
    display: flex;
    gap: .45rem;
}

.exam-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .25rem;
}

/* Legal pages (terms / privacy / refunds) */
.legal {
    margin: 0 auto;
    max-width: 760px;
    padding: 1rem 0 3rem;
}

.legal h1 {
    margin-bottom: .35rem;
}

.legal h2 {
    border-top: 1px solid var(--line);
    margin-top: 2rem;
    padding-top: 1.25rem;
}

.legal h3 {
    margin-top: 1.4rem;
}

.legal p,
.legal li {
    color: var(--text);
    line-height: 1.65;
}

.legal ul {
    padding-left: 1.2rem;
}

.legal li {
    margin: .35rem 0;
}

.legal__date {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 1.5rem;
}

.legal a {
    color: var(--primary);
}

.legal__footnav {
    border-top: 1px solid var(--line);
    color: var(--muted);
    margin-top: 2.5rem;
    padding-top: 1.25rem;
}

/* Unified top navigation (storefront + app) */
.impersonation-banner {
    align-items: center;
    background: #b45309;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    justify-content: center;
    padding: .5rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 60;
    text-align: center;
}

.impersonation-banner__text {
    font-weight: 600;
}

.impersonation-banner__admin {
    font-weight: 400;
    opacity: .85;
}

.impersonation-banner__form {
    margin: 0;
}

.impersonation-banner__exit {
    font-weight: 600;
}

.site-nav {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    padding: .6rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-nav__brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 850;
    gap: .5rem;
    text-decoration: none;
}

.site-nav__logo {
    border-radius: 7px;
    display: block;
    flex: none;
    height: 1.7rem;
    width: 1.7rem;
}

.site-nav__brand-text {
    line-height: 1;
}

.site-nav__burger {
    display: none;
}

.site-nav__drawer {
    align-items: center;
    display: flex;
    flex: 1;
    gap: .75rem 1rem;
    justify-content: space-between;
    min-width: 0;
}

.site-nav__menu {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.site-nav__link {
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    padding: .45rem .7rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__link:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.site-nav__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.site-nav__cta {
    white-space: nowrap;
}

.site-nav__icon-link {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    padding: .45rem;
}

.site-nav__logout {
    display: inline;
    margin: 0;
}

.site-nav__more {
    position: relative;
}

.site-nav__more summary {
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font-size: .92rem;
    font-weight: 700;
    list-style: none;
    padding: .45rem .7rem;
    white-space: nowrap;
}

.site-nav__more summary::-webkit-details-marker {
    display: none;
}

.site-nav__more summary::after {
    content: " ▾";
    color: var(--muted);
}

.site-nav__more[open] summary {
    background: var(--surface-soft);
    color: var(--text);
}

.site-nav__more-menu {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: grid;
    gap: .1rem;
    min-width: 180px;
    padding: .35rem;
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 60;
}

.site-nav__more-menu a {
    border-radius: 7px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    padding: .5rem .7rem;
    text-decoration: none;
}

.site-nav__more-menu a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.site-nav__exam {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 8px;
    color: var(--primary-strong, var(--primary));
    display: inline-flex;
    font-size: .82rem;
    font-weight: 800;
    gap: .3rem;
    max-width: 16rem;
    padding: .4rem .65rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__exam-code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav__exam::before {
    content: "Exam:";
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 860px) {
    .site-nav__burger {
        cursor: pointer;
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        margin-left: auto;
        padding: .4rem;
    }

    .site-nav__burger span {
        background: var(--muted);
        border-radius: 2px;
        height: 2px;
        transition: transform .18s ease, opacity .18s ease;
        width: 24px;
    }

    .site-nav__drawer {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav__toggle:checked ~ .site-nav__drawer {
        display: flex;
    }

    .site-nav__menu,
    .site-nav__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .site-nav__more-menu {
        box-shadow: none;
        position: static;
    }

    .site-nav__exam {
        justify-content: flex-start;
    }

    .site-nav__actions {
        border-top: 1px solid var(--line);
        gap: .5rem;
        margin-top: .35rem;
        padding-top: .6rem;
    }

    .site-nav__actions .site-nav__link {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: .6rem;
        text-align: center;
    }

    .site-nav__logout {
        display: block;
    }

    .site-nav__logout-btn {
        width: 100%;
    }

    .site-nav__toggle:checked ~ .site-nav__burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-nav__toggle:checked ~ .site-nav__burger span:nth-child(2) {
        opacity: 0;
    }

    .site-nav__toggle:checked ~ .site-nav__burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 820px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-rail {
        position: static;
    }
}

.home-hero__link {
    font-weight: 700;
}

.catalog-search {
    margin-bottom: 1rem;
    max-width: 520px;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.filter-chip {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    padding: .4rem .9rem;
    text-decoration: none;
}

.filter-chip:hover {
    border-color: var(--primary);
}

.filter-chip--on {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
}

.marketing-shell {
    background: var(--app-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.marketing-nav {
    align-items: center;
    backdrop-filter: blur(12px);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1.5rem;
    padding: .9rem 2rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

.marketing-nav__brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    font-size: 1.2rem;
    font-weight: 850;
    gap: .55rem;
    text-decoration: none;
}

.marketing-nav__brand::before {
    background: var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 0 4px rgba(84, 198, 166, .16);
    content: "";
    height: 1rem;
    width: 1rem;
}

.marketing-nav__links {
    display: flex;
    gap: 1.1rem;
}

.marketing-nav__links a,
.marketing-nav__link {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.marketing-nav__links a:hover,
.marketing-nav__link:hover {
    color: var(--text);
}

.marketing-nav__actions {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.marketing-nav__actions .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.marketing-content {
    flex: 1 1 auto;
    margin: 0 auto;
    max-width: 1180px;
    padding: 2rem;
    width: 100%;
}

.marketing-footer {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    font-size: .9rem;
    gap: 1.5rem;
    justify-content: space-between;
    padding: 1.25rem 2rem;
}

.marketing-footer nav {
    display: flex;
    gap: 1.25rem;
}

.marketing-footer a {
    color: var(--muted);
    text-decoration: none;
}

.marketing-footer a:hover {
    color: var(--text);
}

#blazor-error-ui {
    background: #fff8e6;
    border-top: 1px solid #f0c15a;
    bottom: 0;
    box-shadow: 0 -10px 30px rgba(17, 24, 39, .12);
    box-sizing: border-box;
    color: #513a06;
    display: none;
    left: 0;
    padding: .85rem 3rem .85rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #285f92;
    font-weight: 800;
    margin-left: .5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: .7rem;
}

@media (max-width: 640px) {
    .marketing-nav {
        flex-wrap: nowrap;
        gap: .5rem;
        padding: .75rem 1rem;
    }

    .marketing-nav__brand {
        font-size: 1.05rem;
    }

    .marketing-nav__links {
        display: none;
    }

    .marketing-nav .theme-switch {
        display: none;
    }

    .marketing-nav__actions {
        gap: .5rem;
    }

    .marketing-nav__actions .btn {
        font-size: .85rem;
        padding: .42rem .8rem;
        white-space: nowrap;
    }

    .marketing-nav__link {
        font-size: .9rem;
        white-space: nowrap;
    }

    .marketing-content {
        padding: 1.25rem 1rem;
    }

    .marketing-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
        padding: 1.25rem 1rem;
    }
}

.exam-card dl,
.settings-panel dl {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    margin: 1rem 0;
}

.exam-card dt,
.settings-panel dt {
    color: #5f6b7a;
    font-size: .8rem;
    margin: 0;
}

.exam-card dd,
.settings-panel dd {
    font-weight: 700;
    margin: 0;
}

.access-section {
    margin-bottom: 2rem;
}

.access-section > h2 {
    margin-bottom: 1rem;
}

.access-section__empty {
    color: #5f6b7a;
}

.exam-card h3 {
    font-size: 1.15rem;
    margin: .25rem 0 0;
}

.access-details {
    grid-template-columns: 1fr !important;
}

.access-details > div {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.access-card__note {
    color: #5f6b7a;
    font-size: .9rem;
    margin: 0 0 1rem;
}

.exam-card--expired {
    opacity: .92;
}

.admin-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 1rem;
}

.detail-items {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
}

.detail-items li {
    padding: .35rem 0;
    border-bottom: 1px solid rgba(128, 128, 128, .2);
}

.detail-items li:last-child {
    border-bottom: 0;
}

.settings-panel dd code {
    font-size: .8rem;
    font-weight: 400;
    word-break: break-all;
}

.mode-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.continue-session-card {
    align-items: center;
    background: linear-gradient(135deg, rgba(25, 135, 84, .13), rgba(25, 135, 84, .05));
    border: 1px solid rgba(25, 135, 84, .38);
    border-left: 5px solid #198754;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.2rem;
}

.continue-session-card__icon {
    align-items: center;
    background: #198754;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: .85rem;
    height: 2.5rem;
    justify-content: center;
    padding-left: .15rem;
    width: 2.5rem;
}

.continue-session-card__content {
    min-width: 0;
}

.continue-session-card__content > span {
    color: #167347;
    display: block;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.continue-session-card h2 {
    color: var(--text);
    font-size: 1.2rem;
    margin: .15rem 0 .2rem;
}

.continue-session-card p {
    color: var(--muted);
    margin: 0;
}

.continue-session-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    margin-top: .55rem;
}

.continue-session-card__meta strong,
.continue-session-card__meta span {
    color: var(--text);
    font-size: .84rem;
}

@media (max-width: 700px) {
    .continue-session-card {
        align-items: start;
        grid-template-columns: auto 1fr;
    }

    .continue-session-card .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.access-expired-card {
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 193, 7, .15), rgba(255, 193, 7, .05));
    border: 1px solid rgba(255, 193, 7, .45);
    border-left: 5px solid #ffc107;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.2rem;
}

.access-expired-card__icon {
    align-items: center;
    background: #ffc107;
    border-radius: 50%;
    color: #3d2c00;
    display: flex;
    font-size: 1.3rem;
    font-weight: 850;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.access-expired-card__content {
    min-width: 0;
}

.access-expired-card__content > span {
    color: #997404;
    display: block;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.access-expired-card h2 {
    color: var(--text);
    font-size: 1.2rem;
    margin: .15rem 0 .2rem;
}

.access-expired-card p {
    color: var(--muted);
    margin: 0;
}

@media (max-width: 700px) {
    .access-expired-card {
        align-items: start;
        grid-template-columns: auto 1fr;
    }

    .access-expired-card .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.objective-list {
    display: grid;
    gap: .75rem;
}

.objective-item header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.objective-item header span {
    color: #365b9a;
    font-weight: 700;
}

.objective-item ul {
    margin: .75rem 0 0;
}

.stats-grid span {
    color: #5f6b7a;
    display: block;
}

.stats-grid strong {
    display: block;
    font-size: 2rem;
}

.question-panel {
    background: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 1.25rem;
}

.question-panel h2 {
    font-size: 1.35rem;
    margin: .75rem 0 1rem;
}

.question-prompt {
    font-size: 1.02rem;
    margin: .75rem 0 1rem;
}

.question-panel__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.question-panel__meta span {
    background: #eef2f7;
    border-radius: 999px;
    color: #334e68;
    font-size: .8rem;
    font-weight: 700;
    padding: .25rem .55rem;
}

.answer-option {
    align-items: flex-start;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: .75rem;
    margin-bottom: .65rem;
    max-width: 100%;
    min-width: 0;
    padding: .85rem;
    width: 100%;
}

.answer-option input {
    flex: 0 0 auto;
    margin-top: .25rem;
}

.answer-option > .markdown-content {
    flex: 1 1 auto;
    min-width: 0;
}

.answer-option--selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.answer-option--correct {
    border-color: #198754;
    background: #edf8f1;
}

.answer-option--wrong {
    border-color: #dc3545;
    background: #fff1f2;
}

.feedback-panel,
.flag-panel {
    border: 1px solid #d9dee7;
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
}

.feedback-panel h3 {
    font-size: 1.1rem;
    margin: 0 0 .5rem;
}

.feedback-panel--correct {
    background: #edf8f1;
    border-color: #198754;
}

.feedback-panel--wrong {
    background: #fff1f2;
    border-color: #dc3545;
}

.feedback-nav-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, .72);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 700;
    gap: .65rem;
    padding: .68rem .85rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.feedback-nav-button:hover,
.feedback-nav-button:focus-visible {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .08);
    color: #fff;
}

.feedback-nav-button__icon {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 1.1rem;
    font-size: .72rem;
    height: 1.1rem;
    justify-content: center;
    line-height: 1;
}

.site-feedback-dialog {
    color: var(--text);
    width: min(36rem, calc(100dvw - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: auto;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.site-feedback-dialog::backdrop {
    background: rgba(7, 15, 28, .72);
}

.site-feedback-dialog__content {
    display: grid;
    gap: 1rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1.25rem;
}

.site-feedback-dialog__header {
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    position: sticky;
    top: -1.25rem;
    z-index: 1;
    padding-top: 1.25rem;
    padding-bottom: .35rem;
}

.site-feedback-dialog__header h2,
.site-feedback-dialog__header p {
    margin: 0;
}

.question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.admin-session-filters {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(12rem, 16rem);
    gap: 1rem;
    align-items: end;
}

.deleted-session-row {
    opacity: .7;
}

.bulk-select-cell {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.bulk-action-bar {
    align-items: center;
    background: var(--surface-2, rgba(127, 127, 127, .08));
    border: 1px solid var(--line);
    border-radius: .5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    margin-bottom: .9rem;
    padding: .6rem .85rem;
}

.bulk-action-bar__count {
    font-weight: 600;
}

.bulk-action-bar__confirm {
    color: var(--danger, #dc3545);
    font-size: .9rem;
}

.session-deleted-banner {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--danger);
    border-radius: .75rem;
    background: var(--danger-soft);
    color: var(--danger);
}

.admin-session-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, .7fr);
    gap: 1rem;
}

.session-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin: 0;
}

.session-detail-list > div {
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: var(--surface-soft);
}

.session-detail-list dt {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.session-detail-list dd {
    margin: .25rem 0 0;
    font-weight: 700;
}

.admin-attempt-list {
    display: grid;
    gap: .75rem;
}

@media (max-width: 800px) {
    .admin-session-filters,
    .admin-session-detail-grid,
    .session-detail-list {
        grid-template-columns: 1fr;
    }
}

.question-actions--inline {
    margin-top: 0;
}

/* Orders admin: keep the action column a fixed width so the inline
   refund/delete confirmation never widens the cell and reflows the table. */
.order-actions {
    width: 13rem;
    min-width: 13rem;
    white-space: normal;
}

.order-actions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.order-actions__confirm {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    font-size: .85rem;
}

.flag-panel {
    display: grid;
    gap: .75rem;
}

.study-tools-panel {
    background: #f7f8fa;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    margin: 0 0 1rem;
    padding: .85rem;
}

.study-tools-grid {
    align-items: end;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(180px, 240px) 1fr;
}

.bookmark-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.result-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.result-meta-row span,
.study-note-result {
    background: #eef2f7;
    border-radius: 6px;
    color: #334e68;
    font-size: .9rem;
    padding: .35rem .55rem;
}

.study-note-result {
    margin: .75rem 0;
}

.study-note-result p {
    margin: .25rem 0 0;
}

.bookmark-list {
    margin-top: 1rem;
}

.bookmark-prompt {
    margin: .85rem 0;
}

.filter-grid {
    align-items: end;
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Reserve room beneath the row so the absolutely-positioned duration hint has space. */
.filter-grid--grant {
    padding-bottom: 1.4rem;
}

/* Keep the hint from adding height to its cell, so the inputs stay aligned with the others. */
.grant-duration-field {
    position: relative;
}

.grant-duration-field .grant-duration-hint {
    left: 0;
    margin-top: .25rem;
    position: absolute;
    top: 100%;
}

.inline-pill {
    background: #eef2f7;
    border-radius: 999px;
    color: #334e68;
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    margin: 0 .35rem .35rem 0;
    padding: .2rem .5rem;
}

.inline-pill--warning {
    background: #fff4cc;
    color: #6f4e00;
    text-decoration: none;
}

.question-header-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.exam-nav-panel {
    margin-bottom: 1rem;
}

.timer-pill {
    background: #eef2f7;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #17202a;
    font-weight: 700;
    padding: .45rem .7rem;
}

.timer-pill--urgent {
    background: #fff1f2;
    border-color: #dc3545;
    color: #b4232f;
}

.question-number-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.question-number {
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 6px;
    color: #334e68;
    font-weight: 700;
    min-width: 2.25rem;
    padding: .35rem .55rem;
}

.question-number--current {
    border-color: var(--primary);
    color: var(--primary-strong);
}

.question-number--answered {
    background: #edf8f1;
    border-color: #198754;
    color: #146c43;
}

/* Practice progress review — numbered grid colored by correctness. */
.progress-review-panel {
    margin-bottom: 1rem;
}

.question-number--correct {
    background: #edf8f1;
    border-color: #198754;
    color: #146c43;
}

.question-number--partial {
    background: #fff8e6;
    border-color: #e0a800;
    color: #8a6d00;
}

.question-number--wrong {
    background: #fff1f2;
    border-color: #dc3545;
    color: #b4232f;
}

.session-progress__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

.progress-stat {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    padding: .15rem .65rem;
    border-radius: 999px;
    background: #f1f4f8;
    color: #334e68;
}

.progress-stat::before {
    content: "";
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: currentColor;
}

.progress-stat--correct {
    color: #198754;
    background: #edf8f1;
}

.progress-stat--wrong {
    color: #dc3545;
    background: #fff1f2;
}

.progress-stat--accuracy {
    color: var(--primary-strong);
    background: var(--brand-soft);
}

.progress-stat--accuracy::before {
    display: none;
}

.import-textarea {
    font-family: Consolas, 'Courier New', monospace;
    font-size: .9rem;
}

.large-textarea {
    min-height: 560px;
}

.json-import-textarea {
    min-height: 72vh;
}

.export-textarea {
    min-height: 620px;
}

.import-stats {
    margin-top: 1rem;
}

.markdown-content > :first-child {
    margin-top: 0;
}

.markdown-content {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.markdown-content > * {
    max-width: 100%;
}

.markdown-content > :last-child {
    margin-bottom: 0;
}

.markdown-content p {
    margin-bottom: .75rem;
}

.markdown-content code {
    background: #eef2f7;
    border-radius: 4px;
    color: #17202a;
    font-family: Consolas, 'Courier New', monospace;
    font-size: .92em;
    overflow-wrap: anywhere;
    padding: .12rem .3rem;
    word-break: break-word;
}

.markdown-content pre {
    background: #f7f8fa;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    box-sizing: border-box;
    display: block;
    margin: .85rem 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 1rem;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.markdown-content pre code {
    background: transparent;
    border-radius: 0;
    color: #0f172a;
    display: block;
    font-size: .9rem;
    line-height: 1.55;
    max-width: none;
    min-width: max-content;
    overflow-wrap: normal;
    padding: 0;
    white-space: pre;
    word-break: normal;
}

.markdown-content img,
.markdown-content svg,
.markdown-content video,
.markdown-content iframe {
    height: auto;
    max-width: 100%;
}

.markdown-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.markdown-content strong {
    font-weight: 700;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: .75rem;
}

.markdown-content--compact {
    max-width: 720px;
}

.markdown-content--compact pre {
    max-height: 220px;
}

.answer-explanation {
    border-top: 1px solid rgba(0, 0, 0, .1);
    margin-top: .75rem;
    padding-top: .75rem;
}

.editor-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.checkbox-grid {
    display: grid;
    gap: .4rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.check-row {
    align-items: flex-start;
    display: flex;
    gap: .5rem;
}

.check-row input {
    margin-top: .25rem;
}

.answer-editor {
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    margin-bottom: .75rem;
    padding: .75rem;
}

.section-heading-row,
.answer-editor__header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.section-heading-row {
    margin-bottom: .9rem;
}

.section-heading-row > *,
.recommendation-item > *,
.chart-card__header > * {
    min-width: 0;
}

.section-heading-row h2,
.section-heading-row h3 {
    margin-bottom: 0;
}

.section-heading-row > .btn,
.section-heading-row > .question-actions {
    flex: 0 0 auto;
}

.report-summary {
    margin-bottom: 1rem;
}

.report-item header p {
    color: #5f6b7a;
    margin: .15rem 0 0;
}

.report-prompt {
    margin-top: .85rem;
}

.report-details {
    background: #f7f8fa;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    margin-top: .85rem;
    padding: .75rem;
}

.report-details p {
    margin: .25rem 0 0;
}

.answer-review-list {
    display: grid;
    gap: .5rem;
    margin-top: .85rem;
}

.answer-review-item {
    align-items: flex-start;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .75rem;
}

.answer-review-item--correct {
    border-color: #198754;
    background: #edf8f1;
}

.revision-history-panel {
    margin-top: 1rem;
}

.report-meta {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: .85rem 0 0;
}

.report-meta dt {
    color: #5f6b7a;
    font-size: .8rem;
}

.report-meta dd {
    font-weight: 700;
    margin: 0;
}

.recent-sessions {
    margin-top: 1rem;
}

.recommendation-panel {
    margin-bottom: 1rem;
}

.study-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.study-actions .btn {
    flex: 0 1 auto;
}

.study-launcher {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.study-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.1rem 1.2rem;
}

.study-card--primary {
    grid-column: 1 / -1;
    border-color: var(--primary);
    border-width: 1.5px;
}

.study-card__head h2 {
    margin: 0 0 .25rem;
}

.study-card__head p {
    color: var(--muted);
    margin: 0;
}

.study-card .btn {
    align-self: flex-start;
}

.study-options {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.study-option__label {
    color: var(--muted);
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    margin-bottom: .45rem;
    text-transform: uppercase;
}

.study-option__hint {
    color: var(--muted);
    font-size: .85rem;
    margin: .45rem 0 0;
}

.study-option__count {
    max-width: 7rem;
}

.option-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.option-pill {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    color: var(--text);
    cursor: pointer;
    font-size: .9rem;
    padding: .35rem .9rem;
}

.option-pill--on {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
    font-weight: 600;
}

.option-pill:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.study-toggle {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: .6rem;
}

.study-toggle input {
    margin-top: .3rem;
}

.study-toggle small {
    color: var(--muted);
    display: block;
    font-size: .82rem;
}

.objective-picker {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: .75rem;
    padding: .85rem;
}

.objective-picker__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .7rem;
}

.objective-picker__count {
    color: var(--muted);
    font-size: .85rem;
    margin-left: auto;
}

.objective-picker__list {
    display: grid;
    gap: .45rem;
    max-height: 260px;
    overflow-y: auto;
}

.objective-picker__item {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    font-size: .9rem;
    gap: .55rem;
}

.objective-picker__main {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.objective-picker__stats {
    color: var(--muted);
    font-size: .78rem;
}

.objective-picker__item--group {
    font-weight: 600;
    margin-top: .15rem;
}

.objective-picker__item--group .objective-picker__stats {
    font-weight: 400;
}

.objective-row--group > td {
    background: var(--surface-soft);
    font-weight: 600;
}

@media (max-width: 640px) {
    .study-launcher {
        grid-template-columns: 1fr;
    }
}

.tab-bar {
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-bottom: 1.25rem;
}

.tab-button {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: .95rem;
    font-weight: 750;
    margin-bottom: -1px;
    padding: .6rem .95rem;
}

.tab-button:hover {
    color: var(--text);
}

.tab-button--on {
    border-bottom-color: var(--primary);
    color: var(--text);
}

.theme-toggle {
    align-items: center;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 2.1rem;
    justify-content: center;
    padding: 0;
    width: 2.1rem;
}

.theme-toggle:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
    color: var(--text);
}

.theme-toggle__icon {
    align-items: center;
    display: none;
    justify-content: center;
    line-height: 0;
}

.theme-toggle__icon svg {
    height: 18px;
    width: 18px;
}

.theme-toggle[data-theme-pref="system"] [data-theme-icon="system"],
.theme-toggle[data-theme-pref="light"] [data-theme-icon="light"],
.theme-toggle[data-theme-pref="dark"] [data-theme-icon="dark"],
.theme-toggle:not([data-theme-pref]) [data-theme-icon="dark"] {
    display: inline-flex;
}

.recommendation-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.recommendation-item {
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-rows: 1fr auto;
    padding: .85rem;
}

.recommendation-item__content {
    min-width: 0;
}

.recommendation-item__action {
    justify-self: start;
    width: auto;
}

.recommendation-item h3 {
    font-size: 1rem;
    margin: .15rem 0 .35rem;
    overflow-wrap: anywhere;
}

.recommendation-item p {
    color: #5f6b7a;
    margin: 0;
}

.coverage-row--empty td {
    background: #fff1f2;
}

.coverage-row--thin td {
    background: #fff8e6;
}

@media (max-width: 1100px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .study-tools-grid {
        grid-template-columns: 1fr;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Visual polish layer */
:root {
    color-scheme: light;
    --app-bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #d8e0ea;
    --line-strong: #c4cfdd;
    --text: #17202a;
    --muted: #647386;
    /* Single brand accent. Change --brand (+ -strong / -soft) to reskin the whole app;
       --primary and --accent below intentionally inherit from it. */
    --brand: #168f7e;
    --brand-strong: #0f6e60;
    --brand-soft: #e2f4f1;
    --brand-contrast: #ffffff;
    --primary: var(--brand);
    --primary-strong: var(--brand-strong);
    --primary-soft: var(--brand-soft);
    --accent: var(--brand);
    --accent-soft: var(--brand-soft);
    --warning-soft: #fff6d9;
    --danger: #b4232f;
    --danger-soft: #fff1f2;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
    --shadow-md: 0 14px 32px rgba(17, 24, 39, .08);
    --topbar-bg: rgba(255, 255, 255, .88);
    --sidebar-bg: #334155;
    --sidebar-line: rgba(255, 255, 255, .08);
    --field-bg: #ffffff;
    --table-head-bg: #f3f7fb;
    --table-hover-bg: #f8fbfe;
    --code-bg: #eef2f6;
    --code-border: #dce4ee;
    --code-text: #24364a;
    --pre-bg: #101820;
    --pre-text: #edf5ff;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --app-bg: #101722;
    --surface: #172231;
    --surface-soft: #111b28;
    --line: #2b3b4e;
    --line-strong: #40546b;
    --text: #e7edf5;
    --muted: #9aaabd;
    --brand: #4fd3b8;
    --brand-strong: #82e6d0;
    --brand-soft: #103a31;
    --brand-contrast: #07231d;
    --primary: var(--brand);
    --primary-strong: var(--brand-strong);
    --primary-soft: var(--brand-soft);
    --accent: var(--brand);
    --accent-soft: var(--brand-soft);
    --warning-soft: #332914;
    --danger: #ff9ba8;
    --danger-soft: #3a1d25;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .32);
    --shadow-md: 0 18px 34px rgba(0, 0, 0, .36);
    --topbar-bg: rgba(18, 27, 39, .88);
    --sidebar-bg: #1e293b;
    --sidebar-line: rgba(255, 255, 255, .08);
    --field-bg: #101a27;
    --table-head-bg: #111d2b;
    --table-hover-bg: #1b2a3d;
    --code-bg: #0d1622;
    --code-border: #30445c;
    --code-text: #d7e7fa;
    --pre-bg: #080e16;
    --pre-text: #e6f0ff;
}

html {
    background: var(--app-bg);
}

html,
body {
    -webkit-text-size-adjust: 100%;
    color: var(--text);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-size-adjust: 100%;
}

body {
    background:
        linear-gradient(180deg, #f8fafc 0, var(--app-bg) 320px);
}

:root[data-theme="dark"] body {
    background:
        linear-gradient(180deg, #121c29 0, var(--app-bg) 340px);
}

a,
.btn-link {
    color: var(--primary);
}

a:hover,
.btn-link:hover {
    color: var(--primary-strong);
}

.content {
    align-content: start;
    display: grid;
    gap: 1.15rem;
    padding-top: 0;
}

.page-header {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
    padding: 1.2rem 1.35rem;
}

.page-header h1 {
    color: var(--text);
    font-size: 1.7rem;
    font-weight: 850;
    line-height: 1.15;
}

.page-header p {
    color: var(--muted);
    font-size: .98rem;
}

.btn {
    border-radius: 7px;
    font-weight: 750;
    line-height: 1.2;
    padding: .55rem .82rem;
}

.btn-sm {
    border-radius: 6px;
    padding: .38rem .62rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--brand-contrast);
    box-shadow: 0 8px 18px rgba(22, 143, 126, .20);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.btn-outline-primary {
    background: var(--surface);
    border-color: #9ccabf;
    color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
}

.btn-outline-secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: #425466;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: #f2f5f8;
    border-color: #9aa9ba;
    color: var(--text);
}

.btn:disabled {
    box-shadow: none;
    cursor: not-allowed;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #62b3a6;
    box-shadow: 0 0 0 .18rem rgba(22, 143, 126, .18);
}

.mode-grid,
.exam-grid,
.stats-grid,
.recommendation-grid {
    gap: 1.15rem;
}

.mode-grid article,
.exam-card,
.stats-grid article,
.settings-panel,
.objective-item,
.question-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.1rem;
}

.mode-grid article:hover,
.exam-card:hover,
.objective-item:hover,
.recommendation-item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.mode-grid h2,
.exam-card h2,
.objective-item h2,
.settings-panel h2 {
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 850;
}

.mode-grid p,
.exam-card p,
.settings-panel p,
.objective-item p {
    color: var(--muted);
}

.exam-card__meta {
    color: var(--accent);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .08em;
}

.exam-card dl,
.settings-panel dl {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .8rem;
}

.exam-card dt,
.settings-panel dt,
.stats-grid span,
.report-meta dt {
    color: var(--muted);
    font-weight: 700;
}

.exam-card dd,
.settings-panel dd,
.report-meta dd {
    color: var(--text);
}

.stats-grid article {
    overflow: hidden;
    position: relative;
}

.stats-grid article::before {
    background: var(--accent);
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.stats-grid strong {
    color: var(--text);
    font-size: 1.75rem;
    line-height: 1.05;
}

.mode-strip,
.question-actions {
    gap: .6rem;
}

.mode-strip {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
    padding: .75rem;
}

.objective-list {
    gap: 1rem;
}

.objective-item header {
    border-bottom: 1px solid var(--line);
    margin: -.1rem 0 .8rem;
    padding-bottom: .75rem;
}

.objective-item header span,
.inline-pill {
    background: var(--primary-soft);
    border: 1px solid var(--line-strong);
    color: var(--primary-strong);
}

.inline-pill {
    border-radius: 999px;
    font-weight: 800;
}

.inline-pill--warning {
    background: var(--warning-soft);
    border-color: #f2d586;
    color: #735400;
}

.form-control,
.form-select {
    background-color: var(--field-bg);
    border-color: var(--line-strong);
    border-radius: 7px;
    color: var(--text);
    min-height: 2.55rem;
}

textarea.form-control {
    line-height: 1.45;
}

label {
    color: var(--text);
    font-weight: 700;
}

.field-help {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.35;
    margin-top: .35rem;
}

.diagnostic-block {
    background: var(--pre-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--pre-text);
    font-size: .86rem;
    max-height: 360px;
    overflow: auto;
    padding: .85rem;
    white-space: pre-wrap;
}

.form-check,
.check-row {
    color: var(--text);
}

.filter-grid,
.editor-grid,
.checkbox-grid {
    gap: .9rem;
}

.ai-settings-form {
    display: grid;
    gap: 1rem;
}

.ai-settings-grid {
    align-items: start;
    display: grid;
    gap: .95rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ai-settings-grid label {
    align-content: start;
    display: grid;
    gap: .35rem;
}

.ai-settings-grid .field-help {
    margin-top: 0;
}

.ai-settings-grid--single {
    grid-template-columns: minmax(220px, 320px);
}

.management-form-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-bottom: 1rem;
}

.management-form-grid label {
    align-content: start;
    display: grid;
    gap: .35rem;
}

.management-form-grid__wide {
    grid-column: 1 / -1;
}

/* Labeled sub-group within a settings panel — keeps related fields visually grouped. */
.form-subgroup {
    margin-bottom: 1.35rem;
}

.form-subgroup:last-of-type {
    margin-bottom: 0;
}

.form-subgroup__title {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .05em;
    margin: 0 0 .6rem;
    text-transform: uppercase;
}

.management-editor {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.management-editor h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0 0 .85rem;
}

.bulk-operation-grid {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 1rem;
    padding-top: 1rem;
}

.bulk-operation-grid > div {
    align-content: start;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: .7rem;
    padding: .85rem;
}

.bulk-danger-zone p {
    color: var(--muted);
    font-size: .86rem;
    margin: 0;
}

.settings-panel.danger-zone {
    border-color: var(--danger, #d9534f);
}

.delete-confirm {
    display: grid;
    gap: .75rem;
    margin-top: .5rem;
    max-width: 32rem;
}

.delete-confirm .form-check {
    margin-top: .5rem;
}

.coupon-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.coupon-form label {
    display: grid;
    gap: .3rem;
    font-weight: 600;
}

.coupon-active-toggle {
    align-content: end;
    grid-template-columns: none;
}

.coupon-code-input {
    text-transform: uppercase;
}

.coupon-exam-picker {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.coupon-exam-picker strong {
    display: block;
    font-weight: 800;
    margin: 0 0 .6rem;
}

.coupon-exam-picker strong:not(:first-child) {
    border-top: 1px solid var(--line);
    margin-top: 1rem;
    padding-top: 1rem;
}

.coupon-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.duplicate-list {
    display: grid;
    gap: 1rem;
}

.duplicate-pair {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.duplicate-pair > header,
.duplicate-question-meta {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.duplicate-pair > header {
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
    padding-bottom: .8rem;
}

.duplicate-pair h2 {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 850;
    margin: .15rem 0 0;
}

.duplicate-compare-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.duplicate-compare-grid > section {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 0;
    padding: .9rem;
}

.duplicate-question-meta {
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: .75rem;
}

.duplicate-question-meta strong {
    color: var(--text);
    font-size: .9rem;
}

.management-subtext {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    margin-top: .15rem;
}

.documentation-list {
    display: grid;
    gap: .65rem;
}

.documentation-list a {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .8rem;
    text-decoration: none;
}

.documentation-list a:hover {
    border-color: var(--primary);
}

.documentation-list span,
.inline-notice {
    color: var(--muted);
}

.inline-notice {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0;
    padding: .75rem 1rem;
}

.table-responsive {
    border: 1px solid var(--line);
    border-radius: 8px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--table-head-bg);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.table tbody td {
    background: var(--surface);
    border-color: var(--line);
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: var(--table-hover-bg);
}

.question-panel {
    box-shadow: 0 18px 42px rgba(17, 24, 39, .08);
    padding: 1.35rem;
}

.question-panel__toolbar {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.question-panel__meta {
    gap: .45rem;
    margin-bottom: 0;
}

.question-panel__meta span {
    background: #eef7f4;
    border: 1px solid #cfe9df;
    border-radius: 999px;
    color: #0f6a57;
    font-size: .76rem;
    font-weight: 850;
}

.question-prompt {
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.answer-option {
    background: var(--surface);
    border-color: var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: .72rem;
    padding: .9rem .95rem;
    transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.answer-option:hover {
    border-color: #aac2dc;
    box-shadow: 0 10px 22px rgba(17, 24, 39, .07);
}

.answer-option--selected {
    background: var(--primary-soft);
    border-color: #78a9da;
}

.answer-option--correct {
    background: var(--accent-soft);
    border-color: #65b89f;
}

.answer-option--wrong {
    background: var(--danger-soft);
    border-color: #f0a4ac;
}

.answer-option input {
    accent-color: var(--primary);
}

.feedback-panel,
.flag-panel,
.study-tools-panel {
    border-radius: 8px;
}

.feedback-panel {
    border-color: var(--line);
}

.feedback-panel--correct {
    background: var(--accent-soft);
    border-color: #7ac4ad;
}

.feedback-panel--wrong {
    background: var(--danger-soft);
    border-color: #eba1aa;
}

.study-tools-panel {
    background: var(--surface-soft);
    border-color: var(--line);
}

.study-tools-backdrop {
    align-items: center;
    background: rgba(10, 16, 24, .52);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 1100;
}

.study-tools-modal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
    display: grid;
    gap: 1rem;
    max-height: min(88vh, 680px);
    max-width: 560px;
    overflow: auto;
    padding: 1.1rem;
    width: min(100%, 560px);
}

.study-tools-modal__header {
    align-items: flex-start;
    display: flex;
    gap: .85rem;
    justify-content: space-between;
}

.study-tools-modal__header h2 {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 850;
    margin: 0;
}

.study-tools-modal__header p {
    color: var(--muted);
    margin: .2rem 0 0;
}

.result-meta-row span,
.study-note-result {
    background: var(--surface-soft);
    border: 1px solid #e4ebf2;
    color: #425466;
}

.timer-pill {
    background: var(--surface);
    border-color: var(--line-strong);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.timer-pill--urgent {
    background: var(--danger-soft);
    border-color: #e58d98;
    color: var(--danger);
}

.question-number {
    border-color: var(--line);
    border-radius: 7px;
    min-width: 2.35rem;
}

.question-number:hover {
    background: var(--primary-soft);
    border-color: #9ccabf;
}

.question-number--current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.question-number--answered {
    background: var(--accent-soft);
    border-color: #7ac4ad;
    color: #0f6a57;
}

.markdown-content {
    color: var(--text);
}

.markdown-content code {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    color: var(--code-text);
}

.markdown-content pre {
    background: var(--pre-bg);
    border-color: var(--pre-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.markdown-content pre code {
    color: var(--pre-text);
}

.import-textarea {
    background: var(--field-bg);
}

.answer-editor,
.answer-review-item,
.recommendation-item,
.report-details {
    background: var(--surface-soft);
    border-color: var(--line);
    border-radius: 8px;
}

.answer-review-item--correct {
    background: var(--accent-soft);
    border-color: #7ac4ad;
}

.recommendation-item h3 {
    color: var(--text);
    font-weight: 850;
}

.recommendation-item p,
.report-item header p {
    color: var(--muted);
}

.import-stats,
.bookmark-list,
.recent-sessions,
.recommendation-panel,
.revision-history-panel {
    margin-bottom: 0;
    margin-top: 0;
}

.recommendation-panel .section-heading-row {
    align-items: center;
}

.settings-panel,
.question-panel,
.stats-grid,
.exam-grid,
.mode-grid,
.objective-list {
    margin-bottom: 0;
    margin-top: 0;
}

.coverage-row--empty td {
    background: var(--danger-soft);
}

.coverage-row--thin td {
    background: var(--warning-soft);
}

.coverage-objective-link {
    color: var(--text);
    display: inline-flex;
    gap: .25rem;
    text-decoration: none;
}

.coverage-objective-link:hover {
    color: var(--primary-strong);
    text-decoration: underline;
    text-underline-offset: .18rem;
}

.objective-count-hint {
    color: var(--muted);
    display: block;
    font-size: .78rem;
    font-weight: 600;
    margin-top: .1rem;
}

.generation-approval-check {
    margin-top: .85rem;
}

.mistake-reason-editor {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: .85rem;
    margin-top: 1rem;
    padding: 1rem;
}

.mistake-reason-editor__heading,
.mistake-reason-editor__form,
.mistake-filter,
.mistake-journal-item header,
.mistake-reason-card {
    align-items: center;
    display: flex;
    gap: .8rem;
    justify-content: space-between;
}

.mistake-reason-editor__heading h3,
.mistake-reason-card h3,
.mistake-journal-item h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
}

.mistake-reason-editor__heading p,
.mistake-reason-card p,
.mistake-journal-item p,
.mistake-filter p {
    color: var(--muted);
    margin: .15rem 0 0;
}

.mistake-reason-editor__form {
    align-items: end;
}

.mistake-reason-editor__form label {
    min-width: 220px;
}

.mistake-reason-editor__notes {
    flex: 1;
}

.mistake-reason-editor--compact {
    padding: .85rem;
}

.mistake-filter {
    align-items: end;
}

.mistake-filter label {
    min-width: min(100%, 360px);
}

.mistake-filter > div {
    max-width: 620px;
}

.mistake-reason-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.mistake-reason-card {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .9rem;
}

.mistake-reason-card > div > span {
    color: var(--accent);
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.mistake-journal-list {
    display: grid;
    gap: .85rem;
}

.mistake-journal-item {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.mistake-journal-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.mistake-journal-item .markdown-content {
    margin-top: .75rem;
}

.empty-state {
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.empty-state h2 {
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 850;
}

.empty-state p {
    color: var(--muted);
}

.text-muted {
    color: var(--muted) !important;
}

.text-success {
    color: #14735d !important;
    font-weight: 700;
}

.validation-message {
    background: var(--danger-soft);
    border: 1px solid #eba1aa;
    border-radius: 7px;
    color: var(--danger);
    margin-top: .7rem;
    padding: .65rem .8rem;
}

.password-requirements {
    display: grid;
    gap: .3rem;
    list-style: none;
    margin: -.25rem 0 1rem;
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.password-requirements li {
    color: var(--danger);
    font-size: .88rem;
}

.password-requirements li::before {
    content: "○";
    display: inline-block;
    margin-right: .5rem;
    width: 1rem;
}

.password-requirements .password-rule--met {
    color: var(--accent);
}

.password-requirements .password-rule--met::before {
    content: "✓";
    font-weight: 900;
}

.authenticator-qr {
    display: inline-grid;
    margin: .75rem 0 1rem;
    padding: .75rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.authenticator-qr img {
    display: block;
    height: auto;
    max-width: min(16rem, 100%);
    width: 16rem;
}

@media (max-width: 720px) {
    button,
    .btn,
    a.btn,
    input,
    select,
    textarea {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .btn:not(.btn-sm),
    button:not(.btn-sm),
    .form-control,
    .form-select {
        min-height: 2.75rem;
    }

    .btn-sm {
        min-height: 2.5rem;
        padding: .5rem .7rem;
    }

    .page-header {
        display: grid;
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 1.45rem;
    }

    .page-header > .btn,
    .page-header > a.btn,
    .mode-strip .btn,
    .question-actions:not(.question-actions--inline) .btn {
        width: 100%;
    }

    .question-actions,
    .mode-strip {
        display: grid;
        gap: .65rem;
    }

    .section-heading-row,
    .answer-editor__header,
    .chart-card__header {
        align-items: stretch;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .section-heading-row > .btn,
    .section-heading-row > a.btn,
    .section-heading-row > .question-actions,
    .question-actions--inline {
        max-width: 100%;
        width: 100%;
    }

    .chart-grid,
    .mode-grid,
    .exam-grid,
    .stats-grid,
    .recommendation-grid,
    .checkbox-grid,
    .filter-grid,
    .management-form-grid,
    .bulk-operation-grid,
    .mistake-reason-grid,
    .ai-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-panel,
    .question-panel,
    .objective-item,
    .chart-card,
    .recommendation-item,
    .table-responsive {
        min-width: 0;
        width: 100%;
    }

    .stats-grid strong {
        font-size: 1.45rem;
    }

    .question-panel {
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        padding: 1rem;
    }

    .question-panel fieldset,
    .question-prompt,
    .answer-option,
    .feedback-panel,
    .answer-explanation,
    .structured-result,
    .scenario-part {
        max-width: 100%;
        min-width: 0;
    }

    .markdown-content pre {
        font-size: .78rem;
        padding: .75rem;
    }

    .question-panel__toolbar,
    .study-tools-modal__header,
    .mistake-reason-editor__heading,
    .mistake-reason-editor__form,
    .mistake-filter,
    .mistake-journal-item header,
    .mistake-reason-card {
        display: grid;
    }

    .duplicate-compare-grid {
        grid-template-columns: 1fr;
    }

    .duplicate-pair > header,
    .duplicate-question-meta {
        display: grid;
    }

    .mistake-reason-editor__form label,
    .mistake-filter label {
        min-width: 0;
        width: 100%;
    }

    .dashboard-summary-table thead {
        display: none;
    }

    .dashboard-summary-table,
    .dashboard-summary-table tbody,
    .dashboard-summary-table tr,
    .dashboard-summary-table td {
        display: block;
        width: 100%;
    }

    .dashboard-summary-table tr {
        display: grid;
        gap: .55rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: .85rem;
    }

    .dashboard-summary-table tr + tr {
        border-top: 1px solid var(--line);
    }

    .dashboard-summary-table td {
        border: 0;
        padding: 0;
    }

    .dashboard-summary-table td:first-child {
        grid-column: 1 / -1;
    }

    .dashboard-summary-table td[data-label]::before {
        color: var(--muted);
        content: attr(data-label);
        display: block;
        font-size: .7rem;
        font-weight: 800;
        letter-spacing: .06em;
        margin-bottom: .15rem;
        text-transform: uppercase;
    }

    .dashboard-summary-table .dashboard-table-action {
        align-self: end;
        grid-column: 1 / -1;
    }

    .dashboard-summary-table .dashboard-table-action .btn {
        width: 100%;
    }
}

:root[data-theme="dark"] .btn-outline-primary {
    border-color: #47739f;
}

:root[data-theme="dark"] .btn-outline-primary:hover,
:root[data-theme="dark"] .btn-outline-primary:focus {
    background: #203b58;
    border-color: #79b4f1;
    color: #d8ebff;
}

:root[data-theme="dark"] .btn-outline-secondary {
    color: #bdc9d8;
}

:root[data-theme="dark"] .btn-outline-secondary:hover,
:root[data-theme="dark"] .btn-outline-secondary:focus {
    background: #1f2f42;
    border-color: #546b84;
    color: var(--text);
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .form-control:read-only {
    background-color: var(--field-bg);
    color: var(--text);
}

:root[data-theme="dark"] .form-control::placeholder {
    color: #78889b;
}

/* Floating-label inputs (login/register): keep the label's "notch" background matching the
   dark field instead of Bootstrap's light body color, which rendered as a white box. */
:root[data-theme="dark"] .form-floating > label {
    color: var(--muted);
}

:root[data-theme="dark"] .form-floating > .form-control:focus ~ label::after,
:root[data-theme="dark"] .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
:root[data-theme="dark"] .form-floating > .form-control-plaintext ~ label::after {
    background-color: var(--field-bg);
}

:root[data-theme="dark"] .table {
    --bs-table-bg: var(--surface);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
    color: var(--text);
}

:root[data-theme="dark"] .inline-pill--warning {
    border-color: #6c5724;
    color: #f0d485;
}

:root[data-theme="dark"] .question-panel {
    box-shadow: 0 20px 48px rgba(0, 0, 0, .36);
}

:root[data-theme="dark"] .question-panel__meta span {
    background: #12372f;
    border-color: #2f6c5d;
    color: #9de8d3;
}

:root[data-theme="dark"] .answer-option:hover {
    border-color: #4a8a7c;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
}

:root[data-theme="dark"] .answer-option--selected {
    background: var(--primary-soft);
    border-color: var(--primary);
}

:root[data-theme="dark"] .answer-option--correct {
    background: #12372f;
    border-color: #43a083;
}

:root[data-theme="dark"] .answer-option--wrong {
    background: #3a1d25;
    border-color: #c76a77;
}

:root[data-theme="dark"] .result-meta-row span,
:root[data-theme="dark"] .study-note-result {
    border-color: var(--line);
    color: var(--muted);
}

:root[data-theme="dark"] .question-number {
    background: var(--surface);
    color: var(--muted);
}

:root[data-theme="dark"] .question-number--current {
    background: #1f8a76;
    border-color: #1f8a76;
    color: #fff;
}

:root[data-theme="dark"] .question-number--answered {
    background: #12372f;
    border-color: #43a083;
    color: #9de8d3;
}

:root[data-theme="dark"] .question-number--correct {
    background: #12372f;
    border-color: #43a083;
    color: #9de8d3;
}

:root[data-theme="dark"] .question-number--partial {
    background: #3a2f10;
    border-color: #d6a630;
    color: #f0cd7e;
}

:root[data-theme="dark"] .question-number--wrong {
    background: #3a1d25;
    border-color: #c76a77;
    color: #ff9ba8;
}

:root[data-theme="dark"] .progress-stat {
    background: #1e2a3a;
    color: #c7d2e0;
}

:root[data-theme="dark"] .progress-stat--correct {
    color: #78ddb8;
    background: #12372f;
}

:root[data-theme="dark"] .progress-stat--wrong {
    color: #ff9ba8;
    background: #3a1d25;
}

:root[data-theme="dark"] .text-success {
    color: #78ddb8 !important;
}

:root[data-theme="dark"] .text-danger {
    color: #ff9ba8 !important;
}

:root[data-theme="dark"] .alert,
:root[data-theme="dark"] .validation-message {
    color: var(--danger);
}

.structured-preview-note,
.scenario-context {
    display: grid;
    gap: .5rem;
    padding: 1rem 1.15rem;
    margin: 1rem 0;
    border: 1px solid var(--line);
    border-left: .3rem solid var(--accent);
    border-radius: .75rem;
    background: var(--surface-soft);
}

.scenario-context__label {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.scenario-parts,
.admin-attempt-list {
    display: grid;
    gap: 1rem;
}

.scenario-part,
.structured-result-part {
    display: grid;
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: var(--surface);
}

.scenario-part > header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: .82rem;
}

/* Admin area only: Segoe UI has no 850 weight, so headings were snapping to the heavy
   Segoe Black face and reading as a different font at UI sizes. Use a real weight here. */
.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.admin-shell h4 {
    font-weight: 700;
}

.ordering-list,
.matching-grid {
    display: grid;
    gap: .65rem;
}

.ordering-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: .65rem;
    background: var(--surface-soft);
}

.ordering-item__position {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-weight: 800;
}

.ordering-item__actions {
    display: flex;
    gap: .35rem;
}

.matching-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 1fr);
    gap: 1rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: .65rem;
}

.fill-in-response {
    display: grid;
    gap: .4rem;
    max-width: 42rem;
    font-weight: 700;
}

.structured-result {
    display: grid;
    gap: .55rem;
    padding: .8rem 0;
}

.structured-result-part--correct {
    border-color: var(--accent);
}

.structured-result-part--wrong {
    border-color: var(--danger);
}

.structured-result-part__head {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.structured-result-part__head h3 {
    margin: 0;
}

.structured-result-pill {
    border-radius: 999px;
    flex: none;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
    padding: .2rem .7rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.structured-result-pill--correct {
    background: var(--accent-soft);
    color: var(--accent);
}

.structured-result-pill--wrong {
    background: var(--danger-soft);
    color: var(--danger);
}

.result-answer {
    display: grid;
    gap: .15rem;
}

.result-answer--correct :is(.markdown-content, p, ol, .matching-result) {
    color: var(--accent);
}

.result-answer--wrong :is(.markdown-content, p, ol, .matching-result) {
    color: var(--danger);
}

.matching-result {
    display: grid;
    gap: .45rem;
    margin: 0 0 .75rem;
}

.matching-result > div {
    display: grid;
    grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.2fr);
    gap: .75rem;
    padding: .55rem .7rem;
    border-radius: .5rem;
    background: var(--surface-soft);
}

.matching-result dd {
    margin: 0;
}

@media (max-width: 720px) {
    .matching-row,
    .matching-result > div {
        grid-template-columns: 1fr;
    }

    .ordering-item {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    .ordering-item__actions {
        grid-column: 2;
    }
}

/* Pricing & sale ------------------------------------------------------------ */

/* Site-wide sale banner (storefront, below the nav). */
.sale-banner {
    align-items: center;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--line);
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: .75rem 1.25rem;
    text-align: center;
}

.sale-banner__text {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}

.sale-banner__header {
    font-size: 1.05rem;
    font-weight: 800;
}

.sale-banner__body {
    color: var(--muted);
}

.sale-banner__deal {
    align-items: center;
    display: flex;
    gap: .6rem;
}

.sale-banner__off {
    background: var(--accent);
    border-radius: 999px;
    color: var(--brand-contrast);
    font-size: .8rem;
    font-weight: 800;
    padding: .15rem .6rem;
    text-transform: uppercase;
}

.sale-banner__was {
    color: var(--muted);
    text-decoration: line-through;
    margin-right: .3rem;
}

.sale-banner__now {
    font-weight: 800;
}

/* Dismiss "×" (per-session). */
.sale-banner--dismissible {
    position: relative;
    padding-right: 2.75rem;
}

.sale-banner__dismiss {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    opacity: .65;
    padding: .1rem .35rem;
    position: absolute;
    right: .55rem;
    top: .5rem;
}

.sale-banner__dismiss:hover {
    background: rgba(0, 0, 0, .08);
    opacity: 1;
}

/* More compact on mobile so the banner isn't intrusive. */
@media (max-width: 640px) {
    .sale-banner {
        font-size: .9rem;
        gap: .35rem;
        padding: .55rem .9rem;
    }

    .sale-banner__header {
        font-size: .95rem;
    }

    .sale-banner__off {
        font-size: .72rem;
    }

    .sale-banner--dismissible {
        padding-right: 2.1rem;
    }

    .sale-banner__dismiss {
        font-size: 1.25rem;
        right: .3rem;
        top: .3rem;
    }
}

/* Per-exam price on catalog tiles. */
.exam-tile__price {
    font-weight: 700;
    white-space: nowrap;
}

.exam-tile__price-was {
    color: var(--muted);
    font-weight: 600;
    margin-right: .35rem;
    text-decoration: line-through;
}

.exam-tile__price-now {
    color: var(--accent);
}

/* Sale callout inside the exam-detail access banner. */
.access-price-sale {
    align-items: baseline;
    display: flex;
    gap: .5rem;
    margin-top: .4rem;
}

.access-price-sale__was {
    color: var(--muted);
    text-decoration: line-through;
}

.access-price-sale__save {
    color: var(--accent);
    font-weight: 700;
}

/* Detected-bot tag in the access log: favicon (or robot fallback) + name + category chip. */
.bot-tag {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
    margin: .25rem 0;
}

.bot-ico-wrap {
    flex: 0 0 auto;
    height: 16px;
    position: relative;
    width: 16px;
}

.bot-ico-fallback {
    font-size: 13px;
    inset: 0;
    line-height: 16px;
    position: absolute;
    text-align: center;
}

.bot-favicon {
    background: var(--surface);
    border-radius: 3px;
    height: 16px;
    inset: 0;
    position: absolute;
    width: 16px;
}

.bot-name {
    font-size: .8rem;
    font-weight: 700;
}

.bot-cat {
    background: var(--warning-soft);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    padding: .05rem .45rem;
    white-space: nowrap;
}
