/* =========================================
   PRC-AOA Website Stylesheet
   Purvanchal Royal City – Apartment Owners' Association
   Palette: Royal Blue #1a3c6e | Gold #c9a84c | Light #f5f7fa
   ========================================= */

/* ---------- Variables ---------- */
:root {
  --blue:        #1a3c6e;
  --blue-dark:   #122d54;
  --blue-light:  #2a5ba0;
  --gold:        #c9a84c;
  --gold-light:  #e8c96a;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --gray-100:    #eef0f4;
  --gray-300:    #cdd2da;
  --gray-600:    #5a6373;
  --gray-900:    #1e2430;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(26,60,110,.12);
  --nav-height:  56px;
  --transition:  .2s ease;
  --font-en:     'Noto Sans', 'Segoe UI', sans-serif;
  --font-hi:     'Noto Sans Devanagari', 'Mangal', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-en);
  background: var(--off-white);
  color: var(--gray-900);
  line-height: 1.7;
  font-size: 16px;
}

/* Switch to Devanagari when lang=hi */
body.lang-hi {
  font-family: var(--font-hi);
}
body.lang-hi h1, body.lang-hi h2, body.lang-hi h3,
body.lang-hi h4, body.lang-hi h5, body.lang-hi h6 {
  font-family: var(--font-hi);
  letter-spacing: 0;
}
/* Devanagari has tall ascenders — let header expand instead of clipping */
body.lang-hi .header-inner {
  height: auto;
  min-height: var(--nav-height);
  padding-top: .45rem;
  padding-bottom: .45rem;
}
/* Devanagari matras extend above cap-height — overflow:hidden + tight line-height clips them */
body.lang-hi .title-main {
  overflow: visible;
  line-height: 1.55;
}
body.lang-hi .title-sub {
  overflow: visible;
  line-height: 1.45;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  background: var(--blue);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}
.logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.logo-svg {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.35));
}
.logo-area a { display: flex; align-items: center; }
.logo-area a:hover .logo-svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)) brightness(1.1); }
.site-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.title-main {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.title-sub {
  font-size: .75rem;
  color: var(--gray-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.lang-toggle {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: .3rem .8rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.lang-toggle:hover {
  background: var(--gold);
  color: var(--blue);
}
.auth-action {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
}
.auth-action:hover { background: var(--gold); color: var(--blue); }
.auth-action:disabled { cursor: not-allowed; opacity: .65; }
.auth-action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.auth-status {
  color: var(--gray-300);
  font-size: .72rem;
  max-width: 13rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .header-actions { gap: .35rem; }
  .auth-status { display: none; }
}
.nav-account-signout button {
  display: block;
  width: 100%;
  padding: .65rem .9rem;
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nav-account-signout button:hover { color: var(--gold); }
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 24, 43, .64);
}
.auth-dialog {
  width: min(100%, 430px);
  max-height: min(90vh, 680px);
  overflow: auto;
  background: var(--white);
  color: var(--gray-900);
  border-top: 4px solid var(--gold);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .28);
}
.auth-dialog-head,
.auth-dialog-body,
.auth-dialog-foot { padding: 1rem 1.25rem; }
.auth-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--gray-200); }
.auth-dialog-head h2 { margin: 0; color: var(--blue); font-size: 1.15rem; }
.auth-dialog-close { border: 0; background: transparent; color: var(--gray-700); font-size: 1.5rem; cursor: pointer; }
.auth-field { display: grid; gap: .35rem; margin-bottom: .9rem; color: var(--gray-700); font-size: .9rem; }
.auth-field input { width: 100%; min-height: 42px; padding: .55rem .65rem; border: 1px solid var(--gray-400); border-radius: 3px; color: var(--gray-900); font: inherit; }
.auth-message { min-height: 1.4em; margin: .5rem 0 0; color: var(--blue); font-size: .88rem; }
.auth-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; border-top: 1px solid var(--gray-200); }
.auth-dialog-foot button { min-height: 40px; padding: .5rem .85rem; border: 1px solid var(--blue); border-radius: 3px; background: var(--blue); color: var(--white); font: inherit; cursor: pointer; }
.auth-dialog-foot button.auth-secondary { background: transparent; color: var(--blue); }
.auth-dialog-foot button:disabled { opacity: .6; cursor: wait; }
.auth-account-detail { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .5rem 1rem; margin: 0; }
.auth-account-detail dt { color: var(--gray-600); }
.auth-account-detail dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.auth-section-title {
  margin: 1.25rem 0 .5rem;
  font-size: .92rem;
  color: var(--blue);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: .3rem;
}
.auth-verifications-list {
  display: grid;
  gap: .6rem;
  margin-top: .4rem;
}
.auth-verification-card {
  padding: .65rem .85rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--off-white);
  font-size: .85rem;
}
.auth-verification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.auth-verification-note {
  margin: .4rem 0 0;
  font-size: .8rem;
  color: var(--gray-700);
}
.auth-status-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.auth-status-pending, .auth-status-upload_pending, .auth-status-cleanup_pending {
  background: #fef3c7;
  color: #92400e;
}
.auth-status-approved {
  background: #d1fae5;
  color: #065f46;
}
.auth-status-needs_info {
  background: #ffedd5;
  color: #c2410c;
}
.auth-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}
.auth-empty-text {
  margin: .35rem 0;
  font-size: .85rem;
  color: var(--gray-600);
  font-style: italic;
}
.auth-moderator-tools {
  margin-top: 1rem;
}
.auth-mod-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}
.auth-mod-btn {
  padding: .45rem .8rem;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.auth-mod-btn:hover {
  background: var(--blue-light);
}
.auth-queue-list {
  display: grid;
  gap: 1rem;
  max-height: 60vh;
  overflow-y: auto;
  padding: .25rem 0;
}
.auth-queue-card {
  padding: .85rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--off-white);
  display: grid;
  gap: .65rem;
}
.auth-queue-meta {
  font-size: .88rem;
  color: var(--gray-800);
}
.auth-selfie-wrap {
  text-align: center;
}
.auth-selfie-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--gray-300);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.auth-selfie-link-text {
  display: block;
  font-size: .78rem;
  color: var(--blue);
  margin-top: .25rem;
}
.auth-queue-note {
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font: inherit;
  font-size: .85rem;
}
.auth-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.auth-action-btn {
  padding: .4rem .75rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.auth-action-btn:disabled {
  opacity: .5;
  cursor: wait;
}
.si-btn-approve {
  background: #065f46;
  color: #fff;
  border-color: #065f46;
}
.si-btn-needs-info {
  background: #c2410c;
  color: #fff;
  border-color: #c2410c;
}
.si-btn-reject {
  background: #991b1b;
  color: #fff;
  border-color: #991b1b;
}
.auth-moderator-form {
  margin-bottom: 1rem;
}
.auth-moderator-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .4rem;
}
.auth-moderator-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .65rem;
  background: var(--off-white);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: .85rem;
}
.auth-mod-del-btn {
  padding: .2rem .55rem;
  background: transparent;
  border: 1px solid #991b1b;
  color: #991b1b;
  border-radius: 3px;
  font-size: .75rem;
  cursor: pointer;
}
.si-verify-status-box {
  padding: .65rem .85rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--off-white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}
.si-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: .2rem .4rem;
  line-height: 1;
}

