/**
 * Moyars heritage theme — abyss, teal, gold.
 * Loaded after main.css so it restyles the whole site.
 */

:root {
  --abyss-deep: #05080C;
  --abyss-light: #0B1218;
  --panel-base: #121C24;
  --panel-elevated: #182631;
  --surface: #101418;
  --surface-high: #272a2f;
  --primary: #4ae3e5;
  --primary-container: #12c7c9;
  --tertiary: #77dee8;
  --gold: #E8A93A;
  --gold-soft: #F0C56D;
  --mist-text: #D7E8EA;
  --mist-light: #E8F2F4;
  --on-surface-variant: #bbc9c9;
  --outline: #859393;
  --card-border: rgba(10, 143, 152, 0.3);

  --default-font: "Outfit", system-ui, sans-serif;
  --heading-font: "EB Garamond", Georgia, serif;
  --nav-font: "Outfit", system-ui, sans-serif;

  --background-color: #05080C;
  --default-color: #D7E8EA;
  --heading-color: #D7E8EA;
  --accent-color: #4ae3e5;
  --surface-color: #121C24;
  --contrast-color: #05080C;

  --nav-color: #D7E8EA;
  --nav-hover-color: #4ae3e5;
  --nav-mobile-background-color: #0B1218;
  --nav-dropdown-background-color: #121C24;
  --nav-dropdown-color: #D7E8EA;
  --nav-dropdown-hover-color: #4ae3e5;
}

.light-background,
.dark-background {
  --background-color: #05080C;
  --default-color: #D7E8EA;
  --heading-color: #D7E8EA;
  --surface-color: #121C24;
  --contrast-color: #05080C;
}

html {
  background: var(--abyss-deep);
}

body {
  color: var(--mist-text);
  background-color: var(--abyss-deep);
  font-family: var(--default-font);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6,
.section-title h2,
.page-title h1 {
  font-family: var(--heading-font);
  color: var(--mist-text);
  font-weight: 500;
}

a { color: var(--primary); }
a:hover { color: var(--tertiary); }

/* --------------------------------------------------------------
   Header
-------------------------------------------------------------- */
.header {
  background: transparent;
  color: var(--mist-text);
}

.header .branding,
.header .branding.dark-background {
  min-height: 72px;
  background-color: var(--abyss-deep) !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(119, 222, 232, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --nav-hover-color: #4ae3e5;
  --nav-dropdown-hover-color: #4ae3e5;
}

.header .logo {
  gap: 12px;
  text-decoration: none;
}

.header .logo img,
.header .branding.dark-background .logo img {
  height: 52px !important;
  width: auto !important;
  max-height: 52px;
  max-width: 240px;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
  filter: none !important;
}

.header .navmenu a,
.header .navmenu a:focus {
  text-transform: none;
}

.header .branding.dark-background .navmenu > ul > li > a,
.header .branding.dark-background .navmenu > ul > li > a:focus {
  color: var(--mist-text) !important;
  font-family: var(--nav-font);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  text-transform: none;
}

.header .branding.dark-background .navmenu > ul > li:hover > a,
.header .branding.dark-background .navmenu > ul > li > a:hover,
.header .branding.dark-background .navmenu > ul > li.active > a,
.header .branding.dark-background .navmenu > ul > li > a.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary);
}

.header .branding.dark-background .navmenu .dropdown ul {
  background: var(--panel-base) !important;
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.header .branding.dark-background .navmenu .dropdown ul a {
  color: var(--mist-text) !important;
}

.header .branding.dark-background .navmenu .dropdown ul a:hover,
.header .branding.dark-background .navmenu .dropdown ul .active,
.header .branding.dark-background .navmenu .dropdown ul li:hover > a {
  color: var(--primary) !important;
  background: rgba(74, 227, 229, 0.08);
}

.header .branding.dark-background .mobile-nav-toggle {
  color: var(--primary);
}

.btn-heritage-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--abyss-deep) !important;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-family: var(--nav-font);
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 0;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}

.btn-heritage-login:hover {
  background: var(--tertiary);
  color: var(--abyss-deep) !important;
  transform: scale(0.98);
}

@media (max-width: 1199px) {
  .header .logo img,
  .header .branding.dark-background .logo img {
    height: 40px !important;
    max-height: 40px;
    max-width: 180px;
  }
  .btn-heritage-login { padding: 0.4rem 1rem; font-size: 0.85rem; }
}

/* --------------------------------------------------------------
   Page title / breadcrumbs
-------------------------------------------------------------- */
.page-title,
.page-title.dark-background {
  background: linear-gradient(180deg, #0B1218 0%, #05080C 100%) !important;
  border-bottom: 1px solid var(--card-border);
  color: var(--mist-text);
}

.page-title h1 {
  color: var(--mist-text);
}

.breadcrumbs ol,
.breadcrumbs a,
.breadcrumbs span {
  color: var(--on-surface-variant);
}

.breadcrumbs a:hover { color: var(--primary); }

/* --------------------------------------------------------------
   Footer
-------------------------------------------------------------- */
.footer,
.footer.dark-background {
  background: var(--panel-base) !important;
  color: var(--mist-text);
  border-top: 1px solid rgba(119, 222, 232, 0.2);
}

.footer h4,
.footer .footer-about,
.footer .footer-links a,
.footer p {
  color: var(--mist-text);
}

.footer .footer-links a:hover { color: var(--tertiary); }
.footer .copyright,
.footer .copyright a {
  color: var(--tertiary);
  opacity: 0.75;
}

.heritage-footer {
  text-align: center;
  padding: 3rem 1.25rem;
}

.heritage-footer .brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--heading-font);
  font-size: 1.75rem;
  color: var(--gold-soft);
  margin-bottom: 1.25rem;
  text-decoration: none;
}

.heritage-footer .brand:hover {
  color: var(--gold-soft);
}

.heritage-footer .footer-logo {
  width: auto;
  height: 48px;
  object-fit: contain;
  background: transparent;
}

.heritage-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 1.25rem;
}

.heritage-footer nav a {
  color: rgba(215, 232, 234, 0.7);
  text-decoration: underline;
}

.heritage-footer .copy {
  color: var(--tertiary);
  opacity: 0.6;
  margin: 0;
}

/* --------------------------------------------------------------
   Cards, forms, buttons (site-wide)
-------------------------------------------------------------- */
.card,
.form-control,
.form-select,
.table,
.content,
section.section {
  --bs-body-bg: var(--panel-base);
}

.card {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  color: var(--mist-text);
}

.card-title,
.card-title a { color: var(--mist-text); }
.card-text { color: var(--on-surface-variant); }

.btn-primary,
.cta-btn,
input[type="submit"],
button[type="submit"].btn {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--abyss-deep);
  border-radius: 999px;
  font-weight: 600;
}

.btn-primary:hover,
.cta-btn:hover {
  background: var(--tertiary);
  border-color: var(--tertiary);
  color: var(--abyss-deep);
}

.btn-outline-primary,
.btn-outline-secondary {
  border-color: var(--gold-soft);
  color: var(--gold-soft);
  border-radius: 999px;
}

.form-control,
.form-select,
.custom-select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="file"],
select {
  background: var(--panel-elevated) !important;
  color: var(--mist-text) !important;
  border: 1px solid rgba(74, 227, 229, 0.22) !important;
  border-radius: 12px;
  color-scheme: dark;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(74, 227, 229, 0.18);
}

.form-label,
label { color: var(--on-surface-variant); }

.text-muted { color: var(--on-surface-variant) !important; }

.table {
  color: var(--mist-text);
  --bs-table-bg: transparent;
}

.table thead { color: var(--gold-soft); }

.alert { border-radius: 12px; }

.back-to-top,
.scroll-top {
  background: var(--primary) !important;
  color: var(--abyss-deep) !important;
}

#preloader { background: var(--abyss-deep); }

/* --------------------------------------------------------------
   Homepage
-------------------------------------------------------------- */
.heritage-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.25rem 6rem;
  overflow: hidden;
  text-align: center;
}

