/* Rational Systems — shared styles.
   Layout: the whole site is one CRT. Home is a single centered picture that powers on;
   inner pages keep a fixed header bar and "change channel" when their content loads. */
:root {
  color-scheme: dark;
  /* Color: a switched-off tube; all the color comes from the logo and the screens */
  --void: #050608;
  --fg: #e3e8ef;
  --soft: #bcc4cf;
  --dim: #7d8693;
  --line: #1b2028;
  /* Type: extended corporate lettering; technical-manual mono for running text */
  --f-display: "Michroma", "Eurostile", "Microgramma", "Arial", sans-serif;
  --f-body: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --sheet: 1080px; /* content column of inner pages */
  /* The red/blue misconvergence used on every hover */
  --fringe:
    -1.5px 0 rgba(255, 75, 62, .75),
    1.5px 0 rgba(79, 134, 255, .75),
    0 0 .8em rgba(150, 180, 255, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: var(--void);
  color: var(--fg);
  font-family: var(--f-display);
  -webkit-font-smoothing: antialiased;
}
body.sub { grid-template-rows: auto minmax(0, 1fr) auto; }
p { margin: 0; }

/* Tube vignette and scanlines over the whole screen */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: 50;
  background: radial-gradient(120% 90% at 50% 45%, transparent 58%, rgba(0, 0, 0, .55) 100%);
}
body::after {
  z-index: 51;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .18) 2px 3px);
}
/* Pages shown without the tube (Projects): no vignette or scanlines */
body.no-tube::before, body.no-tube::after { content: none; }

/* A faint brighter band rolling down the tube, like an old CRT at rest */
.roll {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 30vh;
  z-index: 49;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(220, 230, 255, .08) 50%, transparent);
  transform: translateY(-100%);
  animation: roll 8s linear 1.4s infinite;
}
@keyframes roll {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100vh); }
}

/* ── Logo ─────────────────────────────────── */
/* The box is the mark itself (x 229–803, y 170–875 of the 1024px logo);
   the full image overflows it and its dark square fades into the page */
