/* ─── Design tokens ───────────────────────────────────────────── */
:root {
  --bg:            #ddd0b9;
  --surface:       rgba(255, 252, 247, 0.96);
  --surface-strong:#fffdf9;
  --surface-deep:  #efe4d5;
  --surface-nested:#f7efe4;
  --ink:           #180d04;
  --text:          #3e3429;
  --heading:       #1e0d04;
  --muted:         #6e5f52;
  --accent:        #97582c;
  --accent-deep:   #6e3f1d;
  --accent-soft:   #eadbc8;
  --dark-card:     #1e0f06;
  --dark-card-2:   #2d1508;
  --line:          rgba(62, 40, 20, 0.12);
  --success:       #2c755f;
  --warning:       #ac6c1e;
  --shadow-sm:     0 4px 16px rgba(62, 40, 20, 0.07);
  --shadow:        0 14px 40px rgba(62, 40, 20, 0.10);
  --shadow-lg:     0 28px 64px rgba(62, 40, 20, 0.14);
  --radius:        0px;
  --max-width:     1680px;
}

/* ─── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 170, 120, 0.18) 0%, transparent 38%),
    radial-gradient(circle at 90% 5%, rgba(175, 140, 100, 0.12) 0%, transparent 30%),
    linear-gradient(180deg, rgba(228, 215, 196, 0.88) 0%, rgba(210, 195, 172, 0.90) 100%),
    url("https://images.pexels.com/photos/32225798/pexels-photo-32225798.jpeg?auto=compress&cs=tinysrgb&w=1920") center 35% / cover fixed no-repeat;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

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

.hidden { display: none !important; }

/* ─── Typography helpers ──────────────────────────────────────── */
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  color: var(--heading);
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ─── Layout ──────────────────────────────────────────────────── */
.site-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 20px 24px 48px;
}

/* ─── Topbar ──────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 10px 14px;
  margin-bottom: 18px;
  background: rgba(255, 252, 248, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 12px;
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #c47b40 100%);
  color: #fffdf9;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  font-weight: 700;
  flex-shrink: 0;
}

.brand span { display: grid; }

.brand strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.1;
}

.brand small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1;
}

/* search bar */
.topbar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 340px;
  padding: 5px 6px 5px 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
}

.topbar-search input {
  border: 0;
  background: transparent;
  padding: 5px 0;
  min-width: 0;
  box-shadow: none;
  color: var(--text);
}

.topbar-search input:focus { outline: none; }

.topbar-search button {
  width: 32px;
  height: 32px;
  border: 0;
  background: rgba(151, 88, 44, 0.09);
  color: var(--accent-deep);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.mode-badge { display: none !important; }

.nav a,
.nav button,
.app-nav button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 13px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 150ms, color 150ms;
}

.nav a:hover,
.nav button:hover,
.app-nav button:hover,
.app-nav button.is-active {
  background: rgba(151, 88, 44, 0.09);
  color: var(--accent-deep);
}

.nav-cta {
  background: rgba(255, 252, 248, 0.98) !important;
  color: var(--accent-deep) !important;
  border: 1px solid rgba(105, 72, 41, 0.16) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: rgba(151, 88, 44, 0.09) !important;
}

/* member menu */
.member-menu { position: relative; }

.member-menu-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
}

.nav-member-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(120, 82, 48, 0.14);
  flex-shrink: 0;
}

.nav-member-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: rgba(162, 93, 47, 0.14);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.member-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 20;
}

.member-menu-dropdown button {
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}

.nav.member-menu-open .member-menu-dropdown {
  display: grid;
  gap: 2px;
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0 10px;
  margin-left: auto;
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--accent-deep);
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.93rem;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.button:hover { transform: translateY(-1px); }

.button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #bf7b43 100%);
  color: #fffefb;
  box-shadow: 0 6px 18px rgba(151, 88, 44, 0.28);
}

.button.primary:hover {
  box-shadow: 0 10px 24px rgba(151, 88, 44, 0.34);
}