.heritage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(232, 169, 58, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 70%, rgba(18, 199, 201, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, #1a0e08 0%, #0B1218 42%, #05080C 100%);
  z-index: 0;
}

.heritage-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 12, 0.55) 0%, rgba(5, 8, 12, 0.35) 40%, #05080C 100%);
  z-index: 1;
}

.heritage-hero .inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.heritage-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0;
}

.heritage-hero .lede {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
  max-width: 36rem;
  margin: 0;
}

@media (min-width: 992px) {
  .heritage-hero h1 {
    max-width: none;
    font-size: clamp(2.75rem, 4.2vw, 4rem);
  }
  .heritage-hero .lede {
    max-width: 48rem;
    font-size: 1.3rem;
  }
}

.heritage-hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-heritage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  transition: 0.2s ease;
}

.btn-heritage.primary {
  background: var(--primary);
  color: var(--abyss-deep) !important;
  box-shadow: 0 4px 20px rgba(74, 227, 229, 0.2);
}

.btn-heritage.primary:hover {
  background: var(--tertiary);
  box-shadow: 0 0 20px rgba(74, 227, 229, 0.25);
}

.btn-heritage.ghost {
  background: transparent;
  border: 1.5px solid var(--gold-soft);
  color: var(--gold-soft) !important;
}

.btn-heritage.ghost:hover {
  background: rgba(240, 197, 109, 0.1);
}

.heritage-hero .private-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(119, 222, 232, 0.7);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin: 0.5rem 0 0;
}

.heritage-stats {
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  background: rgba(18, 28, 36, 0.7);
  backdrop-filter: blur(8px);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.heritage-stats p {
  font-family: var(--heading-font);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  color: var(--gold-soft);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.heritage-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.heritage-features {
  padding: 5rem 0 3rem;
}

.heritage-features h2,
.heritage-split h2 {
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 2.5rem;
}

.heritage-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .heritage-bento { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .heritage-bento { grid-template-columns: repeat(4, 1fr); }
}

.heritage-feature {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 2rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.heritage-feature:hover {
  background: var(--surface-high);
  box-shadow: 0 0 20px rgba(74, 227, 229, 0.15);
  transform: translateY(-2px);
}

.heritage-feature .icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 199, 201, 0.12);
  color: var(--primary);
  font-size: 1.4rem;
}

.heritage-feature h3 {
  margin: auto 0 0;
  font-size: 1.5rem;
}

.heritage-feature p {
  color: var(--on-surface-variant);
  margin: 0;
  line-height: 1.55;
}

.heritage-split {
  padding: 2rem 0 6rem;
}

.heritage-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 992px) {
  .heritage-split-grid { grid-template-columns: 2fr 1fr; }
}

.heritage-kshetras-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.heritage-kshetras-head h2 { text-align: left; margin: 0; }

.heritage-kshetra-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .heritage-kshetra-grid { grid-template-columns: 1fr 1fr; }
}

.heritage-kshetra {
  position: relative;
  height: 320px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--panel-base);
  display: block;
  text-decoration: none !important;
}

.heritage-kshetra .photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  filter: grayscale(0.15) contrast(1.05);
  transition: transform 0.7s, opacity 0.4s;
}

.heritage-kshetra:hover .photo {
  transform: scale(1.05);
  opacity: 0.8;
}

.heritage-kshetra .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #05080C 8%, rgba(5, 8, 12, 0.4) 50%, transparent 100%);
}

.heritage-kshetra .meta {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.heritage-kshetra .chip {
  align-self: flex-start;
  background: rgba(18, 199, 201, 0.2);
  color: var(--primary);
  border: 1px solid rgba(74, 227, 229, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  backdrop-filter: blur(8px);
}

.heritage-kshetra h3 {
  margin: 0;
  font-size: 1.5rem;
}

.heritage-kshetra p {
  color: var(--on-surface-variant);
  margin: 0.4rem 0 0;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.3s;
}

.heritage-kshetra:hover p {
  opacity: 1;
  transform: none;
}

.heritage-notices h2 {
  text-align: left;
  font-size: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1.25rem;
}

.heritage-notice-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.heritage-notice-list a {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.heritage-notice-list .dot {
  margin-top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  flex-shrink: 0;
}

.heritage-notice-list li:first-child .dot { background: var(--gold-soft); }

.heritage-notice-list h4 {
  margin: 0;
  font-family: var(--default-font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.heritage-notice-list a:hover h4 { color: var(--primary); }

.heritage-notice-list p {
  margin: 0.25rem 0 0;
  color: var(--on-surface-variant);
  font-size: 0.9rem;
}

.heritage-event {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.heritage-event::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  background: rgba(74, 227, 229, 0.06);
  border-bottom-left-radius: 999px;
  pointer-events: none;
}

.heritage-event h2 {
  text-align: left;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.heritage-event .row-evt {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.heritage-event .datebox {
  min-width: 60px;
  background: var(--surface-high);
  border-radius: 0.5rem;
  text-align: center;
  padding: 0.5rem 0.4rem;
}

.heritage-event .datebox .mon {
  display: block;
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.heritage-event .datebox .day {
  display: block;
  font-family: var(--heading-font);
  font-size: 1.5rem;
  line-height: 1.1;
}

.heritage-event h4 {
  margin: 0;
  font-family: var(--default-font);
  font-size: 1rem;
  font-weight: 600;
}

.heritage-event .loc {
  margin: 0.25rem 0 0;
  color: var(--on-surface-variant);
  font-size: 0.9rem;
}

.heritage-event .view {
  display: block;
  margin-top: 1rem;
  text-align: center;
  border: 1px solid rgba(74, 227, 229, 0.5);
  color: var(--primary) !important;
  padding: 0.5rem;
  border-radius: 0.5rem;
  text-decoration: none !important;
}

.heritage-event .view:hover { background: rgba(74, 227, 229, 0.1); }

.header .branding.dark-background .navmenu > ul > li > a.btn-heritage-login,
.header .navmenu a.btn-heritage-login {
  color: var(--abyss-deep) !important;
  border-bottom: 0 !important;
  padding: 0.5rem 1.5rem;
  margin-left: 0.35rem;
}

#main {
  background: var(--abyss-deep);
  color: var(--mist-text);
}

.notice-filters a,
.notices-toolbar a {
  background: var(--panel-elevated) !important;
  color: var(--mist-text) !important;
  border-color: var(--card-border) !important;
}

.notice-filters a.active,
.notice-filters a:hover {
  background: rgba(74, 227, 229, 0.12) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.users.form,
.articles.form,
.content.view,
section.content {
  color: var(--mist-text);
}

.pagination .page-link {
  background: var(--panel-base);
  border-color: var(--card-border);
  color: var(--mist-text);
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--abyss-deep);
}

/* --------------------------------------------------------------
   Login (auth screen)
-------------------------------------------------------------- */
#main.auth-screen {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3.5rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(10, 143, 152, 0.08) 0%, transparent 70%),
    linear-gradient(to bottom, rgba(5, 8, 12, 0.92) 0%, #05080C 100%);
}

.auth-login {
  width: 100%;
  max-width: 28rem;
  position: relative;
  z-index: 1;
}

.auth-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-orbs::before,
.auth-orbs::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 40%;
  border-radius: 999px;
  background: rgba(74, 227, 229, 0.06);
  filter: blur(90px);
}

.auth-orbs::before { top: -10%; left: -10%; }
.auth-orbs::after { bottom: -10%; right: -10%; }

.auth-panel {
  position: relative;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

@media (min-width: 640px) {
  .auth-panel { padding: 2rem; }
}

.auth-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(74, 227, 229, 0.5), transparent);
}

.auth-brand {
  text-align: center;
  margin-bottom: 2.25rem;
}

.auth-emblem {
  width: 132px;
  height: auto;
  margin: 0 auto 1.5rem;
  background: transparent;
}

.auth-emblem img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.auth-brand h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.4rem;
  color: var(--mist-text);
}

.auth-sub {
  margin: 0;
  color: var(--outline);
  font-size: 1.05rem;
}

.auth-form .auth-field {
  margin-bottom: 1.35rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: var(--gold-soft);
  margin: 0 0 0.5rem 0.25rem;
}

.auth-input {
  position: relative;
}

.auth-input i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--outline);
  font-size: 1.15rem;
  pointer-events: none;
  transition: color 0.2s;
}

.auth-input:focus-within i { color: var(--primary); }

.auth-form .auth-input input,
.auth-form .auth-input input.form-control {
  width: 100%;
  background: var(--abyss-light) !important;
  color: var(--mist-text) !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(119, 222, 232, 0.3) !important;
  border-radius: 0.5rem !important;
  padding: 1rem 1rem 1rem 2.75rem !important;
  font-size: 1.05rem;
  box-shadow: none !important;
}

.auth-form .auth-input input::placeholder {
  color: #3c4949;
}

.auth-form .auth-input input:focus {
  border-bottom-color: var(--primary) !important;
  box-shadow: 0 0 15px rgba(74, 227, 229, 0.15) !important;
}

.auth-form .error-message {
  color: #ffb4ab;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.25rem;
}

.auth-forgot {
  color: var(--outline) !important;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none !important;
}

.auth-forgot:hover { color: var(--primary) !important; }

.auth-submit {
  width: 100%;
  margin-top: 2rem;
  background: var(--primary);
  color: #003737;
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 0 15px rgba(74, 227, 229, 0.3);
  transition: 0.25s ease;
}

.auth-submit:hover {
  background: #3ddbdd;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(74, 227, 229, 0.5);
  color: #003737;
}

.auth-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(119, 222, 232, 0.1);
  text-align: center;
}

.auth-bottom p {
  margin: 0;
  color: var(--outline);
}

.auth-bottom a {
  color: var(--primary);
  font-weight: 500;
  margin-left: 0.25rem;
}

.auth-bottom a:hover {
  color: #3ddbdd;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-secure {
  margin-top: 1rem !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  color: rgba(133, 147, 147, 0.6) !important;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.auth-panel .alert,
.auth-login .message {
  border-radius: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------
   Find Relation
-------------------------------------------------------------- */
.find-heritage {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .find-heritage { padding: 4.5rem 4rem 6rem; }
}

.find-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
}

.find-orbs::before,
.find-orbs::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(120px);
}

.find-orbs::before {
  width: 24rem;
  height: 24rem;
  top: 18%;
  left: 18%;
  background: rgba(18, 199, 201, 0.45);
}

.find-orbs::after {
  width: 28rem;
  height: 28rem;
  bottom: 12%;
  right: 12%;
  background: rgba(191, 134, 20, 0.35);
}

.find-inner { position: relative; z-index: 1; max-width: 56rem; margin: 0 auto; }

.find-intro { text-align: center; margin-bottom: 2.5rem; }

.find-intro h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 2.25rem);
  font-weight: 500;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.find-intro p {
  margin: 0 auto;
  max-width: 36rem;
  color: rgba(215, 232, 234, 0.8);
  font-size: 1.05rem;
  line-height: 1.55;
}

