/**
 * Discover — minimalist local directory UI (mobile-first).
 * Loaded after portal-skin.css; overrides tokens and key surfaces.
 */
/* Token values: public/assets/css/tokens.css + DESIGN.md */
:root {
  --font-body: var(--ap-font-ui);
  --font-display: var(--ap-font-display);
  --brand-green: var(--ap-color-forest);
  --brand-green-dark: var(--ap-color-forest-dark);
  --ink: var(--ap-color-ink);
  --muted: var(--ap-color-muted);
  --bg-soft: var(--ap-color-bg);
  --surface: var(--ap-color-surface);
  --border-soft: var(--ap-color-border);
  --radius: var(--ap-radius-md);
  --radius-lg: var(--ap-radius-lg);
  --shadow-soft: var(--ap-shadow-sm);
  --shadow-soft-hover: var(--ap-shadow-md);
  --footer-bg: var(--ap-color-footer);
  --discover-max: var(--ap-container-max);
}

html {
  height: 100%;
}

body.theme-discover {
  background: var(--bg-soft);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.theme-discover #main-content {
  flex: 1 0 auto;
  width: 100%;
}

body.theme-discover h1,
body.theme-discover h2,
body.theme-discover h3,
body.theme-discover .brand-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Header */
body.theme-discover .site-header {
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: none;
}

@media (max-width: 991.98px) {
  body.theme-discover .site-header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 6px 20px rgba(255, 255, 255, 0.55),
      0 2px 10px rgba(11, 36, 44, 0.05);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;
  }

  body.theme-discover .site-header.site-header--scrolled {
    background: rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.35);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.75) inset,
      0 8px 24px rgba(255, 255, 255, 0.5),
      0 3px 12px rgba(11, 36, 44, 0.04);
  }
}

.header-search-mobile {
  display: none;
}

@media (max-width: 991.98px) {
  .header-search-mobile {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
    margin: 0 0.35rem 0 0.65rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(22, 48, 56, 0.12);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 1px 6px rgba(11, 36, 44, 0.06);
  }

  body.theme-discover .site-header.site-header--scrolled .header-search-mobile {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(22, 48, 56, 0.1);
  }

  .header-search-mobile i {
    color: var(--muted);
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .header-search-mobile input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    font: inherit;
    font-size: 0.92rem;
    color: var(--ink);
  }

  .header-search-mobile input:focus {
    outline: none;
  }

  .header-search-mobile input::placeholder {
    color: var(--muted);
  }
}

body.theme-discover .navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

body.theme-discover .navbar-brand .brand-text small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

body.theme-discover .navbar-nav .nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
}

body.theme-discover .navbar-nav .nav-link:hover,
body.theme-discover .navbar-nav .nav-link.active {
  color: var(--brand-green);
  background: rgba(26, 92, 69, 0.08);
}

@media (min-width: 992px) {
  body.theme-discover .navbar-nav .nav-dd:hover > .nav-link,
  body.theme-discover .navbar-nav .nav-dd:focus-within > .nav-link {
    color: var(--brand-green);
    background: rgba(26, 92, 69, 0.08);
  }

  body.theme-discover .navbar-nav .nav-dd > .dropdown-menu {
    display: none;
    margin-top: 0;
  }

  body.theme-discover .navbar-nav .nav-dd > .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
  }

  body.theme-discover .navbar-nav .nav-dd > .dropdown-menu.show {
    display: block;
  }
}

body.theme-discover .brand-logo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
}

body.theme-discover .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

body.theme-discover .nav-account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: min(220px, 42vw);
}

body.theme-discover .nav-account-toggle--icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  max-width: none;
}

body.theme-discover .nav-account-toggle--icon .fa-solid {
  font-weight: 900;
  font-size: 1.05rem;
}

body.theme-discover .nav-account-toggle--icon.dropdown-toggle::after {
  display: none;
}

body.theme-discover .nav-account-menu-head {
  font-weight: 700;
  white-space: normal;
}

body.theme-discover .nav-jobs .nav-link {
  font-weight: 600;
}

body.theme-discover .nav-account-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-discover .nav-account-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

body.theme-discover .nav-account-logout {
  margin: 0;
}

body.theme-discover .nav-account-logout .dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

body.theme-discover .profile-photo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

body.theme-discover .profile-photo-preview {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-soft);
}

body.theme-discover .profile-photo-preview--initial {
  display: grid;
  place-items: center;
  background: rgba(26, 92, 69, 0.1);
  color: var(--brand-green);
  font-size: 1.75rem;
  font-weight: 700;
}

