:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --paper-strong: #fffaf0;
  --ink: #1f2522;
  --muted: #66706a;
  --line: #d7cdbd;
  --teal: #116b66;
  --teal-dark: #0d514d;
  --coral: #c9543d;
  --gold: #b78a2f;
  --shadow: 0 20px 60px rgba(31, 37, 34, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(17, 107, 102, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(183, 138, 47, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  line-height: 1.72;
  letter-spacing: 0;
}

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--coral);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 234, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.site-footer,
.hero,
.document-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-strong);
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link,
.language-button,
.button-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  line-height: 1.2;
  text-decoration: none;
  padding: 9px 13px;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.language-button:hover,
.button-link:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  transform: translateY(-1px);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.78);
}

.language-button {
  min-height: 32px;
  border-color: transparent;
  padding: 6px 10px;
  background: transparent;
}

.language-button[aria-pressed="true"] {
  background: var(--teal);
  color: #fffdf8;
}

.hero {
  padding: 82px 0 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
}

.hero-copy {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.document-grid {
  width: min(1120px, calc(100% - 40px));
  margin: 14px auto 80px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.document-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
  text-decoration: none;
  color: var(--ink);
}

.document-card:hover {
  border-color: var(--teal);
}

.document-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.document-card p {
  margin: 0;
  color: var(--muted);
}

.card-kicker {
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
}

.card-action {
  color: var(--teal);
  font-weight: 800;
}

.document-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  padding: 54px 0 72px;
}

.legal-document {
  min-width: 0;
}

.legal-document header {
  margin-bottom: 28px;
}

.legal-document h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.meta-list li,
.side-panel,
.legal-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.82);
}

.meta-list li {
  padding: 12px 14px;
  color: var(--muted);
}

.meta-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
}

.legal-section {
  margin: 16px 0;
  padding: clamp(18px, 3vw, 28px);
}

.legal-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.legal-section p,
.legal-section li {
  color: #39413d;
}

.legal-section p:first-of-type {
  margin-top: 0;
}

.legal-section p:last-child,
.legal-section ul:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  padding-left: 1.25rem;
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 102px;
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.side-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.96rem;
}

.side-links {
  display: grid;
  gap: 10px;
}

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.localized[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .document-grid,
  .document-shell {
    grid-template-columns: 1fr;
  }

  .document-shell {
    gap: 24px;
  }

  .side-panel {
    position: static;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .site-footer,
  .hero,
  .document-shell,
  .document-grid {
    width: min(100% - 24px, 1120px);
  }

  .top-actions,
  .nav-link,
  .button-link {
    width: 100%;
  }

  .language-switch {
    width: 100%;
  }

  .language-button {
    flex: 1;
  }

  .hero {
    padding-top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
