/* paraTEXT -- the reading sibling of paraGRAF: the same neo-brutalist skin
 * (hard 3px ink borders, offset block shadows, flat saturated hues, no rounded
 * corners, Archivo Black / Space Grotesk / IBM Plex Mono) over a three-column
 * reading layout. The page is the document; the cards beside it are the
 * table of contents, the context of what the reader is looking at, and the
 * API traffic that produced the screen. On a phone the cards fold down to
 * bars at the foot of the screen, the way paraGRAF's stand over its stage. */

:root {
  --bg: #f3eee2;          /* warm paper */
  --surf: #fffdf6;        /* card face */
  --surf-2: #f3eee2;
  --surf-3: #e8e1cd;
  --ink: #141414;
  --ink-2: #2b2b28;
  --ink-3: #5c5a4f;
  --ink-4: #8b887a;
  --accent: #ffd23f;      /* marker yellow */
  --accent-2: #ff70a6;
  --line: #141414;        /* every border is ink */
  --sans: "Space Grotesk", system-ui, sans-serif;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --mast-h: 3.6rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg);
  line-height: 1.5; }
a { color: var(--ink); text-decoration-thickness: 2px;
  text-decoration-color: var(--accent-2); }
a:hover { background: var(--accent); }
button { font-family: inherit; }
[hidden] { display: none !important; }

/* -- masthead -- */
.pt-mast { position: sticky; top: 0; z-index: 30; display: flex;
  align-items: center; gap: 1rem; height: var(--mast-h); padding: 0 1.2rem;
  background: var(--surf); border-bottom: 3px solid var(--line); }
.pt-wordmark { font-family: var(--display); font-size: 1.5rem;
  font-weight: 400; letter-spacing: -.02em; line-height: 1; margin: 0;
  text-decoration: none; white-space: nowrap; }
.pt-wordmark:hover { background: none; }
.pt-wordmark span { background: var(--accent); padding: 0 .12em;
  box-shadow: 2px 2px 0 var(--line); }
.pt-nav { display: flex; gap: .1rem; margin-left: .4rem; }
.pt-nav a { font: 700 .72rem var(--sans); text-transform: uppercase;
  letter-spacing: .04em; text-decoration: none; padding: .35rem .5rem;
  white-space: nowrap; }
.pt-nav a.on { background: var(--ink); color: var(--accent); }
.pt-mast-tools { margin-left: auto; display: flex; gap: .4rem; }
.pt-mast-tools a { font: 600 .68rem var(--mono); text-decoration: none;
  border: 2px solid var(--line); padding: .25rem .5rem; white-space: nowrap; }

/* -- search box (masthead and start page) -- */
.pt-search { position: relative; flex: 1 1 24rem; max-width: 34rem; margin: 0; }
.pt-search input { width: 100%; font-family: var(--mono); font-size: .8rem;
  color: var(--ink); background: var(--surf); border: 3px solid var(--line);
  border-radius: 0; padding: .45rem .7rem; outline: none; }
.pt-search input:focus { background: var(--accent); }
.pt-search input::placeholder { color: var(--ink-3); }
.pt-hits { position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 40; background: var(--surf); border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--line); max-height: 24rem; overflow-y: auto; }
.pt-hits .hit { display: flex; flex-direction: column; gap: .1rem;
  padding: .45rem .7rem; cursor: pointer; font-size: .8rem; }
