@font-face {
  font-family: "Manrope47";
  src: url("/47/assets/fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Plex47";
  src: url("/47/assets/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f3ed;
  --paper-deep: #e6e6dd;
  --surface: #fffef9;
  --ink: #0d1713;
  --ink-soft: #405047;
  --line: rgba(13, 23, 19, 0.16);
  --green: #2dde88;
  --green-deep: #08784c;
  --acid: #d9ff57;
  --orange: #ff6b45;
  --font-display: "Manrope47", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Plex47", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(13, 23, 19, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 23, 19, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.legal-shell {
  overflow: clip;
}

.legal-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  height: 92px;
  margin-inline: auto;
  color: #f8fbf9;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.legal-brand img {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.legal-brand > span {
  display: grid;
  line-height: 1;
}

.legal-brand strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.legal-brand small {
  margin-top: 6px;
  color: #aebfb6;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 18px;
  border-radius: 999px;
  color: #d7e3dc;
  font-size: 13px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.header-nav a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.header-nav .header-login {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.header-nav .header-login:hover {
  background: rgba(255, 255, 255, 0.14);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  min-height: 510px;
  padding: 158px 24px 104px;
  background:
    radial-gradient(circle at 77% 25%, rgba(45, 222, 136, 0.18), transparent 27%),
    radial-gradient(circle at 20% 110%, rgba(217, 255, 87, 0.12), transparent 33%),
    var(--ink);
  color: #f8fbf9;
}

.legal-hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  pointer-events: none;
}

.legal-hero::after {
  position: absolute;
  top: 30px;
  right: max(-34px, calc((100vw - 1320px) / 2));
  color: rgba(255, 255, 255, 0.035);
  content: "47";
  font-family: var(--font-display);
  font-size: clamp(240px, 30vw, 480px);
  font-weight: 800;
  letter-spacing: -0.12em;
  line-height: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin-inline: auto;
}

.legal-kicker {
  display: flex;
  gap: 28px;
  margin: 0 0 28px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.legal-kicker span + span {
  position: relative;
  color: #9cb0a5;
}

.legal-kicker span + span::before {
  position: absolute;
  top: 50%;
  left: -17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
  transform: translateY(-50%);
}

.legal-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 780;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.legal-summary {
  max-width: 680px;
  margin: 30px 0 0;
  color: #c7d4cc;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.75;
}

.revision {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  margin-top: 34px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 11px;
}

.revision span {
  color: #9fb0a7;
}

.revision strong {
  color: var(--acid);
  font-weight: 600;
}

.legal-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  width: min(1180px, calc(100% - 48px));
  margin: -42px auto 96px;
}

.legal-index {
  position: sticky;
  top: 24px;
  padding: 34px 0 0;
}

.legal-index > p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-index nav {
  display: grid;
  gap: 7px;
}

.legal-index nav a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.legal-index nav a span {
  width: 31px;
  color: #65746b;
  font-family: var(--font-mono);
  font-size: 10px;
}

.legal-index nav a:hover {
  border-color: var(--line);
  background: rgba(255, 254, 249, 0.62);
  color: var(--ink);
  transform: translateX(2px);
}

.legal-index nav a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 30px rgba(13, 23, 19, 0.15);
}

.legal-index nav a[aria-current="page"] span {
  color: var(--green);
}

.index-note {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 11px;
  margin-top: 26px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 254, 249, 0.52);
}

.index-note > span {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--green-deep);
  box-shadow: 0 0 0 5px rgba(8, 120, 76, 0.11);
}

.index-note p {
  margin: 0;
  color: #435249;
  font-size: 12px;
  line-height: 1.7;
}

.document-card {
  padding: 60px clamp(32px, 6vw, 82px) 44px;
  border: 1px solid rgba(13, 23, 19, 0.1);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 32px 84px rgba(13, 23, 19, 0.12);
}

