/* MoNomo legal pages: shared long-form styles for terms, privacy, and guidelines. */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #10141c;
  --muted: #4a5466;
  --border: #d5dbe4;
  --link: #1f4fa8;
  --link-hover: #143a80;
  --accent: #dda941;
  --notice-bg: #fff6df;
  --notice-border: #dda941;
  --notice-text: #5a4210;
  --summary-bg: #e9edf3;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090d14;
    --surface: #111722;
    --text: #e8edf5;
    --muted: #a3adbd;
    --border: #263042;
    --link: #8db8ff;
    --link-hover: #b9d3ff;
    --accent: #dda941;
    --notice-bg: #2a2110;
    --notice-border: #dda941;
    --notice-text: #f3dca4;
    --summary-bg: #151c29;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
  border-bottom-color: var(--text);
}

.site-header nav a {
  font-size: 0.95rem;
  margin-left: 14px;
}

/* Draft notice */
.notice {
  margin: 20px 0 8px;
  padding: 12px 16px;
  border: 1px solid var(--notice-border);
  border-left-width: 5px;
  border-radius: 6px;
  background: var(--notice-bg);
  color: var(--notice-text);
  font-weight: 600;
}

/* Main content */
main {
  padding-bottom: 48px;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 24px 0 4px;
}

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

h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 40px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}

h2 .num {
  color: var(--accent);
  margin-right: 6px;
}

h3 {
  font-size: 1.1rem;
  margin: 24px 0 6px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

ul,
ol {
  padding-left: 24px;
}

li {
  margin-bottom: 6px;
}

.summary {
  background: var(--summary-bg);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.97rem;
}

.summary strong {
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 8px;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 28px;
  font-size: 0.95rem;
}

.toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 1.65rem;
  }
  .toc ol {
    columns: 1;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  padding-top: 18px;
  padding-bottom: 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .site-header nav,
  .toc {
    display: none;
  }
  a {
    color: #000;
  }
}
