/* Hey Momo's static pages (about, support, privacy, terms; public/zh/ holds the Chinese About and Support), restyled
   2026-11-17 after Hark's in-app privacy page: a calm header with the mark, then the page as one sheet, "Last updated"
   in quiet text over a large serif title, body text at 17px with 1.6 leading in a comfortable column, a short table of
   contents on the long pages, and an anchor on each section heading. The home page's palette (the day's sky over the
   page, night in dark: packages/shared day-cycle.ts DAY_TOKENS). Couture-ui surfaces and type: four layered surfaces,
   hairlines of the ink only (no dark borders, no pure black), the double-ring focus, dark weights 40 lower, pretty wrapping
   with text across the whole column. Mobile first: on a phone the sheet is the page. */
:root {
  --sky: #BFE1EC; --s0: #E6F0E8; --s1: #F3F8F3; --s2: #FCFEFC; --s3: #CFE2D4;
  --ink: #1D2B23; --ink-2: #4E5E54; --ink-3: #6E7C73; --hair: #1D2B2312;
  --accent: #1F5F8F; --primary: #B5431F;
  --w-reg: 400; --w-med: 500; --w-semi: 600;
  --sans: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", "Source Serif 4", Georgia, "Songti SC", "Noto Serif SC", "Times New Roman", serif;
  --col: 720px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #121A2A; --s0: #0E1116; --s1: #14181E; --s2: #181D24; --s3: #1F252D;
    --ink: #E8ECF1; --ink-2: #A3ACB7; --ink-3: #7F8994; --hair: #E8ECF112;
    --accent: #8BC6EF; --primary: #F2C46D;
    --w-reg: 360; --w-med: 460; --w-semi: 560;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--s2);
  font: var(--w-reg) 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* ---- the header: the mark, which goes home, and the language where a page has two */
.top, main, .foot { width: min(var(--col), calc(100% - 40px)); margin-inline: auto; }
.top { display: flex; align-items: center; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 0 0; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); font-size: 16px; font-weight: var(--w-semi); letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 0 0 1px var(--hair); }
.top .lang { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: var(--w-med); text-decoration: none; }
.top .lang:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* ---- the sheet */
main { padding: 28px 0 40px; }
.doc-head { margin: 0 0 28px; }
.meta { margin: 0 0 10px; color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; }
h1 {
  margin: 0 0 8px; font-family: var(--serif); font-size: clamp(38px, 10vw, 52px); line-height: 1.06; font-weight: var(--w-med);
  letter-spacing: -0.02em; text-wrap: balance;
}
.doc-head h1 { margin: 0; }
h2 {
  position: relative; margin: 48px 0 12px; font-size: 21px; line-height: 1.3; font-weight: var(--w-semi); letter-spacing: -0.012em;
  text-wrap: balance; scroll-margin-top: 24px;
}
p { margin: 0 0 16px; }
p, li { text-wrap: pretty; }
strong { font-weight: var(--w-semi); }
ul, ol { margin: 0 0 16px; padding-left: 1.25em; }
li { margin: 10px 0; padding-left: 0.2em; }
li::marker { color: var(--ink-3); }
[id] { scroll-margin-top: 24px; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: none; border-radius: 6px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent),
              0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* A section heading's anchor: a quiet # after its words, shown on hover (always faintly where there's no hover). */
