:root {
  color-scheme: light dark;
  --page: #f6f6f3;
  --surface: #ecece7;
  --surface-strong: #e3e1da;
  --text: #18171c;
  --muted: #55515d;
  --accent: #6b4b00;
  --accent-hover: #4b3500;
  --accent-solid: #5c4100;
  --button-text: #fff8ea;
  --line: #cbc7bc;
  --focus: #7d5900;
  --header: rgb(246 246 243 / 0.96);
  --radius: 10px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
summary:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--accent-solid);
  color: var(--button-text);
  font-weight: 700;
  transform: translateY(-130%);
}

.skip-link:focus {
  color: var(--button-text);
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--header);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-family: Cinzel, Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 0.34fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 5.5rem);
  align-items: start;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.page-nav {
  position: sticky;
  top: 104px;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.page-nav h2 {
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-nav ol {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-nav a {
  display: block;
  padding-block: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-decoration: none;
}

.page-nav a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-document {
  min-width: 0;
  max-width: 48rem;
}

.document-header {
  padding-bottom: clamp(2.2rem, 5vw, 3.8rem);
}

.document-header h1 {
  max-width: 15ch;
  margin: 0;
  font-family: Cinzel, Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.document-summary {
  max-width: 62ch;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.3rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.document-meta strong {
  color: var(--text);
}

.notice {
  margin: 0 0 2.6rem;
  padding: 1.15rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.notice h2,
.notice h3 {
  margin-top: 0;
}

.notice > :last-child {
  margin-bottom: 0;
}

.legal-section {
  padding-block: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.legal-section h2 {
  max-width: 25ch;
  margin: 0 0 1rem;
  font-family: Cinzel, Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.2;
}

.legal-section h3 {
  margin: 2rem 0 0.55rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.legal-section p {
  max-width: 68ch;
  margin: 0.75rem 0;
}

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: 0.6rem;
  max-width: 66ch;
  margin: 1rem 0;
  padding-left: 1.4rem;
}

.legal-section li::marker {
  color: var(--accent);
  font-weight: 750;
}

.step-list {
  counter-reset: deletion-step;
  padding-left: 0 !important;
  list-style: none;
}

.step-list li {
  position: relative;
  min-height: 2.2rem;
  padding-left: 3rem;
  counter-increment: deletion-step;
}

.step-list li::before {
  position: absolute;
  top: -0.15rem;
  left: 0;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text);
  content: counter(deletion-step);
  font-size: 0.86rem;
  font-weight: 750;
}

.action-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 0.65rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-solid);
  color: var(--button-text);
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.action-link:hover {
  color: var(--button-text);
  transform: translateY(-1px);
}

.action-link:active {
  transform: translateY(1px);
}

.plain-note {
  color: var(--muted);
  font-size: 0.93rem;
}

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

.footer-inner {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #08080b;
    --surface: #121116;
    --surface-strong: #1b1920;
    --text: #fff8ea;
    --muted: #c9c1b1;
    --accent: #f4c964;
    --accent-hover: #ffe39a;
    --accent-solid: #f4c964;
    --button-text: #17120a;
    --line: #3b3541;
    --focus: #f4c964;
    --header: rgb(8 8 11 / 0.96);
  }
}

@media (max-width: 760px) {
  html {
    scroll-behavior: auto;
  }

  .shell {
    width: min(calc(100% - 1.25rem), var(--content-width));
  }

  .header-inner {
    min-height: 62px;
    gap: 0.8rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .site-nav {
    gap: 0.85rem;
    font-size: 0.84rem;
  }

  .site-nav a:first-child:not([aria-current="page"]) {
    display: none;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding-block: 2.4rem 3.5rem;
  }

  .page-nav {
    position: static;
    padding: 1rem;
  }

  .page-nav ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
  }

  .document-header h1 {
    font-size: clamp(2.3rem, 15vw, 3.5rem);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 1.7rem;
  }
}

@media (max-width: 420px) {
  .brand span {
    font-size: 0.96rem;
  }

  .site-nav {
    gap: 0.65rem;
  }

  .page-nav ol {
    grid-template-columns: 1fr;
  }
}

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