.hero {
    margin-bottom: var(--space-lg);
    max-width: 780px;
}

.hero h1 {
    font-size: clamp(1.8rem, 2.5vw + 1rem, 3rem);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.015em;
}

.hero p {
    margin: 0;
    max-width: 740px;
}

.muted-note {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.warning-note {
    margin-top: var(--space-sm);
    color: var(--warning);
    font-size: 0.84rem;
}

.danger-note {
    margin-top: var(--space-sm);
    color: var(--danger);
    font-size: 0.84rem;
}

.generator-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.generator-layout > * {
    min-width: 0;
}

.generator-session-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin-top: var(--space-lg);
}

.generator-session-column {
    min-width: 0;
}

.generator-compact-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(128px, 0.65fr);
    gap: var(--space-sm);
    align-items: start;
}

.generator-compact-row .field {
    min-width: 0;
}

.generator-submit-panel {
    margin-top: 1rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.generator-submit-row {
    justify-content: center;
    margin-top: 0;
}

.generation-pipeline-overlay {
    position: fixed;
    inset: 0;
    z-index: 51;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--overlay-background);
}

.generation-pipeline-panel {
    width: min(760px, 96vw);
}

.generation-pipeline-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.generation-pipeline-top h2 {
    margin: 0;
    text-align: center;
}

.generation-pipeline-close {
    position: absolute;
    right: 0;
    top: 0;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    padding: 0;
}

.generation-pipeline-instructions {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
}

.generation-pipeline-output {
    width: 170px;
    height: 42px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--surface-tint), transparent 85%);
    background: color-mix(in srgb, var(--surface-tint), transparent 95%);
    color: var(--text-primary);
    resize: none;
    overflow: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scrollbar-color: color-mix(in srgb, var(--accent), transparent 45%) color-mix(in srgb, var(--surface-tint), transparent 94%);
    text-align: center;
}

.generation-pipeline-output::placeholder {
    text-align: center;
}

.generation-pipeline-output::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.generation-pipeline-output::-webkit-scrollbar-track {
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-tint), transparent 95.5%);
}

.generation-pipeline-output::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent), transparent 45%);
    background-clip: padding-box;
}

.generation-pipeline-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.generation-pipeline-output:hover {
    border-color: color-mix(in srgb, var(--accent), transparent 62%);
}

.generation-pipeline-output:focus {
    border-color: color-mix(in srgb, var(--accent), transparent 45%);
    box-shadow: var(--ring);
}

.generation-pipeline-row .btn {
    width: 170px;
    min-height: 42px;
    padding: 10px 12px;
}

.generation-pipeline-start-row {
    display: flex;
    justify-content: center;
    margin-top: 0.9rem;
}

.generation-pipeline-error {
    text-align: center;
    margin-top: 0.7rem;
    margin-bottom: 0;
}

.analytics-prompt-panel {
    width: min(620px, 96vw);
}

.analytics-prompt-instructions {
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
}

.analytics-prompt-row {
    margin-top: 0.85rem;
}

.analytics-prompt-note {
    max-width: 58ch;
    margin: 0.85rem auto 0;
    text-align: center;
}

.tiny {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.session-top {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    text-align: center;
}

.session-top.card-pad {
    padding-block: 0.9rem;
}

.session-top h2 {
    margin-bottom: 0;
}

.session-progress-text {
    margin: 0;
}

.session-top .progress-wrap {
    width: min(100%, 720px);
}

.session-timer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
}

.session-timer-text {
    margin: 0;
}

.session-top-actions {
    justify-content: center;
    margin-top: 0.1rem;
}

.session-top-actions .btn {
    padding-block: 8px;
}

.session-grid {
    display: grid;
    grid-template-columns: 1.04fr 1fr;
    gap: var(--space-lg);
    align-items: start;
    margin-top: 1rem;
}

.session-grid.is-single {
    grid-template-columns: 1fr;
}