.pt-hits .hit + .hit { border-top: 2px solid var(--line); }
.pt-hits .hit.on, .pt-hits .hit:hover { background: var(--accent); }
.pt-hits .lb { font-weight: 700; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.pt-hits .lb .dot { display: inline-block; width: .55rem; height: .55rem;
  border: 2px solid var(--line); margin-right: .35rem; vertical-align: 0; }
.pt-hits .ti { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.pt-hits .all { font: 600 .72rem var(--mono); color: var(--ink-3); }

/* -- the grid -- */
.pt-grid { display: grid; grid-template-columns: 17rem minmax(0, 1fr) 22rem;
  gap: 1.2rem; padding: 1.2rem; align-items: start; max-width: 104rem;
  margin: 0 auto; }
.pt-main { min-width: 0; }
.pt-page { background: var(--surf); border: 3px solid var(--line);
  box-shadow: 7px 7px 0 var(--line); padding: 1.6rem 2rem 2.4rem;
  min-height: 24rem; }
.pt-side { position: sticky; top: calc(var(--mast-h) + 1.2rem);
  display: flex; flex-direction: column; gap: 1.2rem;
  max-height: calc(100vh - var(--mast-h) - 2.4rem); min-height: 0; }
/* the left column has one card; the right column has the context card and,
   under it, the traffic card -- the pair share the column height */
.pt-side-r .pt-card-r { flex: 1 1 auto; min-height: 0; }
.pt-side-r .pt-card-t { flex: 0 1 auto; max-height: 40%; }
.pt-side-l .pt-card-l { flex: 1 1 auto; min-height: 0; }

/* -- the cards -- */
.pt-card { display: flex; flex-direction: column; min-height: 0;
  background: var(--surf); border: 3px solid var(--line);
  box-shadow: 7px 7px 0 var(--line); }
.pt-card.folded { flex: 0 0 auto; }
.pt-card.folded .pt-cardbody { display: none; }
.pt-cardhead { display: flex; align-items: center; gap: .5rem;
  cursor: pointer; padding: .6rem 1rem; flex: none;
  border-bottom: 3px solid var(--line); background: var(--surf); }
.pt-card.folded .pt-cardhead { border-bottom: 0; }
.pt-card-r .pt-cardhead, .pt-card-t .pt-cardhead { background: var(--accent); }
.pt-fold { flex: none; margin-left: auto; border: 0; background: none;
  cursor: pointer; padding: .25rem; display: flex; align-items: center; }
.pt-chevron { width: .5rem; height: .5rem;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: rotate(45deg); transition: transform .15s ease; }
.pt-card.folded .pt-chevron { transform: rotate(-45deg); }
.pt-cardbody { flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: .9rem 1rem 1.3rem; }
.pt-cardtitle { font-family: var(--sans); font-weight: 700; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .02em; line-height: 1.25;
  margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.pt-cardtitle .sum { font: 600 .68rem var(--mono); text-transform: none;
  letter-spacing: 0; color: var(--ink-2); margin-left: .3rem; }

/* -- common bits -- */
.eyebrow { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
  font: 700 .72rem var(--sans); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: .3rem; color: var(--ink-2); }
.dot { display: inline-block; width: .65rem; height: .65rem; flex: none;
  border: 2px solid var(--line); background: var(--c, var(--ink-4)); }
.pt-page h1 { font-family: var(--display); font-weight: 400;
  font-size: 1.9rem; line-height: 1.15; letter-spacing: -.01em;
  margin: .1rem 0 .6rem; }
.pt-page h1 small { display: block; font: 500 .8rem var(--mono);
  color: var(--ink-3); margin-top: .35rem; letter-spacing: 0; }
.meta { display: grid; grid-template-columns: max-content minmax(0, 1fr);
  gap: .15rem 1rem; font-size: .8rem; margin: .6rem 0 1rem; padding: .6rem 0;
  border-top: 3px solid var(--line); border-bottom: 3px solid var(--line); }
.meta dt { font: 700 .66rem var(--sans); text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); padding-top: .15rem; margin: 0; }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.summary { font-size: .95rem; line-height: 1.55; margin: .6rem 0 1rem;
  padding: .2rem 0 .2rem .8rem; border-left: 4px solid var(--accent); }
.banner { font: 600 .8rem var(--mono); background: var(--accent-2);
  border: 2px solid var(--line); padding: .35rem .6rem; margin: .4rem 0 .8rem; }
.banner.soft { background: var(--surf-3); }
.g-actions { display: flex; gap: .5rem; margin: 1rem 0 0; flex-wrap: wrap; }
.g-actions a, .g-actions button, .btn { text-align: center; white-space: nowrap;
  font: 700 .68rem var(--sans); text-transform: uppercase;
  letter-spacing: .01em; border: 3px solid var(--line); border-radius: 0;
  box-shadow: 3px 3px 0 var(--line); padding: .4rem .6rem; cursor: pointer;
  background: var(--surf); color: var(--ink); text-decoration: none; }
.g-actions .primary, .btn.primary { background: var(--accent); }
.g-actions a:hover, .g-actions button:hover, .btn:hover {
  transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--line);
  background: var(--accent); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.pt-empty { color: var(--ink-3); font-size: .85rem; }
.pt-error { border: 3px solid var(--line); background: var(--accent-2);
  padding: .8rem 1rem; font-weight: 500; }
.pt-error code { font-family: var(--mono); font-size: .8rem; }
.pt-loading { display: flex; align-items: center; gap: .85rem;
  font: 700 .9rem var(--sans); text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink); padding: 1rem 0; }
.pt-loading .sq { width: 1.25rem; height: 1.25rem; background: var(--accent);
  border: 3px solid var(--line); animation: pt-spin .8s steps(8) infinite; }
@keyframes pt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pt-loading .sq { animation: none; } }
.pt-page.loading > *:not(.pt-loading) { opacity: .5; }
.pt-page .pt-loading { position: sticky; top: calc(var(--mast-h) + .5rem);
  z-index: 3; background: var(--surf); width: max-content;
  border: 3px solid var(--line); box-shadow: 6px 6px 0 var(--line);
  padding: .6rem 1rem; margin: 0 auto 1rem; }

