/* ============================================================
   CardAccount — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Dark theme · wine / sand / blush palette
   ============================================================ */

/* Body background is defined here: legal pages load ONLY this file */
.legal-page {
  background-color: #130F10;
  color: #F4EDEE;
}

:root {
  --bg: #130F10;
  --bg-2: #1A1417;
  --bg-3: #22191E;
  --text: #F4EDEE;
  --muted: #CDBAC0;
  --wine: #9F1239;
  --wine-bright: #BE123C;
  --wine-dark: #7F0E2E;
  --sand: #E8C99B;
  --blush: #F3D9D0;
  --border: #35242C;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  background-color: #130F10;
  color: #F4EDEE;
  overflow-x: hidden;
}

a {
  color: var(--sand);
}

/* ---------- Header ---------- */
.legal-header {
  background: linear-gradient(135deg, #6F0D2A 0%, #9F1239 100%);
  border-bottom: 1px solid var(--border);
}

.legal-header__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 34px;
}

.legal-brand__wordmark {
  color: #FFFFFF;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 1rem;
}

.calc-icon {
  width: 36px;
  height: 44px;
  border: 2px solid #FFFFFF;
  border-radius: 7px;
  background-color: #130F10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
}

.calc-icon__display {
  height: 7px;
  border-radius: 3px;
  background-color: var(--sand);
}

.calc-icon__keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  flex: 1;
}

.calc-icon__dot {
  background-color: var(--blush);
  border-radius: 2px;
}

.legal-title {
  color: #FFFFFF;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.legal-updated {
  color: var(--blush);
  font-size: 0.95rem;
  margin: 16px 0 0;
}

/* ---------- Table of contents ---------- */
.toc {
  background-color: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.toc__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 24px;
}

.toc__label {
  color: var(--sand);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 14px;
}

.toc__inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}

.toc__inner li {
  margin-bottom: 9px;
  break-inside: avoid;
}

.toc__inner a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.toc__inner a:hover {
  color: var(--sand);
}

/* ---------- Content ---------- */
.legal-content {
  padding: 64px 0 40px;
}

/* Scope isolation: neutralize any section backgrounds inside content */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content section {
  margin-bottom: 48px;
  padding-top: 8px;
}

.legal-content h2 {
  color: var(--blush);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px;
  scroll-margin-top: 24px;
}

.legal-content h3 {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 24px 0 10px;
}

.legal-content p {
  color: var(--muted);
  margin: 0 0 18px;
}

.legal-content ul {
  color: var(--muted);
  margin: 0 0 18px;
  padding-left: 22px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--text);
}

.legal-content a {
  color: var(--sand);
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.legal-footer {
  background-color: var(--bg);
  border-top: 2px solid var(--wine-bright);
  padding: 40px 24px 32px;
}

.legal-footer__inner {
  max-width: 800px;
  margin: 0 auto;
}

.legal-footer__top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.legal-footer__top a {
  color: var(--sand);
  text-decoration: none;
  font-weight: 700;
}

.legal-footer__top a:hover {
  color: var(--blush);
}

.legal-footer p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 8px;
  line-height: 1.6;
}

.legal-footer a {
  color: var(--blush);
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--sand);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .toc__inner ul {
    columns: 1;
  }

  .legal-footer__top {
    flex-direction: column;
  }
}
