@layer components {
  .legal-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--spacing-lg) var(--spacing-2xl);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xxl);
    align-items: start;

    @media (min-width: 100ch) {
      grid-template-columns: 240px 1fr;
      gap: 80px; /* wide-split gutter */
    }
  }

  .legal-sidebar {
    position: static;

    @media (min-width: 100ch) {
      position: sticky;
      top: 100px;
    }
  }

  .sidebar-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-md);
  }

  .sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xxs);

    a {
      display: block;
      font-size: var(--text-sm);
      color: var(--text-secondary);
      text-decoration: none;
      padding: var(--spacing-xs) var(--spacing-sm);
      border-radius: var(--radius-sm);
      border-left: 2px solid transparent;
      transition: color 0.2s, background-color 0.2s, border-left-color 0.2s;
      line-height: 1.4;
    }
    a:hover {
      color: var(--accent);
      background: var(--accent-wash);
      border-left-color: var(--accent);
    }
  }

  .sidebar-meta {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-subtle);

    p {
      font-size: var(--text-xs);
      color: var(--text-tertiary);
      line-height: 1.5;
      margin-bottom: var(--spacing-xxs);
    }
  }

  .legal-content {
    max-width: 75ch;

    h1 {
      font-family: var(--font-serif);
      font-size: var(--text-3xl);
      font-weight: 500;
      line-height: 1.15;
      margin-bottom: var(--spacing-sm);
    }

    .effective {
      font-size: var(--text-sm);
      color: var(--text-tertiary);
      margin-bottom: var(--spacing-xxl);
      padding-bottom: var(--spacing-lg);
      border-bottom: 1px solid var(--border-subtle);
    }

    .intro {
      font-size: var(--text-md);
      line-height: 1.75;
      color: var(--text-secondary);
      margin-bottom: var(--spacing-xxl);
    }
  }

  .legal-section {
    margin-bottom: var(--spacing-xxl);

    h2 {
      font-family: var(--font-serif);
      font-size: var(--text-xl);
      font-weight: 500;
      margin-bottom: var(--spacing-sm);
      padding-top: var(--spacing-xxs);
    }

    h3 {
      font-size: var(--text-sm);
      font-weight: 600;
      margin-bottom: var(--spacing-xs);
      margin-top: var(--spacing-lg);
    }

    p {
      font-size: var(--text-sm);
      line-height: 1.75;
      color: var(--text-secondary);
      margin-bottom: var(--spacing-sm);
    }

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

    ul, ol {
      margin: var(--spacing-sm) 0 var(--spacing-md);
      padding: 0;
      list-style: none;
    }

    li {
      font-size: var(--text-sm);
      line-height: 1.65;
      color: var(--text-secondary);
      padding: var(--spacing-xxs) 0 var(--spacing-xxs) 20px; /* bullet inset */
      position: relative;
    }
    li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 12px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--accent);
      opacity: 0.4;
    }
  }

  .highlight-box {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-md) 0;

    p {
      font-size: var(--text-sm);
      color: var(--text-primary);
      margin-bottom: 0;
    }
  }
}
