.review-workspace,
#reviewSessionMount {
    height: 100%;
    min-height: 0;
}

.review-session-layer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    height: auto;
    min-height: 0;
    place-items: center;
    padding: 24px;
    background: rgb(15 23 42 / 28%);
}

.review-session-layer.review-session-layer--conversation {
    position: static;
    display: block;
    height: 100%;
    box-sizing: border-box;
    padding: 0;
    background: transparent;
}

.review-session-layer--setup {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    background: transparent;
    -webkit-backdrop-filter: blur(2px) saturate(1.06);
    backdrop-filter: blur(2px) saturate(1.06);
}

@media (min-width: 821px) {
    /* The dashboard workspace has a 3px top chrome border; include it in the centering box. */
    .review-session-layer--setup {
        top: -3px;
    }
}

.review-dashboard-chat {
    height: 100%;
    min-height: 0;
}

.review-dashboard-chat--blurred {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

[data-theme="dark"] .review-session-layer--setup {
    background: transparent;
}

.review-dashboard-chat .review-session-dialog--conversation,
.review-session-layer--conversation .review-session-dialog--conversation {
    width: 100%;
    min-height: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.review-session-dialog {
    --review-ink: #18191d;
    --review-muted: #6a6e78;
    --review-paper: #ffffff;
    --review-soft: #f5f6f8;
    --review-line: #e1e3e7;
    --review-accent: #2563eb;
    --review-accent-soft: #ebf2ff;
    --review-danger: #d93441;
    display: grid;
    width: min(820px, 100%);
    min-height: 0;
    height: min(700px, 100%);
    max-height: calc(100dvh - 48px);
    margin: auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--review-line);
    border-radius: 12px;
    color: var(--review-ink);
    background: var(--review-paper);
    box-shadow: 0 4px 8px rgb(15 23 42 / 16%);
}

.review-session-layer--setup .review-session-dialog {
    border-color: var(--review-line);
    border-radius: 18px;
    box-shadow: 0 2px 7px rgb(15 23 42 / 12%);
}

[data-theme="dark"] .review-session-dialog {
    --review-ink: #f4f5f7;
    --review-muted: #b3b7c0;
    --review-paper: #1b1d22;
    --review-soft: #252830;
    --review-line: #383d47;
    --review-accent: #86a6ff;
    --review-accent-soft: #202d4a;
    --review-danger: #ff8a91;
}

.review-session-header {
    display: grid;
    min-height: 88px;
    padding: 10px 18px;
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--review-line);
}

.review-header-action,
.review-end-button,
.review-objectives-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 9px;
    border: 0;
    border-radius: 8px;
    color: var(--review-muted);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.review-header-action {
    justify-self: start;
}

.review-end-button {
    justify-self: end;
    color: var(--review-danger);
}

.review-header-action:hover,
.review-header-action:focus-visible,
.review-objectives-link:hover,
.review-objectives-link:focus-visible,
.review-end-button:hover,
.review-end-button:focus-visible {
    outline: 0;
    background: var(--review-soft);
}

.review-header-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.review-progress-label {
    color: var(--review-muted);
    font-size: 13px;
    white-space: nowrap;
}

.review-progress-label strong {
    color: var(--review-ink);
    font-weight: 700;
}

.review-header-separator {
    color: var(--review-muted);
}

.review-objectives-link {
    min-height: 28px;
    padding: 4px 7px;
    color: var(--review-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.review-icon {
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.review-session-body {
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

.review-session-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.review-session-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.review-session-body::-webkit-scrollbar-thumb {
    border: 2px solid var(--scrollbar-track);
    border-radius: 10px;
    background: var(--scrollbar-thumb);
}

.review-session-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.review-session-dialog--setup {
    position: relative;
    grid-template-rows: minmax(0, 1fr);
}

/* The setup popup keeps its navigation anchored while the topic list scrolls.
   A solid paper strip protects the controls, with a short fade/blur zone above
   it so rows recede naturally instead of remaining legible beneath the footer. */
.review-session-dialog--setup::before {
    content: "";
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 88px;
    pointer-events: none;
    background: var(--review-paper);
}

.review-session-dialog--setup::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 72px;
    left: 0;
    height: 64px;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--review-paper) 88%, transparent) 72%, var(--review-paper) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 64%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 64%, #000 100%);
}

.review-session-dialog--setup .review-setup-topbar {
    position: static;
}

.review-session-layer--setup .review-session-dialog {
    box-sizing: border-box;
    max-height: 100%;
}

.review-setup-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    background: var(--review-paper);
}

.review-session-dialog--setup .review-setup-topbar:has(.review-footer-message:empty) {
    min-height: 0;
    padding-block: 0;
}

.review-setup-actions {
    display: inline-flex;
    position: absolute;
    right: 24px;
    bottom: 24px;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    z-index: 3;
}

.review-stage {
    display: grid;
    min-height: 480px;
    padding: clamp(28px, 5vw, 54px);
    grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
    gap: clamp(30px, 6vw, 78px);
    align-items: center;
}

