/* techne.pub: the type pages, the space-type pages and the space-type index. Link after the kit:
   <link rel="stylesheet" href="../kit/brand.css"><link rel="stylesheet" href="../kit/components.css"><link rel="stylesheet" href="../kit/pub.css">
   Chrome (header crumbs and search, side nav, table of contents, footer): kit/pub.js. Type pages: kit/pub-type.js.
   Space-type pages: kit/pub-space.js. Code blocks use the kit's .code / .code.dark. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* inline code is a panel chip on techne.pub */
code { background: var(--panel); padding: 1px 5px; border-radius: 4px; }
/* a type name or NSID set as a headline: mono, never Octave ligatures (kit/brand.css ligature rule) */
.h1.tname { font: 400 56px/1.15 var(--mono); letter-spacing: -.03em; font-feature-settings: normal; }

/* ---------- header middle: crumbs and search (moved into .tx-mid by kit/header.js) ---------- */
.crumbs { font: 400 var(--t-sm) var(--sans); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--black); }
.crumbs .sep { opacity: .5; }
.crumbs .here { color: var(--black); font-weight: 500; }
.search { position: relative; }
.search input { width: 280px; height: 36px; border-radius: var(--r-pill); border: 1.5px solid var(--rule); background: var(--white); padding: 0 16px 0 36px; font: 400 var(--t-sm) var(--sans); outline: none; }
.search input:focus { border-color: var(--black); }
.search svg { position: absolute; left: 13px; top: 11px; }
.search .res { position: absolute; right: 0; top: 44px; width: 460px; max-height: 440px; overflow: auto; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-chip); box-shadow: var(--sh-pop); padding: 6px; display: none; z-index: 20; }
.search.open .res { display: block; }
.res a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; }
.res a:hover, .res a.sel { background: var(--beige); }
.res .n { font: 500 13px var(--mono); }
.res .k { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-left: 8px; }
.res .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .count { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 12px 4px; }

/* ---------- three columns: side nav, the page, on this page ---------- */
.layout { display: grid; grid-template-columns: 288px minmax(0, 1fr) 200px; max-width: 1440px; margin: 0 auto; }
.layout > main { padding: 0 56px 40px; min-width: 0; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--rule); padding: 24px 0 0 32px; display: flex; flex-direction: column; }
.side .navq, .side .shown { margin-right: 18px; }
.side .navq { width: calc(100% - 18px); }
/* sections of the browse list: record types, space types, platform methods, then account and operator methods (folded, quieter) */
.nsec.quiet > summary { cursor: pointer; list-style: none; color: var(--muted); }
.nsec.quiet > summary::-webkit-details-marker { display: none; }
.nsec.quiet > summary::after { content: ' +'; color: var(--muted); }
.nsec.quiet[open] > summary::after { content: ' −'; }
.nsec.quiet .ng a { color: rgba(0,0,0,.55); }
.nsec.quiet .ng a.cur { color: var(--white); }
.side .nsh { font: 600 12px var(--sans); color: #000; margin: 22px 0 10px 4px; }
.side .nsec:first-child .nsh { margin-top: 0; }
.side .nsh .cnt { color: var(--muted); font-weight: 400; }
/* the browse list itself (.navq, .shown, .ng) is shared with the techne.computer reference: kit/components.css */
.side .nav { flex: 1; overflow: auto; padding: 0 18px 80px 0; position: relative; }
/* held in place while the next page of techne.pub comes in (kit/nav.js, kit/brand.css page changes) */
html.tx-vt .side { view-transition-name: pub-side; }
.toc { position: sticky; top: 0; align-self: start; padding: 40px 24px 0 0; }
.toc .accent { color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; text-decoration: none; font-size: 13px; color: var(--muted); padding: 5px 0 5px 12px; border-left: 1.5px solid var(--rule); }
.toc a.on { color: var(--black); border-left-color: var(--black); }
.toc a.more { margin-top: 14px; }
.toc .sub { padding-left: 24px; font-size: 12.5px; }

/* ---------- page hero: kicker, name, host, one line; drawings top right ---------- */
/* its drawings rise from the bottom rule, right of the words (kit/brand.css .rise); 88px under the words gives them room */
.phero { position: relative; overflow: hidden; margin: 0 -56px; padding: 56px 56px 88px; border-bottom: 1px solid var(--rule); --lg-w: 340px; --lg-x: -50px; --sm-w: 112px; --sm-x: 262px; --script-w: 200px; --script-x: 150px; }
.phero > .drawing.d-map.lg { --sink: 62%; }
.phero .txt { position: relative; z-index: 2; max-width: 600px; }
.phero .h1 { margin: 8px 0 0; }
.phero .host { display: flex; gap: 10px; align-items: center; margin: 10px 0 22px; font: 400 var(--t-sm) var(--mono); }
.phero .host .dot { opacity: .4; }
.lede { font: 400 20px/1.5 var(--sans); max-width: 720px; margin: 0; }
.owner { margin: 14px 0 0; padding: 8px 12px; border-left: 3px solid var(--black); background: var(--white); border-radius: 0 8px 8px 0; max-width: 600px; }
.owner:empty { display: none; }

/* ---------- sections ---------- */
.sec { padding: 48px 0; border-top: 1px solid var(--rule); }
.sec > .accent { color: var(--muted); margin-bottom: 10px; }
.sec h2 { margin: 0 0 16px; }
/* a white box on beige (the kit's .card is the larger docs card) */
.box { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-chip); padding: 20px 22px; }
.qrow { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--rule); }
.qrow:first-child { border-top: 0; }
.qrow .qn { font: 400 12.5px var(--mono); }
#sdk .qrow { grid-template-columns: 330px 1fr; }
.tag { display: inline-block; font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 2px 8px; color: var(--muted); vertical-align: 2px; }

