/* Inter (self-hosted, variable) — the same files as the SuppLux homepage */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/Inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/Inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/* SuppLux tokens (mirrors the homepage's styles.css) */
:root {
  --blue: #2f6dff;
  --blue-soft: #8bb7ff;
  --blue-deep: #173bb3;
  --blue-ice: #c7ddff;
  --night: #060b13;
  --ink: #080d17; /* printed on the lit surface */
  --fg: #f7faff;
  --fg-dim: rgba(236, 243, 250, 0.82);
  --fg-faint: rgba(199, 221, 255, 0.5);
  --nav-h: 76px;
  --gutter: clamp(20px, 4vw, 56px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--night);
}

body {
  font-family: var(--font);
  color: var(--fg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(47, 109, 255, 0.22);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--night);
  border: 1px solid rgba(199, 221, 255, 0.3);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  clip-path: inset(50%);
}
.skip:focus-visible {
  clip-path: none;
}

/* ---------- stage ---------- */

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* fallback pool if WebGL is unavailable */
body[data-webgl="off"] #stage {
  display: none;
}
body[data-webgl="off"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(92% 66% at 50% 98%, rgba(250, 251, 252, 0.98) 0%, rgba(226, 228, 231, 0.74) 32%, rgba(150, 153, 158, 0.3) 60%, rgba(0, 0, 0, 0) 86%),
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 24%,
      rgba(104, 106, 110, 0.22) 44%,
      rgba(160, 163, 168, 0.36) 68%,
      rgba(218, 220, 224, 0.52) 100%
    ),
    var(--night);
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.grain {
  opacity: 0.05;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.vignette {
  background: radial-gradient(130% 105% at 50% 45%, rgba(10, 10, 11, 0) 55%, rgba(10, 10, 11, 0.5) 100%);
}

/* ---------- header: identical to the SuppLux homepage (dark, scrolled) ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--fg);
  background: rgba(11, 12, 16, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-h);
  padding: 0 var(--gutter);
}

.nav-brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

/* back to the SuppLux homepage: its own control on the left of the header,
   apart from the in-page menu (it leaves this page, the menu does not) */
.nav-back {
  position: absolute;
  left: var(--gutter);
  top: calc(50% - 17px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: rgba(247, 250, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}

.nav-back:hover,
.nav-back:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-back svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}

.nav-back:hover svg,
.nav-back:focus-visible svg {
  transform: translateX(-3px);
}

/* narrow phones: a smaller pill, so the centred logo keeps its room */
@media (max-width: 420px) {
  .nav-back {
    top: calc(50% - 15px);
    height: 30px;
    padding: 0 11px 0 7px;
    gap: 4px;
    font-size: 12px;
  }
}

.nav-brand img {
  height: 40px;
  width: auto;
}

/* ---------- light controller: power, colour temperature, dimming ---------- */

.ctrl {
  --tint: #f3f6ff; /* the current light colour, set from app.js */
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: var(--gutter);
  z-index: 20;
  /* fits in the space to the right of the lamp, which ends near 74% of the width */
  width: clamp(212px, calc(25.6vw - var(--gutter) - 8px), 252px);
  border-radius: 18px;
  color: var(--fg);
  background: linear-gradient(180deg, rgba(28, 29, 33, 0.78), rgba(16, 17, 20, 0.78));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* power row: the label, a quiet On/Off, and the switch */
.ctrl-power {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 13px;
}

.ctrl-power .ctrl-label {
  flex: 1;
}

.ctrl-state {
  font-size: 12px;
  font-weight: 600;
  color: rgba(236, 243, 250, 0.5);
  transition: color 0.35s var(--ease);
}

.ctrl[data-on="true"] .ctrl-state {
  color: var(--fg);
}

/* the switch: a machined track that fills with cobalt; the knob carries a
   pinpoint that glows in the light's own colour while it is on */
.switch {
  flex: none;
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.switch[aria-checked="true"] {
  background: linear-gradient(180deg, #3d7bff, #2459e6);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 18px rgba(47, 109, 255, 0.45);
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #e4e8f0);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.4s var(--ease);
}

.switch[aria-checked="true"] .switch-knob {
  transform: translateX(20px);
}

.switch-knob i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9c0cc;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.switch[aria-checked="true"] .switch-knob i {
  background: var(--tint);
  box-shadow: 0 0 6px var(--tint);
}

.ctrl-inner {
  padding: 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.35s var(--ease);
}

.ctrl[data-on="false"] .ctrl-inner {
  opacity: 0.45;
}

.ctrl-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0 9px;
}

.ctrl-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 243, 250, 0.5);
}

.ctrl-value {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

/* colour temperature: a segmented control with a sliding thumb */
.cct {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cct-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateX(calc(var(--i, 2) * 100%));
  transition: transform 0.45s var(--ease);
}

.cct button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(236, 243, 250, 0.55);
  transition: color 0.3s;
}

.cct button:hover,
.cct button[aria-checked="true"] {
  color: #fff;
}

.cct button i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: 0 0 6px var(--sw);
}

/* White | RGB: the same segmented control as the colour temperatures */
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 0.45s var(--ease);
}

.seg button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 30px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: rgba(236, 243, 250, 0.55);
  transition: color 0.3s;
}

.seg button:hover,
.seg button[aria-checked="true"] {
  color: #fff;
}

