/* =============================================================================
   BSNES  Academic CSS — Examination System + School Calendar
   ============================================================================= */

/* ------------------------------------------------------------------------- */
/*  EXAMINATION SYSTEM                                                       */
/* ------------------------------------------------------------------------- */
.exam-system { background: var(--bg); }
.exam-system .section-head .kicker { max-width: 60ch; }

/* Class picker */
.exam-classpicker {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  margin: 12px 0 36px;
}
.exam-cls {
  appearance: none; border: 0; background: transparent;
  flex: 1 0 auto;
  padding: 18px 22px;
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-2);
  border-right: 1px solid var(--rule);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  position: relative;
}
.exam-cls:last-child { border-right: 0; }
.exam-cls:hover { background: var(--cream); color: var(--emerald-900); }
.exam-cls.active {
  background: var(--emerald-900);
  color: var(--gold-soft);
}
.exam-cls.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; background: var(--gold);
}

/* Pattern strip */
.exam-pattern-strip {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px;
  align-items: start;
  padding: 28px 32px;
  border: 1px solid var(--rule);
  background: var(--paper);
  margin-bottom: 24px;
}
.exam-pattern-strip .left .label {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 10px;
}
.exam-pattern-strip .left h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 30px; margin: 0 0 8px;
  color: var(--emerald-900); letter-spacing: -0.01em;
}
.exam-pattern-strip .left .subjects {
  font-size: 13px; color: var(--ink-2); line-height: 1.5;
}
.exam-pattern-strip .right {
  border-left: 1px solid var(--rule);
  padding-left: 28px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.exam-pattern-strip .pat-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--gold);
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--emerald-900);
}
.exam-pattern-strip .pat-chip b { color: var(--gold); font-weight: 700; }
.exam-pattern-strip .pat-arrow {
  align-self: center;
  color: var(--gold); opacity: 0.55; font-size: 12px;
}

/* Phase cards */
.exam-phase-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.exam-phase {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding: 30px 28px;
  position: relative;
  transition: background .2s ease;
}
.exam-phase:hover { background: var(--bg); }
.exam-phase .ph-id {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.18em; font-weight: 700;
  margin-bottom: 14px;
}
.exam-phase h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 24px; line-height: 1.1;
  margin: 0 0 6px; color: var(--emerald-900);
  letter-spacing: -0.005em;
}
.exam-phase .ph-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.exam-phase .ph-meta .when { color: var(--gold); font-weight: 700; }
.exam-phase .ph-meta .marks { color: var(--ink-2); }
.exam-phase ul { list-style: none; padding: 0; margin: 0; }
.exam-phase li {
  display: grid; grid-template-columns: 84px 1fr;
  gap: 14px; padding: 9px 0;
  border-top: 1px dashed var(--rule-light);
  font-size: 13.5px;
}
.exam-phase li:first-of-type { border-top: 0; }
.exam-phase li .dt {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--gold); font-weight: 700;
  align-self: center;
}
.exam-phase li .sj { color: var(--ink); }

.exam-notes {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.exam-notes b { color: var(--emerald-900); }

/* Responsive */
@media (max-width: 980px) {
  .exam-pattern-strip { grid-template-columns: 1fr; }
  .exam-pattern-strip .right { border-left: 0; padding-left: 0; }
  .exam-phase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .exam-phase-grid { grid-template-columns: 1fr; }
  .exam-cls { flex: 1 0 50%; border-bottom: 1px solid var(--rule); }
}


/* ------------------------------------------------------------------------- */
/*  SCHOOL CALENDAR                                                          */
/* ------------------------------------------------------------------------- */
.calendar-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--paper) 100%);
  position: relative;
}
.calendar-section::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(184, 137, 58, 0.06), transparent 40%),
    radial-gradient(circle at 92% 88%, rgba(10, 61, 35, 0.04), transparent 40%);
  pointer-events: none;
}
.calendar-section .wrap { position: relative; z-index: 2; }

.cal-shell {
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 30px 70px -40px rgba(10, 61, 35, 0.25);
  overflow: hidden;
}

/* TOP BAR — session label, month picker, filters, PDF link */
.cal-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px; align-items: center;
  padding: 22px 28px;
  background: var(--emerald-900);
  color: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.cal-top .session {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-soft);
}
.cal-top .session b { color: var(--gold); font-weight: 700; }
.cal-top .filters {
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: center;
}
.cal-top .filters .f {
  appearance: none; border: 1px solid rgba(216, 205, 176, 0.25);
  background: transparent; color: var(--gold-soft);
  padding: 7px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s ease;
}
.cal-top .filters .f:hover { border-color: var(--gold); color: var(--bg); }
.cal-top .filters .f.active { background: var(--gold); color: var(--emerald-900); border-color: var(--gold); }
.cal-top .filters .f .swatch {
  width: 8px; height: 8px; border-radius: 999px; background: var(--gold);
}
.cal-top .pdf {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--gold); color: var(--emerald-900);
  font-family: 'Manrope', sans-serif;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.cal-top .pdf:hover { background: var(--gold-soft); }

