/* Keyward Labs website. Colours are tokens; dark mode follows the visitor's system setting. */
:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #57606a;
  --line: #d8dee4;
  --link: #0b5a61;
  --code-bg: #f3f5f7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1417;
    --fg: #e6edf3;
    --muted: #9aa7b2;
    --line: #2a333a;
    --link: #7fd0d6;
    --code-bg: #1a2227;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.site-header,
main,
footer {
  max-width: 820px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
  font-size: 18px;
}

.site-header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--fg); }

main { padding-top: 16px; padding-bottom: 48px; }

h1 { font-size: 2rem; line-height: 1.25; margin: 20px 0 8px; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 36px 0 8px; }
h3 { font-size: 1.1rem; margin: 24px 0 4px; }

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

.updated { color: var(--muted); margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }

code {
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

li { margin: 4px 0; }

footer {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a { color: var(--muted); }
footer p { margin: 8px 0 0; }
