/* Techne brand kit: base type, logo, buttons, drawings, and the site chrome every page
   shares (kit/header.js, kit/copy.js). Tokens: kit/tokens.css. Page components: kit/components.css.
   techne.pub's type pages: kit/pub.css. */
@import url('tokens.css?v=e53b96a44f21');

/* ---------- base ---------- */
/* Ligature rule: Octave's discretionary ligatures (ch ck cl ct sh sk sl sp st) only in the
   big H1/H2 headlines and the logotype. Never on smaller titles, and never on a code name (set those in mono). */
/* type scale, 8pt base: Octave headlines (Medium), Public Sans body */
.h1 { font: 500 var(--t-h1)/1.15 var(--serif); letter-spacing: -.03em; font-feature-settings: 'dlig' 1; }
.h2 { font: 500 var(--t-h2)/1.2 var(--serif); letter-spacing: -.02em; font-feature-settings: 'dlig' 1; }
.h3 { font: 500 var(--t-h3)/1.3 var(--serif); letter-spacing: 0; }
.h1-alt { font: 400 var(--t-h1)/1.15 var(--sans); letter-spacing: -.03em; }
.h2-alt { font: 400 var(--t-h2)/1.2 var(--sans); letter-spacing: -.02em; }
.h3-alt { font: 400 var(--t-h3)/1.3 var(--sans); }
.p { font: 400 var(--t-p)/1.3 var(--sans); }
.accent { font: 500 12px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; }
/* no orphan words: headlines balance their lines, running text avoids a last word alone (pass 3) */
h1, h2, h3, h4, .h1, .h2, .h3, .h1-alt, .h2-alt, .h3-alt { text-wrap: balance; }
p, li, dd, figcaption, .p { text-wrap: pretty; }
body { margin: 0; background: var(--beige); color: var(--black); font: 400 var(--t-p)/1.4 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* links in running text: a 1px underline that thickens on hover */
a:hover { text-decoration-thickness: 2px; }
/* one focus style everywhere: a 2px black ring, 3px out; on black things the ring sits outside them on the page */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; border-radius: 4px; }
.code.dark :focus-visible, .tx-layers li.on a:focus-visible { outline-color: var(--white); }
::selection { background: rgba(0,0,0,.12); }
code, pre { font-family: var(--mono); font-size: var(--t-code); }
/* the logotype: "Techne" in Octave with the discretionary ch ligature */
.logo { font: 500 28px/1 var(--serif); font-feature-settings: 'dlig' 1; letter-spacing: -.01em; text-decoration: none; }
/* pill buttons, as on the guideline's website example: solid black and outlined. Hover lifts 1px on a spring. */
.btn { display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border-radius: var(--r-pill); font: 500 var(--t-sm) var(--sans); border: 1.5px solid var(--black); text-decoration: none; cursor: pointer; transition: translate var(--spring-d) var(--spring), scale var(--spring-snap-d) var(--spring-snap), background-color .15s; }
.btn:hover { translate: 0 -1px; }
.btn:active { scale: .97; translate: 0; }
.btn.solid { background: var(--black); color: var(--white); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--white); }
.btn:focus-visible { border-radius: var(--r-pill); }
/* drawings: an engraving used as a mask, filled with ONE palette colour (guide: each drawing takes a single
   secondary colour; a composition uses up to four and always mixes warm with cool).
   Each drawing keeps its own proportions, so a width is enough:
   <div class="drawing d-orrery" style="--c:var(--blue);width:..;right:..;bottom:.."></div>
   The parent needs position: relative and overflow: hidden (.drawn, .rise, .dx-head, .phero do this).
   Compositions the kit lays out itself (pass 3): .rise heads (drawings rising from the head's bottom rule) and
   .hero (drawings rising from the hero's bottom edge, running on beneath the cards below). Pages pick the drawings
   and colours; the kit places them: .lg is the large one, .sm the small one. */