.document-label {
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--green-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.legal-copy {
  color: #27362e;
  counter-reset: legal-section;
  font-size: 17px;
  line-height: 1.88;
}

.legal-copy h2 {
  position: relative;
  margin: 54px 0 18px;
  padding-left: 48px;
  color: var(--ink);
  counter-increment: legal-section;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

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

.legal-copy h2::before {
  position: absolute;
  top: 4px;
  left: 0;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--green);
  content: counter(legal-section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0;
}

.legal-copy p {
  margin: 0 0 22px;
}

.legal-copy > p:first-child {
  padding: 16px 18px;
  border-left: 3px solid var(--green-deep);
  background: #edf7f1;
  color: #253d31;
  font-size: 15px;
}

.legal-copy ul {
  display: grid;
  gap: 12px;
  margin: 16px 0 26px;
  padding: 0;
  list-style: none;
}

.legal-copy li {
  position: relative;
  padding-left: 28px;
}

.legal-copy li::before {
  position: absolute;
  top: 12px;
  left: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--green-deep);
  border-radius: 2px;
  content: "";
  transform: rotate(45deg);
}

.legal-copy code {
  padding: 0.12em 0.4em;
  border: 1px solid rgba(13, 23, 19, 0.14);
  border-radius: 6px;
  background: var(--paper);
  color: #075f3b;
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.support-note {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  margin-top: 64px;
  padding: 30px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(217, 255, 87, 0.94), rgba(45, 222, 136, 0.76));
  color: var(--ink);
}

.support-note > div:first-child {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 18px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.support-note h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.support-note p {
  margin: 0;
  color: #1f352a;
  font-size: 14px;
  line-height: 1.7;
}

.support-note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.support-note a span {
  margin-left: 8px;
}

.doc-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.doc-switch a {
  display: grid;
  min-height: 72px;
  align-content: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.doc-switch a:hover {
  border-color: rgba(8, 120, 76, 0.5);
  background: #f0f7f3;
  transform: translateY(-2px);
}

.doc-switch small {
  margin-bottom: 4px;
  color: #5a695f;
  font-size: 10px;
}

.doc-switch strong {
  font-size: 13px;
}

.doc-switch-next {
  text-align: right;
}

.legal-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 120px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
  color: #4a5a51;
  font-size: 12px;
}

.footer-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--green);
  font-size: 16px;
  font-weight: 800;
}

.legal-footer p {
  margin: 0;
}

.legal-footer > div {
  display: flex;
  gap: 20px;
}

.legal-footer > div a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #33463c;
  font-weight: 700;
}

.legal-footer > div a:hover {
  color: var(--green-deep);
}

@media (max-width: 820px) {
  .legal-header {
    width: calc(100% - 32px);
    height: 78px;
  }

  .legal-brand img {
    width: 38px;
    height: 38px;
  }

  .legal-brand small {
    display: none;
  }

  .header-nav a {
    padding-inline: 14px;
  }

  .legal-hero {
    min-height: 445px;
    padding: 125px 16px 82px;
  }

  .legal-hero::after {
    top: 96px;
    right: -32px;
    font-size: 220px;
  }

  .legal-kicker {
    margin-bottom: 22px;
  }

  .legal-kicker span + span {
    display: none;
  }

  .legal-hero h1 {
    font-size: clamp(43px, 13vw, 68px);
    line-height: 1.02;
  }

  .legal-summary {
    margin-top: 24px;
    font-size: 17px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 22px;
    width: calc(100% - 32px);
    margin-top: -34px;
    margin-bottom: 64px;
  }

  .legal-index {
    position: relative;
    top: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 254, 249, 0.96);
    box-shadow: 0 18px 44px rgba(13, 23, 19, 0.09);
  }

  .legal-index nav {
    grid-template-columns: 1fr 1fr;
  }

  .legal-index nav a {
    min-height: 52px;
  }

  .index-note {
    display: none;
  }

  .document-card {
    padding: 40px 24px 30px;
    border-radius: 20px;
  }

  .document-label {
    margin-bottom: 32px;
  }

  .legal-copy {
    font-size: 16px;
    line-height: 1.82;
  }

  .legal-copy h2 {
    margin-top: 44px;
    padding-left: 44px;
    font-size: 24px;
  }

  .support-note {
    grid-template-columns: 52px 1fr;
    gap: 16px;
    margin-top: 48px;
    padding: 22px;
  }

  .support-note > div:first-child {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 19px;
  }

  .legal-footer {
    grid-template-columns: auto 1fr;
    width: calc(100% - 32px);
    padding-block: 24px;
  }

  .legal-footer > div {
    grid-column: 1 / -1;
    justify-content: space-between;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .header-status {
    display: none !important;
  }

  .header-nav .header-login {
    padding-inline: 13px;
  }

  .legal-index {
    padding: 18px;
  }

  .legal-index nav {
    grid-template-columns: 1fr;
  }

  .legal-index nav a {
    min-height: 48px;
  }

  .document-card {
    padding-inline: 20px;
  }

  .support-note {
    grid-template-columns: 1fr;
  }

  .doc-switch {
    grid-template-columns: 1fr;
  }

  .doc-switch-spacer {
    display: none;
  }

  .doc-switch-next {
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
