:root {
  /* Design reference background */
  --tc-bg: #050a14;
  --tc-bg-deep: #02060d;
  --tc-header-bg: rgba(6, 11, 20, 0.94);
  --tc-panel: rgba(5, 12, 22, 0.82);
  --tc-panel-strong: rgba(3, 8, 16, 0.94);
  --tc-gold: #D4AF37;
  --tc-gold-bright: #F7D774;
  --tc-gold-deep: #B8860B;
  --tc-cream: #EDE7D8;
  --tc-muted: rgba(237, 231, 216, 0.68);
  --tc-line: rgba(212, 175, 55, 0.38);
  --tc-glow: 0 0 24px rgba(212, 175, 55, 0.28);
  --tc-radius-lg: 22px;
  --tc-radius-md: 14px;
  --tc-font-heading: Georgia, "Times New Roman", serif;
  --tc-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Measured at runtime (site.js) so fixed content can dock to the footer top. */
  --tc-footer-h: 0px;
}

/* Footer fixed to the bottom of the viewport, mirroring the sticky top header.
   Body reserves equal space so page content never hides behind it. */
.tc-site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
}

body {
  padding-bottom: var(--tc-footer-h, 0px);
}

.tc-glass-panel {
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.9), rgba(4, 10, 18, 0.82));
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
}

/* Shared page header — left-aligned, sits above the content grid (never inside a
   glass panel). Mirrors the Events page hero so every page reads the same. */
/* Soft gold ambiance behind page content — a subtle glow at the top-center
   of the main column, used site-wide (modeled on the Events page). */
.tc-page-shell {
  background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.05), transparent 55%);
}

/* Standard left/right sidebar section label — used site-wide for consistency
   (modeled on the Marketplace "Categories" / "This week" labels). */
.tc-side-title {
  margin: 0 0 0.75rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
}

.tc-side-title--spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tc-page-hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.875rem, 2.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: #d4af37;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.35), 0 0 30px rgba(212, 175, 55, 0.18);
}

.tc-page-hero-sub {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #94a3b8;
  max-width: 36rem;
}

/* Brand lockup — tower-connect-logo.png (287×100) */
.tc-brand-lockup {
  line-height: 0;
  max-width: min(100%, 18rem);
}

.tc-brand-lockup-img {
  display: block;
  width: auto;
  height: var(--tc-brand-lockup-h, 3.25rem);
  max-width: 100%;
  aspect-ratio: 287 / 100;
}

.tc-site-bg {
  background-color: var(--tc-bg);
  color: #e2e8f0;
}

.tc-brand-lockup--sm {
  --tc-brand-lockup-h: 2.5rem;
  max-width: min(100%, 11rem);
}

@media (min-width: 640px) {
  .tc-brand-lockup--sm {
    --tc-brand-lockup-h: 2.75rem;
    max-width: min(100%, 12rem);
  }
}

.tc-brand-lockup--md {
  --tc-brand-lockup-h: 3rem;
  max-width: min(100%, 13.5rem);
}

@media (min-width: 640px) {
  .tc-brand-lockup--md {
    --tc-brand-lockup-h: 3.375rem;
    max-width: min(100%, 15rem);
  }
}

.tc-brand-lockup--lg {
  --tc-brand-lockup-h: 3.25rem;
  max-width: min(100%, 14.5rem);
}

@media (min-width: 640px) {
  .tc-brand-lockup--lg {
    --tc-brand-lockup-h: 3.75rem;
    max-width: min(100%, 17rem);
  }
}

@media (min-width: 1024px) {
  .tc-brand-lockup--lg {
    --tc-brand-lockup-h: 4.375rem;
    max-width: min(100%, 19.5rem);
  }
}

.tc-brand-lockup:hover .tc-brand-lockup-img {
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.28));
}

/* SVG pack icons use currentColor — mask + gradient for visible gold on dark UI */
.tc-icon,
.tc-icon-dark {
  display: inline-block;
  flex-shrink: 0;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.tc-icon {
  background: linear-gradient(180deg, var(--tc-gold-bright) 0%, var(--tc-gold) 50%, var(--tc-gold-deep) 100%);
}

.tc-icon-dark {
  background: var(--tc-bg);
}

.tc-feature-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--tc-line);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 20px rgba(212, 175, 55, 0.1);
}