.mark {
  position: relative;
  width: clamp(130px, 10.5vw, 150px);
  aspect-ratio: 574 / 705;
}
.mark img,
.mark::before,
.mark::after {
  position: absolute;
  left: calc(-100% * 229 / 574);
  top: calc(-100% * 170 / 705);
  width: calc(100% * 1024 / 574);
  max-width: none;
  height: auto;
  aspect-ratio: 1;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
}
.mark img {
  mix-blend-mode: lighten;
  transition: filter .25s ease-out;
}
/* Red and blue copies of the logo that drift apart on hover, the same misconvergence as the lettering */
.mark::before,
.mark::after {
  content: "";
  background: url("logo2.jpeg") 0 0 / 100% 100% no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .25s ease-out, transform .25s ease-out;
}
.mark::before { filter: url(#tint-red); }
.mark::after { filter: url(#tint-blue); }
.mark:hover img { filter: brightness(1.2); }
.mark:hover::before { opacity: .8; transform: translateX(-3px); }
.mark:hover::after { opacity: .8; transform: translateX(3px); }
/* The vector mark (home): the picture is exactly the box, on a transparent background */
.mark--svg { aspect-ratio: 820.59 / 1037.22; }
.mark--svg img,
.mark--svg::before,
.mark--svg::after {
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  -webkit-mask-image: none;
  mask-image: none;
}
.mark--svg img { mix-blend-mode: normal; }
.mark--svg::before,
.mark--svg::after { background-image: url("rational.svg"); }
/* With WebGL (stage3d.js) the home mark is a hologram, the same as the projects': drawn on a canvas over
   the whole hero, so its glow spreads as it does there, and lighter-blended so its background is the page's own */
.mark.is-3d img, .mark.is-3d::before, .mark.is-3d::after { display: none; }
.hero > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: lighten;
}

/* ── Lettering ────────────────────────────── */
.wordmark {
  margin: 0;
  font-size: clamp(1.5rem, 1.6vw + .9rem, 2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--fg);
}
/* Solid, so it stays crisp under the screen's scanlines; a slight RGB misconvergence
   that opens up when it is a link and gets hovered */
.wordmark {
  filter:
    drop-shadow(-1px 0 rgba(255, 75, 62, .45))
    drop-shadow(1px 0 rgba(79, 134, 255, .45))
    drop-shadow(0 0 .35em rgba(150, 180, 255, .22));
  transition: filter .25s ease-out;
}
.wordmark:has(a:hover),
.wordmark:has(a:focus-visible) {
  filter:
    drop-shadow(-2.5px 0 rgba(255, 75, 62, .75))
    drop-shadow(2.5px 0 rgba(79, 134, 255, .75))
    drop-shadow(0 0 .6em rgba(150, 180, 255, .45));
}
.wordmark a { color: inherit; text-decoration: none; }

/* ── Menu: quiet row; lights up with the misconvergence on hover and on the current page ── */
.menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px clamp(24px, 3vw, 40px); }
.menu a {
  padding: 6px 0 6px .24em; /* the left pad balances the trailing letter-spacing */
  font-size: .72rem;
  line-height: 1;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  transition: color .25s ease-out, text-shadow .25s ease-out;
}
.menu a:hover,
.menu a:focus-visible,
.menu a[aria-current="page"] {
  color: var(--fg);
  text-shadow: var(--fringe);
}

/* ── Home: the picture powers on like a CRT ── */
.hero { position: relative; overflow: hidden; display: grid; }
.hero__picture {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(20px, 2.4vw, 32px);
  padding: clamp(48px, 8vh, 96px) var(--gutter);
  text-align: center;
  animation: crt-on .95s cubic-bezier(.2, .7, .2, 1) .15s backwards;
}
.hero__flash { /* the bright line that opens into the picture */
  position: absolute;
  inset: 0;
  background: #e6edff;
  opacity: 0;
  pointer-events: none;
  animation: flash .8s ease-out .15s both;
}
@keyframes crt-on {
  0%   { transform: scale(0, .005); filter: brightness(5) saturate(0); }
  30%  { transform: scale(1, .005); filter: brightness(5) saturate(0); }
  62%  { transform: scale(1, 1.03); filter: brightness(2) saturate(.7); }
  78%  { transform: scale(1, .99); filter: brightness(1.25) saturate(1); }
  100% { transform: scale(1, 1); filter: brightness(1) saturate(1); }
}
@keyframes flash {
  0%   { opacity: 1; transform: scale(0, .005); }
  30%  { opacity: 1; transform: scale(1, .005); }
  62%  { opacity: .35; transform: scale(1, 1); }
  100% { opacity: 0; transform: scale(1, 1); }
}

/* ── Inner pages: header bar stays put, the content changes channel ── */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 20px;
  padding-inline: max(var(--gutter), calc((100% - var(--sheet)) / 2)); /* aligns with the content column */
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--fg);
  text-decoration: none;
  font-size: .68rem;
  line-height: 1;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.brand span { transition: text-shadow .25s ease-out; }
.brand .mark { width: 26px; z-index: 52; } /* above the tube's scanlines, so the small logo stays clean */
.brand:hover span,
.brand:focus-visible span { text-shadow: var(--fringe); }
.brand:hover .mark img,
.brand:focus-visible .mark img { filter: brightness(1.2); }
.brand:hover .mark::before,
.brand:focus-visible .mark::before { opacity: .8; transform: translateX(-1px); }
.brand:hover .mark::after,
.brand:focus-visible .mark::after { opacity: .8; transform: translateX(1px); }

.sheet {
  width: 100%;
  max-width: calc(var(--sheet) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(44px, 7vh, 80px) var(--gutter) clamp(56px, 9vh, 96px);
  animation: channel .5s ease-out .05s backwards;
}
.sheet__head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4.5vh, 44px); }
.intro { font-family: var(--f-body); font-size: .95rem; line-height: 1.6; color: var(--soft); }

@keyframes channel {
  0%   { opacity: 0; transform: translateY(-1.5%); filter: brightness(3) saturate(0); }
  35%  { opacity: 1; transform: translateY(.6%); filter: brightness(1.8) saturate(.6); }
  65%  { transform: translateY(-.2%); filter: brightness(1.15) saturate(1); }
  100% { transform: none; filter: none; }
}

/* ── Projects: a character-select screen. The selected project stands on the centre pad and turns
   slowly; the others wait on the sides, smaller and dimmer. JS sets each pad's data-pos. ── */