.session-grid.is-single .question-card {
    max-width: 900px;
    width: 100%;
    margin-inline: auto;
}

.passage-card h3, .question-card h3 {
    margin-bottom: var(--space-sm);
}

.passage-original-title {
    margin-top: calc(var(--space-sm) * -0.5);
    margin-bottom: var(--space-sm);
}

.passage-text {
    white-space: pre-wrap;
    color: var(--text-secondary);
}

.explanation-panel {
    margin-top: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    background: color-mix(in srgb, var(--text-muted), transparent 93%);
}

.practice-confidence {
    margin-top: 0.75rem;
}

.practice-shortcuts {
    margin-top: 0.7rem;
    text-align: center;
}

.practice-ai-note {
    margin-top: 0.95rem;
    text-align: center;
}

.practice-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: var(--space-sm);
}

.practice-status-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    background: color-mix(in srgb, var(--surface-tint), transparent 93%);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.practice-status-pill.is-submitted {
    border-color: color-mix(in srgb, var(--success), transparent 62%);
    background: color-mix(in srgb, var(--success), transparent 91%);
    color: var(--success);
}

.practice-status-pill.is-incomplete {
    border-color: color-mix(in srgb, var(--warning), transparent 56%);
    background: color-mix(in srgb, var(--warning), transparent 90%);
    color: var(--warning);
}

.practice-status-pill.is-flagged {
    border-color: color-mix(in srgb, var(--danger), transparent 56%);
    background: color-mix(in srgb, var(--danger), transparent 90%);
    color: var(--danger);
}

.practice-status-pill.is-draft {
    border-color: color-mix(in srgb, var(--text-muted), transparent 56%);
    background: color-mix(in srgb, var(--surface-tint), transparent 90%);
    color: var(--text-secondary);
}

.practice-panel {
    max-height: min(760px, calc(100vh - 2rem));
    overflow: hidden;
    display: grid;
    gap: var(--space-md);
}

.practice-review-panel {
    width: min(840px, 96vw);
}

.practice-panel-instructions {
    margin-bottom: 0;
}

.practice-panel-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.practice-panel-stat {
    display: grid;
    gap: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    background: color-mix(in srgb, var(--surface-tint), transparent 94%);
    text-align: center;
}

.practice-panel-stat span {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.practice-panel-stat strong {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.practice-panel-filters {
    justify-content: center;
}

.practice-question-nav-list {
    display: grid;
    gap: 0.65rem;
    max-height: min(430px, 48vh);
    overflow-y: auto;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent), transparent 45%) color-mix(in srgb, var(--surface-tint), transparent 94%);
}

.practice-question-nav-list::-webkit-scrollbar {
    width: 10px;
}

.practice-question-nav-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-tint), transparent 95.5%);
}

.practice-question-nav-list::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent), transparent 45%);
    background-clip: padding-box;
}

.practice-question-nav-list::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--accent), transparent 28%);
    background-clip: padding-box;
}

.practice-question-nav-item {
    width: 100%;
    display: grid;
    gap: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    background: color-mix(in srgb, var(--surface-tint), transparent 96%);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.practice-question-nav-item:hover, .practice-question-nav-item:focus-visible {
    border-color: color-mix(in srgb, var(--accent), transparent 42%);
    background: color-mix(in srgb, var(--accent), transparent 94%);
    transform: translateY(-1px);
}

.practice-question-nav-item.is-current {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent), transparent 52%);
}

.practice-question-nav-item.is-incomplete {
    border-color: color-mix(in srgb, var(--warning), transparent 72%);
}

.practice-question-nav-item.is-flagged {
    background: linear-gradient(180deg, color-mix(in srgb, var(--danger), transparent 94%), color-mix(in srgb, var(--surface-tint), transparent 96%));
}

.practice-question-nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.practice-question-nav-number {
    font-size: 0.95rem;
}

