/* Product-wide layout and hierarchy. Loaded after legacy feature styles;
   feature-specific exam controls and workspace brand tokens stay intact. */
/* Neutrals are cool-toned to sit with the brand blue (--ejtaaz-primary);
   the brand itself — bright, energetic, Duolingo-style — lives in app.css. */
:root {
    --product-canvas: #f5f7fb;
    --product-surface: #fff;
    --product-ink: #1f2a37;
    --product-muted: #5b6675;
    --product-line: #e2e6ee;
    --product-radius: 12px;
}
[data-bs-theme="dark"] {
    --product-canvas: #111820;
    --product-surface: #1b2430;
    --product-ink: #ecf0f5;
    --product-muted: #b2bdcb;
    --product-line: #35404f;
}
body { background: var(--product-canvas); color: var(--product-ink); font-size: 16px; line-height: 1.9; }
main > .container { max-width: 1180px; }
main { padding-block: 2rem !important; }
h1, h2, h3, h4, h5, h6 { color: inherit; line-height: 1.6; }
.page-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 750; letter-spacing: normal; }
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.text-muted { color: var(--product-muted) !important; }
.card, [data-bs-theme="dark"] .card { background: var(--product-surface); border: 1px solid var(--product-line); border-radius: var(--product-radius); box-shadow: none; }
.card-header, [data-bs-theme="dark"] .card-header { background: transparent; color: var(--product-ink); border-bottom: 1px solid var(--product-line); padding: 1rem 1.25rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-header:first-child { border-radius: var(--product-radius) var(--product-radius) 0 0; }
.btn { border-radius: 9px; font-weight: 600; padding: .6rem 1rem; box-shadow: none; border-bottom-width: 1px; min-height: 44px; transition: background-color 160ms, border-color 160ms, color 160ms; }
.btn:hover, .btn:active { transform: none; }
.btn-sm { padding: .4rem .75rem; }
.btn-primary { --bs-btn-bg: var(--ejtaaz-primary); --bs-btn-border-color: var(--ejtaaz-primary); --bs-btn-hover-bg: var(--ejtaaz-primary-dark); --bs-btn-hover-border-color: var(--ejtaaz-primary-dark); }
.form-control, .form-select { border-radius: 9px; min-height: 44px; border-color: var(--product-control); background-color: var(--product-surface); color: var(--product-ink); }
.form-label { font-weight: 600; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--product-ink); --bs-table-border-color: var(--product-line); }
.table > :not(caption) > * > * { padding: .9rem 1rem; vertical-align: middle; }
.table thead { font-size: .8rem; }
.badge { font-weight: 600; line-height: 1.5; }
.alert { border-radius: 12px; box-shadow: none; }
.progress { background: var(--product-line); border-radius: 6px; }
.product-header { background: var(--product-surface); border-bottom: 1px solid var(--product-line); }
.product-header .navbar { background: transparent !important; box-shadow: none !important; padding: .8rem 1.5rem; }
.product-header .navbar-brand { color: var(--product-ink); display: flex; gap: .6rem; align-items: center; font-size: 1.25rem; }
.product-header .navbar-brand i { color: var(--ejtaaz-primary); }
.product-header .nav-link { color: var(--product-muted); border-radius: 8px; padding: .55rem .85rem; font-size: .85rem; }
.product-header .nav-link:hover, .product-header .nav-link.active { color: var(--ejtaaz-primary); background: var(--product-tint); }
.product-header .theme-toggle { color: var(--product-muted); }
.primary-navigation { gap: .25rem; }
.account-navigation .navbar-nav { display: flex; flex-direction: row; align-items: center; gap: .5rem; }
.account-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-navigation .dropdown-menu { position: absolute; inset-inline-start: auto; inset-inline-end: 0; min-width: 240px; max-width: calc(100vw - 24px); }
.dropdown-menu { border: 1px solid var(--product-line); border-radius: 12px; padding: .5rem; box-shadow: 0 10px 40px #00000012; max-height: 75vh; overflow-y: auto; }
.dropdown-item { border-radius: 6px; padding: .6rem .8rem; white-space: normal; }
.section-navigation { display: flex; gap: .4rem; padding: .55rem max(1rem, calc((100vw - 1148px) / 2)); background: var(--product-surface); border-bottom: 1px solid var(--product-line); overflow-x: auto; }
.section-navigation a { white-space: nowrap; text-decoration: none; padding: .45rem .9rem; border-radius: 7px; color: var(--product-muted); font-size: .8rem; }
.section-navigation a:hover, .section-navigation a[aria-current] { color: var(--ejtaaz-primary); background: var(--product-tint); }
.stat-strip, [data-bs-theme="dark"] .stat-strip { background: transparent; border-bottom: 0; padding: .7rem 1rem 0; gap: 1.4rem; font-size: .75rem; position: static; }
.stat-strip a { color: var(--product-muted); }
.admin-navigation { max-height: 70vh; overflow-y: auto; border-top: 1px solid var(--product-line); }
.admin-destinations { list-style: none; margin: 0; padding: 1.2rem 2rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem 1rem; }
.admin-destinations .nav-link { display: block; }
.admin-destinations [aria-current] { color: var(--ejtaaz-primary); background: var(--product-tint); }
.admin-group-title { grid-column: 1 / -1; margin-top: .8rem; padding-bottom: .35rem; border-bottom: 1px solid var(--product-line); font-size: .75rem; color: var(--product-muted); }
.tabbar, [data-bs-theme="dark"] .tabbar { background: var(--product-surface); border-top: 1px solid var(--product-line); box-shadow: none; padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
.tabbar a { color: var(--product-muted); font-size: .68rem; min-height: 48px; padding: .25rem; }
.tabbar a.active { color: var(--ejtaaz-primary); background: var(--product-tint); border-radius: 9px; }
/* .continue-hero keeps its vivid brand treatment from app.css on purpose:
   it is THE one primary action on the dashboard and must stand out. */
.continue-hero .ch-title { font-size: 1.35rem; }
.continue-hero .btn { flex-shrink: 0; }
.dashboard-training-link { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--product-ink); padding: 1rem 0; margin-bottom: 1.5rem; }
.dashboard-training-link span { flex: 1; }
.dashboard-training-link small { display: block; color: var(--product-muted); }
.dashboard-training-link > i { color: var(--ejtaaz-primary); font-size: 1.3rem; }
.optional-panel { border: 1px solid var(--product-line); border-radius: var(--product-radius); background: var(--product-surface); }
.optional-panel summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; }
.optional-panel summary span { display: inline-block; margin-inline-start: 1rem; font-weight: 400; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tool-card { background: var(--product-surface); border: 1px solid var(--product-line); border-radius: var(--product-radius); padding: 1.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; text-decoration: none; color: var(--product-ink); }
.tool-card > i { color: var(--ejtaaz-primary); font-size: 1.5rem; }
.tool-card span, .tool-card p { font-size: .85rem; color: var(--product-muted); margin: 0; }
.tool-card h3 { font-size: 1.05rem; margin: 0; font-weight: 700; }
a.tool-card:hover { border-color: var(--ejtaaz-primary); color: var(--product-ink); }
.subject-tile:hover { transform: none; box-shadow: none; border-color: var(--ejtaaz-primary); }
.profile-hero, [data-bs-theme="dark"] .profile-hero { background: var(--product-surface); color: var(--product-ink); box-shadow: none; border: 1px solid var(--product-line); }
.profile-hero .ph-sub { color: var(--product-muted); }
.profile-hero .ph-chip, .profile-hero .btn { background: var(--product-tint); color: var(--bs-primary-text-emphasis); }
body:has(.login-card)::before { display: none; }
.login-card { max-width: 470px; margin: 2rem auto; box-shadow: none !important; }
.login-card .brand-mark { width: 48px; height: 48px; object-fit: contain; box-shadow: none; }
.eyebrow { font-size: .8rem; font-weight: 700; color: var(--ejtaaz-primary); }
.welcome-hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 4rem; padding: 3rem 0 4rem; }
.welcome-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.65; font-weight: 800; letter-spacing: normal; margin: 1rem 0; }
.welcome-hero h1 span { color: var(--ejtaaz-primary); }
.welcome-hero p { color: var(--product-muted); max-width: 40rem; }
.learning-preview { padding: 2rem; border: 1px solid var(--product-line); background: var(--product-surface); border-radius: var(--product-radius); }
.learning-steps { list-style: none; padding: 0; margin: 0; }
.learning-steps li { display: flex; gap: 1rem; padding: 1.15rem 0; }
.learning-steps li + li { border-top: 1px solid var(--product-line); }
.learning-steps li > span { display: grid; place-items: center; border-radius: 50%; background: var(--product-tint); color: var(--ejtaaz-primary); width: 36px; height: 36px; flex-shrink: 0; }
.learning-steps p { font-size: .8rem; margin: .25rem 0 0; }
.preview-note { font-size: .75rem; color: var(--product-muted); border-top: 1px solid var(--product-line); padding-top: 1rem; margin-top: .7rem; }
.home-section { padding-block: 2rem; scroll-margin-top: 100px; }
.home-section h2 { font-size: 1.7rem; font-weight: 750; }
.library-callout { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; border-block: 1px solid var(--product-line); padding: 2rem 0; margin: 2rem 0 3rem; }
.support-note { padding: 2rem 0; color: var(--product-muted); text-align: center; }
body.in-lesson .product-header, body.in-lesson .section-navigation { display: none !important; }
@media (max-width: 991px) {
    .product-header .navbar { padding: .55rem .75rem; }
    .account-name { max-width: 110px; font-size: .75rem; }
    .account-navigation .nav-link { padding: .4rem; }
    .admin-destinations { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; }
    .welcome-hero { gap: 2rem; }
    body.has-tabbar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    main { padding-block: 1.4rem !important; }
    main > .container { padding-inline: 1rem; }
    .btn { min-height: 44px; font-size: .85rem; }
    .form-control, .form-select { font-size: 16px; }
    .product-header .navbar-brand { font-size: 1rem; }
    .tool-grid, .welcome-hero { grid-template-columns: 1fr; }
    .welcome-hero { padding: 1rem 0 2rem; gap: 2rem; }
    .welcome-hero h1 { font-size: 2.1rem; }
    .learning-preview { padding: 1.4rem; }
    .continue-hero { padding: 1.4rem; align-items: stretch; flex-direction: column; gap: 1rem; }
    .continue-hero .ch-title { font-size: 1.1rem; }
    .tool-card { padding: 1.2rem; }
    .optional-panel summary span { display: block; margin-inline-start: 0; }
    .stat-strip { gap: 1rem; font-size: .68rem; }
    .login-card { margin-block: 0; }
}
@media print {
    .product-header, .section-navigation, .tabbar, .stat-strip { display: none !important; }
    body { background: white; }
    main { padding: 0 !important; }
}
.page-location { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.25rem; color: var(--product-muted); font-size: .72rem; }
.page-location a { color: inherit; text-decoration: none; }
.page-location a:hover { text-decoration: underline; }
.page-location i { font-size: .6rem; }
body.in-lesson .page-location { display: none; }
.btn[class*="btn-outline-"] { box-shadow: none; border-width: 1px; }
.btn:hover { box-shadow: none; }
.public-header { padding: .7rem 1.5rem; padding-inline-end: 68px; background: var(--product-surface); border-bottom: 1px solid var(--product-line); }
.public-header .navbar-brand { color: var(--product-ink); font-size: 1.15rem; }
.course-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.course-header > .btn { flex-shrink: 0; }
.course-progress { max-width: 640px; margin-bottom: 2rem; }
.course-sections { max-width: 900px; }
.course-steps { list-style: none; padding: .4rem; margin: 0; }
.course-steps li { scroll-margin-top: 100px; }
.course-steps li + li { border-top: 1px solid var(--product-line); }
.course-step { display: flex; gap: 1rem; align-items: center; padding: 1rem; color: var(--product-ink); text-decoration: none; border-radius: 10px; }
.course-step:hover, .course-step.is-current { background: var(--product-tint); color: var(--bs-primary-text-emphasis); }
.step-icon { font-size: 1.4rem; }
.step-content { flex: 1; }
.step-content strong { font-size: .88rem; }
.step-content small { display: block; color: var(--product-muted); font-size: .75rem; }
.step-state { font-size: .72rem; color: var(--product-muted); }
@media (max-width: 640px) {
    .course-header { flex-direction: column; align-items: stretch; gap: 1rem; }
    .course-step { gap: .65rem; flex-wrap: wrap; padding: .85rem; }
    .course-step > .bi-arrow-left { display: none; }
    .step-content { min-width: 65%; }
    .step-state { margin-inline-start: 2rem; }
    .public-header { padding-inline-start: .5rem; }
    .public-header .navbar-brand { font-size: 1rem; }
}
body.in-lesson .theme-toggle-floating { display: none; }
:root { --product-accent: var(--ejtaaz-primary); }
[data-bs-theme="dark"] { --product-accent: color-mix(in srgb, var(--ejtaaz-primary), white 45%); }
.btn-outline-secondary { --bs-btn-color: var(--product-muted); --bs-btn-border-color: var(--product-muted); }
.eyebrow, .welcome-hero h1 span, .learning-steps li > span, .tool-card > i,
.product-header .navbar-brand i, .dashboard-training-link > i { color: var(--product-accent); }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: var(--product-accent); --bs-btn-border-color: var(--product-accent); }
[data-bs-theme="dark"] .product-header .nav-link.active,
[data-bs-theme="dark"] .section-navigation a[aria-current],
[data-bs-theme="dark"] .tabbar a.active { color: var(--product-accent); }