/* the lexicon JSON / raw policy, folded */
details.orig { margin-top: 20px; max-width: 760px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--white); }
details.orig summary { cursor: pointer; padding: 12px 16px; font: 500 13px var(--sans); list-style: none; display: flex; align-items: center; gap: 8px; }
details.orig summary::-webkit-details-marker { display: none; }
details.orig summary::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); transition: .15s; }
details.orig[open] summary::before { transform: rotate(45deg); }
details.orig .body { padding: 0 16px 16px; font-size: var(--t-sm); line-height: 1.55; color: rgba(0,0,0,.75); }
details.orig .body p { margin: 0 0 10px; }
/* code blocks are the kit's .code; techne.pub's carry a caption and can be capped in height */
.code { position: relative; }
.code.tall { max-height: 520px; overflow: auto; }

/* ---------- type page: fields ---------- */
table.fields { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--t-sm); background: var(--white); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--rule); }
.fields th { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); background: var(--white); }
.fields td { padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.45; }
.fields tr:last-child td { border-bottom: 0; }
.fields td.nm { font: 500 13px var(--mono); overflow-wrap: anywhere; }
.fields td.ty { font: 400 12.5px var(--mono); color: rgba(0,0,0,.7); word-break: break-word; }
.fields td.ty a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.fields td.ds code { font-size: 12px; }
.req { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.req.y { background: var(--black); color: var(--white); }
.req.n { border: 1px solid var(--rule); color: var(--muted); }
.kv { display: inline-block; font: 400 12px var(--mono); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 1px 6px; margin: 0 4px 4px 0; background: var(--beige); max-width: 100%; overflow-wrap: anywhere; }

/* ---------- type page: the record and its sidecars ---------- */
.rel { position: relative; display: grid; grid-template-columns: 250px 70px minmax(0, 1fr); align-items: center; margin-top: 4px; }
.rel svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.reccol { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.evcard { position: relative; z-index: 1; background: var(--white); border: 1.5px dashed rgba(0,0,0,.55); border-radius: 16px; padding: 22px 24px; }
.evcard.own { border-style: solid; border-color: var(--black); }
.evcard .who { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.evcard .nm { font: 500 22px/1.2 var(--mono); letter-spacing: -.01em; margin: 8px 0 4px; }
.evcard .ns { font: 400 12.5px var(--mono); color: rgba(0,0,0,.7); word-break: break-all; }
.evcard p { font-size: var(--t-sm); line-height: 1.5; margin: 12px 0 0; }
.scs { display: flex; flex-direction: column; gap: 8px; grid-column: 3; }
.sc { position: relative; z-index: 1; display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--white); border: 1.5px solid var(--black); border-radius: var(--r-md); padding: 9px 14px; }
.sc .nm { font: 500 15px var(--mono); letter-spacing: -.01em; }
.sc .nm a { text-decoration: none; }
.sc .via { display: block; font: 400 var(--t-label) var(--mono); color: var(--muted); margin-top: 1px; }
.sc .pl { font-size: 13px; line-height: 1.35; margin: 0; color: rgba(0,0,0,.78); }
.sc .meta { display: flex; gap: 6px; flex-wrap: nowrap; margin: 0; }
.sc .mt { font-size: 11.5px; border-radius: var(--r-pill); padding: 2px 9px; background: var(--beige); color: rgba(0,0,0,.72); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 22px; height: 14px; border-radius: 5px; }
/* query roles */
.qroles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.qroles .r { font: 400 12.5px var(--mono); background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 4px 10px; }
.qroles .r.every { background: transparent; color: var(--muted); }
.qroles .r b { font-weight: 500; }

/* ---------- type page: the live check (kit/techne.js validate) ---------- */
.check { display: grid; grid-template-columns: 1.25fr 1fr; border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; background: var(--white); }
.check .ed { position: relative; background: var(--panel); }
.check textarea { display: block; width: 100%; min-height: 360px; border: 0; background: transparent; resize: vertical; padding: 20px 22px; font: 400 var(--t-code)/1.6 var(--mono); color: var(--black); outline: none; tab-size: 2; }
.check .out { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.verdict { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verdict .pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: var(--r-pill); font: 500 var(--t-sm) var(--sans); border: 1.5px solid var(--black); white-space: nowrap; flex-shrink: 0; }
.verdict .pill.ok { background: var(--black); color: var(--white); }
.verdict .pill.bad { background: var(--white); }
.problems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.problems li { font: 400 13px var(--mono); background: var(--beige); border-left: 3px solid var(--black); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.problems li b { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 12px var(--sans); border: 1px solid var(--rule); background: var(--white); border-radius: var(--r-pill); padding: 5px 11px; cursor: pointer; }
.chip:hover { border-color: var(--black); }
.check .meta { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.check .meta code { font-size: 12px; }

/* ---------- space-type page (kit/pub-space.js) ---------- */
.pub-space .phero .txt, .pub-space .lede { max-width: 600px; }
.pub-space .phero .host { margin-bottom: 26px; }
.pub-space .phero + .sec { border-top: 0; }
.pub-space details.orig { max-width: none; }
.pub-space details.orig .body .code { margin-top: 4px; }
.lives { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-chip); }
.lv { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 18px; padding: 12px 18px; border-top: 1px solid var(--rule); align-items: baseline; }
.lv:first-child { border-top: 0; }
.lchip { justify-self: start; font: 400 12.5px var(--mono); border: 1px solid var(--rule); border-radius: 7px; padding: 2px 8px; background: var(--beige); color: rgba(0,0,0,.82); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.lchip { background: var(--black); color: var(--white); border-color: var(--black); }
.lv .ld { font-size: 13.5px; line-height: 1.45; color: rgba(0,0,0,.78); }
.lv .ld .tag { margin-left: 6px; }
.legs3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.legs3 + details.orig { margin-top: 16px; }
.leg3 { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-chip); padding: 18px 20px; border-top: 3px solid var(--black); }
.leg3 .accent { color: var(--muted); margin-bottom: 6px; }
.leg3 .w { font: 400 var(--t-p)/1.45 var(--sans); }
.leg3 .pt { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.leg3 .pt span { font: 400 11.5px var(--mono); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 1px 8px; color: rgba(0,0,0,.65); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; font-size: var(--t-sm); }
.pager a { text-decoration: none; color: var(--muted); }
.pager a b { color: var(--black); font-weight: 500; }

/* ---------- the landing (pub/index.html): a centred head, featured types as cards, the browse list as the body ---------- */
.pub-land > main { max-width: 1240px; margin: 0 auto; padding: 0 48px; }
.plhead { position: relative; overflow: hidden; text-align: center; margin: 0 calc(50% - 50vw); padding: 72px 48px 128px; border-bottom: 1px solid var(--rule); }
.plhead .in { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; }
.plhead .h1 { margin: 16px 0 20px; }
.plhead .p { max-width: 620px; margin: 0 auto; }
.plhead .p a { color: var(--black); text-decoration: none; }
.plhead > .drawing { z-index: 0; }
.plsec { padding: 48px 0 0; }
.plsec > .accent { color: var(--muted); margin-bottom: 14px; }
.plsec h2 { margin: 0 0 20px; }
.feat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fcard { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-chip); padding: 20px 22px; text-decoration: none; color: var(--black); transition: border-color .15s; }
.fcard:hover { border-color: var(--black); }
.fcard .fk { text-transform: uppercase; letter-spacing: .06em; font-weight: 500; font-size: var(--t-label); }
.fcard .fn { font: 500 20px/1.2 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
.fcard .fd { font-size: var(--t-sm); line-height: 1.5; color: rgba(0,0,0,.78); flex: 1; }
.fcard .fh { font: 400 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
/* the browse list, wide: the filter box and count over the groups in four columns */
.browse .navq { max-width: 520px; height: 44px; font-size: var(--t-sm); padding: 0 18px; }
.browse .shown { margin: 8px 0 24px 4px; }
.browse .nsec { margin-bottom: 40px; }
.browse .nsh { font: 500 var(--t-h3)/1.3 var(--serif); margin: 0 0 18px 4px; }
.browse .nsh .cnt { color: var(--muted); }
.browse .nbody { columns: 4 250px; column-gap: 28px; }
.browse .ng { break-inside: auto; }
.browse .ng .accent { break-after: avoid; }
.browse .ng a { break-inside: avoid; }
.plquiet { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--muted); }
.plquiet a { color: var(--black); text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 900px) {
  .pub-land > main { padding: 0 16px; }
  .plhead { padding: 40px 16px 150px; }
  .plhead .h1 { font-size: 36px; }
  .plhead > .drawing:nth-child(2) { width: 300px !important; right: -90px !important; bottom: -170px !important; }
  .plhead > .drawing:nth-child(3) { width: 140px !important; right: auto !important; left: 120px !important; bottom: -20px !important; }
  .plhead > .drawing:nth-child(4) { width: 220px !important; left: -90px !important; bottom: -150px !important; }
  .plhead > .drawing:nth-child(5) { display: none; }
  .feat { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fcard { padding: 16px 18px; }
  .browse .navq { max-width: none; font-size: 16px; }
  .browse .nbody { columns: 1; }
}


/* ---------- small screens (pass 2, mobile) ----------
   One column: the side nav becomes a "Browse types" disclosure at the top (kit/pub.js adds the button), the table
   of contents a row of links under it; tables and diagrams stack. */
.side-toggle { display: none; }
@media (max-width: 900px) {
  .layout { display: flex; flex-direction: column; }
  .layout > main { order: 3; padding: 0 16px 32px; }
  .side { order: 1; position: static; height: auto !important; border-right: 0; padding: 8px 16px 0; display: block; }
  .side-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; box-sizing: border-box; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--white); font: 400 15px var(--sans); color: var(--black); cursor: pointer; text-align: left; }
  .side-toggle b { font-weight: 500; }
  .side-toggle small { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 8px; }
  .side-toggle::after { content: ''; flex: none; width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-2px) rotate(45deg); transition: transform var(--spring-d) var(--spring); }
  .side.open .side-toggle::after { transform: translateY(2px) rotate(-135deg); }
  .side > :not(.side-toggle) { display: none; }
  .side.open > :not(.side-toggle) { display: block; animation: tx-drop var(--spring-d) var(--spring) both; }
  .side.open .navq { margin: 12px 0 6px; width: 100%; height: 44px; font-size: 16px; }
  .side.open .nav { max-height: 60vh; overflow: auto; padding: 0 0 12px; border-bottom: 1px solid var(--rule); }
  .ng a { padding: 10px 8px; }
  .layout > * { min-width: 0; max-width: 100%; }
  .toc { order: 2; position: static; display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc .accent { display: none; }
  .toc a, .toc a.more { flex: none; margin: 0; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r-pill); background: var(--white); font-size: 13.5px; }
  .toc a.on { border-color: var(--black); background: var(--black); color: var(--white); }
  .toc .sub { padding-left: 14px; }

  .phero { margin: 0 -16px; padding: 32px 16px 36px; --lg-w: 270px; --lg-x: -48px; --sm-w: 92px; --sm-x: 200px; --script-w: 170px; --script-x: 170px; }
  .h1.tname { font-size: 30px; line-height: 1.2; overflow-wrap: anywhere; }
  .phero .host { flex-wrap: wrap; font-size: 13px; overflow-wrap: anywhere; }
  .lede { font-size: 17px; }
  .sec { padding: 36px 0; }
  .qrow, #sdk .qrow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .qrow .qn { overflow-wrap: anywhere; }
  .box { padding: 14px 16px; }

  /* schema: one stacked row per field: name and required, then type, description, known values */
  table.fields, .fields tbody, .fields tr, .fields td { display: block; width: auto; }
  .fields thead { display: none; }
  .fields tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 14px 14px; border-bottom: 1px solid var(--rule); }
  .fields tr:last-child { border-bottom: 0; }
  .fields td { padding: 0; border: 0; }
  .fields td.nm { grid-column: 1; white-space: normal; overflow-wrap: anywhere; }
  .fields td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .fields td.ty, .fields td.ds, .fields td:nth-child(5) { grid-column: 1 / -1; }
  .fields td:nth-child(5):empty { display: none; }

  /* the record and its sidecars: the record on top, the sidecars under it, joined by a line on the left */
  .rel { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .rel > svg { display: none; }
  .rel > div:empty { display: none; }
  .reccol { margin-bottom: 14px; }
  .scs { position: relative; padding-left: 22px; }
  .scs::before { content: ''; position: absolute; left: 7px; top: -14px; bottom: 22px; border-left: 1.2px solid var(--black); }
  .sc { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sc::before { content: ''; position: absolute; left: -16px; top: 22px; width: 15px; border-top: 1.2px solid var(--black); }
  .sc .meta { flex-wrap: wrap; }
  .evcard { padding: 18px; }
  .legend span:last-child { display: block; }
  .evcard .nm { font-size: 20px; }

  /* the live check: the editor over the verdict, the editor full width */
  .check { grid-template-columns: minmax(0, 1fr); }
  .check textarea { min-height: 280px; padding: 16px; font-size: 16px; line-height: 1.5; white-space: pre; overflow-x: auto; overflow-wrap: normal; }
  .check .out { padding: 18px 16px; }
  .chip { min-height: 40px; padding: 0 14px; }
  .problems li { overflow-wrap: anywhere; }

  /* space-type pages */
  .lv { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; }
  .legs3 { grid-template-columns: minmax(0, 1fr); }
  .pager { flex-wrap: wrap; }
  .pager a { padding: 8px 0; }
  details.orig summary { min-height: 44px; box-sizing: border-box; }
}

/* ---------- records (pub/records.html, kit/pub-records.js): the lookup, its result, and the published lists ---------- */
.rc-top { padding-bottom: 112px; }
.rc-look { max-width: 1040px; margin: 0 auto; }
.rc-form { display: flex; gap: 10px; }
.rc-in { flex: 1; min-width: 0; height: 52px; padding: 0 20px; font: 400 14px var(--mono); border: 1.5px solid var(--black); border-radius: var(--r-pill); background: var(--white); color: var(--black); }
.rc-in:focus { outline: 2px solid var(--black); outline-offset: 2px; }
.rc-form .btn { height: 52px; padding: 0 26px; background: var(--black); color: var(--white); }
.rc-try { margin: 12px 0 0 20px; }
.rc-try a { color: var(--black); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rc-out { margin-top: 28px; }
.rc-out:empty { display: none; }
.rc-state { padding: 22px 24px; border: 1px dashed var(--rule); border-radius: var(--r-chip); }
.rc-err { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--black); border-radius: 0 var(--r-chip) var(--r-chip) 0; padding: 20px 24px; }
.rc-err .accent { margin-bottom: 6px; }
.rc-err .p { margin: 0; overflow-wrap: anywhere; }
.rc-err .small { margin: 8px 0 0; overflow-wrap: anywhere; }
.rc-rec { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 32px 36px; display: flex; flex-direction: column; gap: 22px; }
.rc-rec > * { margin: 0; }
.rc-head .accent a { color: inherit; }
.rc-head .accent code { font-size: 11px; text-transform: none; letter-spacing: 0; }
.rc-head .h3 { margin: 6px 0 10px; font-family: var(--mono); font-size: 26px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-sm); color: var(--muted); }
.rc-meta .mono { font: 400 12px var(--mono); }
.rc-did { color: var(--black); }
.rc-did code { font-size: 12px; }
.rc-at { margin-top: 10px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rc-at code { font-size: 12px; }
.rc-name { margin: 8px 0 0; }
.rc-note { margin: 0; }
.rc-check { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: var(--beige); border-radius: var(--r-chip); }
.rc-check p { margin: 0; }
.rc-card { border: 1px solid var(--rule); border-top: 3px solid var(--black); border-radius: var(--r-chip); padding: 20px 22px; }
.rc-card .accent { color: var(--muted); margin-bottom: 6px; }
.rc-title { font: 500 21px/1.35 var(--serif); margin: 0 0 14px; overflow-wrap: anywhere; }
.rc-title code { font-size: 15px; }
.rc-title .rc-did { border-bottom: 1px solid var(--rule); }
.rc-card > .small { margin: 0 0 14px; max-width: 760px; line-height: 1.55; }
.rc-facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: var(--t-sm); line-height: 1.5; }
.rc-facts dt { color: var(--muted); }
.rc-facts dd { margin: 0; overflow-wrap: anywhere; }
.rc-facts .kv a { color: inherit; text-decoration: none; }
.rc-why { margin: 14px 0 0; }
.rc-rule { font: 400 18px/1.45 var(--sans); margin: 0 0 12px; max-width: 760px; }
.rc-card .code { margin-top: 12px; }
.rc-uri { font: 400 12.5px var(--mono); color: var(--black); text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.rc-fields td.vl { font-size: var(--t-sm); overflow-wrap: anywhere; }
.rc-fields td.vl code { font-size: 12px; }
.rc-fields tr.unset td { color: var(--muted); }
.rc-fields tr.unset td.nm { color: rgba(0,0,0,.45); }
.rc-fields td.ds { font-size: var(--t-xs); color: rgba(0,0,0,.7); }
.rc-rec > .clab { margin: 0 0 -10px; }
.rc-rec .clab a { color: inherit; }
.rc-raw { max-width: none; margin: 0; }
.rc-raw .code { max-height: 480px; overflow: auto; }
.rc-walk { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.rc-walk .code pre { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.rc-walk .clab { margin-top: 0; }
.legs { list-style: none; margin: 0; padding: 0; }
.legs > li { padding: 18px 0; border-top: 1px solid var(--rule); }
.legs > li:first-child { border-top: 0; padding-top: 0; }
.legs > li > .accent { color: var(--muted); }
.legs dl { margin: 10px 0 0; }
.legs dt { margin: 14px 0 4px; font: 500 var(--t-sm) var(--sans); }
.legs dt:first-child { margin-top: 0; }
.legs dt small { margin-left: 6px; }
.legs dt small code { font-size: 11.5px; color: var(--muted); }
.legs dd { margin: 0; font-size: var(--t-sm); line-height: 1.5; color: rgba(0,0,0,.78); }

.rp { margin-top: 40px; }
.rp-lede { max-width: 680px; margin: -6px 0 8px; }
.rp-slot { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.rp-h { display: flex; align-items: baseline; gap: 14px; }
.rp-h .h3 { margin: 0; }
.rp-c { font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-l { max-width: 760px; margin: 8px 0 18px; color: rgba(0,0,0,.75); line-height: 1.55; }
.rp-sub { color: var(--muted); margin: 22px 0 10px; }
.rp-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rp-i { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-chip); padding: 14px 16px; color: var(--black); text-decoration: none; transition: border-color .15s; min-width: 0; }
.rp-i:hover { border-color: var(--black); }
.rp-n { font: 500 13.5px var(--mono); overflow-wrap: anywhere; }
.rp-k { align-self: flex-start; font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-d { font-size: var(--t-xs); line-height: 1.5; color: rgba(0,0,0,.75); }
.rp-b { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rp-row { position: relative; display: flex; }
.rp-row .rp-i { flex: 1; padding-right: 96px; }
.rp-row.off .rp-i { background: transparent; border-style: dashed; }
.rp-x { position: absolute; right: 12px; top: 12px; font: 500 12px var(--sans); color: var(--black); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 3px 10px; text-decoration: none; background: var(--white); }
.rp-x:hover { border-color: var(--black); }
.rp-fb { margin: 14px 0 0; }
.rp-note { margin: 40px 0 0; }
.rp-all { display: none; margin-top: 10px; }

@media (max-width: 900px) {
  .rc-top { padding-bottom: 130px; }
  .rc-form { flex-direction: column; }
  .rc-in { flex: none; height: 48px; font-size: 16px; padding: 0 16px; }
  .rc-form .btn { height: 48px; justify-content: center; }
  .rc-try { margin-left: 4px; }
  .rc-rec { padding: 20px 16px; border-radius: var(--r-chip); }
  .rc-head .h3 { font-size: 20px; }
  .rc-title { font-size: 18px; }
  .rc-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rc-facts dd { margin-bottom: 10px; }
  .rc-walk { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rc-fields td.vl { grid-column: 1 / -1; }
  .rp-list { grid-template-columns: minmax(0, 1fr); }
  .rp-list.long:not(.open) > :nth-child(n+5) { display: none; }
  .rp-all { display: inline-flex; align-items: center; }
}

/* the registry's facts about a type (kit/pub-registry.js): type pages, pub/c/ and the Community tab */
.rg-facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: var(--t-sm); line-height: 1.5; max-width: 760px; }
.rg-facts dt { color: var(--muted); }
.rg-facts dd { margin: 0; overflow-wrap: anywhere; }
.rg-state { display: inline-block; font-weight: 600; }
.rg-state.s-pending, .rg-state.s-declined, .rg-state.s-blocked { padding: 1px 9px; border-radius: var(--r-pill); background: var(--tint); }
.rg-h { margin: 34px 0 10px; }
.rg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rg-list a { display: inline-block; padding: 5px 12px; border: 1px solid var(--rule); border-radius: var(--r-pill); background: var(--white); text-decoration: none; color: var(--black); }
.rg-list a:hover { border-color: var(--black); }
.rg-ask { margin-top: 18px; }

/* the Community tab (src/pub/community.html) */
.cm-search input { width: 100%; max-width: 640px; height: 48px; padding: 0 18px; border: 1.5px solid var(--black); border-radius: var(--r-pill); font: 400 17px/1 var(--sans); background: var(--white); box-sizing: border-box; }
.cm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; max-width: 900px; }
.cm-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cm-chips button, .cm-you { height: 32px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r-pill); background: var(--white); font: 500 var(--t-sm) var(--sans); color: var(--black); cursor: pointer; }
.cm-chips button[aria-pressed="true"], .cm-you[aria-pressed="true"] { background: var(--black); color: var(--white); border-color: var(--black); }
.cm-handle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.cm-handle input { height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r-pill); font: 400 15px/1 var(--sans); min-width: 220px; }
.cm-count { margin: 10px 0 6px; min-height: 1.4em; }
.cm-rows { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.cm-row + .cm-row { border-top: 1px solid var(--rule); }
.cm-row a { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 14px 8px; margin: 0 -8px; border-radius: 10px; text-decoration: none; color: var(--black); }
.cm-row a:hover { background: var(--hover); }
.cm-n { font: 500 20px/1.25 var(--serif); }
.cm-row .rg-state { justify-self: start; font-size: 12px; }
.cm-ns, .cm-d, .cm-m { grid-column: 1 / -1; }
.cm-ns { font: 400 13px/1.3 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.cm-d { font-size: var(--t-sm); color: var(--ink-2); }
.cm-m { font-size: 13px; color: var(--muted); }
.cm-more { margin-top: 16px; }
.cm-lede { max-width: 720px; margin: 0 0 4px; }
.pub-community [hidden] { display: none !important; }
