/* ---------- Design tokens ---------- */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #edf1f5;
  --text: #1c2833;
  --text-muted: #55606e;
  --text-faint: #67727f;
  --border: #dbe2ea;
  --border-strong: #c4cfd9;
  --primary: #11395f;
  --primary-strong: #0a2740;
  --accent: #1c6ea8;
  --accent-strong: #155a8c;
  --nav-bg: #11395f;
  --nav-text: #e9eef4;
  --nav-text-muted: #b9c7d4;
  --nav-hover: #1a4a79;
  --nav-active: #2a70ad;
  --focus-ring: #2a70ad;
  --focus-ring-inverse: #ffd166;
  --tricolor-saffron: #ff9933;
  --tricolor-green: #138808;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(16, 32, 48, 0.05);
  --shadow-md: 0 2px 10px rgba(16, 32, 48, 0.07);

  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Nirmala UI", "Noto Sans Devanagari", "Noto Sans", sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.125rem;
  --lh-tight: 1.25;
  --lh-normal: 1.6;

  --container: 1120px;
  --transition: 160ms ease;
  --transition-slow: 260ms ease;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f141a;
  --surface: #161d26;
  --surface-2: #202b36;
  --text: #e6ebf1;
  --text-muted: #aab5c1;
  --text-faint: #7d8894;
  --border: #2a3542;
  --border-strong: #39485a;
  --primary: #6fb2e0;
  --primary-strong: #8fc6eb;
  --accent: #7ab8e8;
  --accent-strong: #8fc6eb;
  --nav-bg: #0c2233;
  --nav-text: #dbe7f0;
  --nav-text-muted: #9fb4c6;
  --nav-hover: #143a52;
  --nav-active: #1f5f8f;
  --focus-ring: #7ab8e8;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-main);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.site-nav :focus-visible { outline-color: var(--focus-ring-inverse); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition);
}
[data-theme="dark"] .skip-link {
  background: var(--accent-strong);
  color: #0f141a;
}

.skip-link:focus { top: var(--space-4); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
main { flex: 1; padding-block: var(--space-7) var(--space-8); }
.section { margin-bottom: var(--space-7); }
.section:last-child { margin-bottom: 0; }

/* ---------- Tricolor accent ---------- */
.tricolor-strip { display: flex; height: 3px; }
.tricolor-strip .saffron { flex: 1; background: var(--tricolor-saffron); }
.tricolor-strip .white { flex: 1; background: #fff; }
.tricolor-strip .green { flex: 1; background: var(--tricolor-green); }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: inherit;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.brand-logo {
  flex-shrink: 0;
  width: 88px;
  height: 64px;
  border-radius: 12px;
  background: url('../images/ceqwa-logo.jpg') center / contain no-repeat;
}
.brand-title-hi {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--primary);
  line-height: var(--lh-tight);
}
.brand-title-en {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: var(--lh-tight);
}
.brand-addr-hi,
.brand-addr-en {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-tight);
}

/* ---------- Navigation ---------- */
.site-nav { background: var(--nav-bg); }
.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.nav-list {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: block;
  padding: 0.6rem 0.9rem;
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--nav-hover); color: #fff; }
.nav-link.active { background: var(--nav-active); color: #fff; }

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::marker {
  content: "";
}

.nav-dropdown > summary::after {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
}

.nav-dropdown[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.nav-sublist {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  z-index: 20;
  display: none;
  min-width: 14rem;
  margin: 0;
  padding: var(--space-2);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.nav-dropdown[open] > .nav-sublist {
  display: block;
}

.nav-sublist .nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  white-space: nowrap;
}

.nav-sublist .nav-link:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.nav-sublist .nav-link.active {
  background: var(--nav-active);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--nav-text-muted);
  border-radius: var(--radius-sm);
  color: var(--nav-text);
  font-family: var(--font-main);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--nav-hover); }

.no-js .nav-toggle { display: none; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: relative;
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--nav-text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--nav-hover); }
.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity var(--transition), transform var(--transition);
}
.theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: var(--lh-tight); color: var(--text); }
.page-title { font-size: var(--fs-2xl); font-weight: 700; margin: 0 0 var(--space-4); }
.lead {
  max-width: 70ch;
  margin: 0 0 var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-lg);
}
h2.section-title { font-size: var(--fs-xl); font-weight: 700; margin: 0 0 var(--space-4); }