.button.ghost {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
}

.button.ghost:hover {
  background: var(--surface-deep);
}

.button.subtle {
  background: transparent;
  color: var(--accent-deep);
  padding: 0;
  font-weight: 600;
}

.button.subtle:hover {
  color: var(--accent);
  transform: none;
}

/* ─── Site mode toggle ────────────────────────────────────────── */
#site-main.app-mode > section:not(#app-shell) { display: none !important; }
#site-main.app-mode { padding-top: 0; }

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-copy {
  padding: 52px 48px 52px 44px;
  background:
    linear-gradient(125deg, rgba(255, 251, 244, 0.97) 0%, rgba(255, 247, 237, 0.94) 55%, rgba(255, 242, 226, 0.88) 100%),
    url("https://images.pexels.com/photos/23021413/pexels-photo-23021413.jpeg?cs=srgb&dl=pexels-chris-liu-753004655-23021413.jpg&fm=jpg")
      center/cover no-repeat;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.hero h1 {
  font-size: clamp(3.4rem, 5vw, 5.2rem);
  line-height: 0.94;
  margin: 10px 0 20px;
  max-width: 14ch;
}

.hero-text {
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 28px;
}

.hero-stats {
  display: flex;
  gap: 12px;
}

.hero-stats article {
  flex: 0 0 auto;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  min-width: 130px;
}

.hero-stats strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stats span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* right panel banners */
.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-banner-card { flex: 1; min-height: 0; }

.hero-banner-image {
  height: 100%;
  min-height: 480px;
  position: relative;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(18, 8, 2, 0.08) 0%, rgba(18, 8, 2, 0.62) 100%),
    url("https://images.pexels.com/photos/10954170/pexels-photo-10954170.jpeg?auto=compress&cs=tinysrgb&w=1400")
      center/cover no-repeat;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-banner-overlay {
  padding: 28px 30px;
  width: 100%;
  background: transparent;
}

.hero-banner-overlay .eyebrow { color: rgba(255, 220, 170, 0.85); }

.hero-banner-overlay h2 {
  color: #fff;
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  margin: 8px 0 16px;
  max-width: 22ch;
}

.hero-banner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-banner-pills span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  backdrop-filter: blur(4px);
}

/* ─── Overview grid ───────────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

/* dark editorial card */
.info-card {
  padding: 30px 28px;
  background:
    linear-gradient(148deg, rgba(30, 15, 6, 0.86) 0%, rgba(45, 21, 8, 0.91) 100%),
    url("https://images.pexels.com/photos/37010564/pexels-photo-37010564.jpeg?auto=compress&cs=tinysrgb&w=1200") center/cover no-repeat;
  border: 1px solid rgba(255, 200, 140, 0.08);
  box-shadow: var(--shadow);
}

.info-card .eyebrow { color: rgba(210, 150, 80, 0.85); }

.info-card h2 {
  color: #fffdf9;
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  margin: 10px 0 16px;
}

.info-card p {
  color: rgba(255, 248, 235, 0.68);
  font-size: 0.93rem;
  line-height: 1.7;
  margin: 0;
}

.feature-card {
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.feature-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-card h3 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--heading);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ─── Gita quote break ────────────────────────────────────────── */
.gita-break {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.gita-break-image {
  background:
    linear-gradient(180deg, rgba(18, 8, 2, 0.08) 0%, rgba(18, 8, 2, 0.28) 100%),
    url("https://images.pexels.com/photos/36929254/pexels-photo-36929254.jpeg?auto=compress&cs=tinysrgb&w=1200") center/cover no-repeat;
  min-height: 260px;
}

.gita-break-text {
  background: var(--dark-card);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.gita-break-text .eyebrow {
  color: rgba(210, 150, 80, 0.8);
}

.gita-sanskrit {
  font-family: "Noto Serif", "Noto Serif Devanagari", Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255, 248, 235, 0.95);
  line-height: 1.9;
  margin: 0;
  letter-spacing: 0.01em;
}

.gita-transliteration {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.85rem, 1.1vw, 0.98rem);
  font-style: italic;
  color: rgba(210, 150, 80, 0.75);
  line-height: 1.8;
  margin: 0;
  letter-spacing: 0.02em;
}

