/* SGA-OIS specification site.
 *
 * Palette taken from the association's own product, not invented here:
 * deep green, lime, gold on cream, with the dark tokens the platform already
 * defines. A standard that looks like it came from somewhere else than the
 * organization publishing it is a standard people trust slightly less.
 *
 * System fonts on purpose. Somebody implementing against this is as likely to
 * be on a bay network with no route out as at a desk, and a page whose
 * typography arrives from a CDN is a page that is sometimes wrong.
 */

:root {
  --deep: #0C3025;
  --deep-2: #14453a;
  --lime: #8DC63F;
  --lime-ink: #4d7c18;
  --gold: #C9A227;
  --cream: #FBFAF6;
  --parch: #F8F2E0;
  --parch-line: #E8DCBB;

  --bg: var(--cream);
  --surface: #ffffff;
  --surface-2: #F5F8F5;
  --ink: #15201C;
  --body: #3A4642;
  /* At least 4.5:1 on every light background here (WCAG AA for body-size
     text): breadcrumbs, pager labels and captions are set in it. */
  --mute: #5F6C67;
  --line: #DFE4DF;
  --line-soft: #EDF1ED;
  --accent: var(--deep);
  --accent-ink: #ffffff;
  --link: #14513C;
  --link-hover: #0C3025;
  --code-bg: #F2F5F1;
  --code-ink: #1d3b32;
  --warn-bg: #FDECEA;
  --warn-line: #E8897F;
  --shadow: 0 1px 2px rgba(12, 48, 37, .05), 0 8px 24px -12px rgba(12, 48, 37, .18);

  --term-bg: #0b1310;
  --term-bar: #16211b;
  --term-edge: #22332a;
  --term-ring: 0 1px 2px rgba(12, 48, 37, .1), 0 10px 30px -18px rgba(12, 48, 37, .5);
  --fig-bg: #F6F9F5;
  --fig-line: #DDE6DB;
  --fig-edge: #BBD59A;
  --rule-bg: linear-gradient(90deg, rgba(201, 162, 39, .12), rgba(201, 162, 39, .02) 62%, transparent);
  --head-bg: #FAF4E2;
  --head-line: #E8DCBB;
  --head-edge: var(--gold);

  --sidebar: 300px;
  --toc: 240px;
  --measure: 88ch;

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1411;
    --surface: #141d19;
    --surface-2: #18231e;
    --ink: #e8f0ea;
    --body: #c2d1c8;
    --mute: #8ba295;
    --line: #24322c;
    --line-soft: #1c2823;
    --accent: #b8ff2e;
    --accent-ink: #0d1411;
    --link: #b8ff2e;
    --link-hover: #d6ff86;
    --code-bg: #101916;
    --code-ink: #cfe3da;
    --parch: #1a1f19;
    --parch-line: #2f3a2b;
    --warn-bg: #2a1a18;
    --warn-line: #7A2B25;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --term-bg: #0a120f;
    --term-bar: #16241d;
    --term-edge: #32483c;
    --term-ring: 0 0 0 1px rgba(141, 198, 63, .13), 0 14px 34px -20px #000;
    --fig-bg: #141e19;
    --fig-line: #2a3b33;
    --fig-edge: #4d6b3c;
    --rule-bg: linear-gradient(90deg, rgba(201, 162, 39, .16), rgba(201, 162, 39, .04) 62%, transparent);
    --head-bg: #1f2113;
    --head-line: #4a4a2a;
    --head-edge: #C9A227;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1411;
  --surface: #141d19;
  --surface-2: #18231e;
  --ink: #e8f0ea;
  --body: #c2d1c8;
  --mute: #8ba295;
  --line: #24322c;
  --line-soft: #1c2823;
  --accent: #b8ff2e;
  --accent-ink: #0d1411;
  --link: #b8ff2e;
  --link-hover: #d6ff86;
  --code-bg: #101916;
  --code-ink: #cfe3da;
  --parch: #1a1f19;
  --parch-line: #2f3a2b;
  --warn-bg: #2a1a18;
  --warn-line: #7A2B25;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --term-bg: #0a120f;
  --term-bar: #16241d;
  --term-edge: #32483c;
  --term-ring: 0 0 0 1px rgba(141, 198, 63, .13), 0 14px 34px -20px #000;
  --fig-bg: #141e19;
  --fig-line: #2a3b33;
  --fig-edge: #4d6b3c;
  --rule-bg: linear-gradient(90deg, rgba(201, 162, 39, .16), rgba(201, 162, 39, .04) 62%, transparent);
  --head-bg: #1f2113;
  --head-line: #4a4a2a;
  --head-edge: #C9A227;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }
/* A link inside running text is underlined, faintly, so it is not told apart
   by color alone -- which a reader with low color vision cannot see. Links in
   navigation, cards and buttons are recognizable by where they sit. */
article p a, article li a, article td a {
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ------------------------------------------------------------------ header */

/* One bar, and it is about the STANDARD.
 *
 * There were two: the association's marketing navigation stacked above the
 * documentation's own. It made the page feel like somebody else's site with a
 * manual bolted underneath, and it spent sixty pixels and a row of links on
 * destinations nobody reading a field catalog is going to. What is left links
 * only to high-value places inside this standard, plus the partner page.
 *
 * No join button. The partner programme is linked from the navigation and
 * argued properly on the pages that have room for it; a call to action in the
 * chrome of a specification is an advertisement in a reference book.
 */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.1rem;
  height: 60px; padding: 0 1.25rem;
  background: var(--deep);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
:root[data-theme="dark"] .top { background: #0a100d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top { background: #0a100d; } }

.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; color: #fff; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(140deg, var(--lime), var(--gold));
  display: grid; place-items: center;
  font: 800 11px/1 var(--sans); color: var(--deep); letter-spacing: .02em;
}
.brand .logo { height: 34px; width: auto; display: block; }
.brand .name { display: flex; flex-direction: column; line-height: 1.15; }
.brand .name b { font-weight: 700; letter-spacing: -.01em; font-size: 15px; }
.brand .name i {
  font: 500 9.5px/1 var(--sans); font-style: normal; letter-spacing: .1em;
  text-transform: uppercase; color: var(--lime); margin-top: 2px;
}

.mainnav { display: flex; gap: 1.15rem; margin-left: .9rem; }
.mainnav a {
  color: rgba(255, 255, 255, .8); font-size: 14px; white-space: nowrap;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.mainnav a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--lime); }
@media (max-width: 1080px) { .mainnav { display: none; } }

.usericon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .32); color: rgba(255, 255, 255, .88);
  flex: 0 0 auto;
}
.usericon:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