.mode-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.mode-swatch--white {
  background: linear-gradient(90deg, #ffc98c, #f3f6ff);
  box-shadow: 0 0 6px rgba(255, 236, 210, 0.6);
}

.mode-swatch--rgb {
  background: conic-gradient(#ff4d4d, #ffd84d, #4dff88, #4dd8ff, #6b6bff, #ff4dd8, #ff4d4d);
  box-shadow: 0 0 6px rgba(160, 140, 255, 0.6);
}

.ctrl[data-mode="rgb"] .mode-swatch--rgb {
  animation: swatch-spin 3s linear infinite;
}

@keyframes swatch-spin {
  to {
    transform: rotate(360deg);
  }
}

.ctrl-pane[hidden] {
  display: none;
}

.ctrl-pane {
  animation: pane-in 0.45s var(--ease) both;
}

@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* effect programs, like the scene buttons of a DMX console */
.fx {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.fx button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 0 6px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(236, 243, 250, 0.55);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}

.fx button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.fx button[aria-checked="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0 0 1px var(--tint),
    0 0 14px -4px var(--tint);
}

.fx svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.fx svg .fill {
  fill: currentColor;
  stroke: none;
}

.fx button[aria-checked="true"] svg {
  color: var(--tint);
}

/* the chase icon runs while its program does */
.fx button[data-fx="chase"][aria-checked="true"] rect {
  animation: chase-step 1.2s steps(1) infinite;
  fill: currentColor;
  stroke: none;
}

.fx button[data-fx="chase"][aria-checked="true"] rect:nth-child(2) {
  animation-delay: 0.4s;
}

.fx button[data-fx="chase"][aria-checked="true"] rect:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes chase-step {
  0% {
    opacity: 1;
  }
  33%,
  100% {
    opacity: 0.25;
  }
}

/* colour: a slider along the colour wheel */
.hue {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.hue::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    hsl(0 100% 58%),
    hsl(60 100% 55%),
    hsl(120 100% 50%),
    hsl(180 100% 50%),
    hsl(240 100% 62%),
    hsl(300 100% 58%),
    hsl(359 100% 58%)
  );
}

.hue::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    hsl(0 100% 58%),
    hsl(60 100% 55%),
    hsl(120 100% 50%),
    hsl(180 100% 50%),
    hsl(240 100% 62%),
    hsl(300 100% 58%),
    hsl(359 100% 58%)
  );
}

.hue::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: hsl(var(--hue, 210) 100% 55%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hue::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: hsl(var(--hue, 210) 100% 55%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hue:focus-visible {
  outline: none;
}

.hue:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--blue-soft);
  outline-offset: 2px;
}

/* a still colour has no speed */
.ctrl[data-fx="solid"] .ctrl-row--speed,
.ctrl[data-fx="solid"] .speed {
  opacity: 0.35;
  pointer-events: none;
}

.ctrl-row--speed,
.speed {
  transition: opacity 0.3s;
}

/* DMX readout: the three channels the program is sending, as level meters */
.dmx {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 4px;
  padding: 8px 10px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dmx-addr {
  flex: 1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 243, 250, 0.45);
}

.dmx-addr b {
  color: #fff;
}

.dmx-ch {
  position: relative;
  display: grid;
  grid-template-columns: 6px auto;
  grid-template-rows: auto auto;
  column-gap: 6px;
  align-items: center;
  width: 44px;
}

/* the meter: a slot, and the level rising in it */
.dmx-ch::before {
  content: "";
  grid-row: 1 / 3;
  grid-column: 1;
  width: 6px;
  height: 24px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.dmx-ch i {
  grid-row: 1 / 3;
  grid-column: 1;
  width: 6px;
  height: 24px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  transform: scaleY(0);
  transform-origin: 50% 100%;
}

.dmx-ch em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}

.dmx-ch b {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.dmx-ch--r {
  color: #ff5a5a;
}

.dmx-ch--g {
  color: #45f08a;
}

.dmx-ch--b {
  color: #5a8bff;
}

/* dimming slider: the fill glows in the current light colour */
.dim {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  margin: 0 0 14px;
  background: transparent;
  cursor: pointer;
  --p: 100%;
}

.dim::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), var(--tint) var(--p), rgba(255, 255, 255, 0.1) var(--p));
}

.dim::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.dim::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), var(--tint));
}

.dim::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.25s;
}

.dim::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dim:hover::-webkit-slider-thumb,
.dim:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dim:focus-visible {
  outline: none;
}

.dim:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--blue-soft);
  outline-offset: 2px;
}

/* ---------- the section word, cast as a shadow on the lit floor ---------- */

.defs {
  position: absolute;
}

/* multiply: the shadow is the floor with less light on it, so it is darkest
   in the bright pool and fades into the dark with it, as a real shadow does */
.word-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  perspective: 1500px;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.word {
  /* how far the lowest ink sits above the box foot (Inter, line-height 1):
     the baseline for flat-footed words, the descender tip when there is one */
  --foot: 0.125em;
  font-size: var(--word-size, 23vw);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
  /* keeps ~22% of the light: clearly a shadow, not black paint */
  color: #383b40;
  filter: url(#shadow);
  /* the lowest ink rests on the bottom edge, whatever the word */
  margin-bottom: calc(-1 * var(--foot));
  /*
   * A long shadow thrown by a light low at the front-left of the screen:
   * stretched a little along its length, sheared slightly away from the
   * light, then laid down onto the floor from its foot.
   */
  transform-origin: 50% calc(100% - var(--foot));
  transform: rotateX(var(--word-tilt, 72deg)) skewX(var(--word-skew, -8deg)) scaleY(var(--word-stretch, 1.25));
  /* a cast shadow is densest at its foot and thins towards its far end */
  -webkit-mask-image: linear-gradient(to top, #000 22%, rgba(0, 0, 0, 0.42) 100%);
  mask-image: linear-gradient(to top, #000 22%, rgba(0, 0, 0, 0.42) 100%);
  opacity: calc(var(--ink-opacity, 0) * var(--ink-fade, 1));
  transition: opacity 900ms var(--ease), font-size 700ms var(--ease), transform 900ms var(--ease);
}

.word[data-desc="1"] {
  --foot: -0.085em;
}

/* ---------- copy sitting in the light ---------- */

.copy {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  color: var(--ink);
  opacity: calc(var(--ink-opacity, 0) * var(--ink-fade, 1));
  transition: opacity 700ms var(--ease);
}

/* the text view: one row on the lit floor — the copy, and (for sections with
   cards) a preview of them beside it. Without a preview the copy is centred. */
.lede {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 5vw, 80px);
  padding: 0 6vw;
}

.lede-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(56ch, 78vw);
  text-align: center;
  transition: opacity 0.45s var(--ease), transform 0.7s var(--ease);
}

.lede.has-peek .lede-text {
  align-items: flex-start;
  max-width: min(40ch, 46vw);
  text-align: left;
}

.kicker,
.body {
  position: relative;
  margin: 0;
}

/*
 * The copy is printed on the lit floor: deep ink, a touch heavier than a
 * screen would need, and a faint halo of the floor's own light behind it so
 * it lifts off the grey where the pool falls away.
 */
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(14px, 2vh, 22px);
  width: max-content;
  padding-left: 20px;
  font-size: clamp(11px, 0.84vw, 13.5px);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  /* it sits where the pool is still dim, so a bright cobalt, not a dark one */
  color: #3a78ff;
}

