/* ---- Example run (#example-run) ---- */
/* Ticket DA-3412 on one glass card: the boarding pass and Book a call beside the four phases. The markup is the finished run;
   home-run.js rewinds it to the scroll position (the line 55% down the viewport is "now"). Layout applies in both themes;
   [data-theme="dark"] rules change colours and surfaces only; animations run only under html.motion. */
html.da-home #example-run .wrap {
  padding-block-start: 12px;
}
html.da-home .run-wrap {
  position: relative;
}
html.da-home .run {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background: var(--sheen), var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), 0 0 0 1px var(--glass-edge), var(--glass-sh);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.da-home .run,
  html.da-home .ok-chip {
    background: var(--glass-fb);
  }
}
html.da-home .run-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 44px 40px;
  border-inline-end: 1px solid var(--glass-edge);
  background: var(--plate);
}
html.da-home .run-intro h2 {
  margin: 0;
  font-size: clamp(26px, 20px + 14 * (100vw - 320px) / 880, 34px);
  line-height: 1.2;
  color: var(--ink);
}
html.da-home .run-intro > p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}
html.da-home .run-intro .btn {
  align-self: flex-start;
  margin-block-start: auto;
}
html.da-home .run-body {
  padding: 32px 36px;
}
html.da-home .run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block-end: 18px;
  border-block-end: 1px solid var(--line);
}
html.da-home .run-head .cs {
  font: 500 15px/1 var(--mono);
  color: var(--brand-ink);
}
html.da-home .run-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
}
html.da-home .run-head .src {
  font-size: 13.5px;
  color: var(--muted);
}

/* Phases: dot, copy, timing. Queued and running rows show an empty or pulsing ring until their row passes the line. */
html.da-home .phases {
  margin: 0;
  padding: 0;
  list-style: none;
}
html.da-home .ph {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 92px;
  gap: 16px;
  align-items: start;
  padding-block: 18px;
  border-block-end: 1px solid var(--line);
}
html.da-home .ph:last-child {
  border-block-end: 0;
}
html.da-home .pdot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-block-start: 1px;
  border-radius: 50%;
  background: var(--brand-btn);
  color: #fff;
}
html.da-home .pdot svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.da-home .ph.queued .pdot {
  border: 1.5px solid var(--line-2);
  background: transparent;
  color: transparent;
}
html.da-home .ph.running .pdot {
  border: 2px solid var(--brand);
  background: transparent;
  color: transparent;
}
html.da-home .ph h4 {
  margin: 0;
  font: 600 16px/1.3 var(--display);
  color: var(--ink);
}
html.da-home .ph.queued h4 {
  color: var(--muted);
}
html.da-home .stn {
  margin-inline-start: 8px;
  font: 500 12.5px/1 var(--body);
  color: var(--muted);
}
html.da-home .ph p {
  margin: 3px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}
html.da-home .ph .t {
  font: 500 13px/1.6 var(--mono);
  text-align: end;
  white-space: nowrap;
  color: var(--muted);
}
html.da-home .gate-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 8px;
  font: 500 13px/1.3 var(--body);
  color: var(--gate-ink);
}
/* status texts that change while the run plays: every state stacked in one grid cell, only the live one shown */
html.da-home #example-run .rs {
  display: inline-grid;
}
html.da-home #example-run .rs > span {
  grid-area: 1 / 1;
}
html.da-home #example-run .ph .t .rs {
  justify-items: end;
}
html.da-home #example-run .rs-alt {
  visibility: hidden;
}
html.da-home .gate-chip::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
html.da-home .diff {
  display: inline-block;
  margin-block-start: 6px;
  font: 500 13.5px/1.4 var(--mono);
  color: var(--muted);
}
html.da-home .diff .add {
  color: var(--brand-ink);
}
html.da-home .diff .del {
  color: var(--del);
}
html.da-home .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-block-start: 8px;
  font: 500 13px/1.3 var(--body);
  color: var(--muted);
}
html.da-home .checks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.da-home .checks span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
}
html.da-home .checks span.ok {
  color: var(--brand-ink);
}
html.da-home .checks span.ok::before {
  background: var(--brand);
}
html.da-home .run-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin: 6px 0 0;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
html.da-home .merged {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--green);
}
html.da-home .merged svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Cleared chip: a glass note over the card's top edge. */
html.da-home .ok-chip {
  position: absolute;
  z-index: 6;
  inset-block-start: -26px;
  inset-inline-end: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-block: 12px;
  padding-inline: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 18px 40px -18px rgba(14, 38, 64, 0.35), inset 0 1px 0 #fff;
}
html.da-home .ok-chip b {
  display: block;
  font: 600 15px/1.25 var(--display);
  color: var(--ink);
}
html.da-home .ok-chip small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
html.da-home .ok-chip .mono,
html.da-home .pass .mono {
  font-family: var(--mono);
}
html.da-home .ok-chip .mono {
  font-size: 12px;
}
html.da-home .okc {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gate-solid);
  color: var(--knob-on);
  box-shadow: 0 0 0 5px var(--gate-soft);
}
html.da-home .okc svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Boarding pass: glass ticket with punched notches, route, four fields and a barcode. */
html.da-home .pass {
  position: relative;
  margin-block-start: 6px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.5));
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--glass-edge), 0 22px 44px -24px rgba(31, 111, 209, 0.45);
  color: var(--text);
}
html.da-home .pass::before,
html.da-home .pass::after {
  content: "";
  position: absolute;
  inset-block-start: calc(100% - 46px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}
html.da-home .pass::before {
  inset-inline-start: -8px;
}
html.da-home .pass::after {
  inset-inline-end: -8px;
}
html.da-home .pass-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 500 11px/1 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
html.da-home .pass-top .mono {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-ink);
}
html.da-home .pass-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
  margin-block: 12px 10px;
}
html.da-home .pass-route div:last-child {
  text-align: end;
}
html.da-home .pass-route small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
html.da-home .pass-route b {
  font: 600 24px/1.1 var(--display);
  color: var(--ink);
}
html.da-home .pass-route svg {
  width: 22px;
  height: 22px;
  margin-block-end: 4px;
  fill: var(--brand);
}
html.da-home[dir="rtl"] .pass-route svg {
  transform: scaleX(-1);
}
html.da-home .pass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 0;
  padding-block: 10px 12px;
  border-block-start: 1px dashed var(--line-2);
}
html.da-home .pass-grid dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
html.da-home .pass-grid dd {
  margin: 2px 0 0;
  font: 500 14px/1.3 var(--body);
  color: var(--ink);
}
html.da-home .pass-grid dd.mono {
  font: 500 14px/1.3 var(--mono);
}
html.da-home .pass-grid dd.gt {
  color: var(--gate-ink);
}
html.da-home .pass-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block-start: 12px;
  border-block-start: 1px dashed var(--line-2);
}
html.da-home .pst {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 13.5px/1.2 var(--body);
  color: var(--green);
}
html.da-home .pst::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
html.da-home .pass .bars {
  flex: 1;
  max-width: 120px;
  height: 26px;
  opacity: 0.75;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 3.5px, var(--ink) 3.5px 6px, transparent 6px 7.5px, var(--ink) 7.5px 8.5px, transparent 8.5px 11px);
}

