/*
 * Technologies (riveroco.com/technologies) — the engineering side.
 * Needs tokens.css and site.css first; the Mr. RIVERO chat brings its own
 * stylesheet in <head> (mrRiveroChatStyle), so nothing here styles `.mrc`
 * beyond where it sits in the grid.
 *
 * Red on dark is this page's signature, not a theme: the hero and #orchy
 * are `data-tone="dark"`, which is the same near-black in both themes, and
 * only the sections below them follow the light/dark choice. D1 is the
 * layout, D2 the code-editor skin; the Orchy diagram and the Mr. RIVERO HUD
 * land on top of these same hooks.
 *
 * Anything the script drives is gated on `html.rv-tc`, which technologies.js
 * adds and reduced motion never gets: without it every rule below is
 * already in its finished state.
 */

/*
 * The stage, in either theme. site.css already turns --ink-muted and --rule
 * over inside a dark section; these are the two it cannot know about: small
 * red text has to climb to #FF7A7A here (#C2000B is 3.1 on near-black, fills
 * and large text only), and a card lifted off the stage is not the same
 * surface as a card lifted off a light page.
 */
[data-page='technologies'] [data-tone='dark'] {
  --accent-text: var(--rv-red-text-dark);
  --surface: #12151c;
}

[data-page='technologies'] {
  /* Tighter than --section-pad: this page is dense by character. */
  --tc-pad: clamp(72px, 9vw, 124px);
  /* The blueprint grid's cell, shared by the base grid and the lit one so
     the two stay registered to each other. */
  --tc-cell: 56px;
  /* One line of the gutter. */
  --tc-line: 30px;
  /* The tab strip's height, shared with the reveal button that lines up
     with it and with the gutter that has to start below it. */
  --tc-tab-h: 38px;
}

[data-page='technologies'] .eyebrow {
  color: var(--accent-text);
}

/*
 * The syntax palette. Red is the only accent on this page, so the three
 * extra colors here are the ones a code editor cannot do without: comments
 * step back, punctuation sits between them and the ink, and a string is
 * warm. The warm one is only ever used on the stage (the hero's eyebrow and
 * the declaration around the meters) because it does not carry on white —
 * keep it there.
 */
[data-page='technologies'] {
  --tc-syn-comment: #6e7684;
  --tc-syn-op: #8b92a0;
  --tc-syn-string: #d8a371;
}
[data-page='technologies'] [data-tone='dark'] {
  --tc-syn-comment: #7a828f;
  --tc-syn-op: #868d9b;
  --tc-syn-string: #e0ab78;
}
.tc-kw {
  color: var(--accent-text);
}
.tc-id {
  color: var(--ink);
}
[data-tone='dark'] .tc-id {
  color: var(--ink-inverse);
}
.tc-op {
  color: var(--tc-syn-op);
}

/* ---------------------------------------------------------- editor chrome */

/*
 * The tab strip over a dark pane, full bleed like a real one. The active
 * tab is the pane you are reading; the last one carries an editor's unsaved
 * dot, because the agent beside it is the thing still being written.
 */
.tc-tabs {
  position: relative;
  z-index: 2;
  border-bottom: var(--hairline) solid var(--rule);
  background: color-mix(in srgb, var(--tone-dark) 55%, transparent);
}
.tc-tab-row {
  display: flex;
  margin: 0;
  padding: 0 max(var(--gutter), env(safe-area-inset-left, 0px));
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.tc-tab-row::-webkit-scrollbar {
  display: none;
}
.tc-tab {
  flex: 0 0 auto;
  padding: 0 16px;
  font: 500 var(--text-xs) / var(--tc-tab-h) var(--font-mono);
  letter-spacing: var(--tracking-mono);
  white-space: nowrap;
  color: var(--tc-syn-comment);
  border-right: var(--hairline) solid var(--rule);
}
.tc-tab:first-child {
  border-left: var(--hairline) solid var(--rule);
}
.tc-tab.is-on {
  color: var(--ink-inverse);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: inset 0 2px 0 var(--accent);
}
/* The strip sits at the pane's top edge; the hero's own padding already
   clears the floating pill, so the panes below give up their top padding
   to it instead. */
.tc-hero .tc-tabs {
  margin-bottom: clamp(28px, 5vw, 56px);
}
:is(.tc-orchy, .tc-team, .tc-contact) > .tc-tabs {
  margin-bottom: var(--tc-pad);
}
/* A pane's first line starts below its own strip, the way the hero's
   starts below the pill. */
:is(.tc-orchy, .tc-team, .tc-contact) > .tc-gutter {
  top: var(--tc-tab-h);
}
.tc-tab.is-dirty::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  vertical-align: 0.05em;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.7;
}

/*
 * The status bar. Fixed to the viewport and only there while the stage is,
 * which the script's chrome half decides; it never takes a pointer event,
 * so nothing it crosses stops working. The tick is CSS and the Ln / Col
 * digits are rewritten as the page scrolls.
 */
