:root {
  --bg: #1b2028;
  --bg-soft: #2a313b;
  --paper: #fcfaf4;
  --paper-line: #e8e0d4;
  --paper-text: #23211d;
  --paper-muted: #6f695f;
  --accent: #ff9f3d;
  --accent-soft: #ffd089;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--paper-text);
  background:
    radial-gradient(circle at top left, rgba(255, 159, 61, 0.18), transparent 22%),
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(180deg, #232932 0%, #1a2028 100%);
}

a {
  color: inherit;
}

.document-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7f4ef;
  text-decoration: none;
  font-weight: 700;
}

.back-link::before {
  content: "<";
  font-weight: 800;
}

.language-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: #f7f4ef;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.lang-btn.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #251c12;
  font-weight: 800;
}

.paper {
  position: relative;
  padding: 56px min(6vw, 64px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
  background-size: 100% 36px, 100% 100%;
  border: 1px solid rgba(232, 224, 212, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.paper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 42px;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 159, 61, 0.35), rgba(255, 159, 61, 0.08));
}

.paper-head {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--paper-line);
}

.paper-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 159, 61, 0.14);
  color: #9b5a14;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paper h1,
.policy-copy h2 {
  font-family: "Space Grotesk", sans-serif;
}

.paper h1 {
  margin: 18px 0 10px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.paper-updated,
.paper-intro p,
.policy-copy p,
.policy-list li {
  color: var(--paper-muted);
  line-height: 1.9;
  font-size: 1.02rem;
}

.paper-updated {
  margin: 0;
}

.paper-intro {
  padding-bottom: 20px;
}

.paper-intro p {
  margin: 0;
}

.policy-section {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--paper-line);
}

.policy-section-compact {
  padding-bottom: 0;
}

.policy-number {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding-top: 11px;
  border-radius: 14px;
  background: rgba(255, 159, 61, 0.12);
  color: #9b5a14;
  font-weight: 800;
}

.policy-copy h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.policy-copy p {
  margin: 0 0 14px;
}

.policy-list {
  margin: 0;
  padding-left: 20px;
}

.paper-link {
  display: inline-flex;
  margin-top: 6px;
  text-decoration: none;
  color: #9b5a14;
  font-weight: 800;
}

@media (max-width: 720px) {
  .document-shell {
    width: min(100% - 16px, 1120px);
    padding-top: 14px;
  }

  .document-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .language-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .lang-btn {
    flex: 1 1 0;
  }

  .paper {
    padding: 28px 20px 36px 24px;
    border-radius: 22px;
  }

  .paper::before {
    left: 18px;
  }

  .policy-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .policy-number {
    width: 42px;
    height: 42px;
    padding-top: 8px;
  }

  .paper-updated,
  .paper-intro p,
  .policy-copy p,
  .policy-list li {
    font-size: 0.98rem;
    line-height: 1.75;
  }
}
