/* =========================================================
   STUDENTS' WEEK (/students-week)
   Day strip (sticky), week timeline, activity cards.
   Hero stats use .sa-glance from news-browse.css.
========================================================= */

.sw {
    --sw-navy: #073b4c;
    --sw-teal: #0b858d;
    --sw-gold: #e5b83d;
    --sw-gold-soft: #fdf3d6;
    --sw-gold-line: #f0dfa8;
    --sw-ink: #173c4a;
    --sw-mute: #5d7078;
    --sw-line: #dde8eb;
    --sw-paper: #f6f9fa;
    --sw-strip: #e0f6f1;       /* day strip: light mint, as calendar chips (#00b386 at 12% on white) */
    --sw-strip-line: #b3e8db;
    --sw-day-line: #c9ece2;    /* light border on the unselected day buttons */
    --sw-olive: #00805f;       /* hover / today accent (deeper mint, readable on white) */
    --sw-nav: 100px; /* clearance for the fixed .floating-nav; set by the script */

    padding: 0 0 90px;
    background: var(--sw-paper);
    color: var(--sw-ink);
}

/* Live dot in the hero label while the week runs */
.sw-live {
    display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%;
    background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); vertical-align: 1px;
    animation: sw-pulse 1.8s infinite;
}
@keyframes sw-pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }


/* ---------- Day strip (sticky) ---------- */

.sw-days {
    position: sticky; top: var(--sw-nav); z-index: 50;
    padding: 12px 0;
    border-bottom: 1px solid var(--sw-strip-line);
    background: var(--sw-strip);
}
    .sw-days.stuck { box-shadow: 0 10px 24px rgba(7, 59, 76, .08); }
    .sw-days.stuck::before {
        content: ""; position: absolute; left: 0; right: 0; bottom: 100%;
        height: var(--sw-nav); background: var(--sw-strip);
    }

.sw-days-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
    .sw-days-row::-webkit-scrollbar { display: none; }