.review-stage-copy {
    display: block;
    align-self: start;
}

.review-stage-number {
    margin: 0 0 15px;
    color: var(--review-muted);
    font-size: 13px;
}

.review-stage h1 {
    max-width: 320px;
    margin: 0;
    color: var(--review-ink);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.04;
}

.review-stage-copy > p:last-child {
    margin: 12px 0 0;
    color: var(--review-muted);
    font-size: 15px;
    line-height: 1.5;
}

.review-stage-content {
    width: 100%;
    min-width: 0;
}

.review-session-dialog--transition-forward .review-session-body {
    animation: review-setup-page-in-forward 280ms cubic-bezier(.22, .61, .36, 1) both;
}

.review-session-dialog--transition-backward .review-session-body {
    animation: review-setup-page-in-backward 280ms cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes review-setup-page-in-forward {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes review-setup-page-in-backward {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

.review-subject-grid,
.review-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.review-subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-subject-grid--stacked {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 26px;
}

.review-subject-card,
.review-choice-card,
.review-mode-card,
.review-format-card {
    position: relative;
    display: flex;
    min-height: 88px;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--review-ink);
    background: var(--review-soft);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.review-subject-card {
    min-height: 84px;
    gap: 9px;
    padding: 10px 14px;
    border: 0;
    border-radius: 22px;
    filter: drop-shadow(0 2px 3px rgb(15 23 42 / 16%));
    transition: background-color 150ms ease, transform 150ms ease;
}

.review-subject-card:hover,
.review-subject-card:focus-visible {
    background: color-mix(in srgb, var(--review-soft) 82%, var(--review-line));
    outline: 0;
    transform: translateY(-1px);
}

.review-choice-card:hover,
.review-choice-card:focus-visible,
.review-mode-card:hover,
.review-mode-card:focus-visible,
.review-format-card:hover,
.review-format-card:focus-visible {
    border-color: color-mix(in srgb, var(--review-accent) 48%, var(--review-line));
    outline: 0;
}

.review-subject-card.is-selected {
    background: color-mix(in srgb, var(--review-soft) 82%, var(--review-line));
}

.review-choice-card.is-selected,
.review-mode-card.is-selected,
.review-format-card.is-selected {
    border-color: var(--review-ink);
    background: var(--review-paper);
}

.review-subject-icon,
.review-mode-icon,
.review-format-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    color: var(--review-accent);
    background: var(--review-accent-soft);
}

.review-plan-badge {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: #737577;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.review-subject-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    border-radius: 0;
    color: inherit;
    background: transparent;
    font-size: 23px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    text-shadow:
        -1px -1px 0 #ffffff,
        1px -1px 0 #ffffff,
        -1px 1px 0 #ffffff,
        1px 1px 0 #ffffff,
        0 1px 2px rgb(15 23 42 / 22%);
}

.review-subject-icon .review-icon,
.review-mode-icon .review-icon,
.review-format-icon .review-icon {
    width: 21px;
    height: 21px;
}

.review-subject-copy,
.review-subject-card > span:not(.review-subject-icon):not(.review-selected-mark),
.review-choice-card > span:first-child,
.review-mode-card > span:nth-child(2),
.review-format-card > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.review-subject-card strong,
.review-choice-card strong,
.review-mode-card strong,
.review-format-card strong {
    color: var(--review-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.review-subject-board {
    margin-left: 6px;
    color: var(--review-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .02em;
    vertical-align: middle;
}

.review-subject-card small,
.review-choice-card small,
.review-mode-card small,
.review-format-card small {
    color: var(--review-muted);
    font-size: 12px;
    line-height: 1.35;
}

.review-selected-mark {
    display: grid;
    width: 20px;
    height: 20px;
    margin-left: auto;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: #14161a;
}

.review-selected-mark:empty {
    display: none;
}

.review-selected-mark .review-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

.review-level-section {
    margin-top: 30px;
}

.review-level-section h2,
.review-language-select > span {
    margin: 0 0 11px;
    color: var(--review-ink);
    font-size: 14px;
    font-weight: 700;
}

.review-level-section .review-choice-card {
    min-height: 70px;
}

.review-option-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-option-grid--three .review-choice-card {
    min-height: 76px;
}

.review-option-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-topic-picker {
    display: grid;
    min-height: 0;
    grid-template-rows: auto auto auto;
}

.review-topic-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.review-search-field {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--review-muted);
    background: var(--review-soft);
}

.review-search-field .review-icon {
    width: 16px;
    height: 16px;
}

.review-search-field input {
    width: 100%;
    min-height: 42px;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--review-ink);
    background: transparent;
    font: inherit;
    font-size: 14px;
}

.review-selection-count {
    flex: 0 0 auto;
    color: var(--review-muted);
    font-size: 12px;
    white-space: nowrap;
}

.review-topic-list {
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-top: 1px solid var(--review-line);
}

.review-topic-group {
    border-bottom: 1px solid var(--review-line);
}

.review-topic-summary {
    display: flex;
    width: 100%;
    min-height: 57px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border: 0;
    color: var(--review-ink);
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.review-topic-summary > span:first-child {
    display: grid;
    gap: 3px;
}

.review-topic-summary strong {
    font-size: 14px;
    font-weight: 700;
}

.review-topic-summary small,
.review-topic-summary > span:last-child {
    color: var(--review-muted);
    font-size: 12px;
}

.review-topic-summary > span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.review-topic-summary .review-icon {
    transition: transform 180ms ease-out;
}

.review-topic-group.is-expanded .review-topic-summary .review-icon { transform: rotate(90deg); }

.review-subtopic-list {
    display: grid;
    gap: 1px;
    max-height: 640px;
    padding: 0 0 10px;
    overflow: hidden;
}

.review-topic-group.is-opening .review-subtopic-list {
    animation: review-topic-dropdown-in 260ms cubic-bezier(.22, .61, .36, 1) both;
}

.review-topic-group.is-collapsing .review-subtopic-list {
    animation: review-topic-dropdown-out 220ms cubic-bezier(.4, 0, .6, 1) both;
}

@keyframes review-topic-dropdown-in {
    from {
        max-height: 0;
        padding-bottom: 0;
        transform: translateY(-6px);
    }
    to {
        max-height: 640px;
        padding-bottom: 10px;
        transform: translateY(0);
    }
}

@keyframes review-topic-dropdown-out {
    from {
        max-height: 640px;
        padding-bottom: 10px;
        transform: translateY(0);
    }
    to {
        max-height: 0;
        padding-bottom: 0;
        transform: translateY(-6px);
    }
}

.review-syllabus-choice {
    position: relative;
    display: grid;
    min-height: 36px;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.review-syllabus-choice:hover {
    border-color: transparent;
    background: var(--review-soft);
}

.review-syllabus-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.review-checkbox {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1.5px solid var(--review-line);
    border-radius: 6px;
    color: #ffffff;
}

.review-syllabus-choice.is-selected .review-checkbox {
    border-color: var(--review-accent);
    background: var(--review-accent);
}

.review-checkbox .review-icon {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

.review-syllabus-choice > span:last-child {
    display: grid;
    gap: 3px;
}

.review-syllabus-choice strong {
    color: var(--review-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.review-syllabus-choice small {
    color: var(--review-muted);
    font-size: 11px;
}

.review-inline-note {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--review-muted);
    font-size: 12px;
}

.review-mode-card {
    min-height: 102px;
}

.review-objective-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--review-line);
    border-radius: 10px;
    background: var(--review-soft);
}

.review-objective-summary > div {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.review-objective-summary strong {
    color: var(--review-accent);
    font-size: 27px;
    font-weight: 700;
}

.review-objective-summary span,
.review-objective-summary p {
    margin: 0;
    color: var(--review-muted);
    font-size: 12px;
}

.review-objective-list,
.review-drawer-list {
    display: grid;
    gap: 8px;
    margin: 13px 0 0;
    padding: 0;
    list-style: none;
}

.review-objective-list {
    max-height: none;
    overflow: visible;
}

.review-objective-list li,
.review-drawer-list li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--review-line);
}

.review-objective-list span,
.review-drawer-list span {
    color: var(--review-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.review-objective-list p,
.review-drawer-list p {
    margin: 0;
    color: var(--review-ink);
    font-size: 13px;
    line-height: 1.45;
}

.review-knowledge-panel {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid var(--review-line);
    border-radius: 8px;
    background: var(--review-soft);
}

.review-knowledge-status {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--review-muted);
    font-size: 12px;
    line-height: 1.45;
}

.review-knowledge-status .review-icon { margin-top: 1px; }
.review-knowledge-status.is-available { color: #237052; }
.review-knowledge-status.is-missing { color: var(--review-muted); }

.review-voice-warning {
    margin: 12px 0 0;
    padding: 9px 11px;
    border-left: 3px solid var(--review-danger);
    color: var(--review-danger);
    background: color-mix(in srgb, var(--review-danger) 7%, var(--review-paper));
    font-size: 12px;
    line-height: 1.45;
}

.review-language-select {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.review-language-select > span { margin: 0; }

.review-language-select select {
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--review-line);
    border-radius: 8px;
    outline: 0;
    color: var(--review-ink);
    background: var(--review-soft);
    font: inherit;
    font-size: 14px;
}

.review-language-select small {
    color: var(--review-muted);
    font-size: 12px;
}

.review-stage--format {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
    align-items: center;
}

.review-stage--format .review-stage-content {
    grid-column: 2;
    width: 100%;
}

.review-stage--format .review-option-grid--two {
    grid-template-columns: 1fr;
    gap: 8px;
}

.review-mode-selector {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.review-mode-selector h2 {
    margin: 0 0 3px;
    color: var(--review-ink);
    font-size: 14px;
    font-weight: 700;
}

.review-mode-options {
    display: grid;
    gap: 8px;
}

.review-mode-options .review-mode-card {
    min-height: 58px;
    padding: 10px 12px;
    border-color: transparent;
    filter: drop-shadow(0 2px 3px rgb(15 23 42 / 12%));
    transition: transform 150ms ease;
}

.review-mode-options .review-mode-card > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.review-mode-options .review-mode-card:hover,
.review-mode-options .review-mode-card:focus-visible {
    border-color: color-mix(in srgb, var(--review-accent) 48%, var(--review-line));
    outline: 0;
    transform: translateY(-1px);
}

.review-mode-options .review-mode-card.is-selected {
    border-color: transparent;
    background: var(--review-paper);
}

.review-stage--format .review-format-card {
    min-height: 58px;
    padding: 10px 12px;
    border-color: transparent;
    filter: drop-shadow(0 2px 3px rgb(15 23 42 / 16%));
    transition: transform 150ms ease;
}

.review-stage--format .review-format-card:hover,
.review-stage--format .review-format-card:focus-visible,
.review-stage--format .review-format-card.is-selected {
    border-color: transparent;
}

.review-stage--format .review-format-card:hover,
.review-stage--format .review-format-card:focus-visible {
    transform: translateY(-1px);
}

.review-stage--format .review-format-card strong,
.review-stage--format .review-format-card .review-selected-mark {
    color: #ffffff;
}

.review-stage--format .review-format-card[data-review-modality="chat"],
.review-stage--format .review-format-card[data-review-modality="chat"].is-selected {
    background: #80b1e9;
}

.review-stage--format .review-format-card[data-review-modality="voice"],
.review-stage--format .review-format-card[data-review-modality="voice"].is-selected {
    background: #00866e;
}

.review-stage--format .review-language-select,
.review-stage--format .review-language-select select {
    width: 100%;
    box-sizing: border-box;
}

.review-format-emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    font-size: 22px;
    line-height: 1;
    background: transparent;
    text-shadow: 0 1px 2px rgb(15 23 42 / 22%);
}

.review-session-footer {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--review-line);
}

.review-footer-message {
    max-width: 530px;
    color: var(--review-danger);
    font-size: 12px;
    line-height: 1.35;
}

.review-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.review-primary-button,
.review-secondary-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.review-primary-button {
    color: #ffffff;
    background: #17191e;
}

.review-primary-button:hover,
.review-primary-button:focus-visible {
    outline: 0;
    background: #343842;
}

.review-primary-button:disabled,
.review-primary-button:disabled:hover {
    border-color: #4b5058;
    color: #eef0f3;
    background: #4b5058;
    cursor: not-allowed;
}

.review-secondary-button {
    border-color: var(--review-line);
    color: var(--review-muted);
    background: var(--review-soft);
}

.review-secondary-button:hover,
.review-secondary-button:focus-visible {
    outline: 0;
    color: var(--review-ink);
    border-color: var(--review-muted);
}

.review-primary-button .review-icon { width: 15px; height: 15px; }

.review-session-dialog--conversation {
    min-height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.review-session-top-card {
    box-sizing: border-box;
    width: min(670px, calc(100% - 36px));
    margin: 12px auto 0;
    border: 3px solid var(--border);
    border-radius: 12px;
    background: var(--review-paper);
    overflow: hidden;
}

.review-dashboard-chat--blurred .review-session-top-card {
    border-color: transparent;
}

.review-session-dialog--conversation .review-session-header {
    min-height: 40px;
    padding: 6px 10px;
    border-bottom: 0;
    background: var(--review-paper);
}

.review-task-prompt {
    display: flex;
    width: calc(100% - 10px);
    min-height: 34px;
    align-items: center;
    gap: 8px;
    align-self: start;
    margin: 0 5px 6px;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    color: var(--review-ink);
    background: var(--review-soft);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.review-task-check {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1px solid var(--review-line);
    border-radius: 50%;
}

.review-session-dialog--conversation .review-session-chat-layout {
    width: min(600px, calc(100% - 40px));
    margin: 34px auto 0;
}

.review-session-dialog--conversation .review-transcript {
    padding: 0;
}

.atlas-mascot-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.review-atlas-messages {
    display: grid;
    gap: 12px;
    margin-left: 0;
    padding-top: 12px;
}

.review-opening-error {
    display: grid;
    max-width: 420px;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--review-line);
    border-radius: 10px;
    color: var(--review-muted);
    background: var(--review-soft);
    font-size: 13px;
    line-height: 1.45;
}

.review-opening-error strong { color: var(--review-ink); }

.review-retry-button {
    width: max-content;
    margin-top: 4px;
    padding: 7px 11px;
    border: 1px solid var(--review-line);
    border-radius: 7px;
    color: var(--review-ink);
    background: var(--review-paper);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.review-retry-button:hover,
.review-retry-button:focus-visible {
    border-color: var(--review-muted);
    outline: 0;
}

.review-atlas-messages .review-message {
    display: flex;
    max-width: 100%;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}

.review-atlas-messages .review-message-bubble {
    width: fit-content;
    max-width: 100%;
    padding: 11px 16px;
    border-radius: 0 14px 14px 0;
    font-size: 14px;
    line-height: 1.45;
}

.review-message-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin-top: 3px;
    place-items: center;
    border-radius: 8px;
    color: var(--review-ink);
    background: var(--review-soft);
    font-size: 13px;
    font-weight: 700;
}

.review-assistant-avatar {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    outline: 0;
    box-shadow: none;
    line-height: 0;
}

.review-assistant-avatar .atlas-mascot-image {
    width: 30px;
    height: 30px;
    overflow: visible;
}

.review-user-avatar {
    overflow: hidden;
    border: 1px solid var(--review-line);
    border-radius: 50%;
}

.review-user-avatar .avatar-art {
    display: block;
    width: 100%;
    height: 100%;
}

.review-message--user {
    justify-content: flex-end;
}

.review-atlas-messages .review-message:first-child .review-message-bubble {
    border-radius: 14px;
}

.review-atlas-messages .review-message--user .review-message-bubble {
    color: var(--review-ink);
    background: var(--review-soft);
}

.review-session-dialog--subject .review-session-body {
    display: flex;
    flex-direction: column;
}

.review-session-dialog--subject {
    height: min(700px, 100%);
}

.review-stage--subject {
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    flex: 1 1 auto;
    align-content: start;
    justify-items: stretch;
    padding: 32px;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
}

.review-stage--topics {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 16px;
    padding-top: 24px;
    /* The setup dialog fades its lower edge above the fixed progress controls.
       Keep enough scrollable clearance that the final topic row can be moved
       above that fade instead of becoming trapped beneath it. */
    padding-bottom: 112px;
}

.review-stage--topics .review-stage-content {
    width: 100%;
    grid-column: 1;
}

.review-stage--topics .review-stage-copy {
    max-width: none;
    grid-column: 1;
}

.review-stage--topics .review-stage-number {
    position: absolute;
    top: 24px;
    right: clamp(28px, 5vw, 54px);
    margin: 0;
}

.review-stage--topics .review-stage-copy > p:last-child {
    margin-top: 8px;
}

.review-stage--difficulty {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 16px;
    padding-top: 24px;
}

.review-stage--difficulty .review-stage-copy {
    max-width: none;
    grid-column: 1;
}

.review-stage--difficulty .review-stage-number {
    position: absolute;
    top: 24px;
    right: clamp(28px, 5vw, 54px);
    margin: 0;
}

.review-stage--difficulty .review-stage-copy > p:last-child {
    margin-top: 8px;
}

.review-stage--choice.review-stage--difficulty .review-stage-content {
    width: min(520px, 100%);
    grid-column: 1;
    justify-self: center;
}

.review-stage--difficulty .review-mode-options {
    gap: 10px;
}

.review-stage--difficulty .review-mode-card {
    overflow: hidden;
    padding-right: 100px;
}

.review-difficulty-atlas {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 78px;
    height: 78px;
    object-fit: contain;
    object-position: bottom right;
    pointer-events: none;
    transform: translateY(-50%);
}


.review-stage--subject .review-subject-grid {
    width: 100%;
    grid-column: 2;
    justify-self: end;
}

.review-stage--subject .review-stage-content,
.review-stage--choice .review-stage-content {
    grid-column: 2;
}

.review-stage--subject .review-level-section {
    grid-column: 2;
}

.review-stage--choice .review-mode-options {
    gap: 10px;
}

.review-stage--choice .review-mode-card {
    min-height: 92px;
}

.review-progress-track {
    display: flex;
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 2;
    width: min(300px, calc(100% - 48px));
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    transform: translateX(-50%);
    background: var(--review-paper);
}

.review-progress-node {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 2px solid var(--review-line);
    border-radius: 50%;
    color: var(--review-muted);
    background: var(--review-paper);
    font-size: 11px;
    font-weight: 700;
}

.review-progress-node.is-current,
.review-progress-node.is-complete {
    border-color: var(--review-accent);
    color: #ffffff;
    background: var(--review-accent);
}

.review-progress-connector {
    width: 76px;
    height: 2px;
    background: var(--review-line);
}

.review-progress-connector.is-complete {
    background: var(--review-accent);
}

.review-session-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--review-line);
    background: color-mix(in srgb, var(--review-accent) 3%, var(--review-paper));
}

.review-session-banner > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.review-session-banner span:first-child {
    color: var(--review-muted);
    font-size: 11px;
}

.review-session-banner strong {
    overflow: hidden;
    color: var(--review-ink);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-source-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--review-line);
    border-radius: 8px;
    color: var(--review-muted);
    background: var(--review-paper);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.review-source-chip .review-icon { width: 14px; height: 14px; }
.review-source-chip.has-modules { color: #237052; }

.review-session-chat-layout {
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
}

.review-session-chat-layout:has(.review-objectives-drawer) {
    grid-template-columns: minmax(0, 1fr) minmax(238px, 290px);
}

.review-transcript {
    min-height: 0;
    overflow: auto;
    padding: 25px clamp(20px, 5vw, 64px);
}

.review-message {
    display: flex;
    max-width: 760px;
    align-items: flex-start;
    gap: 9px;
    margin: 0 auto 12px;
}

.review-message--user {
    justify-content: flex-end;
}

.review-message-bubble {
    max-width: min(620px, 83%);
    padding: 11px 13px;
    border-radius: 10px;
    color: var(--review-ink);
    background: var(--review-soft);
    font-size: 14px;
    line-height: 1.5;
}

.review-message--user .review-message-bubble {
    color: #ffffff;
    background: #343842;
}

.review-message-bubble.is-thinking {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--review-muted);
}

.review-thinking-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--review-accent);
    animation: review-pulse 1.1s ease-in-out infinite;
}

.review-syllabus-citation {
    display: inline-block;
    margin: 2px 0;
    padding: 2px 5px;
    border-radius: 6px;
    color: var(--review-accent);
    background: var(--review-accent-soft);
    font-size: 11px;
    font-weight: 600;
}

.review-objectives-drawer {
    min-height: 0;
    overflow: auto;
    padding: 17px;
    border-left: 1px solid var(--review-line);
    background: var(--review-soft);
}

.review-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.review-drawer-header > div {
    display: grid;
    gap: 3px;
}

.review-drawer-header strong {
    color: var(--review-ink);
    font-size: 14px;
    font-weight: 700;
}

.review-drawer-header span {
    color: var(--review-muted);
    font-size: 11px;
}

.review-drawer-header button {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--review-muted);
    background: transparent;
    cursor: pointer;
}

.review-drawer-header button:hover,
.review-drawer-header button:focus-visible {
    outline: 0;
    color: var(--review-ink);
    background: var(--review-paper);
}

.review-drawer-list {
    margin-top: 13px;
}

.review-drawer-list li {
    grid-template-columns: 44px minmax(0, 1fr);
}

.review-drawer-list p { font-size: 12px; }

.review-composer-wrap {
    padding: 11px 22px 13px;
    border-top: 1px solid var(--review-line);
    background: var(--review-paper);
}

.review-prompt-row {
    display: flex;
    gap: 6px;
    margin-bottom: 9px;
    overflow-x: auto;
}

.review-prompt-row button {
    flex: 0 0 auto;
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid var(--review-line);
    border-radius: 8px;
    color: var(--review-muted);
    background: var(--review-soft);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.review-prompt-row button:hover,
.review-prompt-row button:focus-visible {
    outline: 0;
    border-color: color-mix(in srgb, var(--review-accent) 52%, var(--review-line));
    color: var(--review-ink);
}

.review-composer {
    display: flex;
    min-height: 52px;
    align-items: end;
    gap: 7px;
    padding: 6px;
    border: 1px solid var(--review-line);
    border-radius: 10px;
    background: var(--review-soft);
}

.review-composer textarea {
    min-height: 37px;
    max-height: 128px;
    flex: 1 1 auto;
    resize: vertical;
    padding: 8px 7px;
    border: 0;
    outline: 0;
    color: var(--review-ink);
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
}

.review-composer textarea::placeholder { color: var(--review-muted); }

.review-composer-tool,
.review-send-button {
    display: grid;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.review-composer-tool {
    color: var(--review-muted);
    background: transparent;
}

.review-composer-tool:hover,
.review-composer-tool:focus-visible {
    outline: 0;
    color: var(--review-accent);
    background: var(--review-paper);
}

.review-send-button {
    color: #ffffff;
    background: #343842;
}

.review-send-button:hover:not(:disabled),
.review-send-button:focus-visible {
    outline: 0;
    background: #17191e;
}

.review-composer-tool:disabled,
.review-send-button:disabled {
    cursor: wait;
    opacity: .55;
}

.review-send-button .review-icon,
.review-composer-tool .review-icon {
    width: 18px;
    height: 18px;
}

.review-chat-status {
    min-height: 16px;
    margin: 7px 2px 0;
    color: var(--review-muted);
    font-size: 11px;
    line-height: 1.3;
}

.review-empty-state {
    margin: 18px 0;
    color: var(--review-muted);
    font-size: 13px;
}

@keyframes review-pulse {
    0%, 100% { opacity: .38; transform: scale(.84); }
    50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 820px) {
    .review-session-layer { padding: 14px; }
    .review-session-dialog {
        width: 100%;
        height: min(700px, 100%);
        max-height: calc(100dvh - 28px);
        border-radius: 10px;
    }
    .review-setup-actions { right: 14px; bottom: 14px; }
    .review-progress-track { bottom: 14px; }
    .review-session-header {
        min-height: 54px;
        padding: 8px 11px;
        grid-template-columns: auto 1fr auto;
        gap: 7px;
    }
    .review-header-action,
    .review-end-button { padding-inline: 5px; }
    .review-header-action span,
    .review-objectives-link span { display: none; }
    .review-header-center { justify-content: center; }
    .review-stage {
        min-height: 0;
        padding: 28px 20px;
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .review-stage--topics { padding-top: 32px; }
    .review-stage-copy { max-width: 440px; }
    .review-stage h1 { font-size: 28px; }
    .review-session-footer { min-height: 62px; padding: 10px 14px; }
    .review-footer-message { display: none; }
    .review-footer-actions { width: 100%; }
    .review-primary-button { min-width: 104px; margin-left: auto; }
    .review-session-dialog--conversation { min-height: calc(100dvh - 54px); }
    .review-session-banner { padding: 10px 14px; }
    .review-source-chip { max-width: 168px; overflow: hidden; text-overflow: ellipsis; }
    .review-session-chat-layout:has(.review-objectives-drawer) { grid-template-columns: minmax(0, 1fr); }
    .review-objectives-drawer {
        position: absolute;
        z-index: 2;
        top: 105px;
        right: 0;
        bottom: 0;
        width: min(330px, calc(100% - 24px));
        border-left: 1px solid var(--review-line);
        box-shadow: -4px 0 8px rgb(0 0 0 / 10%);
    }
    .review-transcript { padding: 20px 14px; }
    .review-composer-wrap { padding: 9px 12px 10px; }
}

@media (max-width: 520px) {
    .review-progress-label { font-size: 11px; }
    .review-end-button { font-size: 12px; }
    .review-stage--format { grid-template-columns: 1fr; }
    .review-stage--format .review-stage-content { grid-column: 1; }
    .review-subject-grid,
    .review-option-grid--two { grid-template-columns: 1fr; }
    .review-stage--subject {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .review-stage--subject .review-subject-grid {
        width: min(360px, 100%);
        grid-column: 1;
        justify-self: center;
    }
    .review-option-grid--three { grid-template-columns: 1fr; }
    .review-option-grid--three .review-choice-card { min-height: 58px; }
    .review-topic-toolbar { align-items: stretch; flex-direction: column; }
    .review-selection-count { text-align: right; }
    .review-objective-summary { align-items: flex-start; flex-direction: column; }
    .review-session-banner strong { max-width: 205px; }
    .review-source-chip { display: none; }
    .review-message-bubble { max-width: 89%; }
    .review-prompt-row { padding-bottom: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .review-thinking-dot { animation: none; }
    .review-topic-group.is-expanded .review-topic-summary .review-icon { transform: none; }
    .review-session-dialog--transition-forward .review-session-body,
    .review-session-dialog--transition-backward .review-session-body { animation: none; }
}

/* The transcript owns the full-width scrollport. Reserve a fixed notes rail
   inside it so notes never reflow the message column as objectives change. */
.review-session-dialog--conversation {
    --review-notes-rail: 268px;
    grid-template-rows: minmax(0, 1fr) auto;
}

.review-session-dialog--conversation .review-session-chat-layout {
    position: relative;
    width: 100%;
    margin: 0;
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
    align-content: stretch;
}

.review-session-chat-layout > .review-transcript {
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    padding: 20px var(--review-notes-rail) 24px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    scroll-padding-block: 24px;
}

.review-atlas-thread {
    width: min(100%, 760px);
    margin-inline: auto;
}

.review-atlas-messages .review-message-bubble {
    min-width: 0;
    max-width: calc(100% - 38px);
    overflow-wrap: anywhere;
}

.review-atlas-messages .review-message--continuation {
    padding-left: 38px;
}

.review-atlas-messages .review-message--continuation .review-message-bubble {
    max-width: 100%;
}

#reviewQuickComposerSlot {
    min-width: 0;
}

.review-session-dialog--conversation #reviewQuickComposerSlot .composer-wrap {
    position: relative;
    inset: auto;
    padding: 8px var(--review-notes-rail) 12px 24px;
    background: var(--review-paper);
}

.review-session-dialog--conversation #reviewQuickComposerSlot .composer {
    width: min(100%, 760px);
}

.review-objectives-note.progress-card {
    --progress-note-surface: #fffdf8;
    --progress-note-line: #e3dfd2;
    --text: #2b2d31;
    --muted: #73736f;
    --border: #dedbd3;
    --surface: #fffdf8;
    --surface-soft: #f5f3ed;
    --note-ink: var(--text);
    --note-muted: var(--muted);
    --note-line: var(--progress-note-line);
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    box-sizing: border-box;
    width: 220px;
    max-width: 100%;
    max-height: min(420px, 55vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--note-ink);
    background: var(--progress-note-surface);
    isolation: isolate;
    filter: drop-shadow(0 2px 3px rgb(15 23 42 / 16%));
    transition: transform 160ms ease;
    scrollbar-color: #c7c5bd transparent;
    scrollbar-width: thin;
}

.review-objectives-note.progress-card:hover {
    transform: translateY(calc(-50% - 2px));
}

[data-theme="dark"] .review-objectives-note.progress-card {
    --progress-note-surface: #2b2d31;
    --progress-note-line: #4b4e55;
    --text: #f3f1ea;
    --muted: #b4b3ad;
    --border: #4b4d52;
    --surface: #2b2d31;
    --surface-soft: #34363b;
    border-color: #4b4d52;
    color: #f3f1ea;
    background: #2b2d31;
    filter: drop-shadow(0 2px 3px rgb(0 0 0 / 24%));
}

[data-theme="dark"] .review-objectives-note .review-note-paper {
    color: #f3f1ea;
    background: #2b2d31;
    scrollbar-color: #f3f1ea transparent;
}

[data-theme="dark"] .review-objectives-note .review-objective-note-item,
[data-theme="dark"] .review-objectives-note .review-note-writing {
    color: #f3f1ea;
}

[data-theme="dark"] .review-objectives-note .review-objective-note-copy {
    border-color: #f3f1ea;
}

[data-theme="dark"] .review-objectives-note .review-objective-note-check {
    border-color: #f3f1ea;
    color: #f3f1ea;
    background: #2b2d31;
}

[data-theme="dark"] .review-assistant-avatar {
    border: 0;
    background: transparent;
}

.review-objectives-note .progress-card-windowbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 14px 10px 16px;
    color: #1e232b;
    background: #ffd21f;
    border-radius: 0;
}

.review-objectives-note .progress-card-windowbar h2 {
    margin: 0;
    color: #1e232b;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
}

.review-objectives-note .progress-card-window-tools {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.review-objectives-note .progress-card-window-tools i {
    display: block;
    width: 6px;
    height: 6px;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: 50%;
}

[data-theme="dark"] .review-objectives-note .progress-card-windowbar,
[data-theme="dark"] .review-objectives-note .progress-card-windowbar h2 {
    color: #1e232b;
}

.review-note-paper {
    position: relative;
    flex: 0 1 auto;
    min-height: 220px;
    max-height: calc(min(420px, 55vh) - 42px);
    overflow-y: auto;
    scrollbar-color: #1e232b transparent;
    scrollbar-width: thin;
    padding: 16px 18px 18px;
    color: #1e232b;
    background: #fff;
}

.review-objective-note-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.review-objective-note-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 0 0;
    color: #1e232b;
    animation: review-note-item-in 420ms cubic-bezier(.2, .75, .25, 1) both;
}

.review-objective-note-check {
    display: grid;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    place-items: center;
    margin-top: 2px;
    border: 1.5px solid #1e232b;
    border-radius: 50%;
    color: #1e232b;
    background: #fff;
}

.review-objective-note-check .review-icon {
    width: 11px;
    height: 11px;
    opacity: 0;
    transform: scale(.55);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(.2, .8, .25, 1);
}

.review-objective-note-item.is-answered .review-objective-note-check {
    border-color: #1e232b;
    background: #fff;
}

.review-objective-note-item.is-answered .review-objective-note-check .review-icon {
    opacity: 1;
    transform: scale(1);
}

.review-objective-note-copy {
    display: grid;
    min-width: 0;
    gap: 0;
    width: fit-content;
    max-width: 100%;
    padding-bottom: 11px;
    border-bottom: 1px solid #1e232b;
}

.review-objective-note-item:last-child .review-objective-note-copy {
    border-bottom: 0;
}

.review-note-writing {
    display: inline;
    color: #1e232b;
    font-size: 12.5px;
    line-height: 1.52;
    text-decoration-thickness: 1px;
    text-decoration-color: currentColor;
    transition: color 260ms ease;
}

.review-objective-note-item.is-answered .review-note-writing {
    color: #1e232b;
    text-decoration-line: line-through;
}

@keyframes review-note-item-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .review-session-dialog--conversation {
        --review-notes-rail: 24px;
    }

    .review-session-dialog--conversation .review-session-chat-layout {
        grid-template-rows: auto minmax(0, 1fr);
        row-gap: 8px;
    }

    .review-session-chat-layout > .review-objectives-note.progress-card {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        grid-column: 1;
        grid-row: 1;
        justify-self: end;
        width: min(220px, calc(100% - 48px));
        max-height: min(160px, 24dvh);
        margin: 12px 24px 0;
    }

    .review-objectives-note .review-note-paper {
        min-height: 0;
    }

    .review-session-chat-layout > .review-transcript {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 520px) {
    .review-session-dialog--conversation {
        --review-notes-rail: 14px;
    }

    .review-session-chat-layout > .review-transcript,
    .review-session-dialog--conversation #reviewQuickComposerSlot .composer-wrap {
        padding-left: 14px;
    }

    .review-session-chat-layout > .review-objectives-note.progress-card {
        margin-right: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .review-objectives-note.progress-card { transition: none; }
    .review-objective-note-item { animation: none; }
    .review-objective-note-check .review-icon,
    .review-note-writing { transition: none; }
}
