/* Shared by every page under /bjj/: tokens, type, controls, the side nav.
   Page-specific rules stay inline in each page. The nav itself is drawn by
   audits.js from the one audit registry, so no page lists the others by hand. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1a1a1a; --ink-soft: #4a4a4a; --ink-mute: #666;
  --link: #3f6299; --rule: #e4e4e4; --rule-soft: #f0f0f0;
  --accent: #8a5a12; --hi: #fff5d6;
  --done: #3d6b37; --done-bg: #eef5ec;
  --open: #8a5a12; --open-bg: #fff5d6;
  --wait: #666;    --wait-bg: #f0f0f0;
}
body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #fff; color: var(--ink);
  font-size: 15px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  display: flex; min-height: 100vh;
}
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
main { flex: 1; min-width: 0; max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 26px; font-weight: normal; margin: 4px 0 6px; }
h2 { font-size: 17px; font-weight: normal; margin: 26px 0 4px; }
.lede { color: var(--ink-soft); max-width: 62ch; }
.why { color: var(--ink-mute); font-size: 14px; max-width: 72ch; margin-top: 8px; }
.hint { color: var(--ink-mute); font-size: 14px; margin-bottom: 10px; }
details { margin: 12px 0 18px; max-width: 80ch; }
summary { cursor: pointer; color: var(--link); }
details pre {
  white-space: pre-wrap; font-family: Georgia, serif; font-size: 14px;
  background: var(--rule-soft); border-left: 3px solid var(--accent);
  padding: 12px 14px; margin-top: 8px;
}
.keys { color: var(--ink-mute); font-size: 13px; }
.keys kbd { font-family: 'Courier New', monospace; border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; }
footer { margin-top: 34px; color: var(--ink-mute); font-size: 13px; max-width: 72ch; }

button, .btn {
  font-family: 'Courier New', Courier, monospace; font-size: 11.5px;
  letter-spacing: 0.04em; color: var(--link); background: #fff;
  border: 1px solid #c3d3e5; border-radius: 3px; padding: 6px 11px;
  cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #eef3fa; border-color: var(--link); }
button.primary, .btn.primary { background: var(--link); color: #fff; border-color: var(--link); }
button.primary:hover, .btn.primary:hover { background: #33507d; }
button.link { border: 0; padding: 0 0 0 8px; background: none; text-decoration: underline; }
button[aria-pressed="true"] { background: var(--link); color: #fff; border-color: var(--link); }

.start { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.start input { font: inherit; padding: 6px 9px; border: 1px solid #c3d3e5; border-radius: 3px; }
.bar {
  display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px;
}
.bar .progress { font-variant-numeric: tabular-nums; }
.bar .saved { color: var(--ink-mute); font-size: 13px; }
.bar .saved.warn { color: #a3261b; }
.bar .primary { margin-left: auto; }

/* Status chips: one vocabulary for the nav, the landing and every page head. */
.st {
  font-family: 'Courier New', Courier, monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  padding: 1px 6px; border-radius: 2px; border: 1px solid;
}
.st-done { color: var(--done); background: var(--done-bg); border-color: #b9d3b4; }
.st-open { color: var(--open); background: var(--open-bg); border-color: #e6cf98; }
.st-wait { color: var(--wait); background: var(--wait-bg); border-color: var(--rule); }

/* The side nav. */
nav.side {
  flex: 0 0 210px; position: sticky; top: 0; align-self: flex-start;
  height: 100vh; overflow-y: auto; padding: 22px 12px;
  border-right: 1px solid var(--rule); background: #fafafa;
  display: flex; flex-direction: column; gap: 2px;
}
nav.side .brand {
  font-family: 'Courier New', Courier, monospace; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink);
  text-decoration: none; padding: 0 8px 12px; font-weight: bold;
}
nav.side .item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: 3px; font-size: 14px;
  color: var(--ink-soft); text-decoration: none;
}
nav.side .item .n { font-family: 'Courier New', monospace; color: var(--ink-mute); margin-right: 6px; }
nav.side .item:hover { background: #eef3fa; }
nav.side .item.on { background: #e6edf7; color: var(--ink); }
nav.side .out {
  margin-top: auto; padding: 14px 8px 0;
  font-family: 'Courier New', Courier, monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none;
}

@media (max-width: 900px) {
  body { flex-direction: column; }
  nav.side {
    position: static; height: auto; flex: none; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 4px 6px; padding: 12px 16px;
    border-right: 0; border-bottom: 1px solid var(--rule);
  }
  nav.side .brand { width: 100%; padding: 0 0 4px; }
  nav.side .item { padding: 4px 8px; border: 1px solid var(--rule); font-size: 13px; }
  nav.side .out { margin: 0 0 0 auto; padding: 0; }
  main { margin: 0; width: 100%; }
}
@media (max-width: 600px) {
  main { padding: 16px 16px 48px; }
  h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* A page's head line, drawn by audits.js: "Audit n · status · registered in …". */
.eyebrow { font-size: 13px; color: var(--ink-mute); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eyebrow code { font-size: 12px; }