.drawing { position: absolute; background: var(--c, var(--pink)); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; pointer-events: none; }
.d-orrery { --src: url('drawings/orrery.png'); aspect-ratio: 1600 / 1583; }
.d-map { --src: url('drawings/map.png'); aspect-ratio: 1470 / 1600; }
.d-script { --src: url('drawings/script.png'); aspect-ratio: 824 / 541; }
.d-sun { --src: url('drawings/sun.png'); aspect-ratio: 852 / 1600; }
.d-lens { --src: url('drawings/lens.png'); aspect-ratio: 1102 / 1600; }
/* the sun plate is a filled rectangle: .d-sunrise keeps its rays and lets the edges fade, so it never shows a box */
.d-sunrise { --src: url('drawings/sun.png'); aspect-ratio: 1; -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%) center / 100% 100% no-repeat, var(--src) 92% 30% / 210% auto no-repeat; -webkit-mask-composite: source-in; mask: radial-gradient(closest-side, #000 30%, transparent 100%) center / 100% 100% no-repeat, var(--src) 92% 30% / 210% auto no-repeat; mask-composite: intersect; }

/* a head whose drawings rise from its bottom rule, right of the words (docs heads, techne.pub heads, town about) */
.rise, .dx-head, .phero { position: relative; overflow: hidden; }
.rise > .drawing, .dx-head > .drawing, .phero > .drawing { z-index: 0; bottom: 0; transform: translateY(var(--sink, 56%)); }
.rise > .drawing.lg, .dx-head > .drawing.lg, .phero > .drawing.lg { width: var(--lg-w, 340px); right: var(--lg-x, 8px); }
.rise > .drawing.sm, .dx-head > .drawing.sm, .phero > .drawing.sm { width: var(--sm-w, 128px); right: var(--sm-x, 316px); --sink: 34%; }
.rise > .drawing.d-map.lg, .dx-head > .drawing.d-map.lg, .phero > .drawing.d-map.lg { --sink: 52%; }
.rise > .drawing.d-script.sm, .dx-head > .drawing.d-script.sm, .phero > .drawing.d-script.sm { --sm-w: var(--script-w, 240px); --sink: 38%; right: var(--script-x, var(--sm-x, 316px)); }

/* ---------- the header, the same on all three sites (kit/header.js): same left and right, the middle is the site's own ---------- */
.tx-head { position: fixed; top: 20px; left: 24px; right: 24px; z-index: 40; display: grid; grid-template-columns: 260px minmax(0,1fr) 260px; align-items: center; gap: 24px; height: 64px; padding: 0 14px 0 24px; border-radius: 18px; }
/* calm at the top of a page, as on the guide's website example: logo, the middle, the round black menu, nothing
   around them. Once the page scrolls (kit/header.js adds .scrolled) a frosted bar fades in behind them. */
.tx-head::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; border: 1px solid var(--rule); background: rgba(248,247,241,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--sh-float); opacity: 0; transition: opacity .24s var(--out); }
.tx-head.scrolled::before, .tx-head.sw-open::before { opacity: 1; }
/* Sign in sits on the page at the top: give it a fill, so a drawing or a line behind never shows through */
.tx-signin { background: var(--beige); }
/* room for the floating header */
body.tx-nav { padding-top: var(--head-room); }
body.tx-nav .side, body.tx-nav .toc { top: var(--head-room); }
body.tx-nav .side { height: calc(100vh - var(--head-room)); }
.tx-left { position: relative; display: flex; align-items: baseline; gap: 6px; }
.tx-brand { text-decoration: none; color: var(--black); background: none; border: 0; padding: 0; cursor: pointer; }
.tx-site { display: inline-flex; align-items: center; gap: 6px; font: 500 15px var(--sans); color: var(--muted); text-decoration: none; background: none; border: 0; padding: 4px 6px; margin-left: -2px; border-radius: 8px; cursor: pointer; }
button.tx-site:hover, .tx-left.open button.tx-site { color: var(--black); }
.tx-site svg { transition: transform var(--spring-d) var(--spring); }
.tx-left.open .tx-site svg { transform: rotate(180deg); }
/* clicking the wordmark or site name must not draw a box; keyboard focus still shows a ring */
.tx-brand:focus, .tx-site:focus { outline: none; }
.tx-brand:focus-visible, .tx-site:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; border-radius: 4px; }
.tx-mid { display: flex; align-items: center; justify-content: center; gap: 24px; min-width: 0; }
.tx-mid .crumbs { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; }
/* when the crumbs run out of room the group in the middle gives way (with an ellipsis); techne.pub and the page's
   own name keep their room */
