/* SEELVIE Legal Pages — Warm-paper palette CSS */

:root {
  --paper: #f6f4f1;
  --ink: #191b1d;
  --ink-soft: #5a5d62;
  --ink-faint: #84878d;
  --primary: #295ea6;
  --primary-hover: #1f4580;
  --surface-light: #fefdfb;
  --surface-mid: #ececeb;
  --outline-light: #d9d7d4;
  --danger: #d32f2f;
  --success: #2e7d32;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1a1a;
    --ink: #f5f5f5;
    --ink-soft: #b0b0b0;
    --ink-faint: #808080;
    --surface-light: #2a2a2a;
    --surface-mid: #3a3a3a;
    --outline-light: #4a4a4a;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */

h1 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 2rem 0 1rem;
  color: var(--ink);
}

h2 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

h3 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
}

p {
  margin: 1rem 0;
  color: var(--ink);
  line-height: 1.75;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

em {
  font-style: italic;
}

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--primary);
}

ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
  line-height: 1.8;
}

li {
  margin: 0.5rem 0;
  color: var(--ink);
}

/* Layout */

.skip {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip:focus {
  top: 0;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header & Footer */

header.legal-top {
  background-color: var(--surface-light);
  border-bottom: 1px solid var(--outline-light);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

header.legal-top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo:hover {
  color: var(--primary-hover);
}

.breadcrumbs {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--primary);
}

.meta {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

/* Table of Contents */

.toc {
  background-color: var(--surface-light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.toc h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.toc ol {
  padding-left: 1.5rem;
  margin: 0;
  font-size: 0.95rem;
}

.toc li {
  margin: 0.4rem 0;
}

.toc a {
  color: var(--primary);
}

.toc a:hover {
  border-bottom-color: var(--primary);
}

/* Content Sections */

article {
  line-height: 1.8;
}

article h2 {
  scroll-margin-top: 5rem;
}

article h3 {
  scroll-margin-top: 5rem;
}

section {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--outline-light);
}

section:last-of-type {
  border-bottom: none;
}

/* Data safety & privacy nutrition tables */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--outline-light);
}

.data-table th {
  background-color: var(--surface-light);
  font-weight: 600;
  color: var(--ink);
}

.data-table tr:hover {
  background-color: var(--surface-light);
}

/* Notice boxes */

.notice {
  background-color: var(--surface-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
  font-size: 0.95rem;
}

.notice.warning {
  border-left-color: #ff9800;
  background-color: rgba(255, 152, 0, 0.05);
}

.notice.success {
  border-left-color: var(--success);
  background-color: rgba(46, 125, 50, 0.05);
}

.notice p {
  margin: 0.5rem 0;
}

.notice p:first-child {
  margin-top: 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Footer */

footer.legal-footer {
  background-color: var(--surface-light);
  border-top: 1px solid var(--outline-light);
  margin-top: 3rem;
  padding: 2rem 0;
}

footer.legal-footer .wrap {
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

footer.legal-footer a {
  color: var(--primary);
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 0.875rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.footer-links a:hover {
  border-bottom-color: var(--primary);
}

/* Accessibility & Responsive */

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .wrap {
    padding: 1rem;
  }

  header.legal-top .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .toc {
    font-size: 0.9rem;
    padding: 1rem;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }

  .footer-links {
    gap: 1rem;
  }
}

/* Print styles */

@media print {
  body {
    background-color: white;
    color: black;
  }

  a {
    color: #0066cc;
    text-decoration: underline;
  }

  header, footer {
    display: none;
  }

  h1, h2, h3 {
    page-break-after: avoid;
    color: black;
  }

  p, ul, ol {
    orphans: 3;
    widows: 3;
  }
}
