@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #131313;
  --elevated: #1d1d1d;
  --border: #2c2c2c;
  --text: #f0f0f0;
  --muted: #a0a0a0;
  --dim: #686868;
  --accent: #e02b22;
  --accent-soft: rgba(224, 43, 34, 0.12);
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.5);
  --warning-text: #fbbf24;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --elevated: #eeeeee;
  --border: #d8d8d8;
  --text: #111111;
  --muted: #5f5f5f;
  --dim: #888888;
  --accent: #d9271f;
  --accent-soft: rgba(217, 39, 31, 0.08);
  --warning-bg: rgba(217, 119, 6, 0.09);
  --warning-border: rgba(217, 119, 6, 0.42);
  --warning-text: #9a4e05;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.67;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.legal-header__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 0;
  color: var(--text);
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-style: italic;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
  padding-bottom: 8px;
}
.wordmark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.wordmark .red { color: var(--accent); }
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--elevated);
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 42px auto 64px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}
.toc__label {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}
.toc a:hover { color: var(--text); }

.legal-document {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(24px, 5vw, 58px);
  box-shadow: var(--shadow);
}
.eyebrow {
  color: var(--accent);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: "Barlow Condensed", sans-serif; color: var(--text); }
h1 {
  margin: 8px 0 8px;
  font-size: clamp(38px, 7vw, 66px);
  line-height: .98;
  letter-spacing: -.035em;
}
.updated {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}
.intro {
  margin: 0 0 30px;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
}
.legal-config-warning {
  display: none;
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--warning-border);
  border-radius: 10px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 13px;
  font-weight: 700;
}
.legal-config-warning.is-visible { display: block; }
section {
  scroll-margin-top: 96px;
  padding-top: 12px;
}
h2 {
  margin: 34px 0 10px;
  padding-top: 8px;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.018em;
}
h3 {
  margin: 22px 0 6px;
  font-size: 20px;
  line-height: 1.2;
}
p { margin: 0 0 14px; color: color-mix(in srgb, var(--text) 92%, var(--muted)); }
ul, ol { margin: 8px 0 18px; padding-left: 24px; }
li { margin: 5px 0; }
strong { color: var(--text); }
.contact-card {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.contact-card p:last-child { margin-bottom: 0; }
.legal-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.legal-footer__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}
.legal-footer__links { display: flex; flex-wrap: wrap; gap: 16px; }
.legal-footer__links a { color: var(--muted); text-decoration: none; }
.legal-footer__links a:hover { color: var(--text); }

@media (max-width: 860px) {
  .legal-shell { grid-template-columns: 1fr; margin-top: 24px; }
  .toc { position: static; max-height: none; }
  .toc details summary {
    cursor: pointer;
    color: var(--text);
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .toc__content { margin-top: 10px; columns: 2; column-gap: 24px; }
}
@media (max-width: 560px) {
  .legal-header__inner { width: min(100% - 24px, 1120px); }
  .legal-shell { width: min(100% - 24px, 1120px); }
  .back-link { padding: 0 10px; font-size: 11px; }
  .legal-document { border-radius: 14px; padding: 24px 18px 32px; }
  .toc__content { columns: 1; }
  .legal-footer__inner { width: min(100% - 24px, 1120px); flex-direction: column; align-items: flex-start; }
}
@media print {
  .legal-header, .toc, .legal-footer, .legal-config-warning { display: none !important; }
  body, .legal-document { background: #fff; color: #000; }
  .legal-shell { display: block; width: 100%; margin: 0; }
  .legal-document { border: 0; box-shadow: none; padding: 0; }
  a { color: #000; text-decoration: none; }
}
