/* Evidence vignette: the Evidence library dimmed behind, the upload drawer floating over it. */

#vig-evidence { --ve-e: cubic-bezier(.16,1,.3,1); }
.ve-stage { position: absolute; left: 0; top: 0; width: 100%; height: 640px; transform-origin: 100% 0; font-size: 13px; line-height: 1.45; letter-spacing: -0.006em; color: var(--fg-1); text-align: left; user-select: none; }
.ve-stage * { cursor: default; }
.ve-stage .mono { font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0; }
@keyframes ve-in { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ve-out { to { opacity: 0; transform: translateY(-8px); filter: blur(2px); } }

/* ---------- board: Evidence ---------- */
#vig-evidence .ve-board { inset: 8px -6% 0 -2%; opacity: .8; }
.ve-app { width: 1240px; height: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.ve-rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; }
.ve-logo svg { width: 22px; height: 11px; display: block; margin-bottom: 8px; }
.ve-rail .ap-av { width: 26px; height: 26px; font-size: 9.5px; }
.ve-rail i { width: 20px; height: 1px; background: var(--line-3); margin: 6px 0; }
.ve-ri { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--fg-3); }
.ve-ri svg { width: 15px; height: 15px; }
.ve-ri.on { background: var(--bg-3); color: var(--fg-1); box-shadow: inset 0 0 0 1px var(--line-3); }
.ve-main { padding: 14px 0 0 28px; min-width: 0; }
.ve-head { display: flex; align-items: flex-end; gap: 12px; padding-right: 24px; }
.ve-head small { display: flex; align-items: center; gap: 10px; color: var(--fg-3); font-size: 12px; }
.ve-head small span { padding-left: 10px; border-left: 1px solid var(--line-3); display: inline-flex; align-items: center; gap: 5px; }
.ve-as svg { width: 11px; height: 11px; color: var(--cu); }
.ve-as .ai-mark { --ai-mark-h: 7.5px; }
.ve-head h4 { margin: 4px 0 0; font-size: 20px; font-weight: 560; letter-spacing: -0.02em; }
.ve-head .ap-btn { margin-left: auto; }
.ve-tabs { margin: 12px 0 16px; display: flex; gap: 18px; font-size: 12.5px; color: var(--fg-3); border-bottom: 1px solid var(--line); }
.ve-tabs span { padding-bottom: 9px; }
.ve-tabs .on { color: var(--fg-1); box-shadow: inset 0 -1.5px var(--fg-1); }
.ve-stats { display: grid; grid-template-columns: repeat(5, 120px); gap: 8px; margin-bottom: 14px; }
.ve-stats > div { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-3); padding: 10px 12px; }
.ve-stats small { display: block; color: var(--fg-3); font-size: 11.5px; }
.ve-stats b { display: block; margin-top: 2px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-feature-settings: "tnum"; }
.ve-stats b.tick { animation: ve-in .5s var(--ve-e); }
.ve-table { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-3); background: var(--bg-1); overflow: hidden; }
.ve-th { height: 44px; padding: 0 18px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-2); }
.ve-th b { font-weight: 560; font-size: 13.5px; }
.ve-th span { color: var(--fg-3); font-size: 12px; font-feature-settings: "tnum"; }
.ve-tr { display: grid; grid-template-columns: 96px 316px 206px 28px 64px 72px 110px; align-items: center; height: 44px; padding: 0 18px; border-bottom: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; font-size: 12.5px; }
.ve-tr > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ve-h { height: 34px; color: var(--fg-3); font-size: 12px; }
.ve-tr .ap-key { height: 20px; font-size: 10.5px; gap: 4px; justify-self: start; }
.ve-tr .ap-key span { color: var(--fg-3); }
.ve-nm { color: var(--fg-1); font-weight: 500; padding-right: 16px; }
.ve-lks { display: flex; gap: 4px; align-items: center; }
.ve-lk { height: 19px; padding: 0 5px; border-radius: 5px; display: inline-flex; align-items: center; font-family: "Geist Mono", monospace; font-size: 10.5px; color: var(--fg-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.ve-more { color: var(--fg-3); font-size: 11.5px; margin-left: 2px; }
.ve-ic { color: var(--fg-3); display: grid; }
.ve-ic svg { width: 14px; height: 14px; }
.ve-tr .ap-av.round { width: 22px; height: 22px; font-size: 9px; }
.ve-day { color: var(--fg-3); font-size: 12px; }
.ve-st { height: 21px; font-size: 11.5px; padding: 0 7px; gap: 5px; }
.ve-st svg { width: 11px; height: 11px; }
.ve-mp { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 26%, transparent); }
.ve-mr { background: #3b4a5c !important; color: #eef3f8 !important; box-shadow: none !important; }
.ve-so { background: #3f5249 !important; color: #eaf3ee !important; box-shadow: none !important; }
.ve-al { background: #4b4560 !important; color: #f0eef8 !important; box-shadow: none !important; }

/* the accepted files settle in at the top */
.ve-new { display: grid; overflow: hidden; grid-template-rows: 0fr; transition: grid-template-rows .65s var(--ve-e); }
.ve-new > .ve-tr { min-height: 0; height: auto; overflow: hidden; border-bottom-color: transparent; transition: background 2.4s ease; }
.ve-new.on { grid-template-rows: 1fr; }
.ve-new.on > .ve-tr { height: 44px; border-bottom-color: var(--line-2); }
.ve-new.lit > .ve-tr { background: var(--bg-3); transition: background .3s; }

/* ---------- panel: the upload drawer ---------- */
.ve-panel { right: 20px; top: -28px; width: 468px; height: 552px; display: flex; flex-direction: column; }
.ve-ph { padding: 16px 16px 14px 20px; display: flex; align-items: flex-start; gap: 6px; border-bottom: 1px solid var(--line); }
.ve-ph > div { flex: 1; }
.ve-ph h5 { margin: 0; font-size: 15px; font-weight: 560; letter-spacing: -0.015em; }
.ve-ph small { display: block; margin-top: 2px; color: var(--fg-3); font-size: 12px; font-feature-settings: "tnum"; }
.ve-ph .ap-iconbtn { box-shadow: none; }

.ve-drop { display: none; margin: 16px 20px; height: 170px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-3); flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--fg-3); font-size: 12px; transition: background .3s, box-shadow .3s; }
.ve-drop svg { width: 18px; height: 18px; margin-bottom: 6px; color: var(--fg-2); }
.ve-drop b { color: var(--fg-1); font-weight: 500; font-size: 13px; }
.ve-panel.empty .ve-drop { display: flex; animation: ve-in .5s var(--ve-e) both; }
.ve-panel.over .ve-drop { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--fg-4); }

.ve-list { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ve-file { display: none; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-3); background: var(--bg-1); padding: 10px 12px; }
:root[data-theme="light"] .ve-file { background: #fff; }
.ve-file.in { display: block; animation: ve-in .6s var(--ve-e) both; }
.ve-file.gone { animation: ve-out .45s ease both; }
.ve-f1 { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto 64px; gap: 9px; align-items: center; }
.ve-fi { color: var(--fg-3); display: grid; }
.ve-fi svg { width: 15px; height: 15px; }
.ve-fn { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve-sz { font-size: 11px; color: var(--fg-3); }
.ve-word { font-size: 11.5px; color: var(--fg-3); text-align: right; transition: color .3s; }
.ve-file.read .ve-word { color: var(--fg-2); }
.ve-bar { height: 2px; margin: 9px 0 1px 24px; border-radius: 2px; background: var(--bg-4); overflow: hidden; transition: opacity .4s, height .4s var(--ve-e), margin .4s var(--ve-e); }
.ve-bar b { display: block; height: 100%; background: var(--fg-2); transform-origin: 0 0; transform: scaleX(var(--p, 0)); transition: transform .5s linear; }
.ve-file.reading .ve-bar b { background: linear-gradient(90deg, var(--fg-4), var(--fg-2), var(--fg-4)); background-size: 200% 100%; animation: ve-read 2.4s linear infinite; }
@keyframes ve-read { 0% { background-position: 100% 0; } 75%, 100% { background-position: -100% 0; } }
.ve-file.read .ve-bar { opacity: 0; height: 0; margin-top: 0; }
.ve-f2 { display: none; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0 0 24px; }
.ve-file.read .ve-f2 { display: flex; }
.ve-ty { font-size: 11.5px; color: var(--fg-3); padding-right: 8px; margin-right: 3px; border-right: 1px solid var(--line-3); line-height: 14px; }
.ve-sl { font-size: 11.5px; color: var(--fg-3); margin-right: 2px; }
.ve-sg { height: 20px; padding: 0 6px; border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; font-family: "Geist Mono", monospace; font-size: 11px; color: var(--cu); background: var(--cu-tint); box-shadow: inset 0 0 0 1px var(--cu-line); transition: color .4s, background .4s, box-shadow .4s; }
.ve-file.read .ve-sg { animation: ve-in .5s var(--ve-e) both; }
.ve-file.read .ve-sg:nth-of-type(4) { animation-delay: .12s; }
.ve-file.read .ve-sg:nth-of-type(5) { animation-delay: .24s; }
.ve-burst { --ai-mark-h: 7px; }
.ve-ck { width: 10px; height: 10px; display: none; color: var(--ok); }
.ve-file.acc .ve-sg { color: var(--fg-1); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.ve-file.acc .ve-burst { display: none; }
.ve-file.acc .ve-ck { display: block; }

.ve-foot { padding: 12px 14px 12px 20px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.ve-who { flex: 1; font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 7px; }
.ve-who svg { width: 13px; height: 13px; color: var(--ok); }
.ve-who.swap { animation: ve-in .5s var(--ve-e) both; color: var(--fg-1); }
.ve-foot .ap-btn { opacity: .4; transition: opacity .4s, transform .16s, filter .16s; }
.ve-foot.ready .ap-btn { opacity: 1; }
.ve-foot.hide .ap-btn { opacity: 0; }

.ve-cursor .tag { background: #3f5249; }

/* narrow screens: crop to the panel and scale it (set by evidence.js) */
#vig-evidence.ve-narrow { overflow: clip; }
#vig-evidence.ve-narrow .ve-stage { left: auto; right: 0; }
#vig-evidence.ve-narrow .ve-panel { right: 0; left: 0; top: 0; width: auto; height: 540px; }
#vig-evidence.ve-narrow .ve-board { display: none; }
#vig-evidence.ve-narrow .ve-ph small, #vig-evidence.ve-narrow .ve-sz, #vig-evidence.ve-narrow .ve-word, #vig-evidence.ve-narrow .ve-ty, #vig-evidence.ve-narrow .ve-sl, #vig-evidence.ve-narrow .ve-sg, #vig-evidence.ve-narrow #vig-evidence.ve-narrow .ve-fn, #vig-evidence.ve-narrow .ve-drop b { font-size: 13.5px; }
#vig-evidence.ve-narrow .ve-f1 { grid-template-columns: 15px minmax(0, 1fr) auto 60px; }
#vig-evidence.ve-narrow .ve-foot { padding-left: 16px; }

@media (prefers-reduced-motion: reduce) {
  #vig-evidence *, #vig-evidence *::before, #vig-evidence *::after { animation: none !important; transition: none !important; }
}

#vig-evidence.ve-snap * { transition: none !important; }

/* loop restart: the finished drawer blur-fades out over 500ms before the next round */
.ve-panel .ve-list, .ve-panel .ve-foot { transition: opacity 500ms var(--ease-swap), filter 500ms var(--ease-swap); }
.ve-panel.ve-out .ve-list, .ve-panel.ve-out .ve-foot { opacity: 0; filter: blur(4px); }
.ve-who time { color: var(--fg-3); font-size: 11.5px; } .ve-who .ap-av { width: 18px; height: 18px; font-size: 8px; }
.ve-sl { display: none; }