body.theme-discover .nav-contribute .nav-link {
  color: var(--brand-green);
  font-weight: 600;
}

body.theme-discover .btn-primary {
  background: var(--brand-green);
  border-color: var(--brand-green);
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: none;
}

body.theme-discover .btn-primary:hover {
  background: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
}

body.theme-discover .btn-outline-primary {
  color: var(--brand-green);
  border-color: var(--border-soft);
  border-radius: var(--radius);
  font-weight: 600;
}

body.theme-discover .header-search-panel {
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

body.theme-discover .header-search-form {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

/* Discover layout */
.dc-page {
  padding-bottom: 2.5rem;
}

.dc-section {
  padding: 2rem 0;
}

.dc-section--tight {
  padding-top: 1.25rem;
}

.dc-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.dc-section-head h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.45rem);
  margin: 0;
}

.dc-section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52ch;
}

.dc-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-green);
  text-decoration: none;
  white-space: nowrap;
}

.dc-link:hover {
  color: var(--brand-green-dark);
  text-decoration: underline;
}

/* Hero */
.dc-hero {
  padding: 1.75rem 0 2rem;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.dc-hero-inner {
  max-width: var(--discover-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.dc-hero h1 {
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  line-height: 1.25;
  margin: 0 0 0.65rem;
  max-width: 18ch;
}

.dc-hero-lead {
  margin: 0 0 1.35rem;
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.02rem;
}

.dc-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 640px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.dc-search i {
  display: none;
}

.dc-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.85rem 1rem;
  font: inherit;
  background: transparent;
  color: var(--ink);
}

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

.dc-search button {
  border: 0;
  border-left: 1px solid var(--border-soft);
  background: var(--brand-green);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0 1.25rem;
  cursor: pointer;
  white-space: nowrap;
}

.dc-search button:hover {
  background: var(--brand-green-dark);
}

.dc-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
  align-items: center;
}

.dc-keywords-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.25rem;
}

.dc-keyword {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  text-decoration: none;
}

.dc-keyword:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
}

.dc-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid #f0c4c4;
  background: #fef6f6;
  font-size: 0.92rem;
}

.dc-alert a {
  font-weight: 600;
  color: #9b2c2c;
}

/* Hero with video / poster — discover layout on top of media */
.dc-hero.dc-hero--media {
  position: relative;
  overflow: hidden;
  border-bottom: 0;
  width: 100%;
  align-self: stretch;
}

.dc-hero.hero-has-video.dc-hero--media {
  min-height: min(72vh, 680px);
  padding: clamp(2rem, 6vh, 3.5rem) 0 clamp(2.5rem, 8vh, 4rem);
  background: #0b242c;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.dc-hero.hero-has-video.dc-hero--media .hv-video-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dc-hero.hero-has-video.dc-hero--media .dc-hero-inner {
  width: 100%;
  max-width: var(--discover-max);
  box-sizing: border-box;
}

.dc-hero.dc-hero--media .dc-hero-inner {
  position: relative;
  z-index: 4;
}

.dc-hero.hero-has-video.dc-hero--media h1,
.dc-hero.hero-has-video.dc-hero--media .dc-hero-lead {
  color: #f7fbf9;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  max-width: 22ch;
}

.dc-hero.hero-has-video.dc-hero--media .dc-hero-lead {
  color: rgba(247, 251, 249, 0.92);
  max-width: 44ch;
}

.dc-hero.hero-has-video.dc-hero--media .dc-alert {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f7fbf9;
}

.dc-hero.hero-has-video.dc-hero--media .dc-alert a {
  color: #fff;
  font-weight: 700;
}

.dc-hero.hero-has-video.dc-hero--media .dc-search {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  max-width: min(640px, 100%);
}

@media (min-width: 768px) {
  .dc-hero.hero-has-video.dc-hero--media .dc-search {
    backdrop-filter: blur(8px);
  }
}

.dc-hero.hero-has-video.dc-hero--media .dc-keyword {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f7fbf9;
}

.dc-hero.hero-has-video.dc-hero--media .dc-keyword:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.dc-hero.hero-has-video.dc-hero--media .dc-keywords-label {
  color: rgba(247, 251, 249, 0.85);
}

