/* v23: the evidence layer. Grey is SAP; the river's spectrum is Trace reading it. */
:root { --spec: linear-gradient(90deg, #22b8ff, #2f6bff 50%, #7b5cff); }

/* a generic SAP GUI window (no SAP marks) */
.sapgui { position: absolute; left: 24px; right: 24px; bottom: 24px; border-radius: 8px; overflow: visible; background: #f2f4f7;
  box-shadow: 0 24px 50px -22px rgba(10, 25, 80, .38), 0 0 0 1px #d5dae2; font: 12px/1.35 var(--font); color: #2b3443; }
.g-title { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #e6eaf0, #d9dee6); border-bottom: 1px solid #c8ced8; }
.g-title b { font-weight: 700; color: #1b2433; } .g-name { color: #5a6475; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-ok { width: 14px; height: 14px; border-radius: 3px; display: grid; place-items: center; background: #3a8a4a; color: #fff; font-size: 9px; }
.g-tools { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #eceff3; border-bottom: 1px solid #d5dae2; }
.g-tools i { width: 16px; height: 14px; border-radius: 3px; background: #cfd5de; }
.g-cmd { margin-left: auto; padding: 1px 8px; border: 1px solid #c3c9d3; border-radius: 3px; background: #fff; font: 11px var(--mono); color: #5a6475; }
.g-tbl { position: relative; overflow: hidden; margin: 8px; border: 1px solid #d0d6df; border-radius: 3px; background: #fff; font-family: var(--mono); font-size: 11px; }
.g-h, .g-r { display: grid; grid-template-columns: 1fr 2.6fr .5fr; gap: 10px; padding: 5px 10px; }
.big .g-h, .big .g-r { grid-template-columns: 1.6fr 1fr .7fr .6fr; font-size: 12px; padding: 7px 12px; }
.g-h { background: #e8ecf1; color: #4d5767; font-family: var(--font); font-weight: 600; }
.g-r { border-top: 1px solid #edf0f4; position: relative; } .g-r:nth-child(odd) { background: #fafbfc; }
.lt { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 0; } .lt.g { background: #3a9b52; } .lt.y { background: #e0a21b; }

/* Trace's layer, in the river's spectrum */
.scanline { position: absolute; top: 0; bottom: 0; left: 0; width: 60px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 255, .16) 40%, rgba(124, 92, 255, .30) 50%, transparent); }
.evid.ev-scan .scanline { animation: evscan 1.6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes evscan { 0% { opacity: 1; transform: translateX(-60px); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(var(--sw, 600px)); } }
.ev::after { content: ""; position: absolute; inset: -1px 1px; border-radius: 6px; pointer-events: none; opacity: 0; padding: 2px;
  background: var(--spec); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  box-shadow: 0 0 22px rgba(47, 107, 255, .35); transition: opacity .4s; }
.evid.ev-found .ev::after { opacity: 1; }
.evid.ev-found .ev { background: linear-gradient(90deg, rgba(34, 184, 255, .08), rgba(123, 92, 255, .10)) !important; }
[data-tone="risk"] { --spec: linear-gradient(90deg, #ff6b8b, #ff8a5b 55%, #ffc46b); }
[data-tone="risk"] .ev::after { box-shadow: 0 0 22px rgba(255, 107, 139, .35); }
.ev-chip { position: absolute; right: 14px; top: -16px; z-index: 3; max-width: 78%; padding: 10px 12px; border-radius: 10px; background: #fff;
  box-shadow: 0 18px 40px -16px rgba(10, 25, 80, .45), 0 0 0 1px rgba(10, 37, 64, .06); font: 12.5px/1.4 var(--font);
  opacity: 0; transform: translateY(6px); transition: opacity .45s .15s, transform .45s .15s; }
.ev-chip::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 2px; border-radius: 2px; background: var(--spec); }
.ev-chip b { display: block; color: var(--ink); font-size: 13px; } .ev-chip span { color: var(--slate); }
.evid.ev-found .ev-chip { opacity: 1; transform: none; }
.scene .sapgui { padding-bottom: 2px; }

/* wide card: the Trace desktop app */
.appwin { position: absolute; left: 32px; right: -1px; bottom: 0; top: 270px; border-radius: 12px 0 0 0; background: #fff; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(10, 25, 80, .42), 0 0 0 1px rgba(10, 37, 64, .06); }
.app-in { display: grid; grid-template-columns: 150px 1fr; height: 100%; }
.app-nav { display: grid; align-content: start; gap: 2px; padding: 16px 12px; background: #f6f8fc; border-right: 1px solid #eef1f6; font-size: 13px; color: var(--slate); }
.app-nav b { margin: 0 8px 12px; color: var(--ink); } .app-nav span { padding: 7px 8px; border-radius: 7px; }
.app-nav .on { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(10, 37, 64, .08), inset 2px 0 0 #2f6bff; }
.appwin .win-body { padding: 20px 28px; }

/* full card: SAP screen to verified fix */
.ev-scene { position: absolute; left: 330px; right: 32px; top: 40px; bottom: 36px; }
.sapgui.big { left: 0; right: 70px; top: 30px; bottom: auto; }
.decision { position: absolute; right: 0; top: auto; bottom: 0; width: 330px; padding: 18px; border-radius: 14px; background: #fff; z-index: 3;
  box-shadow: 0 30px 60px -20px rgba(10, 25, 80, .45), 0 0 0 1px rgba(10, 37, 64, .06); font-size: 13px; opacity: .45; transform: translateY(6px); transition: opacity .5s .3s, transform .5s .3s; }
.decision::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #22b8ff, #2f6bff, #7b5cff); }
.evid.ev-found .decision { opacity: 1; transform: none; }
.d-k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.decision h4 { margin: 8px 0 10px; font-size: 15px; color: var(--ink); }
.d-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed #e3e8ef; } .d-row b { color: var(--ink); font-weight: 500; text-align: right; } .d-row .ok { color: #0f6b34; }
.d-act { position: relative; margin-top: 12px; height: 38px; }
.d-btn, .d-done { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 9px; font-weight: 600; transition: opacity .4s, transform .4s; }
.d-btn { background: linear-gradient(180deg, #4a82ff, #2f6bff); color: #fff; box-shadow: 0 8px 18px -8px rgba(47, 107, 255, .8); }
.d-done { background: #e3f6e9; color: #0f6b34; opacity: 0; transform: scale(.96); }
.evid.ev-fixed .d-btn { opacity: 0; transform: scale(.96); } .evid.ev-fixed .d-done { opacity: 1; transform: none; }
.st b { font-weight: 400; } .st-b { display: none; color: #0f6b34; }
.evid.ev-fixed .st-a { display: none; } .evid.ev-fixed .st-b { display: inline; font-weight: 600; } .evid.ev-fixed .st .lt { background: #3a9b52; }
.evid.ev-fixed .ev::after { background: linear-gradient(90deg, #12a97a, #5be3c9); box-shadow: 0 0 22px rgba(18, 169, 122, .35); }
.ev-link { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.ev-link path { fill: none; stroke: url(#evg); stroke-width: 2; stroke-linecap: round; stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset .7s ease; }
.evid.ev-found .ev-link path { stroke-dashoffset: 0; }

@media (max-width: 960px) {
  .sapgui, .appwin { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin-top: 24px; }
  .app-in { grid-template-columns: 1fr; } .app-nav { display: none; }
  .ev-scene { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin-top: 24px; }
  .sapgui.big { position: relative; right: auto; top: auto; } .decision { position: relative; top: auto; width: auto; margin-top: 16px; } .ev-link { display: none; }
  .ev-chip { position: relative; right: auto; top: auto; max-width: none; margin: 0 8px 8px; }
  .big .g-h, .big .g-r { grid-template-columns: 1.5fr 1fr .6fr; } .big .g-h span:nth-child(3), .big .g-r span:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .scanline { display: none; } .ev-chip, .decision, .d-btn, .d-done, .ev::after, .ev-link path { transition: none; } }

.scene.c-third { min-height: 540px; }
.v20 .c-full { min-height: 700px; }
.ev-steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: s; max-width: 290px; }
.ev-steps li { position: relative; padding: 10px 12px 10px 44px; border-radius: 10px; font-size: 14px; color: var(--muted); counter-increment: s; transition: background .4s, color .4s; }
.ev-steps li b { color: inherit; font-weight: 600; }
.ev-steps li::before { content: counter(s); position: absolute; left: 12px; top: 9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: #eef1f6; color: var(--muted); transition: background .4s, color .4s; }
.card[data-step="1"] .ev-steps li:nth-child(1), .card[data-step="2"] .ev-steps li:nth-child(2), .card[data-step="3"] .ev-steps li:nth-child(3), .card[data-step="4"] .ev-steps li:nth-child(4) { background: #f3f6ff; color: var(--ink); }
.card[data-step="1"] .ev-steps li:nth-child(1)::before, .card[data-step="2"] .ev-steps li:nth-child(2)::before, .card[data-step="3"] .ev-steps li:nth-child(3)::before { background: var(--spec); color: #fff; }
.card[data-step="4"] .ev-steps li:nth-child(4)::before { background: linear-gradient(135deg, #12a97a, #5be3c9); color: #fff; }
@media (max-width: 960px) { .ev-steps { max-width: none; } }

/* v24: colour stages instead of white boxes */
.bento-sec.v20 { background: linear-gradient(180deg, #fff 0, #eef3ff 14%, #f1efff 62%, #f6f9fc 100%); }
.v20 .card { --cut: 22%; border-color: rgba(255, 255, 255, .9); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 24px 60px -34px rgba(20, 45, 110, .35);
  background:
    linear-gradient(180deg, #fff 0, #fff var(--cut), rgba(255, 255, 255, 0) calc(var(--cut) + 22%)),
    linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--stage); }
[data-stage="replay"] { --stage: radial-gradient(70% 90% at 15% 100%, #7cc4ff, transparent 70%), radial-gradient(60% 80% at 90% 90%, #4f7dff, transparent 70%), linear-gradient(135deg, #b9d6ff, #8fb0ff); }
[data-stage="auto"] { --stage: radial-gradient(80% 80% at 20% 100%, #5be3c9, transparent 70%), radial-gradient(70% 70% at 100% 70%, #5a8bff, transparent 70%), linear-gradient(160deg, #c9f3ea, #9ec0ff); }
[data-stage="audit"] { --stage: radial-gradient(80% 80% at 0% 100%, #7ee0ff, transparent 70%), radial-gradient(70% 70% at 100% 80%, #9aa8ff, transparent 70%), linear-gradient(150deg, #d4f1ff, #b3bdff); }
[data-stage="risk"] { --stage: radial-gradient(80% 80% at 10% 100%, #ffb38a, transparent 70%), radial-gradient(70% 70% at 100% 70%, #ff8fab, transparent 70%), linear-gradient(150deg, #ffe0c7, #ffc2cf); }
[data-stage="ai"] { --stage: radial-gradient(80% 80% at 0% 100%, #8fb4ff, transparent 70%), radial-gradient(70% 70% at 100% 70%, #b49bff, transparent 70%), linear-gradient(150deg, #cfdcff, #d6c9ff); }
[data-stage="loop"] { --cut: 0%; --stage: radial-gradient(50% 90% at 20% 100%, #7cd0ff, transparent 70%), radial-gradient(45% 80% at 60% 90%, #5f8dff, transparent 70%), radial-gradient(40% 70% at 100% 20%, #6ee7f0, transparent 70%), linear-gradient(120deg, #c9e0ff, #c4d4ff); }
[data-stage="loop"] { background:
    linear-gradient(90deg, #fff 0, #fff 27%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 22px 22px, var(--stage) !important; }
/* tighter cards, mockups fill the stage */
.v20 .c-wide, .v20 .c-narrow { min-height: 600px; }
.scene.c-third { min-height: 470px; }
.v20 .c-full { min-height: 600px; }
.scene .sapgui { left: 18px; right: 18px; bottom: 18px; }
.appwin { top: 230px; }
.ev-scene { top: 34px; bottom: 34px; }
.decision { bottom: 0; }
.scene .tpath { font-size: 14px; }
.c-third .mock { left: 18px !important; right: 18px !important; bottom: 18px !important; }
.ev-stage { position: relative; overflow: hidden; min-height: 560px; margin-top: 40px; border-radius: 14px; padding: 36px;
  background: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px) 0 0 / 22px 22px, var(--stage); }
.ev-stage .ev-steps { margin: 0; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-radius: 14px; padding: 10px; }
.ev-stage .ev-scene { left: 360px; }
.ev-band { background: linear-gradient(180deg, #f6f9fc, #eef3ff); }
@media (max-width: 960px) { .ev-stage { padding: 18px; } .ev-stage .ev-scene { left: auto; } }
.ev-stage[data-stage="loop"] { background: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px) 0 0 / 22px 22px, var(--stage) !important; }