/* the cobalt point, lit */
.kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--blue);
  box-shadow:
    0 0 0 4px rgba(47, 109, 255, 0.16),
    0 0 12px rgba(47, 109, 255, 0.55);
}

/* a hairline closes the label, as on a printed spec sheet */
.kicker::after {
  content: "";
  flex: none;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, currentColor, rgba(58, 120, 255, 0));
  opacity: 0.7;
}

.body {
  font-size: clamp(15px, 1.28vw, 21px);
  font-weight: 450;
  line-height: 1.62;
  letter-spacing: -0.006em;
  color: #0e1524;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.4);
  text-wrap: pretty;
}

/* in-page sections, styled as the homepage nav links */
.strip {
  position: absolute;
  top: 71%;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px clamp(20px, 2.2vw, 36px);
  padding: 0 4vw;
  font-size: clamp(13px, 0.98vw, 15.5px);
  font-weight: 560;
  letter-spacing: 0.01em;
  pointer-events: auto;
}

.strip > button {
  position: relative;
  padding: 2px 0;
  white-space: nowrap;
  color: #121a2a;
  opacity: 0.72;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
  transition: opacity 0.3s, color 0.3s;
}

.strip > button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.strip > button:hover {
  opacity: 1;
}

.strip > button:hover::after,
.strip > button[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.strip > button[aria-current="true"] {
  opacity: 1;
  color: #1c4fd6;
}

/* ---------- Blog section: the copy makes room for the card deck ---------- */

.strip {
  transition: top 0.7s var(--ease), opacity 0.45s var(--ease);
}

body[data-view="cards"] .lede-text {
  opacity: 0;
  transform: translateY(-2vh);
}

/* ---------- the preview: a small fan of the section's cards ---------- */

.lede:not(.has-peek) .peek {
  display: none;
}

.peek {
  --cw: 74px; /* card size in the fan */
  --ch: 102px;
  --spread: 42px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  pointer-events: auto;
  transition: opacity 0.45s var(--ease);
}

body[data-view="cards"] .peek {
  pointer-events: none;
}

body[data-view="cards"] .peek:not(.is-opening) {
  opacity: 0;
}

.peek-fan {
  position: relative;
  width: calc(var(--cw) + 2 * var(--spread) + 28px);
  height: calc(var(--ch) + 26px);
  transition: transform 0.75s var(--ease), opacity 0.55s var(--ease);
}

/* the fan's own shadow on the lit floor */
.peek-fan::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(8, 13, 23, 0.3), rgba(8, 13, 23, 0) 72%);
}

.peek-card {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: var(--cw);
  height: var(--ch);
  border-radius: calc(var(--cw) * 0.16);
  overflow: hidden;
  transform-origin: 50% 100%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 16px 22px -12px rgba(8, 13, 23, 0.6);
  transition: transform 0.6s var(--ease);
}

/* a card in miniature: the logo tile and two title lines */
.peek-card::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 9%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 3px;
  background: #fff;
}

.peek-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 22%;
  bottom: 10%;
  height: 10%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)) 0 0 / 80% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 100% 2px no-repeat;
}

.peek-card--0 {
  z-index: 3;
  transform: translateX(-50%) translateY(-6px);
  animation: peek-bob 3.2s ease-in-out infinite;
}

.peek-card--1 {
  z-index: 1;
  transform: translateX(calc(-50% - var(--spread))) rotate(-14deg);
  animation: peek-sway-l 3.2s ease-in-out infinite;
}

.peek-card--2 {
  z-index: 2;
  transform: translateX(calc(-50% + var(--spread))) rotate(14deg);
  animation: peek-sway-r 3.2s ease-in-out infinite;
}

/* at rest the fan breathes: the front card lifts, the others open a little */
@keyframes peek-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(-6px);
  }
  50% {
    transform: translateX(-50%) translateY(-13px);
  }
}

@keyframes peek-sway-l {
  0%,
  100% {
    transform: translateX(calc(-50% - var(--spread))) rotate(-14deg);
  }
  50% {
    transform: translateX(calc(-50% - var(--spread) - 4px)) rotate(-18deg);
  }
}

@keyframes peek-sway-r {
  0%,
  100% {
    transform: translateX(calc(-50% + var(--spread))) rotate(14deg);
  }
  50% {
    transform: translateX(calc(-50% + var(--spread) + 4px)) rotate(18deg);
  }
}

/* pointing at it spreads the fan, like picking up a hand of cards */
.peek:hover .peek-card,
.peek:focus-visible .peek-card {
  animation: none;
}

.peek:hover .peek-card--0,
.peek:focus-visible .peek-card--0 {
  transform: translateX(-50%) translateY(-18px) scale(1.06);
}

.peek:hover .peek-card--1,
.peek:focus-visible .peek-card--1 {
  transform: translateX(calc(-50% - var(--spread) - 14px)) translateY(-4px) rotate(-22deg);
}

.peek:hover .peek-card--2,
.peek:focus-visible .peek-card--2 {
  transform: translateX(calc(-50% + var(--spread) + 14px)) translateY(-4px) rotate(22deg);
}