.practice-question-nav-statuses {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.practice-panel-empty {
    margin: 0;
    text-align: center;
}

.practice-panel-note {
    margin: 0;
}

.practice-review-actions {
    justify-content: center;
}


.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
    margin-top: 0.9rem;
}

.stat-card h3 {
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.stat-card p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .tiny {
    white-space: pre-line;
    line-height: 1.35;
}

.review-question h4 {
    margin-bottom: 6px;
}

.review-passage-dropdown {
    margin-top: var(--space-md);
    border-top: 1px solid var(--border);
    padding-top: var(--space-sm);
}

.review-passage-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.review-passage-summary::-webkit-details-marker {
    display: none;
}

.review-passage-summary::marker {
    content: "";
}

.review-passage-summary .material-symbols-outlined {
    font-size: 1.1rem;
}

.review-passage-card {
    margin-top: var(--space-sm);
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-lg);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
}

.dashboard-panels {
    margin-top: var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.empty-state {
    text-align: center;
    padding: var(--space-xl);
}

.inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
    font-size: 0.88em;
}

[data-reveal] {
    animation: fade-in-slide 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-page {
    display: grid;
    gap: 1.2rem;
}

.landing-hero {
    padding: clamp(1.2rem, 2vw, 2rem);
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--surface-tint), transparent 84%);
    font-size: 0.76rem;
    color: var(--accent-2);
    background: color-mix(in srgb, var(--surface-tint), transparent 96%);
}

.landing-hero h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    margin: 0.8rem 0;
    max-width: 820px;
}

.landing-sub {
    max-width: 720px;
    font-size: 1rem;
}

.landing-disclaimer {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.landing-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.landing-strip > div {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--surface-tint), transparent 88%);
    background: color-mix(in srgb, var(--surface-tint), transparent 97%);
}

.landing-strip strong {
    display: block;
    margin: 0.5rem 0 0.25rem;
}

.landing-strip p {
    margin: 0;
    font-size: 0.82rem;
}

.landing-how h2 {
    margin-bottom: 0.7rem;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.landing-steps article {
    padding: 1rem;
}

.landing-steps h3 {
    margin: 0.55rem 0 0.35rem;
}

.landing-steps p {
    margin: 0;
    font-size: 0.85rem;
}

@keyframes fade-in-slide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: end;
    margin-bottom: var(--space-lg);
}

.dashboard-filter-meta {
    grid-column: 1 / -1;
    margin: 0;
}

.recommendation-card > p {
    max-width: 860px;
}

.dashboard-insight-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.insight-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.heatmap-section {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.heatmap-section h3 {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.heatmap-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.heatmap-table th, .heatmap-table td {
    vertical-align: middle;
}

.heatmap-table thead th {
    white-space: nowrap;
}

.heatmap-cell:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent), transparent 62%);
}

.heatmap-cell:disabled {
    cursor: default;
    opacity: 0.62;
}

.heatmap-cell-score {
    font-weight: 760;
    color: var(--text-primary);
}

.heatmap-cell-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.heatmap-level-1 {
    background: color-mix(in srgb, var(--success), transparent 92%);
}

.heatmap-level-2 {
    background: color-mix(in srgb, var(--warning), transparent 90%);
}

.heatmap-level-3 {
    background: color-mix(in srgb, var(--warning), transparent 82%);
    border-color: color-mix(in srgb, var(--warning), transparent 62%);
}

.heatmap-level-4 {
    background: color-mix(in srgb, var(--danger), transparent 82%);
    border-color: color-mix(in srgb, var(--danger), transparent 56%);
}

.dashboard-table-card {
    min-width: 0;
}

.dashboard-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-sm);
}

.dashboard-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.recommendation-card, .insights-card, .heatmap-card, .dashboard-table-card {
    min-width: 0;
}

.heatmap-card {
    margin-top: var(--space-lg);
}

