/* ============================================================
   Tamil Center of Stamford, Inc. — Proof of Concept
   Shared stylesheet. Portable static CSS, no framework.
   Palette + type derived from the real TCSI logo & 2026 flyer.
   ------------------------------------------------------------
   For Sathish: all colors are CSS variables in :root below.
   Swap brand values in one place and the whole site updates.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy:        #1a2a52;   /* primary — from logo ring / flyer border */
  --navy-deep:   #131f3d;
  --gold:        #d99a2b;   /* accent — from logo sun / flyer bullets  */
  --gold-soft:   #e8b657;
  --clay:        #b06a3a;   /* secondary — from roundel figure         */
  --cream:       #faf3e3;   /* page background — from flyer panel       */
  --cream-deep:  #f3e9d2;
  --ink:         #2a2f3a;   /* body text                                */
  --ink-soft:    #5b6270;
  --line:        #e5dcc3;   /* hairline dividers                        */
  --white:       #ffffff;

  /* Semantic colours — these switch in dark mode (see [data-theme="dark"] below).
     Brand colours above stay the same in both themes. */
  --heading:     var(--navy);      /* headings and navy-coloured text        */
  --surface:     var(--white);     /* cards, menus, dialogs, form fields     */
  --accent-text: var(--clay);      /* links and clay-coloured text           */
  --header-bg:   rgba(250, 243, 227, 0.92);
  --note-bg:     #fff8e8;          /* notice boxes                           */
  --hatch:       #efe3c6;          /* placeholder stripes                    */
  --ok:          #2e7d32;
  color-scheme: light;

  --maxw: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(19, 31, 61, 0.28);
  --shadow-sm: 0 4px 14px -8px rgba(19, 31, 61, 0.30);

  --serif: "Fraunces", "Noto Serif Tamil", Georgia, serif;
  --sans:  "Inter", "Noto Sans Tamil", system-ui, sans-serif;
  --tamil: "Noto Serif Tamil", "Fraunces", serif;
}

/* ---------- Dark theme ----------
   js/theme-init.js sets <html data-theme="dark"> before the page draws, from the
   visitor's choice (header switch) or their device setting. Navy backgrounds
   (hero, footer, buttons) stay navy; page, surfaces and text flip. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --cream:       #0e1526;
  --cream-deep:  #151f36;
  --ink:         #e4e7ee;
  --ink-soft:    #a8b0c3;
  --line:        #2a3553;
  --heading:     #eef1f8;
  --surface:     #18223c;
  --accent-text: #e2a06f;
  --header-bg:   rgba(14, 21, 38, 0.92);
  --note-bg:     #2a2416;
  --hatch:       #1c2742;
  --ok:          #6fcf7a;
  --shadow:      0 10px 30px -12px rgba(0, 0, 0, 0.65);
  --shadow-sm:   0 4px 14px -8px rgba(0, 0, 0, 0.65);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--heading); line-height: 1.12; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 0.6em; }
h3 { font-size: 1.25rem; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }
.tamil { font-family: var(--tamil); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--cream-deep); }
.section--navy { background: var(--navy); color: #eef1f7; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.center .lede { margin-inline: auto; }

/* Eyebrow label */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 0.6rem;
}
.section--navy .eyebrow { color: var(--gold-soft); }

/* Kolam divider — the signature motif (Tamil floor-art inspired) */
.kolam {
  width: 120px; height: 22px; margin: 1.4rem 0;
  color: var(--gold);
}
.center .kolam { margin-inline: auto; }

/* ---------- Header / nav ---------- */
/* Two rows: brand + actions on top, main navigation underneath. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-top {
  display: flex; align-items: center; gap: 1rem;
  max-width: var(--maxw); margin-inline: auto;
  padding: 0.6rem var(--gap);
}
.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.brand { display: flex; align-items: center; gap: 0.7rem; flex: 0 1 auto; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-text strong { font-family: var(--serif); color: var(--heading); font-size: 1.02rem; }
.brand-text span { font-size: 0.7rem; color: var(--ink-soft); letter-spacing: 0.02em; }
.brand-text b span { font-size: inherit; color: inherit; letter-spacing: inherit; }   /* the name is two spans (kept for flexibility) styled like the name */

.header-nav { border-top: 1px solid var(--line); }
.nav-links {
  display: flex; justify-content: center; align-items: center; gap: 0.1rem;
  max-width: var(--maxw); margin-inline: auto; padding: 0.2rem var(--gap);
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink); font-size: 0.9rem; font-weight: 500;
  padding: 0.5rem 0.6rem; border-radius: 8px; display: block; white-space: nowrap;
}
.nav-links a:hover { background: var(--cream-deep); text-decoration: none; color: var(--heading); }
.nav-links a.active { color: var(--heading); font-weight: 700; }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; background: var(--gold);
  border-radius: 2px; margin-top: 3px;
}
.nav-cta {
  background: var(--gold); color: var(--navy) !important; font-weight: 700 !important;
  border-radius: 999px !important; padding: 0.4rem 0.85rem !important; white-space: nowrap;
  font-size: 0.9rem;
}
.nav-cta:hover { background: var(--gold-soft); }

/* ---- Authentication control (Log in button / account menu) ---- */
.auth-slot { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.auth-slot:empty { display: none; }

.user-menu { position: relative; }
.user-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: inherit; font-size: 0.92rem; color: var(--ink); cursor: pointer;
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.22rem 0.75rem 0.22rem 0.22rem; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.user-toggle:hover, .user-menu.open .user-toggle { background: var(--cream-deep); border-color: var(--heading); }
.user-toggle b { color: var(--heading); }
.caret { width: 0.75em; height: 0.75em; flex: 0 0 auto; transition: transform 0.18s; }
.user-menu.open .caret { transform: rotate(180deg); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; flex: 0 0 auto;
  background: var(--navy); color: var(--gold-soft); font-weight: 700; font-size: 0.85rem;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar--guest { background: var(--cream-deep); color: var(--heading); }
.user-avatar svg { width: 18px; height: 18px; }
.user-menu.open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu button {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; font: inherit;
  padding: 0.6rem 0.8rem; border-radius: 8px;
  color: var(--ink); font-size: 0.92rem; font-weight: 500;
}
.nav-menu button:hover { background: var(--cream-deep); color: var(--heading); }
.user-dropdown a + button { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 0.2rem; }

/* "Log in with email" dialog */
.auth-dialog {
  border: 0; border-radius: var(--radius); padding: 0;
  width: min(420px, calc(100vw - 2rem));
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.auth-dialog::backdrop { background: rgba(19, 31, 61, 0.45); }
.auth-dialog-body, .auth-dialog form { display: flex; flex-direction: column; gap: 0.6rem; }
.auth-dialog-body { position: relative; padding: 1.6rem; }
.auth-dialog h3 { margin: 0 1.5rem 0 0; }
.auth-dialog p { margin: 0; }
.auth-dialog label { font-weight: 600; font-size: 0.88rem; color: var(--heading); margin-top: 0.3rem; }
.auth-dialog input {
  font: inherit; padding: 0.65rem 0.8rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--cream);
}
.auth-dialog input:focus { outline: none; border-color: var(--heading); }
.auth-dialog-msg { font-size: 0.88rem; color: var(--accent-text); min-height: 1.2em; }
.auth-dialog .btn { justify-content: center; cursor: pointer; font: inherit; font-weight: 700; }
.auth-dialog .btn:disabled { opacity: 0.6; cursor: default; }
.auth-dialog-close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  background: none; border: 0; font-size: 1.6rem; line-height: 1;
  cursor: pointer; color: var(--ink-soft);
}
.auth-dialog-close:hover { color: var(--heading); }
.auth-dialog-body.center { align-items: center; text-align: center; }
.auth-dialog-body.center h3 { margin: 0.2rem 0 0; }
.coming-soon-seal img { width: 64px; height: 64px; border-radius: 50%; box-shadow: var(--shadow-sm); }
.auth-dialog-body.center .btn { min-width: 140px; margin-top: 0.4rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.4rem; }
.dialog-actions .btn { margin-top: 0; }

/* My Profile form */
.profile-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; grid-column: span 3; }
.field--wide { grid-column: 1 / -1; }
.field--city { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .field--city, .field--short { grid-column: span 2; }
}
@media (max-width: 480px) { .field { grid-column: 1 / -1; } }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--heading); }
.field input {
  font: inherit; padding: 0.6rem 0.8rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--cream);
}
.field input:focus { outline: none; border-color: var(--heading); }
.field input:disabled { color: var(--ink-soft); background: var(--cream-deep); }
.field input[aria-invalid="true"] { border-color: var(--clay); }
.field-error { font-size: 0.82rem; color: var(--accent-text); min-height: 0; }
.field-hint { font-size: 0.82rem; color: var(--ink-soft); }
.check { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.form-msg { margin: 0; font-size: 0.92rem; color: var(--accent-text); min-height: 1.3em; }
.form-msg--ok { color: var(--ok); }
.form-notice {
  margin: 0; padding: 0.7rem 0.9rem; border-radius: 10px; font-size: 0.9rem;
  background: var(--note-bg); border-left: 4px solid var(--gold); color: var(--ink);
}
.profile-form .btn { align-self: flex-start; cursor: pointer; font: inherit; font-weight: 700; }
.profile-form .btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Signed-out page */
.signed-out-card { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.signed-out-card:hover { transform: none; }
.signed-out-seal { width: 84px; height: 84px; border-radius: 50%; box-shadow: var(--shadow-sm); margin-bottom: 0.4rem; }
.signed-out-card h2 { margin: 0.2rem 0 0.4rem; }
.signed-out-card .tamil { font-family: var(--tamil); }
.signed-out-card p { margin: 0 0 0.4rem; }

/* Zeffy checkout pop-up (js/site.js: initZeffyCheckout) */
.zeffy-dialog {
  border: 0; padding: 0; margin: 0; background: var(--surface);
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  overflow: hidden;
}
@media (min-width: 769px) {
  .zeffy-dialog {
    inset: 5% 10%; width: auto; height: auto; margin: 0;
    border-radius: var(--radius); box-shadow: var(--shadow);
  }
}
.zeffy-dialog::backdrop { background: rgba(19, 31, 61, 0.55); }
.zeffy-dialog iframe { display: block; width: 100%; height: 100%; border: 0; }
.zeffy-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--heading); font-size: 1.5rem; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.zeffy-close:hover { background: var(--cream-deep); }
.zeffy-loading {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem;
  color: var(--ink-soft); font-size: 0.95rem; background: var(--surface);
}
.zeffy-loading img { width: 64px; height: 64px; border-radius: 50%; box-shadow: var(--shadow-sm); }
.zeffy-dialog.is-loading .zeffy-loading { display: flex; }

/* Privacy Policy / Terms of Service */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
.legal h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; font-family: var(--sans); font-weight: 700; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.2rem; margin: 0.4rem 0 1rem; }
.legal li { margin-bottom: 0.35rem; }
.site-footer .footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; }

/* Theme switch (header) — js/site.js renderThemeSwitch() */
.theme-switch { position: relative; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.3rem; height: 38px; padding: 0 0.6rem 0 0.7rem;
  border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--heading);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.theme-toggle .caret { width: 0.75em; height: 0.75em; transition: transform 0.18s; }
.theme-switch.open .theme-toggle .caret { transform: rotate(180deg); }
.theme-toggle:hover, .theme-switch.open .theme-toggle { background: var(--cream-deep); border-color: var(--heading); }
.theme-toggle > svg:first-child, .theme-menu svg { width: 18px; height: 18px; }
.theme-switch.open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-menu { min-width: 170px; }
.theme-menu button { display: flex; align-items: center; gap: 0.6rem; }
.theme-menu button[aria-checked="true"] { font-weight: 700; color: var(--heading); }
.theme-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--gold); }

/* Videos & Gallery pages (js/videos.js, js/gallery.js) */
.media-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.media-toolbar .filter-chips { margin-bottom: 0; }
.filter-chips[hidden] { display: none; }
.filter-chip {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 0.4rem 0.95rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--heading);
}
.filter-chip:hover { border-color: var(--heading); }
.filter-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .filter-chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.media-note { font-size: 0.88rem; margin-top: 1.4rem; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.video-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform 0.18s, box-shadow 0.18s;
}
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--navy-deep); overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(19, 31, 61, 0.78); color: #fff; transition: background 0.15s, transform 0.15s;
}
.video-play svg { width: 26px; height: 26px; margin-left: 3px; }
.video-card:hover .video-play { background: var(--gold); color: var(--navy-deep); transform: scale(1.06); }
.video-meta { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem 1.1rem; }
.video-meta .pill { align-self: flex-start; }
.video-meta b { color: var(--heading); font-size: 1.02rem; }
.video-meta .muted { font-size: 0.85rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.9rem; }
.photo-grid figure { margin: 0; }
.photo-grid figure[hidden] { display: none; }
.photo-open {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: var(--cream-deep);
  border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 2;
}
.photo-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.photo-open:hover img { transform: scale(1.04); }

