/* Local material controls share theme tokens with the account UI. */
.beta-topbar {display:grid;grid-template-columns:auto minmax(220px,580px);justify-content:space-between;}
.material-filters {margin:24px 0;padding:20px;border:1px solid var(--auth-border);border-radius:18px;background:var(--auth-panel);color:var(--auth-text);}
.material-filter-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px;font-size:12px;line-height:1.7;}
.material-filter-heading strong {display:flex;align-items:center;gap:10px;}
.material-filter-heading strong svg {width:18px;height:18px;color:var(--auth-accent);flex-shrink:0;}
.material-filter-heading>span,.material-help,.practice-progress,.load-more-wrap {color:var(--auth-muted);font-size:11px;line-height:1.9;}
.material-filter-fields,.practice-settings {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.material-filter-fields label,.practice-settings label,.practice-number {display:flex;flex-direction:column;gap:10px;min-width:0;font-size:11px;line-height:1.7;}
.material-filter-fields select,.practice-settings select,.practice-number input {width:100%;min-width:0;padding:14px 12px;border:1px solid var(--auth-border);border-radius:12px;background:var(--auth-field);color:var(--auth-text);font:inherit;}
.material-active-filters {display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;}
.material-active-filters button {display:inline-flex;align-items:center;gap:10px;border:1px solid var(--auth-border);border-radius:30px;background:var(--auth-field);color:var(--auth-accent);padding:9px 13px;font:inherit;font-size:10px;cursor:pointer;}
.material-active-filters svg {width:14px;height:14px;flex-shrink:0;}
.material-active-filters button:hover {border-color:var(--auth-accent);}
.material-filters select:focus-visible,.practice-card select:focus-visible,.practice-card input:focus-visible {outline:2px solid var(--auth-accent);outline-offset:3px;}
.material-results {display:grid;gap:8px;margin:16px 0;min-width:0;}
.material-results .search-result-item {width:100%;min-width:0;}
.material-results .search-result-body {min-width:0;overflow-wrap:anywhere;}
.material-results .search-result-title,.material-results .search-result-meta {white-space:normal;}
.practice-settings {grid-template-columns:repeat(3,minmax(0,1fr));margin:24px 0;}
.practice-progress {display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:24px 0 8px;}
.practice-card progress {width:100%;height:5px;accent-color:var(--auth-accent);}
.practice-question {font-size:clamp(16px,2vw,23px);line-height:1.7;margin:24px 0;overflow-wrap:anywhere;}
.practice-options {display:grid;gap:12px;border:0;padding:0;margin:0 0 22px;min-width:0;}
.practice-options label {display:flex;align-items:flex-start;gap:14px;background:var(--auth-field);border:1px solid var(--auth-border);border-radius:14px;padding:16px;font-size:12px;line-height:1.9;cursor:pointer;color:var(--auth-text);}
.practice-options label:has(input:checked) {border-color:var(--auth-accent);}
.practice-options input {margin-top:5px;accent-color:var(--auth-accent);flex-shrink:0;}
.practice-number {max-width:360px;margin-bottom:24px;}
.practice-feedback {padding:20px;margin:20px 0;border:1px solid var(--auth-border);border-left:3px solid var(--auth-accent);border-radius:12px;background:var(--auth-panel);font-size:12px;line-height:1.9;}
.practice-feedback.is-wrong {border-left-color:#fb7185;}
.practice-feedback p {margin:10px 0 0;color:var(--auth-muted);}
.practice-exit {margin-top:24px;}
.practice-score {font-size:clamp(36px,7vw,64px);color:var(--auth-accent);margin:20px 0;}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
@media(max-width:900px){.beta-topbar{grid-template-columns:auto minmax(0,1fr);}.practice-settings{grid-template-columns:1fr;}}
@media(max-width:600px){.beta-topbar{grid-template-columns:minmax(0,1fr);}.material-filter-fields{grid-template-columns:1fr;}.material-filters{padding:16px;}.material-filter-heading{gap:8px;}.practice-options label{padding:13px;font-size:11px;}}

/* Comfortable controls and one dropdown treatment across beta. */
.custom-select {display:block;position:relative;min-width:0;width:100%;font-size:13px;line-height:1.7;}
.custom-select select[hidden] {display:none!important;}
.custom-select-trigger {display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:54px;padding:14px 17px;border:1px solid var(--auth-border);border-radius:14px;background:var(--auth-field);color:var(--auth-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .18s,background .18s;}
.custom-select-trigger:hover,.custom-select-trigger[aria-expanded="true"] {border-color:var(--auth-accent);}
.custom-select-trigger:focus-visible {outline:2px solid var(--auth-accent);outline-offset:3px;}
.custom-select-trigger:disabled {opacity:.5;cursor:default;}
.custom-select-value {min-width:0;overflow-wrap:anywhere;}
.custom-select-chevron {display:flex;flex:0 0 18px;color:var(--auth-accent);transition:transform .18s;}
.custom-select-chevron svg {width:18px;height:18px;}
.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {transform:rotate(180deg);}
.custom-select-popup {position:fixed;z-index:1000;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:7px;border:1px solid var(--auth-border);border-radius:16px;background:var(--auth-panel);color:var(--auth-text);box-shadow:0 18px 50px #0004;font-family:inherit;font-size:13px;line-height:1.8;scrollbar-width:thin;scrollbar-color:var(--auth-border) transparent;}
.custom-select-option {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 13px;border-radius:10px;cursor:pointer;overflow-wrap:anywhere;}
.custom-select-option.is-highlighted {background:var(--auth-field);}
.custom-select-option[aria-selected="true"] {color:var(--auth-accent);}
.custom-select-check {display:flex;flex:0 0 17px;visibility:hidden;}
.custom-select-check svg {width:17px;height:17px;}
.custom-select-option[aria-selected="true"] .custom-select-check {visibility:visible;}
.collection-controls>.custom-select {flex:0 1 320px;}
.back-intro-btn {display:inline-flex;align-items:center;gap:12px;padding:13px 19px;min-height:48px;line-height:1.6;}
.back-intro-btn>svg {flex-shrink:0;width:18px;height:18px;}
.subtabs-bar {gap:12px;padding:5px 0 18px;}
.subtab-btn {display:flex;align-items:center;gap:14px;padding:17px 18px;min-height:84px;min-width:205px;white-space:normal;text-align:left;}
.subtab-icon {display:flex;align-items:center;justify-content:center;flex:0 0 24px;}
.subtab-icon svg {width:24px;height:24px;}
.subtab-text {display:flex;flex-direction:column;gap:6px;min-width:0;}
.subtab-text strong {font-size:12px;line-height:1.6;}
.subtab-text small {font-size:10px;line-height:1.7;}
.material-filter-fields label,.practice-settings label,.practice-number {font-size:12px;gap:12px;}
.material-filter-heading {font-size:13px;}
.material-filter-heading>span,.material-help,.practice-progress,.load-more-wrap {font-size:12px;line-height:1.9;}
.material-active-filters button {font-size:11px;padding:10px 14px;}
.practice-settings {gap:22px;margin:28px 0 24px;}
#practiceSettings>.material-help {margin:0 0 22px;}
#practiceSettings>.btn-primary {min-height:50px;padding:15px 23px;font-size:12px;}
.practice-card>.material-help {margin:18px 0 24px;}
@media(min-width:1500px){.subtabs-bar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;}.subtab-btn{min-width:0;}}
@media(max-width:700px){.collection-controls>.custom-select{flex:1 1 auto;}.custom-select,.custom-select-popup{font-size:12px;}.subtab-btn{padding:15px 17px;min-width:220px;}.subtabs-bar{scroll-padding-inline:4px;}}
@media(prefers-reduced-motion:reduce){.custom-select-trigger,.custom-select-chevron{transition:none;}}

/* Shared footer lives outside the individual page screens. */
.site-footer {display:flex;align-items:flex-start;justify-content:space-between;gap:18px 32px;margin:12px 36px 0 calc(var(--sidebar-width) + 36px);padding:25px 0 30px;border-top:1px solid var(--auth-border);color:var(--auth-muted);font-size:11px;line-height:1.9;}
.site-footer-brand {flex-shrink:0;font-weight:650;letter-spacing:.02em;}
.site-footer p {margin:0;text-align:right;max-width:650px;}
.auth-mode .site-footer {margin-inline:36px;}
@media(min-width:901px) and (max-width:1280px){.site-footer{margin-right:26px;margin-left:calc(var(--sidebar-width) + 26px);}}
@media(max-width:900px){.site-footer,.auth-mode .site-footer{margin-inline:23px;}}
@media(max-width:600px){.site-footer{flex-direction:column;gap:10px;padding:22px 0 26px;}.site-footer p{text-align:left;}}
@media(max-width:560px){.site-footer,.auth-mode .site-footer{margin-inline:17px;}}

/* Keep the shared footer at the viewport bottom when content is short. */
body {min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;}
.beta-topbar,.site-footer {flex-shrink:0;}
.app-main {flex:1 0 auto;}
.auth-mode .app-main {display:flex;flex-direction:column;}
.auth-mode .dossier-screen:not(.hidden),.auth-mode .dossier-container {display:flex;flex-direction:column;flex:1;}
.auth-mode .auth-stage {min-height:0;flex:1;}

/* Align action labels and Lucide icons on the same visual center. */
.home-path strong {display:inline-flex;align-items:center;justify-content:center;gap:12px;line-height:1.5;}
.btn-primary,.btn-secondary,.search-submit-btn,.home-action-btn,.topic-pill-btn,.tag-chip,.auth-submit,.branch-course-link {display:inline-flex;align-items:center;justify-content:center;gap:10px;line-height:1.5;}
.home-path strong>.ui-icon,.btn-primary>.ui-icon,.btn-secondary>.ui-icon,.search-submit-btn>.ui-icon,.home-action-btn>.ui-icon,.topic-pill-btn>.ui-icon,.tag-chip>.ui-icon,.auth-submit>.ui-icon,.branch-course-link>.ui-icon {display:block;flex-shrink:0;margin-block:0;vertical-align:middle;}

/* Signed-in account uses the standard application shell. */
.account-mode .branch-topbar {display:none;}
.account-page {width:100%;max-width:1280px;margin:0 auto;color:var(--auth-text);}
.account-heading {margin:0 0 30px;}
.account-eyebrow {color:var(--auth-accent);font-size:10px;line-height:1.8;letter-spacing:.08em;margin:0 0 12px;}
.account-heading h1 {font-size:clamp(28px,3.5vw,46px);line-height:1.3;letter-spacing:-.04em;margin:0 0 14px;}
.account-heading h1>span {color:var(--auth-accent);}
.account-heading>div>p:last-child {color:var(--auth-muted);font-size:12px;line-height:1.9;margin:0;}
.account-layout {display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.5fr);gap:24px;align-items:stretch;}
.account-panel {min-width:0;padding:30px;border:1px solid var(--auth-border);border-radius:24px;background:var(--auth-panel);}
.account-profile {display:flex;flex-direction:column;align-items:flex-start;}
.account-avatar {display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--auth-border);border-radius:20px;background:var(--auth-field);color:var(--auth-accent);margin-bottom:24px;}
.account-avatar svg {width:30px;height:30px;}
.account-panel h2 {font-size:clamp(18px,2vw,26px);line-height:1.6;margin:0 0 16px;overflow-wrap:anywhere;letter-spacing:-.03em;}
.account-details {width:100%;margin:8px 0 28px;}
.account-details>div {padding:18px 0;border-bottom:1px solid var(--auth-border);}
.account-details dt {display:flex;align-items:center;gap:9px;font-size:10px;color:var(--auth-muted);margin:0 0 10px;}
.account-details dt svg {width:15px;height:15px;}
.account-details dd {font-size:12px;line-height:1.9;margin:0;overflow-wrap:anywhere;}
.account-profile-actions {margin-top:auto;display:flex;flex-direction:column;align-items:flex-start;gap:20px;width:100%;}
.account-profile-actions .btn-secondary {font-size:11px;min-height:46px;}
.account-signout {display:inline-flex;align-items:center;gap:10px;padding:4px 0;background:transparent;border:0;color:var(--auth-muted);font:inherit;font-size:11px;line-height:1.8;cursor:pointer;}
.account-signout:hover {color:var(--auth-text);}
.account-signout:disabled {opacity:.6;cursor:wait;}
.account-signout svg {width:17px;height:17px;}
.account-panel-heading {display:flex;align-items:center;gap:12px;margin-bottom:20px;}
.account-panel-heading .account-eyebrow {margin:0;}
.account-section-icon {display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:1px solid var(--auth-border);border-radius:13px;background:var(--auth-field);color:var(--auth-accent);}
.account-section-icon svg {width:21px;height:21px;}
.account-description {font-size:12px;color:var(--auth-muted);line-height:1.9;margin:0 0 24px;}
.account-stats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0;}
.account-stats>div {display:flex;flex-direction:column;gap:9px;padding:18px 13px;border:1px solid var(--auth-border);border-radius:15px;background:var(--auth-field);}
.account-stats strong {font-size:25px;line-height:1.4;color:var(--auth-accent);}
.account-stats strong small {font-size:12px;font-weight:400;color:var(--auth-muted);}
.account-stats>div>span {font-size:9px;line-height:1.8;color:var(--auth-muted);}
.account-progress-label {display:flex;justify-content:space-between;gap:15px;font-size:11px;line-height:1.8;margin-bottom:11px;color:var(--auth-muted);}
.account-progress-label strong {color:var(--auth-accent);}
.account-learning progress {display:block;width:100%;height:7px;accent-color:var(--auth-accent);border:0;border-radius:10px;background:var(--auth-field);overflow:hidden;}
.account-learning progress::-webkit-progress-bar {background:var(--auth-field);border-radius:10px;}
.account-learning progress::-webkit-progress-value {background:var(--auth-accent);border-radius:10px;}
.account-learning progress::-moz-progress-bar {background:var(--auth-accent);border-radius:10px;}
.account-next {display:flex;flex-direction:column;gap:9px;margin:26px 0 21px;}
.account-next>span {font-size:10px;color:var(--auth-muted);}
.account-next strong {font-size:13px;line-height:1.7;}
.account-course-actions {display:flex;flex-wrap:wrap;gap:12px;}
.account-course-actions>a {min-height:46px;font-size:11px;padding:13px 18px;}
.account-storage-note {display:flex;align-items:flex-start;gap:9px;font-size:9px;line-height:1.9;color:var(--auth-muted);margin:22px 0 0;}
.account-storage-note svg {flex-shrink:0;width:15px;height:15px;margin-top:2px;}
.account-shortcuts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px;}
.account-shortcut {display:flex;align-items:center;gap:18px;padding:23px;border:1px solid var(--auth-border);border-radius:20px;background:var(--auth-panel);color:var(--auth-text);text-decoration:none;transition:border-color .2s,background .2s;}
.account-shortcut:hover {border-color:var(--auth-accent);background:var(--auth-field);}
.account-shortcut>span:last-child {display:flex;flex-direction:column;gap:9px;min-width:0;}
.account-shortcut strong {font-size:13px;line-height:1.6;}
.account-shortcut small {font-size:10px;line-height:1.9;color:var(--auth-muted);}
.account-mode .sidebar-login {border-color:var(--auth-accent);}
.account-page a:focus-visible,.account-page button:focus-visible {outline:2px solid var(--auth-accent);outline-offset:4px;}
@media(max-width:1100px){.account-layout{grid-template-columns:minmax(0,1fr);}.account-profile-actions{flex-direction:row;align-items:center;flex-wrap:wrap;}.account-avatar{margin-bottom:18px;}.account-panel{padding:26px;}}
@media(max-width:600px){.account-heading{margin-bottom:24px;}.account-panel{padding:21px 18px;border-radius:20px;}.account-layout,.account-shortcuts{gap:18px;}.account-shortcuts{grid-template-columns:minmax(0,1fr);margin-top:18px;}.account-stats{gap:8px;}.account-stats>div{padding:14px 9px;}.account-stats strong{font-size:22px;}.account-course-actions{flex-direction:column;}.account-course-actions>a{width:100%;}.account-details dd{font-size:11px;}}