.dashboard-detail-grid .dashboard-table-card:first-child {
    grid-column: 1 / -1;
}

.dashboard-empty-actions {
    justify-content: center;
    margin-top: var(--space-md);
}

.dashboard-page {
    display: grid;
    gap: var(--space-lg);
}

.dashboard-page > .dashboard-grid, .dashboard-page > .recommendation-card, .dashboard-page > .dashboard-chart-grid, .dashboard-page > .dashboard-section-stack, .dashboard-page > .dashboard-detail-grid {
    margin-top: 0;
}

.dashboard-filters-title h2, .dashboard-section-heading h2 {
    margin-bottom: 0.25rem;
}

.dashboard-filter-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    gap: var(--space-sm);
    align-items: end;
}

.dashboard-filter-field {
    margin-bottom: 0;
    display: grid;
    gap: 0.28rem;
    margin: 0;
}

.dashboard-eyebrow {
    margin-bottom: 0.35rem;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recommendation-card {
    margin-top: var(--space-lg);
    display: grid;
    gap: 0.55rem;
}

.recommendation-rationale {
    display: grid;
    gap: 0.35rem;
    margin: 0.6rem 0 0;
    color: var(--text-secondary);
    padding-left: 1.15rem;
    list-style: disc;
}

.recommendation-rationale li {
    display: list-item;
}

.recommendation-actions {
    margin-top: 0.5rem;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.dashboard-section-stack {
    display: grid;
    gap: var(--space-md);
}

.dashboard-section-heading {
    display: grid;
    gap: 0.2rem;
}

.heatmap-card h3 {
    margin-bottom: 0.6rem;
}

.heatmap-cell strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.heatmap-low {
    background: color-mix(in srgb, var(--success), transparent 92%);
}

.heatmap-medium {
    background: color-mix(in srgb, var(--warning), transparent 85%);
    border-color: color-mix(in srgb, var(--warning), transparent 60%);
}

.heatmap-high {
    background: color-mix(in srgb, var(--danger), transparent 80%);
    border-color: color-mix(in srgb, var(--danger), transparent 52%);
}

.heatmap-cell.is-early {
    border-style: dashed;
}

.heatmap-empty {
    display: inline-grid;
    place-items: center;
    min-height: 52px;
    color: var(--text-muted);
    cursor: default;
}

.detail-table-card, .insight-card {
    min-width: 0;
}

.detail-table-card:first-child {
    grid-column: 1 / -1;
}

.empty-actions {
    justify-content: center;
    margin-top: var(--space-md);
}

.chart-data-table {
    overflow: auto;
}

.dashboard-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-insights, .dashboard-heatmap-card, .dashboard-table-card {
    min-width: 0;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-md);
    align-items: center;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.dashboard-hero-copy {
    min-width: 0;
    max-width: 880px;
}

.dashboard-hero-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.dashboard-ai-button {
    white-space: nowrap;
}

.dashboard-ai-button .material-symbols-outlined {
    font-size: 1.16rem;
}

.evidence-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.85rem 0;
}

.evidence-chip-list .evidence-chip {
    min-width: auto;
    padding: 0.42rem 0.6rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.dashboard-insights {
    min-width: 0;
}

.dashboard-heatmap-card {
    min-width: 0;
}

.heatmap-cell.is-hot {
    background: color-mix(in srgb, var(--danger), transparent 78%);
    border-color: color-mix(in srgb, var(--danger), transparent 54%);
}

.heatmap-cell.is-warm {
    background: color-mix(in srgb, var(--warning), transparent 83%);
    border-color: color-mix(in srgb, var(--warning), transparent 58%);
}

.heatmap-cell.is-cool {
    background: color-mix(in srgb, var(--accent), transparent 92%);
    border-color: color-mix(in srgb, var(--accent), transparent 76%);
}

.heatmap-cell em {
    color: var(--warning);
    font-size: 0.62rem;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chart-data-details {
    margin-top: 0.75rem;
}

.chart-data-details summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.chart-table-wrap {
    margin-top: 0.75rem;
    max-height: 260px;
    overflow: auto;
}

.dashboard-filter-field select {
    width: 100%;
    padding: 9px 2.45rem 9px 11px;
    border-radius: 13px;
    border: 1px solid color-mix(in srgb, var(--surface-tint), transparent 85%);
    background: color-mix(in srgb, var(--surface-tint), transparent 95%);
    color: var(--text-primary);
    min-height: 42px;
    background-color: color-mix(in srgb, var(--surface-tint), transparent 94.5%);
}

.dashboard-recommendation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: stretch;
}

.dashboard-recommendation-content {
    min-width: 0;
    display: grid;
    gap: 0.65rem;
}

.dashboard-recommendation-content > p:not(.dashboard-eyebrow) {
    max-width: 78ch;
    margin-bottom: 0;
}

.dashboard-recommendation .evidence-chip-list {
    max-width: 100%;
    margin: 0.1rem 0 0.2rem;
}

.dashboard-recommendation .evidence-chip {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.recommendation-alternatives {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.recommendation-alternative-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.recommendation-chip-button {
    max-width: min(100%, 360px);
    justify-content: flex-start;
    border-color: color-mix(in srgb, var(--accent), transparent 82%);
    line-height: 1.25;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.recommendation-primary-actions {
    justify-content: flex-start;
    margin-top: 0.15rem;
}

.chart-card {
    overflow: hidden;
}

.chart-canvas-wrap {
    min-height: 310px;
}

.dashboard-model-card {
    margin-top: 0;
}

.dashboard-model-card-body {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
    gap: var(--space-lg);
    align-items: stretch;
}

.dashboard-model-canvas-wrap {
    min-height: 330px;
    height: 330px;
}

.dashboard-model-side {
    display: grid;
    gap: var(--space-md);
    align-content: start;
    min-width: 0;
}

.model-usage-legend-wrap {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.model-usage-legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    min-width: 0;
}

.model-usage-legend-header > .tiny {
    color: var(--text-secondary);
    font-weight: 760;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}

.model-usage-legend-header .dashboard-card-pagination {
    flex: 0 0 auto;
    margin-left: auto;
}

.model-usage-legend {
    display: grid;
    gap: 0.6rem;
}

.model-usage-legend-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    padding: 0.68rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-tint), transparent 96%);
}

.model-usage-swatch {
    width: 0.72rem;
    height: 0.72rem;
    margin-top: 0.22rem;
    border-radius: 999px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface-tint), transparent 90%);
}