/* ---------- Navigation ---------- */
.site-nav {
  background: var(--blue-dark);
  border-bottom: 2px solid var(--gold);
}
.site-nav ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0;
}
.site-nav ul li a {
  display: block;
  padding: .65rem .9rem;
  color: var(--gray-300);
  font-size: .88rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.site-nav ul li a:hover,
.site-nav ul li a.active {
  color: var(--gold);
  background: rgba(201,168,76,.08);
  text-decoration: none;
}
.site-nav ul li a.active {
  border-bottom: 2px solid var(--gold);
  font-weight: 700;
}

/* ---------- Hero Banner (home page) ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: var(--white);
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: .75rem;
  line-height: 1.25;
}
.hero p {
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 1.5rem;
  color: var(--gray-300);
}
.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--blue);
  padding: .7rem 1.8rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--transition);
}
.hero-cta:hover {
  background: var(--gold-light);
  color: var(--blue);
  text-decoration: none;
}

/* ---------- Notice Ticker ---------- */
.notice-ticker {
  background: var(--gold);
  color: var(--blue);
  padding: .45rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
}
.notice-ticker .ticker-label {
  font-weight: 800;
  text-transform: uppercase;
  margin-right: .5rem;
}
.ticker-inner {
  display: inline-block;
  animation: ticker-scroll 30s linear infinite;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ---------- Main Content ---------- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.content-area {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.5rem;
  min-height: 400px;
}

/* ---------- Markdown Rendered Content ---------- */
.content-area h1 {
  font-size: 1.9rem;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold);
  line-height: 1.3;
}
.content-area h2 {
  font-size: 1.45rem;
  color: var(--blue);
  margin-top: 2rem;
  margin-bottom: .75rem;
  line-height: 1.35;
}
.content-area h3 {
  font-size: 1.15rem;
  color: var(--blue-light);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}
.content-area h4 {
  font-size: 1rem;
  color: var(--gray-900);
  margin-top: 1.25rem;
  margin-bottom: .4rem;
  font-weight: 700;
}
.content-area p {
  margin-bottom: 1rem;
  color: var(--gray-900);
}
.content-area ul, .content-area ol {
  margin: .75rem 0 1rem 1.5rem;
}
.content-area li {
  margin-bottom: .4rem;
}
.content-area strong { color: var(--blue); }
.content-area em { color: var(--gray-600); }
.content-area blockquote {
  border-left: 4px solid var(--gold);
  background: var(--gray-100);
  padding: .75rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gray-600);
  font-style: italic;
}
.content-area table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .92rem;
}
.content-area th {
  background: var(--blue);
  color: var(--white);
  padding: .6rem .9rem;
  text-align: left;
}
.content-area td {
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--gray-300);
}
.content-area tr:nth-child(even) td { background: var(--gray-100); }
.content-area hr {
  border: none;
  border-top: 2px solid var(--gray-300);
  margin: 2rem 0;
}
.content-area a { color: var(--blue-light); }
.content-area a:hover { color: var(--gold); }

/* CTA-style links (text ends with →) */
.content-area a.cta-link {
  display: inline-block;
  background: var(--blue-light);
  color: var(--white);
  padding: .25rem .85rem;
  border-radius: 20px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  margin: .1rem 0;
}
.content-area a.cta-link:hover {
  background: var(--gold);
  color: var(--blue);
  text-decoration: none;
}

/* Code / notice boxes in markdown */
.content-area code {
  background: var(--gray-100);
  padding: .1rem .4rem;
  border-radius: 3px;
  font-size: .88em;
  font-family: 'Courier New', monospace;
}
.content-area pre {
  background: var(--gray-900);
  color: #e8e8e8;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0;
}
.content-area pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Notice cards rendered from markdown sections */
.content-area .notice-card {
  border: 1px solid var(--gray-300);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--off-white);
}

/* ---------- Cards Grid (used in home, gallery) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: 0 4px 20px rgba(26,60,110,.14);
  transform: translateY(-2px);
}
.card-icon { font-size: 2rem; margin-bottom: .5rem; }
.card h3 { color: var(--blue); font-size: 1rem; margin-bottom: .4rem; }
.card p { font-size: .9rem; color: var(--gray-600); margin-bottom: 0; }

/* ---------- Amenity cards with labels ---------- */
.amenity-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-900);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-300);
  position: relative;
}
.amenity-card img {
  width: 100%;
  flex: 1;
  object-fit: cover;
  display: block;
  transition: transform .28s ease, opacity .2s ease;
}
.amenity-card:hover img {
  transform: scale(1.04);
  opacity: .88;
}
.amenity-card figcaption {
  background: rgba(26,60,110,.88);
  color: var(--gold-light);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  padding: .35rem .5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
/* Override the gallery-grid p rule — amenity-card is a figure, not p>img */
.content-area .amenities-grid figure { margin: 0; }

/* ---------- Gallery Grid ---------- */
/* Works both with .gallery-item divs and with markdown-generated <p><img> */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .9rem;
  margin: 1.5rem 0;
}
/* markdown: marked wraps each image in a <p> inside the div */
.content-area .gallery-grid p {
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4/3;
  border: 1px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
}
.content-area .gallery-grid p img,
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  transition: transform .25s ease, opacity .2s ease;
}
.content-area .gallery-grid p:hover img,
.gallery-grid img:hover {
  transform: scale(1.03);
  opacity: .92;
}
/* Lightbox cursor hint */
.content-area .gallery-grid p img { cursor: zoom-in; }

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: .85rem;
  text-align: center;
  padding: .5rem;
  border: 1px solid var(--gray-300);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Steps (register page) ---------- */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.steps-list li {
  counter-increment: step-counter;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}
.steps-list li::before {
  content: counter(step-counter);
  background: var(--blue);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ---------- Alert / Info Box ---------- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.alert-info    { background: #e7f0fb; border-left: 4px solid var(--blue-light); color: var(--blue); }
.alert-warn,
.alert-warning { background: #fef9e7; border-left: 4px solid var(--gold); color: #7a6000; }
.alert-important,
.alert-danger  { background: #fdecea; border-left: 4px solid #d32f2f; color: #7b1a1a; }
/* alert-danger: override flex so paragraphs & lists render naturally */
.alert-danger  { display: block; }
.alert-warning { display: block; }
.alert-icon { font-size: 1.25rem; flex-shrink: 0; }

/* ---------- Stat Cards (used in home hero section) ---------- */
.stat-card {
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}
.stat-label {
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
}
.stat-note {
  font-size: .78rem;
  color: rgba(255,255,255,.75);
  line-height: 1.4;
}

/* ---------- Loading / Error ---------- */
.loading, .error {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-600);
}
.loading::after { content: '…'; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots {
  0%, 100% { content: '.'; }
  33%       { content: '..'; }
  66%       { content: '...'; }
}
.error { color: #c62828; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-dark);
  color: var(--gray-300);
  text-align: center;
  padding: 1.75rem 1.25rem 1.25rem;
  font-size: .85rem;
  border-top: 3px solid var(--gold);
  margin-top: 2rem;
}
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: var(--white); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: .82rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--blue-light); }
.breadcrumb span { margin: 0 .35rem; }

/* ---------- Contact Form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  max-width: 560px;
  margin-top: 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--gray-900); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: .6rem .85rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  background: var(--white);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-light);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-primary {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: .7rem 1.8rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background var(--transition);
  font-family: inherit;
}
.btn-primary:hover { background: var(--blue-light); }

/* ---------- Document list ---------- */
.doc-list { list-style: none; padding: 0; margin: 1rem 0; }
.doc-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  margin-bottom: .6rem;
  background: var(--off-white);
  transition: background var(--transition);
}
.doc-list li:hover { background: var(--gray-100); }
.doc-icon { font-size: 1.4rem; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; color: var(--blue); font-size: .95rem; }
.doc-desc { font-size: .82rem; color: var(--gray-600); margin-top: .1rem; }
.doc-badge {
  font-size: .72rem;
  background: var(--gray-300);
  color: var(--gray-600);
  padding: .15rem .5rem;
  border-radius: 10px;
  white-space: nowrap;
}
.doc-badge.available { background: #d4edda; color: #155724; }
.doc-badge.coming-soon { background: #fff3cd; color: #856404; }

/* ---------- FAQ accordion ---------- */
.faq-item {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  margin-bottom: .6rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--off-white);
  border: none;
  text-align: left;
  padding: .9rem 1.1rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--gray-100); }
.faq-question::after { content: '+'; font-size: 1.3rem; flex-shrink: 0; }
.faq-question.open::after { content: '−'; }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  background: var(--white);
  border-top: 0px solid var(--gray-300);
  transition: grid-template-rows .32s ease, border-top-width .32s step-end;
}
.faq-answer.open {
  grid-template-rows: 1fr;
  border-top-width: 1px;
  transition: grid-template-rows .32s ease, border-top-width .32s step-start;
}
/* inner wrapper — required for grid 0fr clipping to work */
.faq-inner {
  overflow: hidden;
  padding: 0 1.1rem;
  font-size: .93rem;
  color: var(--gray-600);
  transition: padding .32s ease;
}
.faq-answer.open .faq-inner {
  padding: .9rem 1.1rem 1rem;
}

