/* MushrifLoop — the project page. One stylesheet for both languages; logical properties keep it right in RTL. */

@font-face {
  font-family: 'Readex Pro';
  src: url('fonts/readex-pro-latin.woff2') format('woff2');
  font-weight: 160 700;
  font-display: swap;
  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: 'Readex Pro';
  src: url('fonts/readex-pro-arabic.woff2') format('woff2');
  font-weight: 160 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
    U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --paper: #f5f1e8;
  --paper-2: #ece6d8;
  --card: #fbf9f4;
  --ink: #16181c;
  --ink-2: #4a4e57;
  --line: #d6cfbf;
  --planner: #2fa3c7;
  --planner-ink: #0f6f8c;
  --executor: #f0803c;
  --executor-ink: #b9500f;
  --shadow: 0 1px 0 rgba(22, 24, 28, 0.04), 0 18px 40px -24px rgba(22, 24, 28, 0.35);
  --sans: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111419;
    --paper-2: #171b22;
    --card: #1a1f27;
    --ink: #ece8df;
    --ink-2: #a4a9b3;
    --line: #2c323c;
    --planner-ink: #6cc7e3;
    --executor-ink: #f6a473;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  /* A drafting-paper grid: the page is a working surface, not a poster. */
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 330;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* The grid fades out behind the text columns. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 0%, transparent 0%, var(--paper) 78%);
  pointer-events: none;
  z-index: 0;
}
main,
header,
footer {
  position: relative;
  z-index: 1;
}
a {
  color: inherit;
  text-decoration-color: var(--planner);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-color: var(--executor);
}
:focus-visible {
  outline: 3px solid var(--planner);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* ── top bar ─────────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 560;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
}
.top nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.top nav a {
  text-decoration: none;
  color: var(--ink-2);
}
.top nav a:hover {
  color: var(--ink);
}
.top nav .lang {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 14px;
  background: var(--card);
}

