@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');


:root {
    font-family: 'DM Sans', sans-serif;
    color: #202638;
    background: #f5f6fa;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;

    --green: #5558db;
    --green-dark: #4144b8;
    --green-light: #eeefff;
    --muted: #747b90;
    --border: #e5e7f0;
    --paper: #ffffff;
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

button,
textarea {
    font: inherit;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #9ab9a5;
    outline-offset: 3px;
}

/* =========================
   Navigation
========================= */

.topbar {
    height: 76px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--green);
    color: white;
    font-weight: 700;
    border-radius: 11px;
    font-size: 14px;
    letter-spacing: -1px;
}

.brand-mark span,
.brand-name span {
    color: #b7cdb6;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.prototype-label,
.eyebrow,
.tag,
.text-number {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.prototype-label {
    color: var(--green);
    background: var(--green-light);
    padding: 9px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
}

/* =========================
   Main page layout
========================= */

.layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 7% 50px;
    display: grid;
    grid-template-columns: 0.76fr 1.24fr;
    gap: 76px;
    align-items: start;
}

.intro {
    position: sticky;
    top: 40px;
    padding-top: 20px;
}

.eyebrow {
    color: #6d8275;
    margin: 0 0 14px;
}

.intro h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(42px, 4.5vw, 63px);
    line-height: 1.08;
    letter-spacing: -1.9px;
    font-weight: 600;
    margin: 0 0 23px;
}

.intro-text {
    max-width: 360px;
    font-size: 15px;
    line-height: 1.9;
    color: #69736d;
}

.progress-area {
    margin-top: 56px;
    max-width: 320px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #66736b;
    margin-bottom: 12px;
}

.progress-track {
    height: 4px;
    background: #e3e6df;
    overflow: hidden;
    border-radius: 10px;
}

.progress-fill {
    height: 100%;
    width: 33.333%;
    background: var(--green);
    transition: width 250ms ease;
}

.workspace {
    min-width: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 23px;
}

.section-heading .eyebrow {
    margin-bottom: 7px;
}

.section-heading h2,
.activity-heading h2 {
    font-size: 19px;
    letter-spacing: -0.5px;
    margin: 0;
    font-weight: 600;
}

.reading-time {
    font-size: 11px;
    color: #65736b;
    white-space: nowrap;
}

/* =========================
   Reading card
========================= */

.reading-card,
.activity-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 5px 24px rgba(40, 55, 40, 0.025);
}

.reading-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 23px;
}

.tag {
    background: #f0f3ec;
    color: #506b57;
    padding: 7px 9px;
    border-radius: 3px;
    font-size: 9px;
}

.text-number {
    color: #a1a69e;
    font-size: 9px;
}

.reading-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 25px;
    font-weight: 600;
    margin: 0 0 15px;
}

.passage {
    font-family: 'Playfair Display', Georgia, serif;
    color: #4d5851;
    font-size: 17px;
    line-height: 2.15;
    margin: 0;
}

.connector {
    display: inline;
    padding: 1px 4px;
    border: 0;
    border-bottom: 2px solid #a0bba3;
    background: #edf3eb;
    color: #285747;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    transition: background 150ms ease;
}

.connector:hover,
.connector.selected {
    background: #d4e6d5;
    border-bottom-color: var(--green);
}

.reading-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-top: 20px;
    margin-top: 23px;
    border-top: 1px solid #edf0e9;
    color: #7a837b;
    font-size: 11px;
    line-height: 1.7;
}

.note-icon {
    display: grid;
    place-items: center;
    flex: 0 0 17px;
    height: 17px;
    border: 1px solid #a8b4a8;
    border-radius: 50%;
    font-size: 10px;
}

/* =========================
   Exercise card
========================= */

.activity-card {
    margin-top: 22px;
}

.activity-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 22px;
}

.step-badge {
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--green);
    background: var(--green-light);
    font-weight: 700;
    font-size: 13px;
}

.activity-heading .eyebrow {
    margin-bottom: 5px;
    font-size: 9px;
}

.question-text {
    font-size: 13px;
    line-height: 1.85;
    color: #68726b;
    margin: 0 0 18px;
}

.answer-list {
    display: grid;
    gap: 10px;
}