/* -- start page -- */
.hero { padding: .5rem 0 1rem; }
.hero .tagline { font-size: 1.05rem; line-height: 1.5; max-width: 40rem;
  margin: 0 0 1rem; }
.hero .pt-search { max-width: none; margin-bottom: .6rem; }
.hero .pt-search input { font-size: 1rem; padding: .7rem .9rem; }
.hero .examples { font: 500 .74rem var(--mono); color: var(--ink-3); }
.hero .examples a { margin-right: .5rem; }
.sources { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .7rem; }
.sources li a { display: flex; align-items: center; gap: .6rem;
  border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--line);
  padding: .55rem .7rem; text-decoration: none; background: var(--surf); }
.sources li a:hover { transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 var(--line); background: var(--accent); }
.sources .nm { flex: 1; font-weight: 700; font-size: .85rem; min-width: 0; }
.sources .cnt { font: 500 .72rem var(--mono); color: var(--ink-3);
  font-variant-numeric: tabular-nums; }
.sources .how { display: block; font: 500 .62rem var(--mono);
  color: var(--ink-4); text-transform: uppercase; }

/* -- search results -- */
.results-h { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  margin: 0 0 .8rem; }
.results-h h1 { margin: 0; font-size: 1.5rem; flex: 1 1 auto; }
.results-h .n { font: 600 .78rem var(--mono); color: var(--ink-3); }
.sort { display: inline-flex; border: 3px solid var(--line); }
.sort button { font: 700 .64rem var(--sans); text-transform: uppercase;
  background: none; border: 0; padding: .3rem .5rem; cursor: pointer; }
.sort button + button { border-left: 3px solid var(--line); }
.sort button.on { background: var(--ink); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .8rem; }
.chip { font: 600 .68rem var(--mono); border: 2px solid var(--line);
  padding: .15rem .45rem; background: var(--accent); text-decoration: none; }
.chip .x { margin-left: .35rem; font-weight: 700; }
.hitlist { list-style: none; margin: 0; padding: 0; }
.hitlist > li { border-top: 3px solid var(--line); padding: .8rem 0; }
.hitlist > li.pinned { background: var(--accent); margin: 0 -1rem;
  padding: .8rem 1rem; border: 3px solid var(--line); }