/* Playlists (Videos page) */
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.8rem 1.3rem; }
.playlist-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; padding-top: 10px; }
.playlist-card:hover { text-decoration: none; }
.playlist-thumb { position: relative; display: block; aspect-ratio: 16 / 9; }
.playlist-thumb img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 12px; background: var(--navy-deep); box-shadow: var(--shadow);
}
/* Two "cards" peeking out behind the thumbnail = a playlist */
.playlist-stack, .playlist-stack::before {
  position: absolute; left: 6%; right: 6%; top: -6px; height: 20px; border-radius: 10px 10px 0 0;
  background: var(--navy); opacity: 0.55;
}
.playlist-stack::before { content: ""; left: 6%; right: 6%; top: -5px; opacity: 0.6; }
.playlist-count {
  position: absolute; z-index: 2; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 6px; background: rgba(8, 12, 24, 0.82); color: #fff; font-size: 0.8rem; font-weight: 600;
}
.playlist-count svg { width: 15px; height: 15px; }
.playlist-thumb .video-play { z-index: 2; opacity: 0; transition: opacity 0.2s; }
.playlist-card:hover .video-play, .playlist-card:focus-visible .video-play { opacity: 1; background: var(--gold); color: var(--navy-deep); }
.playlist-card .video-meta { padding: 0.8rem 0.1rem 0; }
.playlist-card:focus-visible .playlist-thumb img { outline: 3px solid var(--gold); outline-offset: 3px; }

.playlist-player { max-width: 960px; margin: 0 auto 1rem; scroll-margin-top: 130px; }
.playlist-now { margin: 0.6rem 0 0; text-align: center; color: var(--ink-soft); }
.playlist-now b { color: var(--heading); }
.video-card.is-current { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.now-playing {
  position: absolute; left: 8px; top: 8px; padding: 0.15rem 0.5rem; border-radius: 6px;
  background: var(--gold); color: var(--navy-deep); font-size: 0.75rem; font-weight: 700;
}

/* Full-screen viewer for photos and videos */
.media-viewer {
  border: 0; padding: 0; background: transparent; color: #eef1f7;
  width: min(1100px, 94vw); max-width: none; max-height: 94vh; overflow: visible;
}
.media-viewer::backdrop { background: rgba(8, 12, 24, 0.9); }
.media-viewer figure { margin: 0; text-align: center; }
.media-viewer img { max-width: 100%; max-height: 80vh; border-radius: 10px; display: block; margin: 0 auto; }
.media-caption { margin: 0.8rem 0 0; text-align: center; color: #c9d2e6; font-size: 0.95rem; }
.media-caption b { color: #fff; }
.media-caption .muted { color: #9fb0d8; }
.media-caption a { color: var(--gold-soft); }
.video-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 10px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-close, .media-nav {
  position: absolute; z-index: 2; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; line-height: 1;
}
.media-close { top: -46px; right: 0; width: 38px; height: 38px; font-size: 1.6rem; }
.media-top { position: absolute; top: -48px; right: 0; display: flex; gap: 0.6rem; align-items: center; z-index: 2; }
.media-top .media-close { position: static; }
.media-play {
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; height: 38px; padding: 0 0.95rem;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff;
}
.media-play:hover { background: var(--gold); color: var(--navy-deep); }

/* Event albums: photo stacks, grouped by year */
.album-year { margin: 2rem 0 1rem; font-size: 1.3rem; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 2rem 1.6rem; }
.album-card { position: relative; display: flex; flex-direction: column; color: inherit; text-decoration: none; padding-top: 12px; }
.album-card:hover { text-decoration: none; }
.album-stack img {
  position: absolute; top: 12px; left: 8%; width: 84%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 12px; border: 3px solid var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}
.album-stack img:nth-child(1) { transform: rotate(-5deg) translate(-6px, -4px); }
.album-stack img:nth-child(2) { transform: rotate(4deg) translate(6px, -6px); }
.album-card:hover .album-stack img:nth-child(1) { transform: rotate(-9deg) translate(-18px, -6px); }
.album-card:hover .album-stack img:nth-child(2) { transform: rotate(8deg) translate(18px, -8px); }
.album-cover {
  position: relative; z-index: 1; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 14px; border: 3px solid var(--surface); background: var(--cream-deep); box-shadow: var(--shadow);
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-count {
  position: absolute; right: 10px; bottom: 10px; padding: 0.2rem 0.6rem; border-radius: 999px;
  background: rgba(19, 31, 61, 0.8); color: #fff; font-size: 0.8rem; font-weight: 600;
}
.album-meta { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.9rem 0.2rem 0; }
.album-meta .pill { align-self: flex-start; }
.album-meta b { color: var(--heading); font-size: 1.05rem; line-height: 1.3; }
.album-meta .muted { font-size: 0.88rem; }
.album-card:focus-visible .album-cover { outline: 3px solid var(--gold); outline-offset: 3px; }

/* One album */
.breadcrumb-inline { margin-bottom: 1rem; font-size: 0.92rem; }
.album-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 1.6rem; }
.album-head h2 { margin: 0.5rem 0 0.3rem; }
.album-head .btn-row { margin: 0; }
.mosaic { columns: 4 220px; column-gap: 0.7rem; }
.mosaic-item {
  display: block; width: 100%; margin: 0 0 0.7rem; padding: 0; border: 0; cursor: zoom-in; break-inside: avoid;
  border-radius: 10px; overflow: hidden; background: var(--cream-deep);
}
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.mosaic-item:hover img { transform: scale(1.03); }
.media-nav { top: 40%; width: 46px; height: 46px; font-size: 2rem; }
.media-nav.prev { left: -58px; } .media-nav.next { right: -58px; }
.media-close:hover, .media-nav:hover { background: var(--gold); color: var(--navy-deep); }
@media (max-width: 760px) {
  .media-nav.prev { left: 6px; } .media-nav.next { right: 6px; }
  .media-nav { top: auto; bottom: 64px; background: rgba(0, 0, 0, 0.5); }
}

/* Optional hero greeting (home page) */
#tcsi-hero-greeting {
  display: inline-block; margin-bottom: 0.5rem;
  font-family: var(--serif); color: var(--gold-soft); font-size: 1.05rem;
}

/* Dropdown menus ("Get Involved", account) */
.nav-group { position: relative; }
.nav-group-toggle {
  border: 0; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.nav-group.open .caret { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 0.4rem; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.nav-group:hover .nav-menu,
.nav-group.open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu a {
  display: block; padding: 0.6rem 0.8rem; border-radius: 8px;
  color: var(--ink); font-size: 0.92rem; font-weight: 500;
}
.nav-menu a:hover { background: var(--cream-deep); color: var(--heading); text-decoration: none; }
.nav-menu a.active { color: var(--heading); font-weight: 700; background: var(--cream-deep); }

/* Menu links with sub-pages (Events → Calendar): the link + a caret button */
.nav-sub { display: flex; align-items: center; }
.nav-sub-toggle { background: none; color: var(--ink-soft); padding: 0.45rem 0.2rem; margin-left: -0.35rem; border-radius: 6px; }
.nav-sub-toggle:hover { color: var(--heading); background: var(--cream-deep); }
.nav-sub .caret { width: 12px; height: 12px; transition: transform 0.16s; }
.nav-sub > .nav-menu { left: 0; right: auto; top: calc(100% + 2px); }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: 0; font-size: 1.4rem; line-height: 1;
  cursor: pointer; padding: 0.4rem; color: var(--heading);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-nav { border-top: 0; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gap) 1rem; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 0.4rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a.active::after { display: none; }
  /* Sub-pages are listed straight under their link on phones */
  .nav-sub { display: block; }
  .nav-sub-toggle { display: none; }
  .nav-sub > .nav-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0; min-width: 0; }
  .nav-sub > .nav-menu a { padding-left: 1.6rem; font-size: 0.88rem; }
  .nav-sub > .nav-menu a::before { content: "↳ "; color: var(--ink-soft); }
}
/* "Get Involved" pages and the theme choice inside the ☰ menu — phones only (see renderHeader in js/site.js) */
.nav-mobile-cta, .nav-mobile-theme { display: none; }
@media (max-width: 600px) {
  .header-top { gap: 0.6rem; }
  .header-actions { gap: 0.35rem; }
  .brand { flex-shrink: 0; }                       /* the seal never gets covered */
  .brand img { width: 40px; height: 40px; }
  /* The name always shows: two lines beside the seal */
  .brand { gap: 0.55rem; }
  /* One line, scaled to the screen so it always fits beside the buttons */
  .brand-text b { font-size: clamp(0.78rem, 3.9vw, 1rem); line-height: 1.15; white-space: nowrap; }
  .brand-text > span { font-size: 0.62rem; margin-top: 0.15rem; }
  .header-actions > .nav-group { display: none; }  /* "Get Involved" moves into the ☰ menu */
  .header-actions > .theme-switch { display: none; } /* …and so does the theme choice */
  .nav-mobile-theme { display: block; margin-top: 0.4rem; padding-top: 0.5rem; }
  .theme-seg { display: flex; gap: 0.3rem; padding: 0.2rem 0.4rem 0.4rem; }
  .theme-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.5rem 0.4rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 0.85rem var(--sans); cursor: pointer; }
  .theme-seg button svg { width: 16px; height: 16px; }
  .theme-seg button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
  .nav-mobile-cta { display: block; margin-top: 0.4rem; padding-top: 0.5rem; }
  .nav-mobile-cta-title { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); padding: 0.3rem 0.4rem; }
}
@media (max-width: 480px) {
  /* Just the avatar ("Hi, Sathish" stays readable by screen readers) */
  .user-toggle { padding-right: 0.45rem; gap: 0.25rem; }
  .user-toggle .caret { display: none; }           /* just the avatar — more room for the name */
  .user-toggle { padding: 0.18rem; }
  .user-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 380px) {
  .brand-text > span { display: none; }            /* the tagline, on the narrowest phones */
  .brand img { width: 36px; height: 36px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  padding: 0.8rem 1.5rem; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s, background 0.2s;
  font-size: 0.98rem;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-soft); }
.btn-outline { border-color: var(--heading); color: var(--heading); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.section--navy .btn-outline { border-color: var(--gold-soft); color: var(--gold-soft); }
.section--navy .btn-outline:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(217,154,43,0.16), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem;
  align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.hero h1 { margin: 0 0 0.4em; }
.hero .accent { color: var(--accent-text); }
.hero-motto {
  font-family: var(--serif); font-style: italic; color: var(--gold);
  font-size: 1.15rem; margin-top: 1.4rem;
}
.hero-art {
  aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--navy) 0%, var(--navy-deep) 70%);
  display: grid; place-items: center; box-shadow: var(--shadow);
  position: relative;
}
.hero-art img { width: 78%; border-radius: 50%; }
.hero-art::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  border: 2px dashed rgba(217,154,43,0.5);
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-art { max-width: 300px; margin-inline: auto; order: -1; }
  .hero .btn-row, .hero .kolam { justify-content: center; margin-inline: auto; }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px){ .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { color: var(--heading); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 0.9rem;
  background: var(--cream-deep); display: grid; place-items: center; color: var(--accent-text);
}
.card .icon svg { width: 26px; height: 26px; }

/* MVV section is a plain wrapper; the .grid.grid-3 inside handles columns.
   (Removed a conflicting grid rule that was applied to the section itself.) */
.mvv { background: var(--cream-deep); }

/* ---------- Logo strip (sub-committees) ---------- */
.logo-strip { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.logo-strip a { text-align: center; color: var(--ink-soft); font-size: 0.82rem; font-weight: 600; }
.logo-strip a:hover { text-decoration: none; color: var(--heading); }
.logo-strip .chip {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 0.5rem;
  display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.18s;
}
.logo-strip a:hover .chip { transform: translateY(-3px); }
.logo-strip .chip img { width: 68%; }

/* ---------- Events ---------- */
.event {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 1.2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.event .date {
  text-align: center; background: var(--navy); color: var(--white);
  border-radius: 10px; padding: 0.5rem; line-height: 1.05;
}
.event .date .m { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-soft); }
.event .date .d { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.event .meta { color: var(--ink-soft); font-size: 0.9rem; }
.event .meta strong { color: var(--heading); }
@media (max-width: 620px){
  .event { grid-template-columns: 72px 1fr; }
  .event .btn { grid-column: 1 / -1; text-align: center; }
}

/* ---------- Team / profiles ---------- */
.profile { text-align: center; }
.profile .avatar {
  width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 0.8rem;
  /* Consistent headshot background standard — Track 1 §1.5 */
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  display: grid; place-items: center; color: var(--gold-soft);
  border: 3px solid var(--gold); overflow: hidden; box-shadow: var(--shadow-sm);
}
.profile .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile .avatar .initials { font-family: var(--serif); font-size: 2.2rem; }
.profile .role { color: var(--accent-text); font-weight: 600; font-size: 0.9rem; }
.profile .name { font-family: var(--serif); color: var(--heading); font-size: 1.15rem; }

/* ---------- Callout / notes for Sathish ---------- */
.spec-note {
  border-left: 4px solid var(--gold); background: var(--note-bg);
  padding: 0.9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0;
  font-size: 0.9rem; color: #6a5320;
}
.spec-note strong { color: var(--accent-text); }
.placeholder-pill {
  display: inline-block; background: var(--note-bg); color: var(--accent-text);
  border: 1px dashed var(--gold); border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; padding: 0.1rem 0.6rem; letter-spacing: 0.03em;
}

/* Photo placeholder blocks */
.photo-ph {
  background:
    repeating-linear-gradient(45deg, var(--cream-deep), var(--cream-deep) 12px, var(--hatch) 12px, var(--hatch) 24px);
  border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--ink-soft);
  font-size: 0.82rem; font-weight: 600; aspect-ratio: 4/3; text-align: center; padding: 1rem;
}
.photo-ph.wide { aspect-ratio: 16/7; }
.photo-ph.tall { aspect-ratio: 3/4; }

/* ---------- Lists ---------- */
.tick { list-style: none; padding: 0; margin: 0; }
.tick li { position: relative; padding-left: 1.8rem; margin-bottom: 0.7rem; }
.tick li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px rgba(217,154,43,0.22);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c9d2e6; padding-block: 3rem 1.5rem; }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.9rem; }
.site-footer a { color: #c9d2e6; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-grid {
  display: grid; grid-template-columns: minmax(auto, 360px) auto auto;
  gap: 4rem; justify-content: center;
}
@media (max-width: 780px){ .footer-grid { grid-template-columns: 1fr 1fr; justify-content: start; gap: 2.5rem; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.footer-brand img { width: 54px; height: 54px; border-radius: 50%; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.footer-motto { font-family: var(--serif); font-style: italic; color: var(--gold-soft); margin-top: 0.6rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2rem; padding-top: 1.2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.82rem; color: #8f9bb8;
}
.social { display: flex; gap: 0.6rem; }
.social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cream-deep); color: var(--heading);
  border: 1px solid var(--line);
}
.social a:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.social svg { width: 18px; height: 18px; }
/* light variant for dark backgrounds (footer, bands) */
.social-light a, .site-footer .social a {
  background: rgba(255,255,255,0.08); color: #c9d2e6; border: 0;
}
.social-light a:hover, .site-footer .social a:hover { background: var(--gold); color: var(--navy); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: var(--navy); color: #eef1f7; padding-block: clamp(2.5rem,5vw,3.6rem); text-align: center; }
.page-hero h1 { color: var(--white); margin-bottom: 0.4rem; }
.page-hero p { color: #c9d2e6; max-width: 58ch; margin-inline: auto; }
.page-hero .tamil { color: var(--gold-soft); }
.breadcrumb { font-size: 0.82rem; color: #9fb0d8; margin-bottom: 0.8rem; }
.breadcrumb a { color: #9fb0d8; }

/* ---------- Utility ---------- */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.stack > * + * { margin-top: 1rem; }
.pill-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.info-pill { background: var(--cream-deep); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--heading); }
/* Scroll reveal — only applies once JS adds .reveal-armed, so content is
   fully visible if JS is disabled/slow. */
.reveal-armed { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal-armed.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-armed { opacity: 1; transform: none; } }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--gold); color: var(--navy); padding: 0.6rem 1rem; border-radius: 8px; z-index: 100; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   PoC COMPONENT LAYER
   Defines classes the page markup uses that weren't yet in the
   base sheet. Same token system (navy / gold / cream). Grouped
   so the Tech Committee can find each component quickly.
   ============================================================ */

/* --- Section rhythm & headings --- */
section { padding-block: clamp(2.6rem, 5vw, 4.2rem); }
.section-head { margin-bottom: 1.8rem; }
.section-head.center { text-align: center; }
.section-head h2 { margin: 0.2rem 0 0; }
.section-head.center .kolam-rule { margin-inline: auto; }

/* Eyebrow label (already partly defined; ensure consistent) */
.eyebrow {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); display: inline-block;
}

/* Kolam rule — a small dotted divider echoing a Tamil kolam motif */
.kolam-rule {
  width: 96px; height: 12px; margin-top: 0.9rem;
  background-image: radial-gradient(var(--gold) 33%, transparent 34%);
  background-size: 12px 12px; background-repeat: repeat-x;
  background-position: center; opacity: 0.9;
}

/* --- Typographic helpers --- */
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-soft); }
.mb0 { margin-bottom: 0; }
.center { text-align: center; }
.tamil { font-family: var(--tamil); }