.answer-option {
    width: 100%;
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr) 16px;
    gap: 11px;
    align-items: center;
    text-align: left;
    padding: 13px 12px;
    border: 1px solid #e3e7df;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    color: #4e5951;
    font-size: 12px;
    line-height: 1.65;
    transition: border-color 150ms ease, background 150ms ease;
}

.answer-option:hover {
    border-color: #9eb6a1;
    background: #fafcf9;
}

.answer-option.selected {
    border-color: #4d8065;
    background: #f1f6ef;
}

.answer-option.correct {
    border-color: #57906c;
    background: #eff7ef;
}

.answer-option.incorrect {
    border-color: #cb927e;
    background: #fff7f3;
}

.answer-letter {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    background: #f1f2ed;
    border-radius: 6px;
    font-weight: 700;
    color: #69766c;
}

.answer-radio {
    width: 14px;
    height: 14px;
    border: 1px solid #cbd2c8;
    border-radius: 50%;
}

.answer-option.selected .answer-radio {
    border: 4px solid var(--green);
}

.justification {
    margin-top: 23px;
}

.justification label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 7px;
}

.field-hint {
    color: #7a837b;
    font-size: 11px;
    line-height: 1.7;
    margin: 0 0 12px;
}

textarea {
    display: block;
    width: 100%;
    min-width: 0;
    resize: vertical;
    min-height: 105px;
    padding: 13px;
    border: 1px solid #dfe4dc;
    border-radius: 7px;
    color: #27362c;
    background: #fcfdfb;
    font-size: 13px;
    line-height: 1.7;
}

textarea::placeholder {
    color: #a0a79f;
}

.character-count {
    text-align: right;
    margin: 6px 0 0;
}

/* =========================
   Inline feedback / prompt
========================= */

/* Default style for feedback displayed inside the exercise */
.feedback {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    background: #f1f5ef;
    border: 1px solid #dce8d9;
    color: #355343;
    font-size: 12px;
    line-height: 1.8;
}

.feedback h3 {
    margin: 0 0 6px;
    font-size: 13px;
}

.feedback p {
    margin: 5px 0;
}

/* Keep the initial prompt in the normal page flow */
#feedback.prompt-mode {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    width: 100%;
    padding: 16px;
    background: #f1f5ef;
    border: 1px solid #dce8d9;
    backdrop-filter: none;
    overflow: visible;
}

#feedback.prompt-mode[hidden],
#feedback.modal-mode[hidden] {
    display: none !important;
}

/* =========================
   Exercise buttons and footer
========================= */

.activity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 17px;
    align-items: center;
    margin-top: 22px;
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 16px;
    border: 0;
    border-radius: 7px;
    background: var(--green);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 150ms ease;
}

.primary-button:hover:not(:disabled) {
    background: var(--green-dark);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.primary-button span {
    font-size: 17px;
}

.text-button {
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #7a837b;
    font-size: 11px;
    cursor: pointer;
}

.text-button:hover {
    color: var(--green);
}

.page-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    color: #919990;
    font-size: 10px;
    line-height: 1.8;
    margin-top: 28px;
}

[hidden] {
    display: none !important;
}

/* =========================
   Pedagogical feedback modal
========================= */

#feedback.modal-mode {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 24px;
    background: rgba(18, 31, 26, 0.68);
    border: 0;
    border-radius: 0;
    color: #263b31;
    font-size: 15px;
    line-height: 1.7;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.feedback-dialog {
    display: flex;
    flex-direction: column;
    width: min(860px, 100%);
    min-width: 0;
    max-width: 100%;
    max-height: min(86vh, 820px);
    margin: auto;
    background: #fbfaf5;
    color: #263b31;
    border: 1px solid #d9dfd5;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: feedback-appear 180ms ease-out;
}

.feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 30px;
    border-bottom: 1px solid #e3e7de;
    background: #f2f4ec;
}

.feedback-header>div {
    flex: 1 1 auto;
    min-width: 0;
}