.top .spacer { flex: 1; }
.top .status {
  font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(201, 162, 39, .35);
  padding: .35rem .5rem; border-radius: 999px; white-space: nowrap;
}
.iconbtn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px;
  background: transparent; color: rgba(255, 255, 255, .8);
  cursor: pointer; font-size: 15px; line-height: 1;
}
.iconbtn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ------------------------------------------------------------------ search */

.searchbox { position: relative; flex: 0 1 420px; min-width: 150px; }
/* The search box gives way first and the draft badge next, so the menu keeps
   its room as the window narrows. */
@media (max-width: 1400px) { .top .status { display: none; } }
/* A phone cannot hold the logo, both lines of the name and a search box. The
   subtitle goes first; the logo, the name and search stay. */
@media (max-width: 600px) {
  .top { gap: .55rem; padding: 0 .75rem; }
  .brand .logo { height: 26px; }
  .brand .name i { display: none; }
  .searchbox { min-width: 0; flex-basis: 0; flex-grow: 1; }
}
.searchbox input {
  width: 100%; height: 34px; padding: 0 2.2rem 0 .7rem;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px;
  background: rgba(255, 255, 255, .08); color: #fff;
  font: 14px var(--sans);
}
.searchbox input::placeholder { color: rgba(255, 255, 255, .5); }
.searchbox input:focus { background: rgba(255, 255, 255, .14); outline: none; border-color: var(--lime); }
.searchbox kbd {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  font: 11px var(--mono); color: rgba(255, 255, 255, .45);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 4px; padding: .1rem .3rem;
  pointer-events: none;
}
.results {
  position: absolute; top: calc(100% + .5rem); left: 0; right: 0;
  max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: .35rem; display: none;
}
.results.on { display: block; }
.results .hit { display: block; padding: .5rem .6rem; border-radius: 7px; color: var(--body); }
.results .hit:hover, .results .hit.sel { background: var(--surface-2); text-decoration: none; }
.results .hit .t { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.results .hit .c { display: block; color: var(--mute); font-size: 12.5px; margin-top: .1rem; }
.results .hit .c mark { background: rgba(141, 198, 63, .3); color: inherit; padding: 0 1px; border-radius: 2px; }
.results .grp {
  font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--mute); padding: .6rem .6rem .35rem;
}
.results .none { padding: .9rem .6rem; color: var(--mute); font-size: 14px; }