.select { display: grid; justify-items: center; gap: clamp(20px, 3vh, 32px); }
.select__stage {
  --pod: min(420px, 38vw);
  position: relative;
  width: 100%;
  height: calc(var(--pod) * .75);
}
/* With WebGL (stage3d.js) a canvas the width of the window takes over from the CSS pads */
body.sub { overflow-x: clip; }
.select__stage.is-3d { height: clamp(380px, 50vh, 480px); }
.select__stage.is-3d .pod { display: none; }
.select__stage canvas {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  /* soft top and bottom edges, so the floor's pools of light don't end in a hard line */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent);
}
.pod {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--pod);
  color: inherit;
  transform-origin: 50% 100%;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s ease-out, filter .7s ease-out;
}
.pod .holo { margin: 0; }
.pod[data-pos="0"]  { z-index: 3; transform: translateX(-50%); }
.pod[data-pos="-1"] { z-index: 2; transform: translateX(-50%) translateX(-86%) scale(.6); opacity: .5; filter: saturate(.4) brightness(.75); }
.pod[data-pos="1"]  { z-index: 2; transform: translateX(-50%) translateX(86%) scale(.6); opacity: .5; filter: saturate(.4) brightness(.75); }
.pod[data-pos="-2"] { z-index: 1; transform: translateX(-50%) translateX(-150%) scale(.4); opacity: .18; filter: saturate(0) brightness(.6); }
.pod[data-pos="2"]  { z-index: 1; transform: translateX(-50%) translateX(150%) scale(.4); opacity: .18; filter: saturate(0) brightness(.6); }
.pod[data-pos="far"] { z-index: 0; transform: translateX(-50%) scale(.3); opacity: 0; pointer-events: none; }
.pod:not([data-pos="0"]):hover,
.pod:not([data-pos="0"]):focus-visible { opacity: .8; filter: saturate(.8) brightness(.95); }
.pod[data-pos="0"] .holo { --d: .25s; }
.pod:not([data-pos="0"]) .holo { --d: .5s; }
.pod[data-pos="0"] .holo::before { opacity: 1; }

/* Name of the selected project between the arrows, like a game's selector */
.select__info { display: grid; justify-items: center; gap: 12px; text-align: center; }
.select__count,
.select__hint {
  font-family: var(--f-body);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.select__row { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.select__name { width: 12.5em; } /* fixed, so the arrows stay put as names change */
.select__name.is-switching { animation: retune .35s ease-out; }
.select__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: none;
  color: var(--dim);
  cursor: pointer;
  transition: color .25s ease-out, border-color .25s ease-out, filter .25s ease-out;
}
.select__arrow::before { /* a drawn triangle, so no platform swaps it for an emoji */
  content: "";
  width: 9px;
  height: 11px;
  background: currentColor;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}
.select__arrow--next::before { clip-path: polygon(0 0, 0 100%, 100% 50%); }
.select__arrow:hover,
.select__arrow:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
  filter: drop-shadow(-1.5px 0 rgba(255, 75, 62, .75)) drop-shadow(1.5px 0 rgba(79, 134, 255, .75));
}
@keyframes retune {
  0%   { opacity: 0; transform: translateY(-4px) scaleY(.6); }
  60%  { opacity: 1; transform: translateY(1px) scaleY(1.04); }
  100% { opacity: 1; transform: none; }
}

/* Each projector takes one color, --tone (set on the pod), and derives its light from it.
   JS builds the projector from the pod's <img>: pad, focus line, and a stack of layers. */
.holo {
  --d: .25s; /* entrance delay */
  --glow: color-mix(in srgb, var(--tone) 55%, transparent);
  --beam: color-mix(in srgb, var(--tone) 18%, transparent);
  --core: color-mix(in srgb, var(--tone) 35%, white);
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
}
.holo::before { /* the beam, opening upwards from the emitter */
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%;
  right: 4%;
  top: 2%;
  bottom: calc(3% + 18px);
  clip-path: polygon(41% 100%, 59% 100%, 100% 0, 0 0);
  background: linear-gradient(to top, var(--beam), transparent 80%);
  opacity: .8;
  transform-origin: 50% 100%;
  transition: opacity .25s ease-out;
  animation: beam .6s cubic-bezier(.2, .7, .2, 1) calc(var(--d) + .15s) backwards;
}
.holo::after { /* the emitter, set into the pad's top face */
  content: "";
  position: absolute;
  left: 36%;
  right: 36%;
  bottom: calc(3% + 13px);
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--core) 0 35%, var(--glow) 62%, transparent);
  box-shadow: 0 0 26px 3px var(--glow);
  animation: emitter .4s ease-out var(--d) backwards;
}

