:root {
  color-scheme: light;
  --paper: #f2f0e8;
  --paper-deep: #e7e4d9;
  --ink: #12221c;
  --muted: #56645e;
  --line: #bdc5bd;
  --signal: #b8f33d;
  --signal-dark: #355d0d;
  --panel: rgba(255, 255, 252, 0.74);
  --max-width: 1120px;
  --shadow: 0 20px 56px rgba(18, 34, 28, 0.1);
}
* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(18, 34, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 34, 28, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 88% 8%, rgba(184, 243, 61, 0.28), transparent 30rem),
    var(--paper);
  background-size: 28px 28px, 28px 28px, auto, auto;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  font-size: 17px;
  line-height: 1.78;
}

a {
  color: var(--ink);
  text-decoration-color: var(--signal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  background: var(--signal);
  text-decoration-color: transparent;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

[hidden] {
  display: none !important;
}

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--signal);
  box-shadow: 4px 4px 0 var(--ink);
}

.language-switcher {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}

.language-switcher button {
  min-width: 52px;
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: 700 0.78rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  cursor: pointer;
}

.language-switcher button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 64px;
  align-items: end;
  padding: clamp(64px, 10vw, 120px) 0 64px;
}

.eyebrow,
.document-code,
.section-index,
.meta-label {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 5px 9px;
  border: 1px solid var(--ink);
  background: var(--signal);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(3rem, 8vw, 6.9rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.document-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.lead {
  max-width: 700px;
  margin-bottom: 0;
  color: #35453f;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.status-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--ink);
  background: var(--panel);
  box-shadow: 10px 10px 0 var(--ink);
}

.status-card::before {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(184, 243, 61, 0.22);
  content: "";
}

.status-card dl,
.document-meta dl {
  margin: 0;
}

.status-card div,
.document-meta div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.status-card div:last-child,
.document-meta div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  font-weight: 650;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 96px;
}

.document-card {
  position: relative;
  min-height: 330px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.document-card:hover {
  transform: translateY(-6px);
  background: #fffefa;
  box-shadow: 12px 16px 0 var(--signal-dark);
}

.document-card h2 {
  max-width: 460px;
  margin: 60px 0 18px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.document-card p {
  max-width: 540px;
  color: var(--muted);
}

.card-arrow {
  position: absolute;
  right: 34px;
  bottom: 26px;
  font: 700 2rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.document-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: 64px;
  align-items: end;
  padding: clamp(58px, 9vw, 104px) 0 54px;
  border-bottom: 1px solid var(--ink);
}

.document-meta {
  padding: 22px 26px;
  border-left: 5px solid var(--signal);
  background: rgba(255, 255, 252, 0.58);
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 740px);
  gap: clamp(36px, 8vw, 96px);
  justify-content: center;
  padding: 64px 0 110px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  padding-top: 8px;
}

.toc p {
  margin-bottom: 14px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: var(--signal-dark);
}

.legal-content section {
  scroll-margin-top: 24px;
  padding: 8px 0 42px;
  border-bottom: 1px solid var(--line);
}

.legal-content section + section {
  padding-top: 42px;
}

.legal-content h2 {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.section-index {
  display: block;
  margin-bottom: 8px;
  color: var(--signal-dark);
}

.legal-content ul {
  padding-left: 1.3em;
}

.legal-content li + li {
  margin-top: 8px;
}

.notice {
  padding: 22px 24px;
  border: 1px solid var(--ink);
  background: var(--signal);
  color: var(--ink);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
}

.site-footer p {
  margin: 0;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-text {
    max-width: 150px;
  }

  .hero,
  .document-hero,
  .document-grid,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .document-hero {
    gap: 38px;
  }

  .legal-layout {
    gap: 28px;
    padding-top: 38px;
  }

  .toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 16px;
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--panel);
  }

  .toc p {
    grid-column: 1 / -1;
  }

  .document-card {
    min-height: 290px;
  }

  .site-footer {
    display: block;
  }

  .site-footer p + p {
    margin-top: 8px;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .language-switcher,
  .toc {
    display: none;
  }

  .site-shell {
    width: 100%;
  }

  .document-hero,
  .legal-layout {
    display: block;
    padding: 24px 0;
  }

  .document-meta {
    margin-top: 20px;
  }
}