.hit-h { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.hit-h a.t { font-weight: 700; font-size: 1rem; text-decoration: none; }
.hit-h a.t:hover { background: var(--accent); text-decoration: underline; }
.hit-h .id { font: 500 .72rem var(--mono); color: var(--ink-3); }
.hit-h .cited { margin-left: auto; font: 600 .7rem var(--mono);
  color: var(--ink-3); white-space: nowrap; }
.hit .pin { font: 600 .8rem var(--sans); margin: .25rem 0 0; }
.hit .pin a { text-decoration: none; border-bottom: 2px solid var(--accent-2); }
.hit .snip { font-size: .82rem; color: var(--ink-2); line-height: 1.45;
  margin: .3rem 0 0; }
.hit .snip em { font-style: normal; background: var(--accent); padding: 0 .1em; }
.hit .frags { list-style: none; margin: .35rem 0 0; padding: 0 0 0 .8rem;
  border-left: 3px solid var(--surf-3); font-size: .78rem; }
.hit .frags li { margin: .2rem 0; }
.hit .frags a { font-weight: 700; text-decoration: none; }
.hit .frags .q { color: var(--ink-3); }
.hit .frags .q em { font-style: normal; background: var(--accent); }
.pager { display: flex; gap: .5rem; margin-top: 1rem; align-items: center; }
.pager .n { font: 500 .72rem var(--mono); color: var(--ink-3); margin-left: auto; }
/* facets in the left card */
.facet h3, .nav h3, .toc h3, .ctx h3 { font: 700 .72rem var(--sans);
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
  margin: .9rem 0 .3rem; }
.facet h3:first-child, .nav h3:first-child, .toc h3:first-child { margin-top: 0; }
.facet ul, .nav ul { list-style: none; margin: 0; padding: 0;
  border-top: 2px solid var(--line); }
.facet li a, .nav li a { display: flex; align-items: center; gap: .5rem;
  padding: .28rem .2rem; border-bottom: 2px solid var(--line);
  text-decoration: none; font-size: .78rem; }
.facet li a.on, .nav li a.on { background: var(--ink); color: var(--accent); }
.facet li a .nm, .nav li a .nm { flex: 1; min-width: 0; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; }
.facet li a .cnt, .nav li a .cnt { flex: none; font: 500 .66rem var(--mono);
  color: var(--ink-3); font-variant-numeric: tabular-nums; }
.facet li a.on .cnt, .nav li a.on .cnt { color: var(--accent); }
.nav .years { display: flex; flex-wrap: wrap; gap: .25rem; border: 0; }
.nav .years li a { border: 2px solid var(--line); padding: .1rem .35rem;
  font: 600 .66rem var(--mono); }

/* -- browse listing -- */
.browse-h { margin: 0 0 .2rem; }
.browse-h h1 { font-size: 1.5rem; }
.listing { margin: .8rem 0 0; }
.listing .row { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr);
  gap: .1rem 1rem; padding: .35rem 0; border-top: 2px solid var(--surf-3);
  font-size: .85rem; align-items: baseline; }
.listing .row.split { grid-template-columns: 1fr; }
.listing .row a.id { font: 700 .8rem var(--mono); text-decoration: none; }
.listing .row a.t { text-decoration: none; font-weight: 500; }
.listing .row a:hover { background: var(--accent); }
.listing .row .pre { color: var(--ink-3); font-weight: 400; }
.listing .row.subdued a.t, .listing .row.subdued a.id { color: var(--ink-3);
  font-weight: 400; }
.listing .row .d { color: var(--ink-3); }
.listing .row .sub { grid-column: 1 / -1; margin: .1rem 0 0 1.2rem;
  font-size: .78rem; color: var(--ink-3); }
.listing .row .sub a { text-decoration: none; margin-right: .6rem; }
.listing .group { font: 700 .72rem var(--sans); text-transform: uppercase;
  letter-spacing: .06em; background: var(--surf-3); padding: .2rem .4rem;
  margin: 1rem 0 .2rem; }
.listing .terms { columns: 3 11rem; column-gap: 1.5rem; }
.listing .terms a { display: block; font-size: .82rem; text-decoration: none;
  padding: .1rem 0; }
.listing .terms a.described { font-weight: 700; }

/* -- the document -- */
.doc { font-size: 1rem; line-height: 1.65; }
.doc p { margin: .5rem 0; }
.doc h2, .doc h3, .doc h4, .doc h5, .doc h6 { font-family: var(--sans);
  line-height: 1.25; margin: 1.6rem 0 .5rem; scroll-margin-top: 4.5rem; }
.doc h2 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.doc h3 { font-size: 1.1rem; }
.doc h4 { font-size: 1rem; }
.doc h5, .doc h6 { font-size: .92rem; }
.doc h2.kaprubrik { border-top: 3px solid var(--line); padding-top: .8rem;
  margin-top: 2rem; }