.tc-status {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  height: 26px;
  padding-inline: max(12px, env(safe-area-inset-left, 0px));
  background: #0b0d12;
  border-top: var(--hairline) solid #262c38;
  font: 500 11px / 26px var(--font-mono);
  letter-spacing: var(--tracking-mono);
  color: #b7bdc9;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.tc-status.is-on {
  opacity: 1;
  transform: none;
}
.tc-status-item {
  margin: 0;
  padding-inline: 12px;
  white-space: nowrap;
}
.tc-status-branch::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  vertical-align: 0.05em;
  border: var(--hairline) solid currentColor;
  border-radius: 50%;
}
.tc-status-build {
  border-inline: var(--hairline) solid #262c38;
}
.tc-status-build::before {
  content: '✓';
  margin-right: 6px;
}
.tc-status-pos {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ live build */

/*
 * The surface the build is drawn on (`FEATURES.liveBuild`, live-build.js):
 * one viewport-sized canvas over the page that never takes a pointer event.
 * It only exists while `html.rv-lb` does — every entry to the page, with
 * motion allowed — and the class going away is the whole reveal of the
 * hero. The sections below are reached minutes later, so the hero's class is
 * long gone by then: while any of them is being built the script keeps the
 * canvas up with `rv-lb-run` instead, and drops it between scenes so there
 * is no surface over the page while nothing is being drawn.
 */
.tc-lb {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.rv-lb .tc-lb,
.rv-lb-run .tc-lb {
  display: block;
}

/*
 * What the build is going to draw waits on `opacity` and nothing else: the
 * page's layout is final at the first paint, so a part arriving moves
 * nothing and the build cannot shift the page (CLS 0). (While a component
 * lands, the script also sets an inline transform on it, which paints and
 * never lays out, and removes it after.) Everything here is visible the
 * moment `rv-lb` is dropped, built or not.
 */
.rv-lb .tc-hero .tc-tabs,
.rv-lb .tc-hero .tc-gutter,
.rv-lb .tc-hero-eyebrow,
.rv-lb .tc-hero-title .tc-w,
.rv-lb .tc-hero-lead,
.rv-lb .tc-hero-ctas,
.rv-lb .tc-meters-wrap,
.rv-lb .tc-meter,
.rv-lb .tc-reveal,
.rv-lb .tc-status,
/* The stage starts empty: the footage is part of what gets built, not
   scenery the cursors arrive to. The watermark stays out of this — it
   carries its own near-zero opacity, which a reveal rule would undo. */
.rv-lb .tc-hero-media {
  opacity: 0;
}
.rv-lb .tc-hero .tc-tabs.lb-in,
.rv-lb .tc-hero .tc-gutter.lb-in,
.rv-lb .tc-hero-eyebrow.lb-in,
.rv-lb .tc-hero-title .tc-w.lb-in,
.rv-lb .tc-hero-lead.lb-in,
.rv-lb .tc-hero-ctas.lb-in,
.rv-lb .tc-meters-wrap.lb-in,
.rv-lb .tc-meter.lb-in {
  opacity: 1;
  transition: opacity 200ms var(--ease-out);
}
/* Typed copy is revealed a character at a time by the script, so a fade on
   the whole line would only blur the characters the caret is typing. */
.rv-lb .tc-hero-eyebrow.lb-in,
.rv-lb .tc-hero-lead.lb-in {
  transition: none;
}
/* The one control the build hands over, and the bar, keep their own rules:
   both are only ever visible when the script that owns them says so. */
.rv-lb .tc-hero-media.is-painted ~ .tc-reveal.lb-in {
  opacity: 1;
}
.rv-lb .tc-status.is-on.lb-in {
  opacity: 1;
}
/* The fill pass: the footage comes up under the copy that is already there,
   slower than anything else, because it is the one part that is an image. */
.rv-lb .tc-hero-media.lb-in {
  opacity: 1;
  transition: opacity 420ms var(--ease-out);
}
/* The watermark arrives with the footage, not before it: on the empty stage
   its arc is the only shape in the dark. Visibility, so the near-zero
   opacity it carries is never touched. */
.rv-lb .tc-hero-media:not(.lb-in) ~ .tc-hero-mark {
  visibility: hidden;
}
/* Skip: only while the hero is being built, just above the status bar. Any
   key, scroll or press ends the build too; this is the one that says so. */
.tc-lb-skip {
  display: none;
}
.rv-lb .tc-lb-skip {
  position: fixed;
  left: 50%;
  bottom: calc(26px + 14px + env(safe-area-inset-bottom, 0px));
  z-index: 71;
  display: block;
  padding: 7px 14px;
  font: 500 11px / 1 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(11, 13, 18, 0.78);
  border: var(--hairline) solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  transform: translateX(-50%);
  cursor: pointer;
}
.rv-lb .tc-lb-skip:hover,
.rv-lb .tc-lb-skip:focus-visible {
  border-color: var(--rv-red-text-dark, #ff7a7a);
  color: var(--rv-red-text-dark, #ff7a7a);
}

/* ---------------------------------------------------------- syntax layer */

.tc-code {
  margin: 0;
  font: 500 var(--text-sm) / 1.9 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  color: var(--tc-syn-op);
}
.tc-code-open {
  margin-top: var(--space-2);
}
.tc-code-close {
  margin-top: var(--space-3);
}

/* ------------------------------------------------------ code-editor skin */

/*
 * The blueprint grid, and the same grid a shade brighter masked to a circle
 * the cursor drags around (technologies.js lerps --mx / --my). The light
 * only ever exists with the script and a fine pointer: everyone else gets
 * the base grid, which is the part that does the work.
 */
.tc-blueprint {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      to right,
      color-mix(in srgb, currentColor 8%, transparent) var(--hairline),
      transparent var(--hairline)
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, currentColor 8%, transparent) var(--hairline),
      transparent var(--hairline)
    );
  background-size: var(--tc-cell) var(--tc-cell);
  background-position: center top;
}
.tc-blueprint-spot {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    linear-gradient(
      to right,
      color-mix(in srgb, currentColor 46%, transparent) var(--hairline),
      transparent var(--hairline)
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, currentColor 46%, transparent) var(--hairline),
      transparent var(--hairline)
    ),
    radial-gradient(
      circle 240px at var(--mx, 50%) var(--my, 20%),
      color-mix(in srgb, var(--accent) 24%, transparent),
      transparent 70%
    );
  background-size:
    var(--tc-cell) var(--tc-cell),
    var(--tc-cell) var(--tc-cell),
    100% 100%;
  background-position:
    center top,
    center top,
    0 0;
  mask-image: radial-gradient(
    circle 290px at var(--mx, 50%) var(--my, 20%),
    #000 0%,
    #000 30%,
    color-mix(in srgb, #000 45%, transparent) 62%,
    transparent 84%
  );
  transition: opacity var(--dur-slow) var(--ease-out);
}
.rv-tc .tc-blueprint.is-lit .tc-blueprint-spot {
  opacity: 1;
}

/*
 * The line-number gutter. The numbers are a CSS counter on empty elements,
 * so no digit is ever in the markup — a column of them would land in the
 * copy guard as new text on every section it decorates.
 *
 * It lives in the margin outside `.wrap`, which is why it only appears once
 * the page is wide enough to have one (below that it would sit on the copy).
 */
.tc-gutter {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: calc(max((100% - var(--wrap)) / 2, 0px) + var(--gutter));
  padding-right: 12px;
  overflow: hidden;
  counter-reset: tc-line;
  border-right: var(--hairline) solid
    color-mix(in srgb, currentColor 10%, transparent);
  font: 500 11px / var(--tc-line) var(--font-mono);
  letter-spacing: var(--tracking-mono);
  text-align: right;
  color: color-mix(in srgb, currentColor 34%, transparent);
  pointer-events: none;
}
.tc-gutter i {
  display: block;
  height: var(--tc-line);
  counter-increment: tc-line;
  font-style: normal;
}
.tc-gutter i::before {
  content: counter(tc-line, decimal-leading-zero);
}
/*
 * The reading line. The script moves `.is-on` down the column as you
 * scroll, so one number is lit and the rest have stepped back — the same
 * read as a cursor sitting in a file.
 */
.rv-tc .tc-gutter i {
  color: color-mix(in srgb, currentColor 55%, transparent);
  transition: color var(--dur-fast) linear;
}
.rv-tc .tc-gutter i.is-on {
  position: relative;
  color: var(--accent-text);
}
.rv-tc .tc-gutter i.is-on::after {
  content: '';
  position: absolute;
  inset: 0 -12px 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-right: 2px solid var(--accent);
}
/* The hero's first line starts under the pill, not behind it. */
.tc-hero .tc-gutter {
  top: clamp(96px, 13vh, 132px);
}
@media (min-width: 1100px) {
  .tc-gutter {
    display: block;
  }
}

/*
 * The ambient log: a faint column of events down the right of a dark pane,
 * behind the copy, faded out at its top, its foot and its inner edge. It
 * scrolls up only with `html.rv-tc` and only while it is on screen
 * (`.is-live`); technologies.js clones the lines until the column is full
 * and sets how far one copy is (`--tc-log-shift`) and how long it takes
 * (`--tc-log-dur`), so the loop is seamless at one speed. One transform.
 *
 * Dark panes only: Orchy always, the team and contact in the dark theme
 * (on the light theme's red they are not dark, and it goes). Off below
 * 860px, where it would sit under the copy.
 */
.tc-log {
  display: none;
  position: absolute;
  top: var(--tc-tab-h);
  right: 0;
  bottom: 0;
  z-index: 0;
  width: min(38%, 480px);
  padding-right: var(--gutter);
  overflow: hidden;
  font: 500 11px / 22px var(--font-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink-inverse);
  opacity: 0.32;
  pointer-events: none;
  mask-image:
    linear-gradient(to right, transparent, #000 45%),
    linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-composite: intersect;
}
.tc-log-track {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tc-log-time {
  color: var(--tc-syn-comment);
}
.tc-log-lvl {
  color: var(--accent-text);
}
.tc-log-debug {
  color: var(--tc-syn-op);
}
.tc-log-msg {
  color: var(--tc-syn-op);
}
.rv-tc .tc-log-track {
  animation: tc-log var(--tc-log-dur, 40s) linear infinite paused;
}
.tc-log.is-live .tc-log-track {
  animation-play-state: running;
  will-change: transform;
}
@keyframes tc-log {
  to {
    transform: translateY(calc(-1 * var(--tc-log-shift, 0px)));
  }
}
@media (min-width: 860px) {
  .tc-log {
    display: block;
  }
  [data-theme='light'] [data-page='technologies'] :is(#team, #contact) .tc-log {
    display: none;
  }
}

/*
 * A comment-style label (`// orchy.modules`). The slashes are CSS, the way
 * Home's eyebrow slash is: decoration, not copy. The caret after it is the
 * only thing on the page that moves on its own, and reduced motion stops it.
 */
.tc-label {
  margin: 0 0 var(--space-4);
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  color: var(--ink-muted);
}
.tc-label::before {
  content: '// ';
  color: var(--accent-text);
}
.tc-label::after {
  content: '';
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 0.45em;
  vertical-align: -0.15em;
  background: var(--accent-text);
  animation: tc-caret 1.1s steps(1) infinite;
}
@keyframes tc-caret {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/*
 * The red full stop that ends every headline on this page keeps a slow
 * pulse, like something still running. It stays an inline box and pulses
 * what an inline box can — its own light — because giving it a block of its
 * own would put a space before it in the heading's accessible name.
 */
[data-page='technologies'] .accent-dot {
  animation: tc-dot 3.6s var(--ease-in-out) infinite;
}
@keyframes tc-dot {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
  }
  50% {
    opacity: 0.6;
    text-shadow: 0 0 0 transparent;
  }
}

/*
 * A headline that decodes in. Every word is its own box so a line of random
 * glyphs cannot rewrap the headline: while it is scrambling, the box is
 * pinned to the width the real word already measured (--tc-w, set by
 * technologies.js) and anything wider is clipped.
 */
.tc-w {
  display: inline-block;
}
.tc-w.is-scrambling {
  width: var(--tc-w);
  overflow: hidden;
  white-space: nowrap;
  color: var(--accent-text);
}
/* Nobody should be able to select a word mid-scramble. */
[data-decode].is-decoding {
  user-select: none;
}

/* The symbol, as a watermark. Always decorative, never in the way. */
[data-page='technologies'] .rv-mark {
  width: 100%;
  height: auto;
  color: currentColor;
}
.tc-hero-mark,
.tc-orchy-mark,
.tc-contact-mark {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0.05;
}
/* Quieter than the other two: it shares the right half with the glyphs,
   and two watermarks over each other read as neither. */
.tc-hero-mark {
  top: 20px;
  right: -60px;
  width: 640px;
  opacity: 0.022;
}
.tc-orchy-mark {
  top: 60px;
  left: -140px;
  width: 560px;
  opacity: 0.04;
}
.tc-contact-mark {
  top: -120px;
  left: calc(50% + 180px);
  width: 520px;
}

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

.tc-hero {
  position: relative;
  overflow: hidden;
  /* The pill floats over this screen (HEADER.technologies.overlay), so the
     footage runs under it and the copy starts below it. */
  padding: clamp(96px, 13vh, 132px) 0 0;
}
.tc-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/*
 * The footage. Three states live in this block:
 *
 * 1. nothing has run — the video element shows its poster behind the scrim,
 *    which is what a visitor with no JS, a phone on a metered connection or
 *    a failed canvas gets.
 * 2. `.is-painted` — technologies.js has drawn the first frame of glyphs, so
 *    the photograph steps out and the canvas takes the stage.
 * 3. `.is-real` — the visitor pressed the button, so the video itself plays.
 */
.tc-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity var(--dur-slow) var(--ease-out);
}
/*
 * The readout keeps to the right half and fades out before the copy, so the
 * characters can be bright enough to read as an aisle without the headline
 * and the lead having to fight them.
 */
.tc-hero-ascii {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 30%,
    color-mix(in srgb, #000 55%, transparent) 50%,
    #000 72%
  );
  transition: opacity var(--dur-slow) var(--ease-out);
}
.tc-hero-media.is-painted .tc-hero-video {
  opacity: 0;
}
.tc-hero-media.is-painted .tc-hero-ascii {
  opacity: 1;
}
.tc-hero-media.is-real .tc-hero-video {
  opacity: 0.85;
}
.tc-hero-media.is-real .tc-hero-ascii {
  opacity: 0;
}
.tc-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tone-dark) 70%, transparent) 0%,
    color-mix(in srgb, var(--tone-dark) 85%, transparent) 60%,
    var(--tone-dark) 100%
  );
}
/*
 * Glyphs take a thinner veil than a photograph at the top, where they are
 * the only thing on the screen, and the full one from the lead paragraph
 * down, where they are behind running text. The footage the visitor asked
 * for gets the same thin veil, or the reveal would land on a murky frame.
 */
