/* Published rule registry (P02-D). Written by hand; scripts/governance/build-registry.py checks it exists.
   WCAG 2.1 AA: every text colour is at least 4.5:1 on its background in light and dark
   (checked by orchestrator/tests/test_registry_publish.py), the focus ring at least 3:1.
   No inline styles anywhere: the site's content security policy allows style-src 'self' only. */
:root {
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --bg: #ffffff;
  --panel: #f3f4f6;
  --link: #0b4f9c;
  --border: #6b7280;
  --notice-text: #1a1a1a;
  --notice-bg: #fff4ce;
  --focus: #0b4f9c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f2f2f2;
    --muted: #c4c7cc;
    --bg: #121417;
    --panel: #1d2127;
    --link: #8ab8ff;
    --border: #8b93a1;
    --notice-text: #f2f2f2;
    --notice-bg: #4a3b00;
    --focus: #8ab8ff;
  }
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0 auto;
  padding: 1rem;
  max-width: 72rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; margin-top: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
h3 { font-size: 1.15rem; margin-top: 1.75rem; }

a { color: var(--link); text-decoration: underline; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--link);
}

.skip-link:focus { left: 0; z-index: 10; }

nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0; list-style: none; }

.notice {
  padding: 0.75rem 1rem;
  background: var(--notice-bg);
  color: var(--notice-text);
  border: 2px solid var(--border);
  border-radius: 0.25rem;
}

dl { margin: 0.75rem 0; }
dt { font-weight: 700; margin-top: 0.5rem; }
dd { margin: 0 0 0 1rem; overflow-wrap: anywhere; }

code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }

article {
  margin: 1.25rem 0;
  padding: 0.5rem 1rem 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
}

.table-scroll { overflow-x: auto; max-width: 100%; margin: 1rem 0; }

table { border-collapse: collapse; width: 100%; min-width: 36rem; }

caption { text-align: left; font-weight: 700; padding: 0.5rem 0; color: var(--text); }

th, td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }

thead th { background: var(--panel); color: var(--text); }

tbody th { font-weight: 600; background: var(--bg); }

footer { margin-top: 3rem; color: var(--muted); }

@media (max-width: 40rem) {
  body { padding: 0.75rem; }
  dd { margin-left: 0.5rem; }
  h1 { font-size: 1.4rem; }
}