/* --- Buttons --- */
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn-row.center { justify-content: center; }
.btn-gold   { background: var(--gold); color: var(--navy-deep); border: 1px solid var(--gold); }
.btn-gold:hover   { background: var(--gold-soft); text-decoration: none; }
.btn-ghost  { background: transparent; color: var(--heading); border: 1px solid var(--heading); }
.btn-ghost:hover  { background: var(--navy); color: var(--white); text-decoration: none; }
.btn-ghost-light { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.6); }
.btn-ghost-light:hover { background: var(--surface); color: var(--heading); border-color: var(--white); text-decoration: none; }
.btn-maroon { background: var(--clay); color: var(--white); border: 1px solid var(--clay); }
.btn-maroon:hover { background: #97572f; text-decoration: none; }

/* --- Hero --- */
.hero {
  background:
    radial-gradient(1200px 380px at 50% -120px, rgba(217,154,43,0.16), transparent 60%),
    var(--cream);
  text-align: center; padding-block: clamp(2.4rem, 6vw, 4.4rem);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.hero-seal { width: clamp(120px, 20vw, 168px); height: auto; margin-bottom: 1.1rem;
  filter: drop-shadow(0 8px 22px rgba(19,31,61,0.28)); }
.hero h1 { max-width: 30ch; margin: 0.3rem 0 0.6rem; }
.hero .lead { text-align: center; margin-inline: auto; }

/* --- MVV cards --- */
.mvv-card {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
}
.mvv-card .eyebrow { margin-bottom: 0.5rem; }
.mvv-card ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.mvv-card li { margin-bottom: 0.5rem; }
.mvv-card li:last-child { margin-bottom: 0; }

/* --- Sub-committee logo tiles --- */
.logo-row {
  display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center;
}
.logo-tile {
  flex: 1 1 180px; max-width: 240px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1rem;
  box-shadow: var(--shadow-sm); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  transition: transform 0.18s, box-shadow 0.18s;
}
.logo-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.logo-tile b { color: var(--heading); font-size: 1.02rem; }
.logo-tile span { color: var(--ink-soft); font-size: 0.86rem; }
.logo-circle {
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: 0.7rem;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, var(--navy), var(--navy-deep));
  color: var(--gold-soft); font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  border: 3px solid var(--gold); box-shadow: var(--shadow-sm);
}
.logo-circle.tamil { font-family: var(--tamil); }
.tag-new {
  font-family: var(--sans); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em;
  background: var(--clay); color: var(--white); padding: 1px 6px; border-radius: 999px;
  vertical-align: middle; margin-left: 4px;
}

/* --- Generic card accents --- */
.card-accent { border-top: 4px solid var(--gold); }
.card h3 { margin-top: 0; }

/* --- Feature lists (schedule / facts) --- */
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
  padding: 0.6rem 0 0.6rem 1.6rem; border-bottom: 1px solid var(--line); position: relative;
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.feature-list li b { color: var(--heading); }

/* --- Photo placeholders --- */
.photo-ph, .ph-photo {
  background:
    repeating-linear-gradient(45deg, var(--cream-deep) 0 12px, #ecdfc0 12px 24px);
  border: 1px dashed #cdbb90; border-radius: var(--radius);
  min-height: 200px; display: grid; place-items: center; text-align: center;
  color: var(--ink-soft); font-size: 0.9rem; padding: 1rem;
}
.ph-photo.tall { min-height: 320px; }
.ph-photo small { color: #8a7c5c; }

/* --- Headshot avatars: the CONSISTENT-BACKGROUND standard (Track 1.5) --- */
.ph-avatar {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 0.8rem;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #24386b, var(--navy-deep));
  color: var(--gold-soft); font-family: var(--serif); font-weight: 700; font-size: 2.4rem;
  border: 3px solid var(--gold); box-shadow: var(--shadow-sm);
}
.ph-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person { text-align: center; }
.person b { display: block; color: var(--heading); margin-top: 0.2rem; }
.person span { display: block; color: var(--gold); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.person p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* --- Event cards --- */
.event-card {
  display: grid; grid-template-columns: 78px 1fr; gap: 1.2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.event-card h3 { margin: 0.35rem 0 0.25rem; }
.event-date {
  text-align: center; background: var(--navy); color: var(--white);
  border-radius: 10px; padding: 0.55rem 0.4rem; line-height: 1.05;
}
.event-date .m { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-soft); }
.event-date .d { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; }
.event-meta { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 0.4rem; }
.pill {
  display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--navy-deep); background: var(--gold-soft);
  padding: 2px 9px; border-radius: 999px;
}
@media (max-width: 620px){ .event-card { grid-template-columns: 64px 1fr; } }

/* --- Donation amount chips --- */
.amount-chip {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--heading); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0.5rem 1.2rem; transition: all 0.15s;
}
.amount-chip:hover { border-color: var(--gold); }
.amount-chip.sel { background: var(--navy); color: var(--white); border-color: var(--heading); }

/* --- Full-width call-to-action band --- */
.band {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: var(--white); text-align: center;
}
.band h2 { color: var(--white); }
.band .lead, .band p { color: #c9d2e6; margin-inline: auto; }
.band .eyebrow { color: var(--gold-soft); }

/* --- Page hero (interior pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: var(--white); text-align: center; padding-block: clamp(2rem, 5vw, 3.4rem);
}
.page-hero h1 { color: var(--white); margin: 0.3rem 0 0.5rem; }
.page-hero .eyebrow { color: var(--gold-soft); }
.page-hero p { color: #c9d2e6; max-width: 58ch; margin-inline: auto; }

/* --- Spec / open-question callouts (requirements overlay; delete for prod) --- */
.spec {
  background: #fff7e6; border: 1px solid #f0d79a; border-left: 4px solid var(--gold);
  border-radius: 8px; padding: 0.85rem 1.1rem; margin-top: 1.4rem;
  font-size: 0.9rem; color: #6b5320;
}
.spec.open { border-left-color: var(--clay); background: #fdefe8; color: #7a4327; }
.spec b { color: inherit; }

/* --- People grid (officers / committee rosters) --- */
.people-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(3, 1fr);
  max-width: 940px; margin-inline: auto;
}
@media (max-width: 820px){ .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .people-grid { grid-template-columns: 1fr; } }
.people-grid .person {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm);
}

/* --- Real committee logo badges (home page tiles) --- */
.logo-badge {
  width: 92px; height: 92px; border-radius: 50%; margin-bottom: 0.8rem;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line);
  box-shadow: var(--shadow-sm); padding: 8px;
}
.logo-badge img { width: 100%; height: 100%; object-fit: contain; }

/* --- Home hero banner (real TCSI banner artwork) --- */
.hero-banner {
  width: 100%; max-width: 920px; height: auto; margin: 0 auto 1.4rem;
  border-radius: var(--radius);
  box-shadow: 0 12px 34px -14px rgba(19,31,61,0.35);
}

/* --- Interior page hero logo --- */
.hero-logo {
  width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 0.9rem;
  object-fit: contain; background: var(--surface); padding: 6px;
  border: 3px solid var(--gold); box-shadow: var(--shadow-sm);
}

/* ============================================================
   PARTNER / SPONSORSHIP PAGE (from Abitha's flyer, Track 1.3.3)
   ============================================================ */

/* "200 Families & Growing" stat card */
.stat-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: var(--white); border-radius: var(--radius); padding: 2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; box-shadow: var(--shadow);
}
.stat-figure { font-family: var(--serif); font-size: clamp(3.4rem, 8vw, 5rem); font-weight: 700; color: var(--gold-soft); line-height: 1; }
.stat-label { font-weight: 600; letter-spacing: 0.02em; margin-top: 0.4rem; font-size: 1.1rem; }

