/* Shared by every app's support and privacy pages; the home page has home.css and a promo page
   brings its own styles. Each page sets its own accent on <html>:
   style="--accent-light: #1e66f5; --accent-dark: #89b4fa"
   How the icon looks is up to each app: a macOS icon file already has its shape and shadow, an
   iOS one is a full square, so an iOS app adds e.g. --icon-radius: 22.37% (and a border if it
   wants one) in its own page. */
:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent-light: #0a5bd3;
  --accent-dark: #6aa8ff;
  --accent: var(--accent-light);
  --notice-bg: #fdecec;
  --notice-fg: #9b1c1c;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --fg: #f2f2f4;
    --muted: #a1a1a8;
    --line: #333338;
    --accent: var(--accent-dark);
    --notice-bg: #3a1618;
    --notice-fg: #ffb4b4;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin: 0;
}

h2 {
  font-size: 1.3rem;
  margin: 40px 0 4px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

h3 {
  font-size: 1.05rem;
  margin: 28px 0 4px;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

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

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

/* A long path or command breaks anywhere rather than run off a narrow screen. */
code {
  overflow-wrap: anywhere;
}

/* Page header: app icon, name, language switch. */
.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-header img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: var(--icon-radius, 0);
}

.langs,
.meta,
.section-links,
footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.langs {
  margin: 4px 0 0;
}

.langs a,
.section-links a {
  margin-right: 16px;
}

/* Keep each link on one line, so a Chinese label never breaks mid-word on a narrow screen. */
.langs a,
.section-links a {
  display: inline-block;
  white-space: nowrap;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.notice {
  background: var(--notice-bg);
  color: var(--notice-fg);
  padding: 12px 16px;
  border-radius: 10px;
}

/* Links at the end of each language section, so they stay in that language. */
.section-links {
  margin-top: 32px;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
