/* Shared styling for the static /terms, /privacy, /support and /zoom pages.
 * Deliberately not part of the Vite/React build: these pages must render
 * fully with no JavaScript, so they are plain HTML files served directly by
 * Cloudflare Workers assets (see wrangler.jsonc) rather than React routes.
 * The colours and fonts below are copied from `src/index.css` rather than
 * shared with it, since these files are not processed by Vite. Keep them in
 * step by eye if the palette changes.
 */

:root {
  --color-bg: #f5f6f1;
  --color-surface: #ffffff;
  --color-border: #dadcd1;
  --color-ink: #1f2623;
  --color-ink-muted: #5b655f;
  --color-accent: #3d6b5c;
  --color-accent-hover: #2f5347;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  font-family: 'Gelasio', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--color-accent);
}

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

.legal-header {
  border-bottom: 1px solid var(--color-border);
}

.legal-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* The link to the other language's copy of the page. */
.legal-lang {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  text-decoration: none;
}

.legal-lang:hover {
  color: var(--color-accent);
}

/* Says a Spanish page is a courtesy translation of the English original. */
.legal-translation-note {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.legal-brand img {
  display: block;
  height: 30px;
  width: auto;
}

.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal-updated {
  color: var(--color-ink-muted);
  font-size: 0.9rem;
  margin: 8px 0 40px;
}

.legal-main h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 4px;
}

.legal-main h2 {
  font-size: 1.2rem;
  margin: 40px 0 12px;
}

.legal-main h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 10px;
}

.legal-main p,
.legal-main li {
  line-height: 1.65;
  font-size: 1rem;
}

.legal-main p {
  margin: 0 0 16px;
}

.legal-main ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-main li {
  margin-bottom: 8px;
}

.legal-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.92rem;
}

.legal-main th,
.legal-main td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.legal-main th {
  color: var(--color-ink-muted);
  font-weight: 600;
}

.legal-note {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 24px;
}

.legal-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px;
  text-align: center;
  color: var(--color-ink-muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .legal-main table,
  .legal-main thead,
  .legal-main tbody,
  .legal-main th,
  .legal-main td,
  .legal-main tr {
    display: block;
  }

  .legal-main thead {
    display: none;
  }

  .legal-main tr {
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
  }

  .legal-main td {
    border: none;
    padding: 2px 0;
  }

  .legal-main td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    color: var(--color-ink-muted);
    font-weight: 600;
  }
}