/* ---------- Active nav highlighting ---------- */
.site-nav a[data-page].active { color: var(--gold); }

/* ---------- Nav dropdown (Transparency group) ---------- */
.site-nav .nav-dropdown { position: relative; }
.site-nav .nav-dropdown-btn {
  background: transparent;
  border: none;
  color: var(--gray-300);
  font-size: .88rem;
  font-weight: 500;
  font-family: inherit;
  padding: .65rem .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.site-nav .nav-dropdown-btn:hover,
.site-nav .nav-dropdown.open .nav-dropdown-btn {
  color: var(--gold);
  background: rgba(201,168,76,.08);
}
.site-nav .nav-dropdown-btn::after {
  content: '▾';
  font-size: .7rem;
  transition: transform var(--transition);
}
.site-nav .nav-dropdown.open .nav-dropdown-btn::after { transform: rotate(180deg); }
.site-nav .nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--blue-dark);
  border: 1px solid rgba(201,168,76,.3);
  border-top: 2px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 110;
}
.site-nav .nav-dropdown.open .nav-dropdown-menu { display: block; }
.site-nav .nav-dropdown-menu li a {
  padding: .6rem .9rem;
  white-space: normal;
}
.site-nav .nav-dropdown-menu li a.active { border-bottom: none; border-left: 3px solid var(--gold); }

@media (max-width: 768px) {
  .site-nav .nav-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    background: rgba(0,0,0,.15);
  }
  .site-nav .nav-dropdown-btn {
    width: 100%;
    min-height: 44px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
}

/* ---------- Builder-source disclaimer ---------- */
.source-flag {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  background: #fef9e7;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  margin: .9rem 0;
  font-size: .82rem;
  color: #7a6000;
}
.source-flag .source-flag-icon { flex-shrink: 0; }