.feedback-eyebrow {
    margin: 0 0 5px;
    color: #6c7f70;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.feedback-header h2 {
    margin: 0;
    font-size: clamp(21px, 3vw, 29px);
    line-height: 1.25;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.feedback-close {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d8dfd5;
    border-radius: 50%;
    background: #ffffff;
    color: #344c3d;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.feedback-close:hover {
    background: #e8eee4;
    transform: rotate(5deg);
}

.feedback-body {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    padding: 26px 30px 30px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.feedback-intro {
    width: 100%;
    min-width: 0;
    margin: 0 0 22px;
    padding: 15px 18px;
    background: #eef1e8;
    border-left: 4px solid #718a70;
    border-radius: 0 10px 10px 0;
}

.feedback-intro-label {
    display: block;
    margin-bottom: 7px;
    color: #617762;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.feedback-intro p {
    margin: 0;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Each teaching section fills the available width */
.feedback-section {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 20px;
    padding: 20px 22px;
    border: 1px solid #e0e4dc;
    border-radius: 12px;
    background: #ffffff;
    overflow-wrap: anywhere;
}

.feedback-section h3 {
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 12px;
    color: #345744;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
}

/* Number: fixed-width column */
.feedback-section h3>span:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    min-width: 0;
    height: 29px;
    margin: 0;
    padding: 0;
    border-radius: 9px;
    background: #edf2e9;
    color: #46684e;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

/* Heading: expands into the remaining width */
.feedback-section h3>span:last-child {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Section text: full width beneath the heading */
.feedback-section>p {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: #263b31;
    font-size: 15px;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}

.feedback-section.question {
    border-color: #b9cbb3;
    background: #f0f4eb;
}

.feedback-section.question h3 {
    color: #2d5039;
}

.feedback-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    padding: 16px 30px;
    border-top: 1px solid #e3e7de;
    background: #f7f7f1;
}

.feedback-done {
    padding: 11px 22px;
    border: 0;
    border-radius: 9px;
    background: #345744;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.feedback-done:hover {
    background: #263f31;
}

body.feedback-open {
    overflow: hidden;
}

@keyframes feedback-appear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   Responsive layouts
========================= */

@media (max-width: 950px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-top: 35px;
    }

    .intro {
        position: static;
        padding-top: 0;
    }

    .intro h1 br {
        display: none;
    }

    .intro h1 {
        font-size: 46px;
    }

    .progress-area {
        margin-top: 25px;
    }

    .intro-text {
        max-width: 550px;
    }
}

@media (max-width: 600px) {
    .feedback.modal-mode {
        padding: 10px;
    }

    .feedback-dialog {
        max-height: 92dvh;
        border-radius: 14px;
    }

    .feedback-header {
        padding: 18px;
    }

    .feedback-body {
        padding: 18px;
    }

    .feedback-section {
        padding: 16px;
    }

    .feedback-section h3 {
        column-gap: 10px;
        font-size: 15px;
    }

    .feedback-section>p {
        font-size: 14px;
        line-height: 1.8;
    }

    .feedback-footer {
        padding: 14px 18px;
    }
}

@media (max-width: 540px) {
    .topbar {
        padding: 0 5%;
        height: 66px;
    }

    .brand-name {
        font-size: 14px;
    }

    .prototype-label {
        font-size: 8px;
        padding: 8px;
        letter-spacing: 0.5px;
    }

    .layout {
        padding: 32px 5% 30px;
    }

    .intro h1 {
        font-size: 42px;
    }

    .reading-card,
    .activity-card {
        padding: 20px 17px;
    }

    .reading-card h3 {
        font-size: 23px;
    }

    .passage {
        font-size: 16px;
        line-height: 2;
    }

    .section-heading h2,
    .activity-heading h2 {
        font-size: 17px;
    }

    .answer-option {
        grid-template-columns: 27px minmax(0, 1fr) 14px;
        gap: 8px;
        font-size: 11px;
    }

    .page-footer {
        flex-direction: column;
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feedback-dialog {
        animation: none;
    }
}


/* Project identity */
.project-identity {
    margin-top: 34px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color, #dedbd3);
    border-bottom: 1px solid var(--border-color, #dedbd3);
}

.identity-label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--muted, #77736d);
}

.identity-title {
    margin: 0 0 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 600;
}

.identity-detail {
    margin: 5px 0;
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--muted, #77736d);
}

.identity-divider {
    width: 38px;
    height: 1px;
    margin: 16px 0;
    background: var(--border-color, #dedbd3);
}

.identity-name {
    margin: 3px 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 760px) {
    .project-identity {
        margin-top: 24px;
        padding: 16px 0;
    }
}


/* Evaluation phases and results */

.phase-banner {
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #dedbd3);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.evaluation-results {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid var(--border-color, #dedbd3);
    border-radius: 12px;
}

.evaluation-results h2 {
    margin-top: 0;
}

.evaluation-results table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    text-align: left;
}

.evaluation-results th,
.evaluation-results td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color, #dedbd3);
    vertical-align: top;
}

.evaluation-results button {
    margin: 8px 8px 0 0;
}


/* AI-native visual refinement */

body {
    background:
        radial-gradient(ellipse at 85% 0%,
            rgba(99, 102, 241, 0.07),
            transparent 36rem),
        #f5f6fa;
}

.topbar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
}

.brand-mark {
    border-radius: 12px;
    background: linear-gradient(145deg, #6865f2, #4144b8);
    box-shadow: 0 4px 12px rgba(85, 88, 219, 0.2);
}

.prototype-label {
    border: 1px solid #dedfff;
    border-radius: 999px;
}

.reading-card,
.activity-card {
    border-color: #e6e8f1;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(36, 42, 74, 0.035);
}

.phase-banner {
    color: #4d50c9;
    background: linear-gradient(90deg, #eeefff, #f8f8ff);
    border-color: #dedfff;
    border-radius: 9px;
}

.answer-option {
    border-radius: 11px;
    padding: 15px 13px;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.answer-option:hover {
    border-color: #a9aaf5;
    background: #fafaff;
}

.answer-option.selected {
    border-color: #6865e8;
    background: #f1f1ff;
    box-shadow: 0 0 0 2px rgba(104, 101, 232, 0.08);
}

.primary-button {
    border-radius: 10px;
    background: linear-gradient(135deg, #6264e8, #494bc5);
    box-shadow: 0 4px 12px rgba(85, 88, 219, 0.15);
}

.primary-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #5355d5, #3e40ad);
}

.feedback-dialog {
    border-color: #e0e2f0;
    box-shadow: 0 30px 100px rgba(24, 28, 62, 0.28);
}

.feedback-header {
    background: linear-gradient(110deg, #f0f0ff, #f8f8fc);
}

.feedback-section h3 {
    color: #4d50c9;
}

.feedback-section.question {
    border-color: #d5d5ff;
    background: #f5f5ff;
}

.feedback-done {
    background: #5558db;
}

.feedback-done:hover {
    background: #4144b8;
}

@media (prefers-reduced-motion: no-preference) {
    .answer-option:hover {
        transform: translateY(-1px);
    }
}


/* =========================================
   DUOLINGO-INSPIRED LEARNING EXPERIENCE
   Friendly, motivating, university-appropriate
========================================= */

:root {
    --green: #58a832;
    --green-dark: #438525;
    --green-light: #edf7e8;
    --muted: #747d75;
    --border: #e3e9df;
    --paper: #ffffff;

    --learning-green: #58cc02;
    --learning-green-dark: #46a302;
    --learning-green-light: #effbe7;
    --learning-ink: #26352b;
    --learning-muted: #68766b;
    --learning-border: #dce7d7;
}

/* Page and keyboard focus */

body {
    color: var(--learning-ink);
    background: #f7f9f4;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #8bcf66;
    outline-offset: 3px;
}

/* Header */

.topbar {
    background: #ffffff;
    border-bottom: 2px solid #e8eee4;
    backdrop-filter: none;
}

.brand-mark {
    background: var(--learning-green);
    border-radius: 13px;
    box-shadow: 0 3px 0 #3b9200;
}

.brand-mark span,
.brand-name span {
    color: #d8f5c5;
}

.prototype-label {
    color: #477e2b;
    background: #f0f8e9;
    border: 1px solid #dcebd1;
    border-radius: 999px;
}

/* Main heading */

.eyebrow {
    color: #54843b;
}

.intro h1 {
    color: #28392b;
}

.intro-text {
    color: #657365;
}

/* Overall journey progress */

.progress-area {
    max-width: 360px;
}

.progress-label {
    color: #617060;
    font-size: 12px;
    font-weight: 600;
}

.progress-track {
    height: 10px;
    background: #e6eddf;
    border-radius: 999px;
}

.progress-fill {
    background: var(--learning-green);
    border-radius: 999px;
    transition: width 350ms ease;
}

/* Workspace headings */

.section-heading h2,
.activity-heading h2 {
    color: #293b2d;
}

.reading-time {
    padding: 7px 10px;
    background: #edf5e8;
    color: #507e3b;
    border-radius: 999px;
    font-weight: 600;
}

/* Reading passage */

.reading-card,
.activity-card {
    border: 2px solid #e4ebdf;
    border-radius: 19px;
    box-shadow: 0 3px 0 #e4ebdf;
}

.reading-card {
    padding: 29px;
}

.tag {
    color: #507d3c;
    background: #eef7e8;
    border-radius: 6px;
}

.reading-card h3 {
    color: #2d4030;
}

.passage {
    color: #46564a;
}

.connector {
    color: #427f2c;
    background: #edf8e6;
    border-bottom-color: #91ca73;
    border-radius: 5px;
}

.connector:hover,
.connector.selected {
    background: #d9f3c9;
    border-bottom-color: var(--learning-green-dark);
}

.reading-note {
    border-top-color: #e8eee4;
    color: #738072;
}

.note-icon {
    color: #4f8a35;
    border-color: #91ba7b;
}

/* Exercise panel */

.activity-card {
    padding: 28px;
    background: #ffffff;
}

.phase-banner {
    margin-bottom: 18px;
    padding: 11px 14px;
    color: #477c2e;
    background: #f0f8e9;
    border: 1px solid #deedcf;
    border-radius: 9px;
    font-size: 11px;
    letter-spacing: 0.08em;
}

/* New phase-specific lesson progress */

.lesson-progress {
    margin: 0 0 26px;
}

.lesson-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: #697768;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

#lesson-step-label {
    color: #4e7d38;
}

#lesson-step-count {
    color: #697768;
    white-space: nowrap;
}

.lesson-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    background: #e9efe5;
    border: 1px solid #e1e9db;
    border-radius: 999px;
}

#lesson-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--learning-green);
    border-radius: 999px;
    transition: width 350ms ease;
}

/* Activity heading */

.activity-heading {
    gap: 14px;
}

.step-badge {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    color: #4b8b2b;
    background: #eff9e8;
    border: 1px solid #dfefcf;
    border-radius: 13px;
    font-size: 14px;
}

.activity-heading .eyebrow {
    color: #65924f;
}

/* Question text */

.question-text {
    color: #566658;
    font-size: 14px;
    line-height: 1.85;
}

/* Answer cards */

.answer-list {
    gap: 12px;
}

.answer-option {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    gap: 12px;
    min-height: 66px;
    padding: 15px;
    color: #354638;
    background: #ffffff;
    border: 2px solid #e1e9dc;
    border-radius: 14px;
    box-shadow: 0 2px 0 #e9eee5;
    font-size: 13px;
    line-height: 1.7;
}

.answer-option:hover:not(:disabled) {
    background: #f8fcf5;
    border-color: #a7d68e;
    box-shadow: 0 3px 0 #e1edd8;
    transform: translateY(-1px);
}

.answer-letter {
    width: 34px;
    height: 34px;
    color: #5c7059;
    background: #f0f4ed;
    border: 1px solid #e2e9dd;
    border-radius: 10px;
    font-size: 13px;
    transition: background 150ms ease, color 150ms ease;
}

.answer-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd7c6;
    background: #ffffff;
}

