/* =============================================================
   ST. MARY'S SCHOOL SUITE — Frontend CSS v1.0.0
   White + Maroon Red theme matching school branding
   ============================================================= */

/* ── Reset & base ── */
.sms-notices-wrap,.sms-events-section,.sms-press-wrap,
.sms-gallery-wrap,.sms-ticker-wrap,.sms-section-head {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--sms-text, #1a1a1a);
}
.sms-notices-wrap *,.sms-events-section *,.sms-press-wrap *,
.sms-gallery-wrap *,.sms-section-head * { box-sizing: border-box; }

/* ── Section heading ── */
.sms-section-head { margin-bottom: 36px; }
.sms-section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--sms-primary, #8B0000);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sms-section-subtitle { font-size: .95rem; color: var(--sms-text-mid, #555); margin: 0 0 12px; }
.sms-section-rule {
  display: block; width: 56px; height: 4px;
  background: var(--sms-primary, #8B0000);
  border-radius: 2px;
}

/* ── Badges ── */
.sms-badge {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
  background: var(--sms-primary, #8B0000);
  color: #fff; line-height: 1.4; white-space: nowrap;
}
.sms-badge--urgent   { background: #c0392b; color: #fff; animation: smsBadgePulse 2s infinite; }
.sms-badge--category { background: #f5f0f0; color: var(--sms-primary,#8B0000); border: 1px solid var(--sms-primary,#8B0000); }
.sms-badge--green    { background: #2ecc71; color: #fff; }
.sms-badge--grey     { background: #95a5a6; color: #fff; }
@keyframes smsBadgePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.4); }
  50%     { box-shadow: 0 0 0 5px rgba(192,57,43,0); }
}

/* ── Shared empty / no-items ── */
.sms-empty { color: var(--sms-text-mid,#555); font-style: italic; padding: 20px 0; }

/* ── Buttons ── */
.sms-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: var(--sms-radius,8px);
  font-size: .85rem; font-weight: 700;
  cursor: pointer; border: 2px solid transparent;
  text-decoration: none; transition: all .22s ease;
  letter-spacing: .03em;
}
.sms-btn--primary {
  background: var(--sms-primary,#8B0000); color: #fff;
  border-color: var(--sms-primary,#8B0000);
}
.sms-btn--primary:hover {
  background: var(--sms-primary-dark,#6a0000);
  border-color: var(--sms-primary-dark,#6a0000);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139,0,0,.35);
}
.sms-btn--outline {
  background: transparent;
  color: var(--sms-primary,#8B0000);
  border-color: var(--sms-primary,#8B0000);
}
.sms-btn--outline:hover {
  background: var(--sms-primary,#8B0000); color: #fff;
}

/* ═══════════════════════════════════════
   NOTICES
═══════════════════════════════════════ */
.sms-notices-wrap { display: flex; flex-direction: column; gap: 0; }

.sms-notice-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--sms-white,#fff);
  border-bottom: 1px solid var(--sms-border,#e2e2e2);
  border-left: 4px solid transparent;
  transition: all .2s ease;
}
.sms-notice-item:hover {
  border-left-color: var(--sms-primary,#8B0000);
  background: #fdf8f8;
  padding-left: 22px;
}
.sms-notice-item--important {
  border-left-color: var(--sms-primary,#8B0000);
  background: #fff8f8;
}
.sms-notice-icon { font-size: 1.2rem; flex-shrink: 0; }
.sms-notice-body { flex: 1; min-width: 0; }
.sms-notice-title {
  display: block; font-weight: 600; font-size: .92rem;
  color: var(--sms-text,#1a1a1a); text-decoration: none;
  margin-bottom: 3px; line-height: 1.4;
  transition: color .2s;
}
.sms-notice-title:hover { color: var(--sms-primary,#8B0000); }
.sms-notice-date {
  font-size: .76rem; color: var(--sms-text-mid,#555);
  display: flex; align-items: center; gap: 4px;
}
.sms-notice-dl {
  flex-shrink: 0; color: var(--sms-primary,#8B0000);
  padding: 6px; border-radius: var(--sms-radius,8px);
  transition: background .2s; display: flex;
}
.sms-notice-dl:hover { background: #fdf0f0; }

/* ═══════════════════════════════════════
   TICKER
═══════════════════════════════════════ */
.sms-ticker-wrap {
  display: flex; align-items: center; overflow: hidden;
  background: var(--sms-grey,#f5f5f5);
  border: 1px solid var(--sms-border,#e2e2e2);
  border-radius: var(--sms-radius,8px);
}
.sms-ticker-label {
  background: var(--sms-primary,#8B0000); color: #fff;
  font-size: .72rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 18px; white-space: nowrap; flex-shrink: 0;
}
.sms-ticker-track { flex: 1; overflow: hidden; }
.sms-ticker-scroll {
  display: flex; white-space: nowrap;
  animation: smsTickerScroll 28s linear infinite;
}
.sms-ticker-item {
  font-size: .82rem; color: var(--sms-text,#1a1a1a);
  padding: 10px 32px; text-decoration: none; transition: color .2s;
}
.sms-ticker-item:hover { color: var(--sms-primary,#8B0000); }
.sms-ticker-sep { color: var(--sms-primary,#8B0000); line-height: 2.4; opacity: .6; }
@keyframes smsTickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ═══════════════════════════════════════
   EVENTS
═══════════════════════════════════════ */
.sms-events-section { }

.sms-events-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 28px;
}
.sms-events-heading-wrap {}
.sms-events-heading {
  font-size: clamp(1.2rem,3vw,1.7rem); font-weight: 900;
  color: var(--sms-primary,#8B0000); margin: 0 0 6px;
  text-transform: uppercase; letter-spacing: .06em;
}
.sms-heading-rule {
  display: block; width: 44px; height: 4px;
  background: var(--sms-primary,#8B0000); border-radius: 2px;
}
.sms-events-controls { display: flex; gap: 8px; }
.sms-ev-prev,.sms-ev-next {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--sms-primary,#8B0000); color: #fff;
  border: none; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.sms-ev-prev:hover,.sms-ev-next:hover {
  background: var(--sms-primary-dark,#6a0000); transform: scale(1.08);
}

/* Slider track */
.sms-events-slider {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; padding-bottom: 8px;
}
.sms-events-slider::-webkit-scrollbar { height: 4px; }
.sms-events-slider::-webkit-scrollbar-track { background: var(--sms-grey,#f5f5f5); }
.sms-events-slider::-webkit-scrollbar-thumb { background: var(--sms-primary,#8B0000); border-radius: 2px; }

/* Grid mode */
.sms-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Event card */
.sms-event-card {
  flex: 0 0 280px; scroll-snap-align: start;
  background: var(--sms-white,#fff);
  border-radius: var(--sms-radius-lg,14px);
  border: 1px solid var(--sms-border,#e2e2e2);
  overflow: hidden;
  box-shadow: var(--sms-shadow,0 4px 20px rgba(0,0,0,.08));
  transition: transform .28s ease, box-shadow .28s ease;
  display: flex; flex-direction: column;
}
.sms-events-grid .sms-event-card { flex: unset; }
.sms-event-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sms-shadow-hover,0 8px 32px rgba(0,0,0,.15));
}
.sms-event-thumb {
  display: block; position: relative;
  aspect-ratio: 16/10; overflow: hidden; text-decoration: none;
}
.sms-event-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.sms-event-card:hover .sms-event-thumb img { transform: scale(1.05); }
.sms-event-thumb .sms-badge { position: absolute; top: 10px; left: 10px; }

.sms-event-body { padding: 18px 16px 20px; flex: 1; display: flex; flex-direction: column; }
.sms-event-title {
  font-size: 1rem; font-weight: 700; margin: 0 0 8px; line-height: 1.35;
}
.sms-event-title a { color: var(--sms-text,#1a1a1a); text-decoration: none; transition: color .2s; }
.sms-event-title a:hover { color: var(--sms-primary,#8B0000); }
.sms-event-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: .76rem; color: var(--sms-text-mid,#555);
  margin-bottom: 10px;
}
.sms-event-meta span { display: flex; align-items: center; gap: 4px; }
.sms-event-excerpt { font-size: .85rem; color: var(--sms-text-mid,#555); flex: 1; margin: 0 0 14px; }
.sms-event-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700;
  color: var(--sms-primary,#8B0000); text-decoration: none;
  margin-top: auto; transition: gap .2s;
}
.sms-event-more:hover { gap: 10px; }

/* thumb placeholder */
.sms-thumb-placeholder {
  width: 100%; height: 100%;
  background: var(--sms-grey,#f5f5f5);
  display: flex; align-items: center; justify-content: center;
  color: #ccc; aspect-ratio: 16/10;
}

/* ═══════════════════════════════════════
   PRESS
═══════════════════════════════════════ */
.sms-press-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols,3), 1fr);
  gap: 24px;
}
.sms-press-card {
  background: var(--sms-white,#fff);
  border-radius: var(--sms-radius-lg,14px);
  border: 1px solid var(--sms-border,#e2e2e2);
  overflow: hidden;
  box-shadow: var(--sms-shadow,0 4px 20px rgba(0,0,0,.08));
  transition: transform .28s ease, box-shadow .28s ease;
  cursor: pointer;
}
.sms-press-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sms-shadow-hover,0 8px 32px rgba(0,0,0,.15));
}
.sms-press-thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
}
.sms-press-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.sms-press-card:hover .sms-press-thumb img { transform: scale(1.04); }
.sms-press-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(139,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .28s;
}
.sms-press-card:hover .sms-press-thumb-overlay { opacity: 1; }
.sms-press-thumb-overlay span { color: #fff; font-weight: 700; font-size: .9rem; }
.sms-press-thumb .sms-badge { position: absolute; top: 10px; left: 10px; }

.sms-press-body { padding: 18px 16px 20px; }
.sms-press-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .74rem; color: var(--sms-text-mid,#555); margin-bottom: 8px;
}
.sms-pub-name { font-weight: 700; color: var(--sms-primary,#8B0000); }
.sms-pub-date { display: flex; align-items: center; gap: 4px; }
.sms-press-title { font-size: .97rem; font-weight: 700; color: var(--sms-text,#1a1a1a); margin: 0 0 8px; line-height: 1.35; }
.sms-press-desc { font-size: .83rem; color: var(--sms-text-mid,#555); margin: 0 0 14px; }

/* Press modal */
.sms-modal {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.sms-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.sms-modal-box {
  position: relative; z-index: 1;
  background: var(--sms-white,#fff);
  border-radius: var(--sms-radius-lg,14px);
  width: 100%; max-width: 860px; max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  animation: smsModalIn .28s ease;
}
@keyframes smsModalIn { from { opacity:0; transform:translateY(20px) scale(.97); } to { opacity:1; transform:none; } }
.sms-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #f0f0f0; border: none; font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .2s;
}
.sms-modal-close:hover { background: var(--sms-primary,#8B0000); color: #fff; }
.sms-modal-inner {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 300px;
}
@media (max-width:640px) { .sms-modal-inner { grid-template-columns: 1fr; } }
.sms-modal-media {
  background: #111; display: flex; flex-direction: column;
  align-items: center; justify-content: center; min-height: 260px;
  border-radius: var(--sms-radius-lg,14px) 0 0 var(--sms-radius-lg,14px);
  overflow: hidden; position: relative;
}
@media (max-width:640px) { .sms-modal-media { border-radius: var(--sms-radius-lg,14px) var(--sms-radius-lg,14px) 0 0; } }
#stmarys-modal-img { max-width: 100%; max-height: 420px; object-fit: contain; }
.sms-modal-img-nav {
  display: flex; align-items: center; gap: 12px;
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
}
.sms-modal-img-nav button {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
}
.sms-modal-img-nav button:hover { background: rgba(255,255,255,.4); }
#stmarys-img-counter { color: #fff; font-size: .78rem; }
.sms-modal-content { padding: 28px 26px; }
.sms-modal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: .78rem; color: var(--sms-text-mid,#555); }
.sms-modal-title { font-size: 1.2rem; font-weight: 800; color: var(--sms-text,#1a1a1a); margin: 0 0 14px; }
.sms-modal-full { font-size: .88rem; color: var(--sms-text-mid,#555); line-height: 1.75; margin-bottom: 18px; white-space: pre-line; }

/* ═══════════════════════════════════════
   GALLERY
═══════════════════════════════════════ */
.sms-folders-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols,3), 1fr);
  gap: 22px;
}
.sms-folder-card {
  background: var(--sms-white,#fff);
  border-radius: var(--sms-radius-lg,14px);
  border: 1px solid var(--sms-border,#e2e2e2);
  overflow: hidden; cursor: pointer;
  box-shadow: var(--sms-shadow,0 4px 20px rgba(0,0,0,.08));
  transition: transform .28s ease, box-shadow .28s ease;
  position: relative;
}
.sms-folder-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sms-shadow-hover,0 8px 32px rgba(0,0,0,.15));
}
.sms-folder-cover {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  display: block; transition: transform .5s ease;
}
.sms-folder-card:hover .sms-folder-cover { transform: scale(1.04); }
.sms-folder-overlay {
  position: absolute; top: 0; left: 0; right: 0;
  aspect-ratio: 4/3;
  background: rgba(139,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .28s;
}
.sms-folder-card:hover .sms-folder-overlay { opacity: 1; }
.sms-folder-overlay span { color: #fff; font-weight: 700; font-size: .9rem; }
.sms-folder-info {
  padding: 14px 14px 16px;
  border-top: 3px solid var(--sms-primary,#8B0000);
}
.sms-folder-name { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.sms-folder-meta { font-size: .75rem; color: var(--sms-text-mid,#555); margin-bottom: 6px; }

/* Back button */
.sms-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sms-primary,#8B0000); color: #fff;
  border: none; padding: 9px 20px; border-radius: var(--sms-radius,8px);
  font-size: .85rem; font-weight: 700; cursor: pointer;
  margin-bottom: 20px; transition: background .2s;
}
.sms-back-btn:hover { background: var(--sms-primary-dark,#6a0000); }

.sms-photo-view-header { margin-bottom: 20px; }
.sms-photo-view-header h2 { font-size: 1.4rem; font-weight: 800; color: var(--sms-primary,#8B0000); margin: 0 0 4px; }
.sms-photo-view-date { font-size: .82rem; color: var(--sms-text-mid,#555); margin: 0; }

.sms-videos-wrap { display: flex; flex-direction: column; gap: 4px; }

.sms-youtube-embed {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; border-radius: var(--sms-radius,8px);
  margin-bottom: 24px;
}
.sms-youtube-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Photo grid inside album */
.sms-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.sms-photo-thumb {
  aspect-ratio: 1; overflow: hidden; border-radius: var(--sms-radius,8px);
  cursor: pointer; position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.1); transition: transform .25s;
}
.sms-photo-thumb:hover { transform: scale(1.03); }
.sms-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sms-photo-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(139,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .22s;
  color: #fff; font-size: 1.4rem;
}
.sms-photo-thumb:hover .sms-photo-thumb-overlay { opacity: 1; }

/* Lightbox */
.sms-lightbox {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.sms-lb-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: #fff;
  font-size: 2rem; cursor: pointer; z-index: 1;
  line-height: 1; transition: color .2s;
}
.sms-lb-close:hover { color: var(--sms-primary,#8B0000); }
.sms-lb-content { text-align: center; max-width: 90vw; }
.sms-lb-content img { max-width: 88vw; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.sms-lb-caption { color: rgba(255,255,255,.75); font-size: .85rem; margin-top: 10px; }
.sms-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  font-size: 2.5rem; width: 50px; height: 80px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; border-radius: 4px;
}
.sms-lb-nav:hover { background: var(--sms-primary,#8B0000); }
.sms-lb-prev { left: 10px; }
.sms-lb-next { right: 10px; }

/* ── Sidebar widgets ── */
.sms-widget-events,.sms-widget-press { list-style: none; padding: 0; margin: 0; }

.sms-widget-event-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--sms-border,#e2e2e2);
}
.sms-widget-event-date {
  min-width: 46px; background: var(--sms-primary,#8B0000); color: #fff;
  text-align: center; padding: 5px 6px; border-radius: 6px;
  font-size: .75rem; font-weight: 700; line-height: 1.2; flex-shrink: 0;
}
.sms-widget-venue { display: block; font-size: .72rem; color: var(--sms-text-mid,#555); margin-top: 2px; }

.sms-widget-press-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--sms-border,#e2e2e2);
}
.sms-widget-press-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sms-widget-press-title { display: block; font-size: .85rem; font-weight: 600; color: var(--sms-text,#1a1a1a); line-height: 1.35; }
.sms-widget-press-pub  { display: block; font-size: .72rem; color: var(--sms-primary,#8B0000); }
.sms-widget-press-date { display: block; font-size: .7rem;  color: var(--sms-text-mid,#555); }
.sms-widget-link { font-size: .75rem; font-weight: 700; color: var(--sms-primary,#8B0000); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sms-press-grid { --cols: 2 !important; }
  .sms-folders-grid { --cols: 2 !important; }
}
@media (max-width: 580px) {
  .sms-press-grid { --cols: 1 !important; }
  .sms-folders-grid { --cols: 1 !important; }
  .sms-events-grid { grid-template-columns: 1fr; }
  .sms-lb-nav { display: none; }
  .sms-modal-inner { grid-template-columns: 1fr; }
}

/* =============================================================
   SCHOOL CALENDAR  [stmarys_calendar]  — month grid + agenda
   Shared by the Academics page shortcode AND the homepage
   ============================================================= */

.stms-calx { display:grid; grid-template-columns: 1.3fr 1fr; gap:28px; align-items:start; }
@media (max-width:900px) { .stms-calx { grid-template-columns:1fr; } }

/* ── Month grid ── */
.stms-calx__grid-wrap { background:#fff; border:1px solid #edece8; border-radius:var(--sms-radius-lg,14px); padding:18px; box-shadow:var(--sms-shadow,0 4px 20px rgba(0,0,0,.08)); }
.stms-calx__head { text-align:center; margin-bottom:12px; }
.stms-calx__month-name { font-size:18px; font-weight:800; color:var(--sms-primary,#7B1D2A); letter-spacing:.01em; }

.stms-calx__dow { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-bottom:6px; }
.stms-calx__dow span { text-align:center; font-size:10.5px; font-weight:700; color:#8a8980; text-transform:uppercase; letter-spacing:.04em; }

.stms-calx__grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.stms-calx__cell {
  min-height:64px; border-radius:8px; background:#faf9f7; border:1px solid #f0eee8;
  padding:4px 4px 5px; display:flex; flex-direction:column; gap:2px; overflow:hidden;
}
.stms-calx__cell--empty { background:transparent; border-color:transparent; }
.stms-calx__cell.is-today { border-color:var(--sms-primary,#7B1D2A); box-shadow:inset 0 0 0 1px var(--sms-primary,#7B1D2A); }
.stms-calx__cell.is-holiday { background:#fff8f5; }
.stms-calx__daynum { font-size:11.5px; font-weight:700; color:#6b6a63; }
.stms-calx__cell.is-today .stms-calx__daynum { color:var(--sms-primary,#7B1D2A); }
.stms-calx__chip {
  display:block; font-size:9.5px; font-weight:600; color:#fff; line-height:1.3;
  border-radius:4px; padding:1.5px 4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.stms-calx__more { font-size:9px; font-weight:700; color:#8a8980; padding-left:2px; }

@media (max-width:640px) {
  .stms-calx__cell { min-height:44px; padding:3px; }
  .stms-calx__chip { font-size:0; padding:2px; height:6px; border-radius:3px; }
  .stms-calx__daynum { font-size:10px; }
}

/* ── Agenda list ── */
.stms-calx__agenda { background:#fff; border:1px solid #edece8; border-radius:var(--sms-radius-lg,14px); padding:18px; box-shadow:var(--sms-shadow,0 4px 20px rgba(0,0,0,.08)); }
.stms-calx__agenda-label { font-size:11px; font-weight:800; color:#8a8980; text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }

.stms-calx__row { display:flex; align-items:flex-start; gap:12px; padding:11px 0; border-bottom:1px solid #f0eee8; }
.stms-calx__row:last-child { border-bottom:none; }
.stms-calx__row.is-holiday { background:#fff8f5; margin:0 -8px; padding:11px 8px; border-radius:8px; }

.stms-calx__row-date {
  min-width:46px; border-radius:8px; display:flex; flex-direction:column;
  align-items:center; justify-content:center; padding:6px 4px; flex-shrink:0; text-align:center;
}
.stms-calx__row-date span { font-size:17px; font-weight:800; color:#fff; line-height:1; }
.stms-calx__row-date small { font-size:9px; font-weight:700; color:rgba(255,255,255,.8); text-transform:uppercase; letter-spacing:.04em; }

.stms-calx__row-body { flex:1; min-width:0; }
.stms-calx__row-title { font-size:14px; font-weight:600; color:#1e1e1c; line-height:1.4; margin-bottom:3px; }
.stms-calx__row-meta { font-size:12px; color:#8a8980; }

/* Badge shared */
.sms-badge--category {
  background:#f8eef0; color:#7B1D2A;
  font-size:10px; font-weight:700;
  padding:2px 9px; border-radius:100px;
  display:inline-block; margin-bottom:4px;
}

/* =============================================================
   RESULT HIGHLIGHTS  [stmarys_results]
   ============================================================= */
.stms-results-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:24px;
}

.stms-result-card {
  background:#fff; border-radius:12px;
  border:1px solid #edece8;
  box-shadow:0 2px 14px rgba(123,29,42,.07);
  overflow:hidden; display:flex; flex-direction:column;
  transition:box-shadow .22s, transform .22s;
}
.stms-result-card:hover { box-shadow:0 8px 32px rgba(123,29,42,.14); transform:translateY(-3px); }

.stms-result-card__head {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px 10px; border-bottom:1px solid #f8eef0;
}
.stms-result-board-badge {
  background:#7B1D2A; color:#fff;
  font-size:11px; font-weight:700;
  padding:3px 12px; border-radius:100px;
  letter-spacing:.04em;
}
.stms-result-year { font-size:12px; color:#8a8980; font-weight:500; }

.stms-result-card__title {
  font-size:17px; font-weight:700; color:#1e1e1c;
  padding:12px 18px 6px; margin:0; line-height:1.3;
}

/* Topper strip */
.stms-result-topper {
  display:flex; align-items:center; gap:12px;
  margin:6px 18px 10px; padding:12px 14px;
  background:linear-gradient(135deg,#fcf5f6,#fff8e8);
  border-radius:9px; border:1px solid rgba(201,151,58,.25);
}
.stms-result-topper__img {
  width:48px; height:56px; object-fit:cover;
  object-position:top; border-radius:7px;
  border:2px solid rgba(201,151,58,.4);
  flex-shrink:0;
}
.stms-result-topper__info { display:flex; flex-direction:column; gap:2px; }
.stms-result-topper__label { font-size:10px; font-weight:700; color:#C9973A; text-transform:uppercase; letter-spacing:.06em; }
.stms-result-topper__info strong { font-size:14px; color:#1e1e1c; }
.stms-result-topper__score { font-size:13px; font-weight:700; color:#7B1D2A; }

/* Stats row */
.stms-result-stats {
  display:flex; gap:0; border-top:1px solid #f8eef0;
  border-bottom:1px solid #f8eef0; margin:0 0 14px;
}
.stms-result-stat {
  flex:1; display:flex; flex-direction:column;
  align-items:center; padding:10px 8px;
  border-right:1px solid #f8eef0;
}
.stms-result-stat:last-child { border-right:none; }
.stms-result-stat span { font-size:20px; font-weight:800; color:#7B1D2A; line-height:1; }
.stms-result-stat small { font-size:10px; color:#8a8980; margin-top:3px; text-align:center; }

/* Students grid */
.stms-result-students {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(80px,1fr));
  gap:10px; padding:0 18px 14px;
}
.stms-result-student {
  display:flex; flex-direction:column; align-items:center;
  text-align:center; gap:4px; position:relative;
}
.stms-result-student img,
.stms-result-student__avatar {
  width:56px; height:66px; object-fit:cover;
  object-position:top; border-radius:8px;
  border:2px solid #edece8; font-size:24px;
  display:flex; align-items:center; justify-content:center;
  background:#f5f5f3;
}
.stms-result-student.is-topper img,
.stms-result-student.is-topper .stms-result-student__avatar {
  border-color:#C9973A; box-shadow:0 0 0 2px rgba(201,151,58,.25);
}
.stms-result-student__rank {
  position:absolute; top:-6px; left:50%; transform:translateX(-50%);
  background:#C9973A; color:#fff;
  font-size:9px; font-weight:800; padding:1px 7px; border-radius:100px;
  white-space:nowrap;
}
.stms-result-student__name  { font-size:11px; font-weight:600; color:#1e1e1c; line-height:1.25; }
.stms-result-student__score { font-size:11px; font-weight:700; color:#7B1D2A; }
.stms-result-more { grid-column:1/-1; text-align:center; font-size:12px; color:#8a8980; font-weight:600; padding:4px; }

/* Download btn */
.stms-result-dl-btn {
  display:block; margin:0 18px 18px; padding:10px 16px;
  background:#f8eef0; color:#7B1D2A; border-radius:7px;
  font-size:13px; font-weight:700; text-align:center;
  text-decoration:none; transition:background .2s;
  border:1px solid rgba(123,29,42,.15);
}
.stms-result-dl-btn:hover { background:#7B1D2A; color:#fff; }

/* ── Responsive ── */
@media (max-width:768px) {
  .stms-results-grid { grid-template-columns:1fr; }
  .stms-cal-cards    { grid-template-columns:1fr; }
  .stms-result-students { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:480px) {
  .stms-result-students { grid-template-columns:repeat(2,1fr); }
}