.gita-quote {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 600;
  color: #fffdf9;
  line-height: 1.35;
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--accent);
  position: relative;
}

.gita-quote-attr {
  color: rgba(255, 248, 235, 0.4);
  font-size: 0.87rem;
  margin: 0;
  font-style: italic;
}

/* ─── Process section ─────────────────────────────────────────── */
.process-section {
  padding: 12px 0 40px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 3vw, 3.4rem);
  margin-top: 6px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.process-grid article {
  padding: 28px 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.process-grid article:first-child {
  background: linear-gradient(148deg, var(--dark-card) 0%, var(--dark-card-2) 100%);
  border-color: rgba(255, 200, 140, 0.08);
}

.process-grid article:first-child span { background: rgba(210, 150, 80, 0.18); color: #d4975c; }
.process-grid article:first-child h3 { color: #fffdf9; }
.process-grid article:first-child p  { color: rgba(255, 248, 235, 0.65); }

.process-grid span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(151, 88, 44, 0.12);
  color: var(--accent-deep);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.process-grid h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.process-grid p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ─── Access form section ─────────────────────────────────────── */
.access-section { padding: 12px 0 52px; }

.access-success {
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.access-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #bf7b43 100%);
  color: #fff;
  font-size: 1.6rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.access-success h3 {
  font-size: 2rem;
  margin: 0;
  color: var(--heading);
}

.access-success p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 44ch;
}

.access-success-sub {
  color: var(--muted) !important;
  font-size: 0.93rem !important;
}

.access-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.access-form label,
.modal-card label,
.filter-group label,
.admin-form label,
.profile-form label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  font-size: 0.92rem;
}

.full-width { grid-column: 1 / -1; }

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(89, 59, 33, 0.15);
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 140ms;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(151, 88, 44, 0.4);
}

textarea { resize: vertical; }

.form-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
  grid-column: 1 / -1;
}

/* ─── Dashboard shell ─────────────────────────────────────────── */
.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 48px;
}

.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.sidebar h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.app-nav {
  display: grid;
  gap: 3px;
}

.app-nav button {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  font-size: 0.91rem;
  font-weight: 500;
}

.sidebar-card {
  padding: 16px;
  background: var(--surface-nested);
  font-size: 0.9rem;
}

.dashboard-content {
  min-height: 70vh;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.dashboard-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  margin-top: 6px;
}

.search-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-cluster input { min-width: min(100%, 280px); }

/* ─── Card grids ──────────────────────────────────────────────── */
.metrics-grid,
.library-grid,
.topics-grid,
.speakers-grid,
.resources-grid,
.community-grid,
.events-grid,
.admin-grid {
  display: grid;
  gap: 14px;
}

