/*
 * Traceability page. Loaded after /styles.css (tokens, header, footer).
 * Direction: forest-charcoal, alabaster type, champagne hairlines, editorial serif, monospace identifiers.
 * Phase detail is visible without JavaScript; traceability.js adds the one-open-at-a-time behaviour.
 */
body.trace-page {
  --t-bg: #1d1612;
  --t-bg-2: #261d17;
  --t-text: #e8dfcc;
  --t-sub: #b8ab97;
  --t-gold: #b09061;
  --t-gold-l: #c9ad7c;
  --t-line: rgba(201, 184, 152, 0.14);
  --t-line-gold: rgba(176, 144, 97, 0.3);
  --t-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--t-bg);
  color: var(--t-sub);
}
.trace-page .nav__links a.is-active { color: var(--t-gold-l); box-shadow: inset 0 -2px 0 var(--t-gold-l); }
.trace-page .nav__panel a.is-active { color: var(--t-gold-l); }
.t-wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.mono, .trace-page code { font-family: var(--t-mono); }
.trace-page code { font-size: 0.92em; color: var(--t-gold-l); overflow-wrap: anywhere; }
.t-rule { display: block; width: 3.5rem; height: 1px; background: var(--t-gold); }

/* ---- hero */
.t-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--t-bg); }
.t-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 70%; z-index: -2; filter: brightness(0.5) saturate(0.95) contrast(1.05); }
.t-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(29,22,18,0.97) 0%, rgba(29,22,18,0.9) 40%, rgba(29,22,18,0.5) 100%),
  linear-gradient(180deg, rgba(29,22,18,0.55) 0%, rgba(29,22,18,0) 30%, var(--t-bg) 100%); }
.t-hero__inner { max-width: 1240px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 5vw, 4rem); }
.t-tag { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; line-height: 1.7; color: var(--t-gold-l); max-width: 60ch; }
.t-hero h1 { margin-top: 1.5rem; max-width: 20ch; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.1rem, 5.2vw, 4rem); line-height: 1.1; letter-spacing: -0.01em; color: var(--t-text); text-wrap: balance; }
.t-hero h1 span { display: block; }
.t-hero h1 em { display: block; margin-top: 0.15em; color: var(--t-gold-l); font-style: italic; font-weight: 400; }
.t-sub { margin-top: 1.5rem; max-width: 58ch; font-size: clamp(0.9rem, 1.3vw, 1rem); line-height: 1.7; color: #c6baa5; }
.t-j { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 2.25rem; list-style: none; padding: 0; }
.t-j li { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; color: var(--t-text); }
.t-j__arrow { color: var(--t-gold-l); font-size: 1.1rem; padding-inline: 0.5rem; }
.t-j__ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--t-line-gold); border-radius: 50%; color: var(--t-gold-l); }
.t-j__no { font-family: var(--t-mono); font-size: 0.75rem; color: var(--t-gold-l); }

