/* Mellow legal-pages CSS — minimal, readable, mobile-first.
   Mirrors the app's "warm cream paper" feel without pulling in any
   theme tokens or fonts (the in-app browser doesn't need brand depth). */

:root {
  --bg:        #FFFFFF;
  --surface:   #FBFAF7;
  --text:      #1F2A24;
  --text-soft: #4B5752;
  --accent:    #00704A;     /* Siren green */
  --border:    #E5E7EB;
  --code-bg:   #F4F4F5;
  --max-w:     720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans',
               'Yu Gothic', 'Meiryo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Page chrome */
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
header.site a.brand {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}
header.site nav.lang a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  margin-left: 12px;
}
header.site nav.lang a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Article body */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 80px;
}
main h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 16px 0 12px;
}
main h2 {
  font-size: 22px;
  margin: 32px 0 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
main h3 { font-size: 18px; margin: 24px 0 8px; }
main h4 { font-size: 16px; margin: 20px 0 6px; }
main p, main li { color: var(--text); }
main a { color: var(--accent); }
main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
main code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 14px;
}

/* Tables */
main table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
}
main th, main td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
main th {
  background: var(--surface);
  font-weight: 600;
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
}
footer.site .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
footer.site a {
  color: var(--text-soft);
  text-decoration: none;
  margin-right: 14px;
}
footer.site a:hover { color: var(--accent); }

/* Index page */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.doc-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.doc-list li:last-child { border-bottom: none; }
.doc-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}
.doc-list .muted {
  color: var(--text-soft);
  font-weight: 400;
  font-size: 14px;
  margin-left: 6px;
}

/* RTL — applies to the /privacy-ar and /terms-ar pages, plus the
   AR row on the index page (which is wrapped in dir="rtl" inline). */
html[dir="rtl"] header.site nav.lang a { margin-left: 0; margin-right: 12px; }
html[dir="rtl"] footer.site a { margin-right: 0; margin-left: 14px; }