/* One self-contained area for choosing objects and reading their comparison. */
.comparison-panel {margin:28px 0;padding:24px;border:1px solid var(--auth-border);border-radius:20px;background:var(--auth-panel);color:var(--auth-text);}
.comparison-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;}
.comparison-heading h2 {display:flex;align-items:center;gap:12px;font-size:15px;line-height:1.7;margin:0;}
.comparison-heading h2 svg {width:21px;height:21px;flex-shrink:0;color:var(--auth-accent);}
.comparison-heading>span {flex-shrink:0;font-size:11px;color:var(--auth-accent);}
.comparison-help {font-size:11px;line-height:1.9;color:var(--auth-muted);margin:13px 0 20px;max-width:850px;}
.comparison-slots {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:20px;}
.comparison-slot {display:flex;align-items:center;gap:12px;min-width:0;padding:15px;border:1px solid var(--auth-border);border-radius:13px;background:var(--auth-field);font-size:12px;line-height:1.8;}
.comparison-slot-number {color:var(--auth-accent);font-size:10px;flex-shrink:0;}
.comparison-slot strong {overflow-wrap:anywhere;min-width:0;}
.comparison-slot.is-empty {border-style:dashed;background:transparent;color:var(--auth-muted);font-size:11px;}
.comparison-slot button {display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;margin-left:auto;border:1px solid var(--auth-border);border-radius:50%;background:transparent;color:var(--auth-muted);cursor:pointer;}
.comparison-slot button:hover {color:var(--auth-accent);border-color:var(--auth-accent);}
.comparison-slot button svg {width:15px;height:15px;}
.comparison-actions {display:flex;align-items:center;flex-wrap:wrap;gap:12px;}
.comparison-actions>.btn-primary,.comparison-actions>.btn-secondary {font-size:11px;min-height:44px;}
.comparison-actions button:disabled {opacity:.5;cursor:default;transform:none;}
.comparison-clear {padding:10px 4px;border:0;background:transparent;color:var(--auth-muted);font:inherit;font-size:10px;cursor:pointer;}
.comparison-clear:hover {color:var(--auth-text);}
.comparison-limit {margin:14px 0 0;}
#comparisonResult:not([hidden]) {margin-top:26px;padding-top:22px;border-top:1px solid var(--auth-border);}
#comparisonResult h3 {font-size:15px;line-height:1.8;margin:0 0 18px;}
.comparison-table-wrap {overflow-x:auto;border:1px solid var(--auth-border);border-radius:14px;}
.comparison-table {width:100%;min-width:500px;border-collapse:collapse;table-layout:fixed;font-size:11px;line-height:1.9;}
.comparison-table th,.comparison-table td {padding:16px;vertical-align:top;text-align:left;border-bottom:1px solid var(--auth-border);overflow-wrap:anywhere;white-space:pre-line;}
.comparison-table th:not(:last-child),.comparison-table td:not(:last-child) {border-right:1px solid var(--auth-border);}
.comparison-table thead th {background:var(--auth-field);color:var(--auth-accent);}
.comparison-table th:first-child {width:23%;}
.comparison-table tbody th {font-size:10px;color:var(--auth-muted);font-weight:500;}
.comparison-table tr:last-child>* {border-bottom:0;}
.comparison-panel :is(button,a,[tabindex]):focus-visible {outline:2px solid var(--auth-accent);outline-offset:3px;}
@media(max-width:600px){.comparison-panel{padding:18px 15px;}.comparison-slots{grid-template-columns:minmax(0,1fr);gap:10px;}.comparison-heading h2{font-size:13px;gap:9px;}.comparison-actions{align-items:stretch;}.comparison-actions>.btn-secondary,.comparison-actions>.btn-primary{width:100%;}.comparison-table td,.comparison-table th{padding:12px;}}
