/* MachineOS legal and support pages. Colors match App/Theme/Theme.swift (bg 050506, text F2F2F7, red E5231B). */
:root {
  color-scheme: dark;
  --bg: #050506;
  --text: #F2F2F7;
  --muted: #A7A7B0;
  --accent: #E5231B;
  --rule: #26262B;
  --panel: #0F0F12;
  --draft-bg: #1E0C0B;
  --todo-bg: rgba(229, 35, 27, 0.22);
  /* Bauhaus-esque like the main page; Futura is on every iPhone and Mac, so nothing is fetched from elsewhere. */
  --font: Futura, "Jost", "Century Gothic", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}

*, *::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: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
a { color: var(--text); text-decoration-line: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* 16px side gutters at every width; the column never grows wider than 720px. */
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; min-height: 56px; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.brand::before {
  content: ""; width: 18px; height: 12px;
  border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: skewX(-25deg);
}
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

main { padding-top: 24px; padding-bottom: 40px; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 36px 0 10px; font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
h3 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 20px; }
li { margin: 0 0 6px; }
.meta { margin: 0 0 20px; font-size: 14px; color: var(--muted); }

/* Visible draft banner, shown at the top of every page. */
.draft {
  margin: 0 0 24px; padding: 12px 14px;
  background: var(--draft-bg); border: 1px solid var(--accent); border-left-width: 6px; border-radius: 6px;
}
.draft strong { display: block; margin-bottom: 4px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.draft p { margin: 0; font-size: 15px; }

/* Open items: placeholders in brackets, highlighted so nothing unfinished reads as final. */
.todo { padding: 0 4px; border-radius: 3px; background: var(--todo-bg); font-weight: 600; }
.owner-note {
  margin: 0 0 14px; padding: 8px 12px;
  font-size: 15px; border-left: 3px solid var(--accent); background: var(--panel);
}

/* Proposed wording (2026-11-11) for the owner and counsel: dashed accent border, its change id and reason on top.
   Remove the wrapper and the tag when a change is accepted; delete the block when it isn't. */
.proposed { margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 8px; }
.proposed > :last-child { margin-bottom: 0; }
.proposed-tag { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.proposed-tag strong { color: var(--text); letter-spacing: 0.04em; }
tr.proposed-row th, tr.proposed-row td { background: var(--panel); border-left: 2px dashed var(--accent); }

/* Data table: a real table on wide screens, stacked rows (labels from data-label) below 640px. */
.legal-table { margin: 0 0 14px; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.legal-table th, .legal-table td { padding: 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.legal-table thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.legal-table tbody th { width: 22%; font-weight: 600; }

@media (max-width: 640px) {
  .legal-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .legal-table table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .legal-table tbody th, .legal-table td { padding: 3px 0; border: 0; }
  .legal-table tbody th { width: 100%; margin-bottom: 4px; font-size: 16px; }
  .legal-table td::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  }
}

/* Support contact slot. */
.contact { margin: 0 0 8px; padding: 16px; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; }
.contact h2 { margin-top: 0; }
.contact p:last-child { margin-bottom: 0; }

.site-foot { border-top: 1px solid var(--rule); padding-top: 20px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.site-foot a { color: var(--text); }