.tc-hero-media.is-painted .tc-hero-scrim {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tone-dark) 22%, transparent) 0%,
    color-mix(in srgb, var(--tone-dark) 42%, transparent) 34%,
    color-mix(in srgb, var(--tone-dark) 80%, transparent) 64%,
    var(--tone-dark) 100%
  );
}

/*
 * The one piece of chrome a visitor is meant to act on. It lines up with
 * the tab strip's right end — part of the strip to look at, outside it in
 * the markup, because an `aria-hidden` row is no place for a button. It
 * appears only once there are glyphs to trade for the video.
 */
.tc-reveal {
  position: absolute;
  top: clamp(96px, 13vh, 132px);
  right: 0;
  z-index: 3;
  display: none;
  padding: 0 max(var(--gutter), 16px) 0 16px;
  font: 500 var(--text-xs) / var(--tc-tab-h) var(--font-mono);
  letter-spacing: var(--tracking-mono);
  color: var(--ink-inverse);
  background: color-mix(in srgb, var(--tone-dark) 55%, transparent);
  border: 0;
  border-bottom: var(--hairline) solid var(--rule);
  border-left: var(--hairline) solid var(--rule);
  cursor: pointer;
  transition:
    color var(--dur-fast) linear,
    background var(--dur-fast) linear;
}
.tc-hero-media.is-painted ~ .tc-reveal {
  display: block;
}
.tc-hero-media.is-real ~ .tc-reveal {
  display: none;
}
.tc-reveal:hover,
.tc-reveal:focus-visible {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--tone-dark) 85%, transparent);
}
.tc-hero-body,
.tc-hero ~ * {
  position: relative;
}
.tc-hero .wrap {
  position: relative;
  z-index: 1;
}
/*
 * The address reads as what it is in a file: a string. Quotes are CSS, and
 * `.eyebrow` upper-cases by default, which a lowercase URL should not be.
 */
.tc-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: none;
  color: var(--tc-syn-string);
}
.tc-hero-eyebrow::before,
.tc-hero-eyebrow::after {
  content: "'";
  color: var(--tc-syn-op);
}
/* Two balanced lines at every desktop size: "The Software That / Moves Excess
   Inventory." The measure is in em, so it grows with the type, and it is wide
   enough for either break ("The Software That Moves" is about 11.4em at 700);
   `balance` then takes the narrowest two-line setting, which is the one with
   "Moves" on the second line. Spanish balances to "El software que mueve / el
   inventario excedente." The leading is 1.04, not the display token's 0.92:
   at 0.92 the descender of "Inventory" touched the ascenders under it. */
.tc-hero-title {
  max-width: 12em;
  text-wrap: balance;
  margin-top: var(--space-5);
  font-size: var(--display-lg);
  line-height: 1.04;
  font-weight: 700;
}
.tc-hero-lead {
  max-width: 680px;
  margin: var(--space-6) 0 0;
  font-size: var(--text-lg);
  color: var(--ink-muted);
}
.tc-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