.find-panel {
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .find-panel { padding: 2rem; }
}

.find-panel form { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

.find-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .find-fields {
    flex-direction: row;
    align-items: flex-end;
    gap: 1.5rem;
  }
}

.find-heritage .person-pick {
  flex: 1;
  width: 100%;
  position: relative;
}

.find-heritage .person-pick label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}

.find-input {
  position: relative;
  background: var(--abyss-light);
  border-bottom: 1px solid rgba(119, 222, 232, 0.3);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.find-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(18, 199, 201, 0.4);
}

.find-input i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(215, 232, 234, 0.45);
}

.find-input input {
  width: 100%;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--mist-text) !important;
  font-size: 1.15rem;
  padding: 1rem 1rem 1rem 2.75rem !important;
  border-radius: 0 !important;
}

.find-input input::placeholder { color: rgba(215, 232, 234, 0.3); }

.find-swap {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--abyss-deep);
  border: 1px solid rgba(119, 222, 232, 0.2);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(18, 199, 201, 0.2);
}

.find-heritage .quick-me {
  margin-top: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.85rem;
  padding: 0;
}

.find-heritage .search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  margin-top: 0.25rem;
  max-height: 220px;
  overflow-y: auto;
  background: var(--panel-elevated);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.find-heritage .search-results.is-open { display: block; }

.find-heritage .search-results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(215, 232, 234, 0.08);
  background: transparent;
  color: var(--mist-text);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
}

.find-heritage .search-results button:hover,
.find-heritage .search-results button:focus {
  background: rgba(74, 227, 229, 0.1);
}

.find-heritage .search-results .meta {
  display: block;
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}

.find-submit {
  background: var(--primary);
  color: #05080C;
  border: 0;
  border-radius: 999px;
  padding: 1rem 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  box-shadow: 0 0 0 transparent;
  transition: 0.25s ease;
}

.find-submit:hover {
  background: #63f7f9;
  box-shadow: 0 0 20px rgba(74, 227, 229, 0.4);
  color: #05080C;
}

.find-result { width: 100%; margin-top: 3.5rem; text-align: center; }

.find-sentence {
  font-family: var(--heading-font);
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  line-height: 1.25;
  font-weight: 500;
  color: var(--gold-soft);
  max-width: 48rem;
  margin: 0 auto 3rem;
}

.find-sentence .nm { color: var(--mist-text); }
.find-sentence.is-empty { color: #ffb4ab; font-size: 1.25rem; }

.find-path {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  padding: 2rem 0.5rem 1rem;
}

.find-path-line {
  position: absolute;
  top: calc(2rem + 40px);
  left: 4%;
  right: 4%;
  height: 2px;
  background: rgba(119, 222, 232, 0.3);
  z-index: 0;
}

.find-path-line span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 25%;
  background: rgba(74, 227, 229, 0.85);
  box-shadow: 0 0 10px #4ae3e5;
  animation: findPathFlow 3s infinite linear;
}

@keyframes findPathFlow {
  0% { left: -25%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.find-node {
  position: relative;
  z-index: 1;
  min-width: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none !important;
  color: inherit;
}

.find-node .avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(119, 222, 232, 0.5);
  background: var(--abyss-light);
  padding: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.find-node.is-end .avatar {
  width: 5rem;
  height: 5rem;
  border: 2px solid var(--gold-soft);
  padding: 3px;
  box-shadow: 0 0 15px rgba(240, 197, 109, 0.3);
}

.find-node .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.find-node:not(.is-end) .avatar img { opacity: 0.85; }

.find-node .node-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  color: var(--mist-text);
  text-align: center;
}

.find-node:not(.is-end) .node-name {
  font-weight: 500;
  color: rgba(215, 232, 234, 0.8);
}

.find-node .node-role {
  font-size: 0.75rem;
  color: rgba(215, 232, 234, 0.5);
}

.find-node.is-end .node-role {
  color: var(--tertiary);
  background: var(--abyss-light);
  border: 1px solid rgba(119, 222, 232, 0.2);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  margin-top: 0.15rem;
}

.find-tree-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 2rem;
}

.find-tree-links a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

#main.main-full-bleed { width: 100%; }

/* --------------------------------------------------------------
   Member directory
-------------------------------------------------------------- */
.dir-heritage {
  padding: 3rem 1.25rem 5rem;
  max-width: 80rem;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .dir-heritage { padding: 3.5rem 4rem 6rem; }
}

.dir-inner { width: 100%; }

.dir-intro { margin-bottom: 3rem; }

.dir-intro h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--mist-text);
  margin: 0 0 2rem;
}

.dir-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}

.dir-search {
  position: relative;
  width: 100%;
  max-width: 28rem;
}

.dir-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tertiary);
  font-size: 1.05rem;
  pointer-events: none;
}

