/* Legal pages styled like the FoodFindr app: white surfaces, charcoal text,
   Inter, 44px capsule controls, and 4/8px spacing. Tokens mirror
   FoodFindrPalette in Sources/FoodFindrUI/Theme/FoodFindrTheme.swift. */

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --background: #ffffff;
  --text: #1f1f1f;
  --secondary: #595960;
  --field: #f5f5f5;
  --border: #f1e8e1;
  --primary: #1f1f1f;
  --on-primary: #ffffff;
  --brand: #ff4d5e;
  color-scheme: light;
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Top bar: back capsule, pin, page name — like the app's navigation bar. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
}

.topbar .title {
  font-weight: 700;
  font-size: 16px;
}

.page {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header img {
  width: 48px;
  height: auto;
  flex: none;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

/* Jump-to-section chips, like the app's filter chips. */
.chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px 32px;
  padding: 0 16px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chips li {
  flex: none;
}

/* Wide screens have room to show every section at once. */
@media (min-width: 720px) {
  .chips {
    flex-wrap: wrap;
    margin: 0 0 32px;
    padding: 0;
    overflow: visible;
  }
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--field);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.chips a:hover,
.chips a:focus-visible {
  background: var(--primary);
  color: var(--on-primary);
}

.legal-section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.legal-section p,
.legal-section li {
  color: var(--secondary);
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section strong,
.legal-section a {
  color: var(--text);
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal-section li + li {
  margin-top: 4px;
}

/* Footer actions: the app's 44px capsule buttons. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.actions a.primary {
  background: var(--primary);
  color: var(--on-primary);
}

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

.lead {
  margin: -8px 0 24px;
  color: var(--secondary);
}
