:root {
  --background: #0f172a;
  --surface: #172237;
  --surface-strong: #1e293b;
  --text: #f8fafc;
  --muted: #a7b2c3;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #285b8a;
  --orange: #ff9417;
  --green: #57d21c;
  --pink: #ff3d8d;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover,
a:focus-visible {
  color: #8fb4d4;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  padding: 9px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #111c31;
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

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

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

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.header-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 76px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  font-size: 11px;
  font-weight: 750;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.page-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  padding: 48px 0 72px;
}

.table-of-contents {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-of-contents h2 {
  margin: 0 0 12px;
  font-size: 14px;
}

.table-of-contents ol {
  margin: 0;
  padding-left: 20px;
}

.table-of-contents li + li {
  margin-top: 7px;
}

.table-of-contents a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.document-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

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

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

h1 {
  margin: 0;
  font-size: 38px;
}

.summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.effective-date {
  display: inline-block;
  margin-top: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.important-notice {
  margin: 28px 0 4px;
  padding: 16px;
  border: 1px solid rgba(255, 61, 141, 0.38);
  border-radius: 8px;
  background: rgba(255, 61, 141, 0.08);
}

.important-notice strong {
  color: #ff9cc5;
}

.terms-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}

.terms-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.terms-section h3 {
  margin: 24px 0 8px;
  color: var(--text);
  font-size: 16px;
}

.terms-section p {
  margin: 0 0 13px;
  color: var(--muted);
}

.terms-section ul {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.terms-section li + li {
  margin-top: 9px;
}

.terms-section li::marker {
  color: var(--green);
}

.contact-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.contact-block p:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 28px, 680px);
  }

  .header-label {
    display: none;
  }

  .page-shell {
    display: block;
    padding-top: 28px;
  }

  .table-of-contents {
    position: static;
    margin-bottom: 32px;
  }

  h1 {
    font-size: 30px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

html[data-theme="light"] {
  --background: #f4f7fa;
  --surface: #ffffff;
  --surface-strong: #eaf0f5;
  --text: #142b3c;
  --muted: #526879;
  --line: rgba(20, 43, 60, .16);
  --accent: #173f67;
  --orange: #aa6000;
  --green: #287b24;
  --pink: #bd285f;
  color-scheme: light;
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .site-footer {
  background: #ffffff;
}

html[data-theme="light"] body {
  background: #f1f4f7;
}

html[data-theme="light"] .site-header {
  border-bottom-color: rgba(43,112,151,.18);
  background: #daf1fc;
  box-shadow: 0 8px 24px rgba(43,112,151,.08);
}

html[data-theme="light"] .theme-toggle {
  border-color: #173f67;
  color: #fff;
  background: #173f67;
}

html[data-theme="light"] .theme-toggle:hover {
  border-color: #0d3155;
  background: #0d3155;
}

html[data-theme="light"] .page-shell > article,
html[data-theme="light"] .table-of-contents,
html[data-theme="light"] .contact-block {
  border: 1px solid rgba(20,43,60,.10);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31,55,72,.08);
}

html[data-theme="light"] .page-shell > article {
  padding: 30px;
}

html[data-theme="light"] .site-footer {
  box-shadow: 0 -8px 24px rgba(31,55,72,.05);
}

html[data-theme="light"] a:hover,
html[data-theme="light"] a:focus-visible {
  color: #0d3155;
}

html[data-theme="light"] .important-notice {
  border-color: rgba(189,40,95,.28);
  background: rgba(189,40,95,.07);
}

html[data-theme="light"] .important-notice strong {
  color: #9f174b;
}

html[data-theme="light"] body :is(h1, h2, h3, h4, p, li, label, strong, small, span) {
  color: #101820;
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .theme-toggle :is(span, svg) {
  color: #fff;
}

html[data-theme="light"] .important-notice strong {
  color: #9f174b;
}