/* The pad: a short dark cylinder the hologram stands on */
.holo__pad {
  position: absolute;
  left: 31%;
  right: 31%;
  bottom: 3%;
  height: 18px;
  border-radius: 0 0 50% 50% / 0 0 70% 70%;
  background: linear-gradient(to bottom, #161a21, #090b0e);
  box-shadow: 0 14px 24px -8px rgba(0, 0, 0, .8);
}
.holo__pad::before { /* top face, with its rim catching the light */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #2a313c, #12161c 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 1px 0 color-mix(in srgb, var(--tone) 35%, transparent);
}

/* Where the beam forms the image: a faint bright line under the symbol */
.holo__focus {
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: 33%;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--core), var(--glow) 60%, transparent);
  opacity: .45;
  filter: blur(1px);
  mix-blend-mode: screen;
  animation: emitter .4s ease-out calc(var(--d) + .5s) backwards;
}

/* The symbol: light added onto the beam, base dissolving into it, scanlines drifting up */
.holo__body {
  --scan: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, .3) 2px 3px);
  --fade: linear-gradient(to bottom, #000 70%, transparent 97%);
  position: absolute;
  left: 0;
  right: 0;
  top: 4%;
  height: 64%; /* ends above the pad, leaving the beam visible below */
  -webkit-mask-image: var(--scan), var(--fade);
  -webkit-mask-composite: source-in;
  mask-image: var(--scan), var(--fade);
  mask-composite: intersect;
  mix-blend-mode: screen;
  perspective: 700px;
  transform-origin: 50% 100%;
  animation:
    lines 1.2s linear infinite,
    float 5s ease-in-out infinite,
    flicker 6s linear infinite,
    emerge .7s cubic-bezier(.2, .7, .2, 1) calc(var(--d) + .25s) backwards; /* last, so it wins while it runs */
}
.holo__spin { position: absolute; inset: 0; transform-style: preserve-3d; }
.pod[data-pos="0"] .holo__spin { animation: turn 9s ease-in-out -2.25s infinite; } /* the selected one turns on its pad */

/* Volume: copies of the symbol stacked behind the face, fading with depth (--k = 1 … 6) */
.holo__layer,
.holo__glitch {
  position: absolute;
  inset: 18px; /* room for the glow inside the mask */
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  object-fit: contain;
}
.holo__layer {
  transform: translateZ(calc(var(--k) * -3.5px));
  opacity: calc(.42 - var(--k) * .06);
}
.holo__layer--face {
  transform: none;
  opacity: .9;
  filter:
    drop-shadow(0 0 0 rgba(255, 75, 62, 0))
    drop-shadow(0 0 0 rgba(79, 134, 255, 0))
    drop-shadow(0 0 14px var(--glow))
    brightness(1);
  transition: filter .25s ease-out;
}
.pod[data-pos="0"]:hover .holo__layer--face,
.pod[data-pos="0"]:focus-visible .holo__layer--face {
  filter:
    drop-shadow(-3px 0 rgba(255, 75, 62, .7))
    drop-shadow(3px 0 rgba(79, 134, 255, .7))
    drop-shadow(0 0 22px var(--glow))
    brightness(1.15);
}

/* Signal glitch: now and then a horizontal slice of the image tears sideways */
.holo__glitch {
  transform: translateZ(1px);
  opacity: 0;
  animation: glitch 5.5s steps(1, end) infinite;
}
.pod:nth-child(2) .holo__glitch { animation-delay: -1.8s; }
.pod:nth-child(3) .holo__glitch { animation-delay: -3.6s; }