.tc-feature-icon-wrap .tc-icon {
  width: 3.5rem;
  height: 3.5rem;
  -webkit-mask-size: 88%;
  mask-size: 88%;
}

.tc-feature-card {
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.92), rgba(4, 10, 18, 0.86));
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius-lg);
}

/* "Coming soon" badge */
.tc-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  vertical-align: middle;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.12);
  color: #e8c96b;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.tc-soon-badge--nav {
  margin-left: 0.35rem;
  padding: 0.02rem 0.35rem;
  font-size: 0.5625rem;
}

/* Coming-soon notice block (e.g. locked donation panel) */
.tc-soon-notice {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--tc-radius-lg, 14px);
  background: rgba(212, 175, 55, 0.06);
  text-align: center;
}

.tc-soon-notice__title {
  font-weight: 700;
  color: #e8c96b;
}

.tc-soon-notice__text {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
}

/* Honeypot field for public contact form — hidden from humans, catches bots. */
.tc-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Header account menu (avatar + name → dropdown) */
.tc-account-menu {
  position: relative;
}

.tc-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 220px;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tc-account-trigger:hover {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.18);
}

.tc-account-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.tc-account-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e8c96b;
  background: rgba(212, 175, 55, 0.12);
}

.tc-account-trigger__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}

.tc-account-trigger__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.tc-account-trigger__unit {
  font-size: 0.7rem;
  color: #64748b;
}

.tc-account-trigger__chev {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
}

.tc-account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 60;
  min-width: 12rem;
  padding: 0.4rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  background: #050b16;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.tc-account-dropdown[hidden] {
  display: none;
}

.tc-account-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tc-account-item:hover {
  background: rgba(212, 175, 55, 0.1);
  color: #e8c96b;
}

.tc-account-item .tc-icon {
  background-color: currentColor;
}

/* ===== Global "Message the Admin" modal ================================== */
.tc-msg-modal {
  position: fixed;
  inset: 0;
  /* Above every other modal (welcome/dash = 80, event = 80) and the header. */
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tc-msg-modal[hidden] {
  display: none !important;
}

.tc-msg-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.88);
  backdrop-filter: blur(4px);
}

.tc-msg-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.tc-msg-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: transparent;
  color: #e8c547;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.tc-msg-modal__close:hover {
  background: rgba(212, 175, 55, 0.1);
}

.tc-msg-modal__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e8c547;
}

.tc-msg-modal__hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.tc-msg-modal__form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tc-msg-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.tc-msg-input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: #02060d;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.tc-msg-input:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.6);
}

.tc-msg-modal__status {
  margin: 0;
  font-size: 0.8rem;
}

.tc-msg-modal__status.is-ok {
  color: #4ade80;
}

.tc-msg-modal__status.is-err {
  color: #fca5a5;
}

.tc-msg-modal__send {
  border-radius: 0.5rem;
  background: linear-gradient(to right, #e8c547, #d4af37, #9a7b1e);
  padding: 0.6rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #050a14;
  cursor: pointer;
}

.tc-msg-modal__send:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== Site-wide flash banner ===========================================
   Pinned to the bottom edge of the sticky header: flat top, no top border or
   top radius, centered and sized to its text. Matches the admin notice. */
.tc-flash-banner {
  position: fixed;
  top: var(--tc-header-h, 60px);
  left: 50%;
  z-index: 55;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.6rem 1.1rem;
  border: 1px solid transparent;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.tc-flash-banner.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.tc-flash-banner--success {
  background: rgba(6, 60, 46, 0.97);
  border-color: rgba(16, 185, 129, 0.5);
  color: #d1fae5;
}

.tc-flash-banner--notice {
  background: rgba(66, 50, 8, 0.97);
  border-color: rgba(245, 197, 24, 0.5);
  color: #fef3c7;
}

.tc-flash-banner--error {
  background: rgba(74, 8, 8, 0.97);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fee2e2;
}