/*
 * The four numbers, read as the system's own meters: the figure, the shape
 * it has been holding, and the sentence. The sparkline is decoration (see
 * hero.mjs) — the claim is the number, and the line never says anything the
 * number doesn't.
 */
.tc-meters-wrap {
  margin-top: clamp(40px, 6vw, 64px);
}
.tc-meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--hairline) solid var(--rule);
  border-bottom: var(--hairline) solid var(--rule);
}
.tc-meter {
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-5) var(--space-6) var(--space-5);
  border-left: var(--hairline) solid var(--rule);
}
.tc-meter:first-child {
  padding-left: 0;
  border-left: 0;
}
.tc-meter-value {
  /* Flex so the figure and its unit keep one exact space between them,
     whatever the count-up does to the figure's own box mid-animation. */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.22em;
  margin: 0;
  font: 600 clamp(32px, 3.4vw, 46px) / 1 var(--font-display);
  letter-spacing: var(--tracking-display);
}
.tc-meter-value small {
  font-size: inherit;
}
.tc-meter-body {
  margin: var(--space-4) 0 0;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* The sparkline, and the marker sitting at the end of it. */
.tc-spark {
  position: relative;
  display: block;
  height: 30px;
  margin-top: var(--space-4);
  color: var(--accent-text);
}
.tc-spark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.tc-spark-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s var(--ease-out)
    calc(var(--i, 0) * var(--stagger-step));
}
.rv-tc .tc-spark-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.rv-tc .tc-spark.is-in .tc-spark-line {
  stroke-dashoffset: 0;
}
.tc-spark-dot {
  position: absolute;
  right: 0;
  bottom: calc(var(--tc-end, 0) * (100% - 6px));
  width: 6px;
  height: 6px;
  background: currentColor;
}
.tc-spark-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: var(--hairline) solid currentColor;
  animation: tc-ping 2.6s var(--ease-out) infinite;
}
@keyframes tc-ping {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }
  70%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
.rv-tc .tc-spark-dot {
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.rv-tc .tc-spark.is-in .tc-spark-dot {
  opacity: 1;
  transition-delay: 0.9s;
}

/* --------------------------------------------------------------- orchy */

/* No top padding: the tab strip takes the pane's top edge and carries the
   spacing itself (see `.tc-orchy .tc-tabs`). */
.tc-orchy {
  position: relative;
  overflow: hidden;
  padding: 0 0 var(--tc-pad);
}
.tc-orchy .wrap {
  position: relative;
  z-index: 1;
}
.tc-orchy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(32px, 4vw, 48px);
  align-items: start;
}
.tc-orchy-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.tc-orchy-eyebrow img {
  width: 64px;
  height: 64px;
}
.tc-orchy-title {
  margin-top: var(--space-5);
  font-size: var(--display-md);
  line-height: 1;
  font-weight: 700;
}
/* The line that says what this is: the internal tool, not a public
   assistant. One line, on the stage's own inks. */
.tc-orchy-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm, 14px);
  line-height: 1.45;
  /* The stage stays near-black in both themes, so this is the stage's white,
     not --ink (near-black in the light theme: 1:1 on the stage). */
  color: var(--ink-inverse);
}
/* The three internal use cases, as one row of tabs over the demo; stacked
   on a phone, where three abreast would wrap every title. */
.tc-cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-6);
}
@media (max-width: 560px) {
  .tc-cases {
    grid-template-columns: 1fr;
  }
}
.tc-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-7) 0 0;
  padding: var(--space-6) 0 0;
  list-style: none;
  border-top: var(--hairline) solid var(--rule);
}
.tc-step-num {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--accent-text);
}
.tc-step-body {
  margin: var(--space-1) 0 0;
  line-height: 1.45;
}

/*
 * The six modules as a living system (D3). Phones get the light version: the
 * cards in one column on a rail, with one packet running down it. From 900px
 * the cards stand on a hexagon around the core, wired to each other in the
 * order of the flow and to the core by spokes, with packets travelling both
 * (CSS `offset-path` on SVG groups, so the paths scale with the viewBox).
 *
 * A node lights on hover, keyboard focus or a tap (`.is-on`, set by
 * technologies.js) and so do its wires; at wide screens with a hover its
 * description shows as a readout under it. Lighting is colour only: the
 * stagger reveal holds each card's opacity and transform, so neither can be
 * used for state here.
 *
 * Everything that moves needs `html.rv-tc` and runs only while
 * `.tc-sys.is-live` (on screen). Without them — reduced motion, no JS — the
 * wires are drawn, the packets are not there, and nothing moves.
 */
.tc-sys {
  position: relative;
  margin: clamp(40px, 5vw, 56px) 0 0;
}
.tc-mods {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0 0 0 36px;
  list-style: none;
  counter-reset: tc-mod;
}
.tc-mod {
  position: relative;
  padding: var(--space-4) var(--space-5);
  background: color-mix(in srgb, var(--tone-dark) 82%, transparent);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--radius-sm);
  counter-increment: tc-mod;
  cursor: default;
  transition:
    background-color var(--dur-base),
    border-color var(--dur-base),
    box-shadow var(--dur-base);
}
/* The node's index, from a CSS counter so no digit enters the markup; the
   second declaration hides it from assistive tech where `/ ''` is known. */
.tc-mod::after {
  content: counter(tc-mod, decimal-leading-zero);
  content: counter(tc-mod, decimal-leading-zero) / '';
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  color: var(--tc-syn-comment);
}
/* The port where the line comes into the node (phones only). */
.tc-mod::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border: 2px solid var(--rule);
  border-radius: 50%;
  background: var(--tone-dark);
  transition: border-color var(--dur-base);
}
.tc-mod:is(:hover, :focus-visible, .is-on) {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent-text) 70%, transparent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent),
    0 18px 40px -18px color-mix(in srgb, var(--accent) 70%, transparent);
}
.tc-mod:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.tc-mod:is(:hover, :focus-visible, .is-on)::before {
  border-color: var(--accent-text);
}
.tc-mod-eyebrow {
  margin: 0;
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-inverse-muted);
}
/* The node's status light. */
.tc-mod-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--accent-text);
}
.tc-mod-name {
  margin: var(--space-2) 0 0;
  font-weight: 700;
  transition: color var(--dur-base);
}
/* The app that runs the step, under its name: always on, small and mono. */
.tc-mod-app {
  margin: 2px 0 0;
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--accent-text);
}
.tc-mod-body {
  margin: var(--space-1) 0 0;
  font-size: 15px;
  color: var(--ink-muted);
}
/* With one node lit, the rest step back. */
.tc-sys:has(.tc-mod:is(:hover, :focus-visible, .is-on))
  .tc-mod:not(:hover, :focus-visible, .is-on)
  .tc-mod-name {
  color: var(--ink-muted);
}

/* The rail: the phone's line, from the core's centre down to the last
   module, under the cards. Each packet is a dot with a tail of light at the
   foot of a full-height strip that slides down the line, so it is one
   transform; the rail is wider than the line it draws so the dots fit. */