/* Year timeline ribbon */
.cal-ribbon {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  overflow-x: auto;
}
.cal-ribbon::-webkit-scrollbar { height: 0; }
.cal-ribbon .rb-month {
  flex: 1 0 auto; min-width: 92px;
  appearance: none; border: 0; background: transparent;
  padding: 14px 12px 12px;
  border-right: 1px solid var(--rule);
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background .15s ease;
}
.cal-ribbon .rb-month:last-child { border-right: 0; }
.cal-ribbon .rb-month:hover { background: var(--cream); }
.cal-ribbon .rb-month .mo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; color: var(--emerald-900);
  font-weight: 500; line-height: 1;
}
.cal-ribbon .rb-month .yr {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 5px;
}
.cal-ribbon .rb-month .dots {
  display: flex; gap: 3px; margin-top: 10px; height: 6px;
}
.cal-ribbon .rb-month .dots span {
  width: 6px; height: 6px; border-radius: 999px;
}
.cal-ribbon .rb-month.active { background: var(--cream); }
.cal-ribbon .rb-month.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--gold);
}
.cal-ribbon .rb-month.is-today { background: rgba(184, 137, 58, 0.08); }
.cal-ribbon .rb-month .now {
  position: absolute; top: 8px; right: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 8.5px; letter-spacing: 0.14em;
  color: var(--bg); background: var(--emerald-900);
  padding: 2px 6px;
}

/* Main body */
.cal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0;
}
@media (max-width: 1080px) {
  .cal-body { grid-template-columns: 1fr; }
}

/* Left — month grid */
.cal-month {
  padding: 30px 32px 36px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.cal-month .head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.cal-month .head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1; color: var(--emerald-900);
  margin: 0; letter-spacing: -0.01em;
}
.cal-month .head h3 em { font-style: italic; color: var(--gold); font-weight: 500; }
.cal-month .head .nav { display: flex; gap: 4px; }
.cal-month .head .nav button {
  appearance: none; width: 38px; height: 38px;
  border: 1px solid var(--rule); background: var(--bg);
  display: grid; place-items: center;
  cursor: pointer; font-size: 16px; color: var(--emerald-900);
  transition: all .15s ease;
}
.cal-month .head .nav button:hover { background: var(--emerald-900); color: var(--gold-soft); border-color: var(--emerald-900); }
.cal-month .quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 17px;
  color: var(--ink-2); line-height: 1.45;
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  max-width: 60ch;
}

/* Day-of-week header */
.cal-grid-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-bottom: 0;
}
.cal-grid-head div {
  background: var(--cream);
  padding: 10px 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
  text-align: center;
}
.cal-grid-head div.sun { color: var(--gold); }