/* ---------- Status badges (disputes / action tracker) ---------- */
.status-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .2rem .6rem;
  border-radius: 10px;
  white-space: nowrap;
}
.status-open,
.status-pending      { background: #fff3cd; color: #856404; }
.status-investigating{ background: #ffe5d0; color: #a04a00; }
.status-resolved,
.status-done         { background: #d4edda; color: #155724; }
.status-filed        { background: #e2e3ff; color: #3730a3; }
.status-noreply,
.status-disputed     { background: #fdecea; color: #7b1a1a; }
.status-scheduled    { background: #e7f0fb; color: var(--blue); }

/* ---------- Log / Timeline entries (Action Tracker, Disputed Issues) ---------- */
.log-entry {
  border: 1px solid var(--gray-300);
  border-left: 4px solid var(--blue-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--white);
}
.log-entry.log-disputed  { border-left-color: #d32f2f; }
.log-entry.log-resolved  { border-left-color: #2e7d32; }
.log-entry .log-date {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .3rem;
}
.log-entry h3, .log-entry h4 { margin-top: 0; }
.log-entry .log-meta {
  font-size: .82rem;
  color: var(--gray-600);
  margin: .35rem 0;
}

/* ---------- AOA Formation Progress Tracker ---------- */
.progress-tracker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  margin: 1.75rem 0;
  counter-reset: track-step;
}
.progress-tracker .track-step {
  position: relative;
  text-align: center;
  padding: 0 .5rem 1rem;
  counter-increment: track-step;
}
.progress-tracker .track-step::before {
  content: counter(track-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 auto .5rem;
  border-radius: 50%;
  background: var(--gray-300);
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  position: relative;
  z-index: 2;
}
.progress-tracker .track-step::after {
  content: '';
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: var(--gray-300);
  z-index: 1;
}
.progress-tracker .track-step:first-child::after { display: none; }
.progress-tracker .track-step .track-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-600);
  line-height: 1.3;
}
.progress-tracker .track-step.track-done::before { background: var(--blue); }
.progress-tracker .track-step.track-done::after   { background: var(--blue); }
.progress-tracker .track-step.track-done .track-label { color: var(--blue); }
.progress-tracker .track-step.track-current::before {
  background: var(--gold);
  color: var(--blue-dark);
  box-shadow: 0 0 0 4px rgba(201,168,76,.3);
}
.progress-tracker .track-step.track-current::after { background: var(--blue); }
.progress-tracker .track-step.track-current .track-label { color: var(--gray-900); font-weight: 700; }
@media (max-width: 768px) {
  .progress-tracker {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .progress-tracker .track-step { text-align: left; padding: 0 0 0 3rem; min-height: 40px; }
  .progress-tracker .track-step::before { position: absolute; left: 0; top: 0; margin: 0; }
  .progress-tracker .track-step::after {
    top: 34px; left: 16px; width: 3px; height: calc(100% - 20px);
  }
}

/* ---------- Global mobile helpers ---------- */
/* Prevent long URLs / words from causing horizontal scroll */
body {
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* iOS safe-area insets for notched phones */
.site-header .header-inner {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}
.site-nav ul {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}
main {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}
.site-footer {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

/* Touch-friendly active states (hover has no effect on touch screens) */
.site-nav ul li a:active,
.lang-toggle:active,
.hero-cta:active,
.btn-primary:active,
.faq-question:active {
  opacity: .75;
}

/* Prevent iOS from zooming into inputs (requires font-size >= 16px) */
.form-group input,
.form-group textarea,
.form-group select {
  font-size: 16px;
}

/* Make tables horizontally scrollable on narrow screens */
.content-area table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; }
  .site-nav.open {
    display: block;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 99;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: .5rem 0;
  }
  .site-nav ul li a {
    /* Ensure 44px minimum touch target height */
    padding: .75rem 1.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .site-nav ul li a.active {
    border-bottom: 1px solid rgba(255,255,255,.06);
    border-left: 3px solid var(--gold);
    padding-left: calc(1.25rem - 3px);
  }
  .lang-toggle {
    min-height: 36px;
    min-width: 72px;
  }
  .content-area { padding: 1.25rem 1rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: .97rem; }
  .title-sub { font-size: .7rem; opacity: .9; }
  main { padding: 1rem .75rem 2rem; }

  /* Notice ticker: keep on one line, reduce font */
  .notice-ticker {
    font-size: .8rem;
    padding: .4rem 1rem;
  }

  /* Cards collapse to 1-col on tablet */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Gallery: 2-col on tablet */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Doc list: hide badge inline, show below name */
  .doc-list li {
    flex-wrap: wrap;
    gap: .5rem;
  }
  .doc-badge {
    flex-shrink: 0;
  }

  /* Contact form full width */
  .contact-form {
    max-width: 100%;
  }

  /* Steps list: tighter on tablet */
  .steps-list li {
    gap: .75rem;
  }

  /* Alert boxes: tighter */
  .alert {
    padding: .75rem 1rem;
  }

  /* Hero CTA full width on small tablets */
  .hero-cta {
    display: block;
    max-width: 280px;
    margin: 0 auto;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo-svg { width: 34px; height: 34px; }
  .title-main { font-size: .78rem; }
  .title-sub { font-size: .63rem; opacity: .9; }
  .content-area h1 { font-size: 1.4rem; }
  .content-area h2 { font-size: 1.15rem; }
  .content-area h3 { font-size: 1.05rem; }

  /* Hero: compact on phones */
  .hero { padding: 2rem .75rem 1.75rem; }
  .hero h1 { font-size: 1.3rem; }
  .hero p  { font-size: .9rem; }

  /* Gallery: single column on phones */
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item {
    aspect-ratio: 16/9;
  }

  /* Doc list: stack icon+info vertically on very small phones */
  .doc-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }
  .doc-icon { font-size: 1.6rem; }

  /* Steps: smaller number bubble */
  .steps-list li::before {
    width: 28px;
    height: 28px;
    font-size: .8rem;
    flex-shrink: 0;
  }

  /* Table text smaller on phone */
  .content-area td,
  .content-area th {
    padding: .45rem .65rem;
    font-size: .83rem;
  }

  /* Breadcrumb smaller */
  .breadcrumb { font-size: .78rem; }

  /* Footer wraps gracefully */
  .site-footer { font-size: .78rem; }

  /* Notice ticker: static on very small screens (animation can feel jarring) */
  .ticker-inner {
    animation: none;
    white-space: normal;
  }
  .notice-ticker {
    white-space: normal;
    font-size: .78rem;
  }

  /* Primary button full width */
  .btn-primary {
    width: 100%;
    text-align: center;
    align-self: stretch;
  }

  /* FAQ question padding */
  .faq-question {
    padding: .75rem .9rem;
    font-size: .88rem;
  }
  .faq-inner {
    padding: 0 .9rem;
    font-size: .88rem;
  }
  .faq-answer.open .faq-inner {
    padding: .75rem .9rem .9rem;
  }
}

/* ---------- Landscape phone ---------- */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { padding: 1.5rem 1.25rem 1.25rem; }
  .hero h1 { font-size: 1.3rem; }
  .site-nav.open {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- Content fade-in ---------- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content-area.content-loaded {
  animation: fadeSlideIn .35s ease forwards;
}

/* ---------- TOC Sidebar ---------- */
.content-area h2,
.content-area h3 {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

/* ── Desktop: slim sticky sidebar ── */
#toc-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}
#toc-wrapper > #content {
  flex: 1;
  min-width: 0;
}
#toc-nav {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 1.25rem);
  max-height: calc(100vh - var(--nav-height) - 2.5rem);
  overflow-y: auto;
  order: 2;
  font-size: .8rem;
  line-height: 1.5;
}
.toc-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-600);
  margin-bottom: .5rem;
  padding-left: .6rem;
  border-left: 2px solid var(--gold);
}
#toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#toc-nav ul li { margin-bottom: .1rem; }
#toc-nav ul li a {
  color: var(--gray-600);
  text-decoration: none;
  display: block;
  padding: .22rem .5rem .22rem .6rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color .15s, border-color .15s, background .15s;
  line-height: 1.35;
  font-size: .79rem;
}
#toc-nav ul li a:hover {
  color: var(--blue);
  border-left-color: rgba(26,60,110,.3);
  background: rgba(26,60,110,.04);
  text-decoration: none;
}
#toc-nav ul li a.toc-active {
  color: var(--blue);
  font-weight: 600;
  border-left-color: var(--blue);
  background: rgba(26,60,110,.06);
}

/* ── Mobile: floating pill + bottom drawer ── */
@media (max-width: 900px) {
  #toc-wrapper { display: block; }
  #toc-nav { display: none; } /* hidden — replaced by drawer */

  /* Floating pill button */
  #toc-pill {
    position: fixed;
    bottom: 1.25rem;
    right: 1rem;
    z-index: 600;
    display: flex;
    align-items: center;
    gap: .4rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .5rem .95rem .5rem .75rem;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(26,60,110,.35);
    transition: background .2s ease, transform .2s ease, padding .28s cubic-bezier(.22,.61,.36,1), gap .28s cubic-bezier(.22,.61,.36,1);
    white-space: nowrap;
    max-width: calc(100vw - 2rem);
  }
  #toc-pill:hover { background: #122a50; transform: translateY(-2px); }
  #toc-pill.toc-pill-open {
    padding: .55rem .7rem;
    min-width: 2.4rem;
    justify-content: center;
  }
  #toc-pill.toc-pill-open .toc-pill-label {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transform: translateX(-4px);
    pointer-events: none;
  }
  #toc-pill.toc-pill-peek {
    padding: .5rem .95rem .5rem .75rem;
    min-width: 0;
    justify-content: flex-start;
  }
  #toc-pill.toc-pill-peek .toc-pill-label {
    max-width: 160px;
    opacity: 1;
    margin-left: .08rem;
    transform: translateX(0);
    pointer-events: auto;
  }
  .toc-pill-icon {
    font-size: .9rem;
    flex-shrink: 0;
    display: inline-block;
    width: 1.1em;
    text-align: center;
  }
  .toc-pill-label {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transform: translateX(-4px);
    transition: max-width .28s cubic-bezier(.22,.61,.36,1), opacity .22s ease, margin-left .28s cubic-bezier(.22,.61,.36,1), transform .28s cubic-bezier(.22,.61,.36,1);
    pointer-events: none;
    will-change: max-width, opacity, transform;
  }
  .toc-pill-label--active { opacity: .88; font-style: italic; }
  @media (max-width: 420px) {
    #toc-pill {
      padding: .55rem .7rem;
      min-width: 2.4rem;
      justify-content: center;
    }
    #toc-pill .toc-pill-label {
      max-width: 0;
      opacity: 0;
      margin-left: 0;
      transform: translateX(-4px);
      pointer-events: none;
    }
    #toc-pill.toc-pill-peek {
      padding: .5rem .95rem .5rem .75rem;
      min-width: 0;
      justify-content: flex-start;
    }
    #toc-pill.toc-pill-peek .toc-pill-label {
      max-width: 130px;
      opacity: 1;
      margin-left: .08rem;
      transform: translateX(0);
      pointer-events: auto;
    }
  }

  /* Drawer overlay */
  #toc-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,.45);
    z-index: 601;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s;
  }
  #toc-drawer-overlay.toc-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Drag handle bar */
  #toc-drag-bar {
    width: 36px;
    height: 4px;
    background: #d1d8e4;
    border-radius: 999px;
    margin: 10px auto 0;
    flex-shrink: 0;
    cursor: grab;
  }

  /* Drawer panel */
  #toc-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 602;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 32px rgba(10,20,40,.18);
    padding: 0 1.25rem 2rem;
    max-height: 72vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.32,0,.24,1);
    will-change: transform;
  }
  #toc-drawer.toc-open { transform: translateY(0); }

  #toc-drawer-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 0 .55rem;
    border-bottom: 1px solid #eef0f4;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
  }
  #toc-drawer-handle .toc-title { border: none; padding: 0; margin: 0; font-size: .72rem; }
  #toc-drawer-close {
    background: #f0f2f7;
    border: none;
    font-size: .78rem;
    color: #555;
    cursor: pointer;
    padding: .25rem .6rem;
    border-radius: 999px;
    line-height: 1.5;
    font-weight: 700;
    transition: background .15s, color .15s;
  }
  #toc-drawer-close:hover { background: #e2e6ef; color: #1a2a3a; }

  /* Numbered list items */
  #toc-drawer ul {
    list-style: none;
    padding: .35rem 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .05rem;
  }
  #toc-drawer ul li a {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    padding: .65rem .4rem;
    color: #2d3748;
    text-decoration: none;
    font-size: .9rem;
    border-radius: 8px;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
  }
  #toc-drawer ul li a:hover,
  #toc-drawer ul li a.toc-active {
    background: rgba(26,60,110,.06);
    color: var(--blue);
    border-left-color: var(--blue);
  }
  #toc-drawer ul li a.toc-active { font-weight: 600; }
  .toc-item-num {
    font-size: .68rem;
    font-weight: 700;
    color: #a0aab8;
    min-width: 1.2em;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    line-height: 1.6;
  }
  #toc-drawer ul li a.toc-active .toc-item-num { color: var(--blue); }
  .toc-item-text { flex: 1; line-height: 1.35; }
}

