/* Mamino legal document pages — shared styles, no JS, dual theme */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #55657a;
  --border: #e2e8f0;
  --brand: hsl(220, 85%, 47%);
  --brand-soft: hsla(220, 85%, 57%, 0.08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #16213a;
    --text: #f1f5f9;
    --muted: #a5b4c8;
    --border: rgba(255, 255, 255, 0.1);
    --brand: hsl(220, 90%, 70%);
    --brand-soft: hsla(220, 85%, 62%, 0.14);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
header.doc {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 0 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, hsl(220, 85%, 57%), hsl(24, 95%, 55%));
  color: #fff; font-weight: 800; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.lang-nav { display: flex; gap: 6px; font-size: 0.85rem; }
.lang-nav a {
  color: var(--muted); text-decoration: none; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px;
}
.lang-nav a:hover { color: var(--brand); border-color: var(--brand); }
article.doc-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 44px);
  margin-bottom: 28px;
}
article.doc-body h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 6px; }
.updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 24px; }
article.doc-body h2 { font-size: 1.05rem; margin: 28px 0 8px; letter-spacing: -0.01em; }
article.doc-body p { margin: 0 0 12px; color: var(--text); font-size: 0.95rem; }
article.doc-body p.section-text { color: var(--muted); }
.notice {
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 24px;
}
footer.doc {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  color: var(--muted); font-size: 0.85rem; padding-top: 8px;
}
footer.doc a { color: var(--muted); }
footer.doc a:hover { color: var(--brand); }
@media print {
  body { background: #fff; color: #000; }
  header.doc .lang-nav, footer.doc { display: none; }
  article.doc-body { border: none; padding: 0; }
}

/* ---------- Long-form document elements ----------
   Added for the expanded Privacy Policy and Terms: headings below h2, lists,
   definition/retention tables, callouts, and a table of contents. */
article.doc-body h3 { font-size: 0.96rem; margin: 20px 0 6px; letter-spacing: -0.01em; }
article.doc-body ul, article.doc-body ol { margin: 0 0 14px; padding-left: 22px; color: var(--muted); font-size: 0.94rem; }
article.doc-body li { margin: 6px 0; }
article.doc-body li > strong { color: var(--text); }
article.doc-body p > strong, article.doc-body li strong { font-weight: 600; }
article.doc-body a { color: var(--brand); }

.toc { background: var(--brand-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; margin: 0 0 28px; }
.toc h2 { margin: 0 0 10px !important; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.toc ol { columns: 2; column-gap: 28px; margin: 0; padding-left: 20px; font-size: 0.88rem; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* Data tables (what we collect, retention periods, processors). */
.doc-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 0.88rem; }
.doc-table caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 8px; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--border); }
.doc-table th { color: var(--text); font-weight: 600; }
.doc-table td { color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* Safety callout: medical warnings and the AI data-transmission disclosure. */
.warn {
  background: hsla(24, 95%, 55%, 0.1);
  border: 1px solid hsla(24, 95%, 45%, 0.35);
  border-left: 3px solid hsl(24, 95%, 42%);
  border-radius: 12px; padding: 14px 18px; margin: 0 0 16px;
  font-size: 0.92rem; color: var(--text);
}
@media (prefers-color-scheme: dark) {
  .warn { background: hsla(24, 95%, 55%, 0.14); border-left-color: hsl(24, 95%, 62%); }
}
/* Only the leading title is a block; inline <strong> inside the body must stay inline,
   otherwise emphasised phrases break onto their own lines mid-sentence. */
.warn > strong:first-child { display: block; margin-bottom: 4px; }

/* Placeholder the operator must fill in before publication. */
.todo {
  background: hsla(48, 100%, 50%, 0.28); color: var(--text);
  border-bottom: 1px dashed hsl(38, 92%, 40%); padding: 0 3px; border-radius: 3px;
  font-style: normal;
}
@media (prefers-color-scheme: dark) { .todo { background: hsla(48, 100%, 50%, 0.22); } }
