/*
  Flown — shared styles for the privacy and support pages.

  Deliberately one small stylesheet with no build step, no framework and no external
  requests: these pages exist to satisfy App Store Connect's Privacy Policy and Support
  URL fields, and a legal page that fails to load because a CDN is down is a rejection.
  Everything here is self-hosted and static.

  Colours are the app's own orange accent, taken from
  App/Sources/UIComponents/Theme/AccentPalette.swift — the darker light-mode values are
  the WCAG AA-corrected ones, not the design pack's brighter orange.
*/

:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --border: #e4e4e7;
  --text: #18181b;
  --text-secondary: #52525b;
  --accent: #ef6300;
  --accent-text: #b24a00;
  --accent-soft: #fee7d7;
  --max-width: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #171b22;
    --border: #2a2f3a;
    --text: #f4f4f5;
    --text-secondary: #a1a1aa;
    --accent: #ff6a1a;
    --accent-text: #ff6a1a;
    --accent-soft: #351f17;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header ------------------------------------------------------------------ */

header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.wordmark {
  display: inline-block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  /* 44px minimum touch target, same HIG floor the app applies to its own controls. */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

nav a:hover,
nav a:focus {
  color: var(--accent-text);
  text-decoration: underline;
}

nav a[aria-current="page"] {
  color: var(--accent-text);
}

/* Typography -------------------------------------------------------------- */

h1 {
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1.1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.5rem;
}

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

strong {
  font-weight: 650;
}

.updated {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Callout ----------------------------------------------------------------- */

.callout {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin: 0 0 2rem;
}

.callout p {
  margin: 0;
}

.callout strong {
  color: var(--accent-text);
}

/* Cards ------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-top: 0;
}

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

/* Table ------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

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

th {
  font-weight: 650;
  white-space: nowrap;
}

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

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-secondary);
}