/* ── hero ────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
  padding-block: 44px 72px;
}
.eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.eyebrow .word {
  font-size: 30px;
  font-weight: 520;
  color: var(--ink);
  line-height: 1;
}
.eyebrow i {
  font-style: normal;
  color: var(--line);
}
h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 620;
  margin: 0 0 22px;
  text-wrap: balance;
}
[dir='rtl'] h1 {
  letter-spacing: 0;
  line-height: 1.25;
}
h1 .p {
  color: var(--planner-ink);
}
h1 .e {
  color: var(--executor-ink);
}
.lede {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 34em;
  margin: 0 0 30px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 520;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn.primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--executor);
}
.btn.primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--planner);
}
[dir='rtl'] .btn.primary {
  box-shadow: -5px 5px 0 var(--executor);
}
[dir='rtl'] .btn.primary:hover {
  transform: translate(2px, -2px);
  box-shadow: -7px 7px 0 var(--planner);
}
.btn.ghost {
  background: var(--card);
}
.btn.ghost:hover {
  transform: translateY(-2px);
}
.meta {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
.meta b {
  font-weight: 500;
  color: var(--ink);
}

/* ── the loop diagram ────────────────────────────────────── */
.loop {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  --gate: #7a4fe0;
  --cycle: 7.4s;
  --begin: 2.8s;
}
@media (prefers-color-scheme: dark) {
  .loop {
    --gate: #a78bfa;
  }
}
.loop .ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 3 9;
  stroke-linecap: round;
}
.loop .arc {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 471;
  stroke-dashoffset: 471;
  animation: draw 1.6s 0.5s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
.loop .arc.out {
  stroke: var(--planner);
}
.loop .arc.back {
  stroke: var(--executor);
  animation-delay: 1.3s;
}
.loop text {
  font-family: var(--sans);
}
.loop .flow {
  font-size: 12.5px;
  fill: var(--ink-2);
}
/* A node: its body, the coloured bar clipped to the rounded shape, and the frame drawn last, whole. */
.loop .node .body {
  fill: var(--card);
}
.loop .node .edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  animation: var(--cycle) var(--begin) infinite;
}
.loop .node.planner .edge {
  animation-name: planner-lit;
}
.loop .node.executor .edge {
  animation-name: executor-lit;
}
.loop .node .name {
  font-size: 19px;
  font-weight: 580;
  fill: var(--ink);
}
.loop .node .does {
  font-size: 12.5px;
  fill: var(--ink-2);
}
/* A checkpoint: a badge on the track. It fills when the token waits under it. */
.loop .gate .pill {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 1.5;
  animation: var(--cycle) var(--begin) infinite;
}
.loop .gate text {
  font-size: 12.5px;
  fill: var(--ink);
  animation: var(--cycle) var(--begin) infinite;
}
.loop .gate .icon {
  fill: none;
  stroke: var(--gate);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: var(--cycle) var(--begin) infinite;
}
.loop .gate .pupil {
  fill: var(--gate);
  animation: var(--cycle) var(--begin) infinite;
}
.loop .gate.approval .pill {
  animation-name: approval-pill;
}
.loop .gate.approval text {
  animation-name: approval-ink;
}
.loop .gate.approval .icon {
  animation-name: approval-icon;
}
.loop .gate.review .pill {
  animation-name: review-pill;
}
.loop .gate.review text,
.loop .gate.review .pupil {
  animation-name: review-ink;
}
.loop .gate.review .icon {
  animation-name: review-icon;
}
.loop .hub circle {
  fill: var(--card);
  stroke: var(--line);
  stroke-width: 1.5;
}
.loop .hub text {
  font-size: 12.5px;
  fill: var(--ink-2);
  text-anchor: middle;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
/* One cycle of 7.4 s: 1.6 s between two stops, 0.2 s at a node, 0.3 s at a checkpoint (computed from the diagram's
   geometry, not tuned by hand). A shape is lit from the moment the token touches its edge to the moment
   the token starts to come out of it. */
@keyframes planner-lit {
  0%, 7.7% { stroke: var(--planner); stroke-width: 3.5; }
  11.76%, 89.36% { stroke: var(--ink); stroke-width: 1.5; }
  92.07%, 100% { stroke: var(--planner); stroke-width: 3.5; }
}
@keyframes executor-lit {
  0%, 39.36% { stroke: var(--ink); stroke-width: 1.5; }
  42.07%, 57.7% { stroke: var(--executor); stroke-width: 3.5; }
  61.76%, 100% { stroke: var(--ink); stroke-width: 1.5; }
}
@keyframes approval-pill {
  0%, 15% { fill: var(--card); stroke: var(--ink); }
  17.7%, 31.19% { fill: var(--gate); stroke: var(--gate); }
  35.24%, 100% { fill: var(--card); stroke: var(--ink); }
}
@keyframes approval-ink {
  0%, 15% { fill: var(--ink); }
  17.7%, 31.19% { fill: var(--paper); }
  35.24%, 100% { fill: var(--ink); }
}
@keyframes approval-icon {
  0%, 15% { stroke: var(--gate); }
  17.7%, 31.19% { stroke: var(--paper); }
  35.24%, 100% { stroke: var(--gate); }
}
@keyframes review-pill {
  0%, 65% { fill: var(--card); stroke: var(--ink); }
  67.7%, 81.19% { fill: var(--gate); stroke: var(--gate); }
  85.24%, 100% { fill: var(--card); stroke: var(--ink); }
}
@keyframes review-ink {
  0%, 65% { fill: var(--ink); }
  67.7%, 81.19% { fill: var(--paper); }
  85.24%, 100% { fill: var(--ink); }
}
@keyframes review-icon {
  0%, 65% { stroke: var(--gate); }
  67.7%, 81.19% { stroke: var(--paper); }
  85.24%, 100% { stroke: var(--gate); }
}

/* ── sections ────────────────────────────────────────────── */
section {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}
.kicker {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 10px;
}
[dir='rtl'] .kicker {
  letter-spacing: 0;
  font-size: 15px;
}
h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 14px;
  max-width: 20em;
  text-wrap: balance;
}
[dir='rtl'] h2 {
  letter-spacing: 0;
  line-height: 1.35;
}
.sub {
  color: var(--ink-2);
  max-width: 44em;
  margin: 0 0 36px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 22px 22px 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 54px;
  line-height: 1;
  font-weight: 640;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  color: var(--planner-ink);
}
.steps li:nth-child(2)::before {
  color: var(--executor-ink);
}
.steps li:nth-child(3)::before {
  background: linear-gradient(90deg, var(--planner-ink), var(--executor-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: max-content;
}
.steps h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 560;
}
.steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}

