/* Reference layout shares the explorer's font faces and semantic palette. */
@font-face {
  font-family: Concourse;
  src: url("/fonts/concourse_4_regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Concourse;
  src: url("/fonts/concourse_6_regular.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: Equity;
  src: url("/fonts/equity_a_regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Triplicate;
  src: url("/fonts/triplicate_a_code_regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Triplicate;
  src: url("/fonts/triplicate_a_code_bold.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --text: #182329;
  --muted: #52616b;
  --line: #d3d9d7;
  --accent: #334fc4;
  --notice: #edf0ee;
  --highlight: #e3e7e5;
  --red: #b93838;
  --amber: #805800;
  font-family: Concourse, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151d24;
    --surface: #1d2831;
    --text: #f1f5f9;
    --muted: #9baab5;
    --line: #475569;
    --accent: #a1b3ff;
    --notice: #283640;
    --highlight: #3b4d6b;
    --red: #ff9292;
    --amber: #eab308;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
header,
main,
footer {
  max-width: 1240px;
  margin: auto;
  padding: 24px 40px;
}
header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px 32px;
  border-bottom: 1px solid var(--line);
}
header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
  font-size: 0.88rem;
}
header nav a {
  color: var(--muted);
  text-decoration: none;
}
header nav a:last-child {
  color: var(--accent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  background: #334fc4;
  color: white;
  border-radius: 7px;
  width: 38px;
  height: 40px;
  font-size: 32px;
  line-height: 40px;
  text-align: center;
}
.brand-name small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
}
.header-search {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  max-width: 680px;
  width: 100%;
}
input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
}
input::placeholder {
  color: var(--muted);
}
button,
.actions a {
  display: inline-block;
  background: #334fc4;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
.actions a:hover {
  background: #293fa1;
}
main {
  padding-top: 24px;
  padding-bottom: 64px;
}
h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 14px 0 20px;
  overflow-wrap: anywhere;
  max-width: 28ch;
}
.title-name,
.title-code {
  display: block;
}
h1 .title-code {
  font-size: clamp(0.86rem, 1.5vw, 1.15rem);
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 14px;
  line-height: 1.5;
}
h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 44px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  margin: 28px 0 12px;
}
p {
  max-width: 74ch;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.lead {
  font-size: 1.08rem;
  max-width: 70ch;
  line-height: 1.6;
}
.page-intro {
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  list-style: none;
  padding: 0;
  font-size: 0.76rem;
  color: var(--muted);
}
.breadcrumbs li {
  min-width: 0;
  overflow-wrap: anywhere;
}
.breadcrumbs li + li:before {
  content: "/";
  margin-right: 10px;
}
.breadcrumbs [aria-current="page"] {
  color: var(--muted);
  text-decoration: none;
}
.document-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 48px;
}
.document-layout:has(> article:empty) {
  display: none;
}
.document-layout:not(:has(.contents)) {
  grid-template-columns: minmax(0, 1fr);
}
article {
  min-width: 0;
}
article > h2:first-child {
  margin-top: 0;
}
.contents nav {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.contents .eyebrow {
  margin: 12px 0;
}
.contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
}
.contents li {
  padding: 0;
}
.contents a {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: var(--muted);
  line-height: 1.35;
}
.contents a:hover {
  color: var(--accent);
}
ul,
ol {
  padding-left: 24px;
}
li {
  padding: 5px 0;
  overflow-wrap: anywhere;
}
.notice {
  background: var(--notice);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.reading {
  font-family: Equity, Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.65;
}
.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  background: var(--surface);
  font-size: 0.9rem;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
th {
  font-weight: 600;
  background: var(--notice);
  font-size: 0.76rem;
  color: var(--muted);
}
.values-table th:first-child {
  width: 100px;
}
.values-table th:last-child {
  width: 150px;
}
.values-table td:first-child code {
  color: var(--text);
  font-weight: 600;
}
.values-table td:nth-child(2) {
  line-height: 1.6;
}
.value-tag {
  font-size: 0.75rem;
  color: var(--muted);
}
.value-tag.reserved {
  color: var(--amber);
}
.inventory-table td:first-child {
  width: 65%;
}
.field-description {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 5px;
}
code {
  font-family: Triplicate, ui-monospace, monospace;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.76rem;
  line-height: 1.5;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--notice);
  color: var(--muted);
  white-space: nowrap;
}
.status-R {
  color: var(--accent);
  border-color: var(--accent);
}
.status-P {
  color: var(--red);
  border-color: var(--red);
}
.category-rule {
  display: block;
  margin-bottom: 10px;
}
.category-rule > span:first-child {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 4px;
}
.scope-grid {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 10px 20px;
  padding: 20px;
  background: var(--notice);
  border-radius: 5px;
  font-size: 0.86rem;
}
dt {
  font-weight: 600;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
details {
  border: 1px solid var(--line);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.88rem;
}
summary {
  cursor: pointer;
  font-family: Concourse, sans-serif;
}
details code {
  display: block;
}
.message-grid,
.field-directory {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.message-grid li,
.field-directory li {
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.message-grid a,
.field-directory a {
  display: block;
  padding: 16px 0;
  text-decoration: none;
}
.message-grid strong {
  font-size: 1.2rem;
}
.message-grid span,
.message-grid small,
.field-directory span {
  display: block;
  color: var(--muted);
}
.message-grid small {
  font-size: 0.72rem;
  margin-top: 4px;
}
.field-directory span {
  font-size: 0.84rem;
  margin-top: 4px;
}
.field-directory code {
  font-size: 0.85rem;
}
.message-grid a:hover,
.field-directory a:hover {
  background: var(--notice);
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.entry-grid a {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 5px;
  text-decoration: none;
}
.entry-grid a:hover {
  border-color: var(--accent);
}
.entry-grid strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}
.entry-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0;
}
.alphabet a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
}
.alphabet a:hover {
  background: var(--notice);
}
.letter-section {
  scroll-margin-top: 24px;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
  padding-bottom: 40px;
}
footer p {
  max-width: 100ch;
}
.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--surface);
  padding: 12px;
  z-index: 2;
}
@media (max-width: 1000px) {
  header,
  main,
  footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .document-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 28px;
  }
  .entry-grid {
    grid-template-columns: 1fr;
  }
  .entry-grid a {
    padding: 16px;
  }
  .entry-grid span {
    margin-top: 4px;
  }
}
@media (max-width: 700px) {
  :root {
    font-size: 17px;
  }
  header,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  header {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 18px;
  }
  header nav {
    justify-content: flex-start;
    gap: 8px 18px;
    font-size: 0.8rem;
  }
  .brand-name small {
    display: none;
  }
  .brand-mark {
    width: 30px;
    height: 32px;
    font-size: 27px;
    line-height: 32px;
  }
  main {
    padding-top: 14px;
  }
  h1 {
    font-size: 2rem;
    margin: 12px 0 18px;
  }
  .lead {
    font-size: 1rem;
  }
  .page-intro {
    margin-bottom: 24px;
  }
  .breadcrumbs {
    font-size: 0.7rem;
  }
  .document-layout {
    display: block;
  }
  .contents {
    margin: 0 -20px 24px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }
  .contents nav {
    position: static;
    max-height: none;
  }
  .contents .eyebrow {
    margin: 0 0 6px;
  }
  .contents ul {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .contents li {
    flex: 0 0 auto;
  }
  .contents a {
    white-space: nowrap;
    padding: 4px 0;
    color: var(--accent);
  }
  .message-grid,
  .field-directory {
    grid-template-columns: 1fr;
  }
  .scope-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .scope-grid dd {
    margin-bottom: 12px;
  }
  th,
  td {
    padding: 12px;
  }
  .inventory-table td:first-child {
    width: 60%;
  }
  .inventory-table code {
    font-size: 0.76rem;
  }
  .status {
    font-size: 0.7rem;
    padding: 2px 5px;
  }
  .values-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .values-table,
  .values-table tbody {
    display: block;
  }
  .values-table tr {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 14px 12px;
    gap: 6px 12px;
    border-bottom: 1px solid var(--line);
  }
  .values-table td {
    padding: 0;
    border: 0;
  }
  .values-table td:first-child {
    grid-row: 1 / 3;
  }
  .values-table td:nth-child(3) {
    grid-column: 2;
  }
  .values-table td:nth-child(3)::before {
    content: "Introduction tag: ";
    color: var(--muted);
    font-size: 0.75rem;
  }
}
@media print {
  header,
  .contents,
  .actions,
  .skip-link {
    display: none;
  }
  :root {
    color-scheme: light;
    --bg: white;
    --surface: white;
    --text: black;
    --muted: #333;
    --line: #ccc;
    --notice: #eee;
    --accent: #222;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .document-layout {
    display: block;
  }
  a {
    color: inherit;
  }
  .table-scroll {
    overflow: visible;
  }
  tr {
    break-inside: avoid;
  }
}
/* Compact orientation without competing with the answer. */
.entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.direction {
  font-size: 0.88rem;
  color: var(--muted);
}
.direction strong {
  color: var(--text);
  margin-right: 10px;
}
.message-purpose {
  max-width: 74ch;
  border: 0;
  border-left: 2px solid var(--line);
  padding: 4px 14px;
}
@media (max-width: 700px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }
  .inventory-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .inventory-table,
  .inventory-table tbody {
    display: block;
  }
  .inventory-table tr {
    display: block;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }
  .inventory-table td,
  .inventory-table td:first-child {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
  }
  .inventory-table td:last-child {
    margin-top: 10px;
  }
  .inventory-table code {
    font-size: 0.86rem;
  }
  .inventory-table .category-rule {
    display: inline-block;
    margin: 0 18px 0 0;
  }
}

.table-note {
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 700px) {
  .values-table td:nth-child(3):has(.untagged) {
    display: none;
  }
}
