/* Styles for the privacy pages (public/apps/<slug>/privacy.html).
   Colours and type match the home page (src/styles.css). */
:root {
  --primary: #ff4d2a;
  --primary-dark: #b93620;
  --ink: #29231f;
  --ink-2: #6b625a;
  --bg: #fbf6ee;
  --surface-alt: #f3ebdd;
  --card: #fffdf9;
  --border: #e4dace;
  --border-strong: #d6c8b6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 16px/1.7 'Be Vietnam Pro', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-color: rgba(185, 54, 32, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: currentColor; }

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

.shell {
  width: min(800px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header: the same cream bar as the home page. */
body > header.shell {
  width: 100%;
  max-width: none;
  padding: 18px max(20px, calc((100% - 800px) / 2));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  letter-spacing: 0;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.back:hover {
  border-color: var(--ink);
  background: var(--card);
}
.back svg { transition: transform 0.2s; }
.back:hover svg { transform: translateX(-2px); }

/* Policy card */
.policy {
  margin-top: 48px;
  margin-bottom: 72px;
  padding: 40px 56px 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
}
h1 {
  margin: 32px 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.02em;
}
h2 {
  margin: 40px 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}
p, li { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
strong { color: var(--ink); font-weight: 600; }

.meta {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Language switcher (same pill as the home page) */
.language-switcher {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}
.language-button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.language-button:hover { color: var(--ink); }
.language-button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}

/* Policies with many languages use short codes (EN, VI, ES...); keep the pill inside narrow screens. */
.language-switcher--many {
  flex-wrap: wrap;
  max-width: 100%;
}
.language-switcher--many .language-button { padding: 0 11px; }

[hidden] { display: none !important; }

/* Footer: the same quiet band as the home page */
body > footer.shell {
  width: 100%;
  max-width: none;
  margin: auto 0 0;
  padding: 32px max(20px, calc((100% - 800px) / 2));
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 14px;
}
body > footer p { margin: 0 0 4px; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .policy {
    width: calc(100% - 24px);
    margin-top: 16px;
    margin-bottom: 48px;
    padding: 28px 22px 36px;
  }
  h2 { margin-top: 32px; font-size: 19px; }
}