/* Sponsorship tiers */
.tier-list { display: grid; gap: 0.9rem; margin-top: 18px; }
.tier {
  display: grid; grid-template-columns: 120px 130px 1fr; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.3rem; box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--gold);
}
.tier-amt { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--heading); }
.tier-name { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.9rem; color: var(--gold); }
.tier-benefit { color: var(--ink-soft); }
.tier-titanium { border-left-color: #6b7a8f; }
.tier-titanium .tier-name { color: #6b7a8f; }
.tier-platinum { border-left-color: #9aa4b0; }
.tier-platinum .tier-name { color: #7e8794; }
.tier-gold { border-left-color: #d99a2b; }
.tier-gold .tier-name { color: #c9871f; }
.tier-silver { border-left-color: #a9b0ba; }
.tier-silver .tier-name { color: #868d98; }
.tier-bronze { border-left-color: #b3763d; }
.tier-bronze .tier-name { color: #a2662f; }
@media (max-width: 640px){
  .tier { grid-template-columns: 90px 1fr; row-gap: 0.3rem; }
  .tier-benefit { grid-column: 1 / -1; }
}

/* Year-long advertising band */
.advertise-band {
  margin-top: 1.4rem; background: var(--surface); border: 1px dashed var(--gold);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.advertise-band h3 { color: var(--heading); }

/* MVV tagline (C1) */
.mvv-tagline {
  color: var(--ink-soft); font-style: italic; font-size: 1.05rem;
  margin: 0.2rem 0 0; max-width: 52ch; margin-inline: auto;
}

/* MVV cards — equal height, tidy vertical balance (C1 fix) */
.mvv .grid-3 { align-items: stretch; }
.mvv .mvv-card { display: flex; flex-direction: column; }
.mvv .mvv-card .eyebrow { margin-bottom: 0.6rem; }
.mvv .mvv-card > p { margin-top: auto; margin-bottom: auto; }
.mvv .mvv-card ul { margin-top: 0.2rem; }

/* Values pillars — bold label at normal size, description smaller (C1 tweak) */
.mvv .mvv-card ul li { font-size: 0.85rem; line-height: 1.45; }
.mvv .mvv-card ul li b { font-size: 1rem; }

/* Footer Tamil motto — keep on one line */
.site-footer .motto {
  font-family: var(--tamil); font-size: 0.82rem; color: var(--gold-soft);
  margin-top: 0.8rem; white-space: nowrap; letter-spacing: 0.01em;
}
@media (max-width: 480px){
  .site-footer .motto { white-space: normal; font-size: 0.8rem; }
}

/* Partner stat card — word variant (replaces the big number) */
.stat-figure-word {
  font-family: var(--serif); font-weight: 700; color: var(--gold-soft);
  font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1;
}
.stat-card .stat-label { max-width: 24ch; }

/* ============================================================
   FULL-WIDTH HERO CAROUSEL (Tamil Center, Track 1.3.1)
   Dependency-free; JS in site.js. Swap slide backgrounds for
   <img> when real photos are supplied.
   ============================================================ */
.carousel-section { margin: 0; }
.carousel {
  position: relative; width: 100%; height: clamp(340px, 46vw, 560px);
  overflow: hidden; background: var(--navy-deep);
}
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
  background-color: var(--navy); background-image: var(--slide-bg, none);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: flex-end;
}
/* slides with a real inline background-image: don't let the variable blank it */
.carousel-slide.has-img { background-image: unset; }
.carousel-slide.is-active { opacity: 1; }
/* readability scrim over photos */
.carousel-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,28,63,0.72) 0%, rgba(15,28,63,0.15) 45%, transparent 75%);
}
.carousel-caption {
  position: relative; z-index: 2; color: var(--white);
  padding: clamp(1.5rem, 4vw, 3rem); max-width: 900px;
  margin-inline: auto; width: 100%; text-align: center;
}
.carousel-caption h2 { color: var(--white); margin: 0.3rem 0 0; font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(255,255,255,0.16); color: var(--white); border: 1px solid rgba(255,255,255,0.4);
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: grid; place-items: center; transition: background 0.15s; backdrop-filter: blur(2px);
}
.carousel-btn:hover { background: rgba(255,255,255,0.3); }
.carousel-btn.prev { left: 18px; }
.carousel-btn.next { right: 18px; }
.carousel-dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 9px;
}
.carousel-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: rgba(255,255,255,0.45); transition: background 0.15s, transform 0.15s;
}
.carousel-dots button.is-active { background: var(--gold); transform: scale(1.2); }
.carousel-note {
  text-align: center; font-size: 0.82rem; color: var(--ink-soft);
  background: var(--cream-deep); margin: 0; padding: 0.5rem 1rem;
}
@media (max-width: 600px){
  .carousel-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce){
  .carousel-slide { transition: none; }
}

/* ============================================================
   ARUMBU PHOTO OPTIONS (demo)
   ============================================================ */

/* Option 1 — in-content photo strip */
.photo-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-top: 1.6rem;
}
.photo-strip figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 3/2; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.photo-strip figure:hover img { transform: scale(1.05); }
@media (max-width: 720px){ .photo-strip { grid-template-columns: repeat(2, 1fr); } }

/* Option 2 — contained (medium) carousel */
.carousel-contained {
  position: relative; max-width: 920px; margin: 1.8rem auto 0;
  aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--navy-deep);
}
.carousel-contained .carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-contained .carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
  background-size: cover; background-position: center; display: flex; align-items: flex-end;
}
.carousel-contained .carousel-slide.is-active { opacity: 1; }
.carousel-contained .carousel-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,28,63,0.6), transparent 55%);
}
.carousel-contained .carousel-caption { position: relative; z-index: 2; color: var(--white); padding: 1.2rem 1.4rem; width: 100%; }
.carousel-contained .carousel-caption h3 { color: var(--white); margin: 0; font-size: 1.2rem; }
.carousel-contained .carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(255,255,255,0.18); color: var(--white); border: 1px solid rgba(255,255,255,0.4);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.carousel-contained .carousel-btn.prev { left: 12px; }
.carousel-contained .carousel-btn.next { right: 12px; }
.carousel-contained .carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 7px; }
.carousel-contained .carousel-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; background: rgba(255,255,255,0.5); }
.carousel-contained .carousel-dots button.is-active { background: var(--gold); }

/* ============================================================
   ARUMBU PAGE — flyer details (WASC badge, activities, motto)
   ============================================================ */
.badge-row { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.badge {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--navy-deep); background: var(--gold-soft);
  border: 1px solid var(--gold); border-radius: 999px; padding: 0.35rem 0.9rem;
}
.school-motto {
  margin: 1rem 0 0; font-family: var(--serif); font-style: italic;
  color: var(--gold-soft); font-size: 1.05rem;
}
.activity { padding: 0.5rem; }
.activity-dot {
  width: 66px; height: 66px; margin: 0 auto 0.7rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.7rem;
  background: var(--surface); border: 2px solid var(--gold); box-shadow: var(--shadow-sm);
}
.activity b { color: var(--heading); font-size: 0.92rem; }
@media (max-width: 720px){ .grid-5 .activity { font-size: 0.85rem; } }

/* ============================================================
   CAROUSEL — PORTRAIT SLIDE (centered image on a radial glow)
   For photos too small/tall to fill the slide full-bleed.
   ============================================================ */
.carousel-slide.slide-portrait {
  align-items: center; justify-content: flex-start;
  background:
    radial-gradient(ellipse 60% 75% at 50% 42%, #fbe8c2 0%, #e6a95a 34%, #7a4a1e 66%, #2a1a3f 100%);
  flex-direction: column; gap: 0; padding-top: 4%;
}
.carousel-slide.slide-portrait::after { display: none; } /* no dark scrim over the glow */
.carousel-slide.slide-portrait .portrait-img {
  height: 66%; max-height: 66%; width: auto; max-width: 38%;
  object-fit: cover; border-radius: 14px;
  border: 4px solid rgba(255,255,255,0.9);
  box-shadow: 0 18px 50px -12px rgba(0,0,0,0.55), 0 0 90px 10px rgba(251,232,194,0.55);
  position: relative; z-index: 2;
}
.carousel-slide.slide-portrait .carousel-caption {
  position: relative; z-index: 3; margin-top: 0.8rem; padding-top: 0;
}
.carousel-slide.slide-portrait .carousel-caption h2,
.carousel-slide.slide-portrait .carousel-caption .eyebrow {
  text-shadow: 0 2px 12px rgba(42,26,63,0.6);
}
@media (max-width: 700px){
  .carousel-slide.slide-portrait .portrait-img { max-width: 62%; height: 66%; }
}

/* Youth — goals / principles lists */
.goal-list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.goal-list li {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--ink-soft);
  line-height: 1.45;
}
.goal-list li:last-child { border-bottom: 0; }
.goal-list li span { flex-shrink: 0; font-size: 1.1rem; line-height: 1.3; }
.goal-list li b { color: var(--heading); }

/* Goals — larger, roomier (fills the shorter card) */
.goal-list--goals li { font-size: 1.05rem; padding: 0.72rem 0; }
/* Principles — smaller definitions so the taller card shrinks to match */
.goal-list--principles li { font-size: 0.86rem; padding: 0.5rem 0; line-height: 1.4; }
.goal-list--principles li b { font-size: 0.95rem; }

/* Equal-height cards in the goals/principles row */
.goals-grid { align-items: stretch; }
.goals-grid > .card { display: flex; flex-direction: column; }
.goals-grid > .card .goal-list { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-evenly; }

/* WNET upcoming — soft/alt event chips for tentative dates */
.event-date.alt { background: var(--cream-deep); color: var(--heading); border: 1px solid var(--gold); }
.event-date.alt .m { color: var(--accent-text); }
.event-date.alt .d { font-size: 1.3rem; }
.pill-soft { background: var(--cream-deep); color: var(--accent-text); border: 1px solid var(--gold); }

/* --- Event pages (events/index.php; the design started as the Deepavali 2026 page) --- */
.deepavali-hero .tamil { font-family: "Noto Sans Tamil", var(--tamil); font-size: 1.35rem; font-weight: 600; margin-block: 0 0.2rem; }
.deepavali-tagline { font-family: var(--serif); font-style: italic; color: var(--gold-soft) !important; font-size: 1.2rem; }
.deepavali-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 820px) { .deepavali-layout { grid-template-columns: 1fr; } }
.flyer { margin: 0; }
.flyer img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.flyer figcaption { font-size: 0.85rem; text-align: center; margin-top: 0.6rem; }
.detail-list { margin: 1.2rem 0; }
.detail-list > div { display: grid; grid-template-columns: 84px 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.detail-list dt { font-weight: 700; color: var(--heading); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 0.15rem; }
.detail-list dd { margin: 0; }
.deepavali-sub { margin-top: 1.6rem; }
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.8rem; }
.ticket { background: var(--navy); color: #c9d2e6; border-radius: 10px; padding: 0.9rem 0.6rem; text-align: center; }
.ticket span { display: block; font-size: 0.85rem; }
.ticket b { font-family: var(--serif); font-size: 1.8rem; color: var(--gold-soft); }
.incentive { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 0.9rem 1.1rem; margin-top: 1.2rem; font-size: 0.95rem; }
.incentive b { color: var(--heading); display: block; margin-bottom: 0.2rem; }
.schedule { list-style: none; padding: 0; margin: 0 auto; max-width: 640px; }
.schedule li { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 1.2rem; margin-bottom: 0.6rem; }
.schedule time { font-weight: 700; color: var(--accent-text); }
.event-layout-single { max-width: 760px; }
.event-title-ta { font-family: "Noto Sans Tamil", var(--tamil); font-size: 1.3rem; font-weight: 600; margin-block: 0 0.2rem; }
.event-status { display: inline-block; margin: 0 auto 1rem; padding: 0.55rem 1rem; border-radius: 10px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); color: var(--white) !important; max-width: 60ch; }
.event-status--cancelled { background: rgba(198,40,40,0.25); border-color: rgba(255,138,128,0.6); }
.event-preview-bar { position: sticky; top: 0; z-index: 50; background: var(--gold); color: #1a1a1a; text-align: center; padding: 0.55rem 1rem; font-size: 0.92rem; }
.event-after { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
/* "Add to calendar" menu in the event hero */
.add-cal { position: relative; display: inline-block; }
.add-cal > summary { list-style: none; cursor: pointer; }
.add-cal > summary::-webkit-details-marker { display: none; }
.add-cal-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 0.4rem; text-align: left; }
.add-cal-menu a { display: block; padding: 0.55rem 0.8rem; border-radius: 8px; color: var(--heading); font-weight: 600; font-size: 0.92rem; }
.add-cal-menu a:hover { background: var(--cream-deep); text-decoration: none; }

/* Event lists (events.html, wnet.html — js/events.js) */
.event-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.4rem; }
.event-filters .chip { border: 1px solid var(--line); background: var(--surface); color: var(--heading); font: 600 0.88rem var(--sans); padding: 0.4rem 0.95rem; border-radius: 999px; cursor: pointer; }
.event-filters .chip:hover { border-color: var(--gold); }
.event-filters .chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.events-month + .events-month { margin-top: 1.6rem; }
.events-month-title { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 0.7rem; }
.events-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.event-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.event-body p { margin: 0 0 0.4rem; }
.event-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin-top: 0.5rem; font-weight: 600; font-size: 0.92rem; }
.event-links .sep { color: var(--ink-soft); }
.event-links .btn { margin-left: auto; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.pill-cancelled { background: #c62828; color: var(--white); }
.pill-live { background: var(--ok); color: var(--white); }
.event-card.is-cancelled h3 a { text-decoration: line-through; text-decoration-thickness: 1px; }
.event-cancel-note { color: var(--accent-text); font-size: 0.9rem; }
.events-more { margin-top: 0.4rem; }
.event-callout-badge { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--navy-deep); border: 1px solid rgba(255,255,255,0.15); color: var(--white); text-decoration: none; }
.event-callout-badge .m { font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-soft); }
.event-callout-badge .d { font-family: var(--serif); font-size: 3rem; font-weight: 700; line-height: 1; }
@media (max-width: 480px) { .schedule li { grid-template-columns: 1fr; gap: 0.1rem; } }