h2 .anchor { margin-left: 0.4em; color: var(--ink-3); font-weight: var(--w-reg); text-decoration: none; opacity: 0; transition: opacity 160ms ease-out; }
h2:hover .anchor, h2:target .anchor { opacity: 1; }
h2 .anchor:hover { color: var(--accent); }
@media (hover: none) { h2 .anchor { opacity: 0.45; } }
h2:target { animation: legal-target 1.6s ease-out 1; }
@keyframes legal-target { from { color: var(--accent); } to { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { h2:target { animation: none; } }

/* ---- the table of contents on the long pages: a raised panel, two columns where there's room */
.toc { margin: 28px 0 8px; padding: 18px 20px 14px; border-radius: 18px; background: var(--s1); box-shadow: 0 0 0 1px var(--hair); }
.toc-title { margin: 0 0 6px; color: var(--ink-3); font-size: 13px; font-weight: var(--w-med); letter-spacing: 0.02em; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { margin: 0; padding: 0; counter-increment: toc; break-inside: avoid; }
.toc a { display: flex; gap: 10px; padding: 6px 0; color: var(--ink); font-size: 15px; line-height: 1.4; text-decoration: none; }
.toc a::before { content: counter(toc); flex: none; min-width: 1.4em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--accent); }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 28px; } }

/* ---- About and Support */
.lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
h1 + .lede { margin-top: 18px; }
.links { margin-top: 32px; }

/* ---- the footer */
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 24px 0 calc(env(safe-area-inset-bottom, 0px) + 40px); color: var(--ink-2); font-size: 14px; box-shadow: 0 -1px 0 var(--hair); }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .copy { flex-basis: 100%; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---- wider screens: the sheet over the day's sky */
@media (min-width: 760px) {
  body { background: linear-gradient(var(--sky), var(--s0) 480px) no-repeat, var(--s0); }
  .top { min-height: 76px; padding-top: 20px; }
  main {
    margin-top: 16px; padding-block: 56px 60px; border-radius: 28px; background: var(--s2);
    box-shadow: 0 0 0 1px var(--hair), 0 24px 60px -32px color-mix(in srgb, var(--ink) 28%, transparent);
  }
  /* The text column stays --col wide inside the sheet; the header and the footer line up with the sheet's edges. */
  .top, main, .foot { width: min(calc(var(--col) + 144px), calc(100% - 64px)); }
  main { padding-inline: clamp(40px, 6vw, 72px); }
  .top, .foot { padding-inline: 8px; }
  .foot { box-shadow: none; padding-top: 22px; }
  .foot .copy { flex-basis: auto; margin-left: auto; }
  h2 .anchor { position: absolute; left: -1.1em; margin: 0; }
}

/* ---- the open-source notices (licenses.html, made by scripts/licenses.mjs): each package a line with hairlines between,
   then each distinct licence text folded in a raised block */
.oss { margin: 0 0 16px; padding: 0; list-style: none; }
.oss li { margin: 0; padding: 12px 0; box-shadow: 0 1px 0 var(--hair); }
.oss li:last-child { box-shadow: none; }
.oss p { margin: 0; }
.oss-name { font-weight: var(--w-semi); overflow-wrap: anywhere; }
.oss-name a { color: var(--ink); text-decoration: none; }
.oss-name a:hover { color: var(--accent); text-decoration: underline; }
.oss-ver, .oss-pkg { margin-left: 4px; color: var(--ink-3); font-size: 14px; font-weight: var(--w-reg); font-variant-numeric: tabular-nums; }
.oss-meta { color: var(--ink-2); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.oss-text { margin: 10px 0; border-radius: 14px; background: var(--s1); box-shadow: 0 0 0 1px var(--hair); }
.oss-text summary {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
  font-size: 15px; line-height: 1.45; list-style: none;
}
.oss-text summary::-webkit-details-marker { display: none; }
.oss-text summary::before {
  content: ""; flex: none; align-self: center; width: 6px; height: 6px; margin: 0 2px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform 160ms ease-out;
}
.oss-text[open] summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .oss-text summary::before { transition: none; } }
.oss-text summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent),
              0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}
.oss-lic { flex: none; font-weight: var(--w-semi); }
.oss-who { color: var(--ink-2); overflow-wrap: anywhere; }
.oss-note { margin: 0; padding: 0 16px 8px; color: var(--ink-3); font-size: 14px; }
.oss-text pre {
  margin: 0; padding: 4px 16px 16px; color: var(--ink-2); font: 12.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; scroll-margin-top: 72px;
}
