/* QR Inspector palette: emerald, true charcoal, black, white, and neutral gray.
   These late-loading tokens also normalize older page-specific color rules. */
:root {
  --brand: #10b981;
  --brand-strong: #059669;
  --brand-deep: #047857;
  --accent-purple: var(--brand);
  --accent-purple-strong: var(--brand-strong);
  --accent-purple-deep: var(--brand-deep);
  --bg: #f6f7f6;
  --surface: #ffffff;
  --surface-muted: #f6f7f6;
  --surface-soft: #eef0ef;
  --text: #171a18;
  --text-soft: #343936;
  --text-muted: #68706c;
  --border: #d9dedb;
  --border-soft: #e5e8e6;
  --chrome-bg: #171a18;
  --chrome-text: #ffffff;
  --chrome-text-muted: #c9cecb;
  --landing-hero-bg: #171a18;
  --landing-hero-text: #ffffff;
  --info-bg: #eef0ef;
  --info-text: #343936;
  --info-border: #cdd3cf;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #34d399;
    --brand-strong: #10b981;
    --brand-deep: #059669;
    --bg: #101311;
    --surface: #1a1e1b;
    --surface-muted: #202521;
    --surface-soft: #272c29;
    --text: #eef2f0;
    --text-soft: #c9d1cd;
    --text-muted: #9aa5a0;
    --border: #3a423e;
    --border-soft: #333b37;
    --chrome-bg: #121513;
    --chrome-text: #ffffff;
    --chrome-text-muted: #c9cecb;
    --landing-hero-bg: #121513;
    --info-bg: #272c29;
    --info-text: #d7ddda;
    --info-border: #4b5550;
  }
}

.alert-info,
body.page-dashboard .action-qr-scan,
body.page-admin-discounts .discount-type.percentage {
  border-color: var(--info-border);
  color: var(--info-text);
  background: var(--info-bg);
}

.code-card.inactive {
  border-left-color: var(--text-muted);
}

body.page-demo .demo-cta {
  background: linear-gradient(
    135deg,
    var(--surface-muted),
    var(--surface-soft)
  );
}

body.page-index .feature-item.special {
  border-color: rgb(16 185 129 / 48%);
  background: rgb(16 185 129 / 22%);
}

@keyframes pulse-special {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(16 185 129 / 38%);
  }

  50% {
    box-shadow: 0 0 0 10px rgb(16 185 129 / 0%);
  }
}

body.page-my-codes .btn-credit:hover {
  background: #ecfdf5;
}

body.page-my-codes .summary-card.has-credits {
  border-color: var(--brand-strong);
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

body.page-admin-all-codes .trial-tag,
body.page-admin-llm-pings .badge-crawler {
  color: #065f46;
  background: #d1fae5;
}

body.page-admin-dashboard .stat-card.users::before {
  background: linear-gradient(135deg, var(--text-soft), var(--chrome-bg));
}

body.page-admin-llm-pings .activity-table th,
body.page-admin-llm-pings .activity-table td,
body.page-admin-trials .activity-table th,
body.page-admin-trials .activity-table td {
  border-bottom-color: var(--border-soft);
}

/* Balanced footer hierarchy: brand/contact plus three scannable link groups. */
.site-footer {
  padding: 3.25rem 0 0;
}

.footer-content {
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(150px, 1fr));
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.footer-brand,
.footer-section {
  text-align: left;
}

.footer-brand h3 {
  margin-bottom: 0.65rem;
}

.footer-brand p {
  max-width: 32ch;
  color: var(--chrome-text-muted);
  line-height: 1.55;
  opacity: 1;
}

.footer-contact-link {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--brand);
  font-weight: 650;
  text-decoration: none;
}

.footer-contact-link:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.footer-section h4 {
  margin: 0 0 0.9rem;
  color: var(--chrome-text);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-section .quick-links,
.footer-section .legal-links {
  gap: 0.4rem;
}

.footer-section .footer-link {
  padding: 0.18rem 0;
}

.footer-section .footer-link:hover {
  transform: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 1136px;
  margin: 2.75rem auto 0;
  padding: 1.35rem 2rem;
}

/* Center the four short service notes as one consistent visual band. */
.trust-grid > div {
  align-content: start;
  justify-items: center;
  text-align: center;
}

.trust-grid span {
  max-width: 26ch;
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand,
  .footer-section {
    text-align: center;
  }

  .footer-brand p {
    margin-inline: auto;
  }

  .footer-section .quick-links,
  .footer-section .legal-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    margin-top: 2.25rem;
  }
}