/* ---- pipeline */
.t-pipe { position: relative; padding-block: clamp(2rem, 4vw, 3rem) clamp(0.75rem, 1.5vw, 1.25rem); }
.t-pipe__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; align-items: baseline; padding-bottom: 1.25rem; border-bottom: 1px solid var(--t-line); }
.t-pipe__head h2 { font-family: var(--font-ui); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-gold-l); }
.t-pipe__head p { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--t-sub); }
.t-phases { list-style: none; margin: 0; padding: 0; position: relative; }
.t-phase { position: relative; display: grid; grid-template-columns: 12% minmax(0, 56%) minmax(0, 32%); align-items: start; padding-block: 1.75rem; border-bottom: 1px solid var(--t-line); }
.t-track { position: absolute; left: 0.5rem; top: 0; width: 1px; height: 0; background: var(--t-line-gold); pointer-events: none; }
.t-track__fill { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: linear-gradient(180deg, var(--t-gold) 0%, var(--t-gold-l) 100%); }
.t-phase__dot { position: absolute; left: 0.5rem; top: 3.1rem; width: 0.75rem; height: 0.75rem; border: 1px solid var(--t-gold); border-radius: 50%; background: var(--t-bg); transform: translate(-50%, -50%); z-index: 1; }
.t-phase.is-lit .t-phase__dot { background: var(--t-gold-l); border-color: var(--t-gold-l); }
.t-phase__no { grid-column: 1; padding-left: 1.75rem; font-family: var(--font-display); font-style: italic; font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1; color: rgba(239, 230, 212, 0.2); }
.t-phase__vis { display: block; grid-column: 2; grid-row: 1; width: 38%; }
.t-phase__main { grid-column: 2; grid-row: 1; min-width: 0; margin-left: calc(38% + 1.5rem); }
.t-phase__no { grid-row: 1; }
.t-panel { grid-column: 3; grid-row: 1; margin-left: 1.5rem; }
.t-vis { position: relative; display: block; aspect-ratio: 864 / 594; overflow: hidden; border: 1px solid var(--t-line); border-radius: 6px; background: #120d0a; }
.t-vis img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.88) saturate(0.92); }
.t-phase__h { margin: 0; }
.t-phase__btn { all: unset; box-sizing: border-box; display: block; position: relative; width: 100%; padding-right: 2rem; cursor: pointer; }
.t-phase__btn:focus-visible { outline: 2px solid var(--t-gold-l); outline-offset: 4px; }
.t-phase__title { display: block; font-family: var(--font-ui); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--t-text); line-height: 1.4; }
.t-phase__ev { display: block; margin-top: 0.3rem; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--t-gold-l); }
.t-phase__chev { position: absolute; right: 0.25rem; top: 0.4rem; width: 0.6rem; height: 0.6rem; border: solid var(--t-gold-l); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 0.25s; }
.t-phase[data-open="true"] .t-phase__chev { transform: rotate(-135deg); top: 0.65rem; }
.t-phase__body { display: grid; grid-template-rows: 1fr; margin-top: 0.9rem; }
.t-phase__bodyin { min-height: 0; overflow: hidden; }
.t-phase__body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; font-size: 0.8125rem; line-height: 1.6; color: #c4b8a4; }
.t-phase__body li { padding-left: 0.9rem; position: relative; }
.t-phase__body li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 4px; height: 4px; border-radius: 50%; background: var(--t-gold); }
.t-phase__body strong { color: var(--t-text); font-weight: 600; }
.t-syntax { display: block; margin-top: 0.3rem; font-size: 0.75rem; color: var(--t-gold-l); overflow-wrap: anywhere; }
.js .t-phase[data-open="false"] .t-phase__body { grid-template-rows: 0fr; margin-top: 0; }
.js .t-phase[data-open="false"] .t-phase__bodyin { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .js .t-phase__body { transition: grid-template-rows 0.35s var(--ease), margin 0.35s var(--ease); }
}