.tc-sys-rail {
  position: absolute;
  top: calc(clamp(92px, 10vw, 124px) / 2);
  bottom: 40px;
  left: 50%;
  width: 14px;
  margin-left: -7px;
  overflow: hidden;
  background: linear-gradient(var(--rule), var(--rule)) center / 2px 100%
    no-repeat;
}
.tc-sys-rail i {
  position: absolute;
  inset: 0;
  display: none;
  transform: translateY(-100%);
}
.tc-sys-rail i::before,
.tc-sys-rail i::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
}
.tc-sys-rail i::before {
  height: 56px;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(transparent, var(--accent-text));
}
.tc-sys-rail i::after {
  width: 8px;
  height: 8px;
  margin: 0 0 -4px -4px;
  border-radius: 50%;
  background: var(--accent-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 22%, transparent);
}
.rv-tc .tc-sys-rail i {
  display: block;
  animation: tc-rail 4.8s linear infinite paused;
}
.rv-tc .tc-sys-rail i:nth-child(2) {
  animation-delay: -1.6s;
}
.rv-tc .tc-sys-rail i:nth-child(3) {
  animation-delay: -3.2s;
}
.tc-sys.is-live .tc-sys-rail i {
  will-change: transform;
}

/* The wide screen's parts, off until the diagram has room. */
.tc-sys-wires,
.tc-sys-core {
  display: none;
}
.tc-wire {
  fill: none;
  stroke: color-mix(in srgb, var(--ink-inverse) 22%, transparent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: stroke var(--dur-base);
}
.tc-spoke {
  stroke: color-mix(in srgb, var(--ink-inverse) 10%, transparent);
  stroke-width: 1;
}
/* The wires draw themselves in once (technologies.js adds `.is-in`; the
   live build restarts it when it lands them). The draw is on the `.is-in`
   state only, so taking the class away empties the wires at once and the
   restart draws them from nothing. */
.rv-tc .tc-wire {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.rv-tc .tc-sys-wires.is-in .tc-wire {
  stroke-dashoffset: 0;
  transition:
    stroke-dashoffset 1.1s var(--ease-out) calc(var(--i, 0) * 90ms),
    stroke var(--dur-base);
}
.rv-tc .tc-sys-wires.is-in .tc-spoke {
  transition-delay: calc(500ms + var(--i, 0) * 70ms), 0s;
}
/* A lit node lights every wire it is on. */
.tc-sys:has([data-key='lot']:is(:hover, :focus-visible, .is-on))
  [data-n~='lot'],
.tc-sys:has([data-key='receive']:is(:hover, :focus-visible, .is-on))
  [data-n~='receive'],
.tc-sys:has([data-key='catalog']:is(:hover, :focus-visible, .is-on))
  [data-n~='catalog'],
.tc-sys:has([data-key='warehouse']:is(:hover, :focus-visible, .is-on))
  [data-n~='warehouse'],
.tc-sys:has([data-key='price']:is(:hover, :focus-visible, .is-on))
  [data-n~='price'],
.tc-sys:has([data-key='sell']:is(:hover, :focus-visible, .is-on))
  [data-n~='sell'],
.tc-sys:has([data-key='ship']:is(:hover, :focus-visible, .is-on))
  [data-n~='ship'] {
  stroke: var(--accent-text);
}

/* The packets: a dot in a halo, riding its wire. Never shown without the
   script (they would all sit at the origin) or where `offset-path` is not
   known. Ring packets keep one speed round the flow and slip under the
   cards they pass; spoke packets go in to the core or out of it, fading at
   both ends. */
.tc-pk {
  display: none;
  offset-rotate: 0deg;
}
.tc-pk-halo {
  fill: color-mix(in srgb, var(--accent-text) 22%, transparent);
}
.tc-pk-dot {
  fill: var(--accent-text);
}
.tc-pk-spoke .tc-pk-halo {
  fill: color-mix(in srgb, var(--ink-inverse) 14%, transparent);
}
.tc-pk-spoke .tc-pk-dot {
  fill: var(--ink-inverse);
}
@supports (offset-path: path('M0 0 H1')) {
  .rv-tc .tc-pk {
    display: inline;
    animation: tc-pk-ring 10s linear var(--d, 0s) infinite paused;
  }
  .rv-tc .tc-pk-spoke {
    animation: tc-pk-spoke 2.8s var(--ease-in-out, ease-in-out) var(--d, 0s)
      infinite paused;
  }
  .rv-tc .tc-pk-out {
    animation-direction: reverse;
  }
}

/* The core: the one record every module writes to. */
.tc-sys-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: clamp(92px, 10vw, 124px);
  aspect-ratio: 1;
  place-items: center;
  translate: -50% -50%;
  color: var(--accent);
  background: var(--tone-dark);
  border: var(--hairline) solid
    color-mix(in srgb, var(--accent-text) 55%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--accent) 8%, transparent),
    0 0 64px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.tc-sys-core .tc-sys-mark {
  position: relative;
  width: 44%;
  height: auto;
}
.tc-sys-orbit,
.tc-sys-pulse {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.tc-sys-orbit {
  inset: -14px;
  border: var(--hairline) dashed
    color-mix(in srgb, var(--accent-text) 45%, transparent);
}
.tc-sys-pulse {
  inset: 0;
  border: var(--hairline) solid var(--accent-text);
  opacity: 0;
}
.rv-tc .tc-sys-orbit {
  animation: tc-orbit 28s linear infinite paused;
}
.rv-tc .tc-sys-pulse {
  animation: tc-pulse 2.8s var(--ease-out) infinite paused;
}
.rv-tc .tc-sys .tc-mod-eyebrow::before {
  animation: tc-led 2.4s steps(1) calc(var(--i, 0) * -0.4s) infinite paused;
}
.tc-sys.is-live :is(.tc-pk, .tc-sys-orbit, .tc-sys-pulse, .tc-sys-rail i),
.tc-sys.is-live .tc-mod-eyebrow::before {
  animation-play-state: running;
}

@keyframes tc-rail {
  to {
    transform: translateY(0);
  }
}
@keyframes tc-pk-ring {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}
@keyframes tc-pk-spoke {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  18%,
  82% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}
@keyframes tc-orbit {
  to {
    rotate: 1turn;
  }
}
@keyframes tc-pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}
@keyframes tc-led {
  0%,
  84% {
    opacity: 1;
  }
  88%,
  94% {
    opacity: 0.25;
  }
}

@media (min-width: 900px) {
  .tc-sys {
    aspect-ratio: 1000 / 480;
    /* Room for the bottom row's readouts, which hang under their cards. */
    margin-bottom: var(--space-7);
  }
  .tc-sys-rail {
    display: none;
  }
  .tc-sys-wires {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
  }
  .tc-sys-core {
    display: grid;
  }
  .tc-mods {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      '. catalog . warehouse .'
      'receive . . . price'
      'lot ship . sell .';
    gap: 0;
    padding: 0;
    pointer-events: none;
  }
  .tc-mod {
    place-self: center;
    width: min(calc(100% - 16px), 212px);
    background: var(--tone-dark);
    pointer-events: auto;
  }
  .tc-mod::before {
    display: none;
  }
  .tc-mod-body {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0;
    padding: var(--space-2) var(--space-3);
    font: 400 13px / 1.45 var(--font-mono);
    color: var(--ink-inverse);
    background: var(--surface);
    border-left: 2px solid var(--accent-text);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out);
  }
  .tc-mod-body::before {
    content: '> ';
    content: '> ' / '';
    color: var(--accent-text);
  }
  .tc-mod:is(:hover, :focus-visible, .is-on) .tc-mod-body {
    opacity: 1;
    transform: none;
  }
}
/* No hover to find them with: every readout is out. */
@media (min-width: 900px) and (hover: none) {
  .tc-mod-body {
    opacity: 1;
    transform: none;
  }
}
/*
 * Phone and small tablet: a pipeline. The core sits on top as Orchy's hub,
 * the six modules stack under it on the rail in the order of the flow, and
 * the packets run down it. With technologies.js (`.is-tap`, reduced motion
 * included) a node shows only its name until it is tapped or focused, and
 * the description it already carries opens under it; without the script
 * every description stays open.
 */