@media (max-width: 575.98px) {
  .dc-hero h1,
  .dc-hero.hero-has-video.dc-hero--media h1,
  .dc-hero.dc-hero--poster h1 {
    max-width: none;
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .dc-hero-lead,
  .dc-hero.hero-has-video.dc-hero--media .dc-hero-lead,
  .dc-hero.dc-hero--poster .dc-hero-lead {
    max-width: none;
  }

  .dc-search {
    max-width: none;
    width: 100%;
  }

  .dc-hero-inner {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .dc-hero.hero-has-video.dc-hero--media {
    min-height: min(82vh, 680px);
  }
}

.dc-hero.dc-hero--poster {
  min-height: min(68vh, 620px);
  padding: clamp(2rem, 6vh, 3.5rem) 0;
  background: #0b242c;
}

.dc-hero.dc-hero--poster .dc-hero-poster {
  position: absolute;
  inset: 0;
  background: var(--dc-hero-poster) center/cover no-repeat;
  z-index: 0;
}

.dc-hero.dc-hero--poster .dc-hero-poster-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 28, 34, 0.5), rgba(8, 28, 34, 0.35));
  pointer-events: none;
}

.dc-hero.dc-hero--poster h1,
.dc-hero.dc-hero--poster .dc-hero-lead {
  color: #f7fbf9;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.dc-hero.dc-hero--poster .dc-search {
  background: rgba(255, 255, 255, 0.94);
}

.dc-hero.dc-hero--anim.hero-village {
  min-height: clamp(520px, 78vh, 720px);
  padding: clamp(2rem, 6vh, 3rem) 0 clamp(6rem, 14vh, 9rem);
  border-bottom: 1px solid var(--border-soft);
}

.dc-hero.dc-hero--anim .dc-hero-inner {
  z-index: 3;
}

.dc-hero.dc-hero--anim h1,
.dc-hero.dc-hero--anim .dc-hero-lead {
  color: var(--ink-hero, #0a3d2b);
}

/* Categories */
.dc-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 540px) {
  .dc-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .dc-cat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.dc-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  min-height: 88px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dc-cat:hover {
  border-color: rgba(26, 92, 69, 0.35);
  box-shadow: var(--shadow-soft-hover);
}

.dc-cat i {
  font-size: 1.05rem;
  color: var(--brand-green);
  width: 1.35rem;
  text-align: center;
}

.dc-cat span {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
}

.dc-cat em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* Listing cards */
.listing-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .listing-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.listing-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.listing-card:hover {
  box-shadow: var(--shadow-soft-hover);
  border-color: rgba(26, 92, 69, 0.25);
}

.listing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.listing-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
}

.listing-card-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.listing-card-meta i {
  margin-right: 0.25rem;
  opacity: 0.75;
}

.listing-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.listing-card-actions .btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  min-height: 40px;
}

