/* OpenERS Foundation — minimal, accessible, no-framework stylesheet.
 * Designed for legibility, not visual flourish. The site is documentation
 * and signed artefacts; the style should not get in the way of either.
 */

:root {
  --ink: #1a1a1a;
  --paper: #fefefe;
  --muted: #555;
  --rule: #ddd;
  --accent: #003366;
  --warn: #aa5500;
  --code-bg: #f4f4f4;
  --max-width: 720px;
  --line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e8e8;
    --paper: #1a1a1a;
    --muted: #aaa;
    --rule: #333;
    --accent: #88aacc;
    --warn: #ddaa66;
    --code-bg: #2a2a2a;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: var(--line-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
}

header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

header .site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

header .site-title a {
  color: inherit;
  text-decoration: none;
}

header .tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

nav.primary {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

nav.primary a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 1rem;
}

nav.primary a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p, ul, ol {
  margin: 0 0 1rem 0;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

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

code, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

code {
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

pre {
  background: var(--code-bg);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  overflow-x: auto;
  line-height: 1.45;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  border-left: 3px solid var(--rule);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}

.status-box {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--warn);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 3px;
}

.status-box .status-label {
  font-weight: 600;
  color: var(--warn);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-box p:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-weight: 600;
  border-bottom: 2px solid var(--rule);
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--muted);
}

.endpoint-list {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  background: var(--code-bg);
  border-radius: 3px;
  padding: 1rem;
}

.endpoint-list .endpoint {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.endpoint-list .endpoint:last-child {
  margin-bottom: 0;
}

.endpoint-list .endpoint-path {
  font-weight: 600;
}

.endpoint-list .endpoint-desc {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 0;
}