/* The day cells */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.cal-day {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  padding: 8px 9px 6px;
  position: relative;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.cal-day.empty {
  background: repeating-linear-gradient(135deg, var(--paper) 0 6px, var(--bg) 6px 12px);
  opacity: 0.4; cursor: default;
}
.cal-day.empty .n { display: none; }
.cal-day:hover:not(.empty) {
  background: var(--cream);
  z-index: 2;
}
.cal-day .n {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-weight: 500;
  color: var(--emerald-900);
  line-height: 1;
}
.cal-day.sun .n, .cal-day.sat .n { color: var(--gold); }
.cal-day.today {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
  background: var(--cream);
}
.cal-day.today .n {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--emerald-900);
  color: var(--gold-soft);
  font-size: 14px;
}
.cal-day.is-holiday { background: rgba(216, 76, 76, 0.06); }
.cal-day.is-holiday .n { color: #b14a4a; }
.cal-day.is-vacation {
  background:
    repeating-linear-gradient(135deg, rgba(184,137,58,0.10) 0 6px, transparent 6px 12px),
    var(--bg);
}
.cal-day .ev-dots {
  margin-top: auto;
  display: flex; gap: 3px; flex-wrap: wrap;
  align-items: flex-end;
}
.cal-day .ev-dots span {
  width: 6px; height: 6px;
  border-radius: 999px;
}
.cal-day .ev-chip {
  margin-top: 4px;
  font-size: 9.5px; line-height: 1.15;
  padding: 2px 4px;
  background: var(--paper);
  color: var(--ink-2);
  border-left: 2px solid var(--gold);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-day.is-holiday .ev-chip { background: rgba(216, 76, 76, 0.08); border-left-color: #b14a4a; color: #8e3232; }
.cal-day.is-vacation .ev-chip { background: rgba(184, 137, 58, 0.12); border-left-color: var(--gold); color: var(--emerald-900); }
.cal-day.is-exam .ev-chip { background: rgba(10, 61, 35, 0.08); border-left-color: var(--emerald-900); color: var(--emerald-900); font-weight: 600; }
.cal-day.is-festival .ev-chip { background: rgba(168, 60, 100, 0.08); border-left-color: #a83c64; color: #6e1f3e; }
.cal-day.is-ptm .ev-chip { background: rgba(46, 178, 74, 0.10); border-left-color: var(--emerald-500); color: #0e562c; }

/* Right — events list + key moments */
.cal-side {
  padding: 30px 32px 36px;
  background: var(--bg);
  min-height: 100%;
  display: flex; flex-direction: column;
  gap: 26px;
}
.cal-side .blk h4 {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.cal-side .blk h4::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}

.cal-events { list-style: none; padding: 0; margin: 0; }
.cal-events li {
  display: grid; grid-template-columns: 52px 1fr;
  gap: 14px; padding: 12px 0;
  border-top: 1px solid var(--rule-light);
}
.cal-events li:first-child { border-top: 0; padding-top: 4px; }
.cal-events .dt {
  text-align: center;
  border: 1px solid var(--rule);
  padding: 6px 0; background: var(--paper);
}
.cal-events .dt .d {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; line-height: 1; color: var(--emerald-900); font-weight: 500;
}
.cal-events .dt .w {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-top: 4px;
}
.cal-events .row .tag {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.cal-events .row .tag.holiday  { background: rgba(216,76,76,0.12); color: #8e3232; }
.cal-events .row .tag.vacation { background: rgba(184,137,58,0.18); color: var(--emerald-900); }
.cal-events .row .tag.exam     { background: rgba(10,61,35,0.10); color: var(--emerald-900); }
.cal-events .row .tag.festival { background: rgba(168,60,100,0.10); color: #6e1f3e; }
.cal-events .row .tag.event    { background: var(--cream); color: var(--ink-2); }
.cal-events .row .tag.ptm      { background: rgba(46,178,74,0.14); color: #0e562c; }
.cal-events .row .lbl {
  font-size: 13.5px; color: var(--ink); line-height: 1.4;
}
.cal-events .empty-msg {
  font-size: 13px; color: var(--ink-3); font-style: italic;
  padding: 16px 0; text-align: center;
  border: 1px dashed var(--rule);
}

/* "At a glance" stat strip */
.cal-glance {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  background: var(--paper);
}
.cal-glance .g { padding: 14px 12px; text-align: center; border-right: 1px solid var(--rule); }
.cal-glance .g:last-child { border-right: 0; }
.cal-glance .g .n {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; line-height: 1; color: var(--emerald-900); font-weight: 500;
}
.cal-glance .g .l {
  font-family: 'Manrope', sans-serif;
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 700; margin-top: 6px;
}
.cal-glance .g.holiday  .n { color: #b14a4a; }
.cal-glance .g.exam     .n { color: var(--emerald-900); }
.cal-glance .g.vacation .n { color: var(--gold); }
.cal-glance .g.festival .n { color: #a83c64; }

/* Legend */
.cal-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: 'Manrope', sans-serif;
  font-size: 11px; color: var(--ink-2);
  letter-spacing: 0.04em;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cal-legend span::before {
  content: ""; width: 9px; height: 9px; border-radius: 999px;
}
.cal-legend .holiday::before  { background: #b14a4a; }
.cal-legend .exam::before     { background: var(--emerald-900); }
.cal-legend .vacation::before { background: var(--gold); }
.cal-legend .festival::before { background: #a83c64; }
.cal-legend .event::before    { background: var(--ink-3); }
.cal-legend .ptm::before      { background: var(--emerald-500); }

/* Footer strip — fees reminder + footer note */
.cal-foot {
  padding: 18px 28px;
  background: var(--emerald-900);
  color: var(--gold-soft);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px; letter-spacing: 0.04em;
}
.cal-foot .reminder { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cal-foot .reminder .pill {
  background: rgba(184, 137, 58, 0.18);
  border: 1px solid rgba(184, 137, 58, 0.4);
  padding: 5px 11px;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 700;
}
.cal-foot .reminder b { color: var(--gold); }
.cal-foot .session-tail {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 14px;
  color: rgba(217, 182, 116, 0.7);
}

/* Day detail popover (centered modal) */
.cal-detail {
  position: fixed; inset: 0; z-index: 1050;
  display: none;
  background: rgba(8, 28, 18, 0.78);
  backdrop-filter: blur(6px);
}
.cal-detail.is-open { display: grid; place-items: center; padding: 24px; }
.cal-detail .card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--gold);
  width: min(540px, 100%);
  padding: 32px 36px 28px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.55);
  position: relative;
}
.cal-detail .card .x {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: transparent; border: 1px solid var(--rule);
  display: grid; place-items: center; cursor: pointer;
  font-size: 14px; color: var(--ink-2);
  border-radius: 999px;
}
.cal-detail .card .x:hover { background: var(--emerald-900); color: var(--gold-soft); border-color: var(--emerald-900); }
.cal-detail .card .when {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.cal-detail .card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 32px; line-height: 1.05;
  margin: 0 0 20px; color: var(--emerald-900); letter-spacing: -0.01em;
}
.cal-detail .card h4 em { color: var(--gold); font-style: italic; }
.cal-detail .card ul { list-style: none; padding: 0; margin: 0; }
.cal-detail .card li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--rule-light);
  font-size: 14px; color: var(--ink); line-height: 1.4;
}
.cal-detail .card li:first-child { border-top: 0; }
.cal-detail .card li .tag {
  flex: none;
  font-family: 'Manrope', sans-serif;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700; padding: 3px 8px;
  align-self: flex-start;
}
.cal-detail .card li .tag.holiday  { background: rgba(216,76,76,0.12); color: #8e3232; }
.cal-detail .card li .tag.vacation { background: rgba(184,137,58,0.18); color: var(--emerald-900); }
.cal-detail .card li .tag.exam     { background: rgba(10,61,35,0.10); color: var(--emerald-900); }
.cal-detail .card li .tag.festival { background: rgba(168,60,100,0.10); color: #6e1f3e; }
.cal-detail .card li .tag.event    { background: var(--cream); color: var(--ink-2); }
.cal-detail .card li .tag.ptm      { background: rgba(46,178,74,0.14); color: #0e562c; }
.cal-detail .card .nothing {
  text-align: center; padding: 16px 0; color: var(--ink-3);
  font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 16px;
}

/* Responsive */
@media (max-width: 760px) {
  .cal-top { grid-template-columns: 1fr; gap: 14px; padding: 18px 20px; }
  .cal-top .filters { justify-content: flex-start; }
  .cal-month { padding: 22px 18px 24px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .cal-side  { padding: 22px 18px; }
  .cal-day { padding: 5px 5px 4px; }
  .cal-day .n { font-size: 14px; }
  .cal-day .ev-chip { display: none; }
  .cal-glance { grid-template-columns: repeat(2, 1fr); }
  .cal-foot { padding: 14px 18px; }
}


/* ------------------------------------------------------------------------- */
/*  RANK HOLDERS (new — class-wise current exam)                             */
/* ------------------------------------------------------------------------- */
.ranks-section .ranks-head-line {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: center;
  margin: 18px auto 56px;
  padding: 14px 24px;
  border: 1px solid var(--gold);
  background: rgba(20, 82, 50, 0.4);
  color: var(--gold-soft);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
}
.ranks-section .ranks-head-line .ex-name { color: var(--bg); font-weight: 700; }
.ranks-section .ranks-head-line .ex-session { color: var(--gold); font-weight: 700; }
.ranks-section .ranks-head-line .ex-sep { opacity: 0.4; }

.ranks-container { display: grid; gap: 56px; }
.ranks-empty {
  text-align: center; padding: 56px;
  border: 1px dashed rgba(217,182,116,0.4);
  color: rgba(246,241,230,0.7); font-style: italic;
  font-family: 'Cormorant Garamond', serif; font-size: 18px;
}

/* Per-class block */
.rank-class { }
.rank-class .rc-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(217, 182, 116, 0.25);
}
.rank-class .rc-head .rc-eyebrow {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.rank-class .rc-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 44px; line-height: 1;
  color: var(--bg); margin: 0;
  letter-spacing: -0.01em;
}
.rank-class .rc-head .rc-rule {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(217,182,116,0.05));
  margin-bottom: 6px;
}
.rank-class .rc-head .rc-count {
  font-family: 'Manrope', sans-serif;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(246,241,230,0.5); font-weight: 600;
}

.rank-class .rc-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}

/* Rank card */
.rc-card {
  background: rgba(20, 82, 50, 0.5);
  border: 1px solid rgba(217, 182, 116, 0.4);
  position: relative;
  padding: 28px 26px 24px;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.rc-card::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid rgba(217, 182, 116, 0.18);
  pointer-events: none;
}
.rc-card:hover { transform: translateY(-3px); border-color: var(--gold); }

.rc-card.rank-1 {
  background: linear-gradient(180deg, rgba(184, 137, 58, 0.16), rgba(20, 82, 50, 0.5));
  border-color: var(--gold);
}
.rc-card .rc-badge {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--emerald-900);
  padding: 5px 18px 7px;
  display: inline-flex; align-items: baseline; gap: 8px;
  z-index: 2;
}
.rc-card.silver .rc-badge { background: var(--gold-soft); }
.rc-card.bronze .rc-badge { background: #c9a05a; }

.rc-card .rc-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; font-size: 20px; line-height: 1;
}
.rc-card .rc-pos {
  font-family: 'Manrope', sans-serif;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700;
}
.rc-card .rc-photo {
  aspect-ratio: 1 / 1;
  margin: 26px 0 18px;
  background: rgba(8, 28, 18, 0.55);
  border: 1px solid rgba(217, 182, 116, 0.18);
  display: grid; place-items: center;
  overflow: hidden;
  position: relative;
}
.rc-card .rc-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rc-card .rc-photo .rc-ph {
  color: rgba(217, 182, 116, 0.35);
  display: grid; place-items: center;
}
.rc-card .rc-photo .rc-ph svg { width: 48px; height: 48px; }

.rc-card .rc-body { text-align: center; position: relative; z-index: 1; }
.rc-card .rc-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 22px; line-height: 1.15;
  margin: 0 0 12px; color: var(--bg);
  letter-spacing: -0.005em;
}
.rc-card .rc-meta {
  display: flex; justify-content: center; gap: 24px;
  margin-bottom: 14px;
}
.rc-card .rc-meta > span { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.rc-card .rc-meta .k {
  font-family: 'Manrope', sans-serif;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(217,182,116,0.7); font-weight: 700;
}
.rc-card .rc-meta .v {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; color: var(--bg); font-weight: 500;
}
.rc-card .rc-marks {
  display: inline-flex; gap: 10px; align-items: baseline;
  padding: 8px 18px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.rc-card .rc-marks .n {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; color: var(--gold-soft); line-height: 1; font-weight: 500;
}
.rc-card .rc-marks .l {
  font-family: 'Manrope', sans-serif;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(217,182,116,0.75); font-weight: 700;
}

@media (max-width: 900px) {
  .rank-class .rc-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rank-class .rc-cards { grid-template-columns: 1fr; }
  .rank-class .rc-head h3 { font-size: 34px; }
}


/* ------------------------------------------------------------------------- */
/*  UNIFORM SECTION (inside Admissions)                                      */
/* ------------------------------------------------------------------------- */
.uniform-section {
  margin-top: 72px;
  border-top: 1px solid var(--rule);
  padding-top: 60px;
}
.uniform-section .uni-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px;
  align-items: end; margin-bottom: 36px; flex-wrap: wrap;
}
.uniform-section .uni-head .lbl {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.uniform-section .uni-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.04; color: var(--emerald-900);
  margin: 6px 0 0; letter-spacing: -0.01em;
}
.uniform-section .uni-head h2 em { font-style: italic; color: var(--gold); }
.uniform-section .uni-head .note {
  font-size: 12.5px; color: var(--ink-3); font-style: italic;
  max-width: 28ch; text-align: right;
}

.uniform-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.uniform-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .2s ease;
}
.uniform-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.uniform-card .uni-photo {
  aspect-ratio: 3 / 4;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.uniform-card .uni-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.uniform-card .uni-photo .placeholder {
  position: absolute; inset: 0;
}
.uniform-card .uni-body { padding: 20px 22px 24px; }
.uniform-card .uni-tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 10px;
}
.uniform-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 22px; line-height: 1.15;
  margin: 0 0 12px; color: var(--emerald-900);
  letter-spacing: -0.005em;
}
.uniform-card ul {
  list-style: none; padding: 0; margin: 0;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
}
.uniform-card li {
  padding: 8px 0;
  border-top: 1px dashed var(--rule-light);
  display: flex; gap: 8px;
}
.uniform-card li:first-child { border-top: 0; padding-top: 4px; }
.uniform-card li::before {
  content: "·"; color: var(--gold); font-weight: 700;
}

@media (max-width: 980px) { .uniform-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .uniform-grid { grid-template-columns: 1fr; } }
