/* ── Tokens ─────────────────────────────────────────── */
:root {
    --color-bg: white;
    --color-surface: #ffffff;
    --color-surface-alt: #ffffff;
    --color-border: #d4d1cb;
    --color-border-strong: #005994;
    --color-text: #1a1a1a;
    --color-text-secondary: #6b6660;
    --color-text-tertiary: #736b63;
    --color-accent: #2c5282;
    --color-link: #2c5282;
    --color-light-link: #005994;
    --color-link-hover: #1a3654;

    --color-tag-zoom: #06172b;
    --color-tag-email: #00756f;
    --color-tag-phone: #175226;
    --color-tag-brightspace: #5f2f99;
    --color-tag-virtual: #1a7a8a;
    --color-tag-webex: #c4314b;
    --color-tag-blackboard: #3d4f1e;
    --color-tag-flexible: #1a1a1a;
    --color-tag-live-chat: #b95e06;
    --color-tag-navigate: #1e68b3;
    --color-tag-in-person: #720880;

    --font-heading: "Sora", sans-serif;
    --font-body: "Plus Jakarta Sans", sans-serif;

    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;

    --drawer-width: 440px;
    --card-ratio: 6 / 5;
}

.outer-shell {
    background: #ff0000;
}
.nav-bar {
    height: 150px;
    background: #00ff00;
}
.inner-shell {
    display: flex;
    background: #0000ff;
    width: 100%;
}

.inner-shell:first-child {
    flex-shrink: 0;
    gap: 0px;
    min-width: 200px;
    color: #ff0000;
}

/* ── Base ───────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    font-optical-sizing: auto;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

a:hover {
    color: var(--color-link-hover);
    border-bottom-color: var(--color-link-hover);
}

/* ── Page Shell ─────────────────────────────────────── */
.page {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    background: var(--color-bg);
}

/* ── Header ─────────────────────────────────────────── */
.page-header {
    margin-bottom: var(--space-md);
}

.header-rule {
    height: 2px;
    background: var(--color-border-strong);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-top: var(--space-md);
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-md);
    font-weight: 400;
}

/* ── Filter Bar ─────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tab {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-bottom: 2px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-light-link);
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.category-tab:hover,
.category-tab:focus-visible {
    border-color: var(--color-border-strong);
    outline: none;
}

.category-tab.is-active {
    background: var(--color-border-strong);
    border-color: var(--color-border-strong);
    color: #ffffff;
}

.filter-input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-bottom: 2px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.filter-input::placeholder {
    color: var(--color-text-tertiary);
}

.filter-input:focus {
    border-color: var(--color-border-strong);
}

/* ── Card Grid ──────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-sm);
}

/* ── Card ───────────────────────────────────────────── */
.dept-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: var(--space-sm);
    aspect-ratio: var(--card-ratio);
    padding: var(--space-md);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
}

.dept-card:nth-child(even) {
    background: var(--color-surface-alt);
}

/* Border-draw hover animation */
.dept-card::before,
.dept-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 1;
    border-radius: 4px;
}

.dept-card::before {
    border-bottom: 2px solid var(--color-border-strong);
    border-right: 2px solid var(--color-border-strong);
}

.dept-card::after {
    border-left: 2px solid var(--color-border-strong);
    border-top: 2px solid var(--color-border-strong);
}

.dept-card:hover::before {
    animation: draw-br 0.4s ease-out forwards;
}

.dept-card:hover::after {
    animation: draw-lt 0.4s ease-out forwards;
}

@keyframes draw-br {
    0% {
        width: 0;
        height: 0;
    }
    50% {
        width: 100%;
        height: 0;
    }
    100% {
        width: 100%;
        height: 100%;
    }
}

@keyframes draw-lt {
    0% {
        width: 0;
        height: 0;
    }
    50% {
        width: 0;
        height: 100%;
    }
    100% {
        width: 100%;
        height: 100%;
    }
}

/* ── Truncation (card view) ─────────────────────────── */
.dept-card__name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #005994;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border-strong);
    min-height: calc(2lh + var(--space-sm));
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Appointment type tags */
.dept-card__tags {
    display: flex;
    flex-wrap: nowrap;
    align-content: start;
    gap: 6px;
    overflow: hidden;
    min-height: 28px;
}