.sw-day {
    flex: 1 0 74px; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 8px 6px; border: 1px solid var(--sw-day-line); border-radius: 14px;
    background: rgba(255, 255, 255, .78); color: var(--sw-ink); cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
}
    .sw-day:hover { border-color: var(--sw-olive); background: #fff; transform: translateY(-1px); }
    .sw-day .w { color: var(--sw-mute); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
    .sw-day .d { font-family: "Inter Tight", "Inter", sans-serif; font-size: 22px; font-weight: 800; line-height: 1.1; }
    .sw-day .n { color: var(--sw-mute); font-size: 11px; white-space: nowrap; }
    .sw-day.is-today { border-color: var(--sw-olive); }
    .sw-day.is-today .w { color: var(--sw-olive); }
    .sw-day[aria-pressed="true"] {
        border-color: var(--sw-navy); background: var(--sw-navy); color: #fff;
        box-shadow: 0 6px 16px rgba(7, 59, 76, .22);
    }
    .sw-day[aria-pressed="true"] .w, .sw-day[aria-pressed="true"] .n { color: rgba(255, 255, 255, .75); }
    .sw-all { flex-basis: 90px; }
    .sw-all .d { font-size: 17px; line-height: 1.4; }


/* ---------- Section heads ---------- */

.sw-body { padding-top: 34px; }

.sw-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
    .sw-head h2 {
        margin: 0; color: var(--sw-navy);
        font-family: "Inter Tight", "Inter", sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -.3px;
    }
    .sw-head p { margin: 0; color: var(--sw-mute); font-size: 14px; }
.sw-head-cards { margin-top: 40px; }



/* ---------- Week at a glance ---------- */

.sw-gantt-box {
    overflow-x: auto; padding: 14px;
    border: 1px solid var(--sw-line); border-radius: 22px; background: #fff;
}
.sw-gantt {
    display: grid; grid-template-columns: minmax(170px, 230px) repeat(var(--sw-days), minmax(46px, 1fr));
    align-items: center; row-gap: 6px; min-width: 720px;
}
.sw-gh {
    display: flex; flex-direction: column; align-items: center; padding: 4px 0 8px;
    color: var(--sw-mute); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    border-radius: 10px; transition: background .2s, color .2s;
}
    .sw-gh b { color: var(--sw-ink); font-size: 16px; letter-spacing: 0; }
    .sw-gh.is-today b { color: #9a6d00; }
    .sw-gh.is-on { background: var(--sw-gold-soft); color: #7a5500; }
.sw-gl {
    grid-column: 1; padding-right: 12px;
    color: var(--sw-ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sw-gb {
    display: block; min-width: 0;
    height: 26px; padding: 0 10px; border-radius: 999px;
    background: var(--c); color: #fff; font-size: 11px; font-weight: 700; line-height: 26px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none;
    transition: opacity .2s, filter .15s;
}
    .sw-gb:hover { color: #fff; filter: brightness(1.1); }
    .sw-gb.dim { opacity: .2; }


/* ---------- Activity cards ---------- */

.sw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.sw-card {
    display: flex; flex-direction: column; gap: 10px; padding: 18px 20px;
    border: 1px solid var(--sw-line); border-left: 5px solid var(--c); border-radius: 18px; background: #fff;
    scroll-margin-top: calc(var(--sw-nav) + 120px);
    transition: box-shadow .2s, transform .2s;
}
    .sw-card { cursor: pointer; }
    .sw-card:hover { box-shadow: 0 14px 30px rgba(7, 59, 76, .09); transform: translateY(-2px); border-color: var(--c); }
    .sw-card[hidden] { display: none; }
    .sw-card:target { box-shadow: 0 0 0 3px var(--sw-gold); }
    .sw-card h3 { margin: 0; color: var(--sw-navy); font-size: 17px; font-weight: 800; line-height: 1.3; }

.sw-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.sw-org { color: var(--c); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sw-tag {
    padding: 2px 9px; border-radius: 999px; background: var(--sw-gold-soft); color: #7a5500;
    font-size: 11px; font-weight: 700;
}
.sw-sum { margin: 0; color: var(--sw-mute); font-size: 14px; line-height: 1.6; }

.sw-meta { display: grid; grid-template-columns: 20px 1fr; gap: 5px 10px; margin: 0; font-size: 14px; }
    .sw-meta dt { color: var(--sw-teal); text-align: center; font-weight: 400; }
    .sw-meta dd { margin: 0; color: var(--sw-ink); }

.sw-go {
    align-self: flex-start; margin-top: auto; padding-top: 6px;
    color: var(--sw-teal); font-size: 14px; font-weight: 700; text-decoration: none;
}
    .sw-go i { margin-left: 4px; transition: transform .15s; }
    .sw-go:hover { color: var(--sw-navy); }
    .sw-go:hover i { transform: translateX(3px); }

.sw-empty-day {
    padding: 30px; border: 1px dashed var(--sw-line); border-radius: 18px;
    background: #fff; color: var(--sw-mute); text-align: center;
}

.sw-empty {
    margin: 50px auto 0; max-width: 560px; padding: 40px 30px;
    border: 1px dashed var(--sw-line); border-radius: 22px; background: #fff; text-align: center;
}
    .sw-empty i { color: var(--sw-gold); font-size: 34px; }
    .sw-empty h2 { margin: 14px 0 8px; color: var(--sw-navy); font-size: 22px; font-weight: 800; }
    .sw-empty p { margin: 0; color: var(--sw-mute); }


/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .sw { --sw-nav: 80px; }
}

@media (max-width: 767.98px) {
    .sw-day { flex: 0 0 66px; }
    .sw-cards { grid-template-columns: 1fr; }
    .sw-head h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .sw-live { animation: none; }
    .sw-card, .sw-day, .sw-go i { transition: none; }
}