.dir-search input {
  width: 100%;
  background: var(--abyss-light);
  color: var(--mist-text);
  font-family: var(--default-font);
  font-size: 1.05rem;
  border: 0;
  border-bottom: 1px solid var(--tertiary);
  border-radius: 0.25rem 0.25rem 0 0;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dir-search input::placeholder { color: rgba(215, 232, 234, 0.5); }
.dir-search input:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.dir-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dir-filters select,
.dir-chip {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(119, 222, 232, 0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2377dee8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  border: 1px solid rgba(119, 222, 232, 0.3);
  color: var(--mist-text);
  font-family: var(--default-font);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.5rem 2.1rem 0.5rem 1rem;
  cursor: pointer;
  min-width: 8.5rem;
}

.dir-filters select:hover,
.dir-chip:hover {
  background-color: rgba(119, 222, 232, 0.2);
  border-color: rgba(74, 227, 229, 0.5);
}

.dir-filters select.is-on,
.dir-chip.is-on {
  border-color: var(--primary);
  color: var(--primary);
}

.dir-filters select option {
  background: var(--panel-base);
  color: var(--mist-text);
}

.dir-empty {
  text-align: center;
  color: rgba(215, 232, 234, 0.65);
  padding: 3rem 1rem;
  font-size: 1.1rem;
}

.dir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .dir-grid { grid-template-columns: repeat(3, 1fr); }
}

.dir-card {
  position: relative;
  overflow: hidden;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dir-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(74, 227, 229, 0.15);
}

.dir-card-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(74, 227, 229, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.dir-card:hover .dir-card-glow { opacity: 1; }

.dir-avatar {
  position: relative;
  z-index: 1;
  width: 6rem;
  height: 6rem;
  margin-bottom: 1.5rem;
}

.dir-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(74, 227, 229, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.dir-avatar.is-gold img { border-color: var(--gold-soft); }

.dir-card h2 {
  position: relative;
  z-index: 1;
  font-family: var(--heading-font);
  font-size: 1.75rem;
  line-height: 2.25rem;
  font-weight: 500;
  color: var(--mist-text);
  margin: 0 0 0.25rem;
}

.dir-taravad {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  color: var(--gold-soft);
  margin: 0 0 1rem;
}

.dir-place {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: rgba(215, 232, 234, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.dir-place i { font-size: 1rem; color: var(--tertiary); }
.dir-place-empty { visibility: hidden; }

.dir-view {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin-top: auto;
  background: var(--primary);
  color: var(--abyss-deep) !important;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.dir-view:hover {
  background: #63f7f9;
  color: var(--abyss-deep) !important;
  box-shadow: 0 0 15px rgba(74, 227, 229, 0.4);
}

.dir-pager {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.dir-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary) !important;
  font-family: var(--default-font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease;
}

.dir-more:hover { background: rgba(74, 227, 229, 0.1); }

.dir-pages ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dir-pages a,
.dir-pages span {
  display: inline-flex;
  min-width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--mist-text);
  text-decoration: none !important;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.dir-pages a:hover {
  border-color: rgba(74, 227, 229, 0.4);
  color: var(--primary);
}

.dir-pages .is-current span {
  background: rgba(74, 227, 229, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* --------------------------------------------------------------
   Phone book
-------------------------------------------------------------- */
.pb-heritage {
  padding: 3rem 1.25rem 5rem;
  max-width: 80rem;
  margin: 0 auto;
  background-image: radial-gradient(circle at 50% 0%, rgba(18, 199, 201, 0.05) 0%, transparent 70%);
  background-repeat: no-repeat;
}

@media (min-width: 992px) {
  .pb-heritage { padding: 4rem 4rem 6rem; }
}

.pb-intro { margin-bottom: 3rem; }

.pb-intro h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--mist-text);
  margin: 0 0 1rem;
}

.pb-intro p {
  max-width: 42rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--mist-text);
}

.pb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.pb-search {
  width: 100%;
  max-width: 24rem;
}

.pb-search label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}

.pb-search-field { position: relative; }

.pb-search-field i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--outline);
  pointer-events: none;
}

.pb-search-field input {
  width: 100%;
  background: var(--abyss-light);
  color: var(--mist-text);
  border: 0;
  border-bottom: 1px solid var(--primary-container);
  border-radius: 0;
  padding: 0.75rem 0.5rem 0.75rem 1.75rem;
  font-size: 1.125rem;
}

.pb-search-field input::placeholder { color: var(--outline); }
.pb-search-field input:focus {
  outline: none;
  border-bottom-color: var(--primary);
  box-shadow: 0 4px 20px -2px rgba(74, 227, 229, 0.15);
}

.pb-chips {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  max-width: 100%;
}

.pb-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--panel-elevated);
  border: 1px solid rgba(18, 199, 201, 0.3);
  color: var(--mist-text) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none !important;
}

.pb-chip:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
}

.pb-chip.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--abyss-deep) !important;
}

.pb-chip.is-on:hover { color: var(--abyss-deep) !important; }

.pb-empty {
  text-align: center;
  color: rgba(215, 232, 234, 0.65);
  padding: 2.5rem 1rem;
}

.pb-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pb-row {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--panel-base);
  border: 1px solid rgba(18, 199, 201, 0.3);
  border-radius: 0.5rem;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 640px) {
  .pb-row {
    flex-direction: row;
    align-items: center;
  }
}

.pb-row:hover {
  background: var(--panel-elevated);
  border-color: rgba(74, 227, 229, 0.5);
  box-shadow: 0 0 20px rgba(74, 227, 229, 0.08);
}

.pb-person {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}

.pb-avatar {
  position: relative;
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
}

.pb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid rgba(133, 147, 147, 0.5);
}

.pb-avatar.is-elder img {
  border: 1.5px solid var(--gold-soft);
  padding: 2px;
}

.pb-star {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--abyss-deep);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 0.65rem;
}

.pb-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.pb-name {
  font-family: var(--heading-font);
  font-size: 1.75rem;
  line-height: 2.1rem;
  font-weight: 500;
  color: var(--mist-text) !important;
  text-decoration: none !important;
}

.pb-row:hover .pb-name { color: var(--primary) !important; }

.pb-elder-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(191, 134, 20, 0.2);
  border: 1px solid rgba(240, 197, 109, 0.3);
  color: var(--gold-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  color: rgba(215, 232, 234, 0.8);
  font-size: 1rem;
}

.pb-meta i {
  margin-right: 0.3rem;
  opacity: 0.7;
  font-size: 0.95rem;
}

.pb-dot { color: rgba(119, 222, 232, 0.3); }

@media (max-width: 639px) {
  .pb-dot { display: none; }
}

.pb-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(133, 147, 147, 0.2);
}

@media (min-width: 640px) {
  .pb-actions {
    padding-top: 0;
    border-top: 0;
    flex: 0 0 auto;
  }
}

.pb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: #101418;
  border: 1px solid rgba(18, 199, 201, 0.3);
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pb-icon:hover {
  background: rgba(74, 227, 229, 0.1);
  border-color: var(--primary);
}

.pb-icon:hover i,
.pb-icon:hover svg { transform: scale(1.1); }

.pb-icon i { font-size: 1.1rem; }
.pb-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.pb-hidden {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--abyss-deep);
  border: 1px solid rgba(240, 197, 109, 0.2);
  color: rgba(240, 197, 109, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
}

.pb-more:hover {
  background: var(--primary);
  color: var(--abyss-deep) !important;
}

/* --------------------------------------------------------------
   Notices / articles / events feed
-------------------------------------------------------------- */
.feed-heritage {
  padding: 3rem 1.25rem 5rem;
  max-width: 80rem;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .feed-heritage { padding: 3.5rem 4rem 6rem; }
}

.feed-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feed-head h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--primary-container);
  margin: 0 0 1rem;
}

.feed-head p {
  max-width: 40rem;
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.7;
  color: #b0b0b0;
}

.feed-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  background: var(--primary-container);
  color: #101418 !important;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 0.75rem 2rem;
  transition: box-shadow 0.2s ease;
}

.feed-share:hover {
  color: #101418 !important;
  box-shadow: 0 0 15px rgba(18, 199, 201, 0.4);
}

.feed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.feed-chip {
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  background: #181c20;
  color: #b0b0b0 !important;
  border: 1px solid #36393e;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none !important;
}

.feed-chip:hover { border-color: var(--primary-container); color: var(--mist-text) !important; }

.feed-chip.is-on {
  background: var(--primary-container);
  border-color: var(--primary-container);
  color: #101418 !important;
}

.feed-empty {
  text-align: center;
  color: rgba(215, 232, 234, 0.65);
  padding: 2.5rem 1rem;
}

.feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .feed-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .feed-card { grid-column: span 4; }
  .feed-card.is-featured { grid-column: span 8; }
}