/* technical panel */
.t-panel { padding: 1rem 1.1rem; border: 1px solid var(--t-line-gold); border-radius: 6px; background: rgba(255,255,255,0.02); min-width: 0; }
.t-panel__k { font-family: var(--t-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-gold); }
.t-panel__code { margin-top: 0.5rem; font-family: var(--t-mono); font-size: 0.9375rem; line-height: 1.45; color: var(--t-text); overflow-wrap: anywhere; }
.t-panel__row { display: flex; align-items: flex-start; gap: 0.7rem; margin-top: 0.8rem; padding-top: 0.75rem; border-top: 1px solid var(--t-line); font-size: 0.75rem; color: var(--t-sub); }
.t-panel__ic { color: var(--t-gold-l); flex: none; padding-top: 0.1rem; }
.t-panel__txt { display: grid; gap: 0.2rem; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.t-panel__txt .mono { color: var(--t-text); }
.t-panel__end { color: var(--t-sub); flex: none; }
.t-note { margin-top: 1rem; font-size: 0.6875rem; color: #8d826f; }
.t-fsm { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.25rem; position: relative; }
.t-fsm::before { content: ""; position: absolute; left: 16%; right: 16%; top: 0.5rem; height: 1px; background: var(--t-line-gold); }
.t-fsm li { position: relative; display: grid; justify-items: center; gap: 0.5rem; text-align: center; font-family: var(--t-mono); font-size: 0.5625rem; letter-spacing: 0.04em; color: var(--t-sub); overflow-wrap: anywhere; }
.t-fsm i { width: 1rem; height: 1rem; border: 1px solid var(--t-gold); border-radius: 50%; background: var(--t-bg); }
.t-fsm .is-final { color: var(--t-gold-l); } .t-fsm .is-final i { background: var(--t-gold); }

/* ---- engine */
.t-engine { padding-block: 0.75rem clamp(1.25rem, 2.5vw, 2rem); }
.t-engine__box { border: 1px solid var(--t-line); border-radius: 8px; padding: clamp(1.25rem, 3vw, 2.25rem); background:
  linear-gradient(rgba(176,144,97,0.04) 1px, transparent 1px) 0 0 / 100% 28px,
  linear-gradient(90deg, rgba(176,144,97,0.04) 1px, transparent 1px) 0 0 / 28px 100%, #17110d; }
.t-engine__top { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.t-engine__title h2 { font-family: var(--font-ui); font-size: 1.0625rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1.7; color: var(--t-gold-l); }
.t-engine__title .t-rule { margin-block: 1rem; }
.t-engine__title p { font-size: 0.8125rem; line-height: 1.7; max-width: 34ch; }
.t-eng { list-style: none; margin: 0; padding: 0; }
.t-eng li { display: grid; grid-template-columns: 2.2rem minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.8fr); gap: 0.25rem 1rem; align-items: baseline; padding: 0.75rem 0; border-bottom: 1px solid var(--t-line); }
.t-eng li:last-child { border-bottom: 0; }
.t-eng__n, .t-eng__k { font-family: var(--t-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-gold); }
.t-eng__v { font-family: var(--t-mono); font-size: 0.8125rem; color: var(--t-text); overflow-wrap: anywhere; }
.t-eng__g { font-size: 0.75rem; color: var(--t-sub); }
.t-payload { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; margin-top: 1.75rem; padding: 0.9rem 1.1rem; border: 1px solid var(--t-line); border-radius: 3px; background: rgba(0,0,0,0.22); }
.t-payload__k { font-family: var(--t-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-gold-l); }
.t-payload__code { margin: 0; padding-left: 1rem; border-left: 1px solid var(--t-line); white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--t-mono); font-size: 0.75rem; line-height: 1.7; color: var(--t-text); }
.t-copy { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; cursor: pointer; color: var(--t-gold-l); border: 1px solid var(--t-line); border-radius: 3px; }
.t-copy[hidden] { display: none; }
.t-copy:hover { border-color: var(--t-gold); }
.t-copy:focus-visible { outline: 2px solid var(--t-gold-l); outline-offset: 2px; }
.t-copy.is-done { color: var(--t-bg); background: var(--t-gold-l); }

/* ---- closing */
.t-close { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3rem, 6vw, 4.5rem); }
.t-close__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; filter: brightness(0.55) saturate(0.9); }
.t-close::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--t-bg) 0%, rgba(29,22,18,0.6) 35%, rgba(29,22,18,0.8) 100%); }
.t-close__k { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--t-gold-l); }
.t-close__q { margin-top: 1.25rem; max-width: 30ch; font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.75rem); line-height: 1.25; color: var(--t-text); text-wrap: balance; }
.t-close__q em { font-style: italic; }
.t-close .t-rule { margin-top: 1.75rem; }

