/* One stylesheet for the whole site. System fonts, one accent colour, light and dark, no external resources. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6f9;
  --text: #16191d;
  --muted: #4a5360;
  --line: #c7ced8;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --code-bg: #eef1f5;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151a;
    --surface: #1a2028;
    --text: #e8ecf1;
    --muted: #aab3bf;
    --line: #3a4350;
    --accent: #7cb7ff;
    --accent-text: #0b1118;
    --code-bg: #1f2630;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
}
.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}
a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
.skip:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 1rem;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .wrap {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.brand span {
  font-weight: 400;
  color: var(--muted);
}
nav ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
nav a {
  font-size: 0.95rem;
}
nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

main {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}
h2 {
  font-size: 1.45rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
}
h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.25rem;
}
p,
ul,
ol,
table,
blockquote,
figure,
pre {
  margin: 0 0 1rem;
}
h1 + p {
  font-size: 1.2rem;
  color: var(--muted);
}
li {
  margin: 0.25rem 0;
}
code {
  font: 0.9em var(--mono);
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-radius: 6px;
}
pre code {
  background: none;
  padding: 0;
}
blockquote {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 0 6px 6px 0;
}
blockquote p:last-child {
  margin-bottom: 0;
}
table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  max-width: 100%;
}
th,
td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--surface);
}

.diagram {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
}
.diagram svg {
  display: block;
  width: 100%;
  max-width: 32rem;
  height: auto;
  margin: 0 auto;
  font-family: var(--font);
}
.diagram figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
}
.km-kit rect {
  fill: var(--bg);
  stroke: var(--text);
  stroke-width: 1.5;
}
.km-change rect {
  stroke: var(--accent);
  stroke-width: 3;
}
.km-outside rect {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}
.km-note rect {
  fill: var(--code-bg);
  stroke: var(--line);
  stroke-width: 1.5;
}
.km-base rect {
  fill: var(--accent);
  stroke: none;
}
.km-base text {
  fill: var(--accent-text);
}
.km-name {
  fill: var(--text);
  font-size: 16px;
  font-weight: 700;
}
.km-sub {
  fill: var(--muted);
  font-size: 13px;
}
.km-lines line {
  stroke: var(--text);
  stroke-width: 2;
}
.km-arrowhead {
  fill: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .wrap {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}
.site-footer p {
  margin: 0;
}