.feed-card {
  display: flex;
  flex-direction: column;
  background: #181c20;
  border: 1px solid #36393e;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.feed-card:hover {
  border-color: var(--primary-container);
  box-shadow: 0 0 20px rgba(18, 199, 201, 0.1);
}

@media (min-width: 768px) {
  .feed-card.is-featured.has-media {
    flex-direction: row;
  }

  .feed-card.is-featured.has-media .feed-media,
  .feed-card.is-featured.has-media .feed-body {
    width: 50%;
  }
}

.feed-media {
  position: relative;
  min-height: 16rem;
  overflow: hidden;
}

.feed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, #181c20 100%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .feed-card.is-featured.has-media .feed-media::after {
    background: linear-gradient(to right, transparent 45%, #181c20 100%);
  }
}

.feed-media .feed-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
}

.feed-body {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  flex: 1;
}

.feed-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.feed-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: #31353a;
  color: #bbc9c9;
  border: 1px solid rgba(133, 147, 147, 0.3);
}

.feed-badge.marriage {
  background: var(--gold-soft);
  color: #432c00;
  border-color: transparent;
}

.feed-badge.achievement {
  background: rgba(18, 199, 201, 0.2);
  color: var(--primary-container);
  border-color: rgba(18, 199, 201, 0.3);
}

.feed-badge.obituary {
  background: #31353a;
  color: #bbc9c9;
}

.feed-badge.news {
  background: #36393e;
  color: #e2e2e2;
  border-color: rgba(18, 199, 201, 0.2);
}

.feed-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #b0b0b0;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.feed-card h2 {
  font-family: var(--heading-font);
  font-size: 1.75rem;
  line-height: 2.15rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.feed-card.is-featured h2 {
  font-size: 2rem;
  line-height: 2.5rem;
  margin-bottom: 1rem;
}

.feed-card h2 a {
  color: #e2e2e2 !important;
  text-decoration: none !important;
}

.feed-card:hover h2 a { color: var(--primary-container) !important; }

.feed-card p {
  color: #b0b0b0;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card.is-featured p { -webkit-line-clamp: 3; }

.feed-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: #b0b0b0;
  font-size: 0.9rem;
  margin: -0.35rem 0 1rem;
}

.feed-meta-line i { margin-right: 0.3rem; color: var(--tertiary); }

.feed-cta {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary-container) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none !important;
}

.feed-cta:hover { color: var(--primary) !important; }

.feed-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
}

.feed-author img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--gold-soft);
}

.feed-card:not(.is-featured) .feed-author img {
  width: 2rem;
  height: 2rem;
  border-width: 1px;
  border-color: rgba(18, 199, 201, 0.5);
}

.feed-posted {
  font-size: 0.8rem;
  font-weight: 500;
  color: #e2e2e2;
}

.feed-author-name {
  color: var(--gold-soft);
  font-size: 1.05rem;
}

.feed-card:not(.is-featured) .feed-author-name {
  color: #e2e2e2;
  font-size: 0.875rem;
  font-weight: 500;
}

/* --------------------------------------------------------------
   Category notice / article views
-------------------------------------------------------------- */
.nv-back-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(215, 232, 234, 0.7) !important;
  text-decoration: none !important;
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nv-back-inline:hover { color: var(--tertiary) !important; }

.nv-page { padding: 3rem 1.25rem 5rem; }
.nv-wrap { max-width: 48rem; margin: 0 auto; }
.nv-page h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.2;
  font-weight: 500;
  color: #e2e2e2;
  margin: 0.85rem 0 0.75rem;
}
.nv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  color: #b0b0b0;
  margin-bottom: 1.75rem;
}
.nv-meta a { color: var(--gold-soft) !important; }
.nv-hero-img {
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.75rem;
  border: 1px solid #36393e;
}
.nv-hero-img img,
.nv-hero-img iframe {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
}
.nv-hero-img.is-wide { max-width: none; }
.nv-copy { color: #d7e8ea; font-size: 1.15rem; line-height: 1.75; }
.nv-copy p { margin-bottom: 1.1rem; }
.nv-rich img { max-width: 100%; height: auto; border-radius: 0.5rem; }
.nv-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.nv-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 0.6rem;
}
.nv-honoree {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.2rem;
  background: var(--panel-elevated);
  border: 1px solid rgba(18, 199, 201, 0.25);
  border-radius: 0.75rem;
}
.nv-honoree img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--primary-container);
}
.nv-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(119, 222, 232, 0.7);
  margin: 0 0 0.2rem;
}
.nv-actions { margin: 1.5rem 0; }
.nv-manage { display: flex; gap: 1rem; margin: 1.5rem 0; }
.nv-manage a { color: var(--outline) !important; }
.nv-more { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(119, 222, 232, 0.15); }
.nv-more h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.nv-more a {
  display: block;
  color: var(--mist-text) !important;
  text-decoration: none !important;
  padding: 0.45rem 0;
}
.nv-more a:hover { color: var(--primary-container) !important; }
.nv-couple { color: var(--gold-soft); font-size: 1.25rem; margin: 0 0 0.5rem; }

.nv-achieve { background-image: radial-gradient(circle at 50% 0%, rgba(18, 199, 201, 0.12), transparent 55%); }
.nv-achieve h1 { color: var(--primary-container); }
.nv-marry { background-image: radial-gradient(circle at 50% 0%, rgba(240, 197, 109, 0.1), transparent 55%); }
.nv-marry h1 { color: var(--gold-soft); }

.ach-view {
  position: relative;
  padding: 3rem 1.25rem 5rem;
  overflow: hidden;
}
@media (min-width: 992px) {
  .ach-view { padding: 4rem 4rem 6rem; }
}
.ach-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(10, 143, 152, 0.08) 0%, rgba(5, 8, 12, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
.ach-inner {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin: 0 auto;
}
.ach-top { margin-bottom: 2.5rem; }
.ach-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary) !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.ach-back:hover { color: var(--tertiary) !important; }
.ach-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.ach-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(119, 222, 232, 0.1);
  border: 1px solid rgba(119, 222, 232, 0.3);
  color: var(--tertiary);
  font-size: 0.875rem;
  font-weight: 500;
}
.ach-posted { color: rgba(215, 232, 234, 0.7); font-size: 0.875rem; }
.ach-hero {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .ach-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
}
.ach-portrait {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(119, 222, 232, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
@media (min-width: 768px) {
  .ach-portrait { width: 41.666%; max-width: 28rem; }
}
.ach-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ach-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #05080C, transparent);
  opacity: 0.8;
  pointer-events: none;
}
.ach-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
}
@media (min-width: 768px) {
  .ach-content { padding-top: 2.5rem; }
}
.ach-head {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(119, 222, 232, 0.2);
}
.ach-head h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--mist-light);
  margin: 0;
}
.ach-name {
  color: var(--gold-soft);
  text-shadow: 0 0 10px rgba(240, 197, 109, 0.4);
}
.ach-chip {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  width: fit-content;
  padding: 0.7rem 1.4rem 0.7rem 0.7rem;
  border-radius: 999px;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ach-chip:hover {
  border-color: var(--primary);
  background: var(--panel-elevated);
}
.ach-chip-photo {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(240, 197, 109, 0.5);
  flex-shrink: 0;
}
.ach-chip:hover .ach-chip-photo { border-color: var(--gold-soft); }
.ach-chip-photo img { width: 100%; height: 100%; object-fit: cover; }
.ach-chip-copy { display: flex; flex-direction: column; }
.ach-chip-copy strong {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mist-light);
}
.ach-chip:hover .ach-chip-copy strong { color: var(--primary); }
.ach-chip-copy em {
  font-style: normal;
  font-size: 0.875rem;
  color: rgba(215, 232, 234, 0.7);
}
.ach-chip i { color: rgba(119, 222, 232, 0.5); margin-left: 0.25rem; }
.ach-chip:hover i { color: var(--primary); }
.ach-story {
  position: relative;
  overflow: hidden;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.ach-mark {
  position: absolute;
  right: -0.4rem;
  bottom: -0.6rem;
  font-size: 11rem;
  color: rgba(119, 222, 232, 0.06);
  pointer-events: none;
  line-height: 1;
}
.ach-story h2 {
  position: relative;
  z-index: 1;
  font-size: 1.75rem;
  color: var(--tertiary);
  margin: 0 0 1.25rem;
}
.ach-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--mist-text);
}
.ach-story blockquote {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 2px solid var(--gold-soft);
}
.ach-story blockquote p {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  line-height: 1.5;
  font-style: italic;
  color: rgba(240, 197, 109, 0.9);
  margin: 0;
}
.ach-story blockquote footer {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(215, 232, 234, 0.6);
}
.ach-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
}
.ach-congrats {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--abyss-deep) !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  box-shadow: 0 0 15px rgba(240, 197, 109, 0.3);
}
.ach-congrats:hover {
  background: #ffddae;
  color: var(--abyss-deep) !important;
  box-shadow: 0 0 25px rgba(240, 197, 109, 0.5);
}
.ach-share {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--tertiary);
  color: var(--tertiary);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ach-share:hover { background: rgba(119, 222, 232, 0.1); }

