/* The note and the introduction form one pair, each centred on the same axis. */
#source .how {
  grid-template: auto / minmax(0, .96fr) minmax(0, 1fr);
  align-items: center;
}
#source .how-heading { padding-top: 0; }
#source .how-explanation {
  font-size: 17px;
  line-height: 1.66;
  max-width: 32em;
}
#source .source-note {
  grid-area: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: clamp(24px, 2.7vw, 40px);
  background: #e5e5e5;
  color: #272727;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 9px 20px -18px rgb(0 0 0 / .27);
}
#source .source-note figcaption {
  margin: 0 0 18px;
  padding: 0;
  color: #222;
  border: 0;
  font-weight: 660;
}
#source .source-note blockquote {
  color: #424242;
  font-size: 17px;
  line-height: 1.6;
}
#source .source-note p + p { margin-top: 11px; }
#source .source-note .decision { color: #191919; }
#source .source-note .decision span { padding: 0; background: none; }

#shared-reading.source-scene {
  --scene-ground: #101010;
  --scene-ink: #f3f3f3;
  --scene-body: #bdbdbd;
  padding-block: clamp(48px, 6vw, 84px);
}
#shared-reading .scene-heading { display: block; padding: 0; border: 0; }
#shared-reading .scene-heading h2 {
  font-size: clamp(30px, 2.8vw, 40px);
  line-height: 1.18;
  text-wrap: balance;
}
#shared-reading .scene-heading h2 span { display: inline-block; }
#shared-reading .scene-heading p {
  max-width: 41em;
  margin-top: 12px;
  color: #bdbdbd;
  font-size: 16px;
  line-height: 1.6;
}
#shared-reading .scene-heading .storage-note {
  max-width: 54em;
  margin-top: 8px;
  color: #909090;
  font-size: 13px;
  line-height: 1.55;
}
#shared-reading .storage-note small { font-size: inherit; }
#shared-reading .scene-figure { margin-top: clamp(30px, 3.4vw, 50px); }
#shared-reading .scene-figure figcaption {
  padding: 0;
  margin-top: 26px;
  border: 0;
  color: #aaa;
  font-size: 14px;
}
.reading-diagram {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: 21% 5% 18% 7% 18% 10% 21%;
  align-items: center;
}
.reading-source { grid-area: 1 / 1; }
.reading-bridge { grid-area: 1 / 3; }
.reading-apps { grid-area: 1 / 5; }
.reading-result { grid-area: 1 / 7; }
.reading-bridge {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 18px 12px;
  isolation: isolate;
  --prism-peach: #e4b396;
  --prism-gold: #f3d9a2;
  --prism-mint: #a7dce0;
  --prism-blue: #99b8fa;
  --prism-lilac: #c8a1ee;
  --prism: linear-gradient(110deg, #f4e4be, #d6ebe6 34%, #bfd8fc 61%, #dfc5f0);
  background-color: #151518;
}
/* Both the hairline and its defocused reflection use the same moving spectrum. */
@property --reading-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 215deg;
}
.reading-coating, .reading-bridge::before, .reading-pixel-field {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.reading-coating {
  z-index: -2;
  --reading-angle: 215deg;
  --spectrum: conic-gradient(from var(--reading-angle),
    #2b3447, #365fdf 7%, #82d5ff 14%, #ffe6a4 22%, #51402d 28%, #252932 35%,
    #4e507f 44%, #a958ef 52%, #dfadff 57%, #555cdb 66%, #233451 73%,
    #5267b3 82%, #d49eb2 89%, #cfab86 93%, #2b3447);
}
.reading-coating::before, .reading-coating::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.reading-coating::before {
  inset: -2px;
  background-image: var(--spectrum);
  filter: blur(8px);
  opacity: .73;
}
.reading-coating::after {
  border: var(--wire-width) solid transparent;
  background:
    radial-gradient(ellipse at -8% -32%, rgb(234 241 249 / .19), transparent 54%) padding-box,
    linear-gradient(136deg, rgb(243 246 255 / .055), transparent 18%, rgb(228 237 246 / .028) 26%, transparent 45%) padding-box,
    linear-gradient(145deg, #232427, #151619 48%, #101114 85%) padding-box,
    var(--spectrum) border-box;
}
.reading-bridge::before {
  content: "";
  z-index: -1;
  background: radial-gradient(circle, rgb(222 235 245 / .16) 0 .43px, transparent .8px) 2px 1px / 6px 6px;
  mask-image: linear-gradient(153deg, #000, rgb(0 0 0 / .76) 37%, transparent 83%);
}
.reading-pixel-field {
  opacity: .23;
  background: var(--prism);
  mask: url("brands/bridge-pixels.webp") center 38.18182% / 100% 5600% no-repeat;
}
.reading-moai-mark {
  position: relative;
  display: block;
  width: min(79%, 128px);
  aspect-ratio: 101 / 28;
  background: var(--prism);
  mask: url("brands/reading-moai.svg") center / contain no-repeat;
}
.reading-bridge > .reading-ring { z-index: 1; }
.reading-bridge .ring-rail { stroke: none; }
.reading-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  fill: none;
  overflow: visible;
}
.reading-wire {
  stroke: #7c7c7c;
  stroke-width: var(--wire-width);
  stroke-linecap: round;
}
.reading-source, .reading-bridge, .reading-result, .reading-apps li {
  border-radius: 13px;
  box-shadow: 0 8px 16px -12px rgb(0 0 0 / .7);
}
.reading-source, .reading-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 154px;
  padding: 22px clamp(16px, 2vw, 29px);
}
.reading-source { background: #222; }
.reading-result { background: #262626; }
.reading-label { margin: 0; color: #b5b5b5; font-size: 13px; font-weight: 520; line-height: 1.45; }
.reading-quote {
  margin: 14px 0 0;
  color: #f0f0f0;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 570;
  line-height: 1.48;
  letter-spacing: -.045em;
}
.reading-quote { text-wrap: balance; }
.reading-example {
  position: absolute;
  right: 14px;
  bottom: 8px;
  color: #a5a5a5;
  font-size: 11px;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: .015em;
}
.reading-source, .reading-result { padding-block: 26px 34px; }
.reading-apps {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  min-height: 228px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.reading-apps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  min-height: 50px;
  padding: 8px clamp(12px, 2vw, 28px);
  background: #242424;
}
.reading-brand-icon { display: block; width: 25px; height: 25px; justify-self: center; }
.reading-brand-word { display: block; width: auto; max-width: 100%; height: 16px; justify-self: start; }
@media (max-width: 740px) {
  #source .how { grid-template: auto auto / minmax(0, 1fr); gap: 25px; }
  #source .how-explanation { margin-top: 16px; font-size: 16px; }
  #source .source-note { padding: 21px 20px; border-radius: 13px; }
  #source .source-note blockquote { font-size: 15px; }
  #source .source-note figcaption { margin-bottom: 13px; }
  #shared-reading.source-scene { padding-block: 36px; }
  #shared-reading .scene-heading h2 { font-size: clamp(26px, 7.2vw, 32px); }
  #shared-reading .scene-figure { margin-top: 25px; }
  #shared-reading .scene-figure figcaption { margin-top: 19px; }
}
@media (max-width: 880px) {
  .reading-diagram { max-width: 540px; margin-inline: auto; grid-template: auto 44px auto 218px auto / minmax(0, 1fr); }
  .reading-bridge {
    grid-area: 3 / 1;
    justify-self: center;
    width: min(76%, 310px);
    min-height: 100px;
    padding: 16px;
  }
  .reading-moai-mark { width: min(66%, 114px); }
  .reading-source { grid-area: 1 / 1; }
  .reading-result { grid-area: 5 / 1; }
  .reading-source, .reading-result { justify-self: center; width: min(100%, 420px); min-height: 98px; padding: 20px 20px 32px; }
  .reading-quote { margin-top: 7px; }
  .reading-apps {
    grid-area: 4 / 1;
    align-self: center;
    justify-self: center;
    width: min(60%, 242px);
    min-height: 0;
    grid-template: repeat(3, 44px) / minmax(0, 1fr);
    gap: 8px;
    padding-block: 16px;
  }
  .reading-apps li { grid-template-columns: 23px minmax(0, 1fr); min-height: 44px; padding: 6px clamp(12px, 4vw, 22px); }
  .reading-brand-icon { width: 22px; height: 22px; }
  .reading-brand-word { height: 14px; }
}

#shared-reading .scene-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.reading-motion-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #bbb;
  background: #222;
  cursor: pointer;
}
.reading-motion-toggle:is(:hover, :focus-visible) { color: white; }
.reading-motion-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.reading-motion-toggle svg { fill: currentColor; }
.reading-motion-toggle[hidden],
.reading-motion-toggle[data-paused="false"] .play-icon,
.reading-motion-toggle[data-paused="true"] .pause-icon { display: none; }

/* The edges and wires share one stroke weight and one signal clock. */
.reading-diagram { --wire-width: 1.5px; }
@media (max-width: 880px) { .reading-diagram { --wire-width: 1.25px; } }
.reading-source, .reading-bridge, .reading-result, .reading-apps li { position: relative; }
.reading-source { --signal-color: #f5f7f8; --ring-delay: 0s; }
.reading-bridge { --signal-color: var(--prism-blue); --ring-delay: 2.38s; }
.reading-brand--claude { --signal-color: #eda180; --ring-delay: 4.32s; }
.reading-brand--chatgpt { --signal-color: #86d9bd; --ring-delay: 4.44s; }
.reading-brand--gemini { --signal-color: #96b7ff; --ring-delay: 4.56s; }
.reading-result { --signal-color: #f5f7f8; --ring-delay: 7.25s; }
.reading-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  fill: none;
  color: var(--signal-color);
  stroke: currentColor;
  stroke-width: var(--ring-width, var(--wire-width));
  --half-stroke: calc(var(--ring-width, var(--wire-width)) / 2);
}
.reading-ring rect {
  x: var(--half-stroke);
  y: var(--half-stroke);
  width: calc(100% - var(--ring-width, var(--wire-width)));
  height: calc(100% - var(--ring-width, var(--wire-width)));
  rx: calc(13px - var(--half-stroke));
}
.ring-rail { opacity: .79; }
/* 2026-12-02: the other cards use a crisp hairline; the moAI card keeps the full wire weight. */
:is(.reading-source, .reading-result, .reading-apps li) { --ring-width: 1px; }
:is(.reading-source, .reading-result, .reading-apps li) .ring-rail { opacity: .94; }
.reading-traveller {
  offset-rotate: 0deg;
  offset-anchor: 0px 0px;
  fill: var(--traveller-color);
  opacity: 0;
  filter: drop-shadow(0 0 3px var(--traveller-color));
}
.reading-traveller .node-core { fill: #fff; }

.ring-halo, .ring-trail, .ring-tip {
  opacity: 0;
  stroke-linecap: round;
  stroke-dasharray: var(--dash) calc(100px - var(--dash));
}
.ring-trail { --dash: 8px; }
.ring-halo { --dash: 10px; stroke-width: 5px; filter: blur(3px); }
.ring-tip { --dash: 1.4px; stroke: color-mix(in srgb, currentColor 36%, white); filter: drop-shadow(0 0 3px currentColor); }
.reading-port { fill: #101010; stroke: var(--port-color); stroke-width: var(--wire-width); }
.reading-port-light { fill: #f7fcff; opacity: 0; filter: drop-shadow(0 0 3px var(--port-color)); }


#shared-reading .reading-light {
  opacity: 0;
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-width: var(--wire-width);
  stroke-linecap: round;
  stroke-dasharray: var(--dash) 200px;
  stroke-dashoffset: var(--dash);
}
.reading-light--halo { --dash: 13px; stroke: #bfced2; filter: blur(2.5px); }
#shared-reading .reading-light--halo { stroke-width: 4.5px; }
.reading-light--trail { --dash: 10px; stroke: #bfced2; }
.reading-light--tip { --dash: 2px; stroke: #f7fcff; filter: drop-shadow(0 0 2.5px #b9d7df); }

@media (prefers-reduced-motion: no-preference) {
  .light-in-view { --light-cycle: 9s; --light-state: paused; }
  .light-running { --light-state: running; }
  .light-in-view .reading-light {
    animation: reading-transit var(--light-cycle) ease-in-out var(--start) infinite both;
    animation-play-state: var(--light-state);
  }
  .light-in-view :is(.ring-halo, .ring-tip, .ring-trail) {
    animation: reading-orbit var(--light-cycle) linear var(--ring-delay) infinite both;
    animation-play-state: var(--light-state);
  }
  .light-in-view .ring-trail { --peak: .83; }
  .light-in-view .ring-halo { --peak: .76; }
  .light-in-view .ring-rail {
    animation: reading-rim var(--light-cycle) ease-out var(--ring-delay) infinite both;
    animation-play-state: var(--light-state);
  }
  .light-in-view .reading-port-light {
    animation: reading-contact var(--light-cycle) ease-in-out var(--start) infinite both;
    animation-play-state: var(--light-state);
  }
  .light-in-view .ring-tip { --peak: 1; }
  /* A short band of the same pixel field keeps moving between signals. */
  .light-in-view .reading-bridge::after {
    content: "";
    position: absolute;
    inset: 58% 0 0;
    z-index: -1;
    pointer-events: none;
    border-radius: 0 0 13px 13px;
    background: var(--prism);
    opacity: .22;
    mask: url("brands/bridge-pixels.webp") center 14.545455% / 100% 5600% no-repeat;
    animation: reading-idle-wave 3s steps(16, end) infinite alternate;
    animation-play-state: var(--light-state);
  }
  .light-in-view .reading-coating {
    animation: reading-refraction 12s linear infinite;
    animation-play-state: var(--light-state);
  }
  .light-in-view .reading-pixel-field {
    animation: reading-pixel-sweep 4.5s steps(28, end) infinite alternate;
    animation-play-state: var(--light-state);
  }
  .light-in-view .reading-traveller {
    animation: reading-node var(--light-cycle) ease-in-out var(--start) infinite both;
    animation-play-state: var(--light-state);
  }
  .light-in-view .reading-union {
    animation-name: reading-union;
  }
  .light-in-view .reading-result .reading-quote {
    animation: reading-arrival var(--light-cycle) linear infinite;
    animation-play-state: var(--light-state);
  }
}
@keyframes reading-orbit {
  0% { stroke-dashoffset: calc(var(--port) + var(--dash)); opacity: 0; }
  2%, 16% { opacity: var(--peak); }
  19%, 100% { stroke-dashoffset: calc(var(--port) - 100px + var(--dash)); opacity: 0; }
}
@keyframes reading-transit {
  0% { stroke-dashoffset: var(--dash); opacity: 0; }
  2%, 11% { opacity: 1; }
  14%, 100% { stroke-dashoffset: calc(var(--dash) - 112px); opacity: 0; }
}
@keyframes reading-arrival {
  0%, 76%, 97%, 100% { text-shadow: 0 0 0 transparent; }
  83%, 90% { text-shadow: 0 0 10px rgb(225 240 246 / .30); }
}

@keyframes reading-rim {
  0%, 24%, 100% { opacity: .79; filter: none; }
  8%, 14% { opacity: 1; filter: drop-shadow(0 0 2.8px currentColor); }
}
@keyframes reading-contact {
  0%, 15%, 100% { opacity: 0; }
  4%, 8% { opacity: .97; }
}


/* Each step is a frame from the original header dissolve, rotated upward. */
@keyframes reading-refraction {
  from { --reading-angle: 215deg; }
  to { --reading-angle: 575deg; }
}
@keyframes reading-idle-wave {
  from { mask-position: center 14.545455%; }
  to { mask-position: center 43.636364%; }
}
/* Frames 0-3 and 52-55 of the sprite are a flat line; stay inside the scattered-pixel frames (12-40). */
@keyframes reading-pixel-sweep {
  from { mask-position: center 21.818182%; }
  to { mask-position: center 72.727273%; }
}
@keyframes reading-node {
  0% { offset-distance: 0%; opacity: 0; }
  2% { opacity: 1; }
  15%, 18% { offset-distance: 100%; opacity: 1; }
  20%, 100% { offset-distance: 100%; opacity: 0; }
}
@keyframes reading-union {
  0% { offset-distance: 0%; opacity: 0; }
  2% { offset-distance: 0%; opacity: 1; }
  10% { offset-distance: 100%; opacity: 1; }
  13%, 100% { offset-distance: 100%; opacity: 0; }
}