.model-usage-legend-body {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.model-usage-legend-body strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.model-usage-data-details {
    margin-top: 0;
}

.heatmap-table {
    min-width: 680px;
    table-layout: fixed;
}

.heatmap-table thead th:first-child, .heatmap-table th[scope="row"] {
    width: 185px;
}

.heatmap-skill-header {
    text-align: center;
    vertical-align: bottom;
    white-space: normal;
}

.heatmap-table td {
    min-width: 0;
}

.heatmap-cell {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 0.48rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-tint), transparent 96.5%);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    overflow: hidden;
}

.heatmap-cell span {
    font-size: 0.68rem;
    color: var(--text-muted);
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.recent-misses-wrap {
    overflow-x: hidden;
}

.recent-misses-table {
    table-layout: fixed;
}

.recent-misses-table th, .recent-misses-table td {
    padding-inline: 0.48rem;
}

.recent-misses-table th:nth-child(5), .recent-misses-table td:nth-child(5), .recent-misses-table th:nth-child(6), .recent-misses-table td:nth-child(6) {
    width: 10%;
}

.weak-pairs-table, .recent-misses-table, .recent-sessions-table {
    table-layout: fixed;
}

.weak-pairs-table th, .weak-pairs-table td, .recent-misses-table th, .recent-misses-table td, .recent-sessions-table th, .recent-sessions-table td {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.weak-pairs-table th:nth-child(1), .weak-pairs-table td:nth-child(1) {
    width: 7%;
}

.weak-pairs-table th:nth-child(2), .weak-pairs-table td:nth-child(2) {
    width: 25%;
}

.weak-pairs-table th:nth-child(3), .weak-pairs-table td:nth-child(3) {
    width: 14%;
    line-height: 1.24;
    white-space: normal;
}

.weak-pairs-table th:nth-child(4), .weak-pairs-table td:nth-child(4) {
    width: 7%;
}

.weak-pairs-table th:nth-child(5), .weak-pairs-table td:nth-child(5), .weak-pairs-table th:nth-child(6), .weak-pairs-table td:nth-child(6), .weak-pairs-table th:nth-child(7), .weak-pairs-table td:nth-child(7) {
    width: 8%;
}

.weak-pairs-table th:nth-child(8), .weak-pairs-table td:nth-child(8) {
    width: 10%;
}

.weak-pairs-table th:nth-child(9), .weak-pairs-table td:nth-child(9) {
    width: 13%;
}

.weak-pairs-table th:nth-child(n/**/+4), .weak-pairs-table td:nth-child(n/**/+4) {
    text-align: center;
}

.weak-pairs-table td:nth-child(9) .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: normal;
}

.recent-misses-table th:nth-child(1), .recent-misses-table td:nth-child(1), .recent-misses-table th:nth-child(2), .recent-misses-table td:nth-child(2), .recent-misses-table th:nth-child(5), .recent-misses-table td:nth-child(5), .recent-misses-table th:nth-child(6), .recent-misses-table td:nth-child(6) {
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 1120px) {
    .dashboard-detail-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.dashboard-detail-grid .dashboard-table-card {
    grid-column: 1 / -1;
}

.recent-misses-wrap, .recent-sessions-wrap {
    overflow-x: visible;
}

.recent-misses-table, .recent-sessions-table {
    width: 100%;
    table-layout: fixed;
}

.recent-misses-table th, .recent-misses-table td, .recent-sessions-table th, .recent-sessions-table td {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.recent-misses-table th:nth-child(1), .recent-misses-table td:nth-child(1) {
    width: 12%;
}

.recent-misses-table th:nth-child(2), .recent-misses-table td:nth-child(2) {
    width: 8%;
}

.recent-misses-table th:nth-child(3), .recent-misses-table td:nth-child(3) {
    width: 24%;
    line-height: 1.25;
    white-space: normal;
}

.recent-misses-table th:nth-child(4), .recent-misses-table td:nth-child(4) {
    width: 25%;
    line-height: 1.25;
    white-space: normal;
}

.recent-misses-table th:nth-child(5), .recent-misses-table td:nth-child(5) {
    width: 10%;
}

.recent-misses-table th:nth-child(6), .recent-misses-table td:nth-child(6) {
    width: 10%;
}

.recent-misses-table th:nth-child(7), .recent-misses-table td:nth-child(7) {
    width: 11%;
}

.recent-misses-table th:nth-child(1), .recent-misses-table td:nth-child(1), .recent-misses-table th:nth-child(2), .recent-misses-table td:nth-child(2), .recent-misses-table th:nth-child(5), .recent-misses-table td:nth-child(5), .recent-misses-table th:nth-child(6), .recent-misses-table td:nth-child(6), .recent-misses-table th:nth-child(7), .recent-misses-table td:nth-child(7) {
    text-align: center;
    white-space: nowrap;
}

.recent-sessions-table th:nth-child(1), .recent-sessions-table td:nth-child(1) {
    width: 15%;
}

.recent-sessions-table th:nth-child(2), .recent-sessions-table td:nth-child(2) {
    width: 10%;
}

.recent-sessions-table th:nth-child(3), .recent-sessions-table td:nth-child(3) {
    width: 13%;
}

.recent-sessions-table th:nth-child(4), .recent-sessions-table td:nth-child(4) {
    width: 16%;
}

.recent-sessions-table th:nth-child(5), .recent-sessions-table td:nth-child(5) {
    width: 14%;
}

.recent-sessions-table th:nth-child(6), .recent-sessions-table td:nth-child(6) {
    width: 17%;
}

.recent-sessions-table th:nth-child(7), .recent-sessions-table td:nth-child(7) {
    width: 15%;
}

.recent-sessions-table th, .recent-sessions-table td {
    text-align: center;
    white-space: nowrap;
}

.recent-misses-table td:nth-child(7) .btn, .recent-sessions-table td:nth-child(7) .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: normal;
}

@media (max-width: 720px) {
    .recent-misses-wrap, .recent-sessions-wrap {
        overflow-x: auto;
    }

    .recent-misses-table, .recent-sessions-table {
        min-width: 760px;
    }
}

.dashboard-filters {
    margin-bottom: var(--space-lg);
    display: grid;
    gap: var(--space-sm);
}

.dashboard-filters .dashboard-section-header {
    margin-bottom: 0;
}

.dashboard-filters .dashboard-section-header p {
    margin-bottom: 0;
}

.dashboard-empty .button-row, .dashboard-empty-actions {
    justify-content: center;
}

.weak-pairs-table th:last-child, .weak-pairs-table td:last-child, .recent-misses-table th:last-child, .recent-misses-table td:last-child, .recent-sessions-table th:last-child, .recent-sessions-table td:last-child {
    width: 5.8rem;
    text-align: center;
    white-space: nowrap;
}

.weak-pairs-table td:last-child .btn, .recent-misses-table td:last-child .btn, .recent-sessions-table td:last-child .btn {
    width: auto;
    min-width: 4.2rem;
    padding-inline: 0.82rem;
    white-space: nowrap;
}

.settings-data-card {
    display: grid;
    align-content: start;
    gap: var(--space-md);
}

.settings-data-card h2, .settings-data-card .muted-note {
    margin-bottom: 0;
}

.settings-data-actions {
    display: grid;
    gap: 0.72rem;
}

.settings-data-actions > .btn, .settings-import-row {
    width: 100%;
}

.settings-import-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
}

.settings-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.settings-file-picker {
    min-width: 0;
    justify-content: flex-start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-delete-button {
    color: color-mix(in srgb, var(--danger), var(--text-primary) 12%);
    border-color: color-mix(in srgb, var(--danger), transparent 62%);
}

.settings-delete-button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--danger), transparent 42%);
    background: color-mix(in srgb, var(--danger), transparent 91%);
}