.doc .rubrik-nr { color: var(--ink-3); font-weight: 500; margin-right: .4em; }
.doc a[data-uri] { text-decoration-color: var(--accent-2); }
.doc a[data-uri].term { text-decoration-style: dotted;
  text-decoration-color: var(--ink-4); }
.doc .num { font-family: var(--mono); font-weight: 600; color: var(--ink-3);
  margin-right: .4em; font-size: .85em; }
.doc a.num { text-decoration: none; }
.doc ol, .doc ul { padding-left: 1.6rem; margin: .3rem 0; }
.doc li { margin: .2rem 0; }
.doc ul.punkter { list-style: none; padding-left: 1.6rem; }
.doc ul.punkter > li > .num { margin-left: -1.6rem; display: inline-block;
  width: 1.6rem; }
.doc table { border-collapse: collapse; font-size: .85rem; margin: .8rem 0;
  max-width: 100%; }
.doc .tabell-wrap { overflow-x: auto; }
.doc th, .doc td { border: 2px solid var(--line); padding: .3rem .5rem;
  vertical-align: top; text-align: left; }
.doc th { background: var(--surf-3); }
.doc caption { caption-side: top; text-align: left; font-style: italic;
  font-size: .85rem; }
.doc .upphavd { color: var(--ink-3); font-style: italic; }
.doc .fotnot { font-size: .8rem; color: var(--ink-3); }
.doc .ruta { border: 3px solid var(--line); background: var(--surf-2);
  padding: .5rem .8rem; }
.doc blockquote, .doc .citat { margin: .5rem 0 .5rem .5rem; padding-left: .8rem;
  border-left: 4px solid var(--surf-3); color: var(--ink-2); }
.doc .temporal { font: 500 .75rem var(--mono); color: var(--ink-3); }
.doc .sokord { font-size: .85rem; color: var(--ink-3); }
.doc .redaktionell { color: var(--ink-3); }
.doc .sid { display: block; font: 500 .62rem var(--mono); color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .06em; margin: 1rem 0 .2rem;
  border-top: 1px dashed var(--ink-4); padding-top: .15rem;
  scroll-margin-top: 4.5rem; }
.doc .preamble p { color: var(--ink-2); }
.doc .recital .num { color: var(--ink-4); }
/* a unit (paragraf / artikel / numbered paragraph) hangs its numeral in a
   gutter with its own permalink; clicking the gutter asks the context card
   about the unit */
.doc section.unit { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0 .6rem; margin: .9rem 0; scroll-margin-top: 4.5rem; }
.doc section.unit > .gutter { text-align: right; line-height: 1.2;
  padding-top: .25rem; }
.doc section.unit > .gutter .n { display: block; font: 700 .95rem var(--mono);
  color: var(--ink); cursor: pointer; }
.doc section.unit > .gutter .n .k { display: block; font-size: .6rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.doc section.unit > .gutter .n:hover { background: var(--accent); }
.doc section.unit > .gutter .pilcrow { display: block; font-size: .8rem;
  color: var(--ink-4); text-decoration: none; opacity: 0; }
.doc section.unit:hover > .gutter .pilcrow { opacity: 1; }
.doc section.unit > .gutter .ctx-n { display: inline-block; margin-top: .2rem;
  font: 600 .6rem var(--mono); background: var(--surf-3); padding: 0 .3rem;
  border: 2px solid var(--line); cursor: pointer; }
.doc section.unit > .gutter .ctx-n:hover { background: var(--accent); }
.doc section.unit > .body { min-width: 0; }
.doc section.unit > .body > p:first-child { margin-top: 0; }
.doc section.unit > .body > .unit-title { font-weight: 700; margin: 0 0 .2rem; }
/* the selected unit is marked, not flooded: a whole article painted yellow
   made the page read as one long highlight */
.doc section.unit.on { border-left: 5px solid var(--accent);
  margin-left: -1.1rem; padding-left: .6rem; }
.doc section.unit.on > .gutter .n { background: var(--accent); }
.doc section.unit.on > .gutter .pilcrow { opacity: 1; }
.doc section.unit.on > .gutter .ctx-n { background: var(--accent); }
.doc .instans > h2, .doc .delmal > h2 { font-family: var(--sans);
  font-weight: 700; font-size: 1.15rem; border-bottom: 3px solid var(--line);
  padding-bottom: .2rem; }
.doc .instans-lower { font-size: .93rem; }
.doc .dom-h { font: 700 .72rem var(--sans); text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3); margin: 1.2rem 0 .3rem; }
.doc .noter { border-top: 3px solid var(--line); margin-top: 2rem;
  padding-top: .5rem; font-size: .85rem; }