.listing-card-actions .btn-ghost {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.listing-card .badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Location bar */
.dc-loc {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.dc-loc-head {
  margin-bottom: 0.85rem;
}

.dc-loc-head strong {
  display: block;
  font-size: 0.95rem;
}

.dc-loc-head span {
  font-size: 0.88rem;
  color: var(--muted);
}

.dc-loc-row {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .dc-loc-row {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

.dc-loc-row select,
.dc-loc-row .btn {
  min-height: 44px;
  border-radius: var(--radius);
}

.dc-union-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

/* Contribute band */
.dc-contribute {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dc-contribute {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.dc-contribute-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dc-contribute-actions a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.92rem;
}

.dc-contribute-actions a:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
}

/* Stats */
.dc-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .dc-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dc-stat {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.dc-stat b {
  display: block;
  font-size: 1.35rem;
  color: var(--brand-green);
  font-weight: 700;
}

.dc-stat small {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* News / notices */
.dc-split {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .dc-split {
    grid-template-columns: 5fr 7fr;
  }
}

.dc-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.dc-feed-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border-soft);
}

.dc-feed-item:last-child {
  border-bottom: 0;
}

.dc-feed-item:hover {
  background: var(--bg-soft);
}

.dc-feed-item strong {
  font-weight: 600;
  font-size: 0.92rem;
}

.dc-feed-date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Emergency strip */
.dc-emergency {
  padding: 1.25rem;
  background: #fff8f6;
  border: 1px solid #f0ddd8;
  border-radius: var(--radius-lg);
}

.dc-emergency-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

@media (min-width: 540px) {
  .dc-emergency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dc-emergency a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

/* Footer — minimal teal aligned with brand primary */
body.theme-discover .site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--footer-bg);
  color: rgba(247, 246, 243, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

body.theme-discover .footer-h {
  color: #f7f6f3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.theme-discover .footer-about,
body.theme-discover .footer-links a,
body.theme-discover .footer-copy {
  color: rgba(247, 246, 243, 0.78);
}

body.theme-discover .footer-more {
  color: #c8e8dc;
}

body.theme-discover .footer-more:hover,
body.theme-discover .footer-links a:hover {
  color: #f7f6f3;
}

body.theme-discover .footer-rule {
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-discover .footer-credit a,
body.theme-discover .footer-legal a {
  color: rgba(247, 246, 243, 0.85);
}

body.theme-discover .footer-grid {
  gap: 1.5rem;
}

body.theme-discover .footer-links li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

body.theme-discover .footer-links li i {
  flex-shrink: 0;
  margin-top: 0.15rem;
  opacity: 0.88;
  color: rgba(247, 246, 243, 0.75);
}

body.theme-discover .footer-contact .footer-links a {
  word-break: break-word;
}

body.theme-discover .mobile-quickbar {
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1090;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 991.98px) {
  body.theme-discover {
    --ap-mobile-chrome: calc(3.35rem + env(safe-area-inset-bottom, 0px));
    padding-bottom: var(--ap-mobile-chrome);
  }

  body.theme-discover .site-header .navbar .container {
    flex-wrap: nowrap;
  }

  body.theme-discover .site-header .navbar-brand {
    margin-right: auto;
  }

  body.theme-discover .site-header .header-search-toggle {
    margin-left: 0.35rem;
    flex-shrink: 0;
  }

  body.theme-discover .site-footer {
    padding-bottom: calc(1.25rem + var(--ap-mobile-chrome));
  }

  .ap-support {
    bottom: calc(7.15rem + env(safe-area-inset-bottom, 0px));
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    z-index: 1040;
  }

  .ap-info-float-caption {
    display: none;
  }

  .ap-info-float-btn,
  .ap-support-launch {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.05rem;
  }

  .ap-float-stack {
    gap: 0.4rem;
  }

  .ap-support-panel {
    max-height: min(58vh, 520px);
  }

  .ap-support-teaser {
    max-width: min(280px, calc(100vw - 4.5rem));
  }

  body.theme-discover .ap-notify-banner {
    bottom: calc(7.35rem + env(safe-area-inset-bottom, 0px));
  }

  body.theme-discover.mobile-dir-open .ap-support,
  body.theme-discover.mobile-more-open .ap-support {
    z-index: 1030;
  }
}

body.theme-discover .mobile-quickbar .mobile-quickbar-item {
  flex: 1;
  touch-action: manipulation;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.68rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, transform 0.1s ease;
  position: relative;
  z-index: 1;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 2.75rem;
  padding: 0.15rem 0.25rem;
  pointer-events: none;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-hit i,
body.theme-discover .mobile-quickbar .mobile-quickbar-item > i {
  pointer-events: none;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-label,
body.theme-discover .mobile-quickbar .mobile-quickbar-item > span:not(.mobile-quickbar-hit) {
  pointer-events: none;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-item i {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 2px;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-item.active,
body.theme-discover .mobile-quickbar .mobile-quickbar-item.is-active {
  color: var(--brand-green);
  font-weight: 600;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-item.quickbar-emergency {
  color: var(--danger);
  font-weight: 700;
}

body.theme-discover .mobile-quickbar .mobile-quickbar-item:active {
  transform: scale(0.94);
}

body.theme-discover.mobile-dir-open {
  overflow: hidden;
}

body.theme-discover.mobile-more-open {
  overflow: hidden;
}

.mobile-dir-sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mobile-dir-sheet[hidden] {
  display: none !important;
}

.mobile-dir-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 36, 44, 0.45);
  cursor: pointer;
}

.mobile-dir-panel {
  position: relative;
  z-index: 1;
  max-height: min(78vh, 520px);
  margin-bottom: calc(3.1rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 32px rgba(11, 36, 44, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-dir-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.mobile-dir-title {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display, "Baloo Da 2", sans-serif);
}

.mobile-dir-close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.mobile-dir-body {
  overflow: auto;
  padding: 0.35rem 0 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-dir-section {
  border-bottom: 1px solid var(--border-soft);
}

.mobile-dir-section:last-of-type {
  border-bottom: 0;
}

.mobile-dir-section-head {
  list-style: none;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: none;
  cursor: pointer;
}

.mobile-dir-section-head::-webkit-details-marker {
  display: none;
}

.mobile-dir-section-head::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  float: right;
  font-size: 0.75rem;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.mobile-dir-section:not([open]) .mobile-dir-section-head::after {
  transform: rotate(-90deg);
}

.mobile-dir-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.5rem 0.65rem;
}

.mobile-dir-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.mobile-dir-link:active {
  background: var(--bg-soft);
}

.mobile-dir-link .npi-txt {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.mobile-dir-link .npi-txt b {
  font-size: 0.92rem;
}

.mobile-dir-link .npi-txt small {
  font-size: 0.78rem;
  color: var(--muted);
}

.mobile-dir-foot {
  margin: 0.5rem 1rem 0;
  padding: 0.75rem 0;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px dashed var(--border-soft);
}

.mobile-dir-foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  color: var(--brand-green-dark);
  font-weight: 600;
}

@media (max-width: 575.98px) {
  body.theme-discover .container.section {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }
}

/* Inner pages */
body.theme-discover .page-head h1 {
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

body.theme-discover .cards {
  gap: 0.75rem;
}

body.theme-discover .cards > .card,
body.theme-discover a.card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

body.theme-discover a.card:hover {
  transform: none;
  box-shadow: var(--shadow-soft-hover);
}

body.theme-discover .toolbar input,
body.theme-discover .toolbar select {
  border-radius: var(--radius);
}

body.theme-discover .chip {
  border-radius: 999px;
}

body.theme-discover .container {
  max-width: var(--discover-max);
}

body.theme-discover .edu-card,
body.theme-discover .edu-home-card {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

body.theme-discover .edu-card:hover {
  box-shadow: var(--shadow-soft-hover);
}

.dc-detail-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.25rem;
}

.dc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

/* Forms — consistent inset & submit button sizing (site-wide) */
body.theme-discover .page > .card,
body.theme-discover .page > details.card,
body.theme-discover form.card,
body.theme-discover .card.entry {
  padding: 1.125rem 1.25rem;
}

body.theme-discover .cards > .card,
body.theme-discover .cards > article.card {
  padding: 1rem 1.125rem;
}

body.theme-discover .form-grid > button,
body.theme-discover .form-grid > .btn {
  width: auto !important;
  max-width: 100%;
  justify-self: center !important;
  align-self: start;
  display: inline-flex !important;
  flex: 0 0 auto !important;
}

body.theme-discover .form-grid > button[type="submit"],
body.theme-discover .form-grid > .btn[type="submit"],
body.theme-discover .form-grid > .form-submit {
  grid-column: 1 / -1;
}

body.theme-discover .table-wrap .form-grid > button,
body.theme-discover .table-wrap .form-grid > .btn {
  justify-self: start !important;
}

body.theme-discover .toolbar {
  align-items: flex-end;
}

body.theme-discover .toolbar .btn,
body.theme-discover .toolbar button[type="submit"] {
  width: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-self: flex-end;
  min-height: 44px;
}

body.theme-discover .page-head .btn {
  width: auto !important;
  display: inline-flex !important;
}

body.theme-discover .form-grid {
  margin-bottom: 0;
  align-items: start;
}

body.theme-discover .page > .card .form-grid:last-child {
  margin-bottom: 0;
}

/* Contribute — inline checkbox + conditional fields */
body.theme-discover .field-check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  grid-template-columns: unset;
}

body.theme-discover .field-check input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--brand-green);
}

body.theme-discover .field-check > span {
  font-weight: 600;
  line-height: 1.4;
}

body.theme-discover .contrib-field[hidden] {
  display: none !important;
}

body.theme-discover.modal-open {
  overflow: hidden;
}

.blood-safety-back {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(22, 48, 56, 0.52);
  backdrop-filter: blur(2px);
}

.blood-safety-back[hidden] {
  display: none !important;
}

.blood-safety-modal {
  width: min(520px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 1.35rem 1.35rem 1.25rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft-hover);
}

.blood-safety-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.blood-safety-head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--brand-green-dark);
}

.blood-safety-heart {
  flex-shrink: 0;
}

.blood-safety-list {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
  color: var(--ink);
}

.blood-safety-list li {
  margin-bottom: 0.65rem;
}

.blood-safety-list li:last-child {
  margin-bottom: 0;
}

.blood-safety-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blood-safety-actions .btn-primary {
  text-align: center;
  white-space: normal;
  line-height: 1.45;
}

.job-apply-back {
  z-index: 1060;
}

.job-apply-modal {
  width: min(560px, 100%);
  max-height: min(92vh, 720px);
}

.job-apply-modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  color: var(--brand-green-dark);
}

.job-apply-job-name {
  margin: 0 0 1rem;
  font-weight: 600;
}

.job-apply-form {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.job-apply-form .field {
  grid-column: 1 / -1;
}

.job-apply-form .field span:first-child {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.job-apply-form input[type="text"],
.job-apply-form input[type="email"],
.job-apply-form input[type="tel"],
.job-apply-form textarea {
  width: 100%;
}

.job-apply-cv input[type="file"] {
  width: 100%;
  max-width: 100%;
  margin-top: 0.25rem;
}

.job-apply-cv .fine {
  display: block;
  margin-top: 0.35rem;
}

.job-apply-form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.job-apply-form-actions .btn-primary {
  width: 100%;
  text-align: center;
}

@media (min-width: 480px) {
  .job-apply-form-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .job-apply-form-actions .btn-primary {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blood-safety-heart,
  .blood-safety-heart::after {
    animation: none !important;
  }
}

/* Facebook-style activity feed */
.feed-page {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.fb-feed-page-head .lead {
  max-width: 42rem;
}

.fb-feed-compose {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.fb-compose-label {
  margin: 0 0 0.65rem;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

.fb-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fb-compose-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.fb-compose-actions a:hover {
  border-color: rgba(12, 107, 116, 0.35);
  background: #e8f4f6;
  color: var(--brand-green-dark);
}

.fb-compose-actions a i {
  color: var(--brand-green);
}

.fb-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fb-post {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.12s;
}

.fb-post:hover {
  box-shadow: var(--shadow-soft-hover);
}

.fb-post-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.fb-post-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.35rem;
}

.fb-post-avatar {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.05rem;
  background: var(--fb-accent-bg, #e8f4f6);
  color: var(--fb-accent, var(--brand-green));
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(11, 36, 44, 0.08);
}

.fb-post-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fb-post-actor {
  font-size: 0.95rem;
  line-height: 1.25;
}

.fb-post-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.fb-post-kind {
  font-weight: 700;
  color: var(--fb-accent, var(--brand-green));
}

.fb-post-body {
  padding: 0.35rem 1rem 0.65rem;
}

.fb-post-title {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.4;
  font-family: var(--font-display, "Baloo Da 2", sans-serif);
}

.fb-post-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.fb-post-media {
  margin-top: 0.65rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.fb-post-media img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.fb-post-foot {
  padding: 0.55rem 1rem 0.85rem;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, transparent, rgba(238, 244, 246, 0.65));
}

.fb-post-cta {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-green-dark);
}

.fb-post-cta i {
  font-size: 0.75rem;
  margin-left: 0.2rem;
}

.fb-tone-news { --fb-accent: #1a5f8a; --fb-accent-bg: #e5f0f8; }
.fb-tone-notice { --fb-accent: #5a6270; --fb-accent-bg: #eef0f3; }
.fb-tone-event { --fb-accent: #6b4262; --fb-accent-bg: #f0e6ee; }
.fb-tone-blood { --fb-accent: #c4513a; --fb-accent-bg: #fdecea; }
.fb-tone-help { --fb-accent: #0c6b74; --fb-accent-bg: #e6f1eb; }
.fb-tone-lost { --fb-accent: #9a6b12; --fb-accent-bg: #f6eedb; }
.fb-tone-job { --fb-accent: #084850; --fb-accent-bg: #dff0f2; }
.fb-tone-complaint { --fb-accent: #b33; --fb-accent-bg: #fdecea; }
.fb-tone-demand { --fb-accent: #d4892a; --fb-accent-bg: #fff6e8; }
.fb-tone-donation { --fb-accent: #0c6b74; --fb-accent-bg: #e6f1eb; }
.fb-tone-offer { --fb-accent: #7a4d0b; --fb-accent-bg: #f7e7c8; }
.fb-tone-contrib { --fb-accent: #14848e; --fb-accent-bg: #e5f4f6; }

.fb-feed--compact .fb-post-foot {
  padding-top: 0.35rem;
  border-top: 0;
  background: transparent;
}

.fb-feed--compact .fb-post {
  box-shadow: none;
  border-radius: var(--radius);
}

.fb-feed--compact .fb-post-title {
  font-size: 0.98rem;
}

[id^="help-"],
[id^="lost-"],
[id^="demand-"],
[id^="complaint-"],
[id^="donation-"],
[id^="offer-"],
[id^="blood-req-"],
[id^="job-"] {
  scroll-margin-top: 5.5rem;
}

/* Floating support chat (bottom-right) */
.ap-support {
  position: fixed;
  z-index: 1070;
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  pointer-events: none;
}

.ap-support > * {
  pointer-events: auto;
}

.ap-support-teaser {
  position: relative;
  max-width: min(320px, calc(100vw - 5.5rem));
  padding: 0.85rem 2.25rem 0.85rem 0.85rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(11, 36, 44, 0.18);
  border: 1px solid var(--border-soft);
  animation: apSupportTeaserIn 0.45s ease-out;
}

.ap-support-teaser.is-hidden {
  display: none;
}

@keyframes apSupportTeaserIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ap-support-teaser-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.65rem;
  height: 1.65rem;
  border: 0;
  border-radius: 50%;
  background: #2a3a40;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.ap-support-teaser-inner {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.ap-support-teaser-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ap-support-teaser p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink);
}

.ap-support-panel {
  width: min(380px, calc(100vw - 1.5rem));
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: #f4f7f6;
  box-shadow: 0 16px 48px rgba(11, 36, 44, 0.22);
  border: 1px solid rgba(12, 107, 116, 0.15);
}

.ap-support-panel[hidden] {
  display: none !important;
}

.ap-support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.85rem 0.75rem;
  background: var(--ap-color-forest, var(--brand-green));
  color: #f7fbf9;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.ap-support-head-brand {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-width: 0;
}

.ap-support-head-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px;
}

.ap-support-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-family: var(--font-display, "Baloo Da 2", sans-serif);
}

.ap-support-status {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ap-support-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ee787;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.ap-support-head-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.ap-support-body {
  overflow: auto;
  padding: 0.75rem 0.85rem 0.5rem;
  flex: 1;
  min-height: 0;
}

.ap-support-welcome {
  background: #fff;
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--border-soft);
}

.ap-support-welcome strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.ap-support-welcome p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.ap-support-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.ap-support-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid #0c6b74;
  background: #fff;
  color: #084850;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}

.ap-support-chip:hover {
  background: #e6f1eb;
}

.ap-support-form {
  display: grid;
  gap: 0.45rem;
}

.ap-support-field span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.ap-support-field input {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
}

.ap-support-foot {
  padding: 0.55rem 0.65rem 0.65rem;
  background: #fff;
  border-top: 1px solid var(--border-soft);
}

.ap-support-compose {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  background: #f0f4f3;
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  border: 1px solid var(--border-soft);
}

.ap-support-compose textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  resize: none;
  font: inherit;
  font-size: 0.88rem;
  max-height: 5rem;
  padding: 0.35rem 0;
  line-height: 1.4;
}

.ap-support-compose textarea:focus {
  outline: none;
}

.ap-support-mic,
.ap-support-send {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
}

.ap-support-mic {
  background: #5a7278;
}

.ap-support-mic.is-listening {
  background: #c4513a;
  animation: apSupportPulse 1s ease infinite;
}

.ap-support-send {
  background: #0c6b74;
}

.ap-support-send:hover {
  background: #084850;
}

@keyframes apSupportPulse {
  50% {
    transform: scale(1.06);
  }
}

.ap-support-foot-note {
  margin: 0.45rem 0.35rem 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.ap-float-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.ap-info-float {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.ap-info-float-caption {
  margin: 0;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(11, 36, 44, 0.14);
  max-width: min(240px, calc(100vw - 5.5rem));
  text-align: center;
  animation: apSupportTeaserIn 0.45s ease-out;
}

.ap-info-float-btn {
  width: 3.35rem;
  height: 3.35rem;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(145deg, #e0982f 0%, #d4892a 45%, #b86f1a 100%);
  box-shadow: 0 6px 18px rgba(180, 111, 26, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ap-info-float-btn .fa-solid {
  font-weight: 900;
  line-height: 1;
}

.ap-info-float-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(180, 111, 26, 0.5);
}

.ap-support-launch {
  position: relative;
  width: 3.35rem;
  height: 3.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--ap-color-forest, var(--brand-green));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 36, 44, 0.2);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.ap-support-launch .fa-solid {
  font-weight: 900;
  line-height: 1;
}

.ap-support-launch-icon-close {
  display: none;
}

.ap-support-launch.is-open .ap-support-launch-icon-open {
  display: none;
}

.ap-support-launch.is-open .ap-support-launch-icon-close {
  display: block;
}

.ap-support-launch-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(12, 107, 116, 0.35);
  animation: apSupportRing 2.5s ease-out infinite;
  pointer-events: none;
}

.ap-support-launch.is-open .ap-support-launch-pulse {
  display: none;
}

@keyframes apSupportRing {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

body.ap-support-open {
  overflow: hidden;
}

/* Community submit forms — hidden on page, opened in modal */
.ap-submit-panel[hidden] {
  display: none !important;
}

/* Keeps #…-form hash targets in the page flow when the panel moves into the modal */
.ap-submit-hash-anchor {
  display: block;
  width: 100%;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  scroll-margin-top: 5.5rem;
}

.ap-submit-modal,
#apSubmitModal.ap-submit-modal {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: min(100%, 640px);
  max-height: min(92vh, 900px);
  background: transparent;
  overflow: visible;
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 0;
  transform: translateX(-50%);
}

@media (min-width: 640px) {
  .ap-submit-modal,
  #apSubmitModal.ap-submit-modal {
    top: 50%;
    bottom: auto;
    width: min(calc(100% - 3rem), 640px);
    max-height: min(88vh, 820px);
    transform: translate(-50%, -50%);
  }
}

.ap-submit-modal::backdrop {
  background: rgba(8, 28, 34, 0.55);
  backdrop-filter: blur(4px);
}

.ap-submit-modal:not([open]) {
  display: none;
}

.ap-submit-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(92vh, 900px);
  background: var(--surface, #fff);
  border-radius: var(--radius-lg, 20px) var(--radius-lg, 20px) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 640px) {
  .ap-submit-modal-dialog {
    border-radius: var(--radius-lg, 20px);
    max-height: min(88vh, 820px);
  }
}

.ap-submit-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.65rem;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.ap-submit-modal-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  padding-right: 0.5rem;
}

.ap-submit-modal-close {
  border: 0;
  background: var(--bg-soft);
  color: var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.ap-submit-modal-close:hover {
  background: var(--border-soft);
}

.ap-submit-modal-body {
  overflow: auto;
  padding: 0 1.1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.ap-submit-modal-body .ap-submit-panel {
  display: block !important;
  box-shadow: none;
  border: 0;
  padding: 0.75rem 0 0;
  margin: 0;
  background: transparent;
}

.ap-submit-modal-body .page-head {
  display: none;
}

.ap-submit-modal-body .form-grid.card,
.ap-submit-modal-body .vol-form,
.ap-submit-modal-body .protiva-form {
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

body.ap-submit-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .ap-support-teaser,
  .ap-support-launch-pulse,
  .ap-support-mic.is-listening {
    animation: none !important;
  }
}

body.theme-discover .ap-notify-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 1045;
  padding: 0 0.75rem;
  pointer-events: none;
}

body.theme-discover .ap-notify-banner-inner {
  pointer-events: auto;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft-hover);
}

body.theme-discover .ap-notify-banner-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(26, 92, 69, 0.12);
  color: var(--brand-green);
  flex-shrink: 0;
}

body.theme-discover .ap-notify-banner-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.98rem;
}

body.theme-discover .ap-notify-banner-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

body.theme-discover .ap-notify-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  body.theme-discover .ap-notify-banner {
    bottom: 1.25rem;
  }
  body.theme-discover .ap-notify-banner-inner {
    align-items: center;
  }
  body.theme-discover .ap-notify-banner-actions {
    flex-direction: row;
  }
}

body.theme-discover .nav-account-toggle--photo {
  padding: 0;
  overflow: hidden;
}

body.theme-discover .nav-account-photo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

body.theme-discover .nav-account-menu-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  white-space: normal;
}

body.theme-discover .nav-account-menu-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

body.theme-discover .nav-account-menu-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(26, 92, 69, 0.12);
  color: var(--brand-green);
  font-weight: 700;
  flex-shrink: 0;
}

body.theme-discover .footer-grid-priority {
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
}

.about-page #upazila-map {
  scroll-margin-top: 5.5rem;
  margin-top: 1.75rem;
}

.about-page .about-prose {
  margin-bottom: 0.5rem;
}

.about-page .inner-block-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-family: var(--font-display, "Baloo Da 2", sans-serif);
}

.about-page .inner-block-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 62ch;
}

.about-page .atlas-map--about {
  max-width: min(70%, 520px);
  margin-left: auto;
  margin-right: auto;
}

.about-page .about-glance-block {
  margin-top: 1.75rem;
}

.about-page .cards-glance-report {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.about-page .glance-report-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
}

.about-page .glance-report-card--static {
  cursor: default;
}

.about-page .glance-report-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(26, 92, 69, 0.1);
  color: var(--brand-green);
  margin-bottom: 0.15rem;
}

.about-page .glance-report-value {
  font-size: 1.45rem;
  font-family: var(--font-display, "Baloo Da 2", sans-serif);
  line-height: 1.15;
}

.about-page .glance-report-label {
  font-weight: 700;
  font-size: 0.92rem;
}

.about-page .glance-report-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .about-page .cards-glance-report {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .about-page .atlas-map--about {
    max-width: 100%;
  }

  .about-page .cards-glance-report {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  body.theme-discover .footer-grid-priority {
    grid-template-columns: 1fr 1fr;
  }
  body.theme-discover .footer-grid-priority .footer-brand {
    grid-column: 1 / -1;
  }
}
