/* Desk tokens. The desks sit outside the ten-family system, so this is their
   own small system: the same token names and the same 4.5:1 bar, a different
   palette and type pair each. Verified by scripts/check-contrast.mjs. */

:root {
  color-scheme: light dark;
  --bg: #FBFCFB;
  --surface: #FFFFFF;
  --ink: #111A14;
  --muted: #586A5E;
  --muted-ink: #586A5E;
  --accent: #15803D;
  --accent-strong: #15803D;
  --on-accent: #FFFFFF;
  --line: #DFE6E1;
  --measure: 70ch;
  --radius: 6px;
  --font-display: 'Inter Tight', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
  --bg: #0D120F;
  --surface: #151C18;
  --ink: #EAF1EC;
  --muted: #95A69B;
  --muted-ink: #95A69B;
  --accent: #5FCB82;
  --accent-strong: #5FCB82;
  --on-accent: #000000;
  --line: #212B24;
  }
}

:root[data-theme='dark'] {
  --bg: #0D120F;
  --surface: #151C18;
  --ink: #EAF1EC;
  --muted: #95A69B;
  --muted-ink: #95A69B;
  --accent: #5FCB82;
  --accent-strong: #5FCB82;
  --on-accent: #000000;
  --line: #212B24;
}

:root[data-theme='light'] {
  --bg: #FBFCFB;
  --surface: #FFFFFF;
  --ink: #111A14;
  --muted: #586A5E;
  --muted-ink: #586A5E;
  --accent: #15803D;
  --accent-strong: #15803D;
  --on-accent: #FFFFFF;
  --line: #DFE6E1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
}

.skip-link:focus {
  left: 0;
}

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.site-head nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  flex: 1;
}

.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted-ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-head nav a:hover,
.site-head nav a:focus-visible {
  color: var(--ink);
}

.theme {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-ink);
  cursor: pointer;
}

main {
  padding: 0 1rem;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.prose > * + * {
  margin-top: 1rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
}

.dateline {
  color: var(--muted-ink);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: var(--surface);
  font-size: 0.95rem;
}

.toc p {
  margin: 0 0 0.35rem;
  color: var(--muted-ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toc ul {
  margin: 0;
  padding-left: 1.1rem;
}

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

li + li {
  margin-top: 0.35rem;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.55;
}

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

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

/* a cited fact and an open one look different, and never by colour alone */
.fact,
.waiting {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: var(--surface);
}

.waiting {
  border-left-style: dashed;
}

.fact p,
.waiting p {
  margin: 0 0 0.35rem;
}

.fact p:last-child,
.waiting p:last-child {
  margin-bottom: 0;
}

.fact-id,
.waiting-head {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-ink);
}

.fact-status {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

.fact-source,
.waiting-date {
  font-size: 0.85rem;
  color: var(--muted-ink);
}

.site-foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.contact {
  margin: 0 0 0.75rem;
  color: var(--muted-ink);
}

/* house footer: the whole line is one link, and it has no hover styling */
.footer-link {
  color: var(--muted-ink);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
