/* Shared styling for CiaoTutor legal pages (privacy.html, terms.html).
 * These are standalone static pages served from web/dist root, independent of
 * the React SPA, so all brand tokens are redeclared here. Values mirror the
 * design system (_ds/.../tokens). Dark by default; light via prefers-color-scheme. */

:root {
  --bg: #111113;
  --surface: #1c1c1e;
  --border-soft: #252528;
  --border: #303034;
  --ink: #f5f5f7;
  --text-secondary: #a1a1a8;
  --text-tertiary: #6e6e73;
  --accent: #35a869;
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --border-soft: #e5e5ea;
    --border: #d2d2d7;
    --ink: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #8e8e93;
    --accent: #1c8b4b;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
.legal-nav {
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  z-index: 10;
}
.legal-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wordmark:hover { text-decoration: none; }
.wordmark .dot { color: var(--accent); }
.legal-nav .back { font-size: 0.9rem; color: var(--text-secondary); }

/* Document body */
main { padding: 3rem 0 4.5rem; }

.doc-head { margin-bottom: 2.5rem; }
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
.updated {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin: 0;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2.75rem 0 0.9rem;
  scroll-margin-top: 80px;
}
h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 1.75rem 0 0.6rem;
}

p { margin: 0 0 1.1rem; }
strong { color: var(--ink); font-weight: 600; }

ul, ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
li { margin: 0 0 0.5rem; }

.lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Callout box */
.note {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border-soft));
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
.note p:last-child { margin-bottom: 0; }

/* Placeholder markers the operator must fill before publishing. */
.fill {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 0.05em 0.4em;
  border-radius: 5px;
}

/* Table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.5rem;
}
.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-weight: 700;
}
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin: 0.3rem 0; }
.toc a { color: var(--text-secondary); }
.toc a:hover { color: var(--accent); }

/* Contact table */
.contact {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
}
.contact p { margin: 0.25rem 0; }

/* Footer */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: space-between; align-items: center; }
footer a { color: var(--text-secondary); }
footer .links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
