/* uv-boundary.css — "THE VERIFICATION HANDSHAKE" for .ua3-boundary-studio (#boundary).
   Companion to js/uv-boundary.js. Self-running looped scene: two planes —
   the reshaped view above, the original page below — separated by a luminous
   trust-boundary belt. A probe descends from a reshaped action, traces the
   original page's anchors, and either locks a jade thread to the matching
   source action (VERIFIED) or visibly refuses to guess: the thread retracts
   and the action seals itself as UNAVAILABLE while a NOT GUESSED stamp lands.

   The original three-part diagram stays in the DOM as the no-JS /
   forced-colors / narrow fallback, hidden only while .uv3-live is set.
   ui-anima.html / ui-anima-page.js / ui-anima-v2.css untouched.

   Grounds: --ua3-dark section. Jade = verified, amber = unavailable,
   rust = boundary and refusal. Type floor 13px. */

.ua3-boundary-studio.uv3-live {
    display: block;
    position: relative;
    background: #131311;
}

.ua3-boundary-studio.uv3-live > :not(.uv3-stage):not(.uv3-sr) { display: none; }

/* screen-reader summary of the animated diagram */
.ua3-boundary-studio .uv3-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.ua3-boundary-studio .uv3-stage {
    position: relative;
    display: block;
    font-family: var(--ua3-mono, "Geist Mono", "SFMono-Regular", Consolas, monospace);
    line-height: 1.35;
    pointer-events: none;
}

/* ---------- overlay ---------- */

.uv3-stage svg.uv3-fx {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    pointer-events: none;
}

/* ---------- planes ---------- */