.metrics-grid  { grid-template-columns: repeat(5, 1fr); }
.library-grid,
.topics-grid,
.resources-grid,
.community-grid,
.admin-grid     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.speakers-grid,
.events-grid    { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* shared card base */
.metric-card,
.library-card,
.topic-card,
.speaker-card,
.resource-card,
.community-card,
.event-card,
.profile-card,
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.metric-card,
.library-card,
.topic-card,
.resource-card,
.community-card,
.event-card,
.profile-card,
.admin-card {
  padding: 22px;
}

.metric-card strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-card[data-dashboard-view] {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card[data-dashboard-view]:hover,
.metric-card[data-dashboard-view]:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(151, 88, 44, 0.18);
  outline: none;
}

.interactive-card {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.interactive-card:hover,
.interactive-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(151, 88, 44, 0.18);
  outline: none;
}

/* ─── Speaker cards ───────────────────────────────────────────── */
.speaker-card {
  padding: 0;
  overflow: hidden;
}

.speaker-portrait {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.speaker-card-body {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
}

.speaker-card-body .eyebrow { margin: 0; }

.speaker-card-body h3 {
  margin: 0;
  font-size: 1.9rem;
}

.speaker-card-meta {
  display: grid;
  gap: 4px;
}

.speaker-card-meta strong { font-size: 1rem; line-height: 1.2; }
.speaker-card-meta .muted { font-size: 0.93rem; line-height: 1.5; }

.speaker-card-body p:last-child {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.speaker-detail-portrait,
.member-detail-portrait {
  width: min(200px, 100%);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  justify-self: start;
}

.member-portrait-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(151, 88, 44, 0.14), rgba(200, 163, 120, 0.24));
  color: var(--accent-deep);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

/* ─── Filter / search bars ────────────────────────────────────── */
.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.section-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 18px;
}

.search-results-section + .search-results-section { margin-top: 6px; }

/* ─── Chips / tags ────────────────────────────────────────────── */
.card-tags,
.detail-badges,
.hero-actions,
.hero-stats,
.hero-banner-pills,
.hero-panel,
.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-tags span,
.detail-badges span,
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(151, 88, 44, 0.09);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 600;
}

/* ─── Status pills ────────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-approved { background: rgba(44, 117, 95, 0.11); color: var(--success); }
.status-pending  { background: rgba(172, 108, 30, 0.11); color: var(--warning); }
.status-admin    { background: rgba(110, 63, 29, 0.11); color: var(--accent-deep); }

/* ─── Card meta rows ──────────────────────────────────────────── */
.meeting-header,
.library-meta,
.resource-actions,
.community-meta,
.event-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.meeting-card-title,
.topic-card h3,
.speaker-card h3,
.resource-card h3,
.community-card h3,
.event-card h3,
.admin-card h3 {
  margin: 8px 0 6px;
  font-size: 1.4rem;
}

.media-card .resource-actions { justify-content: flex-start; }

/* ─── Modal ───────────────────────────────────────────────────── */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(24, 13, 4, 0.48);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(92vw, 500px);
  padding: 32px 28px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.detail-card {
  width: min(94vw, 1020px);
  padding: 28px;
}

.modal-card h2 {
  font-size: 2.2rem;
  margin: 10px 0 12px;
}

.modal-copy {
  color: var(--muted);
  font-size: 0.93rem;
  margin: 0 0 20px;
  line-height: 1.65;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(151, 88, 44, 0.25);
  background: rgba(151, 88, 44, 0.14);
  color: var(--accent-deep);
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: background 150ms;
}
.modal-close:hover {
  background: rgba(151, 88, 44, 0.28);
}
.modal-close:focus { outline: none; }
.modal-close:focus-visible {
  outline: 2px solid rgba(151, 88, 44, 0.45);
  outline-offset: 2px;
}

/* ─── Dashboard hero banner ───────────────────────────────────── */
.dashboard-hero-banner {
  min-height: 200px;
  background:
    linear-gradient(160deg, rgba(20, 10, 3, 0.42) 0%, rgba(20, 10, 3, 0.65) 100%),
    url("https://images.pexels.com/photos/32225798/pexels-photo-32225798.jpeg?auto=compress&cs=tinysrgb&w=1920") center 38% / cover no-repeat;
  border: 1px solid var(--line);
  display: grid;
  align-items: end;
  padding: 28px 30px;
  margin-bottom: 14px;
}

.dashboard-hero-overlay .eyebrow { color: rgba(210, 165, 85, 0.9); margin: 0 0 6px; }
.dashboard-hero-overlay h2 {
  font-family: "Cormorant Garamond", serif;
  color: #fffdf9;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin: 0 0 8px;
  line-height: 1.1;
}
.dashboard-hero-overlay p { color: rgba(255, 248, 235, 0.72); margin: 0; font-size: 0.9rem; }

