/* PersonalWork — google-app.teyvat.org
 *
 * One stylesheet, no external requests: the fonts are the system stack and every
 * asset is same-origin. Light and dark are both defined; the page follows the
 * reader's system preference and can be forced with data-theme.
 */

:root {
  --brand: #2e43e8;
  --brand-2: #6d28d9;
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --surface: #ffffff;
  --text: #16181d;
  --text-soft: #4d525e;
  --text-faint: #6f7480;
  --line: #e3e6ee;
  --line-strong: #cfd4e2;
  --good: #10693f;
  --good-bg: #eaf6ef;
  --warn-bg: #f4f5f9;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 20, 40, 0.04), 0 8px 24px rgba(16, 20, 40, 0.06);
  --wrap: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1116;
    --bg-alt: #14171e;
    --surface: #171a22;
    --text: #eef0f5;
    --text-soft: #b6bcc9;
    --text-faint: #8b93a3;
    --line: #262b36;
    --line-strong: #333a48;
    --good: #6ee7a8;
    --good-bg: #12261c;
    --warn-bg: #191d26;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "Noto Sans", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 62px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { display: block; border-radius: 8px; }
.brand-name { font-weight: 700; letter-spacing: -0.015em; font-size: 1.02rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--text-soft); text-decoration: none; font-size: 0.92rem;
  padding: 6px 10px; border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--text); background: var(--bg-alt); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(46, 67, 232, 0.13), transparent 62%),
    radial-gradient(760px 400px at 92% 0%, rgba(109, 40, 217, 0.11), transparent 60%),
    var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 58px 0 50px;
}
.hero-inner { max-width: 830px; }
.hero-logo { border-radius: 24px; box-shadow: var(--shadow); }
.hero h1 {
  font-size: clamp(2.05rem, 4.6vw, 3rem);
  line-height: 1.1; letter-spacing: -0.03em; margin: 22px 0 12px;
}
.tagline { font-size: 1.16rem; color: var(--text-soft); margin: 0 0 22px; max-width: 66ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 26px; }
.chips li {
  font-size: 0.82rem; color: var(--text-soft); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 12px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; background: var(--brand); color: #fff;
  border: 1px solid transparent;
}
.btn:hover { background: var(--brand-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--brand); }
.hero-note {
  font-size: 0.9rem; color: var(--text-faint); border-left: 3px solid var(--line-strong);
  padding-left: 14px; margin: 0; max-width: 72ch;
}

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); letter-spacing: -0.022em; line-height: 1.2; margin: 0 0 14px; }
h3 { font-size: 1.06rem; letter-spacing: -0.012em; margin: 0 0 8px; }
h4 { font-size: 0.98rem; margin: 0 0 6px; }
.lede { font-size: 1.05rem; color: var(--text-soft); max-width: 78ch; margin: 0 0 28px; }
.subhead { margin: 42px 0 14px; font-size: 1.2rem; }
.footnote { font-size: 0.9rem; color: var(--text-faint); max-width: 82ch; margin-top: 20px; }
.meta-line { font-size: 0.88rem; color: var(--text-faint); margin: 0 0 18px; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(244px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px;
}
.card p { margin: 0; color: var(--text-soft); font-size: 0.96rem; }
.card p + p { margin-top: 8px; }
.card-note { font-size: 0.86rem !important; color: var(--text-faint) !important; }

/* ---------- flow ---------- */
.flow { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }
.flow-step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; position: relative;
}
.flow-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 0.8rem; font-weight: 700; margin-bottom: 10px;
}
.flow-step p { margin: 0; color: var(--text-soft); font-size: 0.94rem; }

/* ---------- checklists ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.checklist li {
  position: relative; padding-left: 30px; color: var(--text-soft); font-size: 0.96rem;
}
.check-negative li::before {
  content: "✕"; position: absolute; left: 4px; top: 0; color: #c0392b; font-weight: 700; font-size: 0.85rem;
}

/* ---------- callout ---------- */
.callout {
  margin-top: 30px; background: var(--good-bg); border: 1px solid var(--line-strong);
  border-left: 4px solid var(--good); border-radius: var(--radius); padding: 20px 24px;
}
.callout h3 { color: var(--good); }
.callout p { margin: 0 0 10px; font-size: 0.95rem; color: var(--text-soft); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */
.table-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; font-size: 0.91rem; min-width: 620px; }
.scope-table { min-width: 700px; }
thead th {
  text-align: left; padding: 13px 16px; background: var(--warn-bg); color: var(--text);
  font-size: 0.82rem; letter-spacing: 0.02em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--text); font-weight: 600; }
code {
  font-family: var(--mono); font-size: 0.84em; background: var(--warn-bg);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--text);
  word-break: break-word;
}

/* ---------- prose (privacy / terms pages) ---------- */
.page-head { padding: 42px 0 26px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.028em; margin: 0 0 12px; }
.crumb { font-size: 0.85rem; color: var(--text-faint); margin: 0 0 12px; }
.crumb a { color: var(--text-faint); }
.toc { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 20px; }
.toc a {
  font-size: 0.85rem; color: var(--text-soft); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}
.toc a:hover { color: var(--brand); border-color: var(--brand); }
/* The prose pages use the full container width so the wide data tables fit,
   while running text is capped at a readable measure. (.prose is applied to the
   same element as .wrap, so it must not narrow the container.) */
.prose { max-width: var(--wrap); }
.prose > p, .prose > ul, .prose > ol, .prose > h2, .prose > .callout, .prose > .footnote {
  max-width: 74ch;
}
.data-table { table-layout: fixed; }
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 16%; }
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 34%; }
.data-table th:nth-child(3), .data-table td:nth-child(3) { width: 29%; }
.data-table th:nth-child(4), .data-table td:nth-child(4) { width: 21%; }
.prose h2 { margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose .table-scroll { margin: 20px 0; }

/* ---------- summary / details ---------- */
.summary-zh {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 20px;
}
.summary-zh summary { cursor: pointer; font-weight: 600; color: var(--text); }
.summary-zh p { color: var(--text-soft); font-size: 0.95rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 34px 0 44px; }
.footer-inner { display: grid; gap: 14px; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.015em; }
.footer-brand img { border-radius: 7px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { color: var(--text-soft); text-decoration: none; font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--brand); text-decoration: underline; }
.footer-note { font-size: 0.85rem; color: var(--text-faint); margin: 0; max-width: 76ch; }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 42px 0; }
  .header-inner { min-height: 56px; }
  .site-nav { margin-left: 0; width: 100%; }
}

@media print {
  .site-header, .site-footer, .toc, .hero-cta, .skip { display: none; }
  body { font-size: 11pt; }
  .section-alt, .hero, .page-head { background: #fff; }
}