/* ------------------------------------------------------------------ layout */

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); align-items: start; }
.shell.with-toc { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc); }

.scrim { display: none; }
.side {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
  padding: 1.5rem 1rem 3rem 1.5rem;
  border-right: 1px solid var(--line-soft);
  background: var(--bg);
}
/* Group headings carry the lime and the weight.
 *
 * They were 10.5px in the muted body grey, which made the one piece of
 * structure in a long sidebar the quietest thing in it. Lime has to change
 * shade by theme: #8DC63F on cream is 1.96:1 and unreadable, so light uses the
 * darker --lime-ink at 4.77:1 and dark uses the brand lime at 9.14:1. */
.side h4 {
  font: 700 11.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--lime-ink); margin: 1.75rem 0 .55rem; padding-left: .55rem;
}
:root[data-theme="dark"] .side h4 { color: var(--lime); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .side h4 { color: var(--lime); }
}
.side h4:first-child { margin-top: 0; }
.side a {
  display: block; padding: .3rem .55rem; border-radius: 6px;
  color: var(--body); font-size: 14px; line-height: 1.45;
}
.side a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
/* The page you are on, in the warm parchment the standard already uses for
   block quotes and callouts -- the cool grey read as a fourth color that
   belonged to nothing. */
.side a.on {
  background: var(--parch); color: var(--ink); font-weight: 650;
  box-shadow: inset 3px 0 0 var(--gold);
}
.side a .n { color: var(--mute); font: 500 12px var(--mono); margin-right: .45rem; }
.side a.on .n { color: var(--gold); }

main { padding: 2.5rem 3.25rem 6rem; min-width: 0; }
/* The column is wide, and the PROSE inside it is not.
 *
 * These pages are long and the text is what people came for, so the article
 * takes the room. But a 1,100px line of body copy is a line people lose their
 * place in, so paragraphs and lists stay near a readable measure while tables,
 * code blocks, diagrams and grids -- the things that genuinely want width --
 * use all of it. */
article { max-width: 1100px; --bleed: 2.5rem; }
article > p, article > ul, article > ol, article > blockquote { max-width: var(--measure); }
/* The landing page and the references are not prose: their cards, tables and
   field entries want the width, and a 74ch measure leaves a third of a wide
   screen empty beside them. */
article.wide { max-width: 1040px; }
/* Grids and tables take the width; running text does not. A card row wants
   1040px and a paragraph wants 70 characters, and the two live on the same
   page. */
article.wide > p, article.wide > ul, article.wide > ol { max-width: 86ch; }
article.wide .lede { max-width: 64ch; font-size: 1.14rem; }