.tx-mid .crumbs > * { flex: none; }
.tx-mid .crumbs > a:not(:first-child) { flex: 0 1 auto; min-width: 3ch; overflow: hidden; text-overflow: ellipsis; }
.tx-mid .crumbs > .here { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; }
.tx-mid .search input { height: 34px; }
.tx-mid .search svg { top: 10.5px; }
.tx-links { display: flex; gap: 6px; align-items: center; font: 500 var(--t-sm) var(--sans); }
.tx-links a { padding: 6px 13px; border-radius: var(--r-pill); text-decoration: none; color: var(--muted); }
.tx-links a:hover { color: var(--black); }
/* the current page: a light filled pill, so it never reads as a button */
.tx-links a.on { background: var(--tint); color: var(--black); }
.tx-right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.tx-signin { height: 34px; padding: 0 16px; }
.tx-menu { width: 36px; height: 36px; border-radius: 50%; background: var(--black); border: 0; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; transition: scale var(--spring-snap-d) var(--spring-snap); }
.tx-menu:hover { scale: 1.06; }
.tx-menu:active { scale: .94; }
.tx-menu:focus-visible { border-radius: 50%; }
.tx-menu i { display: block; width: 12px; height: 1.5px; background: var(--white); }
/* the site switcher, dropping from the site name */
.tx-pop { position: absolute; top: calc(100% + 18px); left: -16px; z-index: 60; width: 340px; padding: 14px; background: var(--white); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--sh-pop); opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: 40px 0; pointer-events: none; visibility: hidden; transition: opacity var(--out-d) var(--out), transform var(--out-d) var(--out), visibility 0s var(--out-d); }
/* opens on a spring (kit/tokens.css --spring), closes quickly with no spring */
.tx-left.open .tx-pop { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s ease-out, transform var(--spring-d) var(--spring), visibility 0s; }
.tx-kicker { margin: 2px 4px 10px; font: 500 var(--t-label) var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tx-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tx-layers a { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-chip); background: var(--beige); text-decoration: none; color: var(--black); border: 1px solid transparent; transition: translate var(--spring-d) var(--spring), border-color .15s; }
.tx-layers a:hover { border-color: var(--black); translate: 0 var(--lift); }
.tx-layers li.on a:hover { translate: none; }
.tx-layers b { font: 500 15px var(--sans); }
.tx-layers span { font: 400 var(--t-xs) var(--sans); color: rgba(0,0,0,.65); }
.tx-layers li.on a { background: var(--black); color: var(--white); }
.tx-layers li.on span { color: rgba(255,255,255,.7); }
.tx-layers em { position: absolute; top: 13px; right: 14px; font: 500 10px var(--sans); font-style: normal; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
/* the menu drawer */
.tx-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .2s var(--out); }
/* the drawer slides in on the critically damped spring (no overshoot, so its edge never leaves the screen's edge),
   its links follow a beat later; it closes quickly. Closed, it is hidden, so its links leave the tab order. */
.tx-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: 380px; box-sizing: border-box; padding: 28px 24px; background: var(--white); overflow-y: auto; transform: translateX(100%); visibility: hidden; box-shadow: -12px 0 40px rgba(0,0,0,.08); transition: transform .2s var(--out), visibility 0s .2s; }
.tx-menu-open .tx-scrim { opacity: 1; pointer-events: auto; transition: opacity .3s ease-out; }
.tx-menu-open .tx-drawer { transform: none; visibility: visible; transition: transform var(--spring-soft-d) var(--spring-soft), visibility 0s; }
.tx-drawer > * { opacity: 0; translate: 16px 0; transition: opacity .12s, translate 0s .12s; }
.tx-menu-open .tx-drawer > * { opacity: 1; translate: 0; transition: opacity .3s ease-out calc(80ms + var(--k, 0) * 40ms), translate var(--spring-d) var(--spring) calc(80ms + var(--k, 0) * 40ms); }
.tx-drawer > :nth-child(2) { --k: 1; } .tx-drawer > :nth-child(3) { --k: 2; } .tx-drawer > :nth-child(n+4) { --k: 3; }
.tx-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: none; font: 400 20px/1 var(--sans); cursor: pointer; transition: border-color .15s, scale var(--spring-snap-d) var(--spring-snap); }
.tx-close:hover { border-color: var(--black); }
.tx-close:active { scale: .92; }
.tx-close:focus-visible { border-radius: 50%; }
.tx-pages { list-style: none; margin: 0 0 36px; padding: 0; }
.tx-pages a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--rule); font: 400 20px var(--sans); text-decoration: none; color: var(--black); transition: translate var(--spring-d) var(--spring); }
.tx-pages a:hover { translate: 4px 0; }
.tx-pages a.on { font-weight: 500; }
.tx-gap { height: 8px; }

