:root {
  --color-selected-text: #75A0FF;
  --color-selected-bg: #75A0FF1A;
  --color-text-primary: #1F2430;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-border: #EAEAEE;
  --color-bg: #FFFFFF;
  --color-sidebar-bg: #FFFFFF;
  --header-height: 64px;
  --stripe-height: 4px;
  --gradient-header: linear-gradient(
    90deg,
    #75A0FF,
    #7E9EFF,
    #869BFF,
    #8D98FF,
    #9496FF,
    #9B93FF,
    #A290FF,
    #A88DFF,
    #B48CEB,
    #C08AD7,
    #CC86C2,
    #D782AD,
    #E27D97,
    #EC7780,
    #F76F67
  );
  --gradient-marker: linear-gradient(
    180deg,
    #75A0FF,
    #8E9DEB,
    #A398D7,
    #B693C2,
    #C88CAD,
    #D88497,
    #E87B80,
    #F76F67
  );
  --sidebar-width: 280px;
  --content-max-width: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: 1.6;
}

/* Header */

.stripe {
  height: var(--stripe-height);
  width: 100%;
  background: var(--gradient-header);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 48px 0 56px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.brand span {
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text-primary);
}

.header-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* Layout */

.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 32px 16px 48px 32px;
  position: sticky;
  top: var(--header-height);
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 12px 12px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin: 2px 0;
}

.toc-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toc-list a:hover {
  color: var(--color-text-primary);
  background: #F5F6F8;
}

.toc-list a.active {
  color: var(--color-selected-text);
  background: var(--color-selected-bg);
  font-weight: 600;
}

/* Content */

.content {
  flex: 1;
  min-width: 0;
  padding: 32px 48px 96px;
  max-width: var(--content-max-width);
}

.content h1 {
  font-size: 30px;
  font-weight: 300;
  margin: 0 0 8px;
}

.content .updated {
  color: var(--color-text-secondary);
  margin: 0 0 32px;
}

.legal-intro h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 28px 0 8px;
}

.legal-intro p {
  font-size: 14px;
  font-weight: 400;
  margin: 0 0 16px;
  color: #4A5565;
}

.toc-inline {
  border-bottom: 1px solid var(--color-border);
  padding: 0 0 24px;
  margin: 24px 0;
}

.toc-inline h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-primary);
  margin: 0 0 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
}

.toc-inline ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
}

.toc-inline li {
  position: relative;
  padding: 4px 0 4px 12px;
  margin-bottom: 48px;
}

.toc-inline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: var(--gradient-marker);
}

.toc-inline li:last-child {
  margin-bottom: 0;
}

.toc-inline a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.toc-inline a:hover {
  color: var(--color-selected-text);
}

section.legal-section {
  padding-top: 88px;
  margin-top: -72px;
  scroll-margin-top: 80px;
}

section.legal-section h2 {
  position: relative;
  font-size: 22px;
  margin: 0 0 16px;
  padding-left: 12px;
  color: #101828;
}

section.legal-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: var(--gradient-marker);
}

section.legal-section h4 {
  font-size: 15px;
  margin: 20px 0 8px;
  color: #1E2939;
}

section.legal-section p {
  font-size: 14px;
  font-weight: 400;
  margin: 0 0 16px;
  color: #4A5565;
}

section.legal-section ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

section.legal-section li {
  margin-bottom: 8px;
}

section.legal-section li::marker {
  color: #75A0FF;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 20px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-left: calc(var(--sidebar-width) - 16px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-brand img {
  width: 22px;
  height: 22px;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-selected-text);
}

@media (max-width: 900px) {
  .footer-inner {
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .content {
    padding: 24px 20px 64px;
  }
}
