/* Eye Tracker website.
   Layout: the grammar of the OS display settings (numbered display tiles,
   Identify numerals, setting rows with real defaults).
   Colour: a broadcast test card. A dark signal ground, the seven SMPTE colour
   bars, and one signal yellow that marks only where the gaze is: the looked-at
   display, the selection, focus and the primary action. The looked-at display
   carries the full-strength bars; the others dim to a slate.
   Text uses the visitor's own system face. No web fonts, nothing loaded from
   other sites. */

:root {
  color-scheme: dark;

  /* SMPTE colour bars, left to right */
  --bar-white: #d9d9d9;
  --bar-yellow: #f5d90a;
  --bar-cyan: #22d3e6;
  --bar-green: #3ccf4e;
  --bar-magenta: #d63ad0;
  --bar-red: #f0453a;
  --bar-blue: #3b5bff;
  --bars: linear-gradient(90deg,
    var(--bar-white) 0 14.285%, var(--bar-yellow) 0 28.57%, var(--bar-cyan) 0 42.855%,
    var(--bar-green) 0 57.14%, var(--bar-magenta) 0 71.425%, var(--bar-red) 0 85.71%,
    var(--bar-blue) 0 100%);

  --bg: #0f1012;
  --bg-band: #15161a;
  --surface: #1c1d22;
  --surface-hover: #23252b;
  --surface-sunken: #17181c;
  --border: #2c2e35;
  --border-strong: #3d4049;
  --control: #24262c;
  --control-hover: #2c2f36;
  --control-border: #3a3d46;
  --control-edge: #30333b;

  --text: #f4f4f5;
  --text-2: #b9bbc2;
  --text-3: #9a9ca4;

  /* The signal: gaze, selection, focus, primary action */
  --accent: #f5d90a;
  --accent-hover: #ffe53d;
  --accent-press: #d9c000;
  --accent-text: #f5d90a;
  --accent-soft: #24220e;
  --on-accent: #0f1012;
  --on-accent-2: #3a3300;

  --link: #4fdbec;

  --ink: #050506;
  --on-ink: #ffffff;

  --canvas: #0a0b0d;
  --canvas-grid: #1d1f24;
  --bezel: #000000;
  --win: #1f2127;
  --win-bar: #33363e;
  --win-line: #464a54;
  --tok-1: var(--bar-cyan);
  --tok-2: var(--bar-magenta);
  --tok-3: var(--bar-green);

  --yes: #3ccf4e;
  --no: #ff6a5f;
  --focus: #f5d90a;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.35);

  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "SF Pro Text", system-ui, Cantarell, Ubuntu, "Noto Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "SF Pro Display", system-ui, Cantarell, Ubuntu, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.55, 0, 0, 1);
  --radius-control: 4px;
  --radius-card: 8px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 120px);
}

/* The colour-bar strip: under the top bar, above the closing band. */
.bars {
  display: block;
  height: 4px;
  background: var(--bars);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scrollbar-color: var(--border-strong) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 4.2vw, 54px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.skip-link:hover {
  color: var(--on-accent);
}

/* ---------- Buttons (accent and standard, as the OS draws them) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--control-border);
  border-bottom-color: var(--control-edge);
  border-radius: var(--radius-control);
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 167ms var(--ease), color 167ms var(--ease),
    border-color 167ms var(--ease);
}

.btn:hover {
  background: var(--control-hover);
  text-decoration: none;
}

.btn:active {
  color: var(--text-2);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-accent {
  border-color: transparent;
  border-bottom-color: rgba(0, 0, 0, 0.3);
  background: var(--accent);
  color: var(--on-accent);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn-accent:active {
  background: var(--accent-press);
  color: var(--on-accent-2);
}

.btn-meta {
  font-weight: 400;
  opacity: 0.82;
}

.btn-meta:empty {
  display: none;
}

.btn-sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 14px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms var(--ease);
}

.topbar.scrolled {
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin: 0 0 0 8px;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
  transition: background-color 167ms var(--ease), color 167ms var(--ease);
}

.nav-links a:hover {
  background: var(--control-hover);
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Segmented control (language) */
.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--surface-sunken);
}

.segmented > * {
  min-width: 40px;
  padding: 4px 10px;
  border-radius: var(--radius-control);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.segmented a:hover {
  color: var(--text);
  background: var(--control-hover);
}

.segmented [aria-current] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--control-border), var(--shadow-card);
}