.nv-comments { margin-top: 3rem; }
.nv-comments h3 { margin-bottom: 1.25rem; }
.nv-comment {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  color: var(--mist-text);
}
.nv-comment img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  object-fit: cover;
}
.nv-comment time { display: block; font-size: 0.8rem; color: #859393; }
.nv-comment.is-reply { margin: 0.75rem 0 0 1rem; }
.nv-reply textarea {
  width: 100%;
  min-height: 7rem;
  background: var(--abyss-light);
  color: var(--mist-text);
  border: 1px solid rgba(119, 222, 232, 0.2);
  border-radius: 0.5rem;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem;
}

/* Obituary memorial */
.nv-obit {
  position: relative;
  min-height: 100vh;
  padding-bottom: 4rem;
}
.nv-obit-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, rgba(119, 222, 232, 0.08), transparent 55%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
.nv-mini-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: rgba(5, 8, 12, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(119, 222, 232, 0.1);
}
@media (min-width: 768px) {
  .nv-mini-head { padding: 1.5rem 4rem; }
}
.nv-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(215, 232, 234, 0.7) !important;
  text-decoration: none !important;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.nv-back:hover { color: var(--tertiary) !important; }
.nv-wordmark {
  line-height: 0;
}
.nv-wordmark img {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.nv-obit-inner {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
}
.nv-obit-hero { text-align: center; margin-bottom: 3.5rem; }
.nv-frame {
  width: 14rem;
  height: 18rem;
  margin: 0 auto 2.5rem;
  padding: 0.4rem;
  border-radius: 999px 999px 0.75rem 0.75rem;
  border: 1px solid rgba(240, 197, 109, 0.6);
  background: var(--panel-base);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
@media (min-width: 768px) {
  .nv-frame { width: 18rem; height: 24rem; }
}
.nv-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px 999px 0.5rem 0.5rem;
  filter: grayscale(1);
  opacity: 0.9;
  transition: transform 1s ease, opacity 1s ease;
}
.nv-frame:hover img { transform: scale(1.05); opacity: 1; }
.nv-obit-hero h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--mist-text);
  opacity: 0.9;
  margin: 0 0 0.75rem;
}
.nv-obit-hero h2 {
  font-family: var(--heading-font);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  color: var(--gold-soft);
  margin: 0 0 2rem;
}
.nv-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.nv-chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: #1c2024;
  border: 1px solid rgba(119, 222, 232, 0.2);
  color: var(--mist-light);
  font-size: 0.875rem;
}
.nv-obit-copy {
  max-width: 48rem;
  margin: 0 auto 4rem;
  text-align: center;
}
.nv-obit-copy p {
  font-family: var(--heading-font);
  font-size: 1.65rem;
  line-height: 2.2rem;
  color: rgba(215, 232, 234, 0.88);
  margin-bottom: 1.75rem;
}
.nv-obit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .nv-obit-grid { grid-template-columns: 2fr 1fr; }
}
.nv-panel {
  background: rgba(24, 38, 49, 0.5);
  border: 1px solid rgba(119, 222, 232, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  position: relative;
}
.nv-family::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold-soft), transparent);
  opacity: 0.5;
}
.nv-panel h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}
.nv-panel h3 i { color: var(--gold-soft); }
.nv-rites h3 i { color: var(--tertiary); }
.nv-emph {
  font-size: 1.15rem;
  color: var(--mist-light);
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}
.nv-split { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(119, 222, 232, 0.1); }
.nv-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
@media (min-width: 640px) {
  .nv-panel ul { grid-template-columns: 1fr 1fr; }
}
.nv-panel li { display: flex; align-items: center; gap: 0.6rem; }
.nv-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(119, 222, 232, 0.5);
  flex-shrink: 0;
}
.nv-obit-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}
.nv-obit-links a { color: var(--primary) !important; }