/* ---------- About ---------- */
.leadership-card {
  margin: 0 0 var(--space-4);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.leadership-card h2,
.leadership-card h3 {
  margin: 0 0 var(--space-4);
  font-size: var(--fs-xl);
}
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}
.leadership-member {
  min-width: 0;
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.leadership-member dt {
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: var(--lh-tight);
  text-transform: uppercase;
}
.leadership-member dd {
  margin: var(--space-2) 0 0;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: var(--lh-tight);
}

/* ---------- Executive Committee ---------- */
.committee-intro {
  max-width: 70ch;
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-lg);
}
.committee-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
}

.committee-member {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.committee-member summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: var(--space-3);
  padding: var(--space-4);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  line-height: var(--lh-tight);
  overflow-wrap: anywhere;
}

.committee-member p {
  margin: 0;
  padding: 0 var(--space-4) var(--space-4);
  color: var(--text-muted);
}

.committee-page section + section {
  margin-top: var(--space-5);
}

@media (max-width: 480px) {
  .committee-member summary {
    padding: var(--space-3);
  }
}

.election-note {
  margin: var(--space-4) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-style: italic;
}
.club-secretaries-card { margin: 0 0 var(--space-5); }
.club-secretaries-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-intro-copy,
.about-section,
.about-club-section,
.statement-panel {
  line-height: var(--lh-normal);
}
.about-intro-copy p,
.about-section p,
.about-club-section > p,
.about-club-copy p,
.about-club-more p,
.statement-panel p {
  max-width: none;
  margin: 0 0 var(--space-4);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.about-intro-copy p:last-child,
.about-section p:last-child,
.about-club-copy p:last-child,
.about-club-more p:last-child,
.statement-panel p:last-child { margin-bottom: 0; }
.about-section > .section-title,
.about-club-section .section-title { margin-bottom: var(--space-4); }
.about-section { margin-top: var(--space-7); }
.purpose-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}
.purpose-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
  text-align: left;
}
.purpose-list li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0.25rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}
.statement-panel {
  width: 100%;
  margin: var(--space-5) 0 0;
  padding: var(--space-4) var(--space-5) var(--space-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.statement-panel .section-title {
  margin: 0 0 var(--space-4);
  font-size: var(--fs-xl);
}
.statement-panel blockquote {
  margin: 0 0 var(--space-4);
  color: var(--primary);
  font-size: var(--fs-xl);
  font-weight: 700;
}
.about-club-section {
  margin-top: var(--space-7);
  padding-top: 0;
}
.about-club-kicker {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about-club-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-6);
  align-items: start;
}
.about-club-section > .page-title { margin-bottom: var(--space-4); }
.about-club-logo-card {
  --club-logo-radius: 1.75rem;
  margin: 0;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--club-logo-radius);
  box-shadow: var(--shadow-sm);
}
.about-club-logo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--club-logo-radius);
}
.about-club-purpose,
.about-club-more { margin-top: var(--space-7); }
.about-club-more .section-title {
  margin-bottom: var(--space-3);
  font-size: var(--fs-lg);
}

/* ---------- Panels / tables ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ---------- Event cards and galleries ---------- */
.events-feed,
.event-index-list {
  display: grid;
  gap: var(--space-5);
}

.event-index-list {
  grid-template-columns: 1fr;
}

.event-card,
.event-index-card {
  position: relative;
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 180ms ease, box-shadow 180ms ease;
}


.event-card:hover,
.event-index-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.event-card:active,
.event-index-card:active {
  transform: translateY(0);
}

.event-card:focus-within,
.event-index-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent),
    var(--shadow-md);
}

.event-card h2,
.event-index-card h2 {
  margin: 0;
  color: var(--primary);
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
}

.event-card .event-kicker,
.event-index-card .event-kicker {
  margin-bottom: var(--space-2);
  color: var(--accent);
}