.answer-option.selected {
    color: #31552a;
    background: #f1fbe9;
    border-color: #77c94c;
    box-shadow: 0 3px 0 #d9efca;
}

.answer-option.selected .answer-letter {
    color: #ffffff;
    background: #58b52a;
    border-color: #58b52a;
}

.answer-option.selected .answer-radio {
    border: 5px solid var(--learning-green);
}

.answer-option:disabled {
    cursor: default;
    opacity: 1;
}

.answer-option.correct {
    background: #effbe8;
    border-color: #70c447;
}

.answer-option.incorrect {
    background: #fff3ef;
    border-color: #e5a08c;
}

/* Justification area */

.justification {
    margin-top: 25px;
}

.justification label {
    color: #344735;
    font-size: 14px;
}

.field-hint {
    color: #718071;
    font-size: 12px;
}

textarea {
    min-height: 115px;
    padding: 15px;
    color: #304333;
    background: #fbfdf9;
    border: 2px solid #e0e9da;
    border-radius: 12px;
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea:focus {
    border-color: #80c95b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.12);
}

textarea::placeholder {
    color: #98a397;
}

/* Inline feedback */

.feedback,
#feedback.prompt-mode {
    color: #40583a;
    background: #f2f9ed;
    border: 1px solid #dcebd2;
    border-radius: 13px;
    line-height: 1.8;
}

