:root {
  --background: #000000;
  --nav-background: #0a0a0a;
  --surface: #1a1a1a;
  --surface-card: #1c1c1c;
  --surface-elevated: #222222;
  --surface-input: #262626;
  --accent: #5b4fe8;
  --accent-hover: #6b5ff8;
  --accent-muted: rgba(91, 79, 232, 0.25);
  --accent-border: rgba(91, 79, 232, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #bfc3cc;
  --text-tertiary: #787d88;
  --text-accent: #b8b3ff;
  --border-default: #2e2e2e;
  --border-subtle: #1a1a1a;
  --poll-track: #252525;
  --success: #4caf50;
  --max-width: 880px;
  --radius-card: 16px;
  --radius-input: 12px;
  --spacing-page: 16px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  height: 1px;
  background: var(--accent);
  content: "";
  opacity: 0.7;
  pointer-events: none;
}

a {
  color: var(--text-accent);
  text-decoration: none;
}

a:hover {
  color: #ffffff;
}

p,
ul {
  margin: 0;
}

ul {
  padding-left: 20px;
}

li + li {
  margin-top: 8px;
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px
    max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--surface-card);
}

.top-nav a {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.top-nav a[aria-current="page"] {
  background: var(--accent-muted);
  color: var(--text-accent);
}

.legal-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 32px var(--spacing-page) 48px;
}

.home-shell {
  padding-top: 40px;
}

.hero,
.doc-header {
  display: grid;
  gap: 12px;
  padding: 0 0 24px;
}

.eyebrow {
  color: var(--text-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(32px, 8vw, 56px);
  font-weight: 800;
  line-height: 1.05;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.hero p,
.doc-header p {
  max-width: 720px;
  color: var(--text-secondary);
}

.effective-date,
.doc-date {
  color: var(--text-accent);
  font-size: 13px;
  font-weight: 600;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.doc-card {
  display: grid;
  min-height: 230px;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  color: var(--text-secondary);
  transition: transform 160ms ease, border-color 160ms ease,
    background-color 160ms ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  background: var(--surface-elevated);
}

.doc-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--text-accent);
  font-size: 12px;
  font-weight: 700;
}

.doc-card p {
  color: var(--text-secondary);
}

.doc-card .doc-date {
  align-self: end;
  margin-top: auto;
}

.legal-doc {
  display: grid;
  gap: 12px;
}

.document-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-card);
}

.document-section p,
.document-section li {
  color: var(--text-secondary);
}

.document-section a {
  font-weight: 600;
}

.note {
  padding: 12px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-input);
  background: var(--accent-muted);
  color: var(--text-primary);
}

.service-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
  background: var(--surface-input);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
}

.service-row + .service-row {
  border-top: 1px solid var(--border-default);
}

.service-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.service-row strong {
  font-size: 14px;
}

.service-row span {
  color: var(--text-secondary);
  font-size: 13px;
}

.service-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--poll-track);
  color: var(--text-accent);
  font-size: 13px;
  font-weight: 700;
}

.site-footer {
  display: grid;
  gap: 12px;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 var(--spacing-page) 32px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.site-footer a {
  color: var(--text-secondary);
}

.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease,
    background-color 160ms ease;
}

.scroll-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--accent-hover);
}

@media (max-width: 640px) {
  .site-header {
    min-height: 60px;
  }

  .brand span {
    display: none;
  }

  .legal-shell {
    padding-top: 24px;
  }

  .home-shell {
    padding-top: 32px;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }

  .doc-card {
    min-height: 190px;
  }

  .service-row {
    grid-template-columns: 1fr;
  }
}

@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 print {
  .site-header,
  .site-footer,
  .scroll-top {
    display: none;
  }

  body {
    background: #ffffff;
    color: #111111;
  }

  .legal-shell {
    width: 100%;
    padding: 0;
  }

  .document-section {
    break-inside: avoid;
    border-color: #cccccc;
    background: #ffffff;
  }

  .document-section p,
  .document-section li,
  .doc-header p {
    color: #111111;
  }
}