.holds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.holds li {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 16px;
  padding-block: 15px;
  border-bottom: 1px dashed var(--line);
  font-size: 16px;
}
.holds b {
  font-weight: 540;
}
.holds span {
  color: var(--ink-2);
}

.plain {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
}
.plain .box {
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  padding: 28px 30px;
  font-size: 17px;
}
.plain .box p {
  margin: 0 0 14px;
}
.plain .box p:last-child {
  margin: 0;
  opacity: 0.75;
  font-size: 15.5px;
}

.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.install ol {
  margin: 0;
  padding-inline-start: 1.3em;
}
.install li {
  margin-bottom: 12px;
}
.note {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-inline-start: 8px solid var(--executor);
  border-radius: 14px;
  padding: 20px 22px;
  font-size: 16px;
}
.note h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 560;
}
.note p {
  margin: 0 0 12px;
  color: var(--ink-2);
}
pre {
  margin: 0;
  padding: 12px 14px;
  background: var(--paper-2);
  border-radius: 10px;
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-size: 13.5px;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  white-space: pre;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 6px;
  direction: ltr;
  unicode-bidi: isolate;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding: 0;
  margin: 0;
  list-style: none;
}
/* ── the app's own screens ───────────────────────────────── */
/* One screen at a time: the list at the side chooses it. The radios and the checkbox do the work, so no script. */
.tour {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-top: 30px;
}
.tour input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tabs {
  display: grid;
  gap: 4px;
}
.tab {
  position: relative;
  display: block;
  cursor: pointer;
  padding: 12px 18px;
  border-inline-start: 3px solid var(--line);
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.55;
}
.tab b {
  display: block;
  color: var(--ink);
  font-weight: 560;
  font-size: 18px;
}
.tab span {
  display: block;
}
.tab:hover {
  border-color: var(--ink-2);
}
/* The chosen item's mark lies over its border. While the screens take turns (site.js sets .auto) the mark fills
   in six seconds. It only draws the time: the clock that brings the next screen is in site.js. */
