/* Shared look of the legal pages under /legal/. The colours follow the app's
   tokens (lib/design_system/tokens/oq_colors.dart) so a page opened from the
   app does not look like another product. */

:root {
  --bg: #F8FAFD;
  --surface: #FFFFFF;
  --text: #1A1F29;
  --muted: #50555E;
  --border: #DCDEE2;
  --link: #2170DF;
  --todo-bg: #FFF3D6;
  --todo-text: #6B4500;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1016;
    --surface: #131921;
    --text: #F0F2F5;
    --muted: #ADB1B9;
    --border: #2A313B;
    --link: #5097FF;
    --todo-bg: #3A2C0C;
    --todo-text: #F0C13E;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, 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: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.langs { display: flex; gap: 8px; }

.langs a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.langs a[aria-current="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
}

/* Both languages show when scripts are off; legal.js keeps one. */
.js article[lang]:not(.active) { display: none; }
.no-js article[lang] + article[lang] { margin-top: 24px; }

h1 { font-size: 28px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.3; margin: 32px 0 8px; }
h3 { font-size: 17px; margin: 20px 0 4px; }

.meta { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

p, li { overflow-wrap: anywhere; }
ul, ol { padding-left: 22px; }
li + li { margin-top: 4px; }

a { color: var(--link); }

/* Fixed columns that wrap, so a phone shows the whole row without scrolling. */
table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
  hyphens: auto;
}
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* A value the operator has to fill in before the page is published. */
.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  border-radius: 4px;
  padding: 0 4px;
}

footer { color: var(--muted); font-size: 14px; margin-top: 24px; }