.peek:focus-visible {
  outline: none;
}

.peek-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(47, 109, 255, 0.3), 0 6px 16px rgba(8, 13, 23, 0.08);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.3s;
}

.peek-label svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.peek:hover .peek-label,
.peek:focus-visible .peek-label {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(47, 109, 255, 0.35);
}

.peek:focus-visible .peek-label {
  outline: 2px solid var(--blue-soft);
  outline-offset: 3px;
}

/* opening: the fan flies to the middle of the stage and grows into the ring */
.peek.is-opening .peek-fan {
  transform: translate(var(--zx, 0), var(--zy, 0)) scale(2.8);
  opacity: 0;
}

.peek.is-opening .peek-label {
  opacity: 0;
}

/* coming back to the text, the fan settles in again */
body[data-view="text"] .lede.has-peek .peek {
  animation: peek-in 0.8s var(--ease) 0.2s both;
}

@keyframes peek-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
}

/* About's preview: a small book — pages behind, the first chapter open in front */
.peek-fan--story,
.peek-fan--frame {
  width: calc(var(--cw) * 1.9 + 40px);
}

.peek-page {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: calc(var(--cw) * 1.9);
  height: calc(var(--ch) * 0.92);
  border-radius: calc(var(--cw) * 0.1);
  transform-origin: 50% 100%;
  background: #fdfdfe;
  box-shadow:
    inset 0 0 0 1px rgba(8, 13, 23, 0.06),
    0 14px 22px -12px rgba(8, 13, 23, 0.5);
  transition: transform 0.6s var(--ease);
}

.peek-page--2 {
  background: #e2e6ed;
  transform: translateX(calc(-50% + 12px)) translateY(-10px) rotate(6deg);
}

.peek-page--1 {
  background: #eef1f5;
  transform: translateX(calc(-50% + 6px)) translateY(-5px) rotate(3deg);
  animation: peek-page-lift 3.2s ease-in-out infinite;
}

.peek-page--0 {
  z-index: 2;
  transform: translateX(-50%) rotate(-2deg);
  animation: peek-page-bob 3.2s ease-in-out infinite;
}

/* the open page: its picture on the left, lines of text on the right */
.peek-page-img {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 50%;
  border-radius: calc(var(--cw) * 0.06);
}