.feedback h3 {
    color: #3d7529;
}

/* Main action buttons */

.activity-actions {
    gap: 14px;
    margin-top: 27px;
}

.primary-button {
    min-height: 50px;
    padding: 14px 19px;
    color: #ffffff;
    background: var(--learning-green);
    border-radius: 13px;
    box-shadow: 0 4px 0 #43a000;
    font-size: 13px;
    font-weight: 700;
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.primary-button:hover:not(:disabled) {
    background: #50b900;
    box-shadow: 0 5px 0 #3b9000;
    transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
    box-shadow: 0 1px 0 #3b9000;
    transform: translateY(2px);
}

.primary-button:disabled {
    color: #7d8878;
    background: #e6ece1;
    box-shadow: 0 3px 0 #d8e1d1;
    opacity: 1;
}

.text-button {
    color: #748171;
    font-weight: 600;
}

.text-button:hover {
    color: #477d2d;
}

/* Transfer phase */

.transfer-area {
    margin-top: 22px;
}

.transfer-passage {
    margin: 18px 0;
    padding: 18px 20px;
    background: #f4f9ef;
    border: 1px solid #dcebd2;
    border-left: 5px solid var(--learning-green);
    border-radius: 12px;
}

.transfer-passage p {
    margin: 0;
    color: #3d523f;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    line-height: 1.9;
}

.transfer-passage strong {
    color: #438526;
}

#transfer-check-button {
    margin-top: 20px;
}