/* ---- responsive */
@media (max-width: 1000px) {
  .t-engine__top { grid-template-columns: 1fr; }
  .t-phase { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .t-phase__no { padding-left: 1.5rem; font-size: 2.5rem; }
  .t-phase__vis { grid-column: 2; grid-row: 1; width: 100%; }
  .t-phase__main { grid-column: 2; grid-row: 2; margin: 1rem 0 0; }
  .t-panel { grid-column: 2; grid-row: 3; margin: 1rem 0 0; }
}
@media (max-width: 760px) {
  .t-eng li { grid-template-columns: 2rem minmax(0, 1fr); }
  .t-eng__v, .t-eng__g { grid-column: 2; }
  .t-payload { grid-template-columns: 1fr auto; }
  .t-payload__k { grid-column: 1 / -1; }
  .t-payload__code { padding-left: 0; border-left: 0; }
    .t-hero::before { background: linear-gradient(180deg, rgba(29,22,18,0.8), rgba(29,22,18,0.9)); }
}
@media (max-width: 420px) {
  .t-phase { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .t-phase__no { padding-left: 1.2rem; font-size: 2rem; }
}

/* ---- natural texture: faint terrain contours behind the pipeline and the closing statement */
.t-pipe::before { position: absolute; inset: 0; z-index: 0; background: url(/traceability/img/contours.svg) no-repeat 112% 8% / min(70rem, 110%) auto; opacity: 0.05; pointer-events: none; }
.t-pipe > .t-wrap { position: relative; z-index: 1; }
.trace-page .foot { border-top: 1px solid var(--t-line); }

/* ---- scroll-lit timeline: phases light up as the reader scrolls (state change, not looping motion) */
.js .t-phase:not(.is-lit) .t-phase__no { color: rgba(239, 230, 212, 0.1); }
.js .t-phase:not(.is-lit) .t-panel { border-color: var(--t-line); }
.t-panel { position: relative; }
.t-panel::after { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 1px; background: linear-gradient(90deg, var(--t-gold-l), transparent); transform: scaleX(0); transform-origin: left; }
.t-phase.is-lit .t-panel::after { transform: scaleX(1); }
.js .t-phase:not(.is-lit) .t-fsm i { background: var(--t-bg); }
.t-phase.is-lit .t-fsm i { background: var(--t-gold); }
@media (prefers-reduced-motion: no-preference) {
  .t-track__fill { transition: height 0.18s linear; }
  .js .t-phase__no, .t-phase__dot, .t-panel { transition: color 0.6s var(--ease), background 0.4s, border-color 0.6s; }
  .t-panel::after { transition: transform 1.1s var(--ease); }
  .t-fsm i { transition: background 0.4s; }
  .t-phase.is-lit .t-fsm li:nth-child(2) i { transition-delay: 0.35s; }
  .t-phase.is-lit .t-fsm li:nth-child(3) i { transition-delay: 0.7s; }
  .js .t-eng li, .js .t-payload { opacity: 0; transform: translateY(6px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .t-eng.is-in li, .js .t-payload.is-in { opacity: 1; transform: none; }
  .js .t-eng.is-in li:nth-child(2) { transition-delay: 0.12s; }
  .js .t-eng.is-in li:nth-child(3) { transition-delay: 0.24s; }
  .js .t-eng.is-in li:nth-child(4) { transition-delay: 0.36s; }
  .js .t-eng.is-in li:nth-child(5) { transition-delay: 0.48s; }
  .js .t-payload.is-in { transition-delay: 0.6s; }
}

/* ---- FSM live diagram (illustrative simulation, driven by traceability.js) */
.t-fl { margin-top: 1.5rem; padding: clamp(1rem, 2.5vw, 1.5rem); border: 1px solid var(--t-line-gold); border-radius: 8px; background: #17110d; }
.t-fl__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--t-line); }
.t-fl__k { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-gold-l); }
.t-fl__s { margin-top: 0.25rem; font-family: var(--t-mono); font-size: 0.6875rem; color: #8d826f; }
.t-fl__ctl { display: flex; align-items: center; gap: 0.75rem; }
.t-fl__badge { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--t-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-gold-l); }
.t-fl__badge i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--t-gold); }
.t-fl__btn { all: unset; box-sizing: border-box; cursor: pointer; padding: 0.3rem 0.7rem; border: 1px solid var(--t-line-gold); border-radius: 4px; font-size: 0.6875rem; letter-spacing: 0.05em; color: var(--t-sub); }
.t-fl__btn[hidden] { display: none; }
.t-fl__btn:hover { color: var(--t-text); border-color: var(--t-gold); }
.t-fl__btn:focus-visible { outline: 2px solid var(--t-gold-l); outline-offset: 2px; }
.t-fl__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(2rem, 0.5fr) minmax(0, 1fr) minmax(2rem, 0.5fr) minmax(0, 1fr); align-items: center; margin-top: 1.25rem; }
.t-fl__node { font: inherit; background: transparent; cursor: pointer; width: 100%; display: grid; justify-items: center; gap: 0.4rem; padding: 1rem 0.75rem; text-align: center; border: 1px solid var(--t-line); border-radius: 6px; color: var(--t-sub); min-width: 0; }
.t-fl__node:focus-visible { outline: 2px solid var(--t-gold-l); outline-offset: 3px; }
.t-fl__node:hover { border-color: var(--t-line-gold); }
.t-fl__name { font-family: var(--t-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; color: var(--t-text); overflow-wrap: anywhere; }
.t-fl__d { font-size: 0.6875rem; color: var(--t-sub); }
.t-fl__link { position: relative; height: 1px; background: var(--t-line); }
.t-fl__link::after { content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border: solid var(--t-line-gold); border-width: 1px 1px 0 0; transform: rotate(45deg); }
.t-fl__pkt { position: absolute; top: -2px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--t-gold-l); opacity: 0; }
.js .t-fl__node { opacity: 0.42; }
.js .t-fl[data-step="0"] .t-fl__node[data-n="0"], .js .t-fl[data-step="1"] .t-fl__node[data-n="1"], .js .t-fl[data-step="2"] .t-fl__node[data-n="2"] { opacity: 1; border-color: var(--t-gold-l); background: rgba(201, 173, 124, 0.07); color: var(--t-gold-l); transform: translateY(-2px); }
.js .t-fl[data-step="2"] .t-fl__node[data-n="2"] { background: rgba(201, 173, 124, 0.13); }
.js .t-fl[data-step="2"] .t-fl__node--end .t-fl__d { color: var(--t-gold-l); }
.js .t-fl[data-step="1"] .t-fl__link:nth-of-type(1), .js .t-fl[data-step="2"] .t-fl__link { background: var(--t-gold); }
.t-fl__hash { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.35rem 1rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--t-line); font-size: 0.6875rem; color: #8d826f; }
.t-fl__hash span { letter-spacing: 0.06em; text-transform: uppercase; }
.t-fl__hash code { color: var(--t-text); overflow-wrap: anywhere; word-break: break-all; }
@media (prefers-reduced-motion: no-preference) {
  .t-fl__node { transition: opacity 0.7s var(--ease), border-color 0.7s var(--ease), background 0.7s var(--ease), transform 0.7s var(--ease), color 0.7s; }
  .t-fl__link { transition: background 0.5s; }
  .t-fl[data-step="1"] .t-fl__link:nth-of-type(1) .t-fl__pkt, .t-fl[data-step="2"] .t-fl__link:nth-of-type(2) .t-fl__pkt { animation: t-pkt 0.9s var(--ease) 1 forwards; }
  .t-fl.is-playing .t-fl__badge i { animation: t-breathe 2.4s ease-in-out infinite; }
}
@keyframes t-pkt { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 5px); opacity: 0; } }
@keyframes t-breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@media (max-width: 760px) {
  .t-fl__row { grid-template-columns: 1fr; gap: 0; }
  .t-fl__link { width: 1px; height: 1.75rem; margin-inline: auto; }
  .t-fl__link::after { right: auto; left: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  .t-fl__pkt { left: -2px; top: 0; }
  @keyframes t-pkt { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 5px); opacity: 0; } }
}