@media (max-width: 560px) {
    .settings-import-row {
        grid-template-columns: 1fr;
    }
}

.dashboard-card-pagination {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex: 0 0 auto;
    margin-left: auto;
    padding-top: 0.05rem;
}

.dashboard-page-range {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.45rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 650;
    white-space: nowrap;
}

.dashboard-page-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--accent), transparent 78%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-tint), transparent 94.5%);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dashboard-page-button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent), transparent 45%);
    background: color-mix(in srgb, var(--accent), transparent 90%);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.dashboard-page-button:disabled {
    opacity: 0.38;
    cursor: default;
}

.dashboard-page-button .material-symbols-outlined {
    font-size: 1.12rem;
}

.dashboard-table-card .dashboard-section-header > div:first-child, .dashboard-heatmap-card .dashboard-section-header > div:first-child {
    min-width: 0;
}

.chart-card-header-with-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    column-gap: var(--space-md);
}

.chart-card-header-with-action h2, .chart-card-header-with-action p {
    grid-column: 1;
}

.chart-card-header-with-action .dashboard-card-pagination {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
}

.heatmap-skill-header span {
    display: block;
    line-height: 1.18;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    white-space: nowrap;
}

.practice-navigation-actions {
    justify-content: space-between;
}

.practice-navigation-actions .btn {
    min-width: 7rem;
    justify-content: center;
}

