:root {
  --ink: #102b36;
  --ink-soft: #48616a;
  --lagoon: #2c7a78;
  --lagoon-dark: #1f5d5b;
  --sand: #f6efe2;
  --nacre: #fffdf8;
  --coral: #c85d4a;
  --line: rgba(16, 43, 54, 0.14);
  --shadow: 0 18px 50px rgba(16, 43, 54, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, rgba(83, 173, 167, 0.18), transparent 28rem),
    var(--nacre);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--lagoon-dark); }
a:hover { color: var(--coral); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: .75rem;
  color: white;
  background: var(--ink);
}

.skip-link:focus { top: 1rem; }

.legal-header {
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(14px);
}

.legal-nav {
  display: flex;
  width: min(1120px, 100%);
  margin: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font: 700 1.15rem/1 "Manrope", sans-serif;
  text-decoration: none;
}

.legal-brand img { width: 2.35rem; height: 2.35rem; object-fit: contain; }

.legal-nav-links { display: flex; flex-wrap: wrap; gap: .6rem 1.15rem; }
.legal-nav-links a { font-size: .9rem; font-weight: 700; text-decoration: none; }

.legal-shell { width: min(920px, calc(100% - 2rem)); margin: auto; }

.legal-hero { padding: clamp(3rem, 8vw, 6rem) 0 2.5rem; }

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--lagoon-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: "Manrope", sans-serif; line-height: 1.16; }
h1 { max-width: 18ch; margin: 0; font-size: clamp(2.25rem, 7vw, 4.6rem); letter-spacing: -.05em; }
h2 { margin: 0 0 1rem; font-size: clamp(1.5rem, 4vw, 2.25rem); letter-spacing: -.025em; }
h3 { margin: 1.4rem 0 .5rem; font-size: 1.08rem; }
p, li { color: var(--ink-soft); }

.legal-lead { max-width: 70ch; margin: 1.25rem 0 0; font-size: 1.08rem; }
.legal-meta { margin-top: 1rem; font-size: .9rem; color: var(--ink-soft); }

.review-banner, .blocking-banner, .info-banner, .warning-banner {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: white;
}

.review-banner { border-left: .35rem solid var(--lagoon); }
.blocking-banner { border-left: .35rem solid var(--coral); background: #fff6f2; }
.info-banner { border-left: .35rem solid var(--lagoon); background: #f2fbfa; }
.warning-banner { border-left: .35rem solid #c98528; background: #fff9ed; }
.review-banner p, .blocking-banner p, .info-banner p, .warning-banner p { margin: .2rem 0; }

.legal-toc {
  margin: 0 0 2rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--sand);
}

.legal-toc strong { display: block; margin-bottom: .45rem; }
.legal-toc ol { margin: 0; padding-left: 1.2rem; columns: 2; }

.legal-section {
  margin: 0 0 1.2rem;
  padding: clamp(1.3rem, 4vw, 2.2rem);
  scroll-margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.legal-section > :last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol { padding-left: 1.25rem; }
.legal-section a, .legal-section code { overflow-wrap: anywhere; }

.legal-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-zones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.data-zone { padding: 1rem; border-radius: 1rem; background: var(--sand); }
.data-zone h3 { margin-top: 0; }

.retention-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.retention-table th, .retention-table td {
  padding: .8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.retention-table th { color: var(--ink); background: var(--sand); }

.legal-footer {
  margin-top: 3rem;
  padding: 2rem 1rem;
  color: white;
  background: var(--ink);
}

.legal-footer-inner {
  display: flex;
  width: min(920px, 100%);
  margin: auto;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.legal-footer a, .legal-footer p { color: rgba(255, 255, 255, .82); }
.legal-footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

.button {
  display: inline-flex;
  min-height: 2.8rem;
  padding: .75rem 1.15rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--lagoon-dark);
  font: 700 .95rem/1 "DM Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { color: white; background: var(--ink); }
.button.secondary { color: var(--ink); background: var(--sand); }
.button.danger { background: var(--coral); }
.button:disabled { cursor: not-allowed; opacity: .5; }

.deletion-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.2rem; }
.deletion-panel { padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 1.25rem; background: white; box-shadow: var(--shadow); }
.deletion-panel[hidden], [hidden] { display: none !important; }

.form-field { display: grid; gap: .4rem; margin: 1rem 0; }
.form-field label { font-weight: 700; }
.form-field input {
  width: 100%;
  min-height: 3rem;
  padding: .7rem .85rem;
  border: 1px solid rgba(16, 43, 54, .28);
  border-radius: .8rem;
  color: var(--ink);
  background: white;
  font: inherit;
}
.form-field input:focus { outline: 3px solid rgba(44, 122, 120, .2); border-color: var(--lagoon); }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.status { min-height: 1.5rem; margin: .7rem 0; font-weight: 700; }
.status[data-state="error"] { color: #9f3828; }
.status[data-state="success"] { color: #1b6d51; }
.account-chip { padding: .8rem 1rem; border-radius: .85rem; background: var(--sand); overflow-wrap: anywhere; }
.danger-zone { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.google-button { min-height: 2.8rem; margin: 1rem 0; }
.otp-step { padding-top: .5rem; }

@media (max-width: 720px) {
  .legal-nav { align-items: flex-start; }
  .legal-nav-links { justify-content: flex-end; }
  .legal-toc ol { columns: 1; }
  .data-zones, .deletion-grid { grid-template-columns: 1fr; }
  .retention-table { display: block; overflow-x: auto; }
  .legal-table-scroll .retention-table { display: table; min-width: 38rem; }
}

@media (max-width: 480px) {
  .legal-nav { display: grid; }
  .legal-nav-links { justify-content: flex-start; }
  .legal-shell { width: min(100% - 1rem, 920px); }
  .legal-section, .deletion-panel { border-radius: 1rem; }
  .form-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
