/* Neutral site styles. App pages override only --accent, --on-accent and --tint from app.json "theme". */
:root {
  --bg: #fafaf8;
  --text: #1c1c1a;
  --muted: #6e6e68;
  --line: #e6e5e1;
  --accent: #1c1c1a;
  --on-accent: #fafaf8;
  --tint: #efeeea;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'PingFang TC', 'Noto Sans TC', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131312;
    --text: #ecebe7;
    --muted: #9a9993;
    --line: #2a2a27;
    --accent: #ecebe7;
    --on-accent: #131312;
    --tint: #22221f;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 0 20px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: 640px; margin: 0 auto; padding-block: 28px 56px; }

/* Bilingual text: English first, Traditional Chinese underneath, a little quieter. */
.bi > [lang] { display: block; }
.bi > [lang="zh-Hant"] { color: var(--muted); font-size: 0.92em; }
h1.bi > [lang="zh-Hant"],
h2.bi > [lang="zh-Hant"] { font-size: 0.6em; font-weight: 500; margin-top: 4px; letter-spacing: 0; }

/* Inline variant for short labels: "Download · 下載" */
.inline.bi > [lang] { display: inline; color: inherit; font-size: inherit; }
.inline.bi > [lang="zh-Hant"]::before { content: ' · '; }

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.site-header a,
.site-footer a { text-decoration: none; }
.site-header a:hover,
.site-footer a:hover { color: var(--text); }
.site-footer { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); }

main { margin-top: 64px; }

h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 650; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 8px; font-weight: 600; }

.app-icon { display: block; width: 64px; height: 64px; margin-bottom: 20px; }
.lede { margin: 12px 0 0; font-size: 17px; }

.btn {
  display: inline-block;
  margin-top: 24px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn small { display: block; font-weight: 400; font-size: 12px; opacity: 0.75; }

.hero-art {
  margin: 48px 0 0;
  background: var(--tint);
  border-radius: 20px;
  padding: clamp(16px, 4vw, 32px);
}
.hero-art img { display: block; width: 100%; height: auto; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 32px;
  padding: 0;
  margin: 56px 0 0;
  list-style: none;
}
.features strong { display: block; font-size: 15px; margin-bottom: 4px; }
.features .bi:not(strong) { font-size: 14px; color: var(--muted); }

.section { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.section > p { margin: 0 0 16px; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin-top: 16px; }
.fine .bi { display: block; }

.downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.downloads .btn { margin-top: 8px; }
.notice {
  margin: 24px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--tint);
  font-size: 15px;
}
.notice code { font: inherit; font-weight: 600; word-break: break-all; }

.app-list { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.app-list li { border-bottom: 1px solid var(--line); }
.app-list a { display: flex; align-items: center; gap: 16px; padding: 18px 0; text-decoration: none; }
.app-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.app-list img { width: 48px; height: 48px; flex-shrink: 0; }
.app-list strong { display: block; }
.app-list .bi { font-size: 14px; color: var(--muted); }
.app-list .arrow { margin-left: auto; color: var(--muted); }

.intro { color: var(--muted); margin: 12px 0 0; }

.prose h2 { font-size: 17px; margin-top: 36px; }
.prose p, .prose li { color: var(--muted); }
.prose .bi > [lang="en"] { color: var(--text); }
.prose li + li { margin-top: 8px; }
