/* ESOS Inbox Contact, Privacy and Terms. Colors come from the --p-* tokens in
   esos-public-chrome.css (inlined), so light/dark and the chosen color apply. */
* { box-sizing: border-box; }

body.esos-legal-page {
  margin: 0;
  min-height: 100vh;
  color: var(--p-ink);
  background-color: var(--p-bg);
  background-image: radial-gradient(1000px 560px at 92% -160px, var(--p-glow), transparent 70%);
  background-repeat: no-repeat;
  font-size: 19px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.legal-shell {
  width: min(100% - 40px, 820px);
  margin: 0 auto;
  padding: 0 0 max(64px, calc(48px + env(safe-area-inset-bottom)));
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  border: 1px solid rgba(23,32,51,.16);
  border-radius: 17px;
  background: rgba(255,255,255,.70);
  box-shadow: 0 8px 22px rgba(15,75,116,.08);
  color: var(--p-ink);
  text-decoration: none;
  font-weight: 850;
}

.legal-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #07598a, #0d6fa8);
  color: #fff;
  font-weight: 900;
}

/* AAA (7:1) for colored text on Contact, Privacy and Terms in light mode.
   Blue, Pink, Purple, Green and Red use a mid-tone accent that measured
   5.2-6.6:1 here (kicker, links, the support email, the white "Join the
   waitlist" label). These pages use one shade deeper of the same color.
   Light only: their dark-mode accents already pass (9.8:1 or more), and the
   other looks already pass in both. No-script visitors follow the device
   setting, so the default Blue is only deepened when the device is light. */
html[data-esos-scheme="light"]:is(:not([data-esos-theme]), [data-esos-theme="blue"]) body.esos-legal-page { --p-accent: #1e40af; --p-accent-ink: #1e40af; }
html[data-esos-scheme="light"][data-esos-theme="pink"] body.esos-legal-page { --p-accent: #8f1546; --p-accent-ink: #8f1546; }
html[data-esos-scheme="light"][data-esos-theme="purple"] body.esos-legal-page { --p-accent: #5b21b6; --p-accent-ink: #5b21b6; }
html[data-esos-scheme="light"][data-esos-theme="green"] body.esos-legal-page { --p-accent: #05553f; --p-accent-ink: #05553f; }
html[data-esos-scheme="light"][data-esos-theme="red"] body.esos-legal-page { --p-accent: #8b1919; --p-accent-ink: #8b1919; }
@media (prefers-color-scheme: light) {
  html:not([data-esos-scheme]) body.esos-legal-page { --p-accent: #1e40af; --p-accent-ink: #1e40af; }
}

.legal-signin,
.legal-links a {
  color: var(--p-accent-ink);
  font-weight: 850;
  text-decoration: none;
}

.legal-content {
  margin-top: 44px;
}

.legal-title {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--p-line);
}

.legal-kicker {
  margin: 0 0 10px;
  color: var(--p-accent-ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .14em;
}

.legal-content h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(40px, 7vw, 60px);
  line-height: 1.04;
  font-weight: 850;
  letter-spacing: -.03em;
}

.legal-lead {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--p-muted);
  font-size: clamp(19px, 2.4vw, 22px);
  line-height: 1.55;
}

.legal-content section {
  max-width: 700px;
  padding: 30px 0;
  border-bottom: 1px solid var(--p-line);
}

.legal-summary {
  padding-top: 26px !important;
  padding-bottom: 28px !important;
}

.legal-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-summary li {
  position: relative;
  margin: 0;
  padding: 10px 0 10px 26px;
  font-size: 18px;
  line-height: 1.55;
}

.legal-summary li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 9px;
  color: var(--p-accent-ink);
  font-size: 21px;
  font-weight: 900;
}

.legal-summary-note {
  margin-top: 12px !important;
  color: var(--p-muted);
  font-size: 17px !important;
}

.legal-content h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.16;
  letter-spacing: -.025em;
}

.legal-content p {
  margin: 0;
  max-width: 68ch;
  font-size: 19px;
  line-height: 1.67;
}

/* Long code text (the Gmail permission URL on /privacy) wraps instead of
   pushing phones sideways. Breaks only when a line would overflow, so wide
   screens look the same. Same color and size as the paragraph around it. */
.legal-content code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 18px;
}

.legal-header-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--p-accent-ink);
  font-weight: 850;
  text-decoration: none;
}

.contact-card {
  margin-top: 26px;
  padding: 22px 24px;
  border: 2px solid var(--p-accent);
  border-radius: 22px;
  background: var(--p-surface);
  box-shadow: var(--p-shadow);
}

.contact-card p + p {
  margin-top: 8px;
}

.contact-email {
  color: var(--p-accent-ink);
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 900;
  text-decoration: none;
  word-break: break-word;
}

.legal-content ol,
.legal-content section > ul {
  margin: 0;
  padding-left: 24px;
  font-size: 19px;
  line-height: 1.6;
}

.legal-content ol li,
.legal-content section > ul li {
  margin: 6px 0;
}

/* Oct 18 2026 (Ian 9as): the section heading must read clearly bigger than
   the questions under it (it was 24px on phones vs 21px questions). */
.legal-content h2.contact-faq-title {
  font-size: clamp(30px, 4.4vw, 36px);
}

.contact-faq dt {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
}

.contact-faq dd {
  margin: 8px 0 0;
  color: var(--p-muted);
  font-size: 19px;
  line-height: 1.62;
}

.legal-content p a,
.legal-content dd a,
.legal-content li a {
  color: var(--p-accent-ink);
  font-weight: 750;
  text-underline-offset: 3px;
}

.legal-footer {
  padding-top: 28px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--p-muted);
  font-size: 16px;
  line-height: 1.4;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
}

.legal-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
}

.legal-content a:focus-visible,
.legal-links a:focus-visible {
  outline: 3px solid var(--p-focus);
  outline-offset: 4px;
  border-radius: 8px;
}

@media (max-width: 520px) {
  .legal-shell {
    width: min(100% - 32px, 820px);
  }

  .legal-content {
    margin-top: 38px;
  }

  .legal-title {
    padding-bottom: 26px;
  }

  .legal-content section {
    padding: 27px 0;
  }

  .legal-content p {
    font-size: 18px;
    line-height: 1.68;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* Oct 18 2026 (Ian 9au): the how-to steps in Your choices are italic so they
   stand apart from the explanation around them. Same ink color (AAA). */
.legal-content em.legal-step {
  font-style: italic;
}

/* Oct 19 2026 (Ian 9av): the "what ESOS keeps" list has one short inner list;
   keep its indent small so it reads well at 360px. */
.legal-content .legal-retention ul {
  margin: 4px 0 6px;
  padding-left: 22px;
  font-size: inherit;
}
.legal-content .legal-retention > li {
  margin: 10px 0;
}