/* ---------- Copy button on code blocks (kit/copy.js). Quiet: shown on hover or keyboard focus, no colour. ---------- */
.cp-host .cp-btn { position: absolute; top: 10px; right: 10px; z-index: 2; font: 500 12px/1 var(--sans); height: 24px; padding: 0 9px; border-radius: var(--r-pill); cursor: pointer; user-select: none; -webkit-user-select: none; color: rgba(0,0,0,.72); background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.16); opacity: 0; transition: opacity .12s; white-space: nowrap; }
/* "Copied": the pill pops on the snap spring (kit/motion.js plays it; this is the resting state) */
.cp-btn.is-done { font-weight: 600; }
.cp-host.cp-dark .cp-btn { color: rgba(255,255,255,.86); background: rgba(0,0,0,.85); border-color: rgba(255,255,255,.28); }
.cp-host:hover .cp-btn, .cp-host:focus-within .cp-btn, .cp-btn.is-done { opacity: 1; }
.cp-host .cp-btn:hover { border-color: rgba(0,0,0,.4); color: var(--black); }
.cp-host.cp-dark .cp-btn:hover { border-color: rgba(255,255,255,.55); color: var(--white); }
.cp-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.cp-host:hover > .cap, .cp-host:focus-within > .cap { visibility: hidden; }

/* ---------- small screens (pass 2, mobile). Structure collapses at 900px, type and spacing step down at 600px ----------
   The header keeps the logo, the site name (the switcher, opened by tap) and the menu; the middle (the page links,
   techne.pub's crumbs and search) goes into the drawer (kit/header.js moves techne.pub's live nodes). */
@media (max-width: 900px) {
  :root { --head-room: 84px; }
  .tx-head { top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; height: 60px; padding: 0 10px 0 18px; border-radius: 16px; }
  .tx-head > .tx-mid { display: none; }
  .tx-head .tx-signin { display: none; }
  .tx-left { align-items: center; }
  .tx-brand { min-height: 44px; }
  .tx-site { min-height: 40px; padding: 4px 8px; }
  .tx-menu { width: 44px; height: 44px; gap: 4px; }
  .tx-menu i { width: 14px; }
  .tx-pop { position: fixed; top: 80px; left: 10px; right: 10px; width: auto; }
  .tx-drawer { width: min(380px, 100vw); padding: 24px 20px; }
  .tx-close { width: 44px; height: 44px; top: 14px; right: 14px; }
  .tx-pages a { padding: 12px 4px; }
  .tx-pages a.on { font-weight: 500; }
  /* techne.pub's crumbs and search, moved into the drawer */
  .tx-drawer .tx-mid { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin: 0 0 22px; }
  .tx-drawer .tx-mid .crumbs { flex-wrap: wrap; white-space: normal; padding-right: 48px; }
  .tx-drawer .tx-mid .crumbs > a, .tx-drawer .tx-mid .crumbs > .here { overflow: visible; overflow-wrap: anywhere; }
  .tx-drawer .search input { width: 100%; height: 44px; font-size: 16px; }
  .tx-drawer .search svg { top: 15.5px; }
  .tx-drawer .search .res { position: static; width: auto; max-height: none; margin-top: 8px; box-shadow: none; }
  .btn { height: 44px; padding: 0 20px; }
  /* long NSIDs in running text break rather than widen the page */
  :not(pre) > code { overflow-wrap: anywhere; }
  /* touch: Copy is always shown, and its hit area is 40px tall */
  .cp-host .cp-btn { opacity: 1; }
  /* a transparent 8px border makes the hit area 40px while the pill still looks 24px; the edge is an inset shadow */
  .cp-host .cp-btn { top: 2px; right: 2px; height: 40px; border: 8px solid transparent; background-clip: padding-box; padding: 0 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); border-radius: var(--r-pill); }
  .cp-host.cp-dark .cp-btn { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); border-color: transparent; }
  .cp-host .cp-btn:hover, .cp-host.cp-dark .cp-btn:hover { border-color: transparent; }
  .cp-host > .cap { display: none; }
}
@media (hover: none) { .cp-host .cp-btn { opacity: 1; } .cp-host > .cap { display: none; } }
/* where Copy is always shown, the code starts below it instead of under it */
@media (hover: none), (max-width: 900px) { pre.cp-host, .cp-host > pre { padding-top: 46px !important; } }
@media (max-width: 600px) {
  :root { --t-h1: 40px; --t-h2: 28px; --t-h3: 21px; }
  .h1 { line-height: 1.12; letter-spacing: -.025em; }
  .h2 { line-height: 1.18; }
  .logo { font-size: 26px; }
}

