/* Design plan — 轻断食 (fasting timer)
   1. Palette: paper #F5F8FC, ink #0E1A2B, muted #46566B, accent blue #1A62D6 (app default blue, AA 5.2:1), eating-arc neutral #C9D3E0; dark: #0D131B / #E6ECF3 / #9FB0C3 / #5E9BFF / #2B3746.
   2. Type: system stack only; display 3–3.6rem/750 tight tracking with tabular numerals for "16:8"; headers 1.05rem/650; body 17px/1.75, ≤ 38em lines.
   3. Layout: left-aligned split hero (copy left, ring right; ring stacks under copy below 760px), highlights as a quiet 2×2 grid, badge on its own row, plain footer.
   4. Signature: an inline-SVG 24-hour ring — 16 h fasting arc in the one accent blue, 8 h eating arc neutral, "16:8" set in the center; decorative, aria-hidden, static.
   5. Restraint: accent spent only on the ring and links; no cards, no gradients, no dividers except the functional footer rule. */

:root {
  --bg: #F5F8FC;
  --ink: #0E1A2B;
  --muted: #46566B;
  --accent: #1A62D6;
  --track: #C9D3E0;
  --rule: #D8E0EA;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D131B;
    --ink: #E6ECF3;
    --muted: #9FB0C3;
    --accent: #5E9BFF;
    --track: #2B3746;
    --rule: #233041;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "SF Pro Text", "SF Pro", "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Landing ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 3.5rem;
}

.brand {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6.4vw, 3.6rem);
  line-height: 1.18;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.lede {
  margin: 1.4rem 0 0;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--muted);
}

.ring {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  justify-self: end;
}

.ring .eat { stroke: var(--track); }
.ring .fast { stroke: var(--accent); }
.ring .ratio {
  fill: var(--ink);
  font-size: 54px;
  font-weight: 750;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.ring .legend { fill: var(--muted); font-size: 14px; font-weight: 500; }
.ring .legend-sm { font-size: 12.5px; }

.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
  margin: 0;
  padding: 1rem 0 0;
  list-style: none;
}

.highlights h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.5;
}

.highlights p { margin: 0; color: var(--muted); max-width: 30em; }

.download { padding: 3rem 0 3.5rem; }

/* Clear space around the badge: padding ≥ 1/4 of the 48px badge height. */
.badge {
  display: inline-block;
  padding: 14px;
  margin-left: -14px;
  line-height: 0;
}
.badge img { display: block; height: 48px; width: auto; }

/* ---------- Support / privacy ---------- */

.site-header { padding: 1.5rem 0 0; }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

/* Language switch: a plain, quiet link (header on support/privacy, footer on landing). */
.site-header a.lang,
.lang {
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--rule);
}
.lang:hover { color: var(--accent); text-decoration-color: currentColor; }
.site-header a {
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.site-header a:hover { text-decoration: underline; }

.doc { max-width: 42rem; padding: 2.5rem 0 3.5rem; }

.doc h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.doc .lede { font-size: 1.05rem; }

.doc h2 {
  margin: 2.5rem 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.doc h3 {
  margin: 1.6rem 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.5;
}

.doc p,
.doc ul { margin: 0.5rem 0 0; }
.doc ul { padding-left: 1.25rem; }
.doc li + li { margin-top: 0.35rem; }

.meta { color: var(--muted); font-size: 0.95rem; }

.mail { font-size: 1.15rem; font-weight: 600; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding: 3rem 0 2.5rem;
  }
  .ring { justify-self: start; max-width: 240px; }
  .highlights { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
