/* Tippy Treats: public pages (privacy, terms, support, index).
   Colours come from src/data/common/palette.ts: the light theme is the cream panel
   with berry and gold accents, the dark theme is the chocolate app splash colour (#2b1d16).
   The dark theme is switched on only by the system prefers-color-scheme setting. */

:root {
  --bg: #fff6ec; /* PALETTE.panel */
  --text: #3b2a4a; /* PALETTE.textDark */
  --head: #3b2a4a;
  --muted: #7a6573;
  --accent: #c4203a; /* PALETTE.berry, darkened for text contrast */
  --line: #e9d5c3; /* PALETTE.panelShadow */
  --panel: rgba(255, 201, 60, 0.18);
  --mark: #ff5c8a; /* PALETTE.accent */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2b1d16; /* app splash colour */
    --text: #fff0e2;
    --head: #ffc93c; /* PALETTE.gold */
    --muted: #c9b3a3;
    --accent: #ff7fa3;
    --line: #4a3428;
    --panel: rgba(255, 246, 236, 0.07);
    --mark: #ff5c8a;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a:hover,
a:focus-visible {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  border-bottom: 3px solid var(--mark);
  background: var(--panel);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-family: 'Trebuchet MS', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--head);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-switch a {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted);
}

.lang-switch a.active {
  color: var(--head);
  background: var(--line);
}

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

main {
  padding: 28px 0 8px;
}

section[data-lang] h1 {
  font-family: 'Trebuchet MS', system-ui, sans-serif;
  font-size: 28px;
  line-height: 1.25;
  color: var(--head);
  margin: 0 0 6px;
}

section[data-lang] h2 {
  font-family: 'Trebuchet MS', system-ui, sans-serif;
  font-size: 20px;
  color: var(--head);
  margin: 32px 0 8px;
}

section[data-lang] h3 {
  font-size: 17px;
  color: var(--head);
  margin: 22px 0 6px;
}

section[data-lang] p {
  margin: 0 0 14px;
}

.updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}

section[data-lang] ul,
section[data-lang] dl {
  margin: 0 0 14px;
  padding-left: 0;
}

section[data-lang] ul {
  padding-left: 20px;
}

section[data-lang] li {
  margin-bottom: 6px;
}

section[data-lang] dt {
  font-weight: 700;
  color: var(--head);
  margin-top: 16px;
}

section[data-lang] dd {
  margin: 4px 0 0;
}

.page-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.page-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .brand {
    font-size: 20px;
  }

  section[data-lang] h1 {
    font-size: 24px;
  }
}