/* ---------- Page Hero Banner ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 65%);
  border-radius: var(--radius);
  padding: 2.25rem 2rem 2rem;
  margin-bottom: 1.25rem;
  text-align: center;
  box-shadow: 0 3px 16px rgba(26,60,110,.22);
}
.page-hero-title {
  font-size: 1.85rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}
body.lang-hi .page-hero-title {
  font-family: var(--font-hi);
  letter-spacing: 0;
}
.page-hero-sub {
  margin: .35rem 0 0;
  color: var(--white);
  font-size: .92rem;
  opacity: .9;
}
@media (max-width: 768px) {
  .page-hero { padding: 1.5rem 1.25rem 1.25rem; margin-bottom: 1rem; }
  .page-hero-title { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .page-hero { padding: 1.25rem 1rem; }
  .page-hero-title { font-size: 1.15rem; }
}

/* ========================================
   SURVEY — Redesigned card-based UI
   ======================================== */

/* Bilingual show/hide */
body:not(.lang-hi) .s-hi { display: none; }
body.lang-hi .s-en { display: none; }

/* ── Wrapper & container ── */
.survey-wrapper { padding: 0 0 4rem; }
.survey-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Admin setup notice ── */
.survey-setup-notice {
  background: #fff3cd;
  border: 1.5px solid #ffc107;
  color: #664d03;
  border-radius: 10px;
  padding: .85rem 1.1rem;
  font-size: .85rem;
}