/* Keep navigation immediate, including after validation redirects. */
@view-transition { navigation: none; }

/* Shared editorial system: paper surfaces, ink navigation, quiet feedback.
   Brand colors continue to come from ejtaaz tokens (including tenant overrides). */
:root {
    --product-control: #85939b;
    --product-tint: color-mix(in srgb, var(--ejtaaz-primary) 7%, var(--product-surface));
    --product-space-1: .5rem;
    --product-space-2: 1rem;
    --product-space-3: 1.5rem;
    --product-space-4: 2rem;
    --product-space-5: 3rem;
    --bs-primary: var(--ejtaaz-primary);
    --bs-primary-rgb: 13, 110, 253;   /* = --ejtaaz-primary; rgb() can't be derived from a var */
    --bs-link-color: var(--ejtaaz-primary);
    --bs-link-color-rgb: var(--bs-primary-rgb);
    --bs-link-hover-color: var(--ejtaaz-primary-dark);
}
[data-bs-theme="dark"] {
    --product-control: #738694;
    --bs-link-color: var(--product-accent);
    --bs-link-color-rgb: 110, 168, 254;
}
a { text-underline-offset: .2em; }
.text-primary { color: var(--product-accent) !important; }
.btn-primary { background: var(--ejtaaz-primary); border-color: var(--ejtaaz-primary); }
.btn-primary:hover, .btn-primary:active { background: var(--ejtaaz-primary-dark); border-color: var(--ejtaaz-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--product-accent); --bs-btn-border-color: var(--product-accent); --bs-btn-hover-bg: var(--ejtaaz-primary); --bs-btn-hover-border-color: var(--ejtaaz-primary); }
.btn:focus-visible, .nav-link:focus-visible, .dropdown-item:focus-visible, :focus-visible { outline: 3px solid var(--product-accent); outline-offset: 3px; }
.form-control:focus, .form-select:focus { border-color: var(--product-accent); box-shadow: 0 0 0 3px var(--product-tint); background: var(--product-surface); color: var(--product-ink); }
input[type="email"], input[type="tel"], input[type="url"] { direction: ltr; text-align: start; }
.table thead th { color: var(--product-muted); background: var(--product-tint); font-weight: 600; }
.table-responsive { border-radius: var(--product-radius); }
.alert { border-inline-start-width: 4px; }
.public-header > .container-fluid { max-width: 1180px; }
.public-header .navbar-brand { display: flex; align-items: center; gap: .5rem; }
.public-header .navbar-brand i { color: var(--product-accent); }
.home-page .welcome-hero { border-bottom: 1px solid var(--product-line); }
.home-page .welcome-hero h1 { font-size: clamp(2.1rem, 3.8vw, 3.3rem); line-height: 1.65; }
.home-page .welcome-hero > div > p { max-width: 35rem; }
.home-page .learning-preview { border-top: 4px solid var(--ejtaaz-primary); padding: var(--product-space-4); }
.preview-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--product-space-3); }
.preview-heading > i { font-size: 1.7rem; color: var(--product-accent); }
.preview-title { font-size: 1.3rem; font-weight: 700; }
.preview-caption { font-size: .8rem; margin-bottom: var(--product-space-2); }
.home-page .learning-steps li > span { border-radius: 6px; font-weight: 700; }
.home-page .home-section { padding-block: var(--product-space-5); }
.home-page .home-section h2 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); }
.home-page .tool-grid { gap: 0; border-block: 1px solid var(--product-line); }
.home-page .tool-card { border: 0; border-radius: 0; background: transparent; padding: var(--product-space-4); }
.home-page .tool-card + .tool-card { border-inline-start: 1px solid var(--product-line); }
.home-page .tool-card:first-child { padding-inline-start: 0; }
.home-page .library-callout { background: var(--product-tint); border: 1px solid var(--product-line); border-radius: var(--product-radius); padding: var(--product-space-4); margin-top: 0; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; min-height: 70vh; max-width: 1040px; margin: auto; }
.auth-intro h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 750; line-height: 1.8; margin-block: 1rem; }
.auth-intro p { color: var(--product-muted); max-width: 28rem; }
.auth-note { display: flex; gap: .8rem; align-items: center; border-top: 1px solid var(--product-line); margin-top: 2rem; padding-top: 1.5rem; font-size: .8rem; color: var(--product-muted); }
.auth-note i { color: var(--product-accent); font-size: 1.4rem; }
.auth-layout .login-card { width: 100%; margin: 0; border-top: 4px solid var(--ejtaaz-primary); }
.continue-hero .ch-title { line-height: 1.8; }
.page-title { text-wrap: balance; }
[dir="ltr"], bdi { unicode-bidi: isolate; }
@media (max-width: 991px) {
    .auth-layout { gap: 2rem; }
    .home-page .welcome-hero { gap: 2rem; }
}
@media (max-width: 767px) {
    .auth-layout { grid-template-columns: 1fr; max-width: 470px; gap: 1.5rem; min-height: auto; }
    .auth-intro h2 { font-size: 1.5rem; margin-block: .5rem; }
    .auth-intro p, .auth-note { display: none; }
}
@media (max-width: 640px) {
    .home-page .learning-preview { padding: var(--product-space-3); }
    .home-page .tool-card, .home-page .tool-card:first-child { padding: 1.5rem 0; }
    .home-page .tool-card + .tool-card { border-inline-start: 0; border-top: 1px solid var(--product-line); }
    .home-page .library-callout { padding: var(--product-space-3); }
    .home-page .welcome-hero .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Mock exam: preparation, focused paper, and review share the same language. */
.mock-builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 2rem; align-items: start; }
.mock-builder-form { min-width: 0; overflow: hidden; }
.mock-builder-section { padding: 1.5rem; min-width: 0; }
.mock-builder-section + .mock-builder-section { border-top: 1px solid var(--product-line); }
.mock-builder-section legend { float: none; width: auto; font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.mock-step { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--product-tint); color: var(--product-accent); border-radius: 6px; margin-inline-end: .5rem; }
.mock-subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.mock-subject { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border: 1px solid var(--product-control); border-radius: 9px; cursor: pointer; }
.mock-subject > .form-check-input { flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; margin: .35rem 0 0; float: none; }
.mock-subject strong { font-size: .85rem; }
.mock-subject small { display: block; font-size: .75rem; color: var(--product-muted); margin-top: .25rem; }
.mock-subject:has(input:checked) { border-color: var(--product-accent); background: var(--product-tint); }
.mock-subject:focus-within, label.mock-topic-card:focus-within { outline: 3px solid var(--product-accent); outline-offset: 3px; }
.mock-composition { margin-top: 1.5rem; }
.mock-duration { max-width: 260px; }
.mock-builder-actions { padding: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--product-line); background: var(--product-tint); }
.mock-guide { border-top: 3px solid var(--ejtaaz-primary); padding-top: 1.5rem; }
.mock-guide-icon { font-size: 2rem; color: var(--product-accent); }
.mock-guide-list { padding-inline-start: 1.3rem; margin-block: 1.5rem; }
.mock-guide-list li { padding-inline-start: .5rem; margin-bottom: 1.5rem; }
.mock-guide-list li::marker { color: var(--product-accent); }
.mock-guide-list strong { font-size: .9rem; }
.mock-guide-list p { color: var(--product-muted); font-size: .8rem; margin: .4rem 0 0; }
.mock-exam-toolbar { top: 0; z-index: 100; background: var(--product-surface); border: 1px solid var(--product-line); border-radius: var(--product-radius); padding: 1rem; }
.mock-exam-title { font-size: 1.05rem; font-weight: 700; }
#mockForm section[id] { scroll-margin-top: 155px; }
#mockForm .exam-q-card { scroll-margin-top: 155px; }
#mockForm .timer-badge { font-variant-numeric: tabular-nums; }
label.mock-topic-card:has(input:checked) { border: 2px solid var(--ejtaaz-success) !important; background: var(--product-tint); }
.mock-result-page .lesson-summary { background: var(--product-surface); color: var(--product-ink); border: 1px solid var(--product-line); border-top: 4px solid var(--ejtaaz-success); border-radius: var(--product-radius); box-shadow: none; }
.mock-result-page .lesson-summary.ls-mid { border-top-color: var(--ejtaaz-warning); }
.mock-result-page .lesson-summary.ls-low { border-top-color: var(--ejtaaz-danger); }
.mock-result-page .lesson-summary .ls-sub, .mock-result-page .lesson-summary .ls-label { color: var(--product-muted); opacity: 1; }
.mock-result-page .lesson-summary .ls-tile { background: var(--product-tint); color: var(--product-ink); }
.mock-result-icon { color: var(--product-accent); font-size: 2rem; margin-bottom: .75rem; }
@media (max-width: 991px) {
    .mock-builder-layout { grid-template-columns: minmax(0, 1fr); }
    .mock-guide { max-width: 650px; }
}
@media (max-width: 640px) {
    .mock-subject-grid { grid-template-columns: minmax(0, 1fr); }
    .mock-builder-section, .mock-builder-actions { padding: 1.25rem; }
    .mock-builder-actions .btn { width: 100%; }
    .mock-exam-toolbar { padding: .75rem; }
    .mock-exam-toolbar > div > .d-flex { flex-wrap: wrap; }
    #mockForm section[id], #mockForm .exam-q-card { scroll-margin-top: 215px; }
}
