@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f1eb;
  --ink: #1c1915;
  --muted: #4a453e;
  --line: #ddd6c8;
  --focus: #1c1915;
  --page: 72rem;
  --gutter: 1.5rem;
  --measure: 38rem;
  --font: 1.0625rem;
  --font-sm: 0.9375rem;
  --h1: clamp(1.65rem, 2.2vw + 1rem, 3.15rem);
  --h2: 1.5rem;
  --h3: 1.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  font-size: var(--font);
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: normal;
  word-break: normal;
}

img, svg { max-width: 100%; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
  z-index: 50;
}

.skip:focus { top: 0.6rem; }

.wrap {
  width: min(var(--page), calc(100% - (2 * var(--gutter))));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav langs";
  align-items: center;
  column-gap: var(--space-lg);
  min-height: 4.5rem;
}

.brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.65rem 0;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-family: Newsreader, "Iowan Old Style", Palatino, "Songti SC", "Noto Serif SC", serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.place {
  color: var(--muted);
  font-size: var(--font-sm);
  line-height: 1.2;
  white-space: nowrap;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.15rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.2rem 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.32em;
}

.langs {
  grid-area: langs;
  justify-self: end;
  display: flex;
  align-items: center;
  margin: 0;
}

.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.55rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.langs a:hover { text-decoration: underline; text-underline-offset: 0.28em; }

.langs a[aria-current="true"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
  text-underline-offset: 0.32em;
}

.sep {
  color: var(--ink);
  font-weight: 400;
  line-height: 1;
}

.page-head { padding: var(--space-2xl) 0 var(--space-xl); }

.section { padding: 0 0 var(--space-2xl); }

h1, h2, h3 {
  font-family: Newsreader, "Iowan Old Style", Palatino, "Songti SC", "Noto Serif SC", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--ink);
}

h1 {
  margin: 0;
  max-width: min(18em, 100%);
  font-size: var(--h1);
  text-wrap: wrap;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  margin: 0;
  font-size: var(--h2);
}

h3 {
  margin: 0;
  font-size: var(--h3);
  line-height: 1.25;
}

.phrase,
.zh-phrase {
  white-space: nowrap;
}

html[lang="zh-Hans"] {
  line-break: strict;
  word-break: keep-all;
}

html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3,
html[lang="zh-Hans"] p,
html[lang="zh-Hans"] li,
html[lang="zh-Hans"] dd {
  overflow-wrap: normal;
  word-break: keep-all;
  line-break: strict;
}

.stack > * + * { margin-top: var(--space-md); }

.support {
  max-width: var(--measure);
  margin: var(--space-md) 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.45;
}

.section-copy {
  max-width: var(--measure);
  margin: var(--space-md) 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
}

.button,
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.button {
  padding: 0.45rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.button.quiet {
  background: transparent;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.action {
  padding: 0.35rem 0.15rem;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.service-grid,
.point-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-lg);
  margin-top: var(--space-xl);
}

.service,
.point {
  min-width: 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.service h3,
.point h3 { margin-bottom: var(--space-sm); }

.service p,
.point p {
  margin: 0;
  max-width: 36rem;
}

.service .for {
  margin-top: var(--space-sm);
  color: var(--muted);
}

.for-label {
  color: var(--ink);
  font-weight: 600;
}

.for-label::after { content: " · "; }

.trust-line {
  margin: var(--space-xl) 0 0;
  max-width: var(--measure);
  color: var(--muted);
}

.prose { max-width: var(--measure); }

.prose h2 { margin: var(--space-xl) 0 var(--space-sm); }

.prose h2:first-child { margin-top: 0; }

.prose p { margin: 0 0 var(--space-md); }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 1.15fr) minmax(18rem, 0.85fr);
  gap: var(--space-xl) var(--space-2xl);
  align-items: start;
}

.facts { margin: 0; }

.facts div {
  display: grid;
  gap: 0.15rem;
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-sm);
}

.facts dd { margin: 0; }

a[href^="mailto:"] { overflow-wrap: anywhere; }

label {
  display: block;
  margin: var(--space-md) 0 0.3rem;
  color: var(--muted);
  font-size: var(--font-sm);
}

input, textarea {
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

textarea { min-height: 8rem; resize: vertical; }

.form-note {
  margin: 0;
  color: var(--muted);
}

.form-actions { margin-top: var(--space-lg); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-xl) 0 var(--space-2xl);
  color: var(--muted);
  font-size: var(--font-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 1.15fr) minmax(16rem, 0.85fr);
  gap: var(--space-lg) var(--space-xl);
}

.site-footer strong {
  color: var(--ink);
  font-weight: 600;
}

.footer-links,
.fine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 1rem;
}

.footer-links { margin-bottom: var(--space-sm); }

.footer-links a,
.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.footer-links a:hover,
.text-btn:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cookie {
  position: static;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--font);
}

.cookie[hidden] { display: none; }

.cookie-inner,
.cookie-panel {
  width: min(var(--page), calc(100% - (2 * var(--gutter))));
  margin: 0 auto;
  padding: var(--space-md) 0 var(--space-lg);
}

.cookie p {
  margin: 0 0 var(--space-sm);
  max-width: 46rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem var(--space-lg);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: var(--measure);
  margin: var(--space-sm) 0;
}

.check input {
  width: auto;
  min-height: 1.1rem;
  margin-top: 0.35rem;
}

@media (max-width: 960px) {
  .service-grid,
  .point-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  :root { --gutter: 1.125rem; }

  .header-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand langs"
      "nav nav";
    column-gap: var(--space-sm);
    row-gap: 0;
    min-height: 0;
    padding-bottom: 0.2rem;
  }

  .wordmark { font-size: 1.02rem; }

  .nav { padding-bottom: 0.15rem; }

  .page-head { padding: var(--space-xl) 0 var(--space-lg); }

  .contact-layout,
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  h1 { max-width: 100%; }
}