/* Home-page event callout */
.event-callout { display: grid; grid-template-columns: 180px 1fr; gap: 1.6rem; align-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: #c9d2e6; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.event-callout img { width: 100%; height: auto; border-radius: 10px; }
.event-callout h2 { color: var(--white); margin: 0.2rem 0 0.4rem; }
.event-callout .eyebrow { color: var(--gold-soft); }
.event-callout .btn-row { margin-top: 1rem; }
@media (max-width: 620px) { .event-callout { grid-template-columns: 1fr; text-align: center; } .event-callout img { max-width: 200px; margin-inline: auto; } .event-callout .btn-row { justify-content: center; } }

/* Highlighted nav item (current featured event) */
.nav-links a.nav-highlight { color: var(--accent-text); font-weight: 700; }

/* --- Festive decorations (switched on/off by FESTIVE in js/site.js) --- */
[data-fireworks] { position: relative; overflow: hidden; isolation: isolate; }
.fireworks-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }

.brand-seal { position: relative; display: inline-block; flex: 0 0 auto; }
.brand-sparkles i {
  position: absolute; width: 18px; height: 18px; pointer-events: none;
  opacity: 0; transform: scale(0.3);
  animation: brand-sparkle 2.4s ease-out infinite;
}
.brand-sparkles svg { width: 100%; height: 100%; display: block; }
.brand-sparkles i:nth-child(1) { top: -9px;  left: -9px;  color: var(--gold);  animation-delay: 0s; }
.brand-sparkles i:nth-child(2) { top: -11px; right: -10px; color: #c2185b;     animation-delay: 0.6s; width: 14px; height: 14px; }
.brand-sparkles i:nth-child(3) { bottom: -8px; right: -12px; color: #e65100;   animation-delay: 1.2s; }
.brand-sparkles i:nth-child(4) { bottom: -9px; left: -8px; color: var(--ok);     animation-delay: 1.8s; width: 13px; height: 13px; }
@keyframes brand-sparkle {
  0%   { opacity: 0; transform: scale(0.3) rotate(0deg); }
  15%  { opacity: 1; }
  45%  { opacity: 0; transform: scale(1.15) rotate(20deg); }
  100% { opacity: 0; transform: scale(1.15) rotate(20deg); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-sparkles i { animation: none; opacity: 0.9; transform: none; }
}

/* Screen-reader-only text */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* A button that looks like a link */
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* --- Event countdown (js/countdown.js), on navy backgrounds ---
   Each box is a glowing diya with a flickering flame; digits drop in as they change. */
.countdown { margin-top: 1.1rem; }
.countdown-title { margin: 0 0 1.1rem; font-family: var(--serif); font-size: 1.05rem; font-style: italic; color: var(--gold-soft); letter-spacing: 0.02em; }
.countdown-boxes { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding-top: 14px; }
.countdown--center .countdown-boxes { justify-content: center; }
.countdown-box {
  position: relative; min-width: 5.4rem; padding: 0.9rem 0.6rem 0.6rem; text-align: center; border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 196, 87, 0.22), transparent 60%),
    linear-gradient(170deg, #3a1d3f 0%, #22183a 55%, #161a33 100%);
  border: 1px solid rgba(232, 182, 87, 0.65);
  box-shadow: 0 0 0 3px rgba(232, 182, 87, 0.08), 0 10px 26px -10px rgba(255, 170, 40, 0.55), inset 0 -14px 22px -16px rgba(255, 190, 80, 0.6);
  animation: countdown-glow 3s ease-in-out infinite;
}
.countdown-box:nth-of-type(2) { animation-delay: 0.4s; }
.countdown-box:nth-of-type(3) { animation-delay: 0.8s; }
.countdown-box:nth-of-type(4) { animation-delay: 1.2s; }
.countdown-flame {
  position: absolute; left: 50%; top: -15px; width: 12px; height: 20px; margin-left: -6px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #fffbe6 0 18%, #ffd54f 38%, #ff9800 65%, #e65100 88%);
  box-shadow: 0 0 10px 3px rgba(255, 170, 40, 0.65), 0 0 22px 6px rgba(255, 120, 20, 0.28);
  transform-origin: 50% 100%; animation: countdown-flicker 1.4s ease-in-out infinite alternate;
}
.countdown-box:nth-of-type(odd) .countdown-flame { animation-duration: 1.1s; }
.countdown-box b {
  display: block; font-family: var(--serif); font-size: 2.3rem; font-weight: 700; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff6d6 0%, #f3c65c 55%, #c9821c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(255, 170, 40, 0.35));
}
.countdown-box b.tick { animation: countdown-drop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.countdown-box span { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #e9dcc0; margin-top: 0.2rem; }
.countdown-box .countdown-ta { font-family: "Noto Sans Tamil", var(--tamil); font-size: 0.72rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--gold-soft); margin-top: 0; }
.countdown-sep { color: var(--gold-soft); font-size: 0.8rem; animation: countdown-twinkle 1.8s ease-in-out infinite; }
.countdown-sep:nth-of-type(2) { animation-delay: 0.6s; }
.countdown-sep:nth-of-type(3) { animation-delay: 1.2s; }
.countdown-message {
  display: inline-block; margin: 0.4rem 0 0; padding: 0.6rem 1.2rem; border-radius: 999px;
  font-family: var(--serif); font-size: 1.2rem; color: var(--gold-soft);
  background: rgba(255, 196, 87, 0.1); border: 1px solid rgba(232, 182, 87, 0.6);
  box-shadow: 0 0 24px -6px rgba(255, 170, 40, 0.55);
}
.countdown--center { text-align: center; margin-bottom: 0.4rem; }
@keyframes countdown-flicker {
  0%   { transform: scale(1, 1) rotate(-2deg); opacity: 0.95; }
  50%  { transform: scale(0.92, 1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1.04, 0.94) rotate(-1deg); opacity: 0.9; }
}
@keyframes countdown-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232, 182, 87, 0.08), 0 10px 26px -10px rgba(255, 170, 40, 0.45), inset 0 -14px 22px -16px rgba(255, 190, 80, 0.5); }
  50%      { box-shadow: 0 0 0 3px rgba(232, 182, 87, 0.14), 0 12px 32px -8px rgba(255, 170, 40, 0.75), inset 0 -14px 22px -14px rgba(255, 190, 80, 0.75); }
}
@keyframes countdown-drop { from { transform: translateY(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes countdown-twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .countdown-box, .countdown-flame, .countdown-sep, .countdown-box b.tick { animation: none; }
}
@media (max-width: 620px) { .event-callout .countdown-boxes { justify-content: center; } }
@media (max-width: 480px) {
  .countdown-sep { display: none; }
  .countdown-boxes { gap: 0.45rem; }
  .countdown-box { min-width: 0; flex: 1 1 0; padding-inline: 0.3rem; }
  .countdown-box b { font-size: 1.8rem; }
  .countdown-box span { font-size: 0.6rem; letter-spacing: 0.08em; }
}

/* --- Home page "Learn & play": Word of the Day + Trivia (js/learn.js) --- */
.learn-tagline { font-size: 1.15rem; font-weight: 600; margin: 0; }
.learn-tagline .muted { font-family: var(--sans); font-weight: 400; font-size: 0.95rem; }
.learn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.learn-card.quiz { grid-column: 1 / -1; }
@media (max-width: 820px) { .learn-grid { grid-template-columns: minmax(0, 1fr); } }
.learn-card:hover { transform: none; box-shadow: var(--shadow-sm); }
.learn-card > .eyebrow { display: block; margin-bottom: 0.6rem; }

.wotd { text-align: center; border-top: 4px solid var(--gold); }
.wotd-emoji { font-size: 3rem; line-height: 1; margin: 0.4rem 0 0.2rem; }
.wotd-word { font-family: "Noto Sans Tamil", var(--tamil); font-size: clamp(2.2rem, 6vw, 2.8rem); font-weight: 700; color: var(--heading); margin: 0; line-height: 1.3; }
.wotd-say { margin: 0; font-style: italic; color: var(--ink-soft); display: flex; justify-content: center; align-items: center; gap: 0.4rem; }
.wotd-speak { font-size: 1.1rem; line-height: 1; padding: 0.35rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--cream-deep); cursor: pointer; font-style: normal; }
.wotd-speak:hover { border-color: var(--gold); }
.wotd-meaning { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--accent-text); margin: 0.3rem 0 0.9rem; }
.wotd-example { background: var(--cream-deep); border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.95rem; }
.wotd-example .tamil { font-family: "Noto Sans Tamil", var(--tamil); font-weight: 600; color: var(--heading); }

/* --- Proverb of the Day --- */
.proverb { text-align: center; border-top: 4px solid var(--accent-text); }
.proverb-mark { font-family: var(--serif); font-size: 3.4rem; line-height: 0.8; color: var(--gold); margin: 0.6rem 0 0.2rem; }
.proverb-ta { font-family: "Noto Sans Tamil", var(--tamil); font-size: clamp(1.35rem, 3.4vw, 1.7rem); font-weight: 700; color: var(--heading); margin: 0 0 0.3rem; line-height: 1.5; }
.proverb-literal { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--accent-text); margin: 0.4rem 0 0.9rem; }
.proverb-meaning { background: var(--cream-deep); border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.95rem; margin: 0; }