@media (max-width: 899px) {
  .tc-sys {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
  }
  .tc-sys-core {
    position: relative;
    top: auto;
    left: auto;
    display: grid;
    flex: none;
    translate: none;
  }
  .tc-mods {
    position: relative;
    z-index: 1;
    align-items: center;
    gap: var(--space-5);
    width: 100%;
    padding: 0;
  }
  .tc-mod {
    width: min(100%, 340px);
    text-align: center;
    background: var(--tone-dark);
    transition:
      background-color var(--dur-base),
      border-color var(--dur-base);
  }
  .tc-sys.is-tap .tc-mod {
    cursor: pointer;
  }
  .tc-sys.is-tap .tc-mod:not(:focus-visible, .is-on) .tc-mod-body {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 899px) and (hover: hover) {
  .tc-sys.is-tap .tc-mod:hover .tc-mod-body {
    position: static;
    width: auto;
    height: auto;
    margin: var(--space-1) 0 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .tc-sys.is-tap .tc-mod.is-on .tc-mod-body {
    animation: tc-mod-open 280ms var(--ease-out) both;
  }
}
@keyframes tc-mod-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------------------------------------------------------------- team */

/* No top padding: the tab strip takes the pane's top edge, as on Orchy. */
.tc-team {
  position: relative;
  overflow: hidden;
  padding: 0 0 var(--tc-pad);
}
.tc-team .wrap {
  position: relative;
  z-index: 1;
}
/* The only centred section on the page, label included. */
.tc-team .tc-label {
  text-align: center;
}
.tc-team-title {
  font-size: var(--display-sm);
  line-height: 1.05;
  text-align: center;
}
.tc-team-lead {
  max-width: 620px;
  margin: var(--space-4) auto 0;
  font-size: var(--text-lg);
  color: var(--ink-muted);
  text-align: center;
}
.tc-people {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 24px);
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}
/* Five across from 1280px (a card then holds the longest title at 11px);
   three from 768px, the last row centred on a six-column grid; two from
   520px; one below it, 360px at most. */
@media (min-width: 768px) and (max-width: 1279px) {
  .tc-people {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .tc-people > li {
    grid-column: span 2;
  }
  .tc-people > li:nth-last-child(2):nth-child(3n + 1) {
    grid-column: 2 / span 2;
  }
  .tc-people > li:last-child:nth-child(3n + 2) {
    grid-column: 4 / span 2;
  }
  .tc-people > li:last-child:nth-child(3n + 1) {
    grid-column: 3 / span 2;
  }
}
@media (min-width: 520px) and (max-width: 767px) {
  .tc-people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* A card left alone on the last row sits in the middle, at one column's
     width, not on the left. */
  .tc-people > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - clamp(16px, 2vw, 24px)) / 2);
  }
}
@media (max-width: 519px) {
  .tc-people {
    grid-template-columns: minmax(0, 360px);
    justify-content: center;
  }
}
/*
 * A contributor profile: the portrait, the name, the role as a line of code
 * and a contribution grid along the foot. Left-aligned like a profile card,
 * the grid pinned to the bottom so the five line up whatever the role's
 * length. The portrait keeps its grey-until-hover and its ring.
 */
.tc-dev {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* The card is its own size container: the name and the title size
     themselves to its content width (cqi), so each stays on one line. The
     sides are 16px, the room the longest Spanish title needs at 11px in a
     five-up row. */
  container-type: inline-size;
  padding: var(--space-5) var(--space-4);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--card-radius);
  transition: border-color var(--dur-base);
}
.tc-dev:hover {
  border-color: color-mix(in srgb, var(--accent-text) 60%, transparent);
}
.tc-dev-figure {
  position: relative;
  display: block;
  width: min(100%, 112px);
}
.tc-dev-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--accent);
  filter: grayscale(1);
  transition: filter var(--dur-slow);
}
/* Same reason as home.css: the fallback wipe's transition would otherwise
   replace this one and the hover would stop working. */
.rv-io .tc-dev-photo {
  transition:
    filter var(--dur-slow),
    transform 1.4s var(--ease-out) calc(var(--i, 0) * var(--stagger-step));
}
.tc-dev:hover .tc-dev-photo {
  filter: none;
}
.tc-dev-name {
  margin: var(--space-4) 0 var(--space-2);
  font: 500 clamp(15px, calc(100cqi / 9.4), 21px) / 1.15 var(--font-display);
  white-space: nowrap;
}
/* The title alone, in the mono face and the accent color. */
.tc-dev-role {
  margin: 0;
  /* One line, whatever the title: Plex Mono advances 0.6em a character, so
     the longest title (28 characters, ES) fits at 100cqi / 17, never under
     11px, never over 13px. */
  font: 500 clamp(11px, calc(100cqi / 17), 13px) / 1.5 var(--font-mono);
  white-space: nowrap;
  color: var(--accent-text);
}
.tc-dev-grid {
  display: block;
  align-self: stretch;
  width: 100%;
  height: auto;
  margin-top: auto;
  padding-top: var(--space-5);
}
.tc-dev-grid .l0 {
  fill: color-mix(in srgb, currentColor 9%, transparent);
}
.tc-dev-grid :is(.l1, .l2, .l3, .l4) {
  fill: var(--accent-text);
}
.tc-dev-grid .l1 {
  fill-opacity: 0.28;
}
.tc-dev-grid .l2 {
  fill-opacity: 0.5;
}
.tc-dev-grid .l3 {
  fill-opacity: 0.75;
}
/* The weeks fill in left to right as the card arrives. The fill is on the
   `.is-in` state only, so the live build's restart empties the grid at
   once and fills it again. */
.rv-tc .tc-dev-grid g {
  opacity: 0;
}
.rv-tc .tc-dev-grid.is-in g {
  opacity: 1;
  transition: opacity 240ms var(--ease-out) calc(var(--c, 0) * 28ms);
}

/* ---------------------------------------------------------- open build */