.event-card .event-description,
.event-index-card .event-description {
  color: var(--text-muted);
}

.event-card .event-year,
.event-index-card .event-year {
  color: var(--text-muted);
}

.event-index-card > a {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

.event-index-card > a:hover {
  color: var(--accent-strong);
}

.event-index-card > a span {
  font-size: var(--fs-lg);
  line-height: 1;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.event-index-card > a:hover span {
  transform: translateX(3px);
}

.event-kicker {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: var(--lh-tight);
  text-transform: uppercase;
}

.event-description {
  margin: var(--space-4) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-md);
}

.event-year {
  margin: var(--space-3) 0 0;
  color: var(--text-faint);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.event-detail-media {
  margin: var(--space-6) 0 0;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.event-detail-media img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.event-detail-media figcaption {
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.event-gallery,
.event-detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.event-gallery figure,
.event-detail-gallery .event-media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.event-gallery img,
.event-detail-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.event-gallery figcaption,
.event-detail-gallery figcaption {
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

/* ---------- Event album (Cloudflare R2 media) ---------- */
.event-album {
  margin-top: var(--space-5);
}

.event-album-details {
  margin-top: var(--space-3);
}

.event-album-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease;
}

.event-album-toggle:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent-strong);
}

.event-album-toggle::-webkit-details-marker {
  display: none;
}

.event-album-toggle::after {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: var(--space-3);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.event-album-details[open] .event-album-toggle {
  border-color: var(--accent);
  border-bottom-right-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.event-album-details[open] .event-album-toggle::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.event-album-details[open] .event-gallery,
.event-album-details[open] .event-detail-gallery {
  margin-top: var(--space-4);
}

.event-media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.event-media img,
.event-media video,
.event-media-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.event-media img {
  object-fit: cover;
}

.event-media-player {
  border: 0;
}

.event-media figcaption {
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.event-album-note {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.archive-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.archive-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.archive-kicker {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: var(--lh-tight);
  text-transform: uppercase;
}
.archive-card-title {
  margin: 0;
  color: var(--primary);
  font-size: var(--fs-lg);
  line-height: var(--lh-tight);
}
.archive-card-meta,
.archive-card-note {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.archive-card-amount {
  margin: var(--space-3) 0 0;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 700;
}
.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-5);
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.data-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }

.action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.4rem 0.8rem;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--primary);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.action:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-2); }

.empty-state {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.state-message { padding: var(--space-5); text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.noscript-fallback { padding: var(--space-4); }
.noscript-fallback p { color: var(--text-muted); }

.monthly-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-label { color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; }
.filter-select {
  min-width: 10rem;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.filter-summary { color: var(--text-muted); font-size: var(--fs-xs); }
.tag-list { color: var(--text-muted); font-size: var(--fs-xs); }
.monthly-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.metric-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.metric-label { color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.metric-card strong { color: var(--primary); font-size: var(--fs-lg); }

/* ---------- Tabs ---------- */
.tab-bar {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  padding: 0.55rem 1rem;
  min-height: 44px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.tab-panel[hidden] { display: none; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--accent); }

/* ---------- Dashboard ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  min-width: 0;
  overflow: hidden;
}
.chart-card.chart-wide { grid-column: 1 / -1; }
.chart-title { font-size: var(--fs-md); font-weight: 700; color: var(--primary); margin: 0 0 var(--space-3); }
.chart { width: 100%; min-width: 0; min-height: 320px; overflow: hidden; }
.chart-summary { color: var(--text-muted); font-size: var(--fs-xs); margin: 0 0 var(--space-2); }
.chart-data {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  overflow-x: auto;
}
.chart-data summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.compact-data-table { margin-top: var(--space-3); }
.compact-data-table caption { padding: var(--space-2) 0; text-align: left; color: var(--text-muted); font-weight: 600; }

.no-js .tab-bar { display: none; }
.no-js #panel-dashboard,
.no-js #panel-monthly-dashboard,
.no-js #panel-monthly-data { display: none; }
.no-js #panel-finances[hidden] { display: block !important; }
.no-js .state-row { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-bottom {
  padding: var(--space-5) 0;
  text-align: center;
  color: var(--text-faint);
  font-size: var(--fs-xs);
}
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-block: var(--space-2);
  }
  .nav-list.is-open { display: flex; }
  .no-js .nav-list { display: flex; }
  .nav-list > li,
  .nav-dropdown,
  .nav-dropdown > summary {
    width: 100%;
  }
  .nav-sublist {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0 0 0 var(--space-3);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nav-sublist .nav-link {
    width: 100%;
    white-space: normal;
  }
  .brand-title-hi { font-size: var(--fs-md); }
  .brand-title-en { font-size: var(--fs-xs); }
  .brand-addr-hi, .brand-addr-en { display: none; }
  .brand-logo { width: 72px; height: 54px; }
  .leadership-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-club-intro { grid-template-columns: 1fr; }
  .purpose-list { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .event-index-list { grid-template-columns: 1fr; }
  .monthly-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .club-secretaries-grid { grid-template-columns: 1fr; }
  .event-gallery,
  .event-detail-gallery { grid-template-columns: 1fr; }
  .archive-feed { grid-template-columns: 1fr; }
  .monthly-metrics { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Home ---------- */
.home-content {
  padding-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  align-items: center;
  gap: var(--space-7);
  min-height: 390px;
  padding-block: var(--space-3) var(--space-5);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 var(--space-1);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 12ch;
  margin: 0 0 var(--space-4);
  font-size: clamp(2.35rem, 5vw, 4.25rem);
  letter-spacing: -0.04em;
}

.hero .lead {
  max-width: 48ch;
}

.hero-art {
  position: relative;
  min-height: 330px;
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.hero-art img {
  position: relative;
  display: block;
  width: 100%;
  height: 330px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-strong);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--primary);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

[data-theme="dark"] .button-primary {
  background: var(--nav-bg);
  color: var(--nav-text);
}

[data-theme="dark"] .button-primary:hover {
  background: var(--nav-hover);
}

.section-heading {
  margin-bottom: var(--space-4);
}

.section-heading .section-title {
  margin-bottom: 0;
}

.snapshot-grid,
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.snapshot-card,
.value-card {
  min-width: 0;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.snapshot-card {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
}

.snapshot-card strong {
  color: var(--primary);
  font-size: var(--fs-2xl);
  line-height: 1;
}

.snapshot-card span {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.event-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  min-height: 280px;
  overflow: hidden;
  background: var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.event-feature-copy {
  padding: var(--space-6);
  color: #fff;
}

.event-feature h3 {
  margin: 0 0 var(--space-3);
  color: #fff;
  font-size: var(--fs-2xl);
}

.event-feature-copy > p:not(.event-kicker):not(.event-year) {
  color: #dce9f4;
}

.event-feature .event-kicker {
  color: #ffd166;
}

.event-year {
  font-weight: 700;
}

.event-feature .event-year {
  color: #fff;
}

[data-theme="dark"] .event-feature .event-year {
  color: var(--nav-text);
}

.event-feature-media {
  min-height: 280px;
}

.event-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

[data-theme="dark"] .event-feature {
  background: var(--nav-bg);
  color: var(--nav-text);
}

[data-theme="dark"] .event-feature h3 {
  color: var(--nav-text);
}

[data-theme="dark"] .event-feature-copy > p:not(.event-kicker):not(.event-year) {
  color: var(--nav-text-muted);
}

[data-theme="dark"] .event-feature .event-kicker {
  color: #ffd166;
}

[data-theme="dark"] .event-feature .text-link {
  color: var(--nav-text);
}

[data-theme="dark"] .event-feature .text-link:hover {
  color: #ffd166;
}

.text-link {
  display: inline-block;
  margin-top: var(--space-3);
  color: #fff;
  font-weight: 700;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: #ffd166;
}

.value-card {
  position: relative;
  padding-top: var(--space-5);
}

.value-card h3 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--fs-xl);
}

.value-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.value-number {
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .hero h1 {
    max-width: 16ch;
  }

  .hero-art,
  .hero-art img {
    min-height: 250px;
    height: 250px;
  }
}

@media (max-width: 560px) {
  .snapshot-grid,
  .values-grid,
  .event-feature {
    grid-template-columns: 1fr;
  }

  .snapshot-card {
    min-height: 96px;
  }

  .event-feature-media,
  .event-feature-media img {
    min-height: 210px;
    height: 210px;
  }

  .event-feature-copy {
    padding: var(--space-5);
  }

  .hero {
    padding-top: var(--space-4);
  }

  .hero-art::before {
    inset: 0;
  }

}

.home-content > .section {
  margin-bottom: var(--space-5);
}

.home-content > .section:last-child {
  margin-bottom: 0;
}
@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}

.about-page .section {
  margin-bottom: var(--space-5);
}

.about-page .about-section,
.about-page .about-club-section,
.about-page .about-club-purpose,
.about-page .about-club-more {
  margin-top: var(--space-5);
}

[data-theme="dark"] .event-card {
  background: var(--nav-bg);
  border-color: var(--nav-hover);
}

/* ---------- Shared box surfaces ---------- */
.event-feature,
.event-card,
.leadership-card,
.archive-card,
.chart-card,
.metric-card,
.value-card,
.snapshot-card,
.panel {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.event-feature-copy {
  color: var(--text);
}

.event-feature h3 {
  color: var(--primary);
}

.event-feature-copy > p:not(.event-kicker):not(.event-year) {
  color: var(--text-muted);
}

.event-feature .event-kicker,
.event-card .event-kicker {
  color: var(--accent);
}

.event-feature .event-year,
.event-card .event-year {
  color: var(--text-muted);
}

.event-feature .text-link {
  color: var(--accent);
}

.event-feature .text-link:hover {
  color: var(--accent-strong);
}

[data-theme="dark"] .event-feature,
[data-theme="dark"] .event-card {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .event-feature h3 {
  color: var(--primary);
}

[data-theme="dark"] .event-feature-copy > p:not(.event-kicker):not(.event-year) {
  color: var(--text-muted);
}

[data-theme="dark"] .event-feature .event-kicker,
[data-theme="dark"] .event-card .event-kicker {
  color: var(--accent);
}

[data-theme="dark"] .event-feature .text-link {
  color: var(--accent);
}

[data-theme="dark"] .event-feature .text-link:hover {
  color: var(--accent-strong);
}

/* ---------- Event card text contrast ---------- */
.event-card h2 {
  color: var(--primary);
}

.event-card .event-description {
  color: var(--text-muted);
}

.event-card .event-year {
  color: var(--text-muted);
}

.event-index-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 0;
  min-height: 300px;
  padding: 0;
  overflow: hidden;
}

.event-index-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6);
}

.event-index-copy > .event-description {
  max-width: 48ch;
}

.event-index-media {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.event-index-media::before {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -3.5rem;
  z-index: 1;
  width: 8rem;
  background: linear-gradient(90deg, var(--surface) 18%, transparent 100%);
  content: "";
  filter: blur(14px);
}

.event-index-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

@media (max-width: 700px) {
  .event-index-card {
    grid-template-columns: 1fr;
  }

  .event-index-copy {
    padding: var(--space-5);
  }

  .event-index-media {
    min-height: 220px;
  }

  .event-index-media::before {
    top: -2rem;
    right: -10%;
    bottom: auto;
    left: -10%;
    width: auto;
    height: 5rem;
    background: linear-gradient(180deg, var(--surface) 12%, transparent 100%);
  }

  .event-index-media img {
    min-height: 220px;
  }
}

/* ---------- Event gallery links (lightbox) ---------- */
.event-media-link {
  position: relative;
  display: block;
  text-decoration: none;
}

.event-media-link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---------- Event gallery video tiles ---------- */
.event-media-link-video {
  position: relative;
  overflow: hidden;
}

.event-media-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.event-media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  transition: background var(--transition);
}

.event-media-play::before {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  padding-left: 0.2rem;
  background: rgba(0, 0, 0, 0.62);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: #fff;
  font-size: 1.15rem;
  content: "\25B6";
}

.event-media-link-video:hover .event-media-play {
  background: rgba(0, 0, 0, 0.45);
}

