/* The public site (HP spec §11). The console's ink and paper palette as literal values, system fonts only, nothing
   loaded from another origin, so the edge's Content-Security-Policy needs no exception. Light by default; dark when
   the reader's system asks for it. */

:root {
  --ink: #172033;
  --paper: #f2f4f3;
  --surface: #ffffff;
  --rule: #d3d9dc;
  --muted: #5b6675;
  --permit: #0c7462;
  --deny: #c2362f;
  --hold: #946112;
  --ledger: #4b3f8c;
  --boundary: #2b5fa8;
  --hold-soft: #f7eedc;
  --boundary-soft: #e4ecf7;
  --code-bg: #e9ecee;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4e9ee;
    --paper: #0d131c;
    --surface: #141c28;
    --rule: #26313f;
    --muted: #97a3b3;
    --permit: #34c3a3;
    --deny: #f26b63;
    --hold: #e3ae4b;
    --ledger: #a395f0;
    --boundary: #6fa3f0;
    --hold-soft: #3a2e14;
    --boundary-soft: #172a45;
    --code-bg: #1b2533;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--boundary);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--boundary);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 1;
  background: var(--surface);
  padding: 4px 8px;
}

/* ---- masthead ---- */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.bar {
  max-width: 72rem;
  margin: 0 auto;
  padding: 12px 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--hold);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}

.status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

nav ul {
  max-width: 72rem;
  margin: 0 auto;
  padding: 8px 16px 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

nav a {
  display: inline-block;
  padding: 6px 0 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--ink);
}

nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--boundary);
}

/* ---- content ---- */
main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

article {
  max-width: 46rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 30px;
  margin: 8px 0 16px;
}

h2 {
  font-size: 21px;
  margin: 40px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 17px;
  margin: 28px 0 6px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

li + li {
  margin-top: 4px;
}

strong {
  font-weight: 650;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  border-radius: 3px;
  padding: 1px 4px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ledger);
  border-radius: 4px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 16px;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  overflow-wrap: normal;
}

blockquote {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--boundary);
  background: var(--boundary-soft);
  border-radius: 0 4px 4px 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

.notice {
  margin: 20px 0 24px;
  padding: 14px 16px;
  background: var(--hold-soft);
  border: 1px solid var(--hold);
  border-left-width: 4px;
  border-radius: 4px;
}

.notice p {
  margin: 0;
}

/* ---- tables: data-dense, scroll sideways on a phone rather than overflow the page ---- */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.45;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}

th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.codes td:first-child {
  white-space: nowrap;
}

.models td:first-child {
  min-width: 13rem;
}

td:first-child code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.models td:nth-child(2),
.models td:nth-child(3) {
  min-width: 9rem;
}

.codes td:nth-child(2) {
  font-variant-numeric: tabular-nums;
}

.codes tr:target td {
  background: var(--boundary-soft);
}

.note {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hold);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0 5px;
}

/* The reason-code and model tables are wider than the reading column. */
article:has(.codes),
article:has(.models) {
  max-width: none;
}

article:has(.codes) > p,
article:has(.models) > p,
article:has(.models) > ul,
article:has(.models) > h2,
article:has(.models) > h1 {
  max-width: 46rem;
}

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

footer p {
  max-width: 72rem;
  margin: 0 auto;
  padding: 12px 16px 0;
}

footer p:last-child {
  padding-bottom: 16px;
}

@media (max-width: 600px) {
  h1 {
    font-size: 25px;
  }

  nav ul {
    gap: 0 14px;
  }
}
