/* Matches www.thecitadel.com: nbArchitektPro upper-case headings, vcrOsdNeue everywhere else, the site's colour and control tokens.
   Both fonts are the team's own web fonts, copied from the site into docs/fonts/. */
@font-face {
  font-family: nbArchitektPro;
  src: url("/docs/fonts/nb-architekt-pro.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: vcrOsdNeue;
  src: url("/docs/fonts/vcr-osd-neue.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* Size-matched fallbacks so the swap doesn't shift the layout (same overrides as the site). */
@font-face {
  font-family: "nbArchitektPro Fallback";
  src: local("Arial");
  ascent-override: 62.94%;
  descent-override: 15.73%;
  line-gap-override: 0%;
  size-adjust: 127.11%;
}

@font-face {
  font-family: "vcrOsdNeue Fallback";
  src: local("Arial");
  ascent-override: 77.68%;
  descent-override: 14.38%;
  line-gap-override: 8.27%;
  size-adjust: 108.62%;
}

:root {
  color-scheme: dark;
  --background: #070707;
  --foreground: #f8f5ec;
  --foreground-muted: rgba(248, 245, 236, 0.74);
  --site-orange: #f7ad54;
  --site-orange-label: rgba(247, 173, 84, 0.92);
  --site-content-width: 1120px;
  --site-gutter: 32px;
  --site-button-height: 48px;
  --site-button-font-size: 14px;
  --site-button-letter-spacing: 0.14em;
  --site-control-border: rgba(248, 245, 236, 0.18);
  --site-control-border-accent: rgba(247, 173, 84, 0.52);
  --site-panel: rgba(248, 245, 236, 0.03);
  --site-transition: 160ms ease-out;
  --font-display: nbArchitektPro, "nbArchitektPro Fallback", Arial, sans-serif;
  --font-body: vcrOsdNeue, "vcrOsdNeue Fallback", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.6 var(--font-body);
  letter-spacing: 0.02em;
  overflow-wrap: break-word;
}

b,
strong,
h1,
h2,
h3 {
  font-weight: 400;
}

a {
  color: var(--site-orange);
  text-decoration-color: var(--site-control-border-accent);
  text-underline-offset: 4px;
  transition:
    color var(--site-transition),
    text-decoration-color var(--site-transition);
}

a:hover {
  color: var(--foreground);
  text-decoration-color: var(--site-orange);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--site-orange);
  outline-offset: 2px;
}

.page {
  max-width: calc(var(--site-content-width) + var(--site-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

header.top {
  border-bottom: 1px solid var(--site-control-border);
  padding: 64px 0 40px;
}

h1,
h2,
h3 {
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--font-display);
  color: var(--foreground);
}

h1 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  margin: 56px 0 16px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Small upper-case labels, as on the site: 14px, wide tracking, orange. */
h3 {
  margin: 28px 0 8px;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--site-orange-label);
}

p,
li {
  max-width: 72ch;
}

p {
  margin: 0 0 16px;
}

.lede {
  color: var(--foreground-muted);
  font-size: 18px;
  max-width: 62ch;
  margin: 0;
}

nav.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
  margin-top: 24px;
}

nav.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--foreground-muted);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.13em;
  transition:
    color var(--site-transition),
    background-color var(--site-transition);
}

nav.links a::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 8px;
  background: var(--site-orange);
}

nav.links a:hover {
  color: #100904;
  background: var(--site-orange);
}

nav.links a:hover::before {
  background: #100904;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--site-button-height);
  padding: 0 24px;
  background: rgba(247, 173, 84, 0.1);
  border: 1px solid var(--site-control-border-accent);
  color: var(--site-orange);
  text-decoration: none;
  text-transform: uppercase;
  font-size: var(--site-button-font-size);
  letter-spacing: var(--site-button-letter-spacing);
  transition:
    background-color var(--site-transition),
    color var(--site-transition),
    border-color var(--site-transition);
}

.cta::before {
  content: "\00bb";
  font-size: 1.3em;
  line-height: 1;
}

.cta:hover {
  background: var(--site-orange);
  border-color: var(--site-orange);
  color: #100904;
}

pre,
code {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.02em;
}

pre {
  margin: 8px 0 16px;
  padding: 16px 20px;
  overflow-x: auto;
  background: var(--site-panel);
  border: 1px solid var(--site-control-border);
  line-height: 1.6;
}

code {
  color: var(--site-orange);
}

pre code {
  color: var(--foreground);
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 16px;
  font-size: 14px;
  background: var(--site-panel);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border: 1px solid var(--site-control-border);
}

th {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--site-orange-label);
}

.draft {
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--site-control-border-accent);
  color: var(--site-orange-label);
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.16em;
  vertical-align: middle;
}

footer {
  margin: 56px 0 0;
  padding: 24px 0 48px;
  border-top: 1px solid var(--site-control-border);
  color: var(--foreground-muted);
  font-size: 14px;
}

#reference-root {
  margin-top: 16px;
  border-top: 1px solid var(--site-control-border);
}

@media (max-width: 600px) {
  .page {
    padding: 0 16px;
  }

  header.top {
    padding: 40px 0 32px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
    margin-top: 40px;
  }

  .lede {
    font-size: 16px;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  th,
  td {
    padding: 10px 12px;
  }
}

#reference-root h1,
#reference-root h2 {
  text-transform: uppercase;
}