.quiz { border-top: 4px solid var(--clay); }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.quiz-progress { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.quiz-lead { margin-top: 0; }
.quiz-bar { height: 6px; border-radius: 999px; background: var(--cream-deep); overflow: hidden; margin-bottom: 0.9rem; }
.quiz-bar span { display: block; height: 100%; background: var(--gold); transition: width 0.3s; }
.quiz-q { font-size: 1.25rem; margin: 0 0 0.9rem; outline: none; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 480px) { .quiz-options { grid-template-columns: 1fr; } }
.quiz-option { display: flex; align-items: center; gap: 0.6rem; text-align: left; font: inherit; font-size: 0.98rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.quiz-option:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.quiz-option:disabled { cursor: default; opacity: 0.7; }
.quiz-option.is-picked { border-color: var(--gold); opacity: 1; }
.quiz-letter { flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; background: var(--cream-deep); color: var(--heading); }
.quiz-option.is-right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); opacity: 1; }
.quiz-option.is-right .quiz-letter { background: var(--ok); color: var(--white); }
.quiz-option.is-wrong { border-color: #c62828; background: color-mix(in srgb, #c62828 12%, var(--surface)); opacity: 1; }
.quiz-option.is-wrong .quiz-letter { background: #c62828; color: var(--white); }
.quiz-feedback:not(:empty) { margin-top: 0.9rem; }
.quiz-verdict { font-weight: 700; margin: 0 0 0.4rem; }
.quiz-verdict.ok { color: var(--ok); }
.quiz-verdict.no { color: var(--accent-text); }
.quiz-fact { background: var(--note-bg); border-left: 4px solid var(--gold); border-radius: 8px; padding: 0.6rem 0.9rem; font-size: 0.95rem; }
.quiz-score { display: flex; align-items: center; gap: 1.2rem; margin: 0.4rem 0 0.6rem; }
.quiz-score-num { font-family: var(--serif); font-size: 1.4rem; color: var(--ink-soft); white-space: nowrap; }
.quiz-score-num b { font-size: 3.2rem; color: var(--heading); }
.quiz-cheer { font-weight: 700; color: var(--heading); margin: 0; }
.quiz-grid { margin: 0.2rem 0 0; letter-spacing: 0.15em; }
.quiz-rank { margin: 0.4rem 0; }
.quiz-small { font-size: 0.88rem; }
.quiz-login { margin: 0.8rem 0 0; }
.quiz .btn-row { margin-top: 0.8rem; }
.quiz .btn { font: inherit; font-weight: 600; }
.quiz .btn-outline { background: transparent; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; align-items: stretch; }
.quiz-main { display: flex; flex-direction: column; }
.quiz-side { align-self: start; }
.quiz-side .leaderboard { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 820px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
}
.leaderboard { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.leaderboard h4 { font-family: var(--sans); font-size: 0.95rem; margin: 0; }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.lb-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--cream-deep); }
.lb-tab { border: 0; background: none; color: var(--ink-soft); font: 600 0.82rem var(--sans); padding: 0.3rem 0.8rem; border-radius: 999px; cursor: pointer; }
.lb-tab[aria-selected="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.lb-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.lb-meta { margin: 0 0 0.5rem; }
.leaderboard ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.leaderboard li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 8px; background: var(--cream-deep); font-size: 0.95rem; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-extra { font-size: 0.78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-rank { text-align: center; font-weight: 700; color: var(--ink-soft); }
.lb-score { min-width: 2.6rem; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; text-align: right; }
.leaderboard li.lb-me { background: var(--note-bg); box-shadow: inset 3px 0 0 var(--gold); }
.lb-you { display: inline-block; margin-left: 0.25rem; padding: 0 0.4rem; border-radius: 999px; background: var(--gold); color: #1a1a1a; font-size: 0.7rem; font-weight: 700; vertical-align: 1px; }
.lb-streak { margin-left: 0.2rem; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.leaderboard li.lb-gap { display: block; background: none; padding: 0; text-align: center; color: var(--ink-soft); line-height: 1; }
/* Podium: 1st in the middle (tallest), 2nd left, 3rd right */
.leaderboard ol.lb-podium { grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 0.5rem; margin: 0.5rem 0 0.7rem; }
.leaderboard li.lb-step { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; background: none; box-shadow: none; text-align: center; min-width: 0; }
.lb-step-name { max-width: 100%; font-weight: 700; font-size: 0.88rem; line-height: 1.25; color: var(--heading); overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lb-step-pts { font-size: 0.76rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-step-tags { display: inline-flex; gap: 0.2rem; align-items: center; margin-top: 0.15rem; }
.lb-step-tags .lb-you { margin-left: 0; }
.lb-step-block { align-self: stretch; display: grid; place-items: center; margin-top: 0.35rem; border-radius: 10px 10px 4px 4px; font-size: 1.6rem;
  background: linear-gradient(color-mix(in srgb, var(--gold) 22%, var(--cream-deep)), var(--cream-deep)); }
.lb-step-1 .lb-step-block { height: 5.6rem; background: linear-gradient(color-mix(in srgb, var(--gold) 42%, var(--cream-deep)), var(--cream-deep)); }
.lb-step-2 .lb-step-block { height: 4.1rem; }
.lb-step-3 .lb-step-block { height: 3.2rem; }
.leaderboard li.lb-step.lb-me .lb-step-block { box-shadow: inset 0 0 0 2px var(--gold); }
/* Places 4 and below scroll; a fade shows there's more */
.leaderboard ol.lb-scroll { max-height: 11.2rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
.leaderboard ol.lb-scroll.has-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 1.8rem), transparent); mask-image: linear-gradient(#000 calc(100% - 1.8rem), transparent); }
.leaderboard ol.lb-pinned { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px dashed var(--line); }
.leaderboard ol.lb-pinned[hidden] { display: none; }
/* Start screen: your all-time rank, points and streak, at the foot of the quiz column */
.quiz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 1.2rem; }
[data-live-stats] { margin-top: auto; }
.quiz-stat { background: var(--cream-deep); border-radius: 10px; padding: 0.65rem 0.8rem; }
.quiz-stat b { display: block; font: 700 1.45rem/1.15 var(--serif); color: var(--heading); }
.quiz-stat span { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.3; display: block; }
.quiz-streak { display: inline-block; margin-left: 0.2rem; font-weight: 700; color: var(--heading); white-space: nowrap; }
.quiz-yesterday, .quiz-streak-nudge { margin: 0.6rem 0 0; }
.quiz-review { margin: 0.6rem 0 0.4rem; border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.9rem; }
.quiz-review summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.quiz-review ol { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.quiz-review li p { margin: 0.1rem 0 0; }
.quiz-review-q { color: var(--heading); }
.quiz-review-ok { color: var(--ok); font-weight: 600; }
.quiz-review-no { color: var(--accent-text); font-weight: 600; text-decoration: line-through; }

/* --- Team bios: clickable Team-page tiles (js/team.js) --- */
.people-grid .person.has-bio { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.people-grid .person.has-bio:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.people-grid .person.has-bio:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.bio-hint { display: block; margin-top: 0.6rem; font-style: normal; font-weight: 700; font-size: 0.85rem; color: var(--accent-text); }
/* "Edit my bio" on a logged-in team member's own tile and pop-up (js/team.js) */
.bio-edit { position: relative; z-index: 1; display: inline-flex; flex-direction: column; align-items: center; margin-top: 0.6rem; padding: 0.35rem 0.8rem;
  border-radius: 999px; background: var(--gold); color: var(--navy-deep); font-weight: 700; font-size: 0.82rem; line-height: 1.25; }
.bio-edit:hover { text-decoration: none; background: var(--gold-soft); }
.bio-edit small { font-weight: 600; font-size: 0.7rem; opacity: 0.8; }
.people-grid .person.has-bio .bio-edit + .bio-hint, .bio-hint + .bio-edit { margin-top: 0.5rem; }
.bio-edit-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 1.8rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.bio-edit-row .muted { font-size: 0.88rem; }
.bio-pill { display: inline-block; padding: 0.15rem 0.65rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.bio-pill--ok { background: #dff3e1; color: #1f6b2a; }
.bio-pill--info { background: #fff1d6; color: #9a6400; }
.bio-pill--warn { background: #fde4d4; color: #9c4a1a; }
:root[data-theme="dark"] .bio-pill--ok { background: #173a1f; color: #7fd58c; }
:root[data-theme="dark"] .bio-pill--info { background: #3a2e12; color: #f2c66b; }
:root[data-theme="dark"] .bio-pill--warn { background: #3d2516; color: #f0a476; }
#tcsi-team-bio[hidden] { display: none !important; }
.bio-status .bio-view { margin-top: 0.6rem; align-self: flex-start; }

/* --- Team bio pop-up (js/bio-card.js) --- */
.bio-dialog {
  width: min(720px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0; border: 0;
  border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  outline: 1px solid rgba(255, 255, 255, 0.08);
}
.bio-dialog::backdrop {
  background: rgba(8, 12, 24, 0.78);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.bio-dialog[open] { display: flex; flex-direction: column; }
.bio-body { overflow-y: auto; padding: 2rem clamp(1.2rem, 4vw, 2.4rem) 2.2rem; }
.bio-close {
  position: absolute; top: 0.6rem; right: 0.8rem; z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--cream-deep); color: var(--heading); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.bio-close:hover { background: var(--line); }
.bio-banner { margin: 0 2.4rem 1.2rem 0; padding: 0.55rem 0.9rem; border-radius: 10px; background: var(--note-bg); border-left: 4px solid var(--gold); font-size: 0.9rem; }
.bio-head { display: grid; grid-template-columns: 148px 1fr; gap: 1.4rem; align-items: center; margin-right: 2rem; }
@media (max-width: 520px) { .bio-head { grid-template-columns: 1fr; justify-items: center; text-align: center; margin-right: 0; } }
.bio-photo {
  width: 148px; height: 148px; border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #24386b, var(--navy-deep)); border: 3px solid var(--gold); box-shadow: var(--shadow-sm);
  color: var(--gold-soft); font-family: var(--serif); font-weight: 700; font-size: 3rem;
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-head h2 { margin: 0 0 0.3rem; font-size: clamp(1.6rem, 4vw, 2.1rem); }
.bio-roles { list-style: none; margin: 0 0 0.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
@media (max-width: 520px) { .bio-roles { justify-content: center; } }
.bio-roles li { font-size: 0.8rem; font-weight: 700; color: var(--accent-text); background: var(--cream-deep); border-radius: 999px; padding: 0.2rem 0.65rem; }
.bio-tagline { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--heading); }
.bio-facts { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin: 1.4rem 0 0; padding: 0.9rem 1.1rem; background: var(--cream); border-radius: 12px; }
.bio-facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.bio-facts dd { margin: 0; font-weight: 600; color: var(--heading); }
.bio-story p { margin: 1rem 0 0; }
.bio-dialog h3 { margin: 1.6rem 0 0; font-size: 1.15rem; }
.bio-dialog h3 + p, .bio-dialog h3 + .bio-story p:first-child { margin-top: 0.4rem; }
.bio-quote { margin: 1.6rem 0 0; padding: 1rem 1.2rem; border-left: 4px solid var(--gold); background: var(--note-bg); border-radius: 0 12px 12px 0; }
.bio-quote p { margin: 0; font-family: "Noto Sans Tamil", var(--tamil); font-size: 1.2rem; font-weight: 600; color: var(--heading); }
.bio-quote cite { display: block; margin-top: 0.3rem; font-style: normal; font-size: 0.8rem; color: var(--ink-soft); }

/* --- Team bio form (team-bio.html, js/team-bio.js) --- */
.bio-form-wrap { max-width: 800px; }
.bio-form { display: flex; flex-direction: column; gap: 1.4rem; }
.bio-form fieldset.card { margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.bio-form fieldset.card:hover { transform: none; box-shadow: var(--shadow-sm); }
.bio-form legend {
  float: left; width: 100%; padding: 0; margin-bottom: 0.2rem; display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--heading);
}
.bio-form legend + * { clear: both; }
.bio-form legend .muted { font-family: var(--sans); font-size: 0.9rem; font-weight: 400; }
.step { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); font-family: var(--sans); font-size: 0.95rem; font-weight: 700; flex: 0 0 auto; }
.bio-form .field textarea, .bio-form .field select {
  font: inherit; padding: 0.6rem 0.8rem; color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; background: var(--cream); resize: vertical;
}
.bio-form .field textarea { line-height: 1.55; }
.bio-form .field textarea:focus, .bio-form .field select:focus { outline: none; border-color: var(--heading); }
.bio-form .field [aria-invalid="true"] { border-color: var(--clay); }
.char-count { float: right; font-variant-numeric: tabular-nums; }
.bio-form .check { align-items: flex-start; }
.bio-form .check input { margin-top: 0.2rem; flex: 0 0 auto; }
.bio-actions { justify-content: flex-end; }
.bio-actions .btn { font: inherit; font-weight: 700; }
.bio-actions .btn-outline { background: transparent; }
.bio-login { text-align: center; }
.bio-login .btn { font: inherit; font-weight: 700; }
.bio-status { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1.2rem; padding: 0.9rem 1.1rem; border-radius: 12px; border-left: 5px solid var(--gold); background: var(--note-bg); }
.bio-status b { color: var(--heading); }
.bio-status--ok { border-left-color: var(--ok); }
.bio-status--warn { border-left-color: var(--clay); }
.bio-status:focus { outline: none; }

.photo-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.4rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--cream); font-size: 0.92rem; }
@media (max-width: 620px) { .photo-guide { grid-template-columns: 1fr; } }
.photo-guide h4 { margin: 0 0 0.3rem; font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.photo-guide ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.photo-guide li { position: relative; padding-left: 1.5rem; }
.photo-dos li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--ok); }
.photo-donts li::before { content: "✕"; position: absolute; left: 0; font-weight: 700; color: var(--accent-text); }
.photo-note { grid-column: 1 / -1; margin: 0.4rem 0 0; color: var(--ink-soft); }
.photo-area { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.photo-drop {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 2rem 1rem; cursor: pointer;
  border: 2px dashed var(--gold); border-radius: var(--radius); background: var(--cream); text-align: center; color: var(--ink-soft);
}
.photo-drop b { color: var(--heading); font-size: 1.05rem; }
.photo-drop:hover, .photo-drop.is-over { background: var(--cream-deep); }
.photo-drop:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.photo-current { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.photo-current img { width: 180px; height: 180px; border-radius: 22px; object-fit: cover; border: 3px solid var(--gold); }
.photo-current .btn { font: inherit; font-weight: 600; background: transparent; }

.cropper { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 0.7rem; }
.cropper-frame { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; touch-action: none; cursor: grab; background: var(--cream-deep); }
.cropper-frame:active { cursor: grabbing; }
.cropper-frame:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.cropper-frame canvas { width: 100%; height: 100%; display: block; }
.cropper-guide { position: absolute; inset: 6%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 999px rgba(19, 31, 61, 0.35); pointer-events: none; }
.cropper-controls { display: flex; align-items: center; gap: 0.8rem; }
.cropper-zoom { flex: 1; display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; font-weight: 600; color: var(--heading); }
.cropper-zoom input { flex: 1; accent-color: var(--navy); }
.cropper-rotate { font: inherit; font-weight: 600; padding: 0.45rem 0.9rem; color: var(--heading); border-color: var(--line); background: transparent; }
.bio-form fieldset { min-width: 0; }
.bio-form .field select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.photo-drop[hidden], .photo-current[hidden], .cropper[hidden] { display: none; }

/* ============================================================
   Calendar page (calendar.html, js/calendar.js) — FullCalendar 6
   styled with the site's colours (works in light and dark mode).
   ============================================================ */
.calendar-section { padding-top: clamp(1.6rem, 3vw, 2.4rem); }
.cal-bar { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; margin-bottom: 1rem; }
.cal-filters { margin: 0; }
.cal-chip { display: inline-flex; align-items: center; gap: 0.4rem; }
.event-filters .cal-chip[aria-pressed="true"] { background: var(--surface); color: var(--heading); border-color: var(--chip-color); box-shadow: inset 0 0 0 1px var(--chip-color); }
.event-filters .cal-chip[aria-pressed="false"] { opacity: 0.55; text-decoration: line-through; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--chip-color); flex-shrink: 0; }
.cal-actions { display: flex; gap: 0.5rem; align-items: center; order: -1; }   /* Subscribe / Print above the filters */
.cal-subscribe .add-cal-menu { left: 0; right: auto; transform: none; min-width: 260px; max-width: calc(100vw - 2rem); }
.cal-subscribe .add-cal-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0.55rem 0.8rem; border-radius: 8px; color: var(--heading); font: 600 0.92rem var(--sans); cursor: pointer; }
.cal-subscribe .add-cal-menu button:hover { background: var(--cream-deep); }
.cal-subscribe-note { margin: 0.3rem 0.8rem 0.4rem; font-size: 0.8rem; color: var(--ink-soft); }
.cal-note { background: var(--note-bg); border-left: 4px solid var(--gold); border-radius: 8px; padding: 0.6rem 0.9rem; font-size: 0.92rem; margin: 0 0 1rem; }
.cal-error { border-left-color: #c62828; }
.cal-undated { margin-top: 1.6rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cal-undated h3 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 0.6rem; }
.cal-undated ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.cal-undated li { display: flex; align-items: center; gap: 0.5rem; }
.cal-foot { margin-top: 1.2rem; font-size: 0.9rem; }
.cal-card .cal-card-bar { height: 6px; border-radius: 6px; margin: 0 2.6rem 1rem 0; }
.cal-card .cal-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.4rem; }
.cal-card h2 { margin: 0 2rem 0.4rem 0; }

.tcsi-calendar {
  --fc-border-color: var(--line);
  --fc-page-bg-color: var(--surface);
  --fc-neutral-bg-color: var(--cream-deep);
  --fc-today-bg-color: color-mix(in srgb, var(--gold) 16%, transparent);
  --fc-button-bg-color: var(--navy);
  --fc-button-border-color: var(--navy);
  --fc-button-hover-bg-color: var(--navy-deep);
  --fc-button-hover-border-color: var(--navy-deep);
  --fc-button-active-bg-color: var(--gold);
  --fc-button-active-border-color: var(--gold);
  --fc-list-event-hover-bg-color: var(--cream-deep);
  --fc-event-border-color: transparent;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(0.6rem, 2vw, 1.2rem); box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
}
.tcsi-calendar .fc-toolbar-title { font-family: var(--serif); color: var(--heading); font-size: clamp(1.2rem, 3vw, 1.6rem); }
.tcsi-calendar .fc-button { font: 600 0.85rem var(--sans); text-transform: none; border-radius: 999px; padding: 0.4rem 0.9rem; box-shadow: none !important; }
.tcsi-calendar .fc-button-active { color: var(--navy-deep) !important; }
.tcsi-calendar .fc-button-group > .fc-button { border-radius: 0; }
.tcsi-calendar .fc-button-group > .fc-button:first-child { border-radius: 999px 0 0 999px; }
.tcsi-calendar .fc-button-group > .fc-button:last-child { border-radius: 0 999px 999px 0; }
.tcsi-calendar .fc-col-header-cell-cushion { color: var(--ink-soft); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.5rem 0; }
.tcsi-calendar .fc-daygrid-day-number { color: var(--heading); font-weight: 600; font-size: 0.85rem; }
.tcsi-calendar .fc-day-other .fc-daygrid-day-number { color: var(--ink-soft); opacity: 0.6; }
.tcsi-calendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { background: var(--gold); color: var(--navy-deep); border-radius: 999px; min-width: 1.7rem; text-align: center; margin: 2px; }
.tcsi-calendar .fc-event { cursor: pointer; border-radius: 6px; padding: 1px 4px; font-weight: 600; font-size: 0.8rem; }
.tcsi-calendar .fc-daygrid-more-link { color: var(--accent-text); font-weight: 600; }
.tcsi-calendar .fc-event.is-cancelled { opacity: 0.6; text-decoration: line-through; }
.tcsi-calendar .fc-list-day-cushion { background: var(--cream-deep); }
.tcsi-calendar .fc-list-day-text, .tcsi-calendar .fc-list-day-side-text { color: var(--heading); font-weight: 700; }
.tcsi-calendar .fc-list-event-title, .tcsi-calendar .fc-list-event-time { color: var(--ink); }
.tcsi-calendar .fc-list-event.is-cancelled .fc-list-event-title { text-decoration: line-through; opacity: 0.7; }
.tcsi-calendar .fc-popover { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.tcsi-calendar .fc-popover-header { background: var(--cream-deep); color: var(--heading); }
.tcsi-calendar .fc-list-empty { background: var(--surface); color: var(--ink-soft); }
@media (max-width: 700px) {
  .tcsi-calendar .fc-header-toolbar { flex-wrap: wrap; gap: 0.6rem; }
  .tcsi-calendar .fc-toolbar-chunk:nth-child(2) { order: -1; width: 100%; text-align: center; }
}

@media print {
  .site-header, .site-footer, .page-hero, .cal-bar, .cal-foot, .cal-note, .fc-header-toolbar .fc-button, .fc-header-toolbar .fc-button-group { display: none !important; }
  body { background: #fff; }
  .calendar-section { padding: 0; }
  .tcsi-calendar { border: 0; box-shadow: none; padding: 0; --fc-page-bg-color: #fff; --fc-border-color: #bbb; }
  .tcsi-calendar .fc-toolbar-title::before { content: "Tamil Center of Stamford — "; }
  .tcsi-calendar .fc-event, .cal-dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal-undated { break-inside: avoid; border-color: #bbb; }
}
/* Dark mode: a faint outline keeps dark category colours (e.g. navy) visible */
:root[data-theme="dark"] .cal-dot,
:root[data-theme="dark"] .tcsi-calendar .fc-list-event-dot { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.55); }
:root[data-theme="dark"] .tcsi-calendar .fc-daygrid-event { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28); }
:root[data-theme="dark"] .event-filters .cal-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--chip-color), 0 0 0 1px rgba(255,255,255,0.18); }
.events-cal-link { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 1.2rem 0 1.4rem; font-size: 0.9rem; }

/* ---- Interactive calendar (js/calendar.js) ---- */
.cal-overview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.cal-overview[hidden] { display: none; }
.cal-next { grid-row: span 2; display: grid; grid-template-columns: 120px 1fr; gap: 1.1rem; align-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: #c9d2e6; border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.cal-next h2 { color: var(--white); margin: 0.15rem 0 0.2rem; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.cal-next .eyebrow { color: var(--gold-soft); display: inline-flex; align-items: center; gap: 0.4rem; }
.cal-next .muted { color: #aab6d3; margin: 0; }
.cal-next-flyer { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,0.35); }
.cal-next-badge { width: 120px; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; color: #fff; font: 700 1.4rem var(--serif); text-align: center; }
.cal-next-cd { margin: 0.5rem 0 0; font-size: 1.05rem; color: var(--gold-soft); }
.cal-next-cd b { font-family: var(--serif); font-size: 1.4rem; color: var(--white); font-variant-numeric: tabular-nums; }
.cal-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin-top: 0.8rem; }
.cal-next-going { font-size: 0.88rem; color: #dfe5f3; }
.cal-pulse { width: 9px; height: 9px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 0 0 rgba(76,175,80,0.7); animation: cal-pulse 1.6s infinite; }
@keyframes cal-pulse { 70% { box-shadow: 0 0 0 10px rgba(76,175,80,0); } 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); } }
.cal-classday { display: flex; gap: 0.8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid #2e7d32; border-radius: var(--radius); padding: 0.85rem 1rem; }
.cal-classday--no_class { border-left-color: #c62828; }
.cal-classday-icon { font-size: 1.6rem; line-height: 1; }
.cal-classday b { display: block; color: var(--heading); }
.cal-classday .muted { font-size: 0.88rem; }
.cal-week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; min-width: 0; }
.cal-week h3 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 0.6rem; }
.cal-week-strip { display: flex; gap: 0.6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.3rem; }
.cal-week-card { flex: 0 0 150px; scroll-snap-align: start; text-align: left; border: 1px solid var(--line); border-top: 4px solid var(--chip-color); border-radius: 10px; background: var(--cream); padding: 0.5rem 0.6rem; cursor: pointer; color: var(--ink); font: inherit; display: flex; flex-direction: column; gap: 0.1rem; transition: transform 0.15s, box-shadow 0.15s; }
.cal-week-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cal-week-card b { color: var(--heading); font-size: 0.88rem; line-height: 1.25; }
.cal-week-card small, .cal-week-day { font-size: 0.75rem; color: var(--ink-soft); }
.cal-week-day { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--accent-text); }
@media (max-width: 820px) { .cal-overview { grid-template-columns: minmax(0, 1fr); } .cal-next { grid-row: auto; } }
@media (max-width: 480px) { .cal-next { grid-template-columns: 84px 1fr; } .cal-next-flyer, .cal-next-badge { width: 84px; } }

.cal-search { position: relative; }
.cal-search input { width: min(260px, 60vw); padding: 0.45rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 0.9rem var(--sans); }
.cal-search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cal-search-results { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, 90vw); max-height: 360px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 0.35rem; }
.cal-search-results button { display: flex; gap: 0.6rem; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 0.5rem 0.6rem; border-radius: 8px; cursor: pointer; color: var(--ink); font: inherit; }
.cal-search-results button:hover, .cal-search-results button:focus { background: var(--cream-deep); outline: none; }
.cal-search-results small { display: block; color: var(--ink-soft); font-size: 0.78rem; }
.cal-search-results p { margin: 0.5rem 0.6rem; font-size: 0.9rem; }
.cal-actions { flex-wrap: wrap; }
.cal-chip-my[aria-pressed="true"] { background: var(--gold) !important; color: var(--navy-deep) !important; border-color: var(--gold) !important; }
.cal-tips { margin-top: 0.6rem; font-size: 0.82rem; }
.cal-tips kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.3rem; font-size: 0.78rem; background: var(--surface); }
.cal-tamil { display: block; font-size: 0.9rem; font-weight: 600; color: var(--accent-text); margin-top: 0.1rem; font-family: "Noto Sans Tamil", var(--tamil); }

.tcsi-calendar.cal-anim .fc-view-harness { animation: cal-fade 0.28s ease-out; }
@keyframes cal-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tcsi-calendar.cal-anim .fc-view-harness, .cal-pulse { animation: none; } }
.tcsi-calendar .fc-event.is-live { box-shadow: 0 0 0 2px #4caf50; }
.tcsi-calendar .fc-daygrid-day-top { align-items: center; }
.cal-school { font-size: 0.72rem; margin: 3px auto 0 4px; line-height: 1; }
.tcsi-calendar .fc-multimonth-title { font-family: var(--serif); color: var(--heading); font-size: 1.05rem; }
.tcsi-calendar .fc-multimonth-daygrid { background: var(--surface); }
.tcsi-calendar .fc-multimonth-month { padding: 0.4rem; }
.tcsi-calendar .fc-multimonth .fc-daygrid-event { font-size: 0.68rem; padding: 0 3px; }
.tcsi-calendar .fc-multimonth .fc-daygrid-day-number { font-size: 0.75rem; }

.cal-preview { position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.12s; }
.cal-preview.show { opacity: 1; }
.cal-preview-flyer { width: 100%; max-height: 180px; object-fit: cover; object-position: top; display: block; }
.cal-preview-bar { height: 6px; }
.cal-preview-body { padding: 0.65rem 0.8rem 0.75rem; display: grid; gap: 0.15rem; font-size: 0.85rem; color: var(--ink); }
.cal-preview-body b { color: var(--heading); font-size: 0.95rem; }
.cal-preview-body em { font-size: 0.75rem; font-style: normal; margin-top: 0.2rem; }
.cal-preview-going { color: var(--accent-text); font-weight: 600; }

.cal-card-flyer { display: block; margin: 0 2.6rem 1rem 0; }
.cal-card-flyer img { width: 100%; max-height: 260px; object-fit: cover; object-position: top; border-radius: 10px; }
.cal-card-countdown { margin: 0 0 0.4rem; color: var(--accent-text); }
.cal-card-countdown b { font-variant-numeric: tabular-nums; }
.cal-card-actions { margin-top: 0.8rem; }
.cal-card-more { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.cal-card-more .add-cal-menu { left: 0; transform: none; }
.cal-card-more .add-cal-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0.55rem 0.8rem; border-radius: 8px; color: var(--heading); font: 600 0.92rem var(--sans); cursor: pointer; }
.cal-card-more .add-cal-menu button:hover { background: var(--cream-deep); }
.rsvp-btn.is-going { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.rsvp-count { font-weight: 500; opacity: 0.85; }
@media print { .cal-overview, .cal-tips, .cal-tamil, .cal-search { display: none !important; } }
.event-filters .cal-chip[hidden] { display: none; }
/* Year view: items as coloured dots */
.tcsi-calendar .fc-multimonth .fc-daygrid-day-events { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 8px; margin: 0 0 3px; }
.tcsi-calendar .fc-multimonth .fc-daygrid-event-harness { position: static !important; visibility: visible !important; margin: 0 !important; }
.tcsi-calendar .fc-multimonth .fc-daygrid-event { width: 7px; height: 7px; padding: 0; margin: 0; border-radius: 50%; }
.tcsi-calendar .fc-multimonth .fc-daygrid-day-bottom { display: none; }
.tcsi-calendar .fc-multimonth .fc-daygrid-day-frame { min-height: 0; }
/* Trivia: log in to get on the leaderboard (signed-out visitors) */
.quiz-login-card { margin: 0.6rem 0; padding: 0.9rem 1rem; border-radius: 12px; background: var(--note-bg); border: 1px solid var(--gold); border-left-width: 5px; }
.quiz-login-card b { color: var(--heading); display: block; }
.quiz-login-card p { margin: 0.3rem 0 0.7rem; font-size: 0.92rem; }
.quiz-login-card .btn-row { margin: 0; }
.quiz-login-card--warn { border-color: #c62828; }
.quiz-unsaved { margin: 0.2rem 0 0.4rem; color: var(--accent-text); }

/* ============================================================
   Calendar look v2 — calm grid, • dot + time + title for timed
   items, soft tinted bars for all-day / multi-day items
   (each item's colour arrives as --ev from js/calendar.js).
   ============================================================ */
.tcsi-calendar { padding: clamp(0.8rem, 2vw, 1.4rem); --fc-border-color: color-mix(in srgb, var(--line) 75%, transparent); }
.tcsi-calendar .fc-header-toolbar { margin-bottom: 1.2rem !important; }
.tcsi-calendar .fc-toolbar-chunk:first-child { display: flex; align-items: center; gap: 0.4rem; }
.tcsi-calendar .fc-toolbar-title { font-size: clamp(1.35rem, 3vw, 1.9rem); margin-left: 0.4rem !important; display: inline-block; }
/* Today: outlined pill; ‹ ›: plain chevrons */
.tcsi-calendar .fc-today-button { background: transparent !important; color: var(--heading) !important; border: 1px solid var(--line) !important; padding: 0.45rem 1.1rem !important; opacity: 1 !important; }
.tcsi-calendar .fc-today-button:hover { border-color: var(--heading) !important; }
.tcsi-calendar .fc-prev-button, .tcsi-calendar .fc-next-button { background: transparent !important; border: 0 !important; color: var(--heading) !important; border-radius: 999px !important; padding: 0.4rem 0.6rem !important; }
.tcsi-calendar .fc-prev-button:hover, .tcsi-calendar .fc-next-button:hover { background: var(--cream-deep) !important; }
/* Month · Week · List · Year: one pill */
.tcsi-calendar .fc-toolbar-chunk:last-child .fc-button-group { border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: transparent; }
.tcsi-calendar .fc-toolbar-chunk:last-child .fc-button { background: transparent !important; border: 0 !important; color: var(--ink) !important; border-radius: 999px !important; padding: 0.4rem 1rem !important; margin: 0 !important; }
.tcsi-calendar .fc-toolbar-chunk:last-child .fc-button:hover { background: var(--cream-deep) !important; }
.tcsi-calendar .fc-toolbar-chunk:last-child .fc-button-active { background: var(--navy) !important; color: var(--white) !important; }
:root[data-theme="dark"] .tcsi-calendar .fc-toolbar-chunk:last-child .fc-button-active { background: var(--gold) !important; color: var(--navy-deep) !important; }

/* The month grid: quiet lines, roomy days, centred numbers, no outer frame */
.tcsi-calendar .fc-scrollgrid { border: 0 !important; }
.tcsi-calendar .fc-theme-standard td, .tcsi-calendar .fc-theme-standard th { border-color: var(--fc-border-color); }
.tcsi-calendar .fc-col-header-cell { border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; }
.tcsi-calendar .fc-col-header-cell-cushion { font-weight: 500; letter-spacing: 0.06em; }
.tcsi-calendar .fc-dayGridMonth-view .fc-daygrid-day-frame { min-height: 118px; }
.tcsi-calendar .fc-dayGridMonth-view .fc-daygrid-day-top { justify-content: center; padding-top: 0.35rem; }
.tcsi-calendar .fc-dayGridMonth-view .fc-daygrid-day-number { font-weight: 500; font-size: 0.95rem; padding: 0.15rem 0.45rem; }
.tcsi-calendar .fc-daygrid-day.fc-day-today { background: transparent; }
.tcsi-calendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { background: var(--gold); color: var(--navy-deep); border-radius: 999px; min-width: 1.9rem; height: 1.9rem; display: grid; place-items: center; padding: 0; margin: 0; }
.tcsi-calendar .fc-day-other .fc-daygrid-day-number { opacity: 0.45; }
.cal-school { margin: 0 0.3rem 0 0; }

/* Timed items: • dot + "9a" + bold title, no fill */
.tcsi-calendar .fc-daygrid-dot-event { background: transparent !important; padding: 2px 4px; border-radius: 6px; font-size: 0.82rem; font-weight: 400; color: var(--ink); }
.tcsi-calendar .fc-daygrid-dot-event:hover { background: var(--cream-deep) !important; }
.tcsi-calendar .fc-daygrid-event-dot { border-color: var(--ev, var(--gold)) !important; border-width: 4.5px; margin: 0 6px 0 2px; }
.tcsi-calendar .fc-daygrid-dot-event .fc-event-time { font-weight: 400; color: var(--ink-soft); margin-right: 4px; }
.tcsi-calendar .fc-daygrid-dot-event .fc-event-title { font-weight: 700; color: var(--heading); overflow: hidden; text-overflow: ellipsis; }
/* All-day and multi-day items: soft tinted bars with a coloured edge */
.tcsi-calendar .fc-daygrid-block-event { background: color-mix(in srgb, var(--ev, var(--gold)) 22%, var(--surface)) !important; border: 0 !important;
  box-shadow: inset 3px 0 0 var(--ev, var(--gold)) !important; border-radius: 6px; padding: 3px 8px; margin-top: 1px; }
.tcsi-calendar .fc-daygrid-block-event .fc-event-main, .tcsi-calendar .fc-daygrid-block-event .fc-event-title { color: var(--heading) !important; font-weight: 600; font-size: 0.82rem; }
:root[data-theme="dark"] .tcsi-calendar .fc-daygrid-block-event { background: color-mix(in srgb, var(--ev, var(--gold)) 38%, var(--surface)) !important; }
.tcsi-calendar .fc-daygrid-more-link { font-size: 0.8rem; padding: 2px 4px; color: var(--ink-soft); font-weight: 600; }

/* Week view: times down the side, soft blocks */
.tcsi-calendar .fc-timegrid-slot { height: 1.55rem; }
.tcsi-calendar .fc-timegrid-slot-label-cushion, .tcsi-calendar .fc-timegrid-axis-cushion { font-size: 0.75rem; color: var(--ink-soft); }
.tcsi-calendar .fc-timeGridWeek-view .fc-col-header-cell-cushion { padding: 0.6rem 0; }
.tcsi-calendar .fc-timeGridWeek-view .fc-day-today { background: color-mix(in srgb, var(--gold) 7%, transparent) !important; }
.tcsi-calendar .fc-timegrid-event { background: color-mix(in srgb, var(--ev, var(--gold)) 20%, var(--surface)) !important; border: 0 !important;
  box-shadow: inset 3px 0 0 var(--ev, var(--gold)) !important; border-radius: 8px; padding: 3px 6px; }
.tcsi-calendar .fc-timegrid-event .fc-event-main { color: var(--heading) !important; }
.tcsi-calendar .fc-timegrid-event .fc-event-time { font-size: 0.72rem; color: var(--ink-soft); }
.tcsi-calendar .fc-timegrid-event .fc-event-title { font-weight: 700; font-size: 0.82rem; }
:root[data-theme="dark"] .tcsi-calendar .fc-timegrid-event { background: color-mix(in srgb, var(--ev, var(--gold)) 34%, var(--surface)) !important; }
.tcsi-calendar .fc-timegrid-now-indicator-line { border-color: var(--accent-text); }
.tcsi-calendar .fc-timegrid-now-indicator-arrow { border-color: var(--accent-text); }
/* List view: same dots */
.tcsi-calendar .fc-list-event-dot { border-color: var(--ev, var(--gold)) !important; }
.tcsi-calendar .fc-list-event-title { font-weight: 600; }
/* Cancelled items stay readable but struck through */
.tcsi-calendar .fc-event.is-cancelled .fc-event-title { text-decoration: line-through; opacity: 0.7; }
@media (max-width: 700px) {
  .tcsi-calendar .fc-toolbar-chunk:first-child { flex-wrap: wrap; justify-content: center; width: 100%; }
  .tcsi-calendar .fc-toolbar-chunk:last-child { width: 100%; display: flex; justify-content: center; }
  .tcsi-calendar .fc-toolbar-chunk:last-child .fc-button { padding: 0.35rem 0.7rem !important; font-size: 0.8rem; }
}
/* Dark mode: lighten each item's colour so dark ones (navy) stay visible; no boxes around dot items */
:root[data-theme="dark"] .tcsi-calendar { --ev-light: color-mix(in srgb, var(--ev, var(--gold)) 55%, #ffffff); }
:root[data-theme="dark"] .tcsi-calendar .fc-event { --ev-light: color-mix(in srgb, var(--ev, var(--gold)) 55%, #ffffff); }
:root[data-theme="dark"] .tcsi-calendar .fc-daygrid-dot-event { box-shadow: none !important; }
:root[data-theme="dark"] .tcsi-calendar .fc-daygrid-event-dot,
:root[data-theme="dark"] .tcsi-calendar .fc-list-event-dot { border-color: var(--ev-light) !important; box-shadow: none; }
:root[data-theme="dark"] .tcsi-calendar .fc-daygrid-block-event { background: color-mix(in srgb, var(--ev-light) 26%, var(--surface)) !important; box-shadow: inset 3px 0 0 var(--ev-light) !important; }
:root[data-theme="dark"] .tcsi-calendar .fc-timegrid-event { background: color-mix(in srgb, var(--ev-light) 24%, var(--surface)) !important; box-shadow: inset 3px 0 0 var(--ev-light) !important; }

/* Week (simple): weekday + date in the header, tall day columns, no time axis */
.tcsi-calendar .fc-dayGridWeek-view .fc-col-header-cell-cushion { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.4rem 0 0.6rem; }
.tcsi-calendar .cal-wd { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.tcsi-calendar .cal-wn { font-size: 1.25rem; font-weight: 600; color: var(--heading); min-width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.tcsi-calendar .cal-wn.is-today { background: var(--gold); color: var(--navy-deep); }
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-day-top { display: none; }          /* the date is in the header */
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-day-frame { min-height: 420px; padding-top: 0.3rem; }
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-day.fc-day-today { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-dot-event .fc-event-title { white-space: normal; }
@media (max-width: 700px) { .tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-day-frame { min-height: 240px; } }
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-dot-event { display: block; line-height: 1.35; padding: 3px 6px; }
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-dot-event > * { display: inline; }
.tcsi-calendar .fc-dayGridWeek-view .fc-daygrid-event-dot { display: inline-block; vertical-align: 1px; }
