:root {
  --page: #f5f7f4;
  --surface: #ffffff;
  --text: #202622;
  --muted: #68706b;
  --line: #dce2dd;
  --line-strong: #c6cfc8;
  --primary: #245d4d;
  --primary-dark: #173f35;
  --accent: #b45236;
  --focus: #246baf;
  --shell: 980px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--page);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

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

.site-shell {
  width: min(var(--shell), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand-cn {
  font-weight: 700;
}

.brand-en {
  color: var(--muted);
  font-size: 12px;
}

.site-links {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 24px;
}

.site-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.site-links a:hover,
.site-links a[aria-current="page"] {
  color: var(--text);
}

.site-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.page-main {
  flex: 1;
  padding-top: 54px;
  padding-bottom: 72px;
}

.page-heading {
  max-width: 700px;
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 720;
  line-height: 1.18;
}

.page-heading p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.footer-row p {
  margin: 0;
}

.footer-row a {
  color: var(--muted);
}

.home-footer .footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.home-footer .footer-row > p:first-child {
  grid-column: 1;
  justify-self: start;
}

.home-footer .icp-record {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.home-footer .icp-record a:hover {
  color: var(--text);
}

@media (max-width: 700px) {
  .site-shell {
    width: min(var(--shell), calc(100% - 30px));
  }

  .site-nav {
    min-height: auto;
    padding: 14px 0 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-links {
    width: 100%;
    min-height: 44px;
    gap: 0;
    justify-content: space-between;
  }

  .site-links a {
    font-size: 13px;
  }

  .page-main {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .page-heading {
    margin-bottom: 38px;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .footer-row {
    min-height: 84px;
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }

  .home-footer .footer-row {
    display: flex;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .brand-en {
    display: none;
  }

  .site-links a {
    font-size: 12px;
  }
}