/* ─── Dashboard feature tiles ─────────────────────────────────── */
.dashboard-feature-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  grid-template-rows: 260px 260px;
  gap: 14px;
  margin-bottom: 14px;
}

/* Archive spans both rows on left */
.dashboard-tile-archive { grid-row: 1 / 3; }
/* Recent session and community fill right two cells */
.dashboard-tile-recent  { grid-column: 2; grid-row: 1; }
.dashboard-tile-community { grid-column: 2; grid-row: 2; }
/* Speakers fills the far-right column, both rows */
.dashboard-tile-speakers { grid-column: 3; grid-row: 1 / 3; }

.dashboard-feature-tile {
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  display: grid;
  align-items: end;
  overflow: hidden;
  cursor: pointer;
  transition: filter 200ms ease, box-shadow 200ms ease;
  position: relative;
}

.dashboard-feature-tile:hover {
  filter: brightness(1.06);
  box-shadow: var(--shadow-lg);
}

.dashboard-tile-body {
  background: linear-gradient(0deg, rgba(12, 6, 2, 0.84) 0%, rgba(12, 6, 2, 0.18) 70%, transparent 100%);
  padding: 22px 24px 26px;
  color: #fffdf9;
}

.dashboard-tile-body .eyebrow {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 6px;
  font-size: 0.74rem;
}

.dashboard-tile-body h3 {
  font-family: "Cormorant Garamond", serif;
  color: #fffdf9;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.1;
  margin: 0 0 8px;
}

.dashboard-tile-body p {
  color: rgba(255, 248, 230, 0.68);
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.6;
  max-width: 36ch;
}

.dashboard-tile-cta {
  display: inline-block;
  color: rgba(210, 165, 80, 0.95);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(210, 165, 80, 0.35);
  padding-bottom: 2px;
}

/* ─── Community discussion thread ────────────────────────────── */
.discussion-expand-btn {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
}
.discussion-expand-btn:hover { background: var(--surface-nested); border-color: rgba(151, 88, 44, 0.25); }
.discussion-expand-btn:focus { outline: none; }

.discussion-thread {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.discussion-body {
  line-height: 1.75;
  margin: 0 0 14px;
  color: var(--text);
}

.discussion-replies { display: grid; gap: 10px; }

.discussion-reply {
  background: var(--surface-nested);
  border: 1px solid var(--line);
  padding: 12px 16px;
}
.discussion-reply strong { display: block; font-size: 0.88rem; margin-bottom: 4px; color: var(--accent-deep); }
.discussion-reply p { margin: 0; font-size: 0.92rem; line-height: 1.65; color: var(--text); }

.otp-stage,
.password-stage { margin-top: 14px; }

/* social auth buttons */
.social-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}

.social-btn:hover {
  background: var(--surface-deep);
}

/* or divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* auth method tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, color 150ms;
}

.auth-tab.is-active {
  background: var(--accent);
  color: #fffefb;
}

.auth-tab:not(.is-active):hover {
  background: var(--surface-deep);
  color: var(--text);
}

/* admin quick login */
.auth-admin-bar {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.auth-admin-btn {
  background: transparent;
  border: 1px dashed rgba(151, 88, 44, 0.3);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 150ms;
  width: 100%;
}

.auth-admin-btn:hover {
  background: rgba(151, 88, 44, 0.07);
}

/* discussion file attachment */
.discussion-attach-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attach-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.attach-btn {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 150ms;
}

.attach-btn:hover {
  background: var(--surface-deep);
}

.attach-name {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discussion-attachment {
  margin-top: 10px;
}

.discussion-attachment img {
  max-width: 100%;
  max-height: 260px;
  border: 1px solid var(--line);
  display: block;
}

.discussion-attachment a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface-nested);
  color: var(--accent-deep);
  font-size: 0.88rem;
  font-weight: 600;
}

.quick-entry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

