:root {
  --rl-measure: 68ch;

  --rl-container: var(--rh-container-wide);
  --rl-gutter: var(--rh-space-4);

  --rl-flow: var(--rh-space-8);

  --rl-text-pagetitle: var(--rh-weight-black) var(--rh-text-3xl)/var(--rh-leading-tight) var(--rh-font-display);

  --rl-text-meta: var(--rh-gray-600);
}

@media (min-width: 40rem) {
  :root {
    --rl-gutter: var(--rh-gutter);
    --rl-flow: var(--rh-space-10);

    --rl-text-pagetitle: var(--rh-text-h1);
  }
}

.rl-wrap {
  width: 100%;
  max-width: var(--rl-container);
  margin-inline: auto;
  padding-inline: var(--rl-gutter);
}

.rl-wrap--measure { max-width: var(--rl-measure); }

.rl-measured { max-width: var(--rl-measure); }

.rl-proto {
  background: var(--rh-warning-100);
  color: var(--rh-gray-900);
  border-color: var(--rh-warning-600);
  font-family: var(--rh-font-mono);
  letter-spacing: var(--rh-tracking-eyebrow);
  text-transform: uppercase;
}

.rl-protoband {
  display: flex;
  align-items: center;
  gap: var(--rh-space-3);
  margin: 0 0 var(--rh-space-6);
  padding: var(--rh-space-3) var(--rh-space-4);
  background: var(--rh-warning-100);
  border-left: var(--rh-border-width-strong) solid var(--rh-warning-600);
  border-radius: var(--rh-radius-sm);
  color: var(--rh-gray-900);
  font: var(--rh-text-caption);
}

.rh-btn { text-decoration: none; }

[data-theme="dark"] {
  --rh-text-strong: var(--rh-white);

  --rl-text-meta: var(--rh-text-muted);
}

.rh-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 2000;
  block-size: 3px;
  inline-size: 0;
  background: var(--rh-red-600);
  opacity: 0;
  pointer-events: none;
}

.rh-progress--on {
  opacity: 1;
  inline-size: 90%;
  transition: inline-size 8s cubic-bezier(0.05, 0.7, 0.1, 1), opacity var(--rh-dur-fast) var(--rh-ease);
}

.rh-progress--done {
  opacity: 0;
  inline-size: 100%;
  transition: inline-size var(--rh-dur-fast) var(--rh-ease-out), opacity var(--rh-dur) var(--rh-ease) 80ms;
}

@media (prefers-reduced-motion: reduce) {
  .rh-progress,
  .rh-progress--on,
  .rh-progress--done { transition: none; }

  .rh-progress--on { inline-size: 100%; }
}

.rl-skel__card {
  block-size: 5.5rem;
  border-radius: var(--rh-radius-sm);
  background: linear-gradient(
    90deg,
    var(--rh-surface-subtle) 0%,
    var(--rh-surface-sunken) 50%,
    var(--rh-surface-subtle) 100%);
  background-size: 200% 100%;
  animation: rl-skel-sweep 1.4s linear infinite;
}

@keyframes rl-skel-sweep {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.rl-arrived { animation: rl-arrive 120ms var(--rh-ease-out) both; }

@keyframes rl-arrive {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .rl-skel__card { animation: none; background: var(--rh-surface-subtle); }
  .rl-arrived { animation: none; }
}

.rh-veil {
  position: fixed;
  inset: 0;
  z-index: 1999;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--rh-surface) 78%, transparent);
  backdrop-filter: blur(2px);

  pointer-events: none;

  opacity: 0;
  visibility: hidden;
  transition: opacity var(--rh-dur) var(--rh-ease), visibility 0s linear var(--rh-dur);
}

.rh-veil--on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--rh-dur) var(--rh-ease-out), visibility 0s;
}

.rh-veil__box { display: grid; place-items: center; }

.rh-veil__ring {
  position: relative;
  inline-size: 4.5rem;
  block-size: 4.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--rh-radius-full);
  border: 3px solid var(--rh-border);
  border-block-start-color: var(--rh-red-600);
  animation: rh-veil-turn 900ms linear infinite;
}

.rh-veil__mark {
  inline-size: 2rem;
  block-size: 2rem;
  animation: rh-veil-turn 900ms linear infinite reverse;
}

@keyframes rh-veil-turn {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rh-veil { transition: none; background: color-mix(in srgb, var(--rh-surface) 60%, transparent); }
  .rh-veil__ring,
  .rh-veil__mark { animation: none; }
  .rh-veil__ring { border-block-start-color: var(--rh-red-600); }
}

@media print {
  .rh-veil { display: none; }
}

.rl-viewing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--rh-space-2) var(--rh-space-4);
  padding: var(--rh-space-2) var(--rl-gutter);
  background: var(--rh-accent);
  color: var(--rh-white);
  border-block-end: var(--rh-border-width) solid var(--rh-accent-active);
  font: var(--rh-text-caption);
}

.rl-viewing__says {
  margin: 0;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.rl-viewing__says b { font-weight: var(--rh-weight-bold); }

.rl-viewing__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rh-space-2) var(--rh-space-4);
}

.rl-viewing__actions form { margin: 0; }

.rl-viewing__link,
.rl-viewing__link:visited,
.rl-viewing__link:hover {
  color: var(--rh-white);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.rl-viewing__link:hover { text-decoration-thickness: 2px; }

.rl-viewing__link:focus-visible,
.rl-viewing .rh-btn:focus-visible {
  outline: 2px solid var(--rh-white);
  outline-offset: 2px;
  box-shadow: none;
  border-radius: var(--rh-radius-md);
}

@media print {
  .rl-viewing { display: none; }
}