.review-list {
    display: grid;
    gap: var(--space-md);
    margin-top: 0.75rem;
}

.review-question.is-correct {
    border-color: color-mix(in srgb, var(--success), transparent 54%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--success), transparent 93%), color-mix(in srgb, var(--surface-tint), transparent 96.5%));
}

.review-question.is-incorrect {
    border-color: color-mix(in srgb, var(--danger), transparent 48%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--danger), transparent 92%), color-mix(in srgb, var(--surface-tint), transparent 96.8%));
}

.review-question.is-focused.is-correct {
    border-color: var(--success);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--success), transparent 36%);
}

.review-question.is-focused.is-incorrect {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger), transparent 34%);
}

.review-question.is-focused.is-unanswered {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent), transparent 44%);
}

@media (max-width: 640px) {
    .dashboard-card-pagination {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .chart-card-header-with-action {
        grid-template-columns: 1fr;
    }

    .chart-card-header-with-action .dashboard-card-pagination {
        grid-column: 1;
        grid-row: auto;
    }

    .practice-navigation-actions {
        justify-content: stretch;
    }

    .practice-navigation-actions .btn {
        flex: 1 1 0;
    }


    .practice-panel-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .practice-question-nav-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .practice-question-nav-statuses {
        justify-content: flex-start;
    }
}

.chart-card-title {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.review-controls {
    margin-top: 1rem;
    margin-bottom: 0.9rem;
}

.review-question.is-unanswered {
    border-color: color-mix(in srgb, var(--surface-tint), transparent 88%);
}

.generator-bank-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: 1rem;
}

.generator-bank-cta h2 {
    margin-bottom: 0.25rem;
}

.generator-bank-cta p {
    margin: 0;
    color: var(--text-secondary);
}

.question-bank-page {
    display: grid;
    gap: var(--space-lg);
}

.question-bank-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-md);
    align-items: center;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.question-bank-hero-copy {
    max-width: 820px;
    min-width: 0;
}