/* terminal state: muted brick red, no neon */
.t-fl { --t-brick: #b45f52; }
.t-fl__alert { display: none; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem; padding: 0.55rem 0.75rem; border: 1px solid rgba(180, 95, 82, 0.45); border-radius: 4px; background: rgba(180, 95, 82, 0.08); font-family: var(--t-mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: #d08a7c; text-align: center; }
.js .t-fl__alert { display: flex; visibility: hidden; }
.js .t-fl[data-step="2"] .t-fl__alert { visibility: visible; }
.js .t-fl[data-step="2"] .t-fl__node[data-n="2"] { border-color: var(--t-brick); background: rgba(180, 95, 82, 0.1); color: #d08a7c; box-shadow: 0 0 26px rgba(180, 95, 82, 0.16); }
.js .t-fl[data-step="2"] .t-fl__node--end .t-fl__d { color: #d08a7c; }
.js .t-fl[data-step="2"] .t-fl__link { background: var(--t-brick); }
.js .t-fl[data-step="2"] .t-fl__hash code { color: #d08a7c; }
@media (prefers-reduced-motion: no-preference) {
  .t-fl[data-step="2"] .t-fl__alert span { animation: t-term 1.4s ease-in-out 3; }
  .t-fl__node { transition-property: opacity, border-color, background, transform, color, box-shadow; }
}
@keyframes t-term { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Phase photos: a slow push-in on hover (pointer devices) and once on scroll-in (touch, see /touch-motion.js). */
.t-vis img { transition: none; }
@media (prefers-reduced-motion: no-preference) {
  .t-vis img { transition: transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1), filter 1.2s ease; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .t-vis:hover img { transform: scale(1.035); filter: brightness(0.98) saturate(1); }
}
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .t-vis.is-seen img { transform: scale(1.035); filter: brightness(0.98) saturate(1); }
  .t-fl__node:active, .t-phase__btn:active { opacity: 0.8; }
  .t-fl__btn:active, .t-copy:active { transform: scale(0.97); }
}

/* ---- journey relay: each stage (icon, number, label) and then its arrow light up in turn, slowly and from the centre
   outwards (icon glyph, then the glow, then the ring, then the number and label), then the sequence restarts.
   Driven by traceability.js; without it, or with reduced motion, every stage stays lit. */
.t-j--live .t-j__ic { position: relative; border-color: var(--t-line); color: var(--t-sub); background: transparent; }
.t-j--live .t-j__ic::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 173, 124, 0.3) 0%, rgba(201, 173, 124, 0.12) 52%, rgba(201, 173, 124, 0) 74%); opacity: 0; transform: scale(0.15); }
.t-j--live .t-j__ic svg { position: relative; }
.t-j--live .t-j__no, .t-j--live li > span:last-child { color: var(--t-sub); opacity: 0.55; }
.t-j--live .t-j__arrow { color: var(--t-sub); opacity: 0.4; }
.t-j--live li.is-on .t-j__ic { border-color: var(--t-gold-l); color: var(--t-gold-l); }
.t-j--live li.is-on .t-j__ic::before { opacity: 1; transform: scale(1); }
.t-j--live li.is-on .t-j__no { opacity: 1; color: var(--t-gold-l); }
.t-j--live li.is-on > span:last-child { opacity: 1; color: var(--t-text); }
.t-j--live .t-j__arrow.is-on { opacity: 1; color: var(--t-gold-l); }
@media (prefers-reduced-motion: no-preference) {
  .t-j--live .t-j__ic { transition: border-color 1.1s var(--ease) 0.45s, color 0.9s var(--ease); }
  .t-j--live .t-j__ic::before { transition: opacity 1.3s var(--ease) 0.1s, transform 1.5s var(--ease) 0.1s; }
  .t-j--live .t-j__no, .t-j--live li > span:last-child { transition: opacity 1.1s var(--ease) 0.6s, color 1.1s var(--ease) 0.6s; }
  .t-j--live .t-j__arrow { transition: opacity 1.2s var(--ease), color 1.2s var(--ease); }
  /* going dark: everything eases out together, without the staggered delays */
  .t-j--live li:not(.is-on) .t-j__ic, .t-j--live li:not(.is-on) .t-j__no, .t-j--live li:not(.is-on) > span:last-child { transition-delay: 0s; }
  .t-j--live li:not(.is-on) .t-j__ic::before { transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
}