.github-link {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 14px;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 span {
  display: block;
}

.lead {
  max-width: 34em;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  margin-top: 20px;
  color: var(--text-3);
  font-size: 14px;
}

.hero-meta a {
  color: inherit;
}

/* ---------- Display arrangement (the hero demo) ---------- */

.arrange {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.arrange-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.arrange-title {
  font-size: 14px;
  font-weight: 600;
}

.arrange-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
}

.arrange-live .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yes);
}

.arrange-canvas {
  position: relative;
  padding: 80px clamp(16px, 3vw, 36px) 112px;
  background-color: var(--canvas);
  /* A test card's convergence grid */
  background-image: linear-gradient(var(--canvas-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--canvas-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
}

.cam {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--control);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  transform: translateX(-50%);
}

.cam svg {
  width: 14px;
  height: 14px;
}

.cam .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ccb5f;
}

.tiles {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.6vw, 18px);
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  aspect-ratio: 16 / 10;
}

.tile .screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 5px solid var(--bezel);
  border-radius: 6px;
  background: var(--bars);
  transition: box-shadow 250ms var(--ease);
}

/* Displays you are not looking at dim to a slate; the looked-at one carries
   the full signal. */
.tile .screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0b0c0f;
  opacity: 0.8;
  transition: opacity 333ms var(--ease);
}

.tile[aria-pressed="true"] .screen::before {
  opacity: 0.12;
}

.tile[aria-pressed="true"] .screen {
  box-shadow: 0 0 0 3px var(--accent);
}

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

/* Mini windows inside each display */
.win {
  position: absolute;
  inset: 11% 10% 15%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 4px;
  background: var(--win);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  opacity: 0.72;
  transition: opacity 250ms var(--ease);
}

.tile[aria-pressed="true"] .win {
  opacity: 1;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 14%;
  min-height: 9px;
  padding: 0 6%;
  background: var(--win-bar);
  transition: background-color 250ms var(--ease);
}

.tile[aria-pressed="true"] .win-bar {
  background: var(--accent);
}

.win-bar i {
  width: 22%;
  height: 28%;
  border-radius: 2px;
  background: var(--win-line);
}

.tile[aria-pressed="true"] .win-bar i {
  background: var(--on-accent);
  opacity: 0.7;
}

.win-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7%;
  padding: 8% 8%;
}

.win-body i {
  display: block;
  height: 5%;
  min-height: 3px;
  border-radius: 2px;
  background: var(--win-line);
}

.win-doc .win-body i:nth-child(1) { width: 58%; height: 8%; }
.win-doc .win-body i:nth-child(2) { width: 92%; }
.win-doc .win-body i:nth-child(3) { width: 86%; }
.win-doc .win-body i:nth-child(4) { width: 90%; }
.win-doc .win-body i:nth-child(5) { width: 64%; }

.win-code .win-body i:nth-child(1) { width: 34%; background: var(--tok-1); }
.win-code .win-body i:nth-child(2) { width: 58%; margin-left: 10%; background: var(--tok-2); }
.win-code .win-body i:nth-child(3) { width: 46%; margin-left: 10%; }
.win-code .win-body i:nth-child(4) { width: 38%; margin-left: 20%; background: var(--tok-3); }
.win-code .win-body i:nth-child(5) { width: 12%; }

.caret {
  position: absolute;
  width: 2px;
  height: 11%;
  min-height: 8px;
  background: var(--text);
  opacity: 0;
}

.win-doc .caret { left: 74%; top: 57%; }
.win-code .caret { left: 62%; top: 59%; }

/* Display 2 holds one window split in two panes: a terminal and an AI chat.
   Only the focused pane carries the signal; the other stays grey. */
.win-split {
  inset: 9% 6% 13%;
  flex-direction: row;
  gap: 2px;
  background: var(--bezel);
}

.pane {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  background: var(--win);
}

.tile[aria-pressed="true"] .pane:not(.is-focus) .win-bar {
  background: var(--win-bar);
}

.tile[aria-pressed="true"] .pane:not(.is-focus) .win-bar i {
  background: var(--win-line);
  opacity: 1;
}

.tile[aria-pressed="true"] .pane:not(.is-focus) .caret {
  animation: none;
  opacity: 0;
}

.pane-term .win-body i:nth-child(1) { width: 70%; background: var(--tok-3); }
.pane-term .win-body i:nth-child(2) { width: 88%; }
.pane-term .win-body i:nth-child(3) { width: 56%; background: var(--tok-1); }
.pane-term .win-body i:nth-child(4) { width: 80%; }
.pane-term .win-body i:nth-child(5) { width: 22%; background: var(--tok-3); }
.pane-term .caret { left: 34%; top: 72%; }

.pane-chat .win-body i:nth-child(1) { width: 62%; height: 9%; margin-left: auto; background: var(--tok-2); }
.pane-chat .win-body i:nth-child(2) { width: 86%; height: 9%; }
.pane-chat .win-body i:nth-child(3) { width: 70%; height: 9%; }

.composer {
  position: relative;
  margin-top: auto;
  height: 16%;
  min-height: 8px;
  border: 1px solid var(--win-line);
  border-radius: 3px;
  transition: border-color 250ms var(--ease);
}

.tile[aria-pressed="true"] .pane.is-focus .composer {
  border-color: var(--accent);
}

.composer .caret {
  left: 8%;
  top: 18%;
  height: 64%;
}

.tile[aria-pressed="true"] .caret {
  animation: caret 1.06s steps(1) infinite;
}

@keyframes caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Identify numerals: small on each display, full size while identifying */
.tile-num {
  position: absolute;
  left: 11px;
  bottom: 11px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 250ms var(--ease), color 250ms var(--ease),
    min-width 333ms var(--ease), height 333ms var(--ease), font-size 333ms var(--ease),
    font-weight 333ms var(--ease);
}

.tile[aria-pressed="true"] .tile-num {
  background: var(--accent);
  color: var(--on-accent);
}

.arrange.identifying .tile-num {
  min-width: 42%;
  height: 58%;
  font-size: clamp(44px, 6.5vw, 88px);
  font-weight: 300;
  background: var(--ink);
  color: var(--on-ink);
}

/* Pointer, gaze ray and desk zone are placed by site.js */
.pointer,
.ray,
.desk {
  display: none;
}

.js .pointer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  display: block;
  width: 17px;
  height: 25px;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.js .ray {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: block;
  height: 0;
  transform-origin: 0 50%;
  border-top: 2px dashed var(--accent);
  pointer-events: none;
}

.js .desk {
  position: absolute;
  left: clamp(16px, 3vw, 36px);
  bottom: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
  transition: color 250ms var(--ease), border-color 250ms var(--ease),
    background-color 250ms var(--ease);
}

/* The viewer's eyes, where you sit: the irises turn towards what is looked
   at, and the gaze ray starts between them. */
.eyes,
.gaze-dot {
  display: none;
}

.js .eyes {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto auto;
  justify-items: center;
  gap: 4px 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.eye {
  position: relative;
  width: 34px;
  height: 20px;
  overflow: hidden;
  border-radius: 50%;
  background: #ececee;
  box-shadow: 0 0 0 2px var(--canvas), 0 0 0 3px var(--border-strong);
}

.eye i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle, #050506 0 30%, var(--bar-cyan) 34% 66%, #0d4a52 70%);
  transition: transform 300ms var(--ease-in-out);
}

/* An occasional blink */
.eye::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #2a2c33;
  transform: scaleY(0);
  transform-origin: top;
  animation: blink 6.5s infinite;
}

@keyframes blink {
  0%, 95%, 100% { transform: scaleY(0); }
  97% { transform: scaleY(1); }
}

.eyes b {
  grid-column: 1 / -1;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* The gaze point: the ring fills while a glance dwells; the switch follows. */
.js .gaze-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: block;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  pointer-events: none;
}

.gaze-dot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.gaze-track {
  fill: rgba(245, 217, 10, 0.16);
  stroke: var(--accent);
  stroke-opacity: 0.35;
  stroke-width: 2;
}

.gaze-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 101;
  stroke-dashoffset: 101;
}

.gaze-dot.dwelling .gaze-fill {
  animation: dwell var(--dwell, 700ms) linear forwards;
}

.gaze-dot.settled .gaze-fill {
  stroke-dashoffset: 0;
}

.gaze-dot.settled svg {
  animation: settle 420ms var(--ease);
}

@keyframes dwell {
  to { stroke-dashoffset: 0; }
}

@keyframes settle {
  0% { transform: rotate(-90deg) scale(1); }
  45% { transform: rotate(-90deg) scale(1.25); }
  100% { transform: rotate(-90deg) scale(1); }
}

.arrange.away .gaze-track {
  fill: rgba(255, 255, 255, 0.08);
  stroke: var(--text-2);
}

.arrange.away .gaze-fill {
  stroke: var(--text-2);
}

.desk svg {
  width: 14px;
  height: 14px;
}

.arrange.away .desk {
  border-style: solid;
  border-color: var(--text-2);
  background: var(--surface);
  color: var(--text);
}

.arrange-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 2.7em;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
}

.status svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent-text);
}

/* ---------- Sections ---------- */

.section {
  padding: var(--section) 0;
}

.band {
  background: var(--bg-band);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.section-head p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 18px;
}

/* ---------- Measured (a display-information list) ---------- */

.measured {
  padding: 0 0 var(--section);
}

.props {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.props h2 {
  font-size: clamp(26px, 2.6vw, 32px);
}

.props-intro p {
  margin-top: 12px;
  color: var(--text-2);
}

.prop-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.prop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
}

.prop:nth-child(-n + 2) {
  border-top: 0;
}

.prop:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.prop dt {
  color: var(--text-2);
  font-size: 14px;
}

.prop dd {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  text-align: right;
}

.prop dd strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 8px;
  align-items: start;
}

.identify {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}

/* Each step takes a bar colour, as a test card's ident boxes do. */
.step:nth-child(1) .identify { background: var(--bar-cyan); color: var(--ink); }
.step:nth-child(2) .identify { background: var(--bar-magenta); color: var(--ink); }
.step:nth-child(3) .identify { background: var(--bar-green); color: var(--ink); }

.step h3 {
  padding-top: 2px;
  font-size: 22px;
}

.step p {
  color: var(--text-2);
}

/* ---------- Settings (the feature list) ---------- */

.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(24px, 3vw, 40px);
  align-items: start;
}

.settings-group h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.settings-group.wide {
  grid-column: 1 / -1;
}

.settings-group.wide .rows {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 40px);
}

.rows {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.row > svg {
  width: 20px;
  height: 20px;
  color: var(--text);
}

.row strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.row p {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  white-space: nowrap;
}

/* Read-only toggle switch, as the app's settings show it */
.switch {
  position: relative;
  width: 40px;
  height: 20px;
  border: 1px solid var(--text-2);
  border-radius: 999px;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-2);
}

.switch.on {
  border-color: var(--accent);
  background: var(--accent);
}

.switch.on::after {
  left: 23px;
  background: var(--on-accent);
}

/* Read-only combo box */
.combo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  padding: 4px 10px 4px 12px;
  border: 1px solid var(--control-border);
  border-bottom-color: var(--control-edge);
  border-radius: var(--radius-control);
  background: var(--control);
  color: var(--text);
}

.combo svg {
  width: 12px;
  height: 12px;
  color: var(--text-2);
}

kbd {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--control-border);
  border-bottom-width: 2px;
  border-radius: var(--radius-control);
  background: var(--control);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.value code {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-sunken);
  color: var(--text);
  font-size: 13px;
}

.settings-note {
  margin-top: 28px;
  color: var(--text-3);
  font-size: 14px;
}

/* ---------- Privacy (one settings card, rows split by hairlines) ---------- */

.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.privacy-grid .section-head {
  margin-bottom: 32px;
}

.notice {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.notice h3 {
  font-size: 17px;
}

.notice p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 15px;
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.verified svg {
  width: 18px;
  height: 18px;
  color: var(--text);
}

.rows.joined {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.rows.joined .row {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.rows.joined .row:first-child {
  border-top: 0;
}

.value strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Comparison ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

thead th {
  border-top: 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

tbody th {
  width: 34%;
  color: var(--text);
  font-weight: 600;
}

td {
  color: var(--text-2);
}

/* The Eye Tracker column is the selected one. */
td.us,
th.us {
  background: var(--accent-soft);
  color: var(--text);
}

thead th.us {
  color: var(--accent-text);
  box-shadow: inset 0 3px 0 var(--accent);
}

.mark {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.mark svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex: none;
}

.mark.yes svg {
  color: var(--yes);
}

.mark.no svg {
  color: var(--no);
}

/* ---------- Downloads (one tile per OS; the visitor's is selected) ---------- */

.downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
}

.download {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow 250ms var(--ease), border-color 250ms var(--ease);
}

.download.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-raised);
}

.download-screen {
  position: relative;
  display: grid;
  place-items: center;
  height: 112px;
  margin: 10px 10px 0;
  overflow: hidden;
  border: 4px solid var(--bezel);
  border-radius: 6px;
  background: var(--bars);
  color: var(--on-ink);
}

.download-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0b0c0f;
  opacity: 0.8;
  transition: opacity 333ms var(--ease);
}

.download.recommended .download-screen::before {
  opacity: 0.12;
}

/* The OS mark sits in a channel-ident box, readable over the bars. */
.download-screen > svg {
  position: relative;
  width: 64px;
  height: 52px;
  padding: 12px 18px;
  border-radius: 6px;
  background: var(--ink);
}

.download .tile-num {
  left: 7px;
  bottom: 7px;
  min-width: 22px;
  height: 22px;
  font-size: 13px;
}

.download.recommended .tile-num {
  background: var(--accent);
  color: var(--on-accent);
}

.badge {
  position: absolute;
  top: 7px;
  right: 7px;
  display: none;
  padding: 3px 8px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
}

.download.recommended .badge {
  display: block;
}

.download-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.download h3 {
  font-size: 20px;
}

.req {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 14px;
}

.download-files {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.download-files .btn {
  justify-content: space-between;
  width: 100%;
}

.download .note {
  margin-top: auto;
  padding-top: 16px;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.5;
}

.download-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  font-size: 14px;
}

.source {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: center;
  margin-top: 40px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.source p {
  color: var(--text-2);
  font-size: 15px;
}

.source strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
}

.source pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--ink);
  color: #ececec;
  font-size: 13.5px;
  line-height: 1.7;
}

.source pre::selection,
.source pre ::selection {
  background: var(--accent);
  color: #000000;
}

/* ---------- FAQ (expanders) ---------- */

.faq {
  display: grid;
  gap: 4px;
  max-width: 880px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 20px;
  border-radius: 6px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  background: var(--surface-hover);
}

.faq summary svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--text-2);
  transition: transform 250ms var(--ease);
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
}

.faq details[open] summary svg {
  transform: rotate(180deg);
}

.faq details p {
  max-width: 68ch;
  padding: 16px 20px 20px;
  color: var(--text-2);
}

/* ---------- Closing band ---------- */

.closing {
  background: var(--bg-band);
}

.closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  padding: clamp(56px, 7vw, 88px) 0;
}

.closing p {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 18px;
}

.closing .actions {
  margin-top: 0;
}

/* ---------- Footer ---------- */

.footer {
  padding: 56px 0 40px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-about p {
  max-width: 36ch;
  margin-top: 12px;
  color: var(--text-2);
}

.footer-title {
  margin-bottom: 10px;
  font-weight: 600;
}

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

.footer ul a {
  color: var(--text-2);
  text-decoration: none;
}

.footer ul a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .hero-grid,
  .props,
  .privacy-grid,
  .settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    max-width: 680px;
  }
}

@media (max-width: 820px) {
  .steps,
  .downloads,
  .source,
  .settings-group.wide .rows {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .github-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .github-link {
    padding: 6px 10px;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .arrange-canvas {
    padding: 70px 12px 104px;
  }

  .tile-num {
    left: 8px;
    bottom: 8px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 12px;
  }

  .tile .screen {
    border-width: 4px;
  }

  .arrange-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .row {
    grid-template-columns: 20px minmax(0, 1fr);
    row-gap: 10px;
  }

  .row .value {
    grid-column: 2;
  }

  .prop-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .prop:nth-child(2) {
    border-top: 1px solid var(--border);
  }

  .prop:nth-child(odd) {
    border-right: 0;
  }

  .closing .actions {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .tile[aria-pressed="true"] .caret {
    opacity: 1;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Animate the pointer and ray only after the first placement, so the page
   does not open with them flying in from the corner. */
.arrange.ready .pointer {
  transition: transform 560ms var(--ease-in-out);
}

.arrange.ready .gaze-dot {
  transition: transform 380ms var(--ease-in-out);
}

.arrange.ready .ray {
  transition: transform 420ms var(--ease);
}
