/* Weekly class schedule (/classes). Reuses the tokens from site.css (--navy, --green, --line, ...).
   Card colours come from per-card custom properties (--mls-bg, --mls-accent) set from the
   course family, so a new programme needs no CSS change. */

.mls-page{background:var(--ivory);color:var(--ink)}
.mls-hero{background:radial-gradient(circle at 73% 26%,#0a3b61 0,var(--navy) 44%,var(--navy2) 100%);color:#fff}
.mls-hero .container{padding:54px 0 48px}
.mls-eyebrow{margin:0 0 12px;color:#8fcb62;font-size:11px;font-weight:900;letter-spacing:.18em}
.mls-hero h1{max-width:760px;margin:0;font:700 clamp(2.1rem,4.6vw,3.6rem)/1.02 Georgia,"Times New Roman",serif;letter-spacing:-.02em}
.mls-hero p:last-child{max-width:680px;margin:16px 0 0;color:#d9e2e9;font-size:1rem;line-height:1.65}

.mls-shell{padding-top:30px;padding-bottom:64px}

/* Filters */
.mls-toolbar{display:grid;gap:10px;margin-bottom:18px}
.mls-filter-group{display:flex;flex-wrap:wrap;gap:8px}
.mls-chip{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:8px 14px;border:1px solid #bfcbd3;border-radius:999px;background:#fff;color:var(--navy);font:inherit;font-size:.86rem;font-weight:750;cursor:pointer}
.mls-chip:hover{border-color:var(--green)}
.mls-chip:focus-visible,.mls-card:focus-visible{outline:3px solid rgba(22,135,83,.45);outline-offset:2px}
.mls-chip.is-active{background:var(--green);border-color:var(--green);color:#fff}
.mls-chip-year.is-active{background:var(--navy);border-color:var(--navy)}
.mls-dot{width:10px;height:10px;border-radius:50%;background:var(--mls-accent,#7f8a92);box-shadow:0 0 0 2px #fff}
.mls-tz{margin:2px 0 0;color:var(--muted);font-size:.82rem}

/* Desktop grid */
.mls-calendar-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow)}
.mls-calendar{--mls-col:calc(max(1,var(--mls-lanes,1))*110px);display:grid;grid-template-columns:78px repeat(5,minmax(max(165px,var(--mls-col)),1fr));min-width:calc(78px + 5*max(165px,var(--mls-col)))}
.mls-head{display:flex;align-items:center;justify-content:center;height:50px;border-bottom:1px solid var(--line);border-left:1px solid var(--line);background:#f7f9fa;color:var(--navy);font-weight:850;font-size:.92rem}
.mls-head-time{border-left:0}
.mls-axis{position:relative;height:var(--mls-grid-h);background:#fbfcfc;border-right:1px solid var(--line)}
.mls-axis-label{position:absolute;right:10px;transform:translateY(-50%);color:var(--muted);font-size:.72rem;font-weight:700;white-space:nowrap}
.mls-axis-label:first-child{transform:translateY(0)}
.mls-day{position:relative;height:var(--mls-grid-h);border-left:1px solid var(--line);background:#fff}
.mls-hour-line{position:absolute;left:0;right:0;border-top:1px solid #e9edef;pointer-events:none}

/* Cards (shared by grid, strips and the mobile list) */
.mls-card{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid rgba(6,42,73,.12);border-left:5px solid var(--mls-accent);border-radius:10px;background:var(--mls-bg);color:var(--ink);text-decoration:none;overflow:hidden;transition:transform .16s ease,box-shadow .16s ease}
.mls-card:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(6,42,73,.14)}
.mls-card-grid{position:absolute;z-index:2;box-shadow:0 4px 12px rgba(6,42,73,.08)}
.mls-card-time{font-size:.74rem;font-weight:850;color:#3f4d59}
.mls-card-time em{font-style:normal;font-weight:700}
.mls-card-title{font-size:.88rem;line-height:1.2;color:var(--navy)}
.mls-card-sub,.mls-card-meta{font-size:.72rem;line-height:1.25;color:#55636f}
.mls-card-meta{font-weight:700}
.mls-card-link{margin-top:auto;font-size:.72rem;font-weight:850;color:var(--navy)}
.mls-card.is-narrow{padding:8px 7px;gap:2px}
.mls-card.is-narrow .mls-card-title{font-size:.8rem}
.mls-card.is-narrow .mls-card-link{display:none}
.mls-card.is-narrow .mls-card-time{font-size:.68rem}
.mls-card.is-full .mls-card-meta{color:#9a3b3b}
.mls-card.is-comingsoon{border-style:dashed;border-left-style:solid}
.mls-card.is-filtered{display:none}

/* Extra strips: outside the grid hours, weekend, to be confirmed */
.mls-extra{margin-top:26px}
.mls-extra h2{margin:0 0 4px;color:var(--navy);font:700 1.3rem Georgia,"Times New Roman",serif}
.mls-extra-note{margin:0 0 12px;color:var(--muted);font-size:.86rem}
.mls-extra-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-top:10px}

.mls-mobile-list{display:none}
.mls-empty,.mls-filter-empty{color:var(--muted);font-size:.9rem}
.mls-filter-empty{margin:22px 0 0;padding:16px;border:1px dashed var(--line);border-radius:12px;background:#fff;text-align:center}
.mls-none{padding:34px;border:1px dashed var(--line);border-radius:14px;background:#fff;text-align:center}
.mls-none h2{margin:0 0 8px;color:var(--navy);font-family:Georgia,serif}
.mls-note{margin:22px 0 0;color:var(--muted);font-size:.86rem;text-align:center}

/* Selecting: counts, disabled chips, and the early/late rows inside the grid */
.mls-count{font-size:.74rem;font-weight:700;opacity:.75}
.mls-chip.is-active .mls-count{opacity:.9}
.mls-chip:disabled,.mls-chip.is-disabled{opacity:.42;cursor:not-allowed;border-style:dashed}
.mls-chip:disabled:hover{border-color:#bfcbd3}
.mls-band-label{display:flex;align-items:center;justify-content:flex-end;padding:8px 10px;border-bottom:1px solid var(--line);background:#fbfcfc;border-right:1px solid var(--line);color:var(--muted);font-size:.72rem;font-weight:700;text-align:right}
.mls-band-cell{display:grid;align-content:start;gap:6px;padding:6px 6px;border-left:1px solid var(--line);border-bottom:1px solid var(--line);background:#fcfdfd}
.mls-band-cell:last-child{border-bottom:0}
.mls-band-cell .mls-card{padding:7px 9px}
.mls-band-label[hidden],.mls-band-cell[hidden]{display:none}
.mls-link-btn{padding:0;border:0;background:none;color:var(--green);font:inherit;font-weight:800;text-decoration:underline;cursor:pointer}

/* Week navigation, dates under the weekdays, and classes that have not started yet */
.mls-weeknav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.mls-weeknav-label{margin:0;color:var(--navy);font-size:.95rem;text-align:center}
.mls-weeknav-now{margin-left:10px;color:var(--green);font-size:.82rem;font-weight:800}
.mls-weeknav-btn{padding:8px 14px;border:1px solid #bfcbd3;border-radius:999px;background:#fff;color:var(--navy);font-size:.84rem;font-weight:800;text-decoration:none;white-space:nowrap}
a.mls-weeknav-btn:hover{border-color:var(--green)}
.mls-weeknav-btn.is-off{opacity:.4}
.mls-head{flex-direction:column;gap:1px;line-height:1.15}
.mls-head small,.mls-mobile-day h2 small{color:var(--muted);font-size:.74rem;font-weight:700}
.mls-mobile-day h2 small{margin-left:6px;font:700 .8rem system-ui,sans-serif}
.mls-card-starts{align-self:flex-start;padding:1px 7px;border-radius:999px;background:rgba(6,42,73,.08);color:#3f4d59;font-size:.68rem;font-weight:800}
.mls-card.is-upcoming{opacity:.82}

/* Phones and small tablets: day-by-day cards instead of a squeezed five-column grid */
@media (max-width:820px){
  .mls-desktop-only{display:none}
  .mls-mobile-list{display:grid;gap:16px}
  .mls-mobile-day{padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff}
  .mls-mobile-day h2{margin:0 0 8px;color:var(--navy);font:700 1.15rem Georgia,"Times New Roman",serif}
  .mls-mobile-day .mls-card{margin-top:8px;padding:12px}
  .mls-mobile-day .mls-card-title{font-size:.98rem}
  .mls-mobile-day.is-empty{display:none}
  .mls-extra-list{grid-template-columns:1fr}
  /* Filters become swipeable single rows so the classes start near the top of the screen */
  .mls-filter-group{flex-wrap:nowrap;overflow-x:auto;margin:0 -15px;padding:2px 15px 4px;scrollbar-width:none}
  .mls-filter-group::-webkit-scrollbar{display:none}
  .mls-chip{flex:0 0 auto;white-space:nowrap}
}
@media (max-width:520px){
  .mls-hero .container{padding:40px 0 34px}
  .mls-chip{min-height:40px}
}
@media (prefers-reduced-motion:reduce){.mls-card{transition:none}.mls-card:hover{transform:none}}

/* Homepage: compact week at a glance, just below the hero */
.mlh{padding:34px 0 30px;background:var(--ivory,#fdfbf7);border-bottom:1px solid #edf0f1}
.mlh-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:16px}
.mlh-eyebrow{margin:0 0 6px;color:var(--green);font-size:10px;font-weight:900;letter-spacing:.16em}
.mlh h2{margin:0;color:var(--navy);font:700 27px/1.12 Georgia,"Times New Roman",serif}
.mlh-sub{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
.mlh-all{flex:0 0 auto;color:var(--green);font-size:13px;font-weight:900;text-decoration:none;white-space:nowrap}
.mlh-all:hover{text-decoration:underline}
.mlh-filter-rows{display:grid;gap:8px;margin-bottom:16px}
.mlh-filters{margin:0}
.mlh-filter-rows>*{min-width:0}
.mlh-days{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:start}
.mlh-day{padding:12px 10px;border:1px solid var(--line,#dbe1e4);border-radius:12px;background:#fff}
.mlh-day h3{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 9px;color:var(--navy);font-size:.92rem}
.mlh-day h3 small{color:var(--muted);font-size:.74rem;font-weight:700}
.mlh-list{display:grid;gap:6px}
.mlh-item{display:grid;gap:1px;padding:6px 8px;border:1px solid rgba(6,42,73,.1);border-left:4px solid var(--mls-accent);border-radius:8px;background:var(--mls-bg);color:var(--ink);text-decoration:none;transition:box-shadow .15s ease}
.mlh-item:hover{box-shadow:0 6px 14px rgba(6,42,73,.13)}
.mlh-item:focus-visible,.mlh-all:focus-visible,.mlh-more:focus-visible{outline:3px solid rgba(22,135,83,.45);outline-offset:2px}
.mlh-time{color:#3f4d59;font-size:.72rem;font-weight:850}
.mlh-time em{font-style:normal;font-weight:700}
.mlh-item strong{color:var(--navy);font-size:.84rem;line-height:1.2}
.mlh-prog{overflow:hidden;color:#55636f;font-size:.7rem;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.mlh-starts{align-self:start;justify-self:start;margin-top:2px;padding:1px 7px;border-radius:999px;background:rgba(6,42,73,.08);color:#3f4d59;font-size:.66rem;font-weight:800}
.mlh-item.is-upcoming{opacity:.85}
.mlh-item.is-comingsoon{border-style:dashed;border-left-style:solid}
.mlh-item.is-filtered,.mlh-item.is-overflow{display:none}
.mlh-none{margin:0;color:var(--muted);font-size:.78rem}
.mlh-more{display:block;margin-top:8px;color:var(--green);font-size:.78rem;font-weight:900;text-decoration:none}
.mlh-more[hidden],.mlh-none[hidden]{display:none}
.mlh-note{margin:14px 0 0;color:var(--muted);font-size:.8rem}
.mlh-note a{color:var(--green);font-weight:800}
@media (max-width:1050px){
  /* Tablets and phones: a swipeable row of day cards keeps the strip short instead of five squeezed columns */
  .mlh-head{flex-direction:column;align-items:flex-start;gap:10px}
  .mlh-days{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:24px;margin:0 -24px;padding:2px 24px 8px;scrollbar-width:none}
  .mlh-days::-webkit-scrollbar{display:none}
  .mlh-day{flex:0 0 min(78%,300px);scroll-snap-align:start}
  .mlh-filters{flex-wrap:nowrap;overflow-x:auto;margin-left:-24px;margin-right:-24px;padding:2px 24px 4px;scrollbar-width:none}
  .mlh-filters::-webkit-scrollbar{display:none}
  .mlh-filters .mls-chip{flex:0 0 auto;white-space:nowrap}
}
@media (prefers-reduced-motion:reduce){.mlh-item{transition:none}}