.tab::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: -3px;
  width: 3px;
  background: var(--planner);
  transform: scaleY(0);
  transform-origin: top;
}
.tab:has(input:checked)::before {
  transform: scaleY(1);
}
.tour.auto .tab:has(input:checked)::before {
  animation: turn 6s linear both;
}
@keyframes turn {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
/* site.js sets .held while a mouse is over the screens: its clock and this drawing stop and go on together. */
.tour.auto.held .tab:has(input:checked)::before {
  animation-play-state: paused;
}
.tour.auto.held .segs i::after {
  animation-play-state: paused !important;
}
.tab:has(input:checked) {
  background: var(--card);
  box-shadow: var(--shadow);
  border-start-end-radius: 12px;
  border-end-end-radius: 12px;
}
.tab:has(input:focus-visible),
.flip:has(input:focus-visible) {
  outline: 3px solid var(--planner);
  outline-offset: 3px;
}
.stage {
  display: grid;
  justify-items: end;
  gap: 12px;
}
.segs {
  display: none;
}
.rail {
  justify-self: stretch;
}
.frame {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--card);
}
/* A frame shows either the whole screen or a part of it: --z is the picture's width, --x and --y move it. */
.frame img {
  position: absolute;
  max-width: none;
  height: auto;
  width: var(--z, 100%);
  left: var(--x, 0);
  top: var(--y, 0);
  /* A picture that has just been shown (another screen, or the other theme) fades in. */
  animation: shown 0.45s ease both;
}
@keyframes shown {
  from {
    opacity: 0;
  }
}
.tour:has(#tour-1:checked) .f1,
.tour:has(#tour-2:checked) .f2,
.tour:has(#tour-3:checked) .f3,
.tour:has(#tour-4:checked) .f4 {
  display: block;
}
/* The screens follow the device's theme; the switch shows the other one. */
.tour .d {
  display: none;
}
.tour:has(.flip input:checked) .l {
  display: none;
}
.tour:has(.flip input:checked) .d {
  display: block;
}
.flip {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.flip span {
  padding: 2px 14px;
  border-radius: 999px;
}
.flip .lt,
.flip:has(input:checked) .dk {
  background: var(--ink);
  color: var(--paper);
}
.flip:has(input:checked) .lt {
  background: none;
  color: inherit;
}
@media (prefers-color-scheme: dark) {
  .tour .l {
    display: none;
  }
  .tour .d {
    display: block;
  }
  .tour:has(.flip input:checked) .l {
    display: block;
  }
  .tour:has(.flip input:checked) .d {
    display: none;
  }
  .flip .dk,
  .flip:has(input:checked) .lt {
    background: var(--ink);
    color: var(--paper);
  }
  .flip .lt,
  .flip:has(input:checked) .dk {
    background: none;
    color: inherit;
  }
}
/* A browser without :has() shows the four screens one under the other, in the device's theme. */
@supports not selector(:has(a)) {
  .frame {
    display: block;
  }
  .flip {
    display: none;
  }
}

.facts.gets {
  row-gap: 34px;
}
.facts li {
  border-top: 3px solid var(--ink);
  padding-top: 14px;
  color: var(--ink-2);
  font-size: 16px;
}
.facts b {
  display: block;
  color: var(--ink);
  font-weight: 560;
  font-size: 18px;
  margin-bottom: 4px;
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 34px 56px;
  color: var(--ink-2);
  font-size: 14.5px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
}
footer p {
  margin: 0;
  max-width: 46em;
}

/* ── a page of text: the code signing policy ─────────────── */
.doc-head {
  padding-block: 36px 60px;
}
.doc-head h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  max-width: 18em;
}
.doc-head .note {
  max-width: 44em;
}
.doc-head .note p {
  margin: 0;
}
.prose > p,
.prose > ol {
  max-width: 44em;
}
.prose > p {
  color: var(--ink-2);
  margin: 0 0 14px;
}
.prose > p b {
  color: var(--ink);
  font-weight: 540;
}
.prose > ol {
  margin: 0;
  padding-inline-start: 1.3em;
}
.prose > ol li {
  margin-bottom: 12px;
}
.prose > .credit {
  color: var(--ink);
  font-size: 19px;
  font-weight: 460;
  margin-bottom: 18px;
}
.holds.one {
  grid-template-columns: minmax(0, 1fr);
}
.holds.one li {
  grid-template-columns: 220px minmax(0, 1fr);
}
.holds i {
  font-style: normal;
  color: var(--ink);
}
/* An English label inside Arabic text breaks badly across lines, so it keeps to one. */
[dir='rtl'] .holds i[dir='ltr'] {
  white-space: nowrap;
}
.sub.after {
  margin: 24px 0 0;
  font-size: 15.5px;
}
@media (max-width: 520px) {
  .holds.one li {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── arrival ─────────────────────────────────────────────── */
.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.rise.d1 {
  animation-delay: 0.08s;
}
.rise.d2 {
  animation-delay: 0.18s;
}
.rise.d3 {
  animation-delay: 0.28s;
}
.rise.d4 {
  animation-delay: 0.38s;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
/* Blocks below the first screen wait, then rise in when they scroll into view (site.js adds the classes). */
.wait {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.wait.in {
  opacity: 1;
  transform: none;
}
@media print {
  .wait {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rise,
  .loop .arc {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
  .loop .node .edge,
  .loop .gate .pill,
  .loop .gate text,
  .loop .gate .icon,
  .loop .gate .pupil,
  .frame img {
    animation: none;
  }
  .loop .token {
    display: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 880px) {
  .hero,
  .plain,
  .install {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-block: 20px 48px;
  }
  .steps,
  .facts,
  .tour {
    grid-template-columns: minmax(0, 1fr);
  }
  /* On a narrow screen the list is short: only the chosen screen keeps its sentence. */
  .tour {
    gap: 18px;
  }
  .tab {
    padding-block: 8px;
  }
  .tab span {
    display: none;
  }
  .tab:has(input:checked) span {
    display: block;
  }
  /* With the script (it sets .live) a phone gets the screens as a rail to swipe: a bar of four segments over
     it shows the place and fills with the turn, and the chosen screen's words sit under the rail. */
  .tour.live {
    gap: 12px;
  }
  .tour.live .stage {
    display: contents;
  }
  .tour.live .segs {
    order: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .segs i {
    position: relative;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--line);
  }
  .segs i::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--planner);
    transform: scaleX(0);
    transform-origin: left;
  }
  [dir='rtl'] .segs i::after {
    transform-origin: right;
  }
  .tour:has(#tour-1:checked) .segs i:nth-child(-n + 1)::after,
  .tour:has(#tour-2:checked) .segs i:nth-child(-n + 2)::after,
  .tour:has(#tour-3:checked) .segs i:nth-child(-n + 3)::after,
  .tour:has(#tour-4:checked) .segs i:nth-child(-n + 4)::after {
    transform: scaleX(1);
  }
  .tour.auto:has(#tour-1:checked) .segs i:nth-child(1)::after,
  .tour.auto:has(#tour-2:checked) .segs i:nth-child(2)::after,
  .tour.auto:has(#tour-3:checked) .segs i:nth-child(3)::after,
  .tour.auto:has(#tour-4:checked) .segs i:nth-child(4)::after {
    animation: turn-x 6s linear both;
  }
  @keyframes turn-x {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
  /* The rail runs to the screen's edges, so the next screen shows its side and asks to be pulled in. */
  .tour.live .rail {
    order: 2;
    display: flex;
    gap: 12px;
    margin-inline: -24px;
    padding-inline: 24px;
    scroll-padding-inline: 24px;
    padding-block: 2px 26px;
    margin-bottom: -22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .tour.live .rail::-webkit-scrollbar {
    display: none;
  }
  .tour.live .frame {
    display: block;
    flex: 0 0 88%;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
  }
  .tour.live .frame img {
    width: var(--mz, 100%);
    left: var(--mx, 0);
    top: var(--my, 0);
  }
  /* The four items lie on one another, so the place keeps one height whichever is shown. */
  .tour.live .tabs {
    order: 3;
    gap: 0;
  }
  .tour.live .tab {
    grid-area: 1 / 1;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    cursor: default;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .tour.live .tab:has(input:checked) {
    visibility: visible;
    opacity: 1;
  }
  .tour.live .tab::before {
    display: none;
  }
  .tour.live .tab span {
    display: block;
  }
  .tour.live .tab b {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .tour.live .tab b::after {
    color: var(--ink-2);
    font-weight: 330;
    font-size: 14px;
    direction: ltr;
    unicode-bidi: isolate;
  }
  .tour.live .tab:nth-child(1) b::after {
    content: '1 / 4';
  }
  .tour.live .tab:nth-child(2) b::after {
    content: '2 / 4';
  }
  .tour.live .tab:nth-child(3) b::after {
    content: '3 / 4';
  }
  .tour.live .tab:nth-child(4) b::after {
    content: '4 / 4';
  }
  .tour.live .flip {
    order: 4;
    justify-self: end;
  }
  .holds {
    grid-template-columns: minmax(0, 1fr);
  }
  .top nav a:not(.lang) {
    display: none;
  }
}
@media (max-width: 520px) {
  .holds li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  body {
    font-size: 16px;
  }
}