/* ── Form header card ── */
.survey-header-card {
  background: linear-gradient(135deg, var(--blue) 0%, #1e4d8c 100%);
  border-radius: 18px;
  padding: 2rem 2rem 1.5rem;
  color: #fff;
  box-shadow: 0 6px 28px rgba(26,60,110,.3);
  position: relative;
  overflow: hidden;
}
.survey-header-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(201,168,76,.12);
  border-radius: 50%;
}
.survey-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(201,168,76,.2);
  border: 1px solid rgba(201,168,76,.45);
  color: var(--gold-light);
  border-radius: 999px;
  padding: .28rem .85rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.survey-heading {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .4rem;
  line-height: 1.25;
}
.survey-intro {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
/* Progress bar */
.survey-progress {
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.survey-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.survey-progress-label {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  text-align: right;
}

/* ── Section labels ── */
.survey-section-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem;
  background: rgba(26,60,110,.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ssl-icon { font-size: 1rem; }

/* ── Form layout ── */
.survey-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.survey-field {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.survey-field--inline {
  flex-direction: row;
  gap: 1rem;
}
.survey-field--inline > .survey-field { flex: 1; }

/* Q12 must remain in a single row (Tower + Apartment) */
.survey-field--inline[data-qnum="12"] {
  flex-wrap: nowrap;
  align-items: flex-end;
}
.survey-field--inline[data-qnum="12"] > .survey-field {
  min-width: 0;
}

/* Error states */
.survey-field.survey-field-error > .survey-q { color: #c0392b; }
.survey-field.survey-field-error > .survey-cards {
  padding: .5rem;
  border-radius: 12px;
  outline: 2px solid #e74c3c;
  outline-offset: 2px;
}

/* ── Question label ── */
.survey-q {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-weight: 600;
  color: #1a2a3a;
  font-size: .95rem;
  line-height: 1.5;
}
.survey-qnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  margin-top: .1rem;
}
.survey-required { color: #e74c3c; font-weight: 700; margin-left: .15rem; }
.survey-optional { color: #888; font-weight: 400; font-size: .82rem; }
.survey-field-hint {
  font-size: .8rem;
  color: #666;
  margin: -.1rem 0 0 2.25rem;
}

/* ── Option cards ── */
.survey-cards {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.survey-cards--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
.survey-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
  position: relative;
  user-select: none;
}
.survey-card:hover {
  border-color: var(--blue);
  background: rgba(26,60,110,.03);
  box-shadow: 0 2px 10px rgba(26,60,110,.1);
  transform: translateY(-1px);
}
/* Selected state via :has() — supported all modern browsers */
.survey-card:has(input:checked),
.survey-card.is-checked {
  border-color: var(--blue);
  background: rgba(26,60,110,.07);
  box-shadow: 0 2px 14px rgba(26,60,110,.14);
}
/* "positive" option highlight colour */
.survey-card--highlight:has(input:checked),
.survey-card--highlight.is-checked {
  border-color: #1a8c3a;
  background: rgba(26,140,58,.07);
}
/* Hidden native radio */
.survey-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* Emoji icon */
.sc-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}
/* Option text */
.sc-text {
  flex: 1;
  font-size: .9rem;
  color: #2d3748;
  font-weight: 500;
  line-height: 1.35;
}
/* Checkmark indicator (right side) */
.sc-check {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #c8d0db;
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color .18s, background .18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.survey-card:has(input:checked) .sc-check,
.survey-card.is-checked .sc-check {
  border-color: var(--blue);
  background: var(--blue);
}
.survey-card--highlight:has(input:checked) .sc-check,
.survey-card--highlight.is-checked .sc-check {
  border-color: #1a8c3a;
  background: #1a8c3a;
}
.survey-card:has(input:checked) .sc-check::after,
.survey-card.is-checked .sc-check::after {
  content: '';
  display: block;
  width: .35rem;
  height: .6rem;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ── Text inputs & textarea ── */
.survey-input,
.survey-textarea {
  width: 100%;
  padding: .7rem .95rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: .92rem;
  color: #1a1a2e;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
  resize: vertical;
}
.survey-input:focus,
.survey-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,60,110,.1);
}
.survey-input.survey-input-error { border-color: #e74c3c; box-shadow: 0 0 0 3px rgba(231,76,60,.1); }

/* ── Submit area ── */
.survey-submit-area {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding-top: .5rem;
}
.survey-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, #b8942a 100%);
  color: #1a1a2e;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 18px rgba(201,168,76,.4);
  letter-spacing: .01em;
}
.survey-submit-btn svg { flex-shrink: 0; }
.survey-submit-btn:hover:not(:disabled) {
  opacity: .9;
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(201,168,76,.45);
}
.survey-submit-btn:active:not(:disabled) { transform: translateY(0); }
.survey-submit-btn:disabled { background: #bbb; color: #fff; cursor: not-allowed; box-shadow: none; }
.survey-privacy {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  font-size: .8rem;
  color: #777;
  margin: 0;
  line-height: 1.45;
}
.survey-privacy svg { flex-shrink: 0; margin-top: .1rem; }

/* ── Success state ── */
.survey-success {
  background: linear-gradient(135deg, #e8f8ed 0%, #d4edda 100%);
  border: 2px solid #28a745;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  display: none;
  box-shadow: 0 4px 20px rgba(40,167,69,.15);
}
.survey-success.show { display: block; }
.survey-success-icon { font-size: 3rem; margin-bottom: .75rem; }
.survey-success h3 { color: #155724; margin: 0 0 .6rem; font-size: 1.3rem; font-weight: 700; }
.survey-success p { color: #1e5c30; margin: 0 0 1.25rem; font-size: .93rem; }
.survey-btn-outline {
  display: inline-block;
  border: 2px solid #1a8c3a;
  color: #1a8c3a;
  border-radius: 999px;
  padding: .5rem 1.4rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.survey-btn-outline:hover { background: #1a8c3a; color: #fff; text-decoration: none; }

/* ── Error banner ── */
.survey-error {
  background: #fff0f0;
  border: 2px solid #e74c3c;
  color: #721c24;
  border-radius: 10px;
  padding: .85rem 1.1rem;
  font-size: .88rem;
  display: none;
}
.survey-error.show { display: block; }

/* ── Clarification panels ── */
.survey-clarify {
  position: relative;
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
  border: 1.5px solid #f0c040;
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.1rem 1.1rem 1.1rem 1rem;
  margin-top: .25rem;
  animation: clarify-in .25s ease;
}
@keyframes clarify-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.survey-clarify[hidden] { display: none; }
.survey-clarify-close {
  position: absolute;
  top: .6rem;
  right: .7rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  color: #999;
  padding: .1rem .35rem;
  border-radius: 4px;
  line-height: 1;
  transition: background .15s, color .15s;
}
.survey-clarify-close:hover { background: rgba(0,0,0,.07); color: #555; }
.survey-clarify-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: .1rem;
}
.survey-clarify-body {
  flex: 1;
  font-size: .88rem;
  color: #2d2d2d;
  line-height: 1.6;
  padding-right: 1.2rem;
}
.survey-clarify-body strong {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7a5c00;
  margin-bottom: .4rem;
}
.survey-clarify-body p {
  margin: 0;
}
.survey-clarify-body p + p {
  margin-top: .5rem;
}

/* ── GBM Register trigger button (inline, shown after Yes) ── */
.survey-gbm-register-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  margin-top: .75rem;
  padding: .85rem 1.1rem;
  background: linear-gradient(135deg, #1a8c3a 0%, #136b2c 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(26,140,58,.3);
  animation: clarify-in .25s ease;
}
.survey-gbm-register-btn:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,140,58,.38); }
.survey-gbm-register-btn .sc-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── GBM popup overlay + modal ── */
.gbm-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,.55);
  backdrop-filter: blur(2px);
  z-index: 900;
}
.gbm-popup-overlay[hidden] { display: none; }

#gbm-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 901;
  display: flex;
  flex-direction: column;
  max-width: 620px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(10,20,40,.35);
  overscroll-behavior: contain;
}
#gbm-popup[hidden] { display: none; }

.gbm-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background .15s;
}
.gbm-popup-close:hover { background: rgba(255,255,255,.35); }

.gbm-popup-header {
  background: linear-gradient(135deg, var(--blue) 0%, #1e4d8c 100%);
  padding: 1.75rem 2rem 1.5rem;
  color: #fff;
}
.gbm-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(201,168,76,.2);
  border: 1px solid rgba(201,168,76,.4);
  color: #f0d080;
  border-radius: 999px;
  padding: .22rem .8rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .65rem;
}
.gbm-popup-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 .4rem;
  color: #fff;
  line-height: 1.3;
  padding-right: 2.5rem; /* avoid overlap with close btn */
}
.gbm-popup-intro {
  font-size: .88rem;
  color: rgba(255,255,255,.78);
  margin: 0;
  line-height: 1.55;
}

.gbm-steps {
  list-style: none;
  padding: 1.5rem 2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.gbm-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.gbm-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 700;
  margin-top: .05rem;
}
.gbm-step-body {
  flex: 1;
  font-size: .9rem;
  line-height: 1.55;
  color: #2d3748;
}
.gbm-step-body strong {
  display: block;
  font-weight: 700;
  color: #1a2a3a;
  margin-bottom: .25rem;
}
.gbm-step-body p { margin: 0 0 .5rem; }

.gbm-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--gold);
  color: #1a1a2e;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: .4rem;
  transition: opacity .2s, transform .15s;
}
.gbm-download-btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }

.gbm-popup-note {
  background: #fff8e1;
  border-top: 1px solid #f0e0a0;
  padding: .9rem 2rem;
  font-size: .82rem;
  color: #7a5c00;
  line-height: 1.5;
}

.gbm-popup-back {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 2px solid #e2e8f0;
  color: var(--blue);
  border-radius: 8px;
  padding: .7rem 1.5rem;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  margin: 1.25rem 2rem 1.75rem;
  transition: border-color .15s, background .15s;
  align-self: flex-start;
}
.gbm-popup-back:hover { border-color: var(--blue); background: rgba(26,60,110,.04); }

@media (max-width: 600px) {
  #gbm-popup { margin: 1rem auto; border-radius: 16px; }
  .gbm-popup-header { padding: 1.25rem 1.25rem 1.1rem; }
  .gbm-steps { padding: 1.1rem 1.25rem; }
  .gbm-popup-note { padding: .75rem 1.25rem; }
  .gbm-popup-back { margin: 1rem 1.25rem 1.5rem; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .survey-header-card { padding: 1.5rem 1.25rem 1.25rem; border-radius: 14px; }
  .survey-heading { font-size: 1.25rem; }
  .survey-cards--2col { grid-template-columns: 1fr; }
  .survey-field--inline { flex-direction: column; }
  .survey-field--inline[data-qnum="12"] {
    flex-direction: row;
    gap: .65rem;
  }
  .survey-field--inline[data-qnum="12"] > .survey-field { flex: 1; }
  .survey-submit-btn { font-size: .95rem; padding: .9rem 1.5rem; }
}

/* ---------- Enhanced Footer ---------- */
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-notice {
  font-size: .82rem;
  color: var(--gold-light);
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.22);
  border-radius: var(--radius);
  padding: .45rem 1rem;
  margin-bottom: .9rem;
  text-align: center;
}
.footer-notice strong { color: var(--gold); }
.footer-nav { margin-bottom: .75rem; }
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.footer-nav ul li a {
  color: var(--gray-300);
  font-size: .8rem;
  padding: .2rem .5rem;
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
  display: inline-block;
}
.footer-nav ul li a:hover { color: var(--gold-light); text-decoration: none; }
.footer-nav ul li:not(:last-child)::after {
  content: '·';
  color: var(--gray-600);
}
.footer-text {
  font-size: .78rem;
  color: var(--gray-600);
  margin: 0;
  text-align: center;
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  z-index: 90;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(26, 60, 110, 0.72);
  color: var(--gold-light);
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px) scale(0.88);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1),
              background .2s ease, border-color .2s ease, color .2s ease;
  box-shadow: 0 4px 18px rgba(0,0,0,.22), 0 1px 4px rgba(0,0,0,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: inherit;
  line-height: 1;
}
#back-to-top.btt-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--gold);
  color: var(--blue);
  border-color: var(--gold);
  box-shadow: 0 6px 22px rgba(201,168,76,.35), 0 2px 6px rgba(0,0,0,.15);
  transform: translateY(-2px) scale(1.08);
}
#back-to-top:active {
  transform: translateY(0) scale(0.95);
}
@media (max-width: 480px) {
  #back-to-top { bottom: 1rem; right: 1rem; width: 38px; height: 38px; font-size: 1rem; }
}
/* On mobile where the TOC pill is visible, lift back-to-top above it */
@media (max-width: 900px) {
  #back-to-top { bottom: 4.75rem; right: 1rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-nav, .notice-ticker,
  .nav-toggle, .lang-toggle, .site-footer { display: none !important; }
  .content-area { box-shadow: none; padding: 0; }
  main { padding: 0; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: .8em; color: #555; }
  .content-area table { display: table; overflow: visible; }
}

/* ================================================================
   Society Information page (js/society-info.js)
   ================================================================ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Toolbar ---------- */
.si-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-height: 1.75rem;
  margin-bottom: .5rem;
}
.si-who { font-size: .8rem; color: var(--gray-600); margin-right: auto; }
.si-tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.si-count {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0 .3rem;
  margin-left: .3rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--blue-dark);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}
