/* SafeEyes Buddy — legal pages.
 *
 * Matched to the app's Sea Glass palette (lib/app/theme/app_colors.dart) so a
 * parent who taps "Privacy Policy" in Settings does not land on a page that
 * looks like a different product. The previous version used a blue accent that
 * predated the redesign.
 *
 * No webfont is loaded, deliberately. Pulling Fredoka or Nunito from a CDN
 * would hand a third party the IP address of everyone who opens the privacy
 * policy — on the privacy policy. The system stack below puts a rounded face
 * first where one exists, which is close to the app's own type, and costs
 * nothing.
 */

:root {
  --page: #edf7f4;
  --page-alt: #dcf0eb;
  --card: #ffffff;
  --ink: #0f3830;
  --ink-2: #3d6660;
  --muted: #5f8981;
  --brand: #0e9e86;
  --brand-deep: #0a6455;
  --brand-soft: #dcf0eb;
  --accent: #ff9f45;
  --border: #d9e9e4;
  --on-brand: #ffffff;
  --shadow: 0 1px 2px rgba(15, 56, 48, .05), 0 18px 34px -24px rgba(15, 56, 48, .35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141330;
    --page-alt: #1b1940;
    --card: #1f1d4a;
    --ink: #f1efff;
    --ink-2: #c3bdee;
    --muted: #a49dda;
    --brand: #a290ff;
    --brand-deep: #c9beff;
    --brand-soft: #2a2765;
    --accent: #ffce4d;
    --border: #322e70;
    --on-brand: #141330;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -24px rgba(0, 0, 0, .8);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page);
  color: var(--ink-2);
  line-height: 1.7;
  font-size: 16px;
  padding: 28px 16px 72px;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: var(--shadow);
}

/* Brand lockup: Blink, drawn inline as SVG so the page pulls no assets. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
}
.brand .dot {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.brand .dot svg { width: 28px; height: 28px; display: block; }

h1 {
  font-size: 30px;
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -.01em;
  margin: 34px 0 10px;
}

h3 {
  font-size: 16px;
  color: var(--ink);
  margin: 22px 0 6px;
}

p, li { margin-bottom: 12px; }
ul { margin: 0 0 16px 22px; }
li { padding-left: 2px; }
strong { color: var(--ink); font-weight: 700; }

a {
  color: var(--brand-deep);
  text-decoration-color: color-mix(in srgb, var(--brand-deep) 40%, transparent);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 3px;
}

/* The "short version" summary — the one block most people actually read. */
.callout {
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0 28px;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 22px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--page-alt);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }

footer {
  max-width: 720px;
  margin: 26px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
footer a { color: var(--muted); }

@media (max-width: 520px) {
  body { padding: 16px 12px 48px; font-size: 15.5px; }
  main { padding: 28px 22px; border-radius: 20px; }
  h1 { font-size: 25px; }
  h2 { font-size: 17.5px; }
}

/* ---- Landing page ------------------------------------------------------ */
/* Only index.html carries .home, so the legal pages keep their document
 * proportions and are not pulled toward marketing type sizes. */

body.home h1 {
  font-size: 38px;
  line-height: 1.14;
  margin-bottom: 14px;
}

body.home .tagline {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 26px;
  max-width: 56ch;
}

.cta-row { margin: 0 0 30px; }

.cta {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 14px;
  box-shadow: 0 10px 22px -12px var(--brand);
  transition: transform .14s ease;
}
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.fineprint {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 520px) {
  body.home h1 { font-size: 29px; }
  body.home .tagline { font-size: 16px; }
  .cta { display: block; text-align: center; }
}