/* ─── Meeting detail modal ────────────────────────────────────── */
.meeting-detail {
  display: grid;
  gap: 20px;
}

.detail-hero {
  padding: 26px 28px;
  background: linear-gradient(148deg, var(--surface-deep) 0%, var(--accent-soft) 100%);
  border: 1px solid rgba(151, 88, 44, 0.18);
}

.member-banner {
  padding: 22px;
  background: linear-gradient(148deg, var(--dark-card) 0%, var(--dark-card-2) 100%);
  border: 1px solid rgba(255, 200, 140, 0.08);
}

.detail-hero .eyebrow { color: var(--accent); }
.detail-hero h2 { color: var(--heading); font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 8px 0 10px; }

.detail-summary {
  max-width: 62ch;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
  font-size: 0.96rem;
}

.detail-badges { margin-top: 14px; }

.detail-badges span {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 248, 235, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-grid.single-column { grid-template-columns: 1fr; }

.detail-grid section {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.detail-grid section:last-child { grid-column: 1 / -1; }

.detail-grid h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* ─── Media player cards ──────────────────────────────────────── */
.media-stack,
.discussion-list,
.insight-block {
  display: grid;
  gap: 12px;
}

.media-card,
.discussion-item,
.insight-block article {
  border: 1px solid var(--line);
  background: var(--surface-nested);
  padding: 16px;
}

.media-card strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}

.media-card video,
.media-card audio {
  width: 100%;
  margin-top: 4px;
  display: block;
  /* prevent layout thrash when src is late-bound */
  min-height: 40px;
}

.media-card video { border: 1px solid var(--line); }

/* ─── Discussion ──────────────────────────────────────────────── */
.discussion-item {
  display: grid;
  gap: 6px;
}

.discussion-item .community-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.discussion-item p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
}

.discussion-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

/* ─── Member picker ───────────────────────────────────────────── */
.member-picker {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-choice {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-weight: 500 !important;
}

.member-choice input { width: auto; margin: 0; }

/* ─── Profile ─────────────────────────────────────────────────── */
.profile-card { padding: 22px; }

.profile-stack { display: grid; gap: 14px; }

.profile-social-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-socials span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--accent-deep);
  background: var(--surface-nested);
  font-size: 0.88rem;
}

/* ─── Admin ───────────────────────────────────────────────────── */
.admin-card { padding: 22px; }

.admin-form { display: grid; gap: 12px; }

.admin-notice {
  padding: 14px 16px;
  border: 1px solid;
  margin-bottom: 12px;
  font-size: 0.91rem;
}

.admin-notice-success {
  background: rgba(44, 117, 95, 0.10);
  border-color: rgba(44, 117, 95, 0.20);
  color: var(--success);
}

.admin-notice-error {
  background: rgba(172, 108, 30, 0.10);
  border-color: rgba(172, 108, 30, 0.20);
  color: var(--warning);
}

.admin-hint { padding: 14px; }

.admin-meeting-item { display: grid; gap: 12px; }

.admin-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Member banner ───────────────────────────────────────────── */
.member-banner {
  display: grid;
  gap: 12px;
}

.member-banner h2 { color: #fffdf9; font-size: 2rem; margin-top: 6px; }
.member-banner p  { color: rgba(255, 248, 235, 0.68); margin: 0; }

/* ─── Reflections ─────────────────────────────────────────────── */
.reflection-card h3 { margin: 6px 0 0; font-size: 1.3rem; }

/* ─── Empty state ─────────────────────────────────────────────── */
.empty-state {
  padding: 20px 22px;
  border: 1px dashed rgba(96, 63, 34, 0.2);
  color: var(--muted);
  background: rgba(255, 251, 246, 0.7);
  font-size: 0.91rem;
  line-height: 1.6;
}

/* ─── Muted utility ───────────────────────────────────────────── */
.muted { color: var(--muted); }

/* ─── Insight block ───────────────────────────────────────────── */
.insight-block article strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 8px;
}