/* --------------------------------------------------------------
   Member dashboard
-------------------------------------------------------------- */
.dash-heritage {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
@media (min-width: 768px) {
  .dash-heritage {
    padding: 1.5rem 2rem 5rem;
  }
}
.dash-side {
  width: 100%;
  flex-shrink: 0;
}
.dash-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem;
  box-shadow: 0 4px 30px rgba(74, 227, 229, 0.1);
}
.dash-heritage .dash-tab.nav-link {
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 0.4rem;
  color: var(--mist-text);
}
.dash-tab {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  color: var(--mist-text) !important;
  text-decoration: none !important;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
}
.dash-tab i { font-size: 1.15rem; }
.dash-tab:hover { background: var(--abyss-light); color: var(--tertiary) !important; }
.dash-tab.active,
.dash-tab.show,
.dash-heritage .dash-tab.nav-link.active,
.dash-heritage .dash-tab.nav-link.show {
  background: rgba(18, 199, 201, 0.1);
  color: var(--primary) !important;
  border-left-color: transparent;
  border-bottom-color: var(--primary);
}
.dash-tab-last {
  margin-left: auto;
  border-top: 0;
}
.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.dash-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 30px rgba(74, 227, 229, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2377dee8' fill-opacity='0.03'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}
@media (min-width: 768px) {
  .dash-hero { flex-direction: row; align-items: flex-start; text-align: left; }
}
.dash-avatar { position: relative; flex-shrink: 0; }
.dash-avatar img {
  width: 8rem;
  height: 8rem;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid var(--gold-soft);
  box-shadow: 0 0 20px rgba(240, 197, 109, 0.2);
}
@media (min-width: 768px) {
  .dash-avatar img { width: 10rem; height: 10rem; }
}
.dash-verified {
  position: absolute;
  right: 0.4rem;
  bottom: 0.2rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--abyss-deep);
  border-radius: 999px;
  border: 2px solid var(--panel-base);
  font-size: 0.8rem;
}
.dash-hero-copy { text-align: center; flex: 1; }
@media (min-width: 768px) { .dash-hero-copy { text-align: left; } }
.dash-hero-copy h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--mist-light);
  margin: 0 0 0.6rem;
}
.dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .dash-chips { justify-content: flex-start; } }
.dash-chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--abyss-deep);
  border: 1px solid rgba(119, 222, 232, 0.2);
  color: var(--tertiary);
  font-size: 0.85rem;
}
.dash-hero-copy p {
  max-width: 40rem;
  margin: 0 auto 1.25rem;
  color: rgba(215, 232, 234, 0.8);
}
@media (min-width: 768px) { .dash-hero-copy p { margin-left: 0; } }
.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}
@media (min-width: 768px) { .dash-hero-actions { justify-content: flex-start; } }
.dash-btn-primary,
.dash-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none !important;
}
.dash-btn-primary {
  background: var(--primary);
  color: #003737 !important;
  box-shadow: 0 0 15px rgba(74, 227, 229, 0.3);
}
.dash-btn-primary:hover { background: var(--primary-container); color: #003737 !important; }
.dash-btn-ghost {
  background: transparent;
  border: 1.5px solid var(--tertiary);
  color: var(--tertiary) !important;
}
.dash-btn-ghost:hover { background: rgba(119, 222, 232, 0.1); }

.profile-public.dash-heritage {
  flex-direction: column;
}
@media (min-width: 992px) {
  .profile-public.dash-heritage {
    flex-direction: row;
    align-items: flex-start;
  }
  .profile-public .profile-side {
    width: 18.5rem;
    flex-shrink: 0;
    position: sticky;
    top: 6rem;
  }
}
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}
.profile-side-card {
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 4px 30px rgba(74, 227, 229, 0.08);
}
.profile-side-card h3 {
  font-size: 1.05rem;
  color: var(--gold-soft);
  letter-spacing: 0.06em;
  margin: 0 0 0.9rem;
}
.profile-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-side-list li + li {
  margin-top: 0.35rem;
}
.profile-side-list a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.45rem;
  border-radius: 0.5rem;
  text-decoration: none !important;
  color: var(--mist-text);
}
.profile-side-list a:hover {
  background: rgba(74, 227, 229, 0.08);
}
.profile-side-list img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid rgba(240, 197, 109, 0.45);
  background: var(--abyss-deep);
  flex-shrink: 0;
}
.profile-side-list span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.profile-side-list strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mist-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-side-list em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}
.profile-side-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--on-surface-variant);
}
.profile-side-more {
  display: inline-flex;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary) !important;
  text-decoration: none !important;
}
.profile-side-more:hover { color: var(--tertiary) !important; }
.profile-deceased {
  background: var(--gold-soft) !important;
  color: var(--abyss-deep) !important;
}
.profile-stat-place {
  font-size: 1.35rem !important;
  line-height: 1.3;
  word-break: break-word;
}
.profile-panel {
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 1.75rem 2rem;
}
.profile-panel h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.75rem;
  color: var(--mist-light);
  margin: 0 0 1.25rem;
}
.profile-panel h2 i { color: var(--gold-soft); }
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem 1.5rem;
}
@media (min-width: 640px) {
  .profile-info-grid { grid-template-columns: 1fr 1fr; }
}
.profile-info-item.is-full { grid-column: 1 / -1; }
.profile-info-item label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.25rem;
}
.profile-info-item p {
  margin: 0;
  color: var(--mist-text);
  font-weight: 500;
  word-break: break-word;
}
.profile-info-item a { color: var(--primary); }
.profile-empty {
  margin: 0;
  color: var(--on-surface-variant);
}
.profile-family-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(119, 222, 232, 0.12);
  align-items: start;
}
.profile-family-row:last-child { border-bottom: 0; padding-bottom: 0; }
.profile-family-row .role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--on-surface-variant);
  padding-top: 0.25rem;
}
.profile-public .family-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.profile-public .family-chips a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--abyss-deep);
  border: 1px solid rgba(119, 222, 232, 0.28);
  color: var(--mist-text);
  font-size: 0.875rem;
  text-decoration: none;
}
.profile-public .family-chips a:hover {
  background: rgba(74, 227, 229, 0.12);
  color: var(--primary);
  border-color: var(--primary);
}
.profile-public .family-chips .empty {
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}
.dash-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
}
.dash-stat {
  background: var(--panel-elevated);
  border: 1px solid rgba(119, 222, 232, 0.2);
  border-radius: 0.75rem;
  padding: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2377dee8' fill-opacity='0.03'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}
.dash-stat:hover { border-color: rgba(119, 222, 232, 0.5); }
.dash-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.dash-stat-top i { font-size: 1.7rem; }
.dash-stat-top span {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(215, 232, 234, 0.5);
}
.dash-stat-num {
  font-family: var(--heading-font);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--mist-light);
}
.dash-stat-label { color: var(--tertiary); font-weight: 600; margin-top: 0.4rem; }
.text-gold { color: var(--gold-soft) !important; }
.text-teal { color: var(--primary) !important; }
.dash-chronicles {
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 1.75rem 2rem;
}
.dash-chronicles h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.75rem;
  color: var(--mist-light);
  margin-bottom: 1rem;
}
.dash-chronicles h2 i { color: var(--gold-soft); }
.dash-chronicles ul { list-style: none; margin: 0; padding: 0; }
.dash-chronicles li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(119, 222, 232, 0.1);
}
.dash-chronicles li:last-child { border-bottom: 0; }
.dash-when { font-size: 0.8rem; color: rgba(215, 232, 234, 0.5); }
.dash-panels .profile-content,
.dash-panels .users.form.content {
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  min-height: 12rem;
  color: var(--mist-text);
}
.dash-panels .dashboard-panel-title,
.dash-heritage .form-label,
.dash-heritage label {
  color: var(--mist-text);
}
.dash-heritage .table {
  color: var(--mist-text);
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-color: var(--mist-text);
}
.dash-heritage .form-control,
.dash-heritage .form-select {
  background: var(--abyss-light);
  color: var(--mist-text);
  border-color: rgba(119, 222, 232, 0.25);
}
.dash-heritage .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #003737;
}
.dash-heritage .btn-outline-secondary {
  border-color: var(--tertiary);
  color: var(--tertiary);
}

/* --------------------------------------------------------------
   Inner pages: forms, contact, FAQ, events, trees
-------------------------------------------------------------- */
.form-control:focus,
.form-select:focus,
.custom-select:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(74, 227, 229, 0.18);
}

.form-check-input {
  background-color: var(--panel-elevated);
  border-color: rgba(74, 227, 229, 0.4);
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.input-group-text,
.input-group-prepend .custom-select,
.input-group-prepend .input-group-text {
  background: var(--panel-elevated) !important;
  color: var(--mist-text) !important;
  border-color: rgba(74, 227, 229, 0.22) !important;
}

div.form.content {
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  color: var(--mist-text);
  margin-bottom: 2.5rem;
}
.dash-panels div.form.content {
  margin-bottom: 0;
}

fieldset { border: 0; padding: 0; margin: 0; }
legend {
  color: var(--mist-text);
  font-family: var(--heading-font);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.article-composer .composer-card,
.notice-form-card {
  background: var(--panel-base) !important;
  border: 1px solid rgba(119, 222, 232, 0.3) !important;
  color: var(--mist-text);
}

.article-composer .composer-intro,
.notice-form-card .help,
.composer-help-body ul {
  color: var(--on-surface-variant) !important;
}

.composer-steps li,
.composer-help,
.video-row {
  background: var(--panel-elevated) !important;
  border-color: rgba(119, 222, 232, 0.22) !important;
  color: var(--mist-text) !important;
}

.composer-steps strong {
  color: var(--gold-soft) !important;
}

.person-results {
  background: var(--panel-elevated) !important;
  border-color: rgba(119, 222, 232, 0.22) !important;
}
.person-results button {
  background: transparent !important;
  color: var(--mist-text) !important;
}
.person-results button:hover {
  background: rgba(74, 227, 229, 0.12) !important;
}
.selected-person {
  background: rgba(74, 227, 229, 0.1) !important;
  border-color: rgba(74, 227, 229, 0.28) !important;
  color: var(--mist-text) !important;
}

.tox-tinymce {
  border: 1px solid rgba(74, 227, 229, 0.22) !important;
  border-radius: 12px !important;
}
.tox .tox-edit-area__iframe {
  background: #0B1218 !important;
}

#src_result,
#src_user_result {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--mist-text);
}
#src_result p,
#src_user_result p {
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  margin: 0;
  border-bottom: 1px solid rgba(119, 222, 232, 0.12);
}
#src_result p:hover,
#src_user_result p:hover {
  background: rgba(74, 227, 229, 0.1);
}

.contact .info-wrap {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  box-shadow: none;
}
.contact .info {
  background: transparent !important;
}
.contact .info i {
  background: rgba(74, 227, 229, 0.12) !important;
  color: var(--primary) !important;
}
.contact .info:hover i {
  background: var(--primary) !important;
  color: var(--abyss-deep) !important;
}
.contact .info h4 {
  color: var(--mist-text) !important;
}
.contact .info p {
  color: var(--on-surface-variant) !important;
}
.contact .php-email-form {
  background: var(--panel-base) !important;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  box-shadow: none;
  padding: 1.5rem;
}

.about-us .content .icon-box i { color: var(--primary); }
.about-us .content .icon-box p { color: var(--on-surface-variant); }