.tc-ob {
  position: relative;
  overflow: hidden;
  padding: var(--tc-pad) 0;
  border-top: var(--hairline) solid var(--rule);
}
.tc-ob-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: var(--space-6) clamp(32px, 4vw, 64px);
  align-items: end;
}
.tc-ob-headline {
  margin-top: var(--space-4);
  font-size: var(--display-md);
  line-height: 0.96;
  font-weight: 700;
}
.tc-ob-lead {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--ink-muted);
}
.tc-ob-clone {
  margin: var(--space-5) 0 0;
  padding: 14px 16px;
  background: var(--surface);
  border: var(--hairline) solid var(--rule);
  font: 500 var(--text-sm) / 1.4 var(--font-mono);
  color: var(--ink-muted);
  overflow-x: auto;
  white-space: nowrap;
}
.tc-ob-clone span {
  color: var(--ink-muted);
  opacity: 0.7;
}
.tc-ob-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: clamp(36px, 5vw, 56px);
}
.tc-ob-filter {
  min-height: 44px;
  padding: 10px 16px;
  background: transparent;
  color: var(--ink-muted);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--btn-radius);
  font: inherit;
  cursor: pointer;
  transition:
    color var(--dur-base),
    border-color var(--dur-base);
}
.tc-ob-filter:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}
.tc-ob-filter.is-on {
  background: var(--ink);
  color: var(--tone-light);
  border-color: var(--ink);
  font-weight: 600;
}
.tc-ob-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.tc-ob-list {
  display: flex;
  flex-direction: column;
  border: var(--hairline) solid var(--rule);
  border-radius: var(--card-radius);
  overflow: clip;
}
.tc-ob-head,
.tc-ob-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 90px;
  gap: var(--space-3);
  align-items: center;
  text-align: left;
}
.tc-ob-head {
  padding: 12px 18px;
  border-bottom: var(--hairline) solid var(--rule);
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.tc-ob-head span:last-child {
  text-align: right;
}
.tc-ob-row {
  width: 100%;
  min-height: 56px;
  padding: 18px;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: var(--hairline) solid var(--rule);
  font: inherit;
  cursor: pointer;
}
.tc-ob-row:last-child {
  border-bottom: 0;
}
.tc-ob-row.is-open {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tc-ob-id {
  font: 500 13px/1.4 var(--font-mono);
  color: var(--accent-text);
}
.tc-ob-name {
  font-weight: 600;
}
.tc-ob-level {
  font: 500 13px/1.4 var(--font-mono);
  color: var(--ink-muted);
  text-align: right;
}
.tc-ob-detail {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  background: var(--surface);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--card-radius);
}
.tc-ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.tc-chip {
  padding: 6px 10px;
  border: var(--hairline) solid var(--rule);
  border-radius: var(--btn-radius);
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  color: var(--ink-muted);
}
.tc-chip.is-status {
  color: #1f7a3d;
  border-color: #a9d8ba;
}
[data-theme='dark'] .tc-chip.is-status {
  color: #6bd18a;
  border-color: #24543a;
}
.tc-ob-title {
  margin: var(--space-4) 0 0;
  font-size: var(--text-xl);
}
.tc-ob-body,
.tc-ob-done,
.tc-ob-stack {
  margin: var(--space-3) 0 0;
  line-height: 1.6;
}
.tc-ob-body {
  color: var(--ink-muted);
}
.tc-ob-label {
  margin: var(--space-6) 0 0;
  color: var(--ink-muted);
}
.tc-ob-stack {
  font: 500 var(--text-sm) / 1.6 var(--font-mono);
  color: var(--ink-muted);
}
.tc-ob-take {
  margin-top: auto;
  padding-top: var(--space-6);
  align-self: flex-start;
  font-weight: 600;
  text-decoration: none;
}
.tc-ob-take:hover {
  color: var(--accent-text);
}
.tc-ob-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: clamp(36px, 5vw, 48px) 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--hairline) solid var(--rule);
}
.tc-ob-steps > li {
  padding: var(--space-5) var(--space-5) 0 0;
}
.tc-ob-step-num {
  margin: 0;
  font: 500 var(--text-sm) / 1.4 var(--font-mono);
  color: var(--accent-text);
}
.tc-ob-step-title {
  margin: var(--space-3) 0 0;
  font-size: 18px;
  font-weight: 700;
}
.tc-ob-step-body {
  margin: var(--space-2) 0 0;
  color: var(--ink-muted);
  line-height: 1.5;
}
.tc-ob-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5) var(--space-5);
  margin-top: clamp(36px, 5vw, 48px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--card-radius);
  background: var(--accent);
  color: var(--accent-ink);
}
.tc-ob-form-top,
.tc-ob-form-foot {
  grid-column: 1 / -1;
}
.tc-ob-form-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: baseline;
}
.tc-ob-form-title {
  margin: 0;
  font-size: var(--display-sm);
}
.tc-ob-form-note {
  margin: 0;
  color: var(--accent-tint);
}
.tc-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}
.tc-field label {
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--accent-tint);
}
.tc-field input,
.tc-field select {
  min-height: 48px;
  padding: 14px;
  background: #ffffff;
  color: #0b0d12;
  border: 0;
  border-radius: var(--btn-radius);
  font: inherit;
}
.tc-ob-submit {
  background: #0b0d12;
  color: #ffffff;
  padding: 17px 30px;
}

/* ------------------------------------------------------------- contact */

/* No top padding: the tab strip takes the pane's top edge, as on Orchy. */
.tc-contact {
  position: relative;
  overflow: hidden;
  padding: 0 0 var(--tc-pad);
  border-top: var(--hairline) solid var(--rule);
}
.tc-contact-wrap {
  position: relative;
  z-index: 1;
}

/*
 * The terminal. It is the stage carried down the page: near-black with
 * white copy and the red prompt in both themes, so on the light theme's red
 * it reads as a window open on top of it. That is why it declares its own
 * inks instead of inheriting the section's.
 */
.tc-term {
  --ink: #ffffff;
  --ink-muted: #b7bdc9;
  --accent: var(--rv-red);
  --accent-text: var(--rv-red-text-dark);
  --accent-ink: #ffffff;
  --rule: #262c38;
  --surface: #12151c;
  --tc-syn-comment: #7a828f;
  --tc-syn-op: #868d9b;
  --tc-term-bg: #0b0d12;
  --tc-typed: calc(var(--n, 12) * 55ms);
  max-width: 920px;
  overflow: hidden;
  color: var(--ink);
  background: var(--tc-term-bg);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--card-radius);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.tc-term-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--tc-tab-h);
  padding: 0 var(--space-4);
  background: var(--surface);
  border-bottom: var(--hairline) solid var(--rule);
}
.tc-term-lights {
  display: flex;
  gap: 8px;
}
.tc-term-lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}
.tc-term-lights i:nth-child(2) {
  background: #febc2e;
}
.tc-term-lights i:nth-child(3) {
  background: #28c840;
}
.tc-term-title {
  position: absolute;
  inset: 0 96px;
  margin: 0;
  overflow: hidden;
  font: 500 var(--text-xs) / var(--tc-tab-h) var(--font-mono);
  letter-spacing: var(--tracking-mono);
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  color: var(--tc-syn-comment);
}
.tc-term-body {
  padding: clamp(20px, 3.4vw, 40px) clamp(20px, 3.4vw, 44px)
    clamp(24px, 3.6vw, 44px);
}
.tc-term-line {
  margin: 0;
  font: 500 var(--text-sm) / 1.6 var(--font-mono);
  color: var(--ink-muted);
}
.tc-term-line::before {
  content: '$ ';
  content: '$ ' / '';
  color: var(--accent-text);
}
.tc-term-path {
  color: var(--tc-syn-comment);
}
.tc-term-cmd {
  position: relative;
  color: var(--ink);
}
.tc-term-out {
  margin: var(--space-5) 0 var(--space-6);
}
.tc-contact-title {
  font-size: var(--display-md);
  line-height: 1;
  font-weight: 700;
}
.tc-contact-lead {
  max-width: 560px;
  margin: var(--space-5) 0 0;
  font-size: var(--text-lg);
  color: var(--ink-muted);
}
.tc-contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
/* The two links as commands: a prompt in front, the return key after, the
   primary one filled. The text is the link's own. */
.tc-cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 var(--space-4);
  font: 500 var(--text-sm) / 1.2 var(--font-mono);
  color: var(--ink);
  text-decoration: none;
  border: var(--hairline) solid var(--rule);
  border-radius: var(--radius-sm);
  transition:
    background-color var(--dur-base),
    border-color var(--dur-base),
    color var(--dur-base);
}
.tc-cmd::before {
  content: '>';
  content: '>' / '';
  color: var(--accent-text);
}
.tc-cmd::after {
  content: '↵';
  content: '↵' / '';
  color: var(--tc-syn-op);
}
.tc-cmd:is(:hover, :focus-visible) {
  border-color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.tc-cmd:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.tc-cmd-primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.tc-cmd-primary::before,
.tc-cmd-primary::after {
  color: inherit;
  opacity: 0.8;
}
.tc-cmd-primary:is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--accent) 82%, #ffffff);
}
.tc-term-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  vertical-align: -0.2em;
  background: var(--accent-text);
  animation: tc-caret 1.1s steps(1) infinite;
}

