:root {
  color-scheme: light;
  --ink: #1d2321;
  --muted: #66706c;
  --paper: #ffffff;
  --ground: #f1f3f0;
  --line: #d9dedb;
  --brass: #9b7135;
  --brass-dark: #6f4d1f;
  --green: #37655d;
  --header: #101716;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brass-dark);
}

button,
select {
  font: inherit;
  letter-spacing: 0;
}

.site-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.site-bar__inner {
  width: min(calc(100% - 40px), var(--content-width));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.document-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.document-nav a {
  min-height: 36px;
  padding: 5px 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.document-nav a:hover,
.document-nav a[aria-current="page"] {
  border-bottom-color: var(--brass);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: end;
  overflow: hidden;
  background-color: var(--header);
  background-image: url("./legal-header.jpg");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(4, 10, 10, 0.48);
}

.hero__inner {
  position: relative;
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding: 56px 0 42px;
}

.hero__eyebrow {
  margin: 0 0 8px;
  color: #d8c39d;
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #dce2df;
  font-size: 16px;
}

.legal-shell {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 72px;
}

.toc {
  align-self: start;
  position: sticky;
  top: 92px;
}

.toc h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
}

.toc a:hover {
  border-left-color: var(--brass);
  color: var(--ink);
}

.mobile-toc {
  display: none;
}

.legal-document {
  min-width: 0;
  padding: 0 0 32px;
}

.legal-document__intro {
  margin: 0 0 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  color: #3f4945;
  font-size: 17px;
}

.legal-document__intro p {
  margin: 0 0 12px;
}

.legal-document__intro p:last-child {
  margin-bottom: 0;
}

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

.legal-section h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: 0;
}

.legal-section h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section ul {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.legal-section li {
  margin: 7px 0;
}

.legal-callout {
  margin: 22px 0;
  padding: 17px 18px;
  border-left: 3px solid var(--brass);
  background: #e9eeeb;
  color: #32413d;
}

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

.document-link {
  min-height: 152px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(29, 35, 33, 0.06);
}

.document-link:hover {
  border-color: var(--brass);
  color: var(--ink);
}

.document-link strong {
  display: block;
  margin-bottom: 7px;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 22px;
}

.document-link span {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.site-footer__inner {
  width: min(calc(100% - 40px), var(--content-width));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .site-bar__inner {
    width: min(calc(100% - 28px), var(--content-width));
    min-height: 58px;
  }

  .site-title {
    display: none;
  }

  .document-nav a {
    padding-inline: 8px;
    font-size: 13px;
  }

  .hero {
    min-height: 224px;
    background-position: 62% center;
  }

  .hero__inner {
    width: min(calc(100% - 32px), var(--content-width));
    padding: 48px 0 30px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .legal-shell {
    width: min(calc(100% - 32px), var(--content-width));
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .toc {
    display: none;
  }

  .mobile-toc {
    display: block;
  }

  .mobile-toc select {
    width: 100%;
    min-height: 44px;
    padding: 8px 38px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
  }

  .legal-document__intro {
    font-size: 16px;
  }

  .legal-section h2 {
    font-size: 23px;
  }

  .document-switcher {
    grid-template-columns: 1fr;
    width: min(calc(100% - 32px), 840px);
  }

  .site-footer__inner {
    width: min(calc(100% - 32px), var(--content-width));
    min-height: 92px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
}

@media (max-width: 420px) {
  .document-nav a {
    padding-inline: 6px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: 33px;
  }
}

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