/* Privacy Policy – legal document layout (tucan) */
:root {
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-text: #2d3748;
  --color-muted: #718096;
  --color-primary: #1e3a5f;
  --color-primary-hover: #2c5282;
  --color-border: #e2e8f0;
  --color-header: #1e3a5f;
  --max-content: 900px;
  --font: 'Segoe UI', system-ui, sans-serif;
  --font-legal: Georgia, 'Times New Roman', serif;
}

html {
  scroll-behavior: smooth;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  display: grid;
  gap: 2rem;
}

.toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.toc ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.toc li {
  margin: 0.35rem 0;
}

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

.toc a:hover,
.toc a:focus {
  text-decoration: underline;
}

.toc-heading {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}

.toc-desktop {
  display: none;
}

.toc-mobile summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-mobile summary::after {
  content: ' ▾';
  color: var(--color-muted);
}

.toc-mobile[open] summary::after {
  content: ' ▴';
}

.content {
  max-width: var(--max-content);
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1.75rem 1.5rem 2.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.doc-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  line-height: 1.3;
  color: var(--color-header);
}

.doc-subtitle {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 1.05rem;
  font-family: var(--font);
}

.last-updated {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.doc-section {
  margin: 0 0 2.25rem;
  scroll-margin-top: 1.25rem;
  font-family: var(--font-legal);
  line-height: 1.7;
  font-size: 1.05rem;
}

.doc-section:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-family: var(--font);
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--color-header);
  font-family: var(--font);
}

.copy-link {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-primary);
  cursor: pointer;
}

.copy-link:hover,
.copy-link:focus {
  border-color: var(--color-primary);
  outline: 2px solid transparent;
}

.copy-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.copy-link.is-copied {
  color: #22543d;
  border-color: #c6f6d5;
  background: #f0fff4;
}

.doc-section p {
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

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

.section-body a {
  color: var(--color-primary);
  text-decoration: underline;
}

.section-body a:hover,
.section-body a:focus {
  color: var(--color-primary-hover);
}

.section-body ul {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
}

.section-body li {
  margin: 0.35rem 0;
}

/* Desktop: sticky TOC */
@media (min-width: 900px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 1.25rem;
    padding: 1.25rem;
  }

  .toc-mobile {
    display: none;
  }

  .toc-desktop {
    display: block;
  }

  .content {
    padding: 2.25rem 2.5rem 3rem;
  }
}

/* Tablet */
@media (min-width: 600px) and (max-width: 899px) {
  .content {
    padding: 2rem 1.75rem 2.5rem;
  }
}

/* Print */
@media print {
  .site-header,
  .toc,
  .copy-link,
  .skip-link,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .layout {
    display: block;
    padding: 0;
    max-width: none;
  }

  .content {
    box-shadow: none;
    max-width: none;
    padding: 0;
  }

  .doc-section {
    break-inside: avoid;
  }
}