.transfer-result {
    margin-top: 20px;
    padding: 18px;
    color: #40563d;
    background: #f1f9ec;
    border: 1px solid #dcebd2;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.8;
}

.transfer-result h3 {
    margin-top: 0;
    color: #3f782a;
}

.transfer-result p:last-child {
    margin-bottom: 0;
}

/* Project identity */

.project-identity {
    border-color: #e0e8db;
}

.identity-label {
    color: #638056;
}

.identity-title {
    color: #304532;
}

.identity-divider {
    background: #dce6d6;
}

/* Results panel */

.evaluation-results {
    padding: 23px;
    background: #ffffff;
    border: 2px solid #e2eadc;
    border-radius: 16px;
}

.evaluation-results h2 {
    color: #2e432f;
}

.evaluation-results p {
    color: #657365;
    font-size: 13px;
    line-height: 1.8;
}

.evaluation-results table {
    font-size: 12px;
    line-height: 1.6;
}

.evaluation-results th {
    color: #477536;
    background: #f2f8ed;
}

.evaluation-results th,
.evaluation-results td {
    padding: 12px 10px;
    border-bottom-color: #e5ecdf;
}

.evaluation-results button {
    padding: 11px 14px;
    color: #46762f;
    background: #f2f8ed;
    border: 1px solid #dbe9d1;
    border-radius: 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.evaluation-results button:hover {
    background: #e6f4dc;
}

/* Footer */

.page-footer {
    color: #879184;
}

/* Keep the learning UI usable on smaller screens */

@media (max-width: 600px) {

    .reading-card,
    .activity-card {
        border-radius: 16px;
    }

    .activity-card {
        padding: 20px 16px;
    }

    .lesson-progress {
        margin-bottom: 22px;
    }

    .answer-option {
        grid-template-columns: 32px minmax(0, 1fr) 16px;
        gap: 9px;
        padding: 12px 10px;
        min-height: 62px;
        font-size: 12px;
    }

    .answer-letter {
        width: 30px;
        height: 30px;
    }

    .primary-button {
        width: 100%;
        justify-content: center;
    }

    .activity-actions {
        align-items: stretch;
    }

    .transfer-passage {
        padding: 15px;
    }

    .transfer-passage p {
        font-size: 16px;
    }

    .evaluation-results {
        padding: 15px;
        overflow-wrap: anywhere;
    }

    .evaluation-results table {
        font-size: 11px;
    }

    .evaluation-results th,
    .evaluation-results td {
        padding: 9px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}