@font-face {
  font-family: WT;
  src: url("../../assets/fonts/HYWenHei-85W.otf");
}

:root {
  --ink: #171a18;
  --paper: #f8f9f5;
  --field: #e7e9e4;
  --line: #b8beb7;
  --muted: #687169;
  --signal: #b6ff42;
  --orange: #ff6b3d;
  --cyan: #3b9fb5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--field); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: #f1f2ed;
  background-image: linear-gradient(rgba(23, 26, 24, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 26, 24, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: WT, "Microsoft YaHei", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }

.terms-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 10px 24px;
  border-bottom: 1px solid #afb5ad;
  background: rgba(241, 242, 237, .96);
  backdrop-filter: blur(16px);
}

.collaboration-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.collaboration-brand > img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid #c3c8c1;
  border-radius: 7px;
  object-fit: cover;
  background: #fff;
}

.collaboration-brand > span { display: grid; gap: 2px; }
.collaboration-brand strong { font-size: 14px; }
.collaboration-brand small { color: #5d665f; font-size: 7px; letter-spacing: .1em; }
.collaboration-brand i { color: #7a837c; font-size: 18px; font-style: normal; font-weight: 900; }

.header-actions,
.language-switch,
.back-project {
  display: flex;
  align-items: center;
}

.header-actions { gap: 9px; }
.language-switch { height: 38px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.language-switch button { width: 36px; height: 36px; border: 0; border-right: 1px solid #d5d9d3; background: transparent; font-size: 9px; font-weight: 900; }
.language-switch button:last-child { border-right: 0; }
.language-switch button:hover { background: #edf1e9; }
.language-switch button.active { color: var(--ink); background: var(--signal); }

.back-project {
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}
.back-project:hover { color: #fff; background: var(--ink); }
.back-project span { font-size: 17px; }

.document-status {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100% - 32px, 1180px);
  min-height: 34px;
  margin: 18px auto 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #e7e9e4;
  color: #626c64;
  font: 8px Consolas, monospace;
  letter-spacing: .1em;
}
.document-status i { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.document-status i:last-of-type { background: var(--cyan); }

.terms-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: min(100% - 32px, 1180px);
  margin: 10px auto 50px;
  border: 1px solid var(--line);
  background: rgba(248, 249, 245, .9);
}

.document-index {
  position: relative;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: #eceee9;
}
.document-index > p { margin: 0 0 18px; color: #5e6860; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.document-index nav { position: sticky; top: 96px; display: grid; gap: 4px; }
.document-index nav a { padding: 9px 10px; border-left: 2px solid #c5cac3; color: #586159; font: 10px/1.45 "Microsoft YaHei", sans-serif; }
.document-index nav a:hover { border-left-color: var(--orange); color: var(--ink); background: #fff; }
.document-index nav span { margin-right: 7px; color: #8a928c; font: 8px Consolas, monospace; }

.index-mark { position: sticky; top: calc(100vh - 70px); display: flex; align-items: center; margin-top: 46px; color: #6b746d; }
.index-mark span { display: grid; width: 22px; height: 22px; border: 1px solid var(--ink); place-items: center; background: #fff; font: 8px Consolas; }
.index-mark i { width: 34px; height: 1px; background: var(--ink); }
.index-mark b { font: 8px Consolas; }

.terms-document { min-width: 0; background: rgba(255, 255, 255, .55); }
.document-heading { padding: clamp(30px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 15px; color: #577d23; font: 900 9px Consolas, monospace; letter-spacing: .16em; }
.document-heading h1 { max-width: 790px; margin: 0; font-size: clamp(32px, 5vw, 58px); line-height: 1.13; }
.lead { max-width: 720px; margin: 21px 0 34px; color: var(--muted); font: 15px/1.9 "Microsoft YaHei", sans-serif; }
.document-heading dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.document-heading dl div { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.document-heading dt { color: #737c75; font-size: 8px; }
.document-heading dd { margin: 5px 0 0; overflow: hidden; font: 10px Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.gcd-license-page .document-heading dl { grid-template-columns: repeat(4, 1fr); }

.terms-content { max-width: 850px; padding: clamp(30px, 6vw, 72px); color: #343936; font: 15px/2 "Microsoft YaHei", sans-serif; }
.terms-section { scroll-margin-top: 94px; }
.terms-section + .terms-section { margin-top: 54px; padding-top: 9px; border-top: 1px solid #d6dad4; }
.terms-section h2 { margin: 0 0 17px; color: var(--ink); font: 900 clamp(20px, 2.5vw, 27px)/1.35 WT, "Microsoft YaHei", sans-serif; }
.terms-section p { margin: 0 0 19px; }
.terms-section ul { margin: -5px 0 20px; padding-left: 25px; }
.terms-section ol { margin: -5px 0 20px; padding-left: 25px; }
.terms-meta { margin-top: 58px; padding: 17px 19px; border-left: 3px solid var(--signal); background: #edf3e7; }
.terms-meta p { margin: 0 0 8px; }
.terms-meta p:last-child { margin-bottom: 0; }
.terms-meta a { color: #456c16; font-weight: 900; overflow-wrap: anywhere; }
.terms-signoff { margin-top: 38px !important; color: #626b64; font-weight: 800; letter-spacing: .04em; }

.document-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(30px, 6vw, 72px);
  border-top: 1px solid var(--line);
  background: #e7e9e4;
}
.document-footer div { display: grid; gap: 3px; }
.document-footer small { color: #737c75; font-size: 8px; }
.document-footer strong { font: 9px Consolas, monospace; letter-spacing: .12em; }
.document-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; color: var(--ink); background: var(--signal); font-size: 10px; font-weight: 900; }
.document-footer a:hover { background: #a5f226; }
.document-footer a span { font-size: 17px; }

@media (max-width: 780px) {
  .terms-header { align-items: stretch; flex-direction: column; gap: 8px; padding: 8px 12px 10px; }
  .collaboration-brand > img { width: 42px; height: 42px; }
  .collaboration-brand .sendyun-name,
  .collaboration-brand i { display: none; }
  .header-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .language-switch { width: 100%; }
  .language-switch button { width: 25%; }
  .document-status { width: calc(100% - 16px); margin-top: 10px; overflow: hidden; white-space: nowrap; }
  .terms-layout { display: block; width: calc(100% - 16px); margin-bottom: 20px; }
  .document-index { padding: 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .document-index > p { margin-bottom: 9px; }
  .document-index nav { position: static; display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
  .document-index nav a { min-width: max-content; padding: 7px 9px; border: 1px solid #c5cac3; background: #fff; }
  .index-mark { display: none; }
  .document-heading { padding: 30px 20px; }
  .document-heading h1 { font-size: 31px; }
  .lead { font-size: 14px; }
  .document-heading dl { grid-template-columns: 1fr; }
  .gcd-license-page .document-heading dl { grid-template-columns: 1fr; }
  .terms-content { padding: 34px 20px; font-size: 14px; }
  .terms-section + .terms-section { margin-top: 42px; }
  .document-footer { align-items: stretch; flex-direction: column; padding: 20px; }
  .document-footer a { justify-content: center; }
}

@media (max-width: 430px) {
  .collaboration-brand > span small { display: none; }
  .back-project { padding: 0 10px; }
  .back-project b { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

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