:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: rgba(24, 24, 27, 0.78);
  --panel-soft: rgba(39, 39, 42, 0.58);
  --ink: #fafafa;
  --body: #d4d4d8;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #f97316;
  --accent-soft: #fbbf24;
  --warning: rgba(245, 158, 11, 0.08);
  --warning-line: rgba(251, 191, 36, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% -8%, rgba(249, 115, 22, 0.22), transparent 32rem),
    radial-gradient(circle at 5% 22rem, rgba(245, 158, 11, 0.08), transparent 28rem),
    var(--bg);
  color: var(--body);
  font-size: 16px;
  line-height: 1.72;
}

a { color: #fdba74; text-underline-offset: 0.2em; }
a:hover { color: #fed7aa; }
.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  transform: translateY(-160%);
  border-radius: 999px;
  background: #fff;
  color: #18181b;
  padding: 0.65rem 1rem;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(18px);
}
.site-header__inner,
.site-footer__inner,
.legal-shell {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}
.site-header__inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.brand img { width: 2.4rem; height: 2.4rem; border-radius: 0.72rem; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: 0.45rem; }
.site-header nav a {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: #e4e4e7;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 750;
}
.site-header nav a:last-child {
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  color: #18181b;
}

.legal-shell { padding-block: clamp(2.5rem, 6vw, 5rem) 5rem; }
.legal-hero { max-width: 54rem; }
.eyebrow {
  margin: 0 0 0.65rem;
  color: #fb923c;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.025em; }
h1 { margin: 0; font-size: clamp(2.1rem, 7vw, 4.25rem); }
h2 { margin: 2.8rem 0 0.85rem; font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { margin-top: 2rem; font-size: 1.15rem; }
.meta { color: var(--muted); margin: 1rem 0 0; }

.document-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2rem 0 0;
}
.document-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: #d4d4d8;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 750;
}
.document-nav a[aria-current="page"] {
  border-color: rgba(249, 115, 22, 0.6);
  background: rgba(249, 115, 22, 0.12);
  color: #ffedd5;
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2.25rem;
}
.toc {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--panel-soft);
  padding: 1.1rem;
}
.toc strong { display: block; color: #fafafa; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.toc ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.8rem 0 0; padding: 0; list-style: none; }
.toc a { color: #c4c4ca; font-size: 0.86rem; text-decoration: none; }
.legal-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--panel);
  padding: clamp(1.25rem, 4vw, 3rem);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26);
}
.legal-card > :first-child { margin-top: 0; }
.legal-card p, .legal-card li { max-width: 76ch; }
.legal-card ul, .legal-card ol { padding-left: 1.35rem; }
.legal-card code { color: #fed7aa; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 1rem; }
table { width: 100%; min-width: 36rem; border-collapse: collapse; }
th, td { padding: 0.8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #fff; background: rgba(255,255,255,0.04); }
.warning, .notice {
  margin: 1.3rem 0;
  border: 1px solid var(--warning-line);
  border-radius: 1rem;
  background: var(--warning);
  padding: 1rem;
}
.delete-panel {
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255,255,255,0.025);
  padding: 1.1rem;
}
.confirm { display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 1rem; }
.confirm input { width: 1.1rem; height: 1.1rem; margin-top: 0.35rem; accent-color: var(--accent); }
.status { min-height: 1.7em; margin-bottom: 0; font-weight: 750; }
.status.error { color: #fca5a5; }
.status.success { color: #86efac; }
.muted { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #09090b; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2rem;
}
.site-footer p { margin: 0; color: #71717a; font-size: 0.85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.site-footer a { color: #a1a1aa; font-size: 0.85rem; }

@media (min-width: 900px) {
  .legal-grid { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 6rem; }
  .toc ul { display: grid; gap: 0.45rem; }
}

@media (max-width: 620px) {
  .site-header__inner { min-height: 4.1rem; }
  .brand span { display: none; }
  .site-header nav a:first-child { display: none; }
  .legal-shell { width: min(100% - 1rem, 76rem); }
  .legal-card { border-radius: 1.1rem; }
  .document-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .document-nav a { justify-content: center; text-align: center; }
}

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