.peek-page--0::after {
  content: "";
  position: absolute;
  top: 22%;
  right: 8%;
  width: 34%;
  height: 50%;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 0 / 40% 3px no-repeat,
    linear-gradient(#1b2231, #1b2231) 0 30% / 100% 3px no-repeat,
    linear-gradient(#1b2231, #1b2231) 0 48% / 80% 3px no-repeat,
    linear-gradient(#b8c0cf, #b8c0cf) 0 72% / 100% 2px no-repeat,
    linear-gradient(#b8c0cf, #b8c0cf) 0 88% / 70% 2px no-repeat;
}

@keyframes peek-page-bob {
  0%,
  100% {
    transform: translateX(-50%) rotate(-2deg);
  }
  50% {
    transform: translateX(-50%) translateY(-5px) rotate(-3deg);
  }
}

@keyframes peek-page-lift {
  0%,
  100% {
    transform: translateX(calc(-50% + 6px)) translateY(-5px) rotate(3deg);
  }
  50% {
    transform: translateX(calc(-50% + 9px)) translateY(-8px) rotate(5deg);
  }
}

.peek:hover .peek-page,
.peek:focus-visible .peek-page {
  animation: none;
}

.peek:hover .peek-page--0,
.peek:focus-visible .peek-page--0 {
  transform: translateX(-50%) translateY(-10px) rotate(0);
}

.peek:hover .peek-page--1,
.peek:focus-visible .peek-page--1 {
  transform: translateX(calc(-50% + 14px)) translateY(-8px) rotate(6deg);
}

.peek:hover .peek-page--2,
.peek:focus-visible .peek-page--2 {
  transform: translateX(calc(-50% + 26px)) translateY(-12px) rotate(11deg);
}

/* Contact's preview: a mounted photo (two, overlapping, when there are more) */
.peek-photo {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: calc(var(--cw) * 1.7);
  height: calc(var(--ch) * 0.98);
  border: 5px solid #fbfbfc;
  border-bottom-width: 15px;
  border-radius: 3px;
  transform-origin: 50% 100%;
  box-shadow: 0 14px 22px -12px rgba(8, 13, 23, 0.55);
  transition: transform 0.6s var(--ease);
}

.peek-photo--0 {
  z-index: 2;
  transform: translateX(-50%) rotate(-5deg);
  animation: peek-photo-sway 3.6s ease-in-out infinite;
}

.peek-photo--1 {
  transform: translateX(calc(-50% + 16px)) translateY(-6px) rotate(7deg);
}

@keyframes peek-photo-sway {
  0%,
  100% {
    transform: translateX(-50%) rotate(-5deg);
  }
  50% {
    transform: translateX(-50%) translateY(-5px) rotate(-3deg);
  }
}

.peek:hover .peek-photo,
.peek:focus-visible .peek-photo {
  animation: none;
}

.peek:hover .peek-photo--0,
.peek:focus-visible .peek-photo--0 {
  transform: translateX(calc(-50% - 8px)) translateY(-10px) rotate(-2deg) scale(1.04);
}

.peek:hover .peek-photo--1,
.peek:focus-visible .peek-photo--1 {
  transform: translateX(calc(-50% + 26px)) translateY(-10px) rotate(10deg);
}

/* ---------- Blog extras: the newest post, search, reading progress ---------- */

.card-new {
  margin: 0 8px 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 12px rgba(47, 109, 255, 0.45);
}

.notes-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 20px clamp(20px, 3vw, 36px) 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notes-tools .notes-filters {
  padding: 0;
  border: 0;
}

.notes-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(260px, 100%);
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s, background 0.3s;
}

.notes-search:focus-within {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.notes-search svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: rgba(236, 243, 250, 0.5);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.notes-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--fg);
}

.notes-search input::placeholder {
  color: rgba(236, 243, 250, 0.4);
}

.notes-empty {
  margin: 48px 0;
  text-align: center;
  font-size: 14px;
  color: rgba(236, 243, 250, 0.5);
}

.notes-empty[hidden] {
  display: none;
}

.reader-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 3px;
  background: rgba(8, 13, 23, 0.06);
}

.reader-progress i {
  display: block;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* the menu sits just above the word, leaving the ring the space above */
body[data-view="cards"] .strip {
  top: 83%;
}

/* on the Blog page the word lies further back and a little smaller, so it
   rests wholly below the menu and leaves the ring room to breathe */
body[data-view="cards"] .word {
  font-size: calc(var(--word-size, 23vw) * 0.8);
  transform: rotateX(calc(var(--word-tilt, 72deg) + 11deg)) skewX(var(--word-skew, -8deg))
    scaleY(var(--word-stretch, 1.25));
}

/* the deck: cards standing in the light pool, lit like everything else */
/* the ring hangs in the light just under the lamp, above the menu */
.blog {
  position: fixed;
  left: 0;
  right: 0;
  top: 24%;
  height: 57%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}

body[data-view="cards"][data-layout="ring"] .blog {
  opacity: calc(var(--ink-opacity, 0) * var(--ink-fade, 1));
  pointer-events: auto;
}

/* ---------- About (story) and Contact (frame): content standing in the light ---------- */

.story,
.frame {
  position: fixed;
  left: 0;
  right: 0;
  top: 25%;
  bottom: 18%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 var(--gutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}

body[data-view="cards"][data-layout="story"] .story,
body[data-view="cards"][data-layout="frame"] .frame {
  opacity: calc(var(--ink-opacity, 0) * var(--ink-fade, 1));
  pointer-events: auto;
}

/* these views are for reading: the light controller steps aside, as it does for a post */
body[data-view="cards"]:is([data-layout="story"], [data-layout="frame"]) .ctrl {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.story .deck-nav,
.frame .deck-nav {
  position: static;
  transform: none;
}

/* the story: one chapter at a time on a dark panel, picture | words */
.story-panel {
  flex: 1;
  min-height: 0;
  max-height: 440px;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-radius: 22px;
  overflow: hidden;
  color: var(--fg);
  background: linear-gradient(180deg, rgba(20, 21, 27, 0.95), rgba(10, 11, 15, 0.97));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 40px 70px -30px rgba(0, 0, 0, 0.7),
    0 12px 30px -12px rgba(0, 0, 0, 0.4);
  touch-action: pan-y;
  user-select: none;
}

.story-media {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.story-img {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.story-img.is-on {
  opacity: 1;
}

.story-cap,
.frame-cap {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.story-cap {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: calc(100% - 32px);
  padding: 6px 11px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(8, 10, 16, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.story-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: clamp(24px, 3.2vw, 48px);
}

.story-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-soft);
}

.story-num {
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: rgba(236, 243, 250, 0.42);
}

.story-title {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.story-body {
  margin: 16px 0 0;
  max-width: 44ch;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  color: rgba(236, 243, 250, 0.7);
}

.story-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.story-facts li {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* chapter tabs: the table of contents, in the bar */
.story-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  pointer-events: auto;
  background: rgba(16, 17, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.story-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: rgba(236, 243, 250, 0.55);
  transition: color 0.3s, background 0.35s var(--ease);
}

.story-tab-num {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.story-tab:hover {
  color: #fff;
}

.story-tab[aria-selected="true"] {
  color: #fff;
  background: var(--blue);
}

.story-tab[aria-selected="true"] .story-tab-num {
  opacity: 1;
}

/* the frame: a mounted print on the floor, the ways in on a pale card beside it */
.frame-panel {
  flex: 1;
  min-height: 0;
  max-height: 460px;
  width: min(1020px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
}

.frame-media {
  position: relative;
  height: 100%;
  max-height: 420px;
  margin: 0;
  border-radius: 4px;
  background: #f6f7f9;
  box-shadow:
    0 34px 60px -30px rgba(8, 13, 23, 0.6),
    0 10px 20px -12px rgba(8, 13, 23, 0.3);
  transform: rotate(-1deg);
  transition: transform 0.6s var(--ease);
}

.frame-media:hover {
  transform: rotate(0);
}

.frame-media.is-many {
  cursor: pointer;
}

.frame-window {
  position: absolute;
  inset: 12px 12px 42px;
  overflow: hidden;
  border-radius: 2px;
  background: #0c0d14;
}

.frame-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
}

/* the picture drifts slowly while it is on show */
.frame-img.is-on {
  opacity: 1;
  animation: frame-drift 18s ease-in-out infinite alternate;
}

@keyframes frame-drift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07) translate(-1%, -1%);
  }
}

.frame-cap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #4b5468;
}

.frame-side {
  align-self: center;
  padding: clamp(20px, 2.2vw, 30px);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(250, 251, 253, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 24px 50px -28px rgba(8, 13, 23, 0.45);
}

.frame-kicker {
  position: relative;
  margin: 0;
  padding-left: 19px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
}

.frame-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(47, 109, 255, 0.14);
}

.frame-title {
  margin: 12px 0 0;
  font-size: clamp(21px, 1.9vw, 28px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.frame-lede {
  margin: 8px 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #4b5468;
}

.frame-ways {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.way {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px 7px 7px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(8, 13, 23, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

.way:hover,
.way:focus-visible {
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(47, 109, 255, 0.45),
    0 10px 20px -12px rgba(47, 109, 255, 0.4);
}

.way-art {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.way-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.way-text strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 600;
}

.way-text small {
  font-size: 12px;
  color: #6a7385;
}

.way-go svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}

.way:hover .way-go svg {
  transform: translateX(3px);
}

.frame-count {
  display: grid;
  place-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--fg);
  background: rgba(16, 17, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.deck {
  position: relative;
  flex: 1;
  perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.deck:active {
  cursor: grabbing;
}

.deck-track {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
}

/* portrait picture cards on a ring: logo tile and tag, a glass pill, and a
   two-weight title over the picture */
.card {
  position: absolute;
  left: 0;
  top: 0;
  width: 208px;
  height: 290px;
  display: flex;
  flex-direction: column;
  padding: 13px;
  border-radius: 21px;
  overflow: hidden;
  text-align: left;
  color: #fff;
  background: #0c0d14;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 34px 60px -24px rgba(0, 0, 0, 0.65);
  backface-visibility: hidden;
  will-change: transform, filter;
}

.card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* a scrim under the title so it always reads over the picture */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0) 48%, rgba(5, 6, 10, 0.72) 100%);
  pointer-events: none;
}

.card > :not(.card-art) {
  position: relative;
  z-index: 2;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.card-mark svg {
  width: 16px;
  height: 16px;
}

.card-tag {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

.card-pill {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 9px 9px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-pill-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-pill-text small {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.card-pill-text span {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.card-plus {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  transition: background 0.3s, transform 0.4s var(--ease);
}

.card.is-front:hover .card-plus,
.card.is-front:focus-visible .card-plus {
  background: var(--blue);
  transform: rotate(90deg);
}

.card-title {
  margin-top: auto;
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.card-lead {
  display: block;
  font-weight: 300;
}

.card-title strong {
  display: block;
  font-weight: 700;
}

.card:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 4px;
}

/* one control bar under the ring: previous · All notes · next, clear of the
   side cards and of the word below */
.deck-nav {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.deck-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  pointer-events: auto;
  color: var(--fg);
  background: rgba(16, 17, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.3s, opacity 0.3s;
}

.deck-btn:hover:not(:disabled) {
  background: rgba(34, 36, 42, 0.94);
}

.deck-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.deck-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the position is announced to screen readers; each card shows its own number */
.deck-count {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Close: first in the bar, the one way back to the text */
.deck-close {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin-right: 6px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  pointer-events: auto;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  background: rgba(16, 17, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

.deck-close:hover {
  background: rgba(34, 36, 42, 0.94);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.deck-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* About / Contact have no index: the bar shows where you are on the ring */
.blog:not([data-kind="blog"]) .deck-all {
  display: none;
}

.blog:not([data-kind="blog"]) .deck-count {
  position: static;
  width: auto;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  overflow: visible;
  clip-path: none;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--fg);
  background: rgba(16, 17, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* "All notes": a glass pill between the arrows, styled like the controller */
.deck-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 7px 0 14px;
  border-radius: 999px;
  pointer-events: auto;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  background: rgba(16, 17, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

.deck-all:hover {
  background: rgba(34, 36, 42, 0.94);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(47, 109, 255, 0.35);
}

.deck-all svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  opacity: 0.8;
}

.deck-all-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: var(--blue);
}

/* ---------- index: every note on one glass sheet ---------- */

.notes {
  --w: min(1180px, calc(100vw - 2 * var(--gutter)));
  position: fixed;
  z-index: 25;
  top: calc(var(--nav-h) + 20px);
  bottom: 20px;
  left: calc(50% - var(--w) / 2);
  width: var(--w);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  color: var(--fg);
  background: linear-gradient(180deg, rgba(24, 25, 30, 0.9), rgba(12, 13, 16, 0.92));
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.notes[hidden] {
  display: none;
}

.notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 36px) 0;
}

.notes-kicker {
  position: relative;
  margin: 0 0 12px;
  padding-left: 19px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue-soft);
}

.notes-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(47, 109, 255, 0.18);
}

.notes-title {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.notes-count {
  margin-left: 10px;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: 0.5em;
  color: rgba(236, 243, 250, 0.45);
}

/* the reader's round close button, recoloured for the dark sheet */
.notes .notes-close {
  position: static;
  flex: none;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.notes .notes-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* topic filters, as a row of pills with counts */
.notes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px clamp(20px, 3vw, 36px) 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notes-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(236, 243, 250, 0.62);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}

.notes-chip small {
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(236, 243, 250, 0.38);
}

.notes-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.notes-chip[aria-pressed="true"] {
  color: #fff;
  background: rgba(47, 109, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(47, 109, 255, 0.6);
}

.notes-chip[aria-pressed="true"] small {
  color: var(--blue-ice);
}

.notes-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  padding: clamp(20px, 2.6vw, 30px) clamp(20px, 3vw, 36px) 36px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: clamp(18px, 2vw, 28px) clamp(14px, 1.6vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-item[hidden] {
  display: none;
}

/* tiles arrive one after another, in reading order */
.notes-grid.is-in .notes-item {
  animation: tile-in 0.7s var(--ease) both;
  animation-delay: calc(var(--k, 0) * 40ms + 120ms);
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.tile {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-align: left;
  border-radius: 16px;
}

/* the picture: the same light drawing as the card on the ring */
.tile-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 16 / 10;
  padding: 11px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 36px -20px rgba(0, 0, 0, 0.8);
  transition: transform 0.55s var(--ease), filter 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.tile-art .card-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.tile-art .card-mark svg {
  width: 14px;
  height: 14px;
}

.tile-num {
  align-self: flex-end;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
}

.tile-text {
  display: flex;
  flex-direction: column;
  padding: 14px 2px 0;
}

.tile-meta {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(199, 221, 255, 0.5);
}

.tile-title {
  margin-top: 7px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}

.tile-sub {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(236, 243, 250, 0.55);
}

.tile:hover .tile-art,
.tile:focus-visible .tile-art {
  transform: translateY(-4px);
  filter: brightness(1.15);
  box-shadow:
    inset 0 0 0 1px rgba(47, 109, 255, 0.55),
    0 26px 40px -20px rgba(0, 0, 0, 0.85);
}

.tile:hover .tile-title,
.tile:focus-visible .tile-title {
  color: var(--blue-ice);
}

.tile:focus-visible {
  outline-offset: 6px;
}

/* the latest note leads: two columns wide, picture beside the words */
@media (min-width: 720px) {
  .notes-item.is-lead {
    grid-column: span 2;
  }
  .notes-item.is-lead .tile {
    flex-direction: row;
    align-items: stretch;
    gap: clamp(16px, 2vw, 26px);
  }
  .notes-item.is-lead .tile-art {
    flex: 0 0 56%;
    aspect-ratio: auto;
    min-height: 100%;
  }
  .notes-item.is-lead .tile-text {
    justify-content: flex-end;
    padding: 4px 0 6px;
  }
  .notes-item.is-lead .tile-title {
    font-size: clamp(20px, 1.9vw, 27px);
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .notes-item.is-lead .tile-sub {
    font-size: 14.5px;
  }
}

body.is-reading .deck-all {
  pointer-events: none;
}

/* ---------- reading: the lamp lifts away, the floor copy sinks, the card opens ---------- */

.word-layer,
.ctrl {
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}

body.is-reading .copy,
body.is-reading .word-layer,
body.is-reading .blog {
  opacity: 0 !important;
  transform: translateY(6vh);
  pointer-events: none !important;
}

body.is-reading .copy {
  transition: opacity 0.45s var(--ease), transform 0.8s var(--ease);
}

body.is-reading .ctrl {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.reader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: radial-gradient(120% 90% at 50% 55%, rgba(10, 10, 12, 0.1), rgba(10, 10, 12, 0.55));
  animation: fade-in 0.6s var(--ease) both;
}

body:not(.is-reading) .reader-backdrop {
  animation: fade-out 0.4s var(--ease) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

.reader {
  --w: min(760px, calc(100vw - 2 * var(--gutter)));
  position: fixed;
  z-index: 25;
  top: calc(var(--nav-h) + 20px);
  bottom: 20px;
  left: calc(50% - var(--w) / 2);
  width: var(--w);
  transform-origin: 0 0;
  border-radius: 20px;
  background: #f7f9fd;
  color: var(--ink);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.reader[hidden],
.reader-backdrop[hidden] {
  display: none;
}

.reader-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 13, 23, 0.06);
  color: var(--ink);
  transition: background 0.3s;
}

.reader-close:hover {
  background: rgba(8, 13, 23, 0.12);
}

.reader-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.reader-scroll {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 13, 23, 0.22) transparent;
  overscroll-behavior: contain;
  padding: clamp(40px, 6vw, 72px) clamp(22px, 7vw, 84px) 64px;
}

.reader-scroll:focus-visible {
  outline: none;
}

.reader-hero {
  height: clamp(160px, 26vh, 240px);
  margin-bottom: 30px;
  border-radius: 14px;
}

.reader-eyebrow {
  position: relative;
  margin: 0 0 22px;
  padding-left: 19px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
}

.reader-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(34, 119, 255, 0.14);
}

.reader-title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.reader-sub {
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: #4b5468;
}

.reader-body {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid rgba(8, 13, 23, 0.1);
  max-width: 62ch;
}

.reader-body h2 {
  margin: 34px 0 10px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.reader-body p {
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.72;
  color: #2a3345;
}

/* the one thing a Contact card asks you to do */
.reader-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  height: 46px;
  padding: 0 20px 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--blue);
  box-shadow: 0 12px 28px rgba(47, 109, 255, 0.3);
  transition: background 0.3s, box-shadow 0.3s, transform 0.4s var(--ease);
}

.reader-cta:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(47, 109, 255, 0.36);
}

.reader-cta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}

.reader-cta:hover svg {
  transform: translateX(3px);
}

.reader-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(8, 13, 23, 0.1);
}

.reader-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.reader-link:hover {
  color: var(--blue);
}

.reader-link.is-next {
  align-items: flex-end;
  text-align: right;
}

.reader-next-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a7385;
}

.reader-next-title {
  font-size: 15px;
}

/* ---------- debug ---------- */

.debug {
  position: fixed;
  left: 12px;
  top: calc(var(--nav-h) + 56px);
  z-index: 40;
  max-width: 46ch;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(6, 11, 19, 0.86);
  border: 1px solid rgba(47, 109, 255, 0.35);
  color: var(--blue-ice);
  font: 500 11px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: pre-wrap;
}

/* ---------- responsive (same breakpoints as the homepage) ---------- */

@media (max-width: 860px) {
  .nav-brand img {
    height: 30px;
  }
}

@media (max-width: 900px), (aspect-ratio < 1.15) {
  .ctrl {
    top: calc(var(--nav-h) + 12px);
    width: min(296px, calc(100vw - 2 * var(--gutter)));
  }
  /* phones: the channel meters give way, the controller stays compact */
  .dmx {
    display: none;
  }
  .ctrl-power {
    padding: 10px 14px 9px;
  }
  .ctrl-row {
    margin: 9px 0 5px;
  }
  .seg {
    margin-top: 10px;
  }
  .fx button {
    flex-direction: row;
    justify-content: center;
    gap: 3px;
    padding: 5px 0;
    font-size: 10px;
  }
  .fx svg {
    width: 14px;
    height: 14px;
  }
  .dim {
    margin-bottom: 10px;
  }
  /* stacked: the copy, then the preview as a compact row under it */
  .lede {
    top: 52%;
    flex-direction: column;
    gap: 16px;
  }
  .lede-text,
  .lede.has-peek .lede-text {
    align-items: center;
    max-width: min(42ch, 84vw);
    text-align: center;
  }
  .body {
    line-height: 1.6;
  }
  .peek {
    --cw: 40px;
    --ch: 55px;
    --spread: 22px;
    flex-direction: row;
    gap: 12px;
  }
  .strip {
    top: 72%;
    gap: 6px 14px;
    padding: 0 8vw;
  }
  /* the preview takes a row, so the menu sits a little lower */
  body[data-view="text"] .lede.has-peek ~ .strip {
    top: 81%;
  }
  body[data-view="cards"] .strip {
    top: 85.5%;
  }
  .blog {
    top: 37%;
    height: 42%;
  }
  .card {
    width: 158px;
    height: 220px;
    padding: 12px;
    border-radius: 18px;
  }
  .card-pill-text span {
    font-size: 12px;
  }
  .deck-btn {
    width: 30px;
    height: 30px;
  }
  .deck-close {
    height: 30px;
  }
  /* About / Contact fill the screen between the header and the menu, stacked */
  .story,
  .frame {
    top: calc(var(--nav-h) + 12px);
    bottom: 16%;
    gap: 12px;
  }
  .story-panel {
    max-height: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 40%) minmax(0, 1fr);
  }
  .story-text {
    justify-content: flex-start;
    padding: 18px 20px;
    overflow-y: auto;
  }
  .story-eyebrow {
    margin-bottom: 10px;
  }
  .story-title {
    font-size: 22px;
  }
  .story-body {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
  }
  .story-facts {
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
  }
  .story-facts li {
    padding: 5px 9px;
    font-size: 11px;
  }
  .story-tab {
    padding: 0 9px;
  }
  .story-tab:not([aria-selected="true"]) .story-tab-label {
    display: none;
  }
  .frame-panel {
    max-height: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(150px, 34%) auto;
    align-items: stretch;
    gap: 14px;
    overflow-y: auto;
  }
  .frame-media {
    max-height: none;
    transform: none;
  }
  .frame-side {
    padding: 16px;
  }
  .frame-title {
    margin-top: 8px;
    font-size: 20px;
  }
  .frame-lede {
    display: none;
  }
  .frame-ways {
    margin-top: 12px;
  }
  .frame-count {
    height: 30px;
    padding: 0 12px;
  }
  /* the ring sits a little higher so the control bar clears the front card */
  .deck-track {
    top: 46%;
  }
  .deck-nav {
    bottom: -18px;
  }
  .blog:not([data-kind="blog"]) .deck-count {
    height: 30px;
    padding: 0 12px;
  }
  .deck-all {
    height: 30px;
  }
  .card-title {
    font-size: 17px;
  }
  .reader {
    top: calc(var(--nav-h) + 10px);
    bottom: 10px;
  }
}

/* phones: two compact columns, the lead tile full width on top */
@media (max-width: 640px) {
  .notes {
    top: calc(var(--nav-h) + 10px);
    bottom: 10px;
    border-radius: 18px;
  }
  .notes-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .notes-chip {
    flex: none;
  }
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .notes-item.is-lead {
    grid-column: 1 / -1;
  }
  .notes-item:not(.is-lead) .tile-sub {
    display: none;
  }
  .notes-item:not(.is-lead) .tile-title {
    font-size: 14px;
  }
  .tile-art .card-tag {
    font-size: 10.5px;
  }
}

/* ---------- cursor (cursor.js; mouse only) ---------- */

/* the drawn cursor replaces the system one, except where text is typed */
html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}

html.has-cursor :is(input:not([type="range"]), textarea) {
  cursor: text !important;
}

.cursor-dot,
.cursor-ring,
.cursor-label {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

html.cursor-on .cursor-dot,
html.cursor-on .cursor-ring {
  opacity: 1;
}

/* the dot and ring invert what is under them, so they read on light and dark */
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 0;
  height: 0;
  mix-blend-mode: difference;
}

.cursor-ring-i {
  position: absolute;
  left: -18px;
  top: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  transition:
    transform 0.45s var(--ease),
    opacity 0.3s var(--ease),
    border-width 0.3s var(--ease);
}

/* over a link or a button: the ring opens up around it, the dot steps back */
html[data-cursor="hover"] .cursor-ring-i {
  transform: scale(1.5);
  border-width: 1px;
}

html[data-cursor="hover"] .cursor-dot {
  transform-origin: center;
  opacity: 0.5;
}

/* pressing: the ring tightens */
html.cursor-down .cursor-ring-i {
  transform: scale(0.72);
}

html.cursor-down[data-cursor="hover"] .cursor-ring-i {
  transform: scale(1.2);
}

/* over something to use: the ring becomes a label that says what a click does */
.cursor-label {
  width: 0;
  height: 0;
}

.cursor-label-i {
  position: absolute;
  left: 0;
  top: 0;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font: 700 10.5px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 22px rgba(47, 109, 255, 0.45);
  transform: translate(-50%, -50%) scale(0.4);
  transition: transform 0.45s var(--ease);
}

html.cursor-on[data-cursor="label"] .cursor-label {
  opacity: 1;
}

html[data-cursor="label"] .cursor-label-i {
  transform: translate(-50%, -50%) scale(1);
}

html.cursor-down[data-cursor="label"] .cursor-label-i {
  transform: translate(-50%, -50%) scale(0.88);
}

html[data-cursor="label"] .cursor-ring-i {
  transform: scale(0.2);
  opacity: 0;
}

html[data-cursor="label"] .cursor-dot {
  opacity: 0;
}

/* typing: the system text cursor takes over */
html[data-cursor="text"] .cursor-dot,
html[data-cursor="text"] .cursor-ring {
  opacity: 0;
}

/* a ripple of light from each click */
.cursor-ripple {
  position: fixed;
  z-index: 999;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  pointer-events: none;
  mix-blend-mode: difference;
  animation: cursor-ripple 0.65s var(--ease) forwards;
}

@keyframes cursor-ripple {
  from {
    transform: scale(0.4);
    opacity: 0.9;
  }
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notes-grid.is-in .notes-item,
  .lede,
  .peek *,
  .peek {
    animation: none !important;
    transition: none !important;
  }
  .word,
  .copy,
  .ctrl *,
  .strip > button,
  .strip > button::after {
    transition: none !important;
  }
}
