:root {
  color-scheme: light;
  --page-bg: linear-gradient(155deg, #e9f4f7 0%, #d8e9ef 48%, #eef5f2 100%);
  --ink: #142536;
  --heading: #102133;
  --body: #2f3d49;
  --muted: #697684;
  --link: #285f88;
  --footer-link: #3f657c;
  --footer-muted: #81909c;
  --link-bg: rgba(255, 255, 255, 0.42);
  --line: rgba(39, 74, 98, 0.16);
  --content-width: 720px;
  --page-inline: 22px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  background-attachment: fixed;
  background-color: #e5f2f4;
  scrollbar-color: rgba(76, 116, 138, 0.38) rgba(216, 233, 239, 0.28);
  scrollbar-width: thin;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  background: var(--page-bg);
  background-attachment: fixed;
  background-color: #e5f2f4;
  color: var(--body);
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(216, 233, 239, 0.28);
}

::-webkit-scrollbar-thumb {
  background: rgba(76, 116, 138, 0.38);
  border: 2px solid rgba(216, 233, 239, 0.28);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(76, 116, 138, 0.52);
}

a {
  color: var(--link);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration: underline;
}

.home-shell,
.document-shell {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 44px var(--page-inline) 36px;
  background: transparent;
}

.home-shell {
  flex: 1 0 auto;
  min-height: calc(100svh - 116px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(32px, 5vw, 46px);
  padding-top: clamp(86px, 14vh, 136px);
  padding-bottom: 34px;
  text-align: center;
}

.brand-header,
.document-brand {
  display: flex;
  align-items: center;
}

.brand-header {
  gap: 14px;
}

.home-shell .brand-header {
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.home-brand-copy {
  max-width: 100%;
}

.app-icon {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  border-radius: 17px;
  box-shadow: 0 14px 34px rgba(29, 67, 89, 0.14);
}

.app-icon-small {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.brand-name {
  margin: 0 0 6px;
  color: var(--heading);
  font-size: 1.06rem;
  font-weight: 700;
}

.home-shell .brand-name {
  margin-bottom: 8px;
  font-size: clamp(1.02rem, 1.8vw, 1.16rem);
  font-weight: 720;
  line-height: 1.25;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.28;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.7rem, 5.4vw, 3rem);
  font-weight: 800;
  overflow-wrap: break-word;
}

.home-shell h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.35rem);
  font-weight: 740;
  line-height: 1.24;
  text-wrap: balance;
}

.entry-list {
  display: grid;
  gap: 10px;
  width: min(100%, 340px);
  margin-left: auto;
  margin-right: auto;
}

.language-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 12px;
  width: 100%;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.document-shell > .language-nav {
  justify-content: flex-start;
  margin: -20px 0 30px;
}

.language-nav a {
  display: inline-block;
  padding: 3px 0;
  color: var(--footer-link);
  white-space: nowrap;
}

.language-nav a[aria-current="page"] {
  color: var(--heading);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.entry-link,
.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}

.entry-link {
  min-height: 48px;
  justify-content: space-between;
  width: 100%;
  padding: 0 17px;
  background: var(--link-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  font-size: 1rem;
  overflow-wrap: break-word;
  text-align: left;
}

.entry-link::after {
  content: ">";
  color: var(--link);
  font-size: 1.25rem;
}

.back-link {
  min-height: 32px;
  padding: 0;
  margin-bottom: 34px;
  color: #3d647a;
  font-size: 0.95rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.document-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.document-brand {
  gap: 10px;
  margin-bottom: 22px;
  color: var(--heading);
  font-size: 0.96rem;
  font-weight: 800;
}

.document-header h1 {
  margin-bottom: 16px;
  font-size: clamp(1.7rem, 6.8vw, 3rem);
}

.date-block {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.date-block p {
  margin: 0;
}

.legal-content {
  padding-top: 34px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-content section {
  margin: 0 0 38px;
}

.legal-content h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  font-weight: 800;
}

.legal-content h3 {
  margin: 32px 0 12px;
  font-size: 1.12rem;
  font-weight: 800;
}

.legal-content p {
  margin: 0 0 16px;
  color: var(--body);
  font-size: 1.04rem;
  overflow-wrap: break-word;
}

.legal-content ul,
.legal-content ol {
  margin: 16px 0 0;
  padding-left: 1.35rem;
}

.legal-content li {
  margin: 10px 0;
  padding-left: 0.1rem;
  line-height: 1.82;
  overflow-wrap: break-word;
}

.site-footer {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 22px var(--page-inline) 34px;
  background: transparent;
  color: var(--footer-muted);
  font-size: 0.92rem;
  text-align: left;
}

.home-shell + .site-footer {
  text-align: center;
}

.site-footer a {
  color: var(--footer-link);
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--footer-muted);
}

.document-footer {
  padding-top: 0;
}

@media (min-width: 760px) {
  .home-shell,
  .document-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .home-shell {
    min-height: calc(100svh - 96px);
    gap: 50px;
    padding-top: clamp(132px, 22vh, 210px);
    padding-bottom: 20px;
  }

  .home-shell .brand-header {
    gap: 14px;
  }

  .home-shell .brand-name {
    margin-bottom: 6px;
  }

  .home-shell + .site-footer {
    padding-top: 10px;
    padding-bottom: 28px;
  }
}

@media (max-width: 639px) {
  :root {
    --page-inline: 18px;
  }

  .home-shell {
    flex: 1 0 auto;
    min-height: 0;
    padding-top: 50px;
    padding-bottom: 24px;
    gap: 32px;
  }

  .home-shell .app-icon {
    width: 62px;
    height: 62px;
    border-radius: 15px;
  }

  .entry-list {
    width: min(100%, 340px);
    margin-left: auto;
    margin-right: auto;
  }

  .document-shell {
    padding-top: 32px;
    padding-bottom: 28px;
  }

  .document-shell > .language-nav {
    margin-top: -18px;
    margin-bottom: 26px;
  }

  .document-header {
    padding-bottom: 20px;
  }

  .document-brand {
    margin-bottom: 18px;
  }

  .legal-content {
    padding-top: 28px;
  }

  .legal-content section {
    margin-bottom: 32px;
  }

  .legal-content h2 {
    font-size: 1.32rem;
  }

  .legal-content h3 {
    margin-top: 26px;
    font-size: 1.06rem;
  }

  .legal-content p {
    font-size: 1rem;
  }

  .legal-content ul,
  .legal-content ol {
    padding-left: 1.12rem;
  }

  .site-footer {
    margin-top: auto;
    padding-top: clamp(34px, 8svh, 64px);
    padding-bottom: 30px;
  }
}

@media (max-width: 360px) {
  :root {
    --page-inline: 16px;
  }

  .home-shell .brand-header {
    gap: 12px;
  }

  .home-shell .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .entry-link {
    padding: 0 14px;
  }
}

body.home-page {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  justify-content: center;
  padding-block: clamp(28px, 5svh, 48px);
  background: var(--page-bg);
  background-attachment: fixed;
  background-color: #e5f2f4;
}

.home-page .home-shell {
  flex: 0 0 auto;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--page-bg);
  background-attachment: fixed;
}

.home-page .site-footer {
  flex: 0 0 auto;
  margin-top: clamp(24px, 4svh, 38px);
  padding-top: 0;
  padding-bottom: 0;
  text-align: center;
}
