/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --teal:        #074d50;
  --teal-mid:    #0a6b6e;
  --teal-light:  #c8e6e7;
  --gold:        #b58a3a;
  --gold-light:  #f5e9cc;
  --ivory:       #fdf8f0;
  --cream:       #f5efe0;
  --line:        #d9cdb8;
  --text:        #1e1a14;
  --muted:       #5a5247;
  --white:       #ffffff;
  --ff-serif:    'Noto Serif Devanagari', serif;
  --ff-sans:     'Noto Sans Devanagari', sans-serif;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(7,77,80,.10);
  --trans:       .22s ease;
}

/* ── Dark Mode ───────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --teal:        #3eb8bc;
    --teal-mid:    #5acdd1;
    --teal-light:  #0d3a3c;
    --gold:        #d4a74a;
    --gold-light:  #3a2e14;
    --ivory:       #121212;
    --cream:       #1c1c1c;
    --line:        #2e2e2e;
    --text:        #e8e0d4;
    --muted:       #9e9488;
    --white:       #1a1a1a;
    --shadow:      0 4px 24px rgba(0,0,0,.40);
  }

  /* Navbar backdrop */
  .nav { background: rgba(18,18,18,.92); border-bottom-color: var(--line); }

  /* Inputs */
  input, select, textarea { background: #1e1e1e; color: var(--text); border-color: var(--line); }

  /* Admin table */
  .admin th { background: #252525; }
  .detail dt { background: #222; }

  /* Callout & footer — keep brand teal but darkened */
  .callout, footer { background: #063537; }

  /* Navbar mobile dropdown */
  .nav nav { background: #121212; }
}


/* An explicit user choice must override the system preference above. */
:root[data-theme="light"] { --teal:#074d50; --teal-mid:#0a6b6e; --teal-light:#c8e6e7; --gold:#b58a3a; --gold-light:#f5e9cc; --ivory:#fdf8f0; --cream:#f5efe0; --line:#d9cdb8; --text:#1e1a14; --muted:#5a5247; --white:#fff; --shadow:0 4px 24px rgba(7,77,80,.10); }
:root[data-theme="light"] .nav { background:rgba(253,248,240,.92); border-bottom-color:#d9cdb8; }
:root[data-theme="light"] .nav nav { background:#fdf8f0; }
:root[data-theme="light"] .nav nav a { color:#5a5247; }
:root[data-theme="light"] .nav nav a:hover,:root[data-theme="light"] .nav nav a.active { background:#c8e6e7; color:#074d50; }
:root[data-theme="light"] .nav-cta { background:#074d50!important; color:#fff!important; }
:root[data-theme="dark"] { --teal:#69d2d4; --teal-mid:#8ce4e5; --teal-light:#123f42; --gold:#e2ba69; --gold-light:#3b2e13; --ivory:#111817; --cream:#182220; --line:#31403d; --text:#f3eee3; --muted:#c2c8c0; --white:#182220; --shadow:0 4px 24px rgba(0,0,0,.40); }
:root[data-theme="dark"] .nav { background:rgba(17,24,23,.96); border-bottom-color:#31403d; }
:root[data-theme="dark"] .nav nav a { color:#d7dfd8; }
:root[data-theme="dark"] .nav nav a:hover,:root[data-theme="dark"] .nav nav a.active { background:#123f42; color:#9cebed; }
:root[data-theme="dark"] .nav-cta { background:#69d2d4!important; color:#102220!important; }
:root[data-theme="dark"] .nav-cta:hover { background:#8ce4e5!important; }
:root[data-theme="dark"] .nav nav { background:#111817; }
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea { background:#182220; color:var(--text); border-color:var(--line); }
:root[data-theme="dark"] footer { background:#063537; color:#e8f2ee; }
:root[data-theme="dark"] footer .brand { color:#ffffff; }
:root[data-theme="dark"] footer .brand i { color:#f0c976; }
:root[data-theme="dark"] footer p { color:#e8f2ee; }
:root[data-theme="dark"] footer small { color:#c8d9d2; opacity:1; }
:root[data-theme="dark"] .courtesy-footer { border-color:rgba(232,242,238,.35); }
:root[data-theme="dark"] .courtesy-footer span { color:#f0c976; }
:root[data-theme="dark"] .courtesy-footer strong { color:#ffffff; }
:root[data-theme="dark"] .callout { background:#063537; color:#ffffff; }
:root[data-theme="dark"] .callout h2 { color:#ffffff; }
:root[data-theme="dark"] .callout p { color:#e8f2ee; }
:root[data-theme="dark"] .callout .eyebrow { color:#f0c976; }
.theme-btn { appearance:none; width:2.35rem; height:2.35rem; display:inline-grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:var(--cream); color:var(--teal); cursor:pointer; font-size:1.05rem; line-height:1; }
.theme-btn:hover { background:var(--teal-light); }
.theme-btn:focus-visible,.menu:focus-visible,a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  font-size: 19px;
  line-height: 1.75;
  color: var(--text);
  background: var(--ivory);
}

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  line-height: 1.25;
  color: var(--teal);
}

h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }

p { margin-bottom: .9rem; }

/* ── Skip Link ───────────────────────────────────────────── */
.skip {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--teal);
  color: var(--white);
  padding: .4rem .9rem;
  border-radius: var(--radius);
  font-size: .85rem;
  transition: top var(--trans);
  z-index: 999;
}
.skip:focus { top: .6rem; }

/* ── Navbar ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6%;
  background: rgba(253,248,240,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  gap: 1.5rem;
}

.nav .brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-family: var(--ff-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--teal);
  line-height: 1.2;
}
.nav .brand i { font-size: 1.6rem; font-style: normal; color: var(--gold); }

.nav nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav nav a {
  padding: .4rem .75rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: .92rem;
  color: var(--muted);
  transition: background var(--trans), color var(--trans);
}
.nav nav a:hover, .nav nav a.active {
  background: var(--teal-light);
  color: var(--teal);
}
.nav-cta {
  background: var(--teal) !important;
  color: var(--white) !important;
  padding: .45rem 1.1rem !important;
  border-radius: 20px !important;
  font-weight: 600;
  transition: background var(--trans) !important;
}
.nav-cta:hover { background: var(--teal-mid) !important; }

.menu { display: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.button {
  display: inline-block;
  padding: .75rem 1.8rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--ff-sans);
  font-size: .95rem;
  border: 2px solid var(--teal);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  cursor: pointer;
}
.button:hover {
  background: var(--teal-mid);
  box-shadow: 0 6px 20px rgba(7,77,80,.25);
  transform: translateY(-2px);
}
.button.light {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.button.light:hover {
  background: var(--teal);
  color: var(--white);
}
.callout .button.light {
  background: #fff8e8;
  border-color: #fff8e8;
  color: #074d50;
}
.callout .button.light:hover { background: #ffffff; border-color: #ffffff; color: #053d40; }

.text-link {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 1px;
  transition: color var(--trans), border-color var(--trans);
}
.text-link:hover { color: var(--gold); border-color: var(--teal); }

/* ── Eyebrow label ───────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .6rem;
}

/* ── Lead paragraph ──────────────────────────────────────── */
.lead { font-size: 1.1rem; color: var(--muted); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 6rem 6% 5rem;
  min-height: 80vh;
  background: linear-gradient(135deg, var(--ivory) 60%, var(--cream) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(181,138,58,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero > div:first-child { max-width: 560px; }
.hero h1 { margin-bottom: .4rem; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero h2 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.event-mini {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin-bottom: 1.6rem;
  font-size: .92rem;
  color: var(--muted);
}
.event-mini b { color: var(--teal); margin-right: .3rem; }
.hero p:last-child { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ── Emblem ──────────────────────────────────────────────── */
.emblem {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emblem img {
  width: 320px;
  height: 320px;
  object-fit: contain;
}

/* ── Sections: intro, details, page ────────────────────────── */
.intro, .page {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 6%;
}
.intro h2, .page h1 { margin-bottom: 1rem; }

.details {
  background: var(--cream);
  padding: 5rem 6%;
  text-align: center;
}
.details h2 { margin-bottom: 2rem; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}
.detail-grid > div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
}
.detail-grid b {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .3rem;
}
.detail-grid span {
  font-family: var(--ff-serif);
  font-size: 1.05rem;
  color: var(--teal);
}

/* ── Callout banner ──────────────────────────────────────── */
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem 6%;
  background: var(--teal);
  color: var(--white);
}
.callout .eyebrow { color: var(--gold-light); }
.callout h2 { color: var(--white); margin-bottom: .5rem; }
.callout p { color: rgba(255,255,255,.8); margin: 0; }

/* ── Registration grid ───────────────────────────────────── */
.reg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.reg-grid > a {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--trans), box-shadow var(--trans), transform var(--trans);
}
.reg-grid > a:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.reg-grid b {
  display: block;
  font-family: var(--ff-serif);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: .5rem;
}
.reg-grid h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.reg-grid p { font-size: .9rem; color: var(--muted); margin: 0 0 .8rem; }
.reg-grid span { font-size: .85rem; font-weight: 600; color: var(--teal); }

/* ── Forms (registration, contact) ──────────────────────── */
.page form, form.form {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}
label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: .95rem;
  background: var(--white);
  color: var(--text);
  transition: border-color var(--trans), box-shadow var(--trans);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(7,77,80,.12);
}
textarea { resize: vertical; min-height: 100px; }
button[type="submit"], input[type="submit"] {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 30px;
  font: 600 1rem var(--ff-sans);
  cursor: pointer;
  transition: background var(--trans), transform var(--trans);
}
button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--teal-mid);
  transform: translateY(-2px);
}


/* ── Form polish ─────────────────────────────────────────── */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset + fieldset {
  margin-top: .6rem;
}
fieldset legend {
  padding: 0;
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input[type="date"] {
  color-scheme: light;
}
:root[data-theme="dark"] input[type="date"] {
  color-scheme: dark;
}
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.15);
  opacity: .9;
}
.date-field {
  position: relative;
}
.date-field .date-hint {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  background: var(--white);
  padding-right: 2.4rem;
  line-height: 1;
}
.date-field.has-value .date-hint,
.date-field:focus-within .date-hint {
  display: none;
}

/* ── Program / Sohala page ───────────────────────────────── */
.program-list {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}
.program-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}
.program-list time {
  font-family: var(--ff-serif);
  font-size: 1rem;
  color: var(--gold);
  white-space: nowrap;
  min-width: 90px;
}

/* ── Success page ────────────────────────────────────────── */
.success {
  max-width: 600px;
  margin: 5rem auto;
  padding: 3rem 6%;
  text-align: center;
}
.success h1 { color: var(--teal); margin-bottom: 1rem; }

/* ── 404 / 500 page ──────────────────────────────────────── */
.error-page {
  max-width: 560px;
  margin: 8rem auto;
  padding: 2rem 6%;
  text-align: center;
}
.error-page h1 { font-size: 5rem; margin-bottom: .5rem; }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--teal);
  color: rgba(255,255,255,.75);
  padding: 3rem 6%;
  text-align: center;
}
footer .brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: .6rem;
}
footer .brand i { font-style: normal; color: var(--gold); font-size: 1.4rem; }
footer p { margin-bottom: .3rem; font-size: .95rem; }
footer small { font-size: .8rem; opacity: .6; }
.courtesy-footer { max-width: 36rem; margin: 1rem auto; padding: .85rem 1rem; border-top: 1px solid rgba(255,255,255,.28); border-bottom: 1px solid rgba(255,255,255,.28); display:flex; align-items:center; justify-content:center; gap:1rem; text-align:left; }
.courtesy-footer .courtesy-logo { flex:0 0 78px; width:78px; height:78px; max-width:78px; object-fit:contain; }
.courtesy-text { display:flex; flex-direction:column; justify-content:center; min-width:0; }
.courtesy-footer span { display:block; color: var(--gold-light); font-size: .78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-bottom: .3rem; }
.courtesy-footer strong { display:block; color:#fff; font-size:.92rem; font-weight:600; line-height:1.45; }


/* ── Admin dark-theme readability ───────────────────────── */
:root[data-theme="dark"] .admin h1,
:root[data-theme="dark"] .admin h2,
:root[data-theme="dark"] .admin .brand,
:root[data-theme="dark"] .admin .brand a,
:root[data-theme="dark"] .admin label,
:root[data-theme="dark"] .admin th,
:root[data-theme="dark"] .admin td,
:root[data-theme="dark"] .admin dt,
:root[data-theme="dark"] .admin dd { color: #f3eee3; }
:root[data-theme="dark"] .admin .admin-login-intro,
:root[data-theme="dark"] .admin small { color: #c2c8c0; }
:root[data-theme="dark"] .admin input,
:root[data-theme="dark"] .admin select,
:root[data-theme="dark"] .admin textarea {
  background: #182220;
  color: #f3eee3;
  border-color: #4b5d59;
}
:root[data-theme="dark"] .admin input::placeholder,
:root[data-theme="dark"] .admin textarea::placeholder { color: #aeb9b3; opacity: 1; }
:root[data-theme="dark"] .admin th { background: #24302e; }
:root[data-theme="dark"] .admin .detail dt { background: #202b29; }
:root[data-theme="dark"] .admin .table-wrap,
:root[data-theme="dark"] .admin .stats a,
:root[data-theme="dark"] .admin .detail dl { background: #182220; }
:root[data-theme="dark"] .admin header { border-bottom-color: #31403d; }

/* ── Admin light-theme readability ───────────────────────── */
:root[data-theme="light"] .admin h1,
:root[data-theme="light"] .admin h2,
:root[data-theme="light"] .admin .brand,
:root[data-theme="light"] .admin .brand a,
:root[data-theme="light"] .admin label,
:root[data-theme="light"] .admin th,
:root[data-theme="light"] .admin td,
:root[data-theme="light"] .admin dt,
:root[data-theme="light"] .admin dd { color: #1e1a14; }
:root[data-theme="light"] .admin .admin-login-intro,
:root[data-theme="light"] .admin small { color: #5a5247; }
:root[data-theme="light"] .admin input,
:root[data-theme="light"] .admin select,
:root[data-theme="light"] .admin textarea {
  background: #ffffff;
  color: #1e1a14;
  border-color: #d9cdb8;
}
:root[data-theme="light"] .admin input::placeholder,
:root[data-theme="light"] .admin textarea::placeholder { color: #766d61; opacity: 1; }
:root[data-theme="light"]  .admin th { background: #e9dfcc; }
.photo-cell {
  width: 72px;
  text-align: center !important;
  vertical-align: middle;
}
.table-photo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eee;
}
:root[data-theme="light"] .admin .detail dt { background: #f1eadc; }
:root[data-theme="light"] .admin .table-wrap,
:root[data-theme="light"] .admin .stats a,
:root[data-theme="light"] .admin .detail dl { background: #f5efe0; }
:root[data-theme="light"] .admin header { border-bottom-color: #d9cdb8; }

/* ── Admin / Login ───────────────────────────────────────── */
.login, .admin {
  max-width: 1100px;
  margin: auto;
  padding: 4rem 6%;
}
.login { max-width: 520px; }
.login h1 { font-size: 2rem; margin-top: .15rem; }
.admin-login { max-width: 520px; }
.admin-login-brand { margin-bottom:1rem; }
.admin-login-brand .eyebrow { margin-bottom:.15rem; }
.admin-login-intro { color:var(--muted); margin-bottom:1.6rem; }
.admin header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.admin header button, .actions button {
  padding: .55rem .8rem;
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--trans), color var(--trans);
}
.admin header button:hover, .actions button:hover {
  background: var(--teal);
  color: var(--white);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stats a {
  padding: 1.4rem;
  background: var(--cream);
  border: 1px solid var(--line);
  text-decoration: none;
  border-radius: var(--radius);
  transition: box-shadow var(--trans);
}
.stats a:hover { box-shadow: var(--shadow); }
.stats b { display: block; font: 2.6rem var(--ff-serif); color: var(--teal); }
.actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin: 1.4rem 0;
}
.actions form { display: flex; gap: .4rem; }
.actions input { margin: 0; }
.table-wrap { overflow: auto; background: var(--cream); border-radius: var(--radius); }
.admin table { width: 100%; border-collapse: collapse; min-width: 650px; }
.admin th, .admin td {
  padding: .7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
 .admin th { background: #e9dfcc; }
.photo-cell {
  width: 72px;
  text-align: center !important;
  vertical-align: middle;
}
.table-photo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eee;
}
.pagination { display: flex; gap: .4rem; margin-top: 1rem; }
.pagination a {
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  text-decoration: none;
  border-radius: 4px;
  transition: background var(--trans);
}
.pagination .active { background: var(--teal); color: var(--white); }
.detail dl {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail dt, .detail dd { margin: 0; padding: .75rem; border-bottom: 1px solid var(--line); }
.detail dt { font-weight: 700; background: #f1eadc; }
.detail-photo-cell {
  vertical-align: middle;
}
.photo {
  display: block;
  width: 180px;
  height: 220px;
  max-width: 100%;
  object-fit: contain;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.danger {
  background: #842d30;
  color: var(--white);
  border: 0;
  padding: .7rem 1.2rem;
  font: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--trans);
}
.danger:hover { background: #6b1e21; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .reg-grid    { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  /* Navbar mobile */
  .nav { padding: 10px 5%; position: relative; }
  .menu {
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--teal);
    padding: .2rem;
    margin-right: .75rem;
  }
  .nav .brand { flex: 0 0 auto; }
  .nav #theme-toggle { margin-left: auto; flex: 0 0 auto; }
  .nav nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--ivory);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
    flex-direction: column;
    gap: .1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
  }
  .nav nav.open { display: flex; }
  .nav-cta { text-align: center; }

  /* Hero mobile */
  .hero { padding: 4rem 5%; flex-direction: column; min-height: 0; gap: 2rem; }
  .emblem { margin: 0 auto; }
  .emblem img { width: 200px; height: 200px; }

  /* Sections mobile */
  .detail-grid, .stats { grid-template-columns: 1fr; }
  .callout { flex-direction: column; text-align: center; padding: 2.5rem 5%; }
  .callout .button { margin-top: 1rem; }
  .intro, .page, .success { padding: 3rem 5%; }

  /* Forms */
  .actions, .actions form { display: block; }
  .actions .button { margin-top: .8rem; }

  /* Admin */
  .detail dl { grid-template-columns: 1fr; }
  .detail dt { border-bottom: 0; }
  .detail dd { padding-top: .2rem; }
  .admin { padding: 2rem 5%; }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Honeypot anti-spam field: keep it in the form for bot detection, but never show it to users. */
.hp {
  display: none !important;
}

/* ── Contact page ───────────────────────────────────────── */
/* Keep every contact section vertically stacked and use the same card language as Registration. */
.contact-page { max-width: 900px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact-card {
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: none;
  transition: border-color var(--trans), box-shadow var(--trans), transform var(--trans);
}
.contact-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.contact-label {
  margin: 0 0 .65rem;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.contact-card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.55;
}
.contact-card-contacts { grid-column: auto; }
.contact-people {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-top: 1rem;
}
.contact-person {
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.contact-person h2 {
  font-size: 1rem;
  line-height: 1.5;
}
.contact-person a {
  display: inline-block;
  margin-top: .55rem;
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .03em;
}
.contact-person a:hover { text-decoration: underline; }
.contact-card > p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}
.donation-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 1.5rem;
}
.donation-qr {
  display: block;
  width: min(100%, 430px);
  height: auto;
  border-radius: var(--radius);
}
.bank-details {
  display: grid;
  gap: .85rem;
  margin-top: 1.1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.bank-row {
  display: grid;
  grid-template-columns: 145px 18px 1fr;
  gap: .45rem;
  align-items: start;
  line-height: 1.55;
}
.bank-key {
  font-weight: 700;
  color: var(--text);
}
.bank-separator {
  color: var(--teal);
  font-weight: 700;
}
.bank-row strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bank-message {
  margin: 1.15rem 0 0 !important;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--text) !important;
  text-align: center;
  font-weight: 600;
}
.contact-courtesy {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-aadhaar-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  flex: 0 0 78px;
}
@media (max-width: 700px) {
  .contact-card { padding: 1.5rem; }
  .contact-courtesy { align-items: flex-start; }
  .bank-row {
    grid-template-columns: 1fr;
    gap: .1rem;
  }
  .bank-separator { display: none; }
  .bank-row strong { margin-bottom: .2rem; }
}

/* ── Final admin dark-mode form override ─────────────────── */
:root[data-theme="dark"] .admin input,
:root[data-theme="dark"] .admin select,
:root[data-theme="dark"] .admin textarea,
:root[data-theme="dark"] .admin input[type="text"],
:root[data-theme="dark"] .admin input[type="password"],
:root[data-theme="dark"] .admin input[type="search"] {
  background-color: #182220 !important;
  color: #f3eee3 !important;
  -webkit-text-fill-color: #f3eee3;
  border-color: #4b5d59 !important;
  color-scheme: dark;
}

:root[data-theme="dark"] .admin input::placeholder,
:root[data-theme="dark"] .admin textarea::placeholder {
  color: #aeb9b3 !important;
  -webkit-text-fill-color: #aeb9b3;
  opacity: 1;
}

:root[data-theme="dark"] .admin .detail dl,
:root[data-theme="dark"] .admin .detail dt,
:root[data-theme="dark"] .admin .detail dd,
:root[data-theme="dark"] .admin .table-wrap,
:root[data-theme="dark"] .admin .stats a {
  background-color: #182220 !important;
  color: #f3eee3 !important;
}

:root[data-theme="dark"] .admin .detail dt {
  background-color: #202b29 !important;
  color: #f3eee3 !important;
}

/* ── Inline registration form validation ───────────────── */
.form .field-error {
  display: block;
  min-height: 0;
  margin-top: .35rem;
  color: #c62828;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}
.form .field-error:empty { display: none; }
.form input.is-invalid,
.form select.is-invalid,
.form textarea.is-invalid {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 3px rgba(198,40,40,.10) !important;
}
:root[data-theme="dark"] .form .field-error { color: #ff8a80; }
:root[data-theme="dark"] .form input.is-invalid,
:root[data-theme="dark"] .form select.is-invalid,
:root[data-theme="dark"] .form textarea.is-invalid { border-color: #ff6b6b !important; }

/* ── Inline form validation ─────────────────────────────── */
.form .field-error {
  display: block;
  margin-top: .35rem;
  color: #c62828;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
}
.form input.is-invalid,
.form select.is-invalid,
.form textarea.is-invalid {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .10);
}
.form input.is-invalid:focus,
.form select.is-invalid:focus,
.form textarea.is-invalid:focus {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .16);
}
.form .check.is-invalid { color: #c62828; }
.form .check .field-error { margin-left: 1.65rem; }


/* ── Admin theme support ───────────────────────────────── */
.admin,
.admin-login {
  color: var(--text);
}

.admin header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin header .brand {
  min-width: 0;
}

.admin-theme-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Explicit light-mode overrides for admin pages.
   These win even when the operating system/browser is in dark mode. */
:root[data-theme="light"] .admin,
:root[data-theme="light"] .admin-login {
  color: #1e1a14;
  background: transparent;
}

:root[data-theme="light"] .admin .table-wrap {
  background: #f5efe0;
}

:root[data-theme="light"] .admin th {
  background: #e9dfcc;
  color: #1e1a14;
}

:root[data-theme="light"] .admin td {
  background: #f5efe0;
  color: #1e1a14;
}

:root[data-theme="light"] .admin .stats a {
  background: #f5efe0;
  color: #1e1a14;
  border-color: #d9cdb8;
}

:root[data-theme="light"] .admin .detail dl {
  background: #f5efe0;
  color: #1e1a14;
  border-color: #d9cdb8;
}

:root[data-theme="light"] .admin .detail dt {
  background: #f1eadc;
  color: #1e1a14;
}

:root[data-theme="light"] .admin .detail dd {
  background: #f5efe0;
  color: #1e1a14;
}

:root[data-theme="light"] .admin input,
:root[data-theme="light"] .admin select,
:root[data-theme="light"] .admin textarea,
:root[data-theme="light"] .admin-login input {
  background: #fff;
  color: #1e1a14;
  border-color: #d9cdb8;
  -webkit-text-fill-color: #1e1a14;
  color-scheme: light;
}

:root[data-theme="light"] .admin input::placeholder,
:root[data-theme="light"] .admin textarea::placeholder,
:root[data-theme="light"] .admin-login input::placeholder {
  color: #5a5247;
  -webkit-text-fill-color: #5a5247;
  opacity: 1;
}

/* Dark-mode detail labels: never use a white label background. */
:root[data-theme="dark"] .admin .detail dl {
  background: #182220 !important;
  color: #f3eee3 !important;
}

:root[data-theme="dark"] .admin .detail dt {
  background: #202b29 !important;
  color: #f3eee3 !important;
}

:root[data-theme="dark"] .admin .detail dd {
  background: #182220 !important;
  color: #f3eee3 !important;
}

@media (max-width: 720px) {
  .admin header {
    align-items: center;
  }

  .admin-theme-btn {
    margin-left: auto;
  }
}

/* WhatsApp QR section */
.contact-card-whatsapp { text-align: center; }
.whatsapp-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem auto .75rem;
}
.whatsapp-qr {
  display: block;
  width: min(360px, 100%);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.whatsapp-message {
  margin: .5rem 0 0;
  color: var(--text);
  font-weight: 600;
}

/* ── Coming Soon pages ─────────────────────────────────── */
.coming-soon-page { min-height: 68vh; display: grid; place-items: center; }
.coming-soon { width: min(720px, 100%); text-align: center; padding: 5rem 2rem; }
.coming-icon { width: 72px; height: 72px; margin: 0 auto 1.5rem; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 1.8rem; background: var(--cream); }
.coming-soon h1 { margin-bottom: .8rem; }
.coming-soon .lead { max-width: 560px; margin: 0 auto; line-height: 1.8; }
.coming-badge { display: inline-block; margin-top: 2rem; padding: .65rem 1.2rem; border-radius: 30px; background: var(--teal-light); color: var(--teal); font-weight: 700; }
.coming-note { margin-top: 1rem; color: var(--muted); font-size: .9rem; }

/* Digital Smaranika PDF viewer */
.smaranika-page {
  padding-bottom: 2rem;
}

.smaranika-viewer {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.smaranika-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.smaranika-heading h1 {
  margin: 0;
}

.pdf-viewer {
  width: 100%;
  height: min(82vh, 1100px);
  min-height: 650px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.pdf-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 700px) {
  .smaranika-viewer {
    width: calc(100% - 1rem);
  }

  .pdf-viewer {
    min-height: 72vh;
    height: 78vh;
    border-radius: 10px;
  }
}