.doc .noter ol { padding-left: 1.4rem; }
.doc .andringar { border-top: 3px solid var(--line); margin-top: 2rem;
  padding-top: .5rem; }
.doc .andringar .andring { margin: .8rem 0; padding: .5rem .8rem;
  border: 2px solid var(--line); scroll-margin-top: 4.5rem; }
.doc .andringar .andring h3 { margin: 0 0 .3rem; font-size: .95rem;
  font-family: var(--mono); }
.doc .andringar .facts { font-size: .8rem; margin: 0; display: grid;
  grid-template-columns: max-content 1fr; gap: .1rem .8rem; }
.doc .andringar .facts dt { font: 700 .62rem var(--sans);
  text-transform: uppercase; color: var(--ink-3); padding-top: .2rem; }
.doc .andringar .facts dd { margin: 0; }
.doc .andringar .ob { font-size: .85rem; margin-top: .4rem; }
.doc .diff { border: 3px solid var(--line); padding: .6rem 1rem;
  margin: 1rem 0; font-size: .9rem; }
.doc .diff ins { background: #b7f0c0; text-decoration: none; }
.doc .diff del { background: #ffb4c9; }
.doc .diff-note { font: 600 .74rem var(--mono); color: var(--ink-3); }

/* -- the table of contents card -- */
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; font-size: .78rem; padding: .18rem .2rem;
  text-decoration: none; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; border-bottom: 1px solid var(--surf-3); }
.toc li.l2 a { padding-left: .9rem; color: var(--ink-2); }
.toc li.l3 a { padding-left: 1.6rem; color: var(--ink-3); font-size: .74rem; }
.toc li a.on { background: var(--accent); }
.toc .top { font: 700 .74rem var(--mono); }
.versions { margin-top: 1rem; }
.versions select { width: 100%; font: 500 .74rem var(--mono);
  border: 3px solid var(--line); border-radius: 0; background: var(--surf);
  padding: .3rem .4rem; }

/* -- the context card -- */
.ctx .g-title { font-size: .85rem; color: var(--ink-2); margin: .2rem 0 .5rem;
  line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.ctx .g-snippet { font-size: .8rem; line-height: 1.5; color: var(--ink-2);
  margin: .5rem 0 .6rem; padding: .1rem 0 .1rem .55rem;
  border-left: 3px solid var(--accent); display: -webkit-box;
  -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.ctx .g-nums { display: flex; gap: 1.2rem; margin: .7rem 0 .9rem;
  border-top: 3px solid var(--line); border-bottom: 3px solid var(--line);
  padding: .55rem 0; }
.ctx .g-nums b { display: block; font-family: var(--display); font-size: 1.15rem;
  font-weight: 400; font-variant-numeric: tabular-nums; }
.ctx .g-nums span { font: 500 .64rem var(--sans); color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .05em; }
.ctx details { border-top: 2px solid var(--line); }
.ctx details:last-of-type { border-bottom: 2px solid var(--line); }
.ctx summary { display: flex; align-items: center; gap: .5rem; cursor: pointer;
  font: 700 .74rem var(--sans); text-transform: uppercase;
  letter-spacing: .05em; padding: .4rem .1rem; list-style: none; }
.ctx summary::-webkit-details-marker { display: none; }
.ctx summary .n { margin-left: auto; font: 600 .7rem var(--mono);
  text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.ctx summary .pt-chevron { transform: rotate(-45deg); margin-right: .2rem; }
.ctx details[open] > summary .pt-chevron { transform: rotate(45deg); }
.ctx ul { list-style: none; margin: 0 0 .5rem; padding: 0; }
.ctx li { display: flex; align-items: baseline; gap: .5rem; font-size: .78rem;
  padding: .24rem .1rem; border-top: 1px solid var(--surf-3); }
.ctx li a { text-decoration: none; min-width: 0; flex: 1 1 auto; }
.ctx li a:hover { background: var(--accent); }
.ctx li .lb { font-weight: 700; }
/* with a distinct title beside it the name yields the flexible width to it */
.ctx li a:has(+ .ti) { flex: 0 1 auto; }
.ctx li .ti { color: var(--ink-3); overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; flex: 1 1 0; min-width: 0; }
.ctx li .where { color: var(--ink-4); font: 500 .66rem var(--mono); }
.ctx li .cited { flex: none; margin-left: auto; padding-left: .4rem;
  font: 600 .7rem var(--mono); color: var(--ink); white-space: nowrap; }
.ctx .g-more { font: 500 .72rem var(--mono); color: var(--ink-3);
  padding: .3rem 0; }
.ctx .g-key { font: 500 .64rem var(--mono); color: var(--ink-4);
  margin: .2rem 0 .3rem; }
.ctx .follow { display: flex; align-items: center; gap: .4rem;
  font: 600 .66rem var(--mono); color: var(--ink-3); margin-top: .8rem; }
.ctx .follow input { accent-color: var(--ink); }

/* -- the traffic card -- */
.pt-traffic-intro { font-size: .76rem; line-height: 1.45; margin: 0 0 .6rem; }
.pt-traffic { list-style: none; margin: 0; padding: 0; font-family: var(--mono);
  font-size: .68rem; }
.pt-traffic li { border-top: 1px solid var(--surf-3); }
.pt-traffic a { display: flex; align-items: baseline; gap: .45rem;
  padding: .24rem .1rem; text-decoration: none; }
.pt-traffic .m { flex: none; font-weight: 600; background: var(--ink);
  color: var(--accent); padding: 0 .25rem; }
.pt-traffic .p { flex: 1 1 auto; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.pt-traffic .s { flex: none; font-weight: 600; }
.pt-traffic .s.err { background: var(--accent-2); padding: 0 .2rem; }
.pt-traffic .kb, .pt-traffic .ms { flex: none; color: var(--ink-3);
  font-variant-numeric: tabular-nums; }

/* -- link popover -- */
.pt-pop { position: absolute; z-index: 50; width: 22rem; max-width: calc(100vw - 2rem);
  background: var(--surf); border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--line); padding: .6rem .8rem; font-size: .78rem; }
.pt-pop .eyebrow { margin-bottom: .1rem; }
.pt-pop .cit { font-weight: 700; font-size: .85rem; }
.pt-pop .ti { color: var(--ink-3); margin: .1rem 0 .3rem; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-pop .snip { line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 7;
  -webkit-box-orient: vertical; overflow: hidden; }
.pt-pop .cited { font: 600 .66rem var(--mono); color: var(--ink-3);
  margin-top: .3rem; }

/* -- narrow: one column, the cards fold to bars at the foot -- */
@media (max-width: 1000px) {
  .pt-mast { gap: .6rem; padding: 0 .8rem; }
  .pt-nav { display: none; }
  .pt-grid { display: block; padding: .8rem .8rem 9rem; }
  .pt-page { padding: 1rem 1rem 1.6rem; box-shadow: 4px 4px 0 var(--line); }
  .pt-side { position: static; max-height: none; display: contents; }
  .pt-card { position: fixed; left: .6rem; right: .6rem; z-index: 20;
    box-shadow: 4px 4px 0 var(--line); max-height: 60vh; }
  .pt-card-l { bottom: 6.4rem; }
  .pt-card-r { bottom: 3.5rem; }
  .pt-card-t { bottom: .6rem; }
  /* an open bar stands on the bars below it; those tuck away meanwhile */
  .pt:has(.pt-card-l:not(.folded)) .pt-card-r,
  .pt:has(.pt-card-l:not(.folded)) .pt-card-t,
  .pt:has(.pt-card-r:not(.folded)) .pt-card-t { visibility: hidden; }
  .pt-cardhead { padding: .5rem .8rem; }
  .pt-cardbody { padding: .8rem .8rem 1rem; }
  .doc section.unit { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .doc section.unit > .gutter .pilcrow { opacity: 1; }
  .listing .terms { columns: 2 9rem; }
}
@media (max-width: 560px) {
  .pt-mast-tools { display: none; }
  .pt-page h1 { font-size: 1.5rem; }
}
