/* JAAN – Junapani Alumni Association of Navodaya
   Site stylesheet. Built on Bootstrap 5 (css/bootstrap.min.css). */

:root {
  --ink: #14213d;
  --ink-2: #3a4660;
  --muted: #6b7487;
  --navy: #0f2a4a;
  --navy-2: #183d68;
  --saffron: #e39b2d;
  --saffron-2: #c7811a;
  --saffron-soft: #fdf2df;
  --green: #2e7d5b;
  --green-soft: #e3f3ea;
  --red: #b3403a;
  --red-soft: #fbe8e6;
  --amber: #a26a0b;
  --amber-soft: #fff4d6;
  --bg: #faf8f3;
  --surface: #ffffff;
  --line: #e8e2d4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 42, 74, .05), 0 10px 30px rgba(15, 42, 74, .07);
  --shadow-lg: 0 20px 50px rgba(15, 42, 74, .16);
  --font-head: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
h1, h2, h3, .display-font { font-family: var(--font-head); font-weight: 400; letter-spacing: 0; color: var(--ink); }
h4, h5, h6 { font-weight: 650; color: var(--ink); }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--saffron-2); }
img { max-width: 100%; }
::selection { background: var(--saffron-soft); }
.text-muted-jaan { color: var(--muted) !important; }
.visually-hidden-focusable:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .62rem 1.35rem; transition: all .18s ease; }
.btn-sm { padding: .4rem .95rem; }
.btn-jaan { background: var(--saffron); color: #1d1300; border: 1px solid var(--saffron); }
.btn-jaan:hover, .btn-jaan:focus { background: var(--saffron-2); border-color: var(--saffron-2); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.btn-navy:hover, .btn-navy:focus { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-light-outline { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .55); }
.btn-light-outline:hover { background: #fff; color: var(--navy); }
.btn:disabled { opacity: .65; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .22rem rgba(227, 155, 45, .35);
  border-color: var(--saffron);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .navbar { min-height: var(--header-h); padding: .5rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--navy); line-height: 1; }
.brand-sub { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .02em; margin-top: 3px; font-family: var(--font-body); font-weight: 500; }
.site-header .nav-link { color: var(--ink-2); font-weight: 550; padding: .5rem .85rem !important; border-radius: 999px; }
.site-header .nav-link:hover { color: var(--navy); background: var(--bg); }
.site-header .nav-link.active { color: var(--navy); background: var(--saffron-soft); }
.navbar-toggler { border: 1px solid var(--line); border-radius: 12px; padding: .45rem .6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(227, 155, 45, .35); }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem;
}
.avatar-lg { width: 84px; height: 84px; font-size: 1.8rem; font-family: var(--font-head); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .8rem; }
.dropdown-item:active { background: var(--navy); }
@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding: .75rem 0 1rem; }
  .header-actions { margin-top: .75rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: min(86vh, 720px);
  display: flex; align-items: center;
  background: var(--navy);
}
/* Photo carousel fills the hero behind the text */
.hero-carousel { position: absolute; inset: 0; z-index: 0; }
.hero-carousel .carousel-inner, .hero-carousel .carousel-item { height: 100%; }
.hero-carousel .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-carousel .carousel-item.active img { animation: heroZoom 9s ease-out both; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-carousel .carousel-inner::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, rgba(10, 28, 52, .94) 0%, rgba(10, 28, 52, .78) 45%, rgba(10, 28, 52, .30) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero-caption {
  position: absolute; right: 9.5rem; bottom: 1.6rem; z-index: 2;
  background: rgba(10, 28, 52, .55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
  padding: .35rem .85rem; font-size: .82rem; font-weight: 600; color: #fff;
}
.hero-carousel .carousel-indicators {
  z-index: 3; margin: 0 0 1.9rem; justify-content: flex-start;
  left: max(1rem, calc((100% - 1320px) / 2 + .75rem)); right: auto;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 28px; height: 4px; border-radius: 4px; border: 0; margin: 0 4px 0 0;
  background: #fff; opacity: .45; transition: opacity .2s, width .2s, background .2s;
}
.hero-carousel .carousel-indicators .active { opacity: 1; width: 44px; background: var(--saffron); }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next {
  z-index: 3; width: 52px; height: 52px; top: auto; bottom: 1rem; opacity: 1;
}
.hero-carousel .carousel-control-prev { left: auto; right: 4.5rem; }
.hero-carousel .carousel-control-next { right: 1rem; }
.hero-arrow {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); color: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.hero-carousel button:hover .hero-arrow, .hero-carousel button:focus-visible .hero-arrow {
  background: var(--saffron); border-color: var(--saffron); color: #1d1300;
}
@media (max-width: 767.98px) {
  .hero { min-height: 640px; }
  .hero-caption { left: 1rem; right: auto; bottom: 4.6rem; }
}
/* Keep the slide movement on even when the device asks for reduced motion (site owner's choice) */
.hero-carousel .carousel-item { transition: transform .9s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .carousel-item { transition: transform .9s ease-in-out !important; }
  .hero-carousel .carousel-item.active img { animation: none; }
}

.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.05; }
.hero .lead { color: rgba(255, 255, 255, .85); max-width: 560px; font-size: 1.15rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--saffron-2);
}
.hero .eyebrow { color: var(--saffron); }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.rotating-word { color: var(--saffron); display: inline-block; min-width: 4ch; }
.rotating-word.swap { animation: wordIn .5s ease; }
@keyframes wordIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.page-hero {
  position: relative; color: #fff;
  background: var(--navy) url("../images/JNVJunapaniMPHall.jpg") center / cover no-repeat;
  padding: 4.5rem 0 3.5rem;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 28, 52, .95), rgba(10, 28, 52, .72)); }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .5rem; }