@keyframes emitter { from { opacity: 0; transform: scaleX(.2); } }
@keyframes beam { from { opacity: 0; transform: scaleY(0); } }
@keyframes emerge {
  0%   { opacity: 0; transform: scaleY(0); filter: brightness(3); }
  60%  { opacity: 1; transform: scaleY(1.06); filter: brightness(1.6); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes lines { to { -webkit-mask-position: 0 -3px, 0 0; mask-position: 0 -3px, 0 0; } }
@keyframes float { 50% { transform: translateY(-4px); } }
@keyframes flicker {
  0%, 46%, 48%, 81%, 83%, 100% { opacity: .92; }
  47% { opacity: .55; }
  82% { opacity: .72; }
}
@keyframes turn {
  0%, 100% { transform: rotateY(-26deg); }
  50%      { transform: rotateY(26deg); }
}
@keyframes glitch {
  0%     { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateZ(1px); }
  61%    { opacity: 1; clip-path: inset(36% 0 52% 0); transform: translateZ(1px) translateX(7px); }
  62.2%  { opacity: 1; clip-path: inset(58% 0 33% 0); transform: translateZ(1px) translateX(-5px); }
  63.4%  { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateZ(1px); }
  88%    { opacity: 1; clip-path: inset(16% 0 76% 0); transform: translateZ(1px) translateX(5px); }
  89.2%  { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateZ(1px); }
}

/* ── About (and trademarks_2.html, the earlier Trademarks): a spec sheet, one ruled row per part,
   its number and title on the left ── */
.spec__part {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 18px clamp(24px, 4vw, 56px);
  padding-block: clamp(24px, 4vh, 36px);
  border-top: 1px solid var(--line);
}
.spec__part > h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--fg);
}
.spec__part > h2 span {
  font-family: var(--f-body);
  font-size: .64rem;
  letter-spacing: .2em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.spec__body {
  display: grid;
  gap: 14px;
  max-width: 64ch;
  font-family: var(--f-body);
  font-size: .9rem;
  line-height: 1.7;
  color: var(--soft);
}
.spec__body ul, .rules ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.spec__body li, .rules li { position: relative; padding-left: 1.6em; }
.spec__body li::before, .rules li::before { /* a small square for a bullet, the colour of the rules */
  content: "";
  position: absolute;
  left: .2em;
  top: .72em;
  width: 5px;
  height: 5px;
  background: var(--dim);
}
.spec__body a, .small-print a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-underline-offset: .25em;
  transition: text-shadow .25s ease-out;
}
.spec__body a:hover, .small-print a:hover,
.spec__body a:focus-visible, .small-print a:focus-visible { text-shadow: var(--fringe); }
/* The projects, one line each (from projects-data.js): symbol, name, what it is and its state, its code at the end */
.register { display: grid; margin: 0; padding: 0; list-style: none; }
.register__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 20px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.register__item:first-child { padding-top: 0; }
.register__item:last-child { padding-bottom: 0; border-bottom: 0; }
.register__symbol { grid-row: span 3; width: 44px; height: 44px; object-fit: contain; }
.register__name {
  align-self: end;
  font-size: .9rem;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.register__scope,
.register__status,
.register__ref {
  font-family: var(--f-body);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}
.register__ref { grid-column: 3; grid-row: 1 / span 3; font-variant-numeric: tabular-nums; }
/* trademarks_2.html: the marks in the same register, on two lines, the name with its ™ and what the mark covers */
.register--marks .register__symbol { grid-row: span 2; }
.register--marks .register__ref { grid-row: 1 / span 2; }
.register__scope { grid-column: 2; align-self: start; }
.register__name a { color: inherit; text-decoration: none; transition: text-shadow .25s ease-out; }
.register__name a:hover,
.register__name a:focus-visible { text-shadow: var(--fringe); }
.register__desc { grid-column: 2; font-family: var(--f-body); font-size: .85rem; line-height: 1.6; color: var(--soft); }
/* its state, with the project menus' light: the mark's own green (online) or yellow (still in development) */
.register__status { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 10px; color: var(--soft); }
.register__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--state, var(--dim));
  box-shadow: 0 0 10px var(--state, transparent);
}
.register__status[data-status="online"] { --state: #54ff8d; }
.register__status[data-status="development"] { --state: #ffca0c; }
.register__status[data-status="development"]::before { animation: blink 1.6s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: .25; } }
/* Facts: label and value, ruled like the register */
.facts { display: grid; margin: 0; }
.facts__row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.facts__row:first-child { padding-top: 0; }
.facts__row:last-child { padding-bottom: 0; border-bottom: 0; }
.facts dt { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.facts dd { margin: 0; }
.facts address { font-style: normal; }
@media (max-width: 640px) {
  .spec__part { grid-template-columns: minmax(0, 1fr); }
}

/* ── Trademarks: the register, one ruled row per granted registration: its number, the logo (in grayscale
   where that's how it's registered), the mark, its kind, where and in which Nice classes; under it what you
   may and may not do, each with a light; then the small print ── */
.marks {
  width: 100%;
  margin: 0 0 clamp(40px, 7vh, 72px);
  border-collapse: collapse;
  font-family: var(--f-body);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.marks th,
.marks td {
  height: 69px;
  padding: 14px 20px 14px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
}
.marks th:last-child, .marks td:last-child { padding-right: 0; }
.marks tbody tr:last-child, .marks tbody tr:last-child > * { border-bottom: 0; } /* the rules' line closes it */
.marks thead th { height: auto; padding-top: 0; padding-bottom: 12px; font-size: .7rem; }
.marks__ref { width: 90px; }
.marks__logo { width: 60px; }
.marks__logo img {
  position: relative;
  z-index: 52; /* above the tube's scanlines, so the marks stay clean */
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.marks__logo--gray img { filter: grayscale(1); }
/* the mark takes what the other columns leave, so the logo column stays just the logo's width */
.marks__type { width: 20%; }
.marks__where { width: 16%; }
.marks__classes { width: 12%; }
.marks__name {
  font-family: var(--f-display);
  font-size: .9rem;
  letter-spacing: .1em;
  color: var(--fg);
}
.marks__type { color: var(--soft); }
.marks__r, .register__tm { margin-left: .15em; font-size: .8em; letter-spacing: 0; vertical-align: .35em; color: var(--soft); } /* in the name's lettering: the mono's ® is drawn tiny */
/* On a phone each row folds onto two lines: the logo, then the mark and its number over its kind, where and classes */
@media (max-width: 640px) {
  .marks, .marks tbody { display: block; }
  .marks thead { display: none; }
  .marks tr {
    display: grid;
    grid-template-columns: 40px auto auto minmax(0, 1fr) auto;
    grid-template-areas: "logo name name name ref" "logo type where classes classes";
    align-items: center;
    gap: 6px 12px;
    padding-block: 14px;
    border-bottom: 1px solid var(--line);
  }
  .marks tr.marks__word { /* no logo: the word starts where the logos do */
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "name name name ref" "type where classes classes";
  }
  .marks th, .marks td { display: block; width: auto; height: auto; padding: 0; border: 0; }
  .marks__ref { grid-area: ref; }
  .marks__logo { grid-area: logo; align-self: stretch; display: grid; place-items: center; }
  .marks__name { grid-area: name; font-size: .8rem; }
  .marks__type { grid-area: type; }
  .marks__where { grid-area: where; }
  .marks__classes { grid-area: classes; }
  .marks__classes::before { content: "Classes "; }
}
/* What you may and may not do: two columns, each headed by a light, green and the lettering's red */
.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
  padding-top: clamp(28px, 4.5vh, 40px);
  border-top: 1px solid var(--line);
  font-family: var(--f-body);
  font-size: .9rem;
  line-height: 1.7;
  color: var(--soft);
}
.rules h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--f-display);
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--fg);
}
.rules h2::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--state);
  box-shadow: 0 0 10px var(--state);
}
.rules__may { --state: #54ff8d; }
.rules__may-not { --state: #ff4b3e; }
.small-print p { max-width: 80ch; }
.small-print {
  margin-top: clamp(40px, 7vh, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--f-body);
  font-size: .72rem;
  line-height: 1.7;
  color: var(--dim);
}
@media (max-width: 760px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
}

/* ── Footer ───────────────────────────────── */
.foot {
  display: flex;
  justify-content: center;
  padding: 20px var(--gutter) 26px;
  font-size: .62rem;
  line-height: 1;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--dim);
}
.foot p { line-height: 1.9; text-align: center; } /* room for a second line on a phone */
.foot a { color: inherit; text-decoration: none; transition: color .25s ease-out, text-shadow .25s ease-out; }
.foot a:hover,
.foot a:focus-visible,
.foot a[aria-current="page"] { color: var(--fg); text-shadow: var(--fringe); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