#faq.cta,
section.cta {
  background: transparent;
  color: var(--mist-text);
}
.accordion .card {
  background: var(--panel-base);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.accordion .card-header {
  background: var(--panel-elevated);
  border-bottom: 1px solid var(--card-border);
}
.accordion .btn-link,
.accordion .btn-link:hover,
.accordion .btn-link:focus {
  color: var(--mist-text);
  text-decoration: none;
  font-weight: 600;
  text-align: left;
  white-space: normal;
}
.accordion .btn-link:hover,
.accordion .btn-link:focus {
  color: var(--primary);
}
.accordion .card-body {
  color: var(--on-surface-variant);
}

.event .event-sidebar .sidebar-widget h3 {
  border-bottom-color: var(--card-border);
}
.event .event-sidebar .related-events .related-event-item .related-event-info h4 a {
  color: var(--mist-text);
}
.event .event-sidebar .related-events .related-event-date {
  background: var(--panel-elevated);
  color: var(--primary);
}

.map-toolbar,
.map-panel,
.tree-toolbar,
.tree-shell {
  background: var(--panel-base) !important;
  color: var(--mist-text);
}
#mynetwork,
.map-stage {
  background: var(--abyss-light) !important;
}
.vis-navigation .vis-button {
  background-color: var(--panel-base) !important;
  border: 1px solid var(--card-border);
}

.tree li > span {
  background: var(--panel-elevated) !important;
  border-color: rgba(119, 222, 232, 0.28) !important;
  color: var(--mist-text) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.tree li > span a { color: var(--mist-text); }
.tree li > span.srchdusr {
  background: rgba(74, 227, 229, 0.16) !important;
  border-color: var(--primary) !important;
}
.tree li > span:hover,
.tree li > span:hover + ul li > span {
  background: rgba(74, 227, 229, 0.12) !important;
  border-color: var(--primary) !important;
}
.tree li::before,
.tree li::after,
.tree ul ul::before,
.tree li:last-child::before {
  border-color: rgba(119, 222, 232, 0.28) !important;
}

.member-card {
  background: var(--panel-base) !important;
  border-color: rgba(119, 222, 232, 0.3) !important;
}

.table {
  --bs-table-color: var(--mist-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(119, 222, 232, 0.18);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(74, 227, 229, 0.06);
}

.side-nav {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.side-nav a { color: var(--primary); }

.blog .entry,
.blog .entry-single {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--mist-text);
}
.blog .entry .entry-title a,
.blog .entry .entry-title a:hover {
  color: var(--mist-text);
}
.blog .sidebar .sidebar-title {
  color: var(--gold-soft);
  font-family: var(--heading-font);
}

.index.content,
.view.content:not(section) {
  background: var(--panel-base);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  color: var(--mist-text);
  margin-bottom: 2.5rem;
}
a.button,
.button {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--abyss-deep) !important;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

/* --------------------------------------------------------------
   Compose forms (article add/edit)
-------------------------------------------------------------- */
.compose-heritage {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 3rem 1.25rem 5rem;
}

.compose-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.compose-orbs::before,
.compose-orbs::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(100px);
  mix-blend-mode: screen;
}

.compose-orbs::before {
  width: 24rem;
  height: 24rem;
  top: 12%;
  left: 18%;
  background: rgba(74, 227, 229, 0.12);
}

.compose-orbs::after {
  width: 28rem;
  height: 28rem;
  bottom: 8%;
  right: 10%;
  background: rgba(89, 194, 203, 0.1);
}

.compose-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
}

.compose-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.compose-intro h1 {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  font-weight: 500;
  color: var(--mist-light);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.compose-intro p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: rgba(215, 232, 234, 0.8);
  max-width: 36rem;
  margin: 0 auto;
}

.compose-panel {
  position: relative;
  background: var(--panel-base);
  border: 1px solid rgba(119, 222, 232, 0.3);
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

@media (min-width: 640px) {
  .compose-panel { padding: 2rem; }
}

.compose-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--tertiary), var(--primary));
  opacity: 0.85;
}

.compose-fields {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.compose-field { width: 100%; position: relative; }

.compose-label {
  display: block;
  font-family: var(--nav-font);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--gold-soft);
  margin: 0 0 0.5rem;
}

.compose-heritage .compose-control,
.compose-heritage .compose-control.form-control,
.compose-heritage .compose-control.form-select,
.compose-heritage select.compose-control,
.compose-heritage textarea.compose-control,
.compose-heritage input.compose-control {
  width: 100%;
  background: var(--abyss-light) !important;
  color: var(--mist-light) !important;
  border: 0 !important;
  border-bottom: 2px solid #0A8F98 !important;
  border-radius: 0 !important;
  padding: 1rem !important;
  font-size: 1.15rem;
  line-height: 1.6;
  box-shadow: none !important;
}

.compose-heritage .compose-control::placeholder {
  color: rgba(215, 232, 234, 0.3);
}

.compose-heritage .compose-control:focus {
  border-bottom-color: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(74, 227, 229, 0.15) !important;
  outline: none;
}

.compose-heritage .compose-control:disabled {
  opacity: 0.45;
}

.compose-select { position: relative; }

.compose-select .compose-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3rem !important;
  cursor: pointer;
}

.compose-select i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tertiary);
  pointer-events: none;
  font-size: 1.15rem;
}

.compose-select option {
  background: var(--abyss-light);
  color: var(--mist-text);
}

.compose-hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

.compose-heritage .error-message {
  color: #ffb4ab;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.compose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .compose-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.compose-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 68px;
  width: 100%;
  border: 2px dashed rgba(119, 222, 232, 0.3);
  border-radius: 0.5rem;
  cursor: pointer;
  color: rgba(215, 232, 234, 0.7);
  padding: 0.75rem 1rem;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.compose-upload i { font-size: 1.5rem; }

.compose-upload:hover,
.compose-upload.is-over {
  background: rgba(119, 222, 232, 0.05);
  border-color: rgba(119, 222, 232, 0.6);
  color: var(--mist-light);
}

.compose-heritage .compose-file,
.compose-heritage input[type="file"].compose-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.compose-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 68px;
  color: var(--mist-text);
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}

.compose-help {
  border: 1px solid rgba(119, 222, 232, 0.22);
  border-radius: 0.5rem;
  background: var(--panel-elevated);
  color: var(--mist-text);
}

.compose-help summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--mist-text);
}

.compose-help summary::-webkit-details-marker { display: none; }

.compose-help summary::after {
  content: "+";
  float: right;
  color: var(--gold-soft);
}

.compose-help[open] summary::after { content: "–"; }

.compose-help ul {
  margin: 0;
  padding: 0 1.25rem 1rem 2rem;
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  line-height: 1.55;
}

.compose-help li + li { margin-top: 0.35rem; }

.compose-heritage .tox-tinymce {
  border: 0 !important;
  border-bottom: 2px solid #0A8F98 !important;
  border-radius: 0 !important;
}

.compose-heritage .tox .tox-edit-area__iframe {
  background: #0B1218 !important;
}

.compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(119, 222, 232, 0.1);
}

.compose-btn-primary,
.compose-heritage button.compose-btn-primary {
  background: var(--primary) !important;
  color: #003737 !important;
  border: 0 !important;
  border-radius: 999px;
  padding: 1rem 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  min-width: 10rem;
  transition: background 0.2s, box-shadow 0.2s;
}

.compose-btn-primary:hover,
.compose-heritage button.compose-btn-primary:hover {
  background: #63f7f9 !important;
  box-shadow: 0 0 15px rgba(74, 227, 229, 0.4);
  color: #003737 !important;
}

.compose-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--tertiary) !important;
  border: 1.5px solid var(--tertiary);
  border-radius: 999px;
  padding: 1rem 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  min-width: 10rem;
  text-decoration: none !important;
  transition: background 0.2s;
}

.compose-btn-ghost:hover {
  background: rgba(119, 222, 232, 0.1);
  color: var(--tertiary) !important;
}

@media (max-width: 575.98px) {
  .compose-actions { flex-direction: column-reverse; }
  .compose-btn-primary,
  .compose-btn-ghost { width: 100%; }
}