.page-hero p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 640px; }
.page-hero .eyebrow { color: var(--saffron); }
.breadcrumb-jaan { font-size: .85rem; color: rgba(255, 255, 255, .7); margin-bottom: .75rem; }
.breadcrumb-jaan a { color: rgba(255, 255, 255, .85); }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-sm { padding: 3.5rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 2.25rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: .6rem 0 .8rem; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
@media (max-width: 767.98px) { .section { padding: 3rem 0; } }

/* ---------- Cards ---------- */
.card-jaan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 1.75rem; }
@media (min-width: 768px) { .card-pad { padding: 2.25rem; } }

.pillar { height: 100%; padding: 1.6rem; }
.pillar-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: var(--saffron-soft); color: var(--saffron-2); margin-bottom: 1rem;
}
.pillar h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.pillar p { color: var(--muted); margin: 0; }

.about-img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-badge {
  position: absolute; left: -12px; bottom: -18px;
  background: var(--saffron); color: #1d1300; border-radius: 14px;
  padding: .9rem 1.2rem; box-shadow: var(--shadow); font-weight: 700; line-height: 1.2;
}
.about-badge small { display: block; font-weight: 500; font-size: .78rem; }
@media (max-width: 575.98px) { .about-badge { left: 12px; } }

.team-card { overflow: hidden; height: 100%; }
.team-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.team-card .body { padding: 1.2rem 1.4rem; }
.team-card h4 { margin: 0; font-size: 1.1rem; }
.team-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Batch table ---------- */
.table-jaan { margin: 0; }
.table-jaan thead th {
  background: var(--navy); color: #fff; font-weight: 600; font-size: .85rem;
  letter-spacing: .03em; border: 0; padding: .9rem 1rem; white-space: nowrap;
}
.table-jaan thead th:first-child { border-top-left-radius: 12px; }
.table-jaan thead th:last-child { border-top-right-radius: 12px; }
.table-jaan td, .table-jaan tbody th { padding: .85rem 1rem; border-color: var(--line); vertical-align: middle; }
.table-jaan tbody tr:hover { background: var(--bg); }
.tick { font-size: 1.15rem; }
.tick.yes { color: var(--green); }
.tick.no { color: #c9c3b6; }

/* ---------- Post cards ---------- */
.post-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-media { position: relative; }
.post-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.date-badge {
  position: absolute; top: 14px; left: 14px;
  background: #fff; border-radius: 12px; text-align: center;
  padding: .45rem .75rem; box-shadow: var(--shadow); line-height: 1.05;
}
.date-badge .d { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.date-badge .m { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-2); }
.post-content { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.post-content h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.post-content h3 a { color: inherit; text-decoration: none; }
.post-content h3 a:hover { color: var(--saffron-2); }
.meta { list-style: none; padding: 0; margin: 0 0 1.2rem; color: var(--ink-2); font-size: .93rem; }
.meta li { display: flex; gap: .55rem; align-items: flex-start; margin-bottom: .35rem; }
.meta i { color: var(--saffron-2); margin-top: 2px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: 22px; padding: 2.75rem; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(227, 155, 45, .45), transparent 70%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .8); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: var(--radius-sm); border-color: #ddd6c7; padding: .7rem .9rem; background-color: #fff;
}
.form-control::placeholder { color: #a7a196; }
.form-text { color: var(--muted); }
.req::after { content: " *"; color: var(--red); }
.form-section-title {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--saffron-2);
  margin: 2rem 0 1rem; padding-top: 1.5rem; border-top: 1px dashed var(--line);
}
.form-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.input-group .btn-toggle-pw { border: 1px solid #ddd6c7; border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #fff; color: var(--muted); padding: 0 .9rem; }
.input-group .form-control { border-right: 0; }
.pw-rules { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .25rem .75rem; font-size: .85rem; color: var(--muted); }
.pw-rules li::before { content: "\F28A"; font-family: "bootstrap-icons"; margin-right: .4rem; color: #c9c3b6; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { content: "\F26B"; color: var(--green); }
.choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.choice {
  position: relative; display: flex; gap: .7rem; align-items: center;
  border: 1.5px solid var(--line); border-radius: 14px; padding: .9rem 1rem; cursor: pointer; background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: #d5cbb5; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice i { font-size: 1.35rem; color: var(--navy-2); }
.choice strong { display: block; font-size: .95rem; }
.choice small { color: var(--muted); font-size: .8rem; }
.choice:has(input:checked) { border-color: var(--saffron); background: var(--saffron-soft); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 .22rem rgba(227, 155, 45, .35); }

/* ---------- Alerts / status ---------- */
.alert-jaan { border-radius: 12px; padding: .9rem 1.1rem; border: 1px solid; display: flex; gap: .7rem; align-items: flex-start; }
.alert-jaan i { font-size: 1.1rem; margin-top: 1px; }
.alert-jaan.error { background: var(--red-soft); border-color: #f0c5c1; color: #7c2a25; }
.alert-jaan.success { background: var(--green-soft); border-color: #bfe2cf; color: #1d5a40; }
.alert-jaan.info { background: #eef3fa; border-color: #cfdcee; color: #1f3d66; }
.alert-jaan.warn { background: var(--amber-soft); border-color: #f2dea5; color: #6f4b06; }
.status-badge { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .3rem .8rem; font-size: .8rem; font-weight: 700; }
.status-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-badge.pending { background: var(--amber-soft); color: var(--amber); }
.status-badge.active { background: var(--green-soft); color: var(--green); }
.status-badge.rejected, .status-badge.suspended { background: var(--red-soft); color: var(--red); }
.status-badge.registered { background: #eef3fa; color: var(--navy-2); }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.profile-head h2 { margin: 0; font-size: 1.8rem; }
.id-pill { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .15rem .55rem; font-size: .88rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem 2rem; }
.detail dt { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.detail dd { margin: 0; font-weight: 550; word-break: break-word; }
.detail dd.empty { color: #b3ad9f; font-weight: 400; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 1.1rem 2.6rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--saffron-soft); color: var(--saffron-2);
}
.steps li.done::before { content: "\F26E"; font-family: "bootstrap-icons"; background: var(--green-soft); color: var(--green); }

/* ---------- Members directory ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.toolbar .search { position: relative; flex: 1 1 260px; }
.toolbar .search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 2.4rem; }
.toolbar .form-select { width: auto; min-width: 160px; }
.member-name { font-weight: 650; }
.member-sub { color: var(--muted); font-size: .83rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: #cfc8b8; display: block; margin-bottom: .6rem; }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, #eee8dc 25%, #f6f2ea 50%, #eee8dc 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Login panel ---------- */
.offcanvas.login-panel { width: min(420px, 100vw); border-left: 0; }
.login-panel .offcanvas-header { padding: 1.5rem 1.75rem 0; }
.login-panel .offcanvas-body { padding: 1.25rem 1.75rem 1.75rem; display: flex; flex-direction: column; }
.login-panel h2 { font-size: 1.7rem; margin: 0; }
.login-panel .help { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.3rem; }
.contact-item .ic { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--saffron-soft); color: var(--saffron-2); font-size: 1.15rem; }
.contact-item strong { display: block; }
.contact-item span, .contact-item a { color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .75); padding: 4rem 0 1.5rem; margin-top: auto; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: rgba(255, 255, 255, .6); }
.site-footer h5 { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: var(--saffron); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Keep screen-reader-only text inside its cell, and fit tables on phones */
.table-jaan td, .table-jaan th { position: relative; }
@media (max-width: 575.98px) {
  .table-jaan thead th, .table-jaan td, .table-jaan tbody th { padding: .7rem .6rem; font-size: .88rem; }
  .cta-band { padding: 2rem 1.5rem; }
}

/* ---------- Logged-in UI ---------- */
.dropdown-header { padding: .5rem .8rem .6rem; }
.dropdown-item.active { background: var(--saffron-soft); color: var(--navy); }
.role-badge { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; font-weight: 700; background: #eef3fa; color: var(--navy-2); }
.role-badge.admin { background: var(--navy); color: #fff; }
.role-badge.batch { background: var(--saffron-soft); color: var(--saffron-2); }
.toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: grid; gap: .5rem; max-width: min(380px, calc(100vw - 32px)); }
.toast-jaan { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); background: #fff; border: 1px solid var(--line); font-weight: 550; transition: opacity .3s, transform .3s; }
.toast-jaan.success i { color: var(--green); }
.toast-jaan.error i { color: var(--red); }
.toast-jaan.hide { opacity: 0; transform: translateY(8px); }
.tabs-jaan { display: inline-flex; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25rem; }
.tabs-jaan button { border: 0; background: transparent; border-radius: 999px; padding: .45rem 1rem; font-weight: 600; color: var(--ink-2); }
.tabs-jaan button[aria-selected="true"] { background: var(--navy); color: #fff; }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--saffron); color: #1d1300; font-size: .75rem; font-weight: 700; margin-left: .35rem; }
.reg-card { padding: 1.4rem 1.5rem; }
.reg-card + .reg-card { margin-top: 1rem; }
.reg-card .reg-head { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.reg-card .reg-head h3 { font-size: 1.2rem; margin: 0; font-family: var(--font-body); font-weight: 700; }
.reg-card .about { background: var(--bg); border-radius: 10px; padding: .8rem 1rem; color: var(--ink-2); white-space: pre-line; font-size: .93rem; }
.reg-card .detail-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem 1.5rem; }
.row-actions .dropdown-toggle::after { display: none; }
.row-actions .btn { padding: .3rem .6rem; }
.edit-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Very small phones: keep the menu button on the brand line */
@media (max-width: 419.98px) {
  .brand-sub { display: none; }
  .brand img { width: 40px; height: 40px; }
}

/* ---------- Hero video (thumbnail first, YouTube loads on click) ---------- */
.video-card {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: #0b1a2e; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .18);
}
.video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease, filter .3s; filter: brightness(.82); }
.video-play:hover img, .video-play:focus-visible img { transform: scale(1.03); filter: brightness(.95); }
.video-play-icon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: var(--saffron); color: #1d1300; font-size: 2.3rem; padding-left: 4px;
  box-shadow: 0 0 0 10px rgba(227, 155, 45, .25); transition: transform .2s ease, box-shadow .2s ease;
}
.video-play:hover .video-play-icon, .video-play:focus-visible .video-play-icon { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 0 0 14px rgba(227, 155, 45, .3); }
.video-play:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
.video-label {
  position: absolute; left: 1rem; bottom: 1rem; color: #fff; font-weight: 600; font-size: .9rem;
  background: rgba(10, 28, 52, .6); backdrop-filter: blur(6px); border-radius: 999px; padding: .35rem .8rem;
}

/* About JAAN video: same block as the old photo, label kept clear of the badge */
.about-video { border: 0; box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.about-video .video-label { left: auto; right: 1rem; top: 1rem; bottom: auto; }

/* ---------- Batches: stats, pager, recently joined ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.stat-num { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
@media (max-width: 575.98px) { .stat-row { gap: .6rem; } .stat { padding: .85rem .8rem; } .stat-num { font-size: 1.5rem; } .stat-label { font-size: .75rem; } }

.count { display: inline-block; min-width: 2.2rem; padding: .2rem .55rem; border-radius: 999px; font-weight: 700; font-size: .88rem; text-align: center; }
.count.reg { background: #eef3fa; color: var(--navy-2); }
.count.ok { background: var(--green-soft); color: var(--green); }
.count.wait { background: var(--amber-soft); color: var(--amber); }
.count.zero { background: transparent; color: #c2bcae; }
.batch-name { font-weight: 650; }
.batch-sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }
.admin-names { font-size: .88rem; }
.admin-names .none { color: #b9b3a5; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border-top: 1px solid var(--line); background: #fff; }
.pager-label { font-size: .88rem; color: var(--muted); font-weight: 600; }
.pager-btn {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--navy); transition: all .15s ease;
}
.pager-btn:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager-btn:focus-visible { outline: 3px solid rgba(227, 155, 45, .45); outline-offset: 2px; }
.pager-btn:disabled { opacity: .35; cursor: default; }


.avatar-img { object-fit: cover; padding: 0; background: var(--bg); }
.avatar-photo-wrap { position: relative; display: inline-block; }
.photo-edit-btn {
  position: absolute; right: -4px; bottom: -4px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid #fff; background: var(--saffron); color: #1d1300; font-size: .9rem;
}
.photo-edit-btn:hover { background: var(--saffron-2); color: #fff; }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.form-switch .form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-switch .form-check-label { cursor: pointer; padding-left: .3rem; }

.member-total { margin-top: .6rem; font-size: 1rem; color: var(--ink-2); }
.member-total i { color: var(--saffron-2); }
.member-total strong { color: var(--navy); }

/* ---------- Recently joined: continuous ticker ---------- */
.joiners-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.joiners-frame { display: flex; align-items: center; gap: .75rem; }
.joiners-arrow { flex: none; box-shadow: var(--shadow); }
.joiners-track {
  flex: 1; min-width: 0; overflow: hidden; padding: .35rem 0; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}
.joiners-track:focus-visible { outline: 3px solid rgba(227, 155, 45, .45); outline-offset: 4px; border-radius: 12px; }
.joiners-rail { display: flex; gap: 1rem; width: max-content; will-change: transform; }
.joiner {
  flex: none; width: 300px; min-width: 0;
  display: flex; align-items: center; gap: .85rem; height: 92px; padding: .8rem 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 42, 74, .05), 0 6px 16px rgba(15, 42, 74, .06);
}
.joiner .avatar { width: 56px; height: 56px; font-size: 1.05rem; flex: none; box-shadow: 0 0 0 3px var(--saffron-soft); }
.joiner-text { min-width: 0; }
.joiner-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joiner-line { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joiner-line .batch { color: var(--saffron-2); font-weight: 700; }
.joiners-empty { flex: 1; text-align: center; color: var(--muted); padding: 1.6rem 0; }
@media (max-width: 575.98px) {
  .joiner { width: 260px; }
  .joiners-frame { gap: .4rem; }
  .joiners-arrow { width: 34px; height: 34px; }
}

/* ---------- Batch table in two columns ---------- */
.batch-cols { display: grid; grid-template-columns: 1fr 1fr; }
.batch-cols .batch-table + .batch-table { border-left: 1px solid var(--line); }
.batch-table { margin: 0; table-layout: fixed; }
.batch-table th:nth-child(1) { width: 38%; }
.batch-table th:nth-child(2) { width: 22%; }
.batch-table thead th:first-child, .batch-table thead th:last-child { border-radius: 0; }
.batch-cols .batch-table:first-child thead th:first-child { border-top-left-radius: 0; }
.batch-table td, .batch-table tbody th { padding: .7rem .8rem; }
.batch-table .admin-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767.98px) {
  .batch-cols { grid-template-columns: 1fr; }
  .batch-cols .batch-table + .batch-table { border-left: 0; }
  .batch-cols .batch-table + .batch-table thead { display: none; }
}

/* Heading font has a single weight: never fake a bold version of it */
h1, h2, h3, .display-font, .brand-name, .date-badge .d, .stat-num, .joinee-name, .avatar-lg, .site-footer .brand-name { font-weight: 400; font-synthesis: none; }

/* ---------- Add Members ---------- */
.bulk-table { min-width: 980px; }
.bulk-table td, .bulk-table th { vertical-align: top; }
.bulk-table thead th { white-space: nowrap; }
.bulk-table .form-control-sm, .bulk-table .form-select-sm { min-width: 120px; border-radius: 8px; padding-top: .35rem; padding-bottom: .35rem; }
.bulk-table .bulk-cell-name .form-control-sm { min-width: 170px; }
.bulk-table .bulk-cell-email .form-control-sm { min-width: 190px; }
.bulk-table .bulk-cell-profession .form-select-sm { min-width: 180px; }
.bulk-table .bulk-status { min-width: 170px; }
.bulk-table td.cell-error { background: var(--red-soft); }
.bulk-table td.cell-error .form-control, .bulk-table td.cell-error .form-select { border-color: var(--red); }
#previewRows td { white-space: nowrap; font-size: .88rem; }

.email-box { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }

/* ---------- My Batch ---------- */
.mate-card { height: 100%; padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.mate-card.is-you { border-color: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-soft), var(--shadow); }
.mate-head { display: flex; gap: .9rem; align-items: center; }
.mate-photo { width: 64px; height: 64px; font-size: 1.2rem; flex: none; box-shadow: 0 0 0 3px var(--saffron-soft); }
.mate-title { min-width: 0; }
.mate-name { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; margin: 0; }
.mate-facts { margin: 0; font-size: .9rem; }
.mate-facts li span { min-width: 0; overflow-wrap: anywhere; }
.mate-about { margin: 0; color: var(--ink-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mate-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .3rem; }

/* ---------- Membership fee ---------- */
.fee-box { border: 1px solid #f2dea5; background: var(--amber-soft); border-radius: 12px; padding: .8rem 1rem; color: #6f4b06; }
.fee-box.paid { border-color: #bfe2cf; background: var(--green-soft); color: #1d5a40; }

/* ---------- Payments ---------- */
.pay-history { font-size: .85rem; }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem 0; border-top: 1px dashed var(--line); }
.pay-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 767.98px) { .pay-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Posts ---------- */
.post-cat { position: absolute; top: 14px; left: 14px; background: #fff; color: var(--navy); border-radius: 999px; padding: .3rem .75rem; font-size: .78rem; font-weight: 700; box-shadow: var(--shadow); }
.post-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-text p { font-size: 1.02rem; line-height: 1.75; color: var(--ink-2); white-space: pre-line; }
.cover-preview { width: 120px; height: 68px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.tabs-jaan.flex-wrap { display: inline-flex; flex-wrap: wrap; }
/* ---------- Membership ---------- */
.membership-card { height: 100%; }
.fee-amount { display: flex; align-items: baseline; gap: .5rem; margin: .5rem 0 .75rem; }
.fee-amount span { font-family: var(--font-head); font-size: 3rem; color: var(--navy); line-height: 1; }
.fee-amount small { color: var(--muted); font-weight: 600; }

/* ---------- Policy pages ---------- */
.policy h2 { font-family: var(--font-body); font-weight: 700; font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
.policy p, .policy li { color: var(--ink-2); line-height: 1.7; }
.policy ul { padding-left: 1.2rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: .38rem .85rem; font-weight: 600; font-size: .88rem; }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.post-author { display: flex; align-items: center; gap: .6rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.post-content .post-author { margin-top: .4rem; }
.post-author .avatar { width: 34px; height: 34px; font-size: .78rem; }
.post-author-name { font-weight: 650; font-size: .92rem; }
.my-post { padding: .6rem 0; border-top: 1px dashed var(--line); }
.my-post:first-child { border-top: 0; padding-top: 0; }

/* Whole post card is clickable (stretched link on the title) */
.post-card { position: relative; cursor: pointer; }
.post-card .post-media { position: relative; z-index: 0; }
.post-card:focus-within { box-shadow: 0 0 0 3px rgba(227, 155, 45, .45), var(--shadow); }
.read-more { font-weight: 600; font-size: .9rem; color: var(--saffron-2); margin-bottom: .6rem; }
.post-card:hover .read-more { text-decoration: underline; }
/* Pagination */
.pager-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; }
.page-btn { min-width: 40px; height: 40px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; }
.page-btn:hover:not(:disabled):not(.current) { border-color: var(--navy); }
.page-btn.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-btn:disabled { opacity: .4; }
.page-gap { color: var(--muted); padding: 0 .2rem; }
.page-info { width: 100%; text-align: center; font-size: .85rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Contact map ---------- */
.map-card { overflow: hidden; padding: 0; }
.map-card iframe { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 575.98px) { .map-card iframe { height: 300px; } }

/* ---------- Timeline (feed) ---------- */
.tl-page main { background: #f3f1ec; }
.min-w-0 { min-width: 0; }
.tl-side { position: sticky; top: calc(var(--header-h) + 16px); }
.tl-links { display: grid; gap: .15rem; }
.tl-links a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.tl-links a:hover, .tl-links a.active { background: var(--bg); color: var(--navy); }
.tl-links i { font-size: 1.1rem; color: var(--navy-2); width: 1.2rem; text-align: center; }
.tl-vis-help { list-style: none; padding: 0; margin: 0; font-size: .85rem; color: var(--ink-2); }
.tl-vis-help li { display: flex; gap: .55rem; margin-bottom: .45rem; }
.tl-vis-help i { color: var(--navy-2); margin-top: 2px; }

.tl-composer { padding: 1rem 1.1rem .8rem; margin-bottom: 1rem; }
.tl-compose-text { border-radius: 22px; background: var(--bg); border-color: transparent; resize: none; padding: .6rem 1rem; }
.tl-compose-text:focus { background: #fff; }
.tl-compose-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.tl-tool { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.tl-tool:hover { background: var(--bg); }
.tl-tool i { font-size: 1.15rem; }
.tl-select { width: auto; border-radius: 999px; font-size: .82rem; padding-top: .3rem; padding-bottom: .3rem; }

.tl-card { margin-bottom: 1rem; overflow: hidden; }
.tl-head { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.1rem .5rem; }
.tl-head .avatar { width: 42px; height: 42px; }
.tl-who { flex: 1; min-width: 0; }
.tl-name { font-weight: 700; line-height: 1.2; }
.tl-batch { color: var(--muted); font-weight: 500; font-size: .85rem; }
.tl-meta { font-size: .8rem; color: var(--muted); }
.tl-meta a { color: var(--muted); text-decoration: none; }
.tl-meta a:hover { text-decoration: underline; }
.tl-draft { margin-left: .4rem; background: var(--amber-soft); color: var(--amber); border-radius: 999px; padding: 0 .45rem; font-weight: 700; }
.tl-cat { font-size: .75rem; font-weight: 700; color: var(--navy-2); background: #eef3fa; border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; }
.tl-menu-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); }
.tl-menu-btn:hover { background: var(--bg); }
.tl-body { padding: 0 1.1rem .7rem; }
.tl-title { font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; margin: .2rem 0 .4rem; }
.tl-title a { color: inherit; text-decoration: none; }
.tl-text p { margin: 0 0 .6rem; white-space: pre-line; color: var(--ink); }
.tl-text.clamp { max-height: 9.6em; overflow: hidden; }
.tl-more { border: 0; background: none; padding: 0; color: var(--navy-2); font-weight: 600; }
.tl-facts { margin: .3rem 0 .4rem; }
.tl-link { margin-top: .2rem; }
.tl-counts { display: flex; align-items: center; padding: .55rem 1.1rem; font-size: .86rem; color: var(--muted); }
.tl-count { border: 0; background: none; color: var(--muted); padding: 0; }
.tl-count:hover { text-decoration: underline; }
.tl-like-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--navy-2); color: #fff; font-size: .62rem; vertical-align: -3px; }
.tl-actions { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 .6rem; }
.tl-action { flex: 1; border: 0; background: none; padding: .55rem .3rem; border-radius: 8px; margin: .2rem 0; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.tl-action:hover { background: var(--bg); }
.tl-action.liked { color: var(--navy-2); }
.tl-comments { padding: .75rem 1.1rem 1rem; }
.tl-comment { display: flex; gap: .5rem; margin-bottom: .55rem; }
.tl-comment .avatar { width: 32px; height: 32px; font-size: .72rem; flex: none; }
.tl-comment.reply .avatar { width: 26px; height: 26px; font-size: .62rem; }
.tl-c-main { min-width: 0; flex: 1; }
.tl-bubble { display: inline-block; background: var(--bg); border-radius: 16px; padding: .45rem .8rem; max-width: 100%; }
.tl-c-name { font-weight: 700; font-size: .85rem; }
.tl-c-text { font-size: .92rem; white-space: pre-line; overflow-wrap: anywhere; }
.tl-c-actions { display: flex; gap: .8rem; font-size: .76rem; color: var(--muted); padding: .15rem .6rem 0; }
.tl-c-act { border: 0; background: none; padding: 0; font-weight: 700; color: var(--muted); }
.tl-c-act:hover { text-decoration: underline; color: var(--ink); }
.tl-replies { margin-top: .5rem; }
.tl-new { display: flex; gap: .5rem; align-items: flex-start; margin-top: .4rem; }
.tl-new .avatar { width: 32px; height: 32px; font-size: .72rem; flex: none; }
.tl-new textarea { border-radius: 18px; background: var(--bg); border-color: transparent; resize: none; padding: .45rem .9rem; font-size: .92rem; }
.tl-new textarea:focus { background: #fff; }
.tl-send { border: 0; background: none; color: var(--navy-2); width: 36px; height: 36px; border-radius: 50%; }
.tl-send:hover { background: var(--bg); }
.tl-c-loading { font-size: .85rem; color: var(--muted); }
@media (max-width: 575.98px) { .tl-cat { display: none; } .tl-select { flex: 1; } }

/* Timeline filter */
.tl-filter { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.tl-filter select { width: auto; min-width: 11rem; border-radius: 999px; }

/* Photo picker */
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.pp-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg); display: grid; place-items: center; font-size: .8rem; color: var(--muted); }
.pp-tile img { width: 100%; height: 100%; object-fit: cover; }
.pp-x, .pp-first { position: absolute; top: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; display: grid; place-items: center; }
.pp-x { right: 4px; }
.pp-first { left: 4px; }
.pp-cover { position: absolute; left: 4px; bottom: 4px; background: var(--saffron); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 0 .45rem; }

/* Photos on a post */
.tl-photos { display: grid; gap: 3px; background: var(--line); }
.tl-photos.n1 { grid-template-columns: 1fr; }
.tl-photos.n2 { grid-template-columns: 1fr 1fr; }
.tl-photos.n3 { grid-template-columns: 1fr 1fr; }
.tl-photos.n3 .tl-ph:first-child { grid-column: span 2; }
.tl-photos.n4 { grid-template-columns: 1fr 1fr; }
.tl-photos.n5 { grid-template-columns: repeat(6, 1fr); }
.tl-photos.n5 .tl-ph { grid-column: span 2; }
.tl-photos.n5 .tl-ph:nth-child(-n+2) { grid-column: span 3; }
.tl-ph { position: relative; border: 0; padding: 0; background: var(--bg); display: block; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.tl-photos.n1 .tl-ph { aspect-ratio: auto; }
.tl-photos.n1 .tl-ph img { max-height: 560px; }
.tl-photos.n3 .tl-ph:first-child, .tl-photos.n5 .tl-ph:nth-child(-n+2) { aspect-ratio: 16 / 10; }
.tl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-ph-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font-size: 1.8rem; font-weight: 700; }
.tl-lb .modal-content { background: #000; border: 0; border-radius: 12px; position: relative; min-height: 50vh; display: grid; place-items: center; }
.tl-lb-img { max-width: 100%; max-height: 85vh; object-fit: contain; }
.tl-lb-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.tl-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.3rem; }
.tl-lb-nav:hover { background: rgba(255,255,255,.32); }
.tl-lb-nav.prev { left: 12px; }
.tl-lb-nav.next { right: 12px; }
.tl-lb-count { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; background: rgba(0,0,0,.5); border-radius: 999px; padding: .1rem .6rem; }
.tl-lb-count:empty { display: none; }

/* Timeline: membership fee strip on phones */
.tl-fee-strip { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; border-left: 4px solid var(--saffron); }
.tl-fee-strip[hidden] { display: none; }

/* Members directory */
.mate-link { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mate-link:hover, .mate-link:focus-visible { color: inherit; border-color: var(--saffron); transform: translateY(-2px); }
.mate-link .mate-name { color: var(--navy); }
.dir-letters { display: flex; flex-wrap: wrap; gap: 2px; }
.dir-letter { border: 0; background: none; min-width: 28px; height: 28px; border-radius: 6px; font-weight: 600; font-size: .85rem; color: var(--navy-2); }
.dir-letter:hover:not(:disabled) { background: var(--bg); }
.dir-letter[aria-pressed="true"] { background: var(--navy); color: #fff; }
.dir-letter:disabled { color: #c9c3b6; }
.dir-show { border-top: 1px solid var(--line); }

/* My Groups */
.grp-heading { font-family: var(--font-body); font-weight: 700; color: var(--navy); }
.grp-heading i { color: var(--saffron); }
.grp-search { min-width: 220px; }
.grp-card { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; height: 100%; color: inherit; text-decoration: none; flex-wrap: wrap; transition: transform .15s, border-color .15s; }
.grp-card:hover, .grp-card:focus-visible { color: inherit; border-color: var(--saffron); transform: translateY(-2px); }
.grp-card.is-mine { border-color: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-soft), var(--shadow); }
.grp-card.empty { opacity: .72; }
.grp-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-size: 1.25rem; flex: none; }
.grp-card.is-mine .grp-icon { background: var(--saffron); }
.grp-card.empty .grp-icon { background: #c9c3b6; }
.grp-body { flex: 1; min-width: 0; }
.grp-title { font-weight: 700; color: var(--navy); display: flex; align-items: center; flex-wrap: wrap; }
.grp-count { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-top: .1rem; }
.grp-faces { display: flex; padding-left: 8px; }
.grp-face { width: 32px; height: 32px; font-size: .7rem; margin-left: -8px; box-shadow: 0 0 0 2px #fff; border-radius: 50%; display: inline-grid; place-items: center; }
.grp-more { background: var(--bg); color: var(--ink-2); font-weight: 700; }
.grp-card.big { padding: 1.4rem 1.5rem; }
.grp-card.big .grp-icon { width: 64px; height: 64px; font-size: 1.6rem; }
.grp-card.big .grp-title { font-size: 1.25rem; }

/* Alumni Introductions badge (yellow, as on the JEC portal) */
.tl-cat.intro { background: #f9c623; color: #3b2a00; text-transform: uppercase; letter-spacing: .02em; }
.tl-filter select#feedBatch { min-width: 9rem; }

/* Manage Members: fee summary dots */
.fee-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; }
.fee-dot.paid { background: var(--green, #2e7d5b); }
.fee-dot.unpaid { background: var(--amber, #c98a12); }

/* Dashboard: membership card */
.ms-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.ms-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--saffron-soft); color: var(--saffron); display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.ms-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ms-title { font-family: var(--font-head); font-size: 1.25rem; color: var(--navy); line-height: 1.2; }
.ms-fee { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem .6rem; padding: .8rem 1rem; border-radius: 14px; background: var(--bg); }
.ms-amount { font-family: var(--font-head); font-size: 2rem; color: var(--navy); line-height: 1; }
.ms-once { font-size: .8rem; color: var(--ink-2); font-weight: 600; flex: 1; }
.ms-benefits { list-style: none; padding: 0; margin: 0 0 1rem; }
.ms-benefits li { display: flex; gap: .65rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .85rem; }
.ms-benefits li:first-child { border-top: 0; }
.ms-benefits i { color: var(--navy-2); font-size: 1.05rem; margin-top: 1px; }
.ms-benefits strong { display: block; color: var(--ink); font-size: .86rem; }
.ms-benefits span { color: var(--muted); }
.ms-howto { list-style: none; padding: 0; margin: .9rem 0 .6rem; font-size: .8rem; color: var(--ink-2); }
.ms-howto li { display: flex; gap: .5rem; margin-bottom: .35rem; }
.ms-howto i { color: var(--saffron); }
.ms-paid { padding: .8rem 1rem; border-radius: 14px; background: var(--green-soft, #e7f4ee); }
.tl-fee-strip .btn { white-space: nowrap; flex: none; }
.tl-fee-strip .small { display: block; line-height: 1.35; }

/* ---------- Phones / tablets, logged in: app bar + left drawer (desktop keeps the top menu) ---------- */
.m-appbar { display: none; }
@media (max-width: 991.98px) {
  .site-header.is-member .navbar { display: none; }
  .site-header.is-member .m-appbar { display: flex; align-items: center; gap: .75rem; min-height: 64px; padding: .55rem 1rem; }
}
.m-menu-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 1.5rem; display: grid; place-items: center; flex: none; }
.m-menu-btn:focus-visible, .m-avatar-btn:focus-visible { outline: 0; box-shadow: 0 0 0 .2rem rgba(227, 155, 45, .35); }
.m-greet { flex: 1; min-width: 0; }
.m-hi { font-weight: 700; color: var(--navy); font-size: 1.05rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-account { flex: none; }
.m-avatar-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.m-avatar-btn .avatar { width: 40px; height: 40px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--saffron-soft); }
.m-account .dropdown-menu { min-width: 240px; }

.m-drawer { --bs-offcanvas-width: 280px; background: var(--navy); color: #fff; }
.m-drawer .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.m-drawer .brand-name { color: #fff; }
.m-drawer .brand-sub { display: block; color: rgba(255, 255, 255, .6); }
.m-drawer .offcanvas-body { padding: .75rem .75rem 1rem; }
.m-section + .m-section { margin-top: 1rem; }
.m-section-title { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); padding: 0 .75rem .35rem; }
.m-link { display: flex; align-items: center; gap: .8rem; padding: .7rem .75rem; border-radius: 12px; color: rgba(255, 255, 255, .88); text-decoration: none; font-weight: 600; }
.m-link i { font-size: 1.15rem; width: 1.3rem; text-align: center; color: var(--saffron); }
.m-link:hover, .m-link:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; }
.m-link.active { background: rgba(255, 255, 255, .14); color: #fff; }
.m-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; background: var(--saffron); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.m-badge[hidden] { display: none; }
.m-drawer-foot { padding: 1rem 1.5rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .55); }
.m-drawer-foot a { color: rgba(255, 255, 255, .88); text-decoration: none; font-weight: 600; }

/* Contribution amount picker */
.cp { display: grid; gap: .5rem; }
.cp-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cp-chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: .32rem .8rem; font-weight: 700; font-size: .88rem; }
.cp-chip:hover { border-color: var(--navy); color: var(--navy); }
.cp-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cp-other { max-width: 100%; }