.uv3-stage .uv3-plane { position: relative; z-index: 1; padding: 0.95rem 1.1rem 1.15rem; }
.uv3-stage .uv3-view { background: #1d1c18; }
.uv3-stage .uv3-source { background: #121210; padding-bottom: 1.3rem; }

.uv3-stage .uv3-phead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
.uv3-stage .uv3-ptag { color: #ff9f7c; font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.08em; }
.uv3-stage .uv3-pnote { color: #8f8a80; font-size: 0.8125rem; letter-spacing: 0.06em; text-align: right; }

.uv3-stage .uv3-cards,
.uv3-stage .uv3-docks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1.1rem;
}

/* ---------- action cards (reshaped view) and source docks ---------- */

.uv3-stage .uv3-card,
.uv3-stage .uv3-dock {
    position: relative;
    display: grid;
    gap: 0.4rem;
    justify-items: start;
    align-content: start;
    min-width: 0;
    padding: 0.75rem 0.85rem 0.85rem;
    background: #191916;
    border: 1px solid #4c4c45;
    transition: border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}
.uv3-stage .uv3-dock { background: #161614; }
.uv3-stage .uv3-dock--b { border-style: dashed; border-color: #3f3f39; }

.uv3-stage .uv3-card small,
.uv3-stage .uv3-dock small {
    color: #a8a399;
    font-family: inherit;
    font-size: 0.8125rem;
    letter-spacing: 0.07em;
}
.uv3-stage .uv3-card strong,
.uv3-stage .uv3-dock strong {
    color: var(--ua3-paper, #f4f1e9);
    font-family: var(--ua3-font, "Geist", "Segoe UI", Arial, sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}
.uv3-stage .uv3-dock--b small { color: #94908a; }
.uv3-stage .uv3-dock--b strong { color: #c9c4b9; }

/* port notches — where the probe leaves a card / enters a dock */
.uv3-stage .uv3-card::after,
.uv3-stage .uv3-dock::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 16px;
    height: 3px;
    transform: translateX(-50%);
    background: #45423b;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.uv3-stage .uv3-card::after { bottom: -2px; }
.uv3-stage .uv3-dock::after { top: -2px; }

.uv3-stage .uv3-card.uv3-arm {
    border-color: #a8a399;
    background: #1c1b17;
    box-shadow: 0 0 0 1px rgba(244, 241, 233, 0.1), 0 0 16px rgba(244, 241, 233, 0.06);
}
.uv3-stage .uv3-card.uv3-arm::after { background: #d7d1c6; box-shadow: 0 2px 10px rgba(244, 241, 233, 0.35); }

.uv3-stage .uv3-card--a.uv3-ok {
    border-color: #6cc094;
    background: #171b17;
    box-shadow: inset 0 0 0 1px rgba(108, 192, 148, 0.4), 0 0 22px rgba(108, 192, 148, 0.12);
}
.uv3-stage .uv3-card--a.uv3-ok::after { background: #6cc094; box-shadow: 0 2px 10px rgba(108, 192, 148, 0.5); }

.uv3-stage .uv3-card--b.uv3-sealed {
    border-style: dashed;
    border-color: #9a8146;
    background: #191813;
    box-shadow: none;
}
.uv3-stage .uv3-card--b.uv3-sealed::after { background: #6f6547; box-shadow: none; }

.uv3-stage .uv3-dock--a.uv3-on {
    border-color: #6cc094;
    box-shadow: inset 0 0 0 1px rgba(108, 192, 148, 0.3);
}
.uv3-stage .uv3-dock--a.uv3-on::after { background: #6cc094; box-shadow: 0 -2px 10px rgba(108, 192, 148, 0.5); }

/* ---------- chips and the NOT GUESSED stamp ---------- */

.uv3-stage .uv3-chip {
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: #98938a;
    padding: 0.14rem 0.5rem;
    border: 1px solid #4c4c45;
    background: #141412;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.uv3-stage .uv3-card.uv3-arm .uv3-chip { color: #d7d1c6; border-color: #6e6a60; }
.uv3-stage .uv3-card--a.uv3-ok .uv3-chip {
    color: #b9e3ca;
    border-color: #6cc094;
    background: rgba(40, 84, 63, 0.55);
}
.uv3-stage .uv3-card--b.uv3-sealed .uv3-chip {
    color: #e7c66e;
    border-color: #9a8146;
    border-style: dashed;
    background: rgba(109, 74, 0, 0.22);
}
.uv3-stage .uv3-dock--a.uv3-on .uv3-chip {
    color: #b9e3ca;
    border-color: #6cc094;
    background: rgba(40, 84, 63, 0.55);
}

.uv3-stage .uv3-stamp {
    justify-self: start;
    margin-top: 0.1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ff9f7c;
    padding: 0.12rem 0.45rem;
    border: 2px solid var(--ua3-rust-bright, #d4512e);
    opacity: 0;
    transform: rotate(-6deg) scale(1.7);
    transition: opacity 0.16s ease-in, transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1);
}
.uv3-stage .uv3-stamp.uv3-stamp-on { opacity: 1; transform: rotate(-6deg) scale(1); }

/* ---------- the boundary belt ---------- */

.uv3-stage .uv3-belt {
    position: relative;
    z-index: 1;
    height: 3rem;
    background: #0e0e0c;
    border-block: 1px solid #34342e;
}
.uv3-stage .uv3-belt-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.18rem 0.7rem;
    background: #0e0e0c;
    border: 1px solid #3a3a34;
    color: #bbb6aa;
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.uv3-stage .uv3-belt-label b { color: #ff9f7c; font-size: 1.05rem; font-weight: 700; line-height: 1; }
.uv3-stage .uv3-belt-label.uv3-flash {
    color: var(--ua3-paper, #f4f1e9);
    border-color: #ff9f7c;
    box-shadow: 0 0 14px rgba(255, 159, 124, 0.25);
}

/* ---------- original-page bed and anchor rail ---------- */

.uv3-stage .uv3-bed { position: relative; margin: 0 0 1rem; }
.uv3-stage .uv3-skel { display: block; height: 2px; background: #262621; margin: 0 0 0.55rem; }
.uv3-stage .uv3-skel--1 { width: 72%; }
.uv3-stage .uv3-skel--2 { width: 46%; }
.uv3-stage .uv3-railrow { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.85rem; }
.uv3-stage .uv3-rail-tag {
    color: #8f8a80;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.uv3-stage .uv3-rail-strip { flex: 1 1 auto; min-width: 0; height: 20px; }

/* compact: the strip gets so short that the matched anchor's clamp
   glyphs can land on the label — drop the caption, keep the rail
   (the ticker still narrates "TRACING SOURCE ANCHORS") */
@media (max-width: 540px) {
    .uv3-stage .uv3-rail-tag { display: none; }
}

/* ---------- status ticker ---------- */

.uv3-stage .uv3-tick {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.1rem;
    background: #0e0e0c;
    border-top: 1px solid #34342e;
}
.uv3-stage .uv3-tick-lamp {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff9f7c;
}
.uv3-stage .uv3-tick-text {
    flex: 1 1 auto;
    min-width: 0;
    color: #c9c4b9;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.uv3-stage .uv3-reqs { display: flex; gap: 5px; flex: 0 0 auto; }
.uv3-stage .uv3-req {
    display: block;
    width: 9px;
    height: 9px;
    border: 1px solid #56564e;
    background: transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.uv3-stage .uv3-req--1.uv3-req-on { background: #6cc094; border-color: #6cc094; }
.uv3-stage .uv3-req--2.uv3-req-on { background: #e7c66e; border-color: #9a8146; }

/* ---------- overlay strokes ---------- */

.uv3-fx .uv3-belt-wide { stroke: rgba(255, 159, 124, 0.08); stroke-width: 7; }
.uv3-fx .uv3-belt-base { stroke: #4a4a42; stroke-width: 1; }
.uv3-fx .uv3-belt-glow { stroke: #ff9f7c; stroke-width: 1.4; }
.uv3-fx .uv3-chev { fill: none; stroke: #ff9f7c; stroke-width: 1.3; stroke-linecap: round; }

.uv3-fx .uv3-railline { stroke: #34342e; stroke-width: 1.2; }
.uv3-fx .uv3-anch { fill: #1b1b18; stroke: #7a756b; stroke-width: 1.3; transition: fill 0.3s ease, stroke 0.3s ease; }
.uv3-fx .uv3-anch-hot { fill: var(--ua3-paper, #f4f1e9); stroke: none; }
.uv3-fx .uv3-anch.uv3-anch-lock { fill: var(--ua3-jade, #28543f); stroke: #6cc094; }
.uv3-fx .uv3-rej line { stroke: #e2705a; stroke-width: 1.6; stroke-linecap: round; }

.uv3-fx .uv3-pr { fill: none; stroke: #d7d1c6; stroke-width: 1.5; stroke-dasharray: 3 5; }
.uv3-fx .uv3-pr-glow { fill: none; stroke: rgba(244, 241, 233, 0.1); stroke-width: 6; }
.uv3-fx .uv3-pr-head { fill: var(--ua3-paper, #f4f1e9); }
.uv3-fx .uv3-pr-halo { fill: none; stroke: #d7d1c6; stroke-width: 1; }
.uv3-fx .uv3-g-probe.uv3-pr-bad .uv3-pr { stroke: #e2705a; }
.uv3-fx .uv3-g-probe.uv3-pr-bad .uv3-pr-glow { stroke: rgba(226, 112, 90, 0.12); }
.uv3-fx .uv3-g-probe.uv3-pr-bad .uv3-pr-head { fill: #e2705a; }
.uv3-fx .uv3-g-probe.uv3-pr-bad .uv3-pr-halo { stroke: #e2705a; }

.uv3-fx .uv3-thA { fill: none; stroke: #6cc094; stroke-width: 1.8; }
.uv3-fx .uv3-thA-glow { fill: none; stroke: rgba(108, 192, 148, 0.16); stroke-width: 7; }
.uv3-fx .uv3-thA-flow { fill: none; stroke: #b9e3ca; stroke-width: 1.8; stroke-dasharray: 2 7; }
.uv3-fx .uv3-cl { fill: none; stroke: #6cc094; stroke-width: 2; }
.uv3-fx .uv3-lockring { fill: none; stroke: #6cc094; stroke-width: 1.5; }
.uv3-fx .uv3-jdot { fill: #6cc094; }

.uv3-fx .uv3-rip { fill: none; stroke: #ff9f7c; stroke-width: 1.3; }
.uv3-fx .uv3-auth-dot { fill: #e2705a; }
.uv3-fx .uv3-auth-flat { fill: none; stroke: #ff9f7c; stroke-width: 1.6; }

/* ---------- accessibility / fallback modes ---------- */

@media (prefers-reduced-motion: reduce) {
    .uv3-stage * { animation: none !important; transition: none !important; }
}

@media (forced-colors: active) {
    .ua3-boundary-studio.uv3-live > .uv3-stage { display: none; }
    .ua3-boundary-studio.uv3-live > .uv3-sr { display: none; }
    .ua3-boundary-studio.uv3-live { display: grid; }
    .ua3-boundary-studio.uv3-live > div.ua3-boundary-view:not(.uv3-stage) { display: block; }
    .ua3-boundary-studio.uv3-live > div.ua3-boundary-source:not(.uv3-stage) { display: block; }
    .ua3-boundary-studio.uv3-live > div.ua3-boundary-rule:not(.uv3-stage) { display: grid; }
}