.question-bank-hero-actions {
    justify-content: flex-end;
}

.question-bank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
    align-items: start;
}

.question-bank-card {
    display: grid;
    gap: var(--space-md);
    min-width: 0;
}

.question-bank-card-header {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    align-items: flex-start;
}

.question-bank-card-header h2 {
    margin-bottom: 0.3rem;
}

.question-bank-card-header p {
    margin: 0;
    color: var(--text-secondary);
}

.question-bank-status {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--surface-tint), transparent 82%);
    border-radius: 999px;
    padding: 0.35rem 0.55rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.question-bank-status.is-ready {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success), transparent 60%);
}

.question-bank-status.is-empty {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning), transparent 60%);
}

.question-bank-status.is-error {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger), transparent 60%);
}

.question-bank-progress-label {
    margin: 0 0 -0.35rem;
}

.question-bank-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
}

.question-bank-metric {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.question-bank-metric strong {
    font-size: 1.05rem;
}

.question-bank-metric em {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-style: normal;
}

.question-bank-scope {
    display: grid;
    gap: 0.25rem;
}

.question-bank-scope p {
    margin: 0;
}

.question-bank-message {
    margin: 0;
}

.question-bank-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: end;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.question-bank-count-field {
    display: grid;
    gap: 0.28rem;
    min-width: 150px;
    margin: 0;
}

.question-bank-count-field .tiny {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.question-bank-count-field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 2.45rem 9px 11px;
    border-radius: 13px;
    border: 1px solid color-mix(in srgb, var(--surface-tint), transparent 85%);
    background-color: color-mix(in srgb, var(--surface-tint), transparent 94.5%);
    color: var(--text-primary);
}