.si-draft-banner {
  padding: .6rem .9rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--gold);
  background: #fdf7e6;
  border-radius: 4px;
  font-size: .86rem;
}
.si-updated { font-size: .8rem; color: var(--gray-600); margin: 1.5rem 0 0; text-align: right; }
.si-disclaimer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-300);
  font-size: .78rem;
  color: var(--gray-600);
}

/* ---------- Buttons ---------- */
.si-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .95rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}
.si-btn:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--white); }
.si-btn-ghost { background: transparent; color: var(--blue); }
.si-btn-ghost:hover { background: var(--blue); color: var(--white); }
.si-btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.si-sec-btn {
  padding: .25rem .6rem;
  border: 1px dashed var(--gray-300);
  border-radius: 999px;
  background: transparent;
  color: var(--gray-600);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.si-sec-btn:hover { border-color: var(--blue); color: var(--blue); border-style: solid; }
.si-sec-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--gray-600);
  font: inherit;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}
.si-sec-icon:hover { border-color: var(--blue); color: var(--blue); background: var(--gray-100); }

.si-cta {
  margin-top: 1.75rem;
  padding: .9rem 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  text-align: center;
}
.si-cta .si-note { margin: .5rem 0 0; }

.si-picker { display: grid; gap: .5rem; }
.si-picker-item {
  padding: .65rem .9rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  font: inherit;
  font-size: .9rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.si-picker-item:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Sections ---------- */
.si-section {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--gray-300);
}
.si-section:first-child { border-top: 0; padding-top: 0; }
.si-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .9rem;
}
.si-sec-head h2 { margin: 0; font-size: 1.25rem; }
.si-sub { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.si-empty { color: var(--gray-600); font-style: italic; font-size: .88rem; }
.si-note { font-size: .82rem; color: var(--gray-600); margin: .6rem 0 0; }
.si-para { margin: .5rem 0 0; }

/* ---------- Society details (compact) ---------- */
.si-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .5rem;
}
.si-fact {
  padding: .5rem .7rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
}
.si-fact-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-600); }
.si-fact-value { display: block; font-weight: 600; font-size: .92rem; margin-top: .1rem; }
.si-facilities { margin: .6rem 0 0; padding-left: 1.1rem; }
.si-facilities li { margin: .3rem 0; }

.si-fold { margin-top: .9rem; border: 1px solid var(--gray-300); border-radius: 8px; padding: 0 .9rem; }
.si-fold > summary {
  padding: .6rem 0;
  margin: 0 -.9rem;
  padding-left: .9rem;
  padding-right: .9rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--blue);
  list-style-position: inside;
}
.si-fold[open] > summary { border-bottom: 1px solid var(--gray-300); margin-bottom: .6rem; }
.si-fold-count { color: var(--gray-600); font-weight: 400; }
.si-fold > *:last-child { margin-bottom: .8rem; }

.si-gallery { padding: 0; }
.si-gallery > summary { margin: 0; padding: .7rem .9rem; }
.si-gallery[open] > summary { margin-bottom: 0; }
.si-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
  padding: .9rem;
}
.si-gal-item { margin: 0; cursor: zoom-in; border-radius: 6px; overflow: hidden; background: var(--gray-100); }
.si-gal-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: var(--transition); }
.si-gal-item:hover img { transform: scale(1.04); }
.si-gal-item figcaption { padding: .4rem .5rem; font-size: .75rem; color: var(--gray-600); }

/* ---------- AOA status tracker ---------- */
.si-tracker .track-date { font-size: .72rem; color: var(--gray-600); margin-top: .15rem; }
@media (max-width: 768px) {
  /* Keep each stage on a single compact line on small screens */
  .progress-tracker.si-tracker { gap: .15rem; }
  .si-tracker .track-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 34px;
    padding: .2rem 0 .2rem 2.4rem;
  }
  .si-tracker .track-step::before { width: 26px; height: 26px; font-size: .78rem; top: 50%; transform: translateY(-50%); }
  .si-tracker .track-step::after { top: 50%; left: 12.5px; height: 100%; }
  .si-tracker .track-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .8rem;
  }
  .si-tracker .track-date { flex: 0 0 auto; margin-top: 0; white-space: nowrap; }
}

/* ---------- Resident actions ---------- */
.si-actions { margin: 0; padding-left: 1.25rem; }
.si-actions li { margin: .6rem 0; }
.si-action-title { display: block; font-weight: 600; }
.si-action-detail { display: block; font-size: .88rem; color: var(--gray-600); margin-top: .15rem; }

/* ---------- Follow-up tracker ---------- */
.si-table-wrap { overflow-x: auto; }
.si-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.si-table thead th {
  background: var(--blue);
  color: var(--white);
  text-align: left;
  padding: .55rem .6rem;
  font-size: .82rem;
}
.si-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.si-fu-row.si-row-open > td { background: var(--gray-100); }
.si-fu-toggle { width: 2.25rem; }
.si-fu-date { white-space: nowrap; }
.si-expand {
  width: 24px;
  height: 24px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
}
.si-expand:hover { background: var(--blue); color: var(--white); }
.si-fu-detail td { background: var(--gray-100); font-size: .88rem; }
.si-doc-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.si-doc-link {
  padding: .3rem .7rem;
  border: 1px solid var(--blue-light);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.si-doc-link:hover { background: var(--blue-light); color: var(--white); }

.si-badge {
  display: inline-block;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.si-badge-ok { background: #e4f3e6; color: #1f6b2c; margin-left: .5rem; }
.si-badge-muted { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-600); margin-left: .5rem; }
.si-badge-pending { background: #fdf0d5; color: #7a5a00; }
.si-badge-accepted { background: #e4f3e6; color: #1f6b2c; }
.si-badge-rejected { background: #f9e2e2; color: #8c2020; }

/* ---------- Cards ---------- */
.si-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.si-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
}
.si-card h3 { margin: 0 0 .5rem; font-size: 1rem; }
.si-card p { margin: .3rem 0; font-size: .88rem; }
.si-card-survey { border-left: 4px solid var(--gold); }

/* ---------- Verified documents ---------- */
.si-locked {
  padding: 1.1rem;
  border: 1px dashed var(--gray-300);
  border-radius: 8px;
  background: var(--gray-100);
  text-align: center;
}
.si-locked p { margin: 0 0 .75rem; font-size: .9rem; color: var(--gray-600); }
.si-doc-list { list-style: none; margin: 0; padding: 0; }
.si-doc-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .25rem;
  border-bottom: 1px solid var(--gray-100);
}
.si-doc-note { display: block; font-size: .8rem; color: var(--gray-600); margin-top: .2rem; }

/* ---------- Links ---------- */
.si-links { list-style: none; margin: 0; padding: 0; }
.si-links li { padding: .55rem .25rem; border-bottom: 1px solid var(--gray-100); }
.si-link-date { font-size: .78rem; color: var(--gray-600); margin-left: .5rem; }

/* ---------- Overlays / modals ---------- */
.si-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 18, 32, .72);
}
.si-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
}
.si-overlay-full .si-modal { max-width: 900px; height: 92vh; max-height: 92vh; }
.si-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--blue);
  color: var(--white);
}
.si-modal-head h3 { margin: 0; font-size: 1rem; color: var(--white); }
.si-modal-close {
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: .25rem .4rem;
}
.si-modal-body { flex: 1 1 auto; overflow: auto; padding: 1rem; }
.si-modal-foot { border-top: 1px solid var(--gray-300); padding: .75rem 1rem; background: var(--off-white); }
.si-modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.si-form-msg { font-size: .82rem; color: #8c2020; margin: .4rem 0 0; }

/* Document viewer */
.si-doc-viewer { height: 100%; display: flex; }
.si-doc-viewer iframe { flex: 1 1 auto; width: 100%; height: 100%; border: 0; }
.si-doc-viewer img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.si-overlay-full .si-modal-body { padding: 0; }
.si-overlay-full .si-modal-foot { padding: .6rem 1rem; }

/* ---------- Forms ---------- */
.si-form { display: block; }
.si-overlay-full .si-form { padding: 1rem; }
.si-field { display: block; margin-bottom: .85rem; }
.si-field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--gray-600); margin-bottom: .25rem; }
.si-field input,
.si-field select,
.si-field textarea {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font: inherit;
  font-size: .9rem;
  background: var(--white);
  color: var(--gray-900);
}
.si-field textarea { resize: vertical; }
.si-field input:focus,
.si-field select:focus,
.si-field textarea:focus { outline: 2px solid var(--blue-light); outline-offset: 1px; }
.si-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; }
.si-sep { border: 0; border-top: 1px solid var(--gray-300); margin: 1rem 0; }

