/*
 * Styling for the standalone legal pages (/privacy-policy, /delete-account,
 * /delete-data). These pages are plain HTML in public/ rather than app routes:
 * Google Play has to reach them without signing in, and the React app is a
 * single authenticated screen behind AuthScreen with no URL router. Keeping
 * them dependency-free also means they render even if the app bundle fails.
 *
 * Tailwind is not available here, so the app's palette is restated by hand:
 * emerald-600 #059669, slate-900 #0f172a … slate-50 #f8fafc.
 */

:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-tint: #ecfdf5;
  --emerald-line: #d1fae5;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --danger: #b91c1c;
  --danger-tint: #fef2f2;
  --danger-line: #fee2e2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: var(--emerald-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--emerald);
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.masthead-inner,
.wrap,
.footer-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: var(--emerald);
  color: #fff;
  font-size: 1rem;
}

.masthead-nav {
  display: flex;
  gap: 1.125rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  font-weight: 600;
}

.masthead-nav a {
  color: var(--muted);
  text-decoration: none;
}

.masthead-nav a:hover {
  color: var(--emerald-dark);
}

.masthead-nav a[aria-current="page"] {
  color: var(--emerald-dark);
}

/* ---------- Page body ---------- */

main.wrap {
  padding-top: 2.75rem;
  padding-bottom: 3.5rem;
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-dark);
  margin: 0 0 0.625rem;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.lede {
  font-size: 1.0625rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.updated {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--faint);
  margin: 0 0 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin: 0 0 1.5rem;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

h2 {
  font-size: 1.1875rem;
  margin: 2.25rem 0 0.75rem;
}

.card h2 {
  margin-top: 0;
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.375rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--faint);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8125em;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  padding: 0.1em 0.4em;
}

/* Numbered walkthrough used by the deletion pages. */
.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.375rem;
}

.steps > li:last-child {
  margin-bottom: 0;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.0625rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--emerald-tint);
  border: 1px solid var(--emerald-line);
  color: var(--emerald-dark);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
}

.steps .step-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

/* Callouts. */
.note,
.warn {
  border-radius: 1rem;
  padding: 1.125rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}

.note {
  background: var(--emerald-tint);
  border: 1px solid var(--emerald-line);
  color: #065f46;
}

.warn {
  background: var(--danger-tint);
  border: 1px solid var(--danger-line);
  color: var(--danger);
}

.note > :last-child,
.warn > :last-child {
  margin-bottom: 0;
}

.note strong,
.warn strong {
  color: inherit;
  font-weight: 700;
}

.button {
  display: inline-block;
  background: var(--emerald);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.75rem 1.375rem;
  border-radius: 0.875rem;
}

.button:hover {
  background: var(--emerald-dark);
  color: #fff;
}

/* Data tables (what is collected, what is erased, retention). */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.8125rem 1.125rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--canvas);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.page-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--faint);
}

.footer-nav {
  display: flex;
  gap: 1.125rem;
  flex-wrap: wrap;
  font-weight: 600;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--emerald-dark);
}

@media (max-width: 480px) {
  .card {
    padding: 1.25rem;
  }

  .steps > li {
    padding-left: 2.625rem;
  }
}
