:root { --fg: #1a1a1a; --bg: #fafafa; --accent: #2b5fab; --muted: #f0f2f5; }
body { margin: 0; font-family: system-ui, sans-serif; color: var(--fg); background: var(--bg); }
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--accent); }
header a, header span { color: #fff; text-decoration: none; font-weight: 600; }
header .logout { display: flex; gap: 0.75rem; align-items: center; margin: 0; }
header nav { display: flex; gap: 1.25rem; }
header .logout span { font-weight: 400; }
header .logout button { background: #fff; color: var(--accent); }
main { max-width: 720px; margin: 0 auto; padding: 1rem; }
button { padding: 0.6rem 1.2rem; background: var(--accent); color: #fff; border: 0; border-radius: 4px; cursor: pointer; }
small { margin-left: 0.75rem; color: #666; }
pre, code { font-family: ui-monospace, monospace; }
pre { background: var(--muted); padding: 1rem; border-radius: 6px; overflow-x: auto; }
.login { text-align: center; margin-top: 4rem; }
.google-btn { display: inline-block; padding: 0.75rem 1.5rem; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: var(--fg); text-decoration: none; font-weight: 600; }
.token { background: #e3f5e6; padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }
.token code { word-break: break-all; }
.fields { columns: 2; padding-left: 1.2rem; }

/* Atlas interview */
.chat { display: flex; flex-direction: column; gap: 0.75rem; padding-bottom: 5rem; }
.msg { max-width: 80%; padding: 0.6rem 0.9rem; border-radius: 12px; }
.msg p { margin: 0; white-space: pre-wrap; }
.msg.atlas { align-self: flex-start; background: #fff; border: 1px solid #e2e5ea; }
.msg.student { align-self: flex-end; background: var(--accent); color: #fff; }
.msg .who { display: block; font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-bottom: 0.2rem; }
.msg.typing p { color: #888; }
.chat-form { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 0.5rem; padding: 0.75rem max(16px, calc((100% - 720px) / 2 + 16px)); background: var(--bg); border-top: 1px solid #e2e5ea; }
.chat-form input { flex: 1; padding: 0.6rem; font-size: 1rem; border: 1px solid #ccc; border-radius: 6px; }
.chat-form button:disabled, .chat-form input:disabled { opacity: 0.6; }
.calculating { text-align: center; margin: 2rem 0; }
.spinner { width: 32px; height: 32px; margin: 0 auto 0.75rem; border: 3px solid #dfe5ef; border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Checklist page */
:root {
    --accent-dark: #244EB5;
    --accent-light: #EAF1FF;
    --navy: #172B4D;
    --text-muted: #8190A5;
    --border: #E5EAF2;
    --danger: #D9363E;
    --success: #38A169;
}

/* Header */
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.checklist-header h1 {
    color: var(--navy);
    font-size: 1.8rem;
    font-weight: 750;
    letter-spacing: -0.035em;
    margin: 0;
}

.checklist-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.checklist-header strong {
    color: var(--accent);
}

/* Responsive card grid */
.stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

/* Stage cards */
.stage-card {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 7px rgba(23, 43, 77, 0.06);
    transition: box-shadow 0.2s ease;
}

.stage-card:hover {
    box-shadow: 0 5px 16px rgba(23, 43, 77, 0.10);
}

.stage-card.current {
    border-top: 4px solid var(--accent);
    padding-top: calc(1.25rem - 3px);
}

.stage-card.complete {
    border-top: 4px solid var(--success);
    padding-top: calc(1.25rem - 3px);
}

/* Expandable card heading */
.stage-card > summary {
    cursor: pointer;
    list-style: none;
}

.stage-card > summary::-webkit-details-marker {
    display: none;
}

.stage-card > summary::after {
    content: "+";
    float: right;
    color: var(--accent);
    font-size: 1.25rem;
    line-height: 1.3;
}

.stage-card[open] > summary::after {
    content: "−";
}

.stage-card > summary h2 {
    display: inline;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    overflow-wrap: anywhere;
}

.count {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 650;
    white-space: nowrap;
}

.current-label {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 700;
}

.next-due {
    margin: 0.8rem 0;
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Overdue badge */
.badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Progress bar */
.bar {
    width: 100%;
    height: 7px;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 99px;
    background: #E1E8F3;
}

.fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.3s ease;
}

.stage-card.complete .fill {
    background: var(--success);
}

/* Task list */
.task-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    border-top: 1px solid var(--border);
}

.task {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.task:last-child {
    border-bottom: none;
}

.task form label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--navy);
    font-size: 0.92rem;
    line-height: 1.5;
    cursor: pointer;
}

.task input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0.2rem 0 0;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.task small {
    display: block;
    margin: 0.4rem 0 0 1.65rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Expandable task help */
.help {
    margin: 0.65rem 0 0 1.65rem;
}

.help summary {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

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

.help summary:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.help p {
    color: #66758A;
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0.5rem 0 0;
}

/* Keyboard accessibility */
.stage-card summary:focus-visible,
.help summary:focus-visible,
.task input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Mobile layout */
@media (max-width: 650px) {
    .checklist-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .checklist-header h1 {
        font-size: 1.55rem;
    }

    .stage-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .stage-card {
        padding: 1rem;
    }

    .stage-card.current,
    .stage-card.complete {
        padding-top: calc(1rem - 3px);
    }
}


/* Atlas support chat — matches the interview page */

.chat {
    height: 65vh;
    min-height: 350px;
    overflow-y: auto;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f5f8ff;
    border: 1px solid #e2e8f2;
    border-radius: 10px;
    scroll-behavior: smooth;
}

/* Message spacing and readability */
.msg {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.msg.atlas {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f2;
}

.msg.student {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
}

.msg .who {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
}

.msg.student .who {
    color: #fff;
}

/* Message input */
.chat-form {
    z-index: 10;
    background: var(--bg);
    border-top: 1px solid #e2e5ea;
}

.chat-form input {
    min-width: 0;
}

.chat-form input:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(43, 95, 171, 0.15);
}

.chat-form button {
    white-space: nowrap;
}

.chat-form button:hover {
    background: var(--accent-dark);
}

/* Atlas thinking indicator */
.calculating {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive chat */
@media (max-width: 600px) {
    .chat {
        height: 60vh;
        min-height: 300px;
        padding: 0.75rem;
    }

    header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .msg {
        max-width: 92%;
    }
}

/* Staff page */

/* Navigation tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tab {
    display: inline-block;
    padding: 0.7rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tab:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.tab.active {
    border-color: var(--border);
    border-bottom-color: var(--bg);
    background: var(--bg);
    color: var(--accent);
}

/* Risk indicators */
.risk {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.risk.red {
    background: #FDE8E8;
    color: #B4232D;
}

.risk.yellow {
    background: #FFF4CC;
    color: #8A6100;
}

.risk.green {
    background: #DDF5E5;
    color: #207544;
}

.risk.none {
    background: var(--muted);
    color: var(--text-muted);
}

/* Student name search */
#nameSearch {
    display: block;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    margin-bottom: 1.25rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #fff;
    color: var(--fg);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#nameSearch::placeholder {
    color: var(--text-muted);
}

#nameSearch:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 95, 171, 0.15);
}

@media (max-width: 600px) {
    .tabs {
        gap: 0.25rem;
    }

    .tab {
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
    }

    #nameSearch {
        max-width: 100%;
    }
}


/* Home page hero */
.hero {
    width: min(1100px, calc(100vw - 32px));
    box-sizing: border-box;
    min-height: 70vh;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 4rem;
    display: flex;
    align-items: center;
    border-radius: 24px;
    color: #fff;
    background:
        linear-gradient(
            90deg,
            rgba(23, 43, 77, 0.88),
            rgba(23, 43, 77, 0.2)
        ),
        url("../images/philly.jpg") center / cover;
    overflow: hidden;
}

.hero-text {
    max-width: 650px;
}

.hero-text h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    color: #fff;
}

.hero-text p {
    margin: 0 0 2rem;
    max-width: 600px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #fff;
}

.hero-btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

/* Home page feature cards */
.features.stage-grid {
    width: min(1100px, calc(100vw - 32px));
    box-sizing: border-box;
    margin: -4rem 0 3rem 50%;
    transform: translateX(-50%);
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .features.stage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stage-card.feature {
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid rgba(229, 234, 242, 0.85);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(23, 43, 77, 0.08);
}

.stage-card.feature h3 {
    margin-top: 0;
    color: var(--navy);
}

.stage-card.feature p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Home page footer */
.home-footer {
    margin: 2rem auto;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Footer on every page */
.site-footer {
    margin: 2rem auto 1.5rem;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Mobile home page */
@media (max-width: 600px) {
    .hero {
        min-height: 65vh;
        padding: 2rem 1.5rem;
        background:
            linear-gradient(
                180deg,
                rgba(23, 43, 77, 0.88),
                rgba(23, 43, 77, 0.45)
            ),
            url("../images/philly.jpg") center / cover;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .hero-text p {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .features.stage-grid {
        grid-template-columns: 1fr;
        margin-top: -2rem;
        gap: 1rem;
    }

    .stage-card.feature {
        padding: 1.25rem;
    }
}


/* Form labels and fields */
.mentor-form label {
    display: block;
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.mentor-form input,
.mentor-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font: inherit;
}

.mentor-form textarea {
    resize: vertical;
}

.flash { padding: 0.75rem 1rem; border-radius: 6px; background: var(--accent-light); color: var(--accent-dark); font-weight: 600; }
.reminders-form { margin: 0 0 1rem; }