.insight-block article p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ─── Resource actions ────────────────────────────────────────── */
.resource-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ─── Responsive: tablet ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-feature-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 240px 240px;
  }
  .dashboard-tile-archive { grid-row: 1; grid-column: 1 / -1; }
  .dashboard-tile-recent  { grid-column: 1; grid-row: 2; }
  .dashboard-tile-community { grid-column: 2; grid-row: 2; }
  .dashboard-tile-speakers { grid-column: 1 / -1; grid-row: 3; }

  .hero { grid-template-columns: 1fr; }

  .hero-copy { padding: 40px 36px; }

  .hero-banner-image { min-height: 340px; }

  .overview-grid { grid-template-columns: 1fr 1fr; }

  .info-card { grid-column: 1 / -1; }

  .gita-break { grid-template-columns: 1fr; }
  .gita-break-image { min-height: 240px; }

  .dashboard-shell { grid-template-columns: 1fr; }

  .sidebar { position: static; }

  .metrics-grid { grid-template-columns: repeat(3, 1fr); }

  .speakers-grid,
  .events-grid { grid-template-columns: repeat(2, 1fr); }

  .detail-grid { grid-template-columns: 1fr; }

  .filter-bar { grid-template-columns: 1fr 1fr; }

  .member-picker { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .site-shell { padding: 12px 12px 32px; }

  .topbar {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
    top: 8px;
  }

  .topbar-search {
    display: none;
    order: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .topbar.is-mobile-open .topbar-search { display: flex; }

  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
  }

  .nav.is-open {
    display: flex;
    gap: 4px;
  }

  .nav a,
  .nav button {
    width: 100%;
    text-align: left;
    padding: 11px 0;
  }

  .member-menu { width: 100%; }

  .member-menu-dropdown {
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .hero-copy { padding: 30px 22px; }

  .hero h1 { font-size: clamp(2.8rem, 12vw, 4rem); max-width: none; }

  .hero-text { max-width: none; }

  .hero-stats { flex-direction: column; gap: 8px; }

  .hero-stats article { min-width: 0; }

  .hero-banner-image { min-height: 280px; }

  .overview-grid { grid-template-columns: 1fr; }

  .info-card { grid-column: 1; }

  .gita-break-text { padding: 30px 26px; }

  .process-grid { grid-template-columns: 1fr; }

  .process-grid article:first-child { background: var(--surface); border-color: var(--line); }
  .process-grid article:first-child span { background: rgba(151, 88, 44, 0.12); color: var(--accent-deep); }
  .process-grid article:first-child h3 { color: var(--heading); }
  .process-grid article:first-child p  { color: var(--muted); }

  .access-form { grid-template-columns: 1fr; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }

  .library-grid,
  .topics-grid,
  .resources-grid,
  .community-grid,
  .admin-grid { grid-template-columns: 1fr; }

  .speakers-grid,
  .events-grid { grid-template-columns: 1fr; }

  .filter-bar { grid-template-columns: 1fr; }

  .profile-social-grid { grid-template-columns: 1fr; }

  .dashboard-header { flex-direction: column; align-items: flex-start; }

  .section-heading { flex-direction: column; align-items: flex-start; }

  .modal-card,
  .detail-card { width: min(96vw, 96vw); padding: 22px 18px; }

  .meeting-header,
  .library-meta,
  .resource-actions,
  .community-meta,
  .event-meta { flex-direction: column; gap: 6px; }
}

@media (max-width: 560px) {
  .site-shell { padding: 10px 10px 28px; }

  .brand strong { font-size: 1rem; }
  .brand small  { font-size: 0.68rem; }

  .hero-copy { padding: 24px 16px; }

  .hero h1 { font-size: clamp(2.4rem, 13vw, 3.2rem); }

  .dashboard-header h2,
  .section-heading h2 { font-size: clamp(1.7rem, 9vw, 2.4rem); }

  .metrics-grid { grid-template-columns: 1fr; }
}