/*
 * The prompt typing itself (technologies.js `.is-typing`, when the live
 * build is not the one typing). Armed while the terminal is still below
 * the screen, the prompt and the output are held out of sight — unless the
 * build has claimed the heading, which then stages everything itself. On
 * arrival a cover the colour of the terminal slides off the command one
 * character at a time, its left edge the caret, then each piece of output
 * prints after it. Transform and opacity only.
 */
.tc-term.is-armed:not(:has([data-lb-own]))
  :is(.tc-term-prompt, .tc-term-out > *, .tc-term-idle) {
  opacity: 0;
}
.tc-term.is-typing .tc-term-cmd::after {
  content: '';
  position: absolute;
  inset: 0 -0.6em 0 0;
  background: var(--tc-term-bg);
  border-left: 0.55em solid var(--accent-text);
  animation:
    tc-type var(--tc-typed) steps(var(--n, 12)) 280ms both,
    tc-gone 1ms linear calc(280ms + var(--tc-typed) + 260ms) both;
}
.tc-term.is-typing :is(.tc-term-out > *, .tc-term-idle) {
  animation: tc-print 320ms var(--ease-out) both;
  animation-delay: calc(280ms + var(--tc-typed) + 320ms + var(--k) * 150ms);
}
.tc-term-out > :nth-child(1) {
  --k: 0;
}
.tc-term-out > :nth-child(2) {
  --k: 1;
}
.tc-term-out > :nth-child(3) {
  --k: 2;
}
.tc-term-idle {
  --k: 3;
}
@keyframes tc-type {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(100% - 0.6em));
  }
}
@keyframes tc-gone {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes tc-print {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------- light theme: the red */

/*
 * In the light theme the reading sections are not paper but the logo red,
 * with white copy: the team, the RIVERO line that is its tail, and contact.
 * White on #C2000B is 6.4:1 and the muted white (.86) 4.9:1. Everything
 * that was red on paper turns white (labels, the full stop, roles, the
 * portrait ring, focus), and the primary button turns over: white with red
 * text, 6.4:1. Open Build is not in the set: its form is already the red.
 *
 * The red never meets the stage or the footer on an edge. #team opens with
 * a tall fade out of the stage's near-black, and white copy holds on every
 * step of it. The way out is the footer's own ramp (see the footer block
 * below): the footer is light by default, so contact, red or dark, melts
 * into it over its own empty bottom padding.
 */
[data-page='technologies'] {
  --tc-red-fade: clamp(220px, 32vh, 380px);
}
[data-theme='light'] [data-page='technologies'] :is(#team, #contact) {
  --tone-bg: var(--rv-red);
  --ink: #ffffff;
  --ink-muted: rgba(255, 255, 255, 0.86);
  --accent: #ffffff;
  --accent-text: #ffffff;
  --accent-ink: var(--rv-red);
  --rule: rgba(255, 255, 255, 0.28);
  --surface: #a8000a;
  --tc-syn-comment: rgba(255, 255, 255, 0.8);
  --tc-syn-op: rgba(255, 255, 255, 0.62);
  background: var(--rv-red);
  color: #ffffff;
}
[data-theme='light'] [data-page='technologies'] #team::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}
[data-theme='light'] [data-page='technologies'] #team::before {
  top: 0;
  height: var(--tc-red-fade);
  background: linear-gradient(var(--tone-dark), var(--rv-red));
  background: linear-gradient(
    to bottom in oklab,
    var(--tone-dark) 0%,
    color-mix(in oklab, var(--rv-red) 1.6%, var(--tone-dark)) 7%,
    color-mix(in oklab, var(--rv-red) 6%, var(--tone-dark)) 14%,
    color-mix(in oklab, var(--rv-red) 15.6%, var(--tone-dark)) 25%,
    color-mix(in oklab, var(--rv-red) 31.6%, var(--tone-dark)) 37.5%,
    color-mix(in oklab, var(--rv-red) 50%, var(--tone-dark)) 50%,
    color-mix(in oklab, var(--rv-red) 68.4%, var(--tone-dark)) 62.5%,
    color-mix(in oklab, var(--rv-red) 84.4%, var(--tone-dark)) 75%,
    color-mix(in oklab, var(--rv-red) 94%, var(--tone-dark)) 86%,
    color-mix(in oklab, var(--rv-red) 98.4%, var(--tone-dark)) 93%,
    var(--rv-red) 100%
  );
}
/* The editor's strip on the red is a shade of the red, not a slab of the
   stage's near-black. */
[data-theme='light']
  [data-page='technologies']
  :is(#team, #contact)
  > .tc-tabs {
  background: rgba(0, 0, 0, 0.12);
}
/* One red from the team down to the way out: no rule between them. */
[data-theme='light'] [data-page='technologies'] #team + #contact {
  border-top-color: transparent;
}
/* ------------------------------------------------------- narrow screens */

@media (max-width: 860px) {
  .tc-meters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tc-meter:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .tc-meter:nth-child(n + 3) {
    border-top: var(--hairline) solid var(--rule);
  }
  /* No room beside the tabs, so the control takes the row under them —
     which is also where the strip would scroll to reach its last tab. */
  .tc-hero .tc-tabs {
    margin-bottom: 0;
  }
  .tc-reveal {
    position: static;
    width: 100%;
    margin-bottom: clamp(24px, 6vw, 44px);
    padding-inline: var(--gutter);
    text-align: right;
    border-left: 0;
  }
}
@media (max-width: 480px) {
  .tc-status {
    font-size: 10px;
  }
  .tc-status-item {
    padding-inline: 8px;
  }
}
@media (max-width: 640px) {
  .tc-steps {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .tc-hero-mark,
  .tc-orchy-mark,
  .tc-contact-mark {
    display: none;
  }
}
@media (max-width: 560px) {
  /* Two commands do not fit a phone's line: each takes its own. */
  .tc-cmd {
    width: 100%;
  }
  .tc-term-title {
    inset: 0 80px;
  }
  .tc-ob-head,
  .tc-ob-row {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .tc-ob-level,
  .tc-ob-head span:last-child {
    display: none;
  }
}

/*
 * Reduced motion: static. technologies.js stops after its chrome — the
 * status bar and one still frame of glyphs, neither of which moves — so the
 * grid never lights, the gutter never tracks, the headings are already their
 * own words and the sparklines are already drawn. What is left is the three
 * things CSS runs on its own (the label's caret, the meters' marker and the
 * full stop) and the hover and state transitions, which go the same way
 * site.css's own do.
 *
 * The footage holds still too: the video carries no `autoplay`, so it is a
 * poster until someone presses the button and asks for it.
 */
@media (prefers-reduced-motion: reduce) {
  .tc-mod,
  .tc-mod::before,
  .tc-mod-name,
  .tc-mod-body,
  .tc-wire,
  .tc-ob-filter,
  .tc-dev,
  .tc-dev-photo,
  .rv-io .tc-dev-photo,
  .tc-cmd,
  .tc-spark-line,
  .tc-blueprint-spot,
  .tc-hero-video,
  .tc-hero-ascii,
  .tc-status,
  .tc-reveal {
    transition: none;
  }
  .tc-label::after,
  .tc-term-caret,
  .tc-spark-dot::after,
  [data-page='technologies'] .accent-dot {
    animation: none;
  }
  .tc-label::after,
  .tc-term-caret {
    opacity: 0.5;
  }
  .tc-spark-dot::after {
    display: none;
  }
}