.si-form-list { margin-bottom: 1rem; }
.si-form-list-label { font-size: .85rem; font-weight: 700; color: var(--blue); margin-bottom: .5rem; }
.si-form-row {
  position: relative;
  padding: .85rem 2.5rem .35rem .85rem;
  margin-bottom: .75rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--off-white);
}
.si-row-remove {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 26px;
  height: 26px;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  line-height: 1;
}
.si-row-remove:hover { border-color: #8c2020; color: #8c2020; }
.si-add-row { margin-top: .25rem; }
.si-import { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gray-300); }

/* ---------- Suggestion queue ---------- */
.si-suggestion { border: 1px solid var(--gray-300); border-radius: 8px; margin-bottom: .75rem; overflow: hidden; }
.si-suggestion-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem .85rem;
  border: 0;
  background: var(--gray-100);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.si-expand-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: .85rem;
  line-height: 22px;
  text-align: center;
}
.si-suggestion-title { flex: 1 1 auto; }
.si-suggestion-meta { padding: .4rem .85rem; font-size: .78rem; color: var(--gray-600); }
.si-suggestion-detail { padding: .5rem .85rem .85rem; }
.si-diff {
  max-height: 300px;
  overflow: auto;
  padding: .6rem;
  background: var(--gray-100);
  border-radius: 6px;
  font-size: .72rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Society priorities survey dialog ---------- */
.si-survey-modal .si-modal {
  width: 100%;
  max-width: 720px;
  height: 88vh;
  max-height: 760px;
  border: 1px solid var(--gray-300);
}
.si-survey-modal .si-modal-head,
.si-survey-modal .si-modal-foot { flex: 0 0 auto; }
.si-survey-modal .si-modal-body { padding: 0; background: var(--off-white); }
.si-survey-modal .si-modal-foot {
  padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--gray-300);
  box-shadow: 0 -3px 10px rgba(0, 0, 0, .06);
}
.si-survey-form { display: grid; gap: .9rem; padding: 1rem; }
.si-survey-intro,
.si-survey-privacy { margin: 0; font-size: .86rem; line-height: 1.5; }
.si-survey-intro {
  padding: .75rem .9rem;
  border: 1px solid var(--gray-300);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: var(--white);
}
.si-survey-group {
  min-width: 0;
  margin: 0;
  padding: .8rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
}
.si-survey-group legend { padding: 0 .25rem; font-size: .9rem; font-weight: 700; line-height: 1.45; }
.si-survey-choices { display: grid; gap: .45rem; }
.si-survey-choice {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-size: .86rem;
  line-height: 1.4;
}
.si-survey-choice:has(input:checked) { border-color: var(--blue); background: rgba(26, 60, 110, .06); }
.si-survey-choice input { flex: 0 0 auto; margin: .15rem 0 0; accent-color: var(--blue); }
.si-survey-text-field { display: grid; gap: .35rem; font-size: .86rem; font-weight: 600; }
.si-survey-text-field input,
.si-survey-text-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .65rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  color: var(--gray-900);
  font: inherit;
  font-weight: 400;
}
.si-survey-text-field textarea { min-height: 5rem; resize: vertical; }
.si-survey-text-field input:focus,
.si-survey-text-field textarea:focus { outline: 2px solid var(--blue-light); outline-offset: 1px; }
.si-survey-privacy { color: var(--gray-600); }
.si-survey-message { margin: 0; color: #8c2020; font-size: .86rem; }
.si-survey-form h4 { margin: .5rem 0 0; font-size: 1.1rem; }
.si-survey-form > p:last-child { margin: 0; }

@media (max-width: 768px) {
  .si-facts { grid-template-columns: 1fr 1fr; gap: .4rem; }
  .si-sec-head { align-items: flex-start; }
  .si-overlay { padding: 0; }
  .si-modal, .si-overlay-full .si-modal {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .si-modal-actions { justify-content: stretch; }
  .si-modal-actions > * { flex: 1 1 auto; justify-content: center; text-align: center; }
  .si-doc-list li { flex-direction: column; align-items: flex-start; }
  .si-survey-modal .si-modal {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border: 0;
  }
  .si-survey-form { gap: .75rem; padding: .75rem; }
  .si-survey-group { padding: .65rem; }
}

/* ================================================================
   Society Directory (societies/index.html)
   ================================================================ */

.sd-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.sd-search-input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
  background: var(--surface);
  color: var(--text);
}

.sd-authority-select {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
  background: var(--surface);
  color: var(--text);
}

.sd-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.sd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.sd-card-header {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  flex-wrap: wrap;
}

.sd-card-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  line-height: 1.3;
}

.sd-card-location,
.sd-card-stage,
.sd-card-meta {
  font-size: .85rem;
  color: var(--text-muted, #666);
  margin: 0;
}

.sd-card-link {
  align-self: flex-start;
  margin-top: .5rem;
  text-decoration: none;
}

.sd-no-results {
  text-align: center;
  color: var(--text-muted, #888);
  padding: 2rem 0;
}

/* ================================================================
   Society Entry items (#si-entries-section)
   ================================================================ */

#si-entries-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.si-entries-list {
  list-style: none;
  padding: 0;
  margin: .75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.si-entry-item {
  padding: .75rem 1rem;
  background: var(--bg, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.si-entry-item .si-entry-title {
  font-size: .95rem;
}

.si-entry-item .si-entry-details {
  font-size: .875rem;
  color: var(--text-muted, #555);
  margin: .2rem 0;
  white-space: pre-wrap;
}

.si-entry-item .si-entry-date {
  font-size: .78rem;
  color: var(--text-muted, #999);
}

.si-badge-update    { background: #d1f0d1; color: #1a6a1a; }
.si-badge-issue     { background: #fde8d0; color: #7a3800; }
.si-badge-document  { background: #dbe8fd; color: #1a3a7a; }
.si-badge-next_step { background: #ede8fd; color: #3a1a7a; }
.si-badge-general   { background: #f0f0f0; color: #444; }