/* Dark: colours and surfaces only. */
html.da-home[data-theme="dark"] .ok-chip {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(28, 32, 44, 0.6);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
html.da-home[data-theme="dark"] .pass {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(30, 33, 44, 0.92), rgba(16, 17, 24, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 22px 44px -24px rgba(0, 0, 0, 0.8);
}
html.da-home[data-theme="dark"] .pass-top,
html.da-home[data-theme="dark"] .pass-route small,
html.da-home[data-theme="dark"] .pass-grid dt {
  color: rgba(255, 255, 255, 0.7);
}
html.da-home[data-theme="dark"] .pass-grid dd:not(.gt),
html.da-home[data-theme="dark"] .pass-route b {
  color: #fff;
}
html.da-home[data-theme="dark"] .pass-grid,
html.da-home[data-theme="dark"] .pass-foot {
  border-color: rgba(255, 255, 255, 0.22);
}

/* Motion: state changes ease in, short enough never to trail a fast scroll. */
html.da-home.motion .pdot {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
html.da-home.motion .pdot svg {
  transition: transform 0.3s ease;
}
html.da-home.motion .ph:not(.done) .pdot svg {
  transform: scale(0.4);
}
html.da-home.motion .ph h4,
html.da-home.motion .ph .t {
  transition: color 0.3s ease;
}
html.da-home.motion .gate-chip,
html.da-home.motion .fnd {
  transition: color 0.3s ease;
}
html.da-home.motion #example-run .rs-now {
  transition: opacity 0.18s ease;
}
html.da-home.motion .checks span,
html.da-home.motion .checks span::before {
  transition: color 0.3s ease, background 0.3s ease;
}
html.da-home.motion .merged {
  transition: opacity 0.15s linear;
}
html.da-home.motion .ph.running .pdot {
  animation: run-pulse 1.2s ease-in-out infinite;
}
html.da-home.motion .ph.running .gate-chip::before {
  animation: run-clear 1.3s ease-in-out infinite;
}
html.da-home.motion .ok-chip {
  animation: run-bob 4.5s ease-in-out infinite;
}
@keyframes run-pulse {
  50% {
    box-shadow: 0 0 0 5px var(--brand-soft);
  }
}
@keyframes run-clear {
  50% {
    box-shadow: 0 0 0 5px rgba(0, 197, 232, 0.3);
  }
}
@keyframes run-bob {
  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 1080px) {
  html.da-home .run {
    grid-template-columns: minmax(0, 1fr);
  }
  html.da-home .run-intro {
    border-inline-end: 0;
    border-block-end: 1px solid var(--glass-edge);
  }
}
@media (max-width: 640px) {
  html.da-home .run-intro {
    padding: 28px 20px;
  }
  html.da-home .run-body {
    padding: 20px;
  }
  html.da-home .ok-chip {
    inset-block-start: -30px;
    inset-inline-end: 12px;
    gap: 10px;
    padding-block: 9px;
    padding-inline: 9px 14px;
  }
  html.da-home .ok-chip b {
    font-size: 13.5px;
  }
  html.da-home .okc {
    width: 28px;
    height: 28px;
  }
  html.da-home .ph {
    grid-template-columns: 26px minmax(0, 1fr) 64px;
    gap: 12px;
  }
}