.dept-card__tag {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    color: #ffffff;
    flex-shrink: 0;
}

.dept-card__tag--zoom {
    background: var(--color-tag-zoom);
}
.dept-card__tag--email {
    background: var(--color-tag-email);
}
.dept-card__tag--phone {
    background: var(--color-tag-phone);
}
.dept-card__tag--brightspace {
    background: var(--color-tag-brightspace);
}
.dept-card__tag--virtual {
    background: var(--color-tag-virtual);
}
.dept-card__tag--webex {
    background: var(--color-tag-webex);
}
.dept-card__tag--blackboard {
    background: var(--color-tag-blackboard);
}
.dept-card__tag--flexible {
    background: var(--color-tag-flexible);
}
.dept-card__tag--live-chat {
    background: var(--color-tag-live-chat);
}
.dept-card__tag--navigate {
    background: var(--color-tag-navigate);
}
.dept-card__tag--in-person {
    background: var(--color-tag-in-person);
}
.dept-card__tag--more {
    background: var(--color-surface);
    border: 1px solid var(--color-accent);
    color: var(--color-light-link);
}

/* Day/Hours */
.dept-card__hours {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    min-width: 0;
    min-height: 24px;
    overflow: hidden;
}

/* Contact rows */
.dept-card__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.dept-card__row {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    min-width: 0;
}

.dept-card__label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    min-width: 52px;
}

.dept-card__value {
    font-size: 0.9rem;
    color: var(--color-text);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dept-card__value a {
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notes */
.dept-card__notes {
    min-height: 40px;
    min-width: 0;
    overflow: hidden;
}

.dept-card__notes:not(:empty) {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-sm);
    align-self: end;
}

.dept-card__notes-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: 6px;
}

.dept-card__notes-text {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

/* ── Drawer ─────────────────────────────────────────── */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--drawer-width);
    height: 100%;
    background: var(--color-surface);
    border-left: 2px solid var(--color-border-strong);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 101;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.drawer.is-open {
    transform: translateX(0);
}

.drawer__close {
    position: sticky;
    top: 0;
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: var(--space-md) var(--space-md) 0 0;
    padding: 0;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-tertiary);
    cursor: pointer;
    flex-shrink: 0;
    z-index: 1;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.drawer__close:hover {
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.drawer__close-icon {
    width: 18px;
    height: 18px;
}

.drawer__content {
    padding: var(--space-sm) var(--space-lg) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Drawer sections */
.drawer__name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border-strong);
}

.drawer__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drawer__section-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: 4px;
}

.drawer__section-value {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.55;
    word-break: break-word;
}

.drawer__section-value a {
    color: var(--color-link);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.drawer__section-value a:hover {
    color: var(--color-link-hover);
    border-bottom-color: var(--color-link-hover);
}

.drawer__schedule-row {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 0.35em;
    font-size: 0.95rem;
    line-height: 1.55;
}

.drawer__schedule-times {
    min-width: 0;
}

.drawer__notes-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

/* ── No results (spans full grid) ──────────────────── */
.no-results {
    grid-column: 1 / -1;
    grid-row: span 5;
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: 0.95rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

/* ── Visually hidden (accessible label) ────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    }
}

@media (max-width: 600px) {
    .page {
        padding: var(--space-lg) var(--space-sm);
    }

    .page-header {
        margin-bottom: var(--space-lg);
    }

    .filter-bar {
        margin-bottom: var(--space-md);
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .dept-card {
        padding: var(--space-md);
        aspect-ratio: var(--card-ratio);
    }

    .dept-card__name {
        overflow-wrap: anywhere;
    }

    .dept-card__tags {
        flex-wrap: nowrap;
    }

    .dept-card__hours,
    .dept-card__row {
        align-items: flex-start;
    }

    .dept-card__value,
    .dept-card__value a,
    .dept-card__notes-text {
        overflow-wrap: anywhere;
    }

    /* Bottom drawer on mobile */
    .drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 85vh;
        border-left: none;
        border-top: 2px solid var(--color-border-strong);
        transform: translateY(100%);
    }

    .drawer.is-open {
        transform: translateY(0);
    }
}
.separator {
    border-top: 8px solid #bbb;
    border-width: 1px;
    height: 2px;
    width: 80%;
    overflow: hidden;
    margin-top: 1rem;
}