/* ---------- page changes (kit/nav.js) ----------
   A page of the same site comes in as a cross-document View Transition: the new page's content comes up 12px and fades
   in on the kit spring over the old one, which fades out on the same curve, while the header and the side navs
   (kit/pub.css .side) hold their place, or move to it on the kit spring. They are named only while a transition runs
   (html.tx-vt), so at rest nothing about the page changes. kit/nav.js skips the transition to another site; that page
   fades out instead (html.tx-leaving). A page of the same site on another origin (techne.pub's type hosts) fades out
   the same way and the next one's content comes in as the transition's does (html.tx-arriving), the header and side
   navs still. Reduced motion: no transition, no fade, no slide. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
html.tx-vt .tx-head { view-transition-name: tx-head; }
html.tx-vt .dx-side { view-transition-name: dx-side; }
html.tx-vt .rx-side { view-transition-name: rx-side; }
::view-transition-group(*) { animation-duration: var(--spring-d); animation-timing-function: var(--spring); }
/* the root (the page without its header and side navs): old and new add up (plus-lighter) so the cross-fade never thins
   to the backdrop, which is the page's own beige where the new page has not come up to yet */
::view-transition { background: var(--beige); }
::view-transition-image-pair(root) { isolation: isolate; }
::view-transition-old(root) { animation: tx-out var(--spring-d) var(--spring) both; mix-blend-mode: plus-lighter; }
::view-transition-new(root) { animation: tx-rise var(--spring-d) var(--spring) both; mix-blend-mode: plus-lighter; }
@keyframes tx-out { to { opacity: 0; } }
@keyframes tx-rise { from { opacity: 0; translate: 0 12px; } }
/* leaving: everything fades but the press line under the header, which runs on until the next page replaces this one */
html.tx-leaving :is(body > :not(.tx-head), .tx-head > :not(.tx-prog)) { opacity: 0; transition: opacity var(--out-d) var(--out); }
html.tx-leaving .tx-head::before { opacity: 0; }
/* pressed (kit/nav.js html.tx-press, from the pointerdown on a link to another page until the page is replaced): the
   content, not the header and not the side navs, eases down 6px and dims on the kit spring, and a thin line runs under
   the header. html.tx-unpress eases it back when no navigation follows. The line (.tx-prog) is added by kit/nav.js at
   the first press, so at rest the page is as it was. Reduced motion: the line stands still, the content does not move. */
html.tx-arriving { --tx-content: tx-rise var(--spring-d) var(--spring) both; }
html.tx-unpress { --tx-content: tx-unpress var(--out-d) var(--out); }
/* last: a press during an arrival answers at once */
html.tx-press { --tx-content: tx-press var(--spring-d) var(--spring) forwards; }
@keyframes tx-press { to { opacity: .6; translate: 0 6px; } }
@keyframes tx-unpress { from { opacity: .6; translate: 0 6px; } }
@media (prefers-reduced-motion: no-preference) {
  html:is(.tx-press, .tx-unpress, .tx-arriving) :is(body > :not(.tx-head, .tx-drawer, .tx-scrim, .layout, .dx, .rx, script), .layout > :not(.side, .toc, script), .dx > :not(.dx-side, script), .rx > :not(.rx-side, script)) { animation: var(--tx-content); }
}
.tx-prog { position: absolute; left: 24px; right: 24px; bottom: -6px; height: 2px; border-radius: 1px; overflow: hidden; background: var(--rule); pointer-events: none; opacity: 0; transition: opacity var(--out-d) var(--out); }
.tx-prog::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 28%; border-radius: inherit; background: var(--black); translate: -100% 0; }
html.tx-press .tx-prog { opacity: 1; transition: opacity .12s ease-out; }
html.tx-press .tx-prog::after { animation: tx-prog 1.1s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes tx-prog { to { translate: 360% 0; } }
@media (prefers-reduced-motion: reduce) { html.tx-press .tx-prog::after { animation: none; translate: none; width: 100%; } }

/* ---------- reduced motion: nothing slides, lifts or springs; state changes are instant or a short fade ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .btn:hover, .tx-layers a:hover, .tx-pages a:hover { translate: none; }
  .tx-menu:hover { scale: none; }
}