.toc { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 2.5rem 1.5rem 3rem 0; }
.toc h4 {
  font: 600 10.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 .6rem;
}
.toc a { display: block; padding: .22rem 0 .22rem .7rem; color: var(--mute); font-size: 13px; line-height: 1.45; border-left: 2px solid var(--line-soft); }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.on { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.toc a.l3 { padding-left: 1.4rem; font-size: 12.5px; }
.toc a.l4 { padding-left: 2.1rem; font-size: 12.5px; color: var(--mute); }

@media (max-width: 1340px) { .shell.with-toc { grid-template-columns: var(--sidebar) minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 1000px) {
  .shell, .shell.with-toc { grid-template-columns: minmax(0, 1fr); }
  /* On a small screen the sidebar is a drawer that slides over the page from
     the left, wherever the reader has scrolled to, rather than a block at the
     top of the page that pushes content down out of sight. */
  .side {
    position: fixed; top: 60px; left: 0; bottom: 0; z-index: 45;
    width: min(320px, 86vw); height: auto;
    border-right: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateX(-105%); visibility: hidden;
    transition: transform .2s ease, visibility .2s;
  }
  .side.open { transform: none; visibility: visible; }
  .scrim {
    position: fixed; inset: 60px 0 0 0; z-index: 44;
    background: rgba(6, 16, 13, .45);
  }
  .scrim.on { display: block; }
  body.menu-open { overflow: hidden; }
  main { padding: 1.75rem 1.25rem 4rem; }
  article { --bleed: 1.25rem; }
  .searchbox { flex: 1 1 auto; }
  .top .status { display: none; }
}
@media (min-width: 1001px) { .menubtn { display: none; } }

/* ----------------------------------------------------------------- content */

article h1, article h2, article h3, article h4, article h5, article h6 {
  color: var(--ink); line-height: 1.25; text-wrap: balance;
  scroll-margin-top: 5rem; position: relative;
}
article h1 { font-size: 2.1rem; font-weight: 680; letter-spacing: -.022em; margin: 0 0 .5rem; }
/* Section headings carry the same parchment as the page header, fading out
 * about a third of the way across.
 *
 * The band is the reason it works: a tint that ran the full width would be a
 * stripe and would fight the text beside it, and one that stopped hard would
 * be a box. Fading means the color says "a section starts here" and then gets
 * out of the way of the sentence.
 *
 * It bleeds 1rem into the gutter on both sides, with matching padding, so the
 * heading's own text still lines up with the paragraphs under it -- a heading
 * indented from its body is the thing this must not do.
 */
article h2 {
  font-size: 1.5rem; font-weight: 680; letter-spacing: -.015em;
  margin: 3.2rem calc(-1 * var(--bleed)) 1rem;
  padding: .78rem var(--bleed) .5rem;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(90deg,
              var(--head-bg) 0, var(--head-bg) 15%, transparent 38%);
}
/* The anchor hangs off the text, not off the bled box. */
article h2 .anchor { left: calc(var(--bleed) - 1.1rem); }
/* A lime rule above each major section. Cheap, and it is what turns a long
   normative document from a wall into a sequence you can find your place in. */
article h2::before {
  content: ""; display: block; width: 72px; height: 3px; border-radius: 2px;
  background: var(--lime); margin: 0 0 .6rem;
}
article h3 {
  font-size: 1.16rem; font-weight: 650; margin: 2.2rem 0 .7rem;
  padding-left: .75rem; border-left: 3px solid var(--parch-line);
}
article h4 { font-size: 1rem; font-weight: 640; margin: 1.6rem 0 .5rem; }
article h5, article h6 { font-size: .94rem; font-weight: 640; margin: 1.3rem 0 .45rem; color: var(--body); }

.anchor {
  position: absolute; left: -1.1rem; top: 0; width: 1.1rem;
  color: var(--line); font-weight: 400; opacity: 0; text-decoration: none;
  transition: opacity .12s;
}
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor { opacity: 1; }
.anchor:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 1000px) { .anchor { display: none; } }

article p { margin: 0 0 1rem; }
article ul, article ol { margin: 0 0 1rem; padding-left: 1.35rem; }
article li { margin: .3rem 0; }
article li > p { margin: .35rem 0; }
article li::marker { color: var(--mute); }

article strong { color: var(--ink); font-weight: 650; }

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

article blockquote {
  margin: 1.4rem 0; padding: .9rem 1.1rem;
  background: var(--parch); border: 1px solid var(--parch-line);
  border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
}
article blockquote > :last-child { margin-bottom: 0; }
article blockquote p { color: var(--ink); }

code {
  font: 0.875em/1.5 var(--mono);
  background: var(--code-bg); color: var(--code-ink);
  padding: .12em .34em; border-radius: 4px;
  word-break: break-word;
}
a code { color: inherit; background: transparent; padding: 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
a code:hover { text-decoration-color: currentColor; }

/* Code blocks read as a terminal, on purpose -- and ONLY for code.
 *
 * A developer's eye goes to the code before it goes to the prose, and a block
 * the same color as the page it sits on does not get looked at first. So the
 * treatment is spent where it earns something: text you would actually copy
 * onto a computer. Diagrams and displayed rules get their own looks, below.
 *
 * The edge is drawn twice -- a border plus an outer ring -- because in dark
 * mode the terminal ground and the page ground are within two points of each
 * other, and a single hairline in that range disappears. The title strip does
 * most of the work: an edge you can see is an edge that is lit, not merely
 * outlined.
 */
.codewrap {
  margin: 0 0 1.4rem; border-radius: 10px; overflow: hidden;
  background: var(--term-bg); border: 1px solid var(--term-edge);
  box-shadow: var(--term-ring);
}
.cbar {
  display: flex; align-items: center; gap: .6rem;
  height: 34px; padding: 0 .55rem 0 62px;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-edge);
  /* three dots, drawn rather than shipped as an image */
  background-image:
    radial-gradient(circle, #46584d 4px, transparent 4.5px),
    radial-gradient(circle, #46584d 4px, transparent 4.5px),
    radial-gradient(circle, #46584d 4px, transparent 4.5px);
  background-position: 14px 11px, 30px 11px, 46px 11px;
  background-repeat: no-repeat;
  /* Each gradient is its own 12px tile. Without a size, the gradient box is
     the whole bar and the "dots" land near its center -- which is what the
     first version of this did. */
  background-size: 12px 12px;
}
.clabel {
  font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: #7f9488;
}
/* The language choice, read as one sentence.
 *
 * "EXAMPLES IN" and the option you picked are the same lime chip, so the
 * selection finishes the phrase the label starts. Everything unpicked sits
 * quietly between them.
 *
 * The fill is --lime-ink rather than the brand lime, and that is forced: white
 * on #8DC63F is 2.04:1 and cannot be read. #4d7c18 carries white at 4.99:1,
 * which clears AA and is the brightest green in the palette that does.
 *
 * A segmented control rather than a <select>: there are three options, they
 * are short, and a native dropdown hides the answer behind a click.
 */
.example { margin: 0 0 1.4rem; }
.example .codewrap { margin-bottom: 0; }
.langpick {
  display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
  margin: 0 0 .55rem;
}
.lp-label {
  display: flex; align-items: center;
  font: 700 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: #ffffff; background: var(--lime-ink);
  border-radius: 8px; padding: .55rem .8rem; white-space: nowrap;
}
.lp-opts { display: flex; gap: .2rem; }
.lp {
  font: 600 12.5px/1 var(--sans); letter-spacing: .01em;
  color: var(--body); background: transparent;
  border: 1px solid transparent; border-radius: 8px;
  padding: .48rem .8rem; cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.lp:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line); }
.lp.on { color: #ffffff; background: var(--lime-ink); border-color: var(--lime-ink); }
.lp.on:hover { color: #ffffff; background: var(--lime-ink); }

.copy {
  margin-left: auto; display: inline-flex; align-items: center; gap: .35rem;
  font: 600 11px/1 var(--sans); letter-spacing: .02em;
  color: #9fb3a6; background: transparent;
  border: 1px solid #2c3f35; border-radius: 6px;
  padding: .32rem .5rem .32rem .42rem; cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.copy:hover { color: var(--lime); border-color: #46654a; background: #16241c; }
.copy.done { color: var(--lime); border-color: var(--lime); }
.copy svg { flex: none; }
pre {
  margin: 0; padding: .9rem 1.15rem 1.05rem; overflow-x: auto;
  background: transparent; border: 0;
}
pre code {
  background: transparent; padding: 0; font-size: 13px; line-height: 1.65;
  /* The association's lime, on the terminal ground. 9.2:1 against #0b1310, so
     it is a deliberate color rather than a readability compromise. */
  color: var(--lime); white-space: pre;
}
/* No generated prompt. CSS can only put one before the first line, and these
   blocks are several commands deep -- a `$` on line one and nothing on lines
   two and three reads as though only the first is a command. The dark
   treatment is what makes them pop; the prompt was decoration that lied. */

/* Diagrams: a figure, not a console.
 *
 * Sequence flows, wire layouts and trees were all dressed as terminals, which
 * told the reader to copy a picture. They are illustrations, so they sit on
 * the page's own surface with a quiet border. Leading is tighter than prose
 * because box-drawing characters only join up when the lines nearly touch.
 */
figure.diagram {
  margin: 0 0 1.5rem; padding: 1.05rem 1.2rem;
  background: var(--fig-bg); border: 1px solid var(--fig-line);
  border-left: 3px solid var(--fig-edge);
  border-radius: 4px 10px 10px 4px; overflow-x: auto;
}
figure.diagram pre {
  margin: 0; padding: 0; background: none;
  font: 12.8px/1.36 var(--mono); color: var(--ink); white-space: pre;
}

/* Screenshots.
 *
 * Two sizes. The plate is for the page whose subject IS the thing pictured;
 * the card is for the four pages that merely mention it in passing, where a
 * full-width screenshot would shout over the paragraph it belongs to. Both
 * link to the original, because a UI screenshot at any width on this page is
 * too small to read the wire traffic in.
 */
figure.shot { margin: 1.5rem 0 1.7rem; }
figure.shot a { display: block; line-height: 0; border-radius: 10px; overflow: hidden;
                border: 1px solid var(--fig-line); background: var(--fig-bg);
                box-shadow: var(--shadow); }
figure.shot a:hover { border-color: var(--lime); }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption {
  margin: .65rem 0 0; font-size: 13px; line-height: 1.55;
  color: var(--mute);
}
/* A transparent graphic brings its own shape. Framing it in a panel draws a
   box around a picture that has already decided where its edges are, so the
   plain variant lets the page show through. */
figure.shot.plain a { border: 0; background: none; box-shadow: none; border-radius: 0; }
figure.shot.plain a:hover { border: 0; }
/* It also never grows past its own size. A screenshot can be stretched across a
   wide column and still read; a graphic drawn at a fixed size only gets soft.
   So the figure is as wide as the picture, up to whatever cap the page sets. */
figure.shot.small { max-width: 430px; }
figure.shot.small figcaption { font-size: 12.5px; max-width: none; }

/* A displayed rule: one invariant, set like an equation.
 *
 * These are the "x == y" and "a > b > c" lines the prose builds to. They are
 * not code -- nothing runs them -- and burying them in a terminal made them
 * look like something to paste.
 */
.ruleblock {
  margin: 0 0 1.5rem; padding: .85rem 1.15rem;
  border-left: 3px solid var(--gold);
  background: var(--rule-bg);
  border-radius: 3px 9px 9px 3px; overflow-x: auto;
}
.ruleblock pre {
  margin: 0; padding: 0; background: none;
  font: 13.5px/1.62 var(--mono); color: var(--ink); white-space: pre;
}

.tablewrap { overflow-x: auto; margin: 0 0 1.3rem; border: 1px solid var(--line); border-radius: 9px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { background: var(--deep); color: #eaf3ec; font-weight: 650; font-size: 12.5px;
     letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
:root[data-theme="dark"] th { background: #16241d; color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td code { white-space: nowrap; }

/* ------------------------------------------------------------- page chrome */

/* The page header is a band, not a run of loose lines.
 *
 * Every page opened with a breadcrumb, a title and a gray lede stacked on
 * white, which gave the reader nothing to land on and made two pages in a row
 * look like one long document. The band is the association's parchment -- the
 * same tone the side nav uses to mark where you are -- so arriving somewhere
 * and being somewhere are told in one color.
 */
.pagehead {
  background: var(--head-bg);
  border: 1px solid var(--head-line);
  border-top: 3px solid var(--head-edge);
  border-radius: 4px 4px 12px 12px;
  padding: 1.15rem var(--bleed) 1.25rem;
  margin: 0 calc(-1 * var(--bleed)) 2.2rem;
}
.pagehead .crumbs { margin: 0 0 .55rem; }
.pagehead h1 { margin: 0; }
.pagehead .lede { margin: .5rem 0 0; color: var(--body); max-width: 68ch; }
@media (max-width: 620px) { .pagehead { padding: 1rem var(--bleed) 1.1rem; } }

.crumbs { font-size: 13px; color: var(--mute); margin: 0 0 .9rem; display: flex; gap: .45rem; flex-wrap: wrap; }
.crumbs a { color: var(--mute); }
.crumbs a:hover { color: var(--ink); }

.lede { font-size: 1.08rem; line-height: 1.6; color: var(--mute); margin: 0 0 2rem; max-width: 62ch; }

/* The license page: three cards and then the file, unabridged. */
.licgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem; margin: 1.6rem 0 2rem;
}
.liccard {
  border: 1px solid var(--line); border-top: 3px solid var(--gold);
  border-radius: 4px 4px 11px 11px; padding: 1rem 1.15rem 1.1rem;
  background: var(--surface);
}
.liccard h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.liccard .what { margin: 0 0 .5rem; font-size: 13px; color: var(--mute); }
.liccard .lic { margin: 0 0 .6rem; font-size: 14px; color: var(--ink); }
.liccard p { font-size: 14px; margin: 0 0 .55rem; }
.doctext {
  font: 12.6px/1.6 var(--mono); color: var(--body); white-space: pre-wrap;
  background: var(--fig-bg); border: 1px solid var(--fig-line);
  border-radius: 10px; padding: 1.2rem 1.35rem; overflow-x: auto;
}

.pager { display: flex; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); }
.pager a {
  flex: 1 1 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); min-width: 0;
}
.pager a:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.pager .dir { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: .18rem; }
.pager .nm { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager .next { text-align: right; }

/* -------------------------------------------------------------------- hero */

.hero { margin: 0 0 2.5rem; }
.hero .eyebrow {
  display: block; color: var(--lime-ink);
  font: 700 14px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 .9rem;
}
:root[data-theme="dark"] .hero .eyebrow { color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero .eyebrow { color: var(--lime); } }
.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.022em;
  line-height: 1.08; margin: 0 0 1rem; color: var(--ink); text-wrap: balance;
}
.hero .sub { font-size: 1.17rem; line-height: 1.55; color: var(--body); max-width: 60ch; margin: 0 0 1.6rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn {
  display: inline-block; padding: .82rem 1.5rem; border-radius: 7px;
  font: 700 15px/1.2 var(--sans); border: 2px solid transparent;
}
.btn.primary { background: var(--lime); color: #0C3025; }
.btn.primary:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { text-decoration: none; border-color: var(--accent); }

.stats { display: flex; flex-wrap: wrap; gap: 2.4rem; margin: 0 0 2.6rem; padding: 1.2rem 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stats div { min-width: 96px; }
.stats b { display: block; font-size: 1.75rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { display: block; font-size: 13px; color: var(--mute); margin-top: .1rem; }

/* ------------------------------------------------------------ landing page */

/* The landing page takes the whole column. It is cards, tables and a few
   paragraphs, not long-form prose, so a reading measure only leaves the right
   side of a wide screen empty. */
article.landing { max-width: none; --edge-x: 3.25rem; --edge-top: 2.5rem; }
article.landing > p { max-width: none; }
@media (max-width: 1000px) { article.landing { --edge-x: 1.25rem; --edge-top: 1.75rem; } }

/* The green hero, edge to edge across the column: the first thing an
   integrator sees, on the same putting-green art as the association's site. */
.landing .hero {
  margin: calc(-1 * var(--edge-top)) calc(-1 * var(--edge-x)) 0;
  padding: 4.5rem var(--edge-x) 4rem;
  background: linear-gradient(115deg, rgba(12,48,37,.95) 30%, rgba(12,48,37,.76) 68%,
                                      rgba(12,48,37,.6) 100%),
              url("green.jpg") 70% 50% / cover no-repeat;
  color: #fff;
}
.landing .hero .eyebrow, :root[data-theme="dark"] .landing .hero .eyebrow { color: var(--lime); }
.landing .hero h1 { color: #fff; max-width: 22ch; }
.landing .hero .sub { color: #CFE3DA; max-width: 62ch; }
.landing .hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.landing .hero .btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .landing .hero .eyebrow { color: var(--lime); }
}

/* The numbers, as a band directly under the hero, end to end: the same
   parchment as the section headings, the four values spread evenly across it. */
.landing .stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem;
  margin: 0 calc(-1 * var(--edge-x)) 2.6rem;
  padding: 1.3rem var(--edge-x);
  background: var(--head-bg); border: 0; border-bottom: 1px solid var(--head-line);
  text-align: center;
}
.landing .stats div { min-width: 0; }
.landing .stats span { font-weight: 600; }
@media (max-width: 620px) {
  .landing .stats { grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
}

/* ------------------------------------------------------------------- cards */

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 0 0 2rem; }
/* A card grid sized by what it holds, so a row is never left with one card on
   it: four cards run 4 across or 2 by 2, three run 3 across or stacked. Sized
   against the article rather than the window, so the sidebar and contents rail
   are already accounted for. */
article { container-type: inline-size; }
.grid.cols4, .grid.cols3, .grid.cols2 { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 520px) {
  .grid.cols4, .grid.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 760px) {
  .grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 980px) {
  .grid.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card {
  display: block; padding: 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--body);
}
.card:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .35rem; font-size: 1.02rem; color: var(--ink); font-weight: 640; }
.card p { margin: 0; font-size: 14px; color: var(--mute); line-height: 1.55; }
.card .kicker { font: 600 10.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--lime-ink); display: block; margin-bottom: .45rem; }
:root[data-theme="dark"] .card .kicker { color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card .kicker { color: var(--lime); } }

/* --------------------------------------------------------- field reference */

.filterbar { position: sticky; top: 60px; z-index: 20; background: var(--bg); padding: .9rem 0 .8rem; border-bottom: 1px solid var(--line-soft); margin-bottom: 1.2rem; }
.filterbar input {
  width: 100%; height: 42px; padding: 0 .9rem;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: 15px var(--sans);
}
.filterbar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(141, 198, 63, .2); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--body);
  border-radius: 999px; padding: .22rem .65rem; font: 500 12.5px var(--mono); cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.count { color: var(--mute); font-size: 13px; margin: .5rem 0 1rem; }

.ns { margin: 2.2rem 0 0; }
/* The namespace heading puts its name and its one-line gloss on the same
   line, so it is a flex row -- which makes the lime rule a flex ITEM and lands
   it beside the name instead of above it. Give it a full-width basis and it
   goes back to being a rule over the heading, as on every other page. */
.ns > h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.ns > h2::before {
  /* Full-width basis is what forces the break; the gradient is what keeps the
     rule 72px long, since flex-basis overrides its width. */
  flex: 0 0 100%;
  background: linear-gradient(90deg, var(--lime) 0 72px, transparent 72px);
}
.ns.aside > h2::before {
  background: linear-gradient(90deg, var(--parch-line) 0 72px, transparent 72px);
}
.ns > h2 .tag { font: 500 12px var(--sans); color: var(--mute); letter-spacing: 0; text-transform: none; }

/* The panel that says this is a dictionary rather than a workload.
   Two hundred names is intimidating until somebody tells you that four of them
   are the bar; this is that sentence, given the weight to actually be read. */
.reassure {
  background: var(--parch); border: 1px solid var(--parch-line);
  border-left: 4px solid var(--gold); border-radius: 0 11px 11px 0;
  padding: 1.15rem 1.3rem .4rem; margin: 0 0 1.8rem;
}
.reassure h2 {
  margin: 0 0 .6rem; padding: 0; border: 0; background: none;
  font-size: 1.14rem; font-weight: 700;
}
.reassure h2::before { display: none; }
.reassure p { max-width: 82ch; }
.reassure .go { margin-bottom: .9rem; font-weight: 650; }

/* Namespaces most devices will never touch -- putting, pressure, platforms --
   are present and quieter, so the page opens on what a first integration needs
   and the specialist vocabulary does not shout at somebody scrolling past it. */
.ns.aside > h2 { opacity: .78; }

.field {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: .85rem 1rem; margin: 0 0 .6rem; scroll-margin-top: 8rem;
}
.field:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(141, 198, 63, .18); }
.field .nm { font: 600 14.5px var(--mono); color: var(--ink); }
.field .nm a { color: inherit; }
.field .def { margin: .35rem 0 0; font-size: 14.5px; }
.field .meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .55rem; font-size: 12.5px; color: var(--mute); }
.field .meta .unit b {
  font: 700 12px var(--mono); color: var(--lime-ink);
  background: rgba(141, 198, 63, .13); border-radius: 4px; padding: .05rem .34rem;
  margin-right: .3rem;
}
:root[data-theme="dark"] .field .meta .unit b { color: var(--lime); background: rgba(141, 198, 63, .14); }
.field .meta .where { color: var(--mute); }
.chips .chip span { opacity: .55; }
.pill {
  display: inline-block; border-radius: 999px; padding: .08rem .5rem;
  font: 600 11px var(--sans); letter-spacing: .02em;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--body);
}
:root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] 
.empty { padding: 2.5rem 0; color: var(--mute); text-align: center; }

/* ------------------------------------------------------------------ footer */

.foot { margin-top: 4rem; padding: 1.5rem 0 0; border-top: 1px solid var(--line-soft); color: var(--mute); font-size: 13px; }
.foot a { color: var(--mute); text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------------- print */

@media print {
  .top, .side, .toc, .pager, .filterbar { display: none !important; }
  .shell, .shell.with-toc { grid-template-columns: 1fr; }
  main { padding: 0; }
  article { max-width: none; }
  a { color: inherit; text-decoration: none; }
  pre, .tablewrap { break-inside: avoid; }
}
