/* Shared stylesheet for Vaultara legal pages (/privacy/ and /terms/).
   No external fonts, no scripts. Works under a strict CSP (style-src 'self'). */

:root {
  --brand: #10162E;
  --accent: #0077B6;
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --text: #1A2033;
  --muted: #535C73;
  --border: #DDE1EA;
  --note-bg: #EEF3FA;
  --placeholder-bg: #FFF3C4;
  --placeholder-text: #5C4500;
  --header-text: #FFFFFF;
  --header-muted: #B8C0D4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5CC4FF;
    --bg: #0B0F20;
    --surface: #10162E;
    --text: #E6E9F2;
    --muted: #A3ABC2;
    --border: #2A3252;
    --note-bg: #18203D;
    --placeholder-bg: #4A3B00;
    --placeholder-text: #FFE7A0;
    --header-text: #FFFFFF;
    --header-muted: #A3ABC2;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  background: var(--brand);
  color: var(--header-text);
  padding: 24px 16px 28px;
}

.site-header .inner,
main,
.site-footer .inner {
  max-width: 760px;
  margin: 0 auto;
}

.brand {
  display: inline-block;
  color: var(--header-text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 1rem;
}

.site-header nav {
  margin-top: 6px;
  font-size: 0.9rem;
}

.site-header nav a {
  color: var(--header-muted);
  margin-right: 16px;
}

.site-header nav a[aria-current="page"] {
  color: var(--header-text);
  font-weight: 600;
}

.site-header h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 20px 0 8px;
}

.meta {
  margin: 0;
  color: var(--header-muted);
  font-size: 0.9rem;
}

.meta span {
  display: inline-block;
  margin-right: 16px;
}

/* Main content */

main {
  padding: 24px 16px 48px;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}

h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
  scroll-margin-top: 16px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 6px;
}

strong {
  font-weight: 650;
}

.lead {
  font-size: 1.05rem;
}

.note {
  background: var(--note-bg);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
}

.note p:last-child,
.note ul:last-child {
  margin-bottom: 0;
}

.important {
  border-left-color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  .important {
    border-left-color: var(--accent);
  }
}

/* Placeholders the owner must fill in before publishing */

.ph {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* Table of contents */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 16px 8px;
  margin: 8px 0 24px;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.toc ol {
  margin: 0 0 8px;
  padding-left: 1.6em;
}

.toc li {
  margin-bottom: 4px;
}

@media (min-width: 640px) {
  .toc ol {
    column-count: 2;
    column-gap: 32px;
  }

  .toc li {
    break-inside: avoid;
  }
}

/* Tables: scroll sideways inside their own box on small screens */

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--note-bg);
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

.back-top {
  font-size: 0.85rem;
  margin-top: -4px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 6px;
}

.site-footer a {
  margin-right: 16px;
}

@media (min-width: 640px) {
  .site-header {
    padding: 32px 24px 36px;
  }

  .site-header h1 {
    font-size: 2.1rem;
  }

  main {
    padding: 32px 24px 64px;
  }
}

@media print {
  .site-header {
    background: none;
    color: #000;
  }

  .site-header nav,
  .skip-link,
  .back-top {
    display: none;
  }

  .meta {
    color: #000;
  }

  a {
    color: #000;
  }
}
