/**
 * Legal page shared styles — cookies, privacy, terms.
 *
 * Approach: no card panels for page content. Sections sit on the page
 * background, separated by hairline borders. The accordion remains the
 * only card-like component, using the canonical ui-items/accordion.css.
 *
 * Depends on: core/marbl-v2.css, site-header.css, site-footer.css,
 * ui-items/accordion.css.
 */

/* ─ Page scaffold ─────────────────────────────────────────────── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.content {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--gap-lg, 60px) var(--gap-md, 40px) var(--gap-xl, 80px);
  width: 100%;
}

@media (max-width: 640px) {
  .content {
    padding: var(--gap-md, 40px) var(--gap-sm, 20px) var(--gap-lg, 60px);
  }
}

/* ─ Page title + hairline ─────────────────────────────────────── */
.page-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: 1.1;
  color: var(--marbl-white);
  margin: 0;
  padding-bottom: var(--gap-sm, 20px);
  border-bottom: 1px solid var(--marbl-white-06);
}

/* ─ Page meta (Last updated) ──────────────────────────────────────
   Label Style per Brand Kit — ember uppercase, 11px, 2px letter-spacing.
   Sits between the title border and the first content section, paired
   visually with the h2 it stamps. Generous space above, tight below. */
.page-meta {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs, 11px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--marbl-ember);
  margin: var(--gap-md, 40px) 0 0;
}

/* ─ Borderless section stack ──────────────────────────────────────
   Each top-section sits on the page background, separated by hairline
   borders. No card backgrounds. Keeps reading flow continuous and
   matches the editorial feel of the rest of the Marbl ecosystem. */
.approach,
.change-notice,
.company-info {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--marbl-white-06);
  border-radius: 0;
  padding: var(--gap-md, 40px) 0;
  margin: 0;
}

/* First section pairs tight with the Last Updated stamp above it. */
.approach:first-of-type,
.change-notice:first-of-type {
  padding-top: var(--gap-xs, 10px);
}

.approach h2,
.company-info h2 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--marbl-white);
  margin: 0 0 var(--gap-xs, 10px);
}

.approach p,
.company-info p,
.change-notice {
  color: var(--marbl-white-70);
  font-size: var(--text-base);
  line-height: 1.65;
  margin: 0 0 var(--gap-xs, 10px);
}

.approach p:last-child,
.company-info p:last-child { margin-bottom: 0; }

.change-notice { font-size: var(--text-sm); line-height: 1.55; }

.approach strong,
.company-info strong,
.change-notice strong { color: var(--marbl-white); }

.company-info a {
  color: var(--marbl-ember);
  text-decoration: none;
  transition: color 0.15s ease;
}
.company-info a:hover { color: var(--marbl-white); }

/* ─ Accordion: accessible readable content overrides ──────────────
   The canonical .accordion__content colour is rgba(255,255,255,0.45)
   which fails WCAG AA for 13px body text on charcoal. Legal pages are
   long-form reading; override to white-70. Also add the rich-content
   styles the legal accordions need (h3, p, ul, a, strong, tables).
   Canonical accordion chrome (item, trigger, icon, body) comes from
   components/ui-items/accordion.css. */
.accordion {
  margin-top: var(--gap-md, 40px);
}

.accordion__content {
  color: var(--marbl-white-70);
  font-size: var(--text-sm, 13px);
  line-height: 1.7;
}

.accordion__content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--marbl-white);
  margin: var(--gap-sm, 20px) 0 var(--gap-xs, 10px);
}
.accordion__content h3:first-child { margin-top: var(--gap-xs, 10px); }

.accordion__content p { margin: 0 0 var(--gap-xs, 10px); }
.accordion__content p:last-child { margin-bottom: 0; }

.accordion__content ul {
  margin: 0 0 var(--gap-xs, 10px);
  padding-left: var(--gap-sm, 20px);
}
.accordion__content li { margin-bottom: var(--gap-half, 5px); }

.accordion__content a {
  color: var(--marbl-ember);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.accordion__content a:hover { border-bottom-color: var(--marbl-ember); }

.accordion__content strong { color: var(--marbl-white); }

/* ─ Tables inside accordions (cookie lists) ───────────────────── */
.accordion__content table {
  width: 100%;
  margin: var(--gap-xs, 10px) 0;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.accordion__content th,
.accordion__content td {
  padding: var(--gap-xs, 10px);
  text-align: left;
  border-bottom: 1px solid var(--marbl-white-06);
  vertical-align: top;
}

.accordion__content th {
  background: var(--marbl-charcoal);
  color: var(--marbl-white);
  font-weight: var(--font-semibold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.accordion__content tr:last-child td { border-bottom: 0; }

/* ─ Back button in the header right slot ──────────────────────── */
.legal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs, 10px);
  height: 44px;
  padding: 0 var(--gap-sm, 20px);
  background: transparent;
  border: 1px solid var(--marbl-white-15);
  border-radius: var(--radius, 10px);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-back-btn:hover {
  border-color: var(--marbl-ember);
  color: var(--marbl-ember);
}

.legal-back-btn:focus-visible {
  outline: 2px solid var(--marbl-ember);
  outline-offset: 2px;
}

.legal-back-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.legal-back-btn:hover svg { transform: translateX(-2px); }

@media (max-width: 640px) {
  .legal-back-btn__target { display: none; }
}
