:root {
  color-scheme: light;
  --paper: #fffefa;
  --surface: #ffffff;
  --ink: #1a1a21;
  --ink-soft: #696872;
  --amber: #d99000;
  --amber-strong: #a96c00;
  --amber-soft: #fff4d6;
  --hairline: rgba(26, 26, 33, 0.12);
  --card: #f7f6f2;
  --shadow: 0 18px 50px rgba(44, 36, 17, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #14141a;
    --surface: #19191f;
    --ink: #f2f1ee;
    --ink-soft: #aaa9b1;
    --amber: #ffc451;
    --amber-strong: #ffd77d;
    --amber-soft: #2d2719;
    --hairline: rgba(242, 241, 238, 0.14);
    --card: #1e1e25;
    --shadow: none;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

[data-lang] { display: none !important; }
html[data-language="en"] [data-lang="en"],
html[data-language="zh"] [data-lang="zh"] { display: revert !important; }

a { color: var(--amber-strong); text-underline-offset: 3px; }
a:hover { color: var(--amber); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--amber) 48%, transparent);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 0 30px 88px;
}

header.site {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 80px;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  color: var(--ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--amber); }

nav.site {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}
nav.site a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
}
nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--ink); }

.language-toggle {
  min-width: 62px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(30, 27, 18, 0.04);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.language-toggle:hover { border-color: var(--amber); color: var(--amber-strong); }

.page-hero {
  padding: 68px 0 36px;
  border-bottom: 1px solid var(--hairline);
}
.eyebrow {
  color: var(--amber-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
h1 {
  margin: 10px 0 12px;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 7vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.018em;
}
.updated { color: var(--ink-soft); font-size: 14px; }
.page-lead {
  max-width: 43rem;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
}

.prose { max-width: 760px; }
.prose section {
  padding: 38px 0;
  border-bottom: 1px solid var(--hairline);
}
.prose section:last-child { border-bottom: 0; }
.prose h2 {
  margin-bottom: 14px;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 4vw, 28px);
  line-height: 1.3;
}
.prose h3 { margin: 26px 0 8px; font-size: 17px; line-height: 1.45; }
.prose p { margin: 12px 0; }
.prose ul,
.prose ol { margin: 14px 0 0 22px; }
.prose li { margin: 8px 0; padding-left: 3px; }
.prose strong { font-weight: 700; }

.notice,
.contact-card {
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--card);
}
.notice { border-left: 4px solid var(--amber); }
.notice p:first-child,
.contact-card p:first-child { margin-top: 0; }
.notice p:last-child,
.contact-card p:last-child { margin-bottom: 0; }

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.contact-card h2 {
  margin-bottom: 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
}
.contact-card p { color: var(--ink-soft); }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { color: var(--paper); opacity: 0.88; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }

.support-section { padding: 42px 0 0; }
.support-section > h2 {
  margin-bottom: 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(25px, 4vw, 30px);
}
.section-intro { max-width: 44rem; color: var(--ink-soft); }
.faq-list { margin-top: 22px; border-top: 1px solid var(--hairline); }
.faq-list details { border-bottom: 1px solid var(--hairline); }
.faq-list summary {
  position: relative;
  padding: 20px 42px 20px 0;
  cursor: pointer;
  font-weight: 680;
  line-height: 1.5;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 17px;
  color: var(--amber-strong);
  font-size: 22px;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { max-width: 44rem; padding: 0 42px 22px 0; color: var(--ink-soft); }
.faq-answer p { margin: 9px 0; }
.faq-answer ul { margin: 9px 0 0 21px; }
.faq-answer li { margin: 6px 0; }

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.quick-link {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.quick-link:hover { border-color: var(--amber); color: var(--ink); }
.quick-link strong { display: block; margin-bottom: 4px; }
.quick-link span { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }

footer.site {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 76px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 13.5px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--ink); }

/* Existing home page */
.hero { padding: 96px 0 0; text-align: center; }
.hero h1 { font-size: clamp(36px, 8vw, 56px); }
.hero .tagline { max-width: 34em; margin: 18px auto 8px; color: var(--ink-soft); font-size: 19px; }
.hero .verse {
  max-width: 30em;
  margin: 40px auto 0;
  color: var(--ink-soft);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  font-style: italic;
}
.hero .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

@media (max-width: 700px) {
  .wrap { padding: 0 20px 64px; }
  header.site { grid-template-columns: 1fr auto; gap: 12px 18px; padding: 18px 0 14px; }
  nav.site {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    padding-top: 2px;
  }
  .language-toggle { grid-column: 2; grid-row: 1; }
  .page-hero { padding: 48px 0 30px; }
  .page-lead { font-size: 17px; }
  .prose section { padding: 32px 0; }
  .contact-card { grid-template-columns: 1fr; gap: 16px; }
  .contact-card .btn { justify-self: start; }
  .quick-links { grid-template-columns: 1fr; }
  footer.site { flex-direction: column; margin-top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
