/* ============================================
   Guided Journeys
   Curated reading paths — index cards and the
   per-journey checklist. Uses the site palette
   from /css/styles.css; each journey supplies
   its own --journey-accent inline.
   ============================================ */

/* --- Index page ------------------------------------------------------- */

.journey-hero-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.75rem;
    margin: 3rem 0;
}

.journey-card {
    --journey-accent: var(--primary-color);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--journey-accent);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.journey-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--journey-accent);
}

.journey-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.15rem;
    /* A tint of the journey's own accent, not a flat grey. */
    background: color-mix(in srgb, var(--journey-accent) 14%, #ffffff);
    transition: transform 0.25s;
}

.journey-card:hover .journey-card-icon {
    transform: scale(1.08);
}

.journey-card h3 {
    font-size: 1.35rem;
    color: var(--dark);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.journey-card:hover h3 {
    color: var(--journey-accent);
}

.journey-tagline {
    color: var(--journey-accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.journey-desc {
    color: var(--gray);
    font-size: 0.925rem;
    line-height: 1.65;
}

.journey-card .journey-desc {
    /* Keep the grid tidy however long an individual blurb runs. */
    flex: 1 1 auto;
}

.journey-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.journey-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    background: var(--light);
    border: 1px solid #e2e8f0;
    color: var(--gray);
    white-space: nowrap;
}

.journey-badge--free {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.journey-badge--progress {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.journey-badge--done {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.journey-cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.35rem;
    font-weight: 600;
    color: var(--journey-accent);
}

.journey-cta-arrow {
    transition: transform 0.25s;
}

.journey-card:hover .journey-cta-arrow {
    transform: translateX(6px);
}

/* --- "How these work" panel ------------------------------------------- */

.journey-how {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin: 3rem 0 4rem;
}

.journey-how h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.journey-how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.journey-how-grid h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.journey-how-grid p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.journey-how-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

/* --- Journey detail page ---------------------------------------------- */

.journey-head {
    --journey-accent: var(--primary-color);
    background: var(--light);
    border-left: 5px solid var(--journey-accent);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2.5rem 0 2rem;
}

.journey-head-top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.journey-head-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: color-mix(in srgb, var(--journey-accent) 16%, #ffffff);
}

.journey-head h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

.journey-head .journey-tagline {
    margin-bottom: 0;
}

.journey-head .journey-desc {
    max-width: 65ch;
}

.journey-progress-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.journey-progress-row .progress-bar {
    flex: 1 1 220px;
    max-width: 320px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.85);
}

.journey-progress-text {
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 600;
}

.journey-reset {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.875rem;
    color: var(--gray);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.journey-reset:hover {
    color: var(--dark);
}

.journey-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.75rem;
}

/* --- The checklist ----------------------------------------------------- */

.journey-steps {
    list-style: none;
    padding: 0;
    margin: 0 auto 2.5rem;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.journey-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.journey-step:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-sm);
}

.journey-check {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: var(--white);
    color: var(--gray);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.journey-check:hover {
    border-color: var(--primary-color);
}

.journey-step.is-done .journey-check {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.journey-step-body {
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    display: block;
}

.journey-step-title {
    display: block;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.4;
}

.journey-step-body:hover .journey-step-title {
    color: var(--primary-color);
}

.journey-step.is-done .journey-step-title {
    text-decoration: line-through;
    color: #94a3b8;
}

.journey-lock {
    margin-left: 0.4rem;
    font-size: 0.8rem;
}

.journey-step-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
    margin-top: 0.2rem;
    /* One line only — the full blurb lives on the module page. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.journey-step-source {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.journey-step-mins {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    background: var(--light);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    white-space: nowrap;
}

/* --- Completion + fallbacks -------------------------------------------- */

.journey-done {
    max-width: 820px;
    margin: 0 auto 2rem;
    text-align: center;
    padding: 2rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius-lg);
    color: var(--gray);
}

.journey-done-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.journey-done-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.journey-done-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.journey-btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    background: var(--white);
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.journey-btn:hover {
    border-color: var(--primary-color);
}

.journey-btn--primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.journey-btn--primary:hover {
    background: #1d4ed8;
}

.journey-back {
    text-align: center;
    margin: 2rem 0 4rem;
}

.journey-back a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.journey-back a:hover {
    text-decoration: underline;
}

.journey-missing {
    text-align: center;
    padding: 4rem 1rem 5rem;
    color: var(--gray);
}

.journey-missing-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.journey-missing h1 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.journey-missing p {
    margin-bottom: 1.5rem;
}

/* --- Small screens ------------------------------------------------------ */

@media (max-width: 640px) {
    .journey-grid {
        grid-template-columns: 1fr;
    }

    .journey-head {
        padding: 1.5rem;
    }

    .journey-head h1 {
        font-size: 1.6rem;
    }

    .journey-head-icon {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }

    .journey-step {
        /* Let the reading estimate wrap under the title instead of squeezing it. */
        flex-wrap: wrap;
    }

    .journey-step-mins {
        margin-left: 3rem;
    }
}

/* --- Entry-point banner (University index) ------------------------------ */

.journey-promo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin: 3rem 0 1rem;
}

.journey-promo-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.journey-promo-body {
    flex: 1 1 320px;
}

.journey-promo-body h2 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.journey-promo-body p {
    color: var(--gray);
    font-size: 0.925rem;
    line-height: 1.6;
    margin: 0;
    max-width: 70ch;
}

.journey-promo .journey-btn {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .journey-promo {
        padding: 1.5rem;
    }
}
