:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #5f6368;
  --line: #e6e6e6;
  --card: #f6f6f4;
  --you: #f5c518;   /* matches the app's AccentColor badge for "You" */
  --them: #22c3d6;  /* matches the app's cyan badge for "Them" */
  --btn-bg: #111111;
  --btn-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0f;
    --fg: #f2f2f2;
    --muted: #a0a4a8;
    --line: #2a2a2c;
    --card: #1a1a1c;
    --btn-bg: #f2f2f2;
    --btn-fg: #111111;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Hiragino Sans", "Noto Sans TC", system-ui, sans-serif;
}
main, header, footer { max-width: 720px; margin: 0 auto; padding: 0 16px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
header .brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.lang-switch { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.lang-switch button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }

h1 { font-size: clamp(30px, 7vw, 44px); line-height: 1.15; margin: 48px 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 22px; margin: 48px 0 12px; }
h3 { font-size: 17px; margin: 20px 0 4px; }
p { margin: 0 0 12px; }
.lead { font-size: 19px; color: var(--muted); }
.muted { color: var(--muted); font-size: 15px; }

.cta { display: inline-block; margin: 20px 0 8px; padding: 14px 22px; border-radius: 14px; background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font-weight: 600; }
.cta[hidden] { display: none; }

ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
ol.steps li { counter-increment: s; background: var(--card); border-radius: 14px; padding: 14px 16px 14px 52px; margin: 10px 0; position: relative; }
ol.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 700; display: grid; place-items: center; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; color: #111; font-weight: 700; font-size: 14px; }
.badge.you { background: var(--you); }
.badge.them { background: var(--them); }

.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border-radius: 14px; padding: 16px; }
.card h3 { margin-top: 0; }

details { border-top: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin-top: 8px; color: var(--muted); }

footer { border-top: 1px solid var(--line); margin-top: 64px; padding-top: 16px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); margin-right: 14px; }

[data-lang] { display: none; }
html[lang="en"] [data-lang="en"],
html[lang="zh-Hant"] [data-lang="zh-Hant"],
html[lang="ja"] [data-lang="ja"],
html[lang="zh-Hans"] [data-lang="zh-Hans"] { display: revert; }

.legal h2 { font-size: 19px; margin-top: 32px; }
.legal li { margin-bottom: 6px; }

mark.todo { background: #ffe08a; color: #111; padding: 0 3px; border-radius: 3px; }
.table { overflow-x: auto; margin: 12px 0; }
.table table { border-collapse: collapse; font-size: 15px; width: 100%; }
.table.wide table { min-width: 560px; }
.table th { width: auto; }
.table.kv th { width: 32%; white-space: normal; }
.table th, .table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }

.app-icon { display: block; width: 96px; height: 96px; border-radius: 22%; margin: 40px 0 -24px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
