/* Legal & compliance pages + site footer + AdSense slots */

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.85rem;
}

.legal-nav a {
  color: var(--muted);
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--primary);
}

.legal-main {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  width: 100%;
}

.legal-article h1 {
  margin: 0 0 24px;
  font-size: 1.75rem;
}

.legal-body h2 {
  margin: 28px 0 12px;
  font-size: 1.15rem;
}

.legal-body p,
.legal-body li {
  line-height: 1.65;
  color: var(--text);
}

.legal-body ul {
  padding-left: 1.25rem;
  margin: 0 0 16px;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.legal-hint {
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-contact-form {
  max-width: 520px;
  margin: 20px 0;
}

.legal-contact-form .field {
  display: block;
  margin-bottom: 14px;
}

.legal-contact-form input,
.legal-contact-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.legal-form-status {
  margin-top: 12px;
  font-size: 0.9rem;
}

.legal-form-status.is-error {
  color: #f87171;
}

.legal-form-status.is-ok {
  color: #4ade80;
}

/* Site footer (landing + legal) */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 20px 32px;
  text-align: center;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.site-footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer-nav a:hover {
  color: var(--primary);
}

.site-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.landing-site-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* AdSense slots */
.ad-slot {
  margin: 20px 0;
  min-height: 90px;
  text-align: center;
  overflow: hidden;
}

.ad-slot-top {
  margin-top: 0;
  margin-bottom: 28px;
}

.ad-slot-mid {
  margin: 32px auto;
  max-width: 728px;
}

.ad-slot:empty {
  min-height: 0;
  margin: 0;
}

/* Cookie consent (AdSense / analytics) */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(15, 20, 25, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.cookie-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent p {
  margin: 0;
  flex: 1;
  min-width: 240px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-consent a {
  color: var(--primary);
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .legal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    flex-direction: column;
  }

  .cookie-consent-actions .btn {
    width: 100%;
  }
}

/* Help centre */
.help-page .legal-main {
  max-width: 1080px;
}

.help-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.82rem;
}

.help-sidebar-heading {
  margin: 16px 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.help-sidebar-heading:first-child {
  margin-top: 0;
}

.help-sidebar ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.help-sidebar li {
  margin: 0;
}

.help-sidebar li.is-active a {
  color: var(--primary);
  font-weight: 600;
}

.help-sidebar a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
}

.help-sidebar a:hover {
  color: var(--primary);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}

.help-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.help-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.help-card-title {
  font-size: 0.95rem;
  color: var(--text);
}

.help-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.help-tier {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.help-tier-premium {
  color: #fbbf24;
}

.help-steps {
  padding-left: 1.35rem;
  margin: 0 0 16px;
}

.help-steps li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.help-faq-item {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--surface);
}

.help-faq-item summary {
  cursor: pointer;
  font-weight: 500;
}

.help-faq-item p {
  margin: 10px 0 0;
  color: var(--muted);
}

.help-related {
  padding-left: 1.25rem;
}

.help-cta {
  margin: 24px 0 8px;
}

.help-figures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0 28px;
}

.help-figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.help-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #0f1419;
}

.help-figure figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  border-top: 1px solid var(--border);
}

.landing-help-promo {
  margin-top: 32px;
}

.landing-help-link {
  margin-left: 16px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.landing-help-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
    order: 2;
  }
}
