/* ================================================================
   legal-embedded.css
   Activated when html.is-embedded is present.
   Used when legal pages open inside App WebView (?embedded=1).
   Does NOT affect normal browser access.
   ================================================================ */

/* ── Color scheme + base ─────────────────────────────────────── */
html.is-embedded {
  color-scheme: light;
}

html.is-embedded body {
  background: #f6f7f6 !important;
  color: #1a1a1a !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── Hide website chrome ──────────────────────────────────────── */
html.is-embedded .site-header {
  display: none !important;
}

html.is-embedded .legal-nav {
  display: none !important;
}

/* ── Layout: remove section padding, collapse grid ───────────── */
html.is-embedded .legal-page {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

html.is-embedded .legal-shell {
  gap: 0 !important;
}

html.is-embedded .legal-layout {
  display: block !important;
}

/* Full-bleed on mobile: remove container gutters */
html.is-embedded .container {
  padding-inline: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* ── Hero card: clean title block ────────────────────────────── */
html.is-embedded .legal-hero-card {
  background: #ffffff !important;
  border: none !important;
  border-bottom: 1px solid #e4e7e4 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 1.125rem 1.25rem 0.875rem !important;
  margin: 0 !important;
}

html.is-embedded .legal-hero-card .section-kicker {
  display: none !important;
}

html.is-embedded .legal-hero-card h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif !important;
  font-size: 1.1875rem !important;
  font-weight: 700 !important;
  color: #111111 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
  margin: 0 0 0.25rem !important;
}

html.is-embedded .legal-hero-card .legal-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif !important;
  font-size: 0.8rem !important;
  color: #888888 !important;
  margin: 0 !important;
}

/* ── Content card: white, clean ──────────────────────────────── */
html.is-embedded .legal-content-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 1.25rem 1.25rem 3rem !important;
  color: #1a1a1a !important;
}

/* iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  html.is-embedded .legal-content-card {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom)) !important;
  }
}

/* ── Typography ───────────────────────────────────────────────── */
html.is-embedded .legal-content-card h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #111111 !important;
  letter-spacing: -0.005em !important;
  line-height: 1.4 !important;
  margin: 0 0 0.625rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid #eeeeee !important;
}

html.is-embedded .legal-content-card h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  color: #222222 !important;
  line-height: 1.45 !important;
  margin: 1.25rem 0 0.375rem !important;
}

html.is-embedded .legal-content-card p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif !important;
  font-size: 0.9375rem !important;
  color: #444444 !important;
  line-height: 1.75 !important;
  margin: 0 0 0.875rem !important;
}

html.is-embedded .legal-content-card ul,
html.is-embedded .legal-content-card ol {
  margin: 0 0 0.875rem !important;
  padding-left: 1.375rem !important;
}

html.is-embedded .legal-content-card li {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif !important;
  font-size: 0.9375rem !important;
  color: #444444 !important;
  line-height: 1.7 !important;
  margin-bottom: 0.375rem !important;
}

html.is-embedded .legal-content-card strong {
  color: #222222 !important;
  font-weight: 600 !important;
}

html.is-embedded .legal-content-card a {
  color: #1a7a45 !important;
  text-decoration: underline !important;
}

/* ── Tables: mobile horizontal scroll ────────────────────────── */
html.is-embedded .legal-content-card table {
  display: block !important;
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-collapse: collapse !important;
  border-radius: 0 !important;
  font-size: 0.875rem !important;
  margin: 0.5rem 0 1rem !important;
}

html.is-embedded .legal-content-card th {
  background: #f0f4f1 !important;
  color: #222222 !important;
  font-weight: 600 !important;
  padding: 0.625rem 0.75rem !important;
  border: 1px solid #dde4df !important;
  text-align: left !important;
  white-space: nowrap !important;
}

html.is-embedded .legal-content-card td {
  color: #333333 !important;
  padding: 0.5rem 0.75rem !important;
  border: 1px solid #dde4df !important;
  vertical-align: top !important;
}

html.is-embedded .legal-content-card tr:nth-child(even) td {
  background: #f9fbf9 !important;
}

/* ── Disable animations and heavy effects ────────────────────── */
html.is-embedded .legal-content-card,
html.is-embedded .legal-hero-card,
html.is-embedded .legal-page,
html.is-embedded .legal-shell {
  animation: none !important;
  transition: none !important;
}
