/* The /watch page, rebuilt. One screen: the stepper with a penguin that walks along it, the team diagram on the left,
   the step that is on at the right. Glass panels on the snow-white theme (ds.css), big readable numbers, nothing cramped. */
body.watch { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.watch .top, body.watch .nav { flex: none; }
body.watch .top .tag, body.watch .top .tag2 { display: none; }
body.watch .grid { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: none; width: 100%; padding: 0 clamp(14px, 2vw, 28px) 14px; gap: 0; }
body.watch .setup { display: none; }
body.watch .stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.watch #panel { flex: 1; min-height: 0; }

body.watch #flow { display: none; }

/* ---- the two panels */
.wv { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 16px; height: 100%; min-height: 0; }
.wv > .card { min-height: 0; padding: 16px 20px; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; border: 1.5px solid rgba(255, 255, 255, .95); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 26px 70px rgba(47, 111, 228, .13); }
html[data-theme='dark'] .wv > .card { border-color: rgba(255, 255, 255, .08); }
.wv-title { font: 600 1.05rem var(--serif); margin-bottom: 4px; }

/* ---- the diagram */
.wv-svg { flex: 1; min-height: 0; width: 100%; }
.wv-edge { stroke: var(--line); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; } .wv-edge.dashed { stroke-dasharray: 2 7; stroke-width: 2.2; }
.wv-edge.done { stroke: #63b8ff; } .wv-edge.on { stroke: #2f6fe4; stroke-width: 2.6; } .wv-edge.on.dashed { stroke-dasharray: 2 6; stroke-width: 3; }
.wv-edge.dashed.idle { stroke: color-mix(in srgb, var(--mut) 60%, transparent); }
.wv-halo { stroke: var(--card); stroke-width: 9; }
.wv-ah { fill: var(--line); } .wv-ah.done { fill: #63b8ff; } .wv-ah.on { fill: #2f6fe4; }
.wv-elabel { font-size: 13px; font-weight: 600; fill: color-mix(in srgb, var(--ink) 72%, transparent); } .wv-elabel.on { fill: #2f6fe4; font-weight: 700; }
.wv-node rect { fill: var(--card); stroke: var(--line); stroke-width: 1.5; transition: all .35s; filter: drop-shadow(0 4px 10px rgba(11, 58, 99, .06)); }
.wv-node.sub rect { fill: color-mix(in srgb, #63b8ff 10%, var(--card)); }
.wv-node.code rect { fill: color-mix(in srgb, #f2a33a 10%, var(--card)); stroke-dasharray: 5 4; }
.wv-node.seller rect { fill: color-mix(in srgb, #0b3a63 6%, var(--card)); }
.wv-node.idle { opacity: .5; }
.wv-node.done rect { stroke: #63b8ff; }
.wv-node.on rect, .wv-node.run rect { stroke: #2f6fe4; stroke-width: 3; fill: color-mix(in srgb, #2f6fe4 14%, var(--card)); filter: drop-shadow(0 8px 18px rgba(47, 111, 228, .3)); }
.wv-node.run rect { animation: wv-glow 1.6s ease-in-out infinite; }
.wv-nt { font-family: var(--sans); height: 100%; display: flex; flex-direction: column; justify-content: center; text-align: center; color: var(--ink); line-height: 1.25; }
.wv-nt b { font: 600 18px var(--serif); } .wv-nt span { font-size: 13px; font-weight: 500; color: var(--mut); margin-top: 3px; }
.wv-legend { flex: none; margin: 4px 0 0; font-size: .78rem; color: var(--mut); line-height: 1.4; }
.wv-now { flex: none; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; min-height: 44px; border-radius: 14px; background: linear-gradient(135deg, rgba(99, 184, 255, .16), rgba(169, 141, 242, .12)); border: 1px solid rgba(47, 111, 228, .18); font-size: .94rem; font-weight: 500; }
.wv-nowl { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #2f6fe4; font-weight: 700; }
.wv-nowt { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- the step that is on: header, what the agent says, the body */
.wv-main { gap: 12px; }
.wv-head { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wv-hl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wv-hl .stepno { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 1.3rem var(--serif); color: #fff; background: linear-gradient(135deg, #2f6fe4, #0b3a63); box-shadow: 0 8px 20px rgba(11, 58, 99, .3); }
.wv-hl h4 { font: 600 1.6rem var(--serif); letter-spacing: 0; }
.wv-hl .agentTag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, #2f6fe4 12%, var(--card)); color: var(--accent); border: 1px solid rgba(47, 111, 228, .25); }
.wv-hl .eng { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--soft); color: var(--mut); border: 1px solid var(--line); }
.wv-hl .eng::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.wv-ctl { display: flex; gap: 8px; flex-wrap: wrap; } .ghost.small { padding: 7px 16px; font-size: .86rem; }
.wv-say { flex: none; display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(47, 111, 228, .08), rgba(169, 141, 242, .09)); border: 1px solid rgba(47, 111, 228, .16); }
.wv-say .ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; color: #fff; background: linear-gradient(135deg, #63b8ff, #a98df2); box-shadow: 0 6px 14px rgba(99, 184, 255, .4); }
.wv-say p { font: 500 1.02rem/1.5 var(--sans); font-style: normal; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wv-say.ai p { font-style: normal; }
.wv-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.wv-empty, .wv-note { color: var(--mut); font-size: .92rem; font-weight: 500; } .wv-note { flex: none; }
.wv-sec { font: 700 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; margin: 6px 0 0; color: var(--mut); }
.wv-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wv-rule { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); line-height: 1.45; font-weight: 500; box-shadow: 0 6px 18px rgba(11, 58, 99, .05); }
.wv-rule b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #63b8ff, #2f6fe4); color: #fff; font-size: .85rem; }
.wv-rule.fired { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--card)); } .wv-rule.fired b { background: none; color: var(--warn); font-size: 1.2rem; } .wv-rule em { color: var(--warn); font-style: normal; font-weight: 700; }

/* read data: four big numbers, then the ranking as bars */
.wv-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; flex: none; }
.wv-tiles > div { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 11px; box-shadow: 0 6px 18px rgba(11, 58, 99, .05); overflow: hidden; }
.wv-tiles > div::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ds-grad); }
.wv-tiles b { display: block; font: 600 1.7rem/1.1 var(--serif); color: var(--brand); font-variant-numeric: lining-nums tabular-nums; } .wv-tiles small { color: var(--mut); font-size: .8rem; font-weight: 600; }
.wv-rank { display: flex; flex-direction: column; gap: 7px; }
.wv-rk { display: grid; grid-template-columns: 26px minmax(0, 1.5fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; padding: 8px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.wv-rk .rk { font: 700 1rem var(--serif); color: var(--accent); }
.wv-rk .nm { font-weight: 700; font-size: .95rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wv-rk .nm small { display: block; font-weight: 500; font-size: .78rem; color: var(--mut); }
.wv-rk .bar { height: 8px; border-radius: 8px; background: var(--soft); overflow: hidden; } .wv-rk .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #63b8ff, #2f6fe4); animation: wv-grow .9s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.wv-rk .num { font: 600 1.05rem var(--serif); font-variant-numeric: lining-nums tabular-nums; text-align: right; }

/* generic rows (research, recommend) */
.wv-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: .94rem; flex: none; transition: transform .2s, box-shadow .2s; }
.wv-row:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(47, 111, 228, .1); }
.wv-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wv-row .nm b { color: var(--accent); font-family: var(--serif); margin-right: 4px; }
.wv-row .num { font: 600 1.02rem var(--serif); font-variant-numeric: lining-nums tabular-nums; text-align: right; } .wv-row .mut, .mut { color: var(--mut); }
.wv-row .num.neg { color: var(--bad); }
.wv-row.res { grid-template-columns: minmax(0, 1fr) 215px minmax(0, 2fr) 78px; align-items: start; }
.wv-row.res .why { color: var(--ink); font-size: .86rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .wv-row.res .nm { white-space: normal; }
.oc { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .82rem; padding: 2px 10px; border-radius: 999px; }
.oc::before { content: '→'; } .oc.weaker { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); } .oc.weaker::before { content: '↓'; }
.oc.stronger { color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); } .oc.stronger::before { content: '↑'; } .oc.steady { color: var(--mut); background: var(--soft); }
.wv-row.rec { grid-template-columns: minmax(0, 1.5fr) auto auto minmax(70px, auto) minmax(50px, auto) auto; }
.wv-row.rec.approved { background: color-mix(in srgb, var(--ok) 10%, var(--card)); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); } .wv-row.rec.rejected { opacity: .55; }
.wv-row .flag { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; } .wv-row .flag.look { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.wv-row .st { font-size: .8rem; font-weight: 600; color: var(--mut); white-space: nowrap; } .wv-row .st.approved { color: var(--ok); font-weight: 700; }
.wv-rows { display: flex; flex-direction: column; gap: 7px; flex: none; }
.wv-value { flex: none; font: 700 1.04rem/1.4 var(--sans); padding: 12px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(99, 184, 255, .16), rgba(169, 141, 242, .12)); border: 1px solid rgba(47, 111, 228, .2); } .wv-value.pos { color: var(--ok); background: linear-gradient(135deg, rgba(31, 157, 107, .13), rgba(99, 184, 255, .14)); border-color: rgba(31, 157, 107, .3); }
.wv-foot { flex: none; margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: .88rem; font-weight: 500; } .wv-foot .primary { white-space: nowrap; flex: none; padding: 11px 22px; }

/* compare: a matrix of options */
.wv-mx { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 9px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: .92rem; flex: none; font-variant-numeric: tabular-nums; }
.wv-mx.head { background: none; border: 0; padding-bottom: 0; } .wv-mx .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-mx .best { font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); border-radius: 8px; padding: 3px 8px; } .wv-mx .neg { color: var(--bad); } .wv-mx .blk { color: var(--mut); font-size: .78rem; }

.wv-callout { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(99, 184, 255, .14), rgba(169, 141, 242, .1)); border: 1px solid rgba(47, 111, 228, .18); line-height: 1.5; font-weight: 500; }
.wv-callout b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2f6fe4, #0b3a63); color: #fff; }
.wv-callout.ok { background: color-mix(in srgb, var(--ok) 9%, var(--card)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); } .wv-callout.ok b { background: var(--ok); }

/* result: the three measures of the pitch */
.wv-kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; flex: none; }
.wv-kpis .k { margin: 0; padding: 14px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(11, 58, 99, .06); }
.wv-kpis .k small { font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--mut); }
.wv-kpis .k b { display: block; font: 600 1.8rem/1.15 var(--serif); color: var(--brand); font-variant-numeric: lining-nums tabular-nums; } .wv-kpis .k em { display: block; font-style: normal; font-size: .8rem; font-weight: 500; color: var(--mut); margin-top: 2px; }
.wv-kpis .k.hero { color: #fff; border: 0; background: linear-gradient(135deg, #2f6fe4 0%, #0b3a63 100%); box-shadow: 0 16px 36px rgba(11, 58, 99, .32); } .wv-kpis .k.hero small { color: rgba(255, 255, 255, .8); } .wv-kpis .k.hero b { font-size: 2.3rem; color: #fff; } .wv-kpis .k.hero b.neg { color: #ffd0d0; }
.wv-bars { flex: none; } .wv-bars .cmp { display: grid; grid-template-columns: 170px 1fr 110px; align-items: center; gap: 12px; margin: 6px 0; font-size: .9rem; font-weight: 500; } .wv-bars .track { height: 10px; border-radius: 10px; background: var(--soft); overflow: hidden; } .wv-bars .track i { display: block; height: 100%; border-radius: 10px; animation: wv-grow .9s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; } .wv-bars b { text-align: right; font-variant-numeric: tabular-nums; } .wv-bars b.neg { color: var(--bad); }
.wv-close { flex: none; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); } .wv-ch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; } .wv-ch b { font: 600 1.05rem var(--serif); }
.wv-close p { line-height: 1.5; font-size: .95rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; } .wv-close .prov { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

@keyframes wv-glow { 50% { stroke-width: 5; } }
@keyframes wv-grow { from { transform: scaleX(0); } }
@keyframes wv-waddle { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-3px); } }
@keyframes wv-hop { 0% { transform: translateY(0) scale(1, 1); } 25% { transform: scale(1.1, .86); } 55% { transform: translateY(-20px) scale(.94, 1.1); } 80% { transform: scale(1.08, .9); } 100% { transform: none; } }

/* ---- smaller screens: less air, and the close-up goes first */
@media (max-height: 960px) and (min-width: 1001px) {
  body.watch .flowbox { margin: 36px 0 8px; padding: 8px 12px 5px; } body.watch .flowbox .bubble { width: 30px; height: 30px; font-size: .9rem; } body.watch .flowbox .nl { font-size: .84rem; }
  .wv { gap: 12px; } .wv > .card { padding: 12px 16px; } .wv-main { gap: 8px; } .wv-body { gap: 7px; }
  .wv-hl h4 { font-size: 1.3rem; } .wv-hl .stepno { width: 38px; height: 38px; font-size: 1.1rem; } .wv-say { padding: 9px 14px; } .wv-say p { -webkit-line-clamp: 2; font-size: .94rem; }
  .wv-row { padding: 6px 12px; font-size: .88rem; } .wv-row.res .why { -webkit-line-clamp: 1; font-size: .8rem; } .wv-mx { padding: 6px 12px; font-size: .86rem; } .wv-rk { padding: 6px 12px; }
  .wv-tiles > div { padding: 8px 12px 7px; } .wv-tiles b { font-size: 1.4rem; } .wv-rule { padding: 9px 12px; font-size: .9rem; } .wv-callout { padding: 10px 14px; } .wv-value { padding: 9px 14px; font-size: .96rem; }
  .wv-close { padding: 9px 12px; } .wv-close p { -webkit-line-clamp: 3; font-size: .9rem; } .wv-kpis .k { padding: 10px 14px; } .wv-kpis .k.hero b { font-size: 1.8rem; } .wv-kpis .k b { font-size: 1.45rem; }
  .wv-nt b { font-size: 15px; } .wv-nt span { font-size: 12px; } .wv-now { padding: 6px 12px; min-height: 36px; margin-top: 6px; }
}
@media (max-height: 800px) and (min-width: 1001px) { .wv-close { display: none; } .wv-say p { -webkit-line-clamp: 2; } .wv-rk:nth-child(n+5) { display: none; } }
@media (max-width: 1000px), (max-height: 640px) {
  body.watch { height: auto; overflow: auto; display: block; } body.watch .grid { display: block; } body.watch .flowbox { margin: 40px 0 12px; overflow-x: auto; }
  .wv { grid-template-columns: 1fr; height: auto; } .wv > .card { overflow: visible; } .wv-svg { height: auto; max-height: 380px; } .wv-g2 { grid-template-columns: 1fr; }
  .wv-row, .wv-row.rec, .wv-row.res, .wv-mx { grid-template-columns: 1fr 1fr; } .wv-tiles, .wv-kpis { grid-template-columns: 1fr 1fr; } .wv-rk { grid-template-columns: 22px 1fr auto; } .wv-rk .bar { display: none; } .wv-bars .cmp { grid-template-columns: 110px 1fr 90px; }
}
@media (prefers-reduced-motion: reduce) { .wv-walker, .wv-rk .bar i, .wv-bars .track i, .wv-node.run rect { animation: none !important; transition: none !important; } }

/* ---- second pass, after looking at all eight steps */
.wv-main { position: relative; }
.wv-main::after { content: ''; position: absolute; right: 16px; bottom: 10px; width: 210px; height: 210px; background: url(/brand/snowflake-full.webp) center / contain no-repeat; opacity: .08; pointer-events: none; }
html[data-theme='dark'] .wv-main::after { opacity: .13; }
.wv-main > * { position: relative; z-index: 1; }
.wv-hl { flex: 1; min-width: 0; flex-wrap: nowrap; }
.wv-ht { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.wv-ht .agentTag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 10px; font-size: .68rem; }
.wv-hl .eng { margin-left: auto; }
.wv-ctl { flex: none; }
.wv-g2.big { flex: 1; max-height: 330px; grid-auto-rows: minmax(0, 1fr); gap: 14px; }
.wv-g2.big .wv-rule { align-items: center; font-size: 1.04rem; line-height: 1.5; padding: 18px 20px; }
.wv-g2.big .wv-rule b { width: 36px; height: 36px; font-size: 1rem; }
.wv-row.res { grid-template-columns: minmax(0, .9fr) 205px minmax(0, 2fr) 74px; }
.wv-row.res > span:nth-child(2) { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wv-mx.head > span > * { font-size: .72rem !important; padding: 3px 8px !important; white-space: nowrap; }
.wv-callout.loop { font-size: .9rem; }
@media (max-height: 960px) and (min-width: 1001px) {
  body.watch .grid { padding-bottom: 8px; } body.watch .flowbox { margin-top: 34px; }
  .wv-hl .eng { display: none; } .wv-g2.big .wv-rule { padding: 12px 16px; font-size: .96rem; } .wv-g2.big { max-height: 250px; }
  .wv-callout.loop { padding: 8px 12px; font-size: .84rem; line-height: 1.35; } .wv-kpis .k small { font-size: .72rem; } .wv-bars .cmp { margin: 3px 0; font-size: .84rem; }
}

/* ---- phone: one column that really stays inside the screen */
@media (max-width: 1000px), (max-height: 640px) {
  .wv { grid-template-columns: minmax(0, 1fr); } .wv > .card { min-width: 0; padding: 14px 14px; border-radius: 20px; }
  .wv-head { flex-wrap: wrap; } .wv-hl { flex: 1 1 100%; } .wv-ctl { flex: 1 1 100%; } .wv-ctl .ghost { flex: 1; }
  .wv-foot { flex-wrap: wrap; } .wv-foot .primary { width: 100%; }
  .wv-row, .wv-row.rec, .wv-row.res, .wv-mx { min-width: 0; } .wv-row .nm { white-space: normal; }
  .wv-now { flex-wrap: wrap; } .wv-svg { max-height: 330px; } .wv-hl h4 { font-size: 1.35rem; }
  body.watch .flowbox { margin-top: 44px; }
}

/* ---- the penguin IS the agent: it runs to the box that is at work, and reacts when the seller decides */
body.watch .stage { padding-top: 4px; }
.wv-pg { position: absolute; z-index: 40; pointer-events: none; transform: translateX(-50%); transition: left .95s cubic-bezier(.45, 0, .2, 1), top .95s cubic-bezier(.45, 0, .2, 1); line-height: 0; }
.wv-pg.face-r .wv-flip, .wv-pg.face-l .wv-flip { transform: scaleX(-1); }
.wv-pg.moving .fl-art-bob { animation: wv-waddle .3s ease-in-out infinite; }
.wv-pg.hop .fl-art { animation: wv-hop .7s cubic-bezier(.3, 1.6, .5, 1) 2; transform-origin: 50% 100%; }
.wv-pg.bow .fl-art { animation: wv-bow 1.4s cubic-bezier(.45, 0, .25, 1) both; transform-origin: 50% 100%; }
.wv-bub { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 6px) scale(.92); min-width: 150px; max-width: 230px; padding: 8px 12px; border-radius: 14px; background: var(--card); color: var(--accent); box-shadow: 0 12px 30px rgba(11, 58, 99, .22); text-align: center; line-height: 1.3; opacity: 0; transition: opacity .25s, transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.wv-bub b { display: block; font: 700 .98rem var(--sans); } .wv-bub span { display: block; margin-top: 2px; font: 500 .76rem var(--sans); color: var(--mut); }
.wv-bub::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--card); transform: rotate(45deg); }
.wv-bub.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.wv-node.sim rect { stroke: var(--ok) !important; stroke-dasharray: none !important; fill: color-mix(in srgb, var(--ok) 14%, var(--card)) !important; opacity: 1 !important; animation: wv-glow 1s ease-in-out 3; }
.wv-node.sim { opacity: 1 !important; }
@keyframes wv-bow { 0% { transform: rotate(0); } 30% { transform: rotate(-32deg) translateY(2px); } 72% { transform: rotate(-32deg) translateY(2px); } 100% { transform: rotate(0); } }

/* the seller's problem, at the start */
.wv-scn { flex: none; padding: 14px 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(242, 163, 58, .13), rgba(99, 184, 255, .12)); border: 1px solid rgba(242, 163, 58, .35); }
.wv-scn-t { font: 700 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--warn); margin-bottom: 8px; }
.wv-scn-n { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wv-scn-n b { display: block; font: 600 1.9rem/1.1 var(--serif); color: var(--brand); font-variant-numeric: lining-nums tabular-nums; } .wv-scn-n small { display: block; font-size: .8rem; font-weight: 500; color: var(--mut); margin-top: 3px; line-height: 1.35; }
.wv-scn-x { margin-top: 8px; font-size: .78rem; font-weight: 500; color: var(--mut); }
.wv-ctl .round { width: 36px; padding: 5px 0; font-size: 1.15rem; line-height: 1; } .wv-ctl .round:disabled { opacity: .35; cursor: default; }
@media (max-height: 960px) and (min-width: 1001px) { .wv-scn { padding: 10px 14px; } .wv-scn-n b { font-size: 1.5rem; } .wv-g2.big { max-height: 200px; } .wv-g2.big .wv-rule { padding: 9px 12px; font-size: .9rem; } }
@media (max-height: 800px) and (min-width: 1001px) { .wv-close { display: block; } .wv-rk:nth-child(n+5) { display: flex; } }
@media (max-height: 740px) and (min-width: 1001px) { .wv-close { display: none; } .wv-rk:nth-child(n+5) { display: none; } }
@media (max-width: 1000px), (max-height: 640px) { body.watch .grid { padding-top: 10px; } }

/* ---- the three choices on every draft: approve, change, reject */
.wv-choose { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: .82rem; font-weight: 600; color: var(--mut); margin: 2px 0 -2px; }
.wv-choose b { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 700; }
.wv-choose .c1 { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); } .wv-choose .c2 { color: var(--accent); border-color: rgba(47, 111, 228, .35); } .wv-choose .c3 { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.wv-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 2px 2px 0; scrollbar-width: thin; }
.wv-row.rec { grid-template-columns: minmax(0, 1.6fr) auto auto auto; gap: 10px; padding: 7px 12px; }
.wv-row.rec .nm { display: flex; flex-direction: column; white-space: normal; line-height: 1.2; } .wv-row.rec .nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-row.rec .nm small { font-size: .74rem; font-weight: 500; color: var(--mut); margin-top: 1px; } .wv-row.rec .nm small.look { color: var(--warn); font-weight: 600; }
.dc { display: flex; align-items: center; gap: 6px; }
.dec { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--mut); font: 700 .95rem var(--sans); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s; }
.dec:hover:not(:disabled) { transform: translateY(-2px) scale(1.06); box-shadow: 0 8px 18px rgba(47, 111, 228, .2); }
.dec.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); } .dec.ok:hover:not(:disabled) { background: var(--ok); color: #fff; border-color: transparent; }
.dec.no { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); } .dec.no:hover { background: var(--bad); color: #fff; border-color: transparent; }
.dec:disabled { opacity: .35; cursor: not-allowed; }
.dec.undo { width: 30px; height: 30px; font-size: .9rem; }
select.dec.ed { appearance: none; -webkit-appearance: none; color: transparent; border-color: rgba(47, 111, 228, .45); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6fe4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4.2L19.4 8.8a2.1 2.1 0 0 0-3-3L5.2 17z'/%3E%3Cpath d='M14.4 7.4l3 3'/%3E%3C/svg%3E") center / 17px no-repeat; }
select.dec.ed option { color: #0c1f3b; }
.wv-row.rec .st { font-weight: 700; }
.wv-pg.nod .fl-art { animation: wv-nod .8s ease-in-out 2; transform-origin: 50% 100%; }
@keyframes wv-nod { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-14deg) translateY(2px); } 70% { transform: rotate(6deg); } }
@media (max-width: 1000px), (max-height: 640px) { .wv-row.rec { grid-template-columns: 1fr auto; } .wv-row.rec .dc { grid-column: 1 / -1; justify-content: flex-end; } }

/* ---- one week later: day 0, day 7, and what the agent concludes */
.wv-tl { flex: 1; min-height: 0; display: flex; align-items: stretch; gap: 8px; }
.wv-arrow { align-self: center; font-style: normal; font-size: 1.5rem; font-weight: 700; color: #63b8ff; flex: none; }
.wv-day { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(11, 58, 99, .07); animation: wv-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.wv-day small { font: 700 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.wv-day p { font-size: .9rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.wv-day .wv-dn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.6rem; } .wv-day .wv-dn i { font-style: normal; font-weight: 700; color: var(--accent); } .wv-day .wv-dn.pos { color: var(--ok); font-size: 2.2rem; }
.wv-day .wv-big { font: 600 2.6rem/1 var(--serif); color: var(--brand); font-variant-numeric: lining-nums tabular-nums; } .wv-day .wv-big em { font: 500 1rem var(--sans); font-style: normal; color: var(--mut); margin-left: 4px; }
.wv-day.verdict { background: linear-gradient(135deg, rgba(47, 111, 228, .1), rgba(169, 141, 242, .1)); border-color: rgba(47, 111, 228, .3); animation-delay: .25s; }
.wv-day.verdict .wv-dn { font-size: 1rem; }
.wv-day.ask { flex: 2 1 0; }
.wv-opts { display: flex; flex-direction: column; gap: 9px; }
.wv-opts.mini { flex-direction: row; gap: 6px; margin-top: auto; } .wv-opts.mini .wv-opt { flex: 1; padding: 6px 4px; } .wv-opts.mini .wv-opt span { display: none; } .wv-opts.mini .wv-opt b { font-size: .7rem; line-height: 1.15; }
.wv-opt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .2s, box-shadow .2s, background .2s; }
.wv-opt:hover { transform: translateY(-2px); border-color: #2f6fe4; box-shadow: 0 10px 22px rgba(47, 111, 228, .18); }
.wv-opt.on { border-color: transparent; color: #fff; background: linear-gradient(135deg, #2f6fe4, #0b3a63); box-shadow: 0 10px 24px rgba(11, 58, 99, .3); } .wv-opt.on span { color: rgba(255, 255, 255, .85); }
.wv-opt b { font: 700 .98rem var(--sans); } .wv-opt span { font: 500 .8rem var(--sans); color: var(--mut); }
.wv-callout.loop .primary { margin-left: auto; flex: none; padding: 8px 16px; font-size: .86rem; white-space: nowrap; }
@keyframes wv-rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 1000px), (max-height: 640px) { .wv-tl { flex-direction: column; } .wv-arrow { transform: rotate(90deg); align-self: center; } }

/* dark mode: the lit label and the calculator box need more light than the daytime colours give */
html[data-theme='dark'] .wv-elabel.on { fill: #8cc8ff; }
html[data-theme='dark'] .wv-node.code rect { fill: color-mix(in srgb, #f2a33a 14%, var(--card)); }

/* ---- no outer frame: the two panels stand on the page by themselves */
body.watch #panel { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; border-radius: 0; }
/* ---- the line under the diagram keeps one height whatever the agent says, so the diagram never jumps */
.wv-now { height: 64px; min-height: 64px; box-sizing: border-box; }
.wv-legend { min-height: 2.8em; }

/* ---- one distance for everything: the page edges, the strip under the header, the bottom and the space between the two panels */
body.watch { --g: clamp(12px, 1.4vw, 20px); }
body.watch .grid { padding: 0 var(--g) var(--g) !important; }
body.watch .stage { padding-top: var(--g) !important; }
body.watch .wv { gap: var(--g) !important; }

/* ---- the detailed view of the recording: the steps in the sidebar, one panel on the right that scrolls inside itself */
body.detail { --g: clamp(12px, 1.4vw, 20px); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.detail .top, body.detail .nav { flex: none; }
body.detail .grid { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(250px, 22vw, 300px) minmax(0, 1fr); gap: var(--g); align-items: stretch; max-width: none; width: 100%; padding: var(--g) var(--g) var(--g); }
body.detail .setup { min-height: 0; display: flex; flex-direction: column; }
body.detail .replaybox { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow-y: auto; padding: 16px 14px; border-radius: 24px; border: 1.5px solid rgba(255, 255, 255, .95); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 26px 70px rgba(47, 111, 228, .13); }
html[data-theme='dark'] body.detail .replaybox { border-color: rgba(255, 255, 255, .08); }
body.detail .replaybox .row { display: flex; flex-wrap: wrap; gap: 8px; }
body.detail .replaybox .row button { flex: 1 1 auto; justify-content: center; }
body.detail .stage { min-height: 0; padding: 0; display: flex; flex-direction: column; }
body.detail #panel { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px; border-radius: 24px; border: 1.5px solid rgba(255, 255, 255, .95); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 26px 70px rgba(47, 111, 228, .13); }
html[data-theme='dark'] body.detail #panel { border-color: rgba(255, 255, 255, .08); }
/* the steps, drawn as a list down the sidebar */
body.detail #flow { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
body.detail #flow .link { display: none; }
body.detail #flow .node { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-width: 0; flex: none; text-align: left; padding: 7px 10px; border-radius: 14px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
body.detail #flow .node:hover { background: rgba(47, 111, 228, .06); }
body.detail #flow .node.sel { background: linear-gradient(135deg, rgba(99, 184, 255, .22), rgba(169, 141, 242, .16)); border-color: rgba(47, 111, 228, .26); }
body.detail #flow .bubble { grid-row: 1 / span 2; width: 34px; height: 34px; margin: 0; font-size: 1.1rem; }
body.detail #flow .nl { white-space: normal; font-size: .95rem; align-self: end; }
body.detail #flow .nd { display: block; margin: 0; font-size: .76rem; align-self: start; }
@media (max-width: 1000px) {
  body.detail { height: auto; overflow: auto; display: block; }
  body.detail .grid { display: flex; flex-direction: column; padding-top: var(--g); }
  body.detail .replaybox { overflow: visible; } body.detail #panel { overflow: visible; padding: 16px; }
  body.detail .grid .setup { order: -1 !important; } body.detail .grid .stage { order: 0 !important; }
  body.detail #flow { flex-direction: row; overflow-x: auto; gap: 0; scrollbar-width: none; } body.detail #flow::-webkit-scrollbar { display: none; }
  body.detail #flow .node { display: block; text-align: center; min-width: 74px; padding: 4px; } body.detail #flow .bubble { margin: 0 auto 4px; } body.detail #flow .nd { display: none; } body.detail #flow .nl { white-space: nowrap; font-size: .8rem; }
}

/* ---- the penguin in its own poses: a pose is a picture, so the bow is a soft dip and not a turn of the whole body */
.wv-pose { filter: drop-shadow(0 4px 6px rgba(11, 58, 99, .22)); }
@keyframes wv-bow { 0% { transform: none; } 30%, 72% { transform: translateY(2px) scale(.97); } 100% { transform: none; } }

/* ---- the app after login: the same two blocks as the Step view; one distance everywhere, one panel that scrolls inside itself */
body.ds-app { --g: clamp(12px, 1.4vw, 20px); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.ds-app .top { flex: none; }
body.ds-app .top .tag, body.ds-app .top .tag2 { display: none; }
body.ds-app .grid { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(270px, 22vw, 320px) minmax(0, 1fr); gap: var(--g); align-items: stretch; max-width: none; width: 100%; padding: var(--g); }
body.ds-app .setup { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--g); padding: 0 2px 2px 0; scrollbar-width: thin; }
body.ds-app .setup > * { flex: none; margin: 0; }
body.ds-app .setup .card, body.ds-app .setup details.card, body.ds-app #flow, body.ds-app #panel { border-radius: 22px; border: 1.5px solid rgba(255, 255, 255, .95); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 22px 60px rgba(47, 111, 228, .12); }
html[data-theme='dark'] body.ds-app .setup .card, html[data-theme='dark'] body.ds-app .setup details.card, html[data-theme='dark'] body.ds-app #flow, html[data-theme='dark'] body.ds-app #panel { border-color: rgba(255, 255, 255, .08); }
body.ds-app .stage { min-height: 0; padding: 0; display: flex; flex-direction: column; gap: var(--g); }
body.ds-app #flow { flex: none; margin: 0; }
body.ds-app #panel { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px; }
@media (max-width: 1000px) {
  body.ds-app { height: auto; overflow: auto; display: block; }
  body.ds-app .grid { display: flex; flex-direction: column; }
  body.ds-app .setup { overflow: visible; } body.ds-app #panel { overflow: visible; padding: 16px; }
  body.ds-app .grid .stage { order: 0 !important; } body.ds-app .grid .setup { order: -1 !important; }
}

/* app: nothing in the sidebar may be wider than its column, and the step bar fits at laptop width */
body.ds-app .setup, body.ds-app .setup > *, body.ds-app .setup .card { min-width: 0; max-width: 100%; box-sizing: border-box; }
body.ds-app .setup .drop { overflow-wrap: anywhere; }
body.ds-app .setup .row, body.ds-app .setup .samples { flex-wrap: wrap; }
body.ds-app #flow .node { min-width: 0; padding: 4px 2px; } body.ds-app #flow .node .nl { white-space: normal; font-size: .84rem; } body.ds-app #flow .node .nd { font-size: .74rem; }
body.ds-app #flow .link { flex-basis: 6px; }
body.ds-app .setup { padding-top: 0; }
body.ds-app .samples { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.ds-app .samples .sample { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: .86rem; white-space: normal; line-height: 1.15; }

/* app: the steps are a list in the sidebar (as in the Step view), the data and the Run button follow, the account comes last; the right side is one panel */
body.ds-app .setup > .flowcard { order: 1; padding: 10px 8px; }
body.ds-app .setup > .setup-body { order: 2; padding: 0; }
body.ds-app .setup > #run { order: 3; }
body.ds-app .setup > details.account { order: 4; }
body.ds-app .setup-body > .card { margin: 0; }
body.ds-app #flow { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
body.ds-app #flow .link { display: none; }
body.ds-app #flow .node { display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; align-items: center; min-width: 0; flex: none; text-align: left; padding: 6px 9px; border-radius: 14px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
body.ds-app #flow .node:hover { background: rgba(47, 111, 228, .06); }
body.ds-app #flow .node.sel { background: linear-gradient(135deg, rgba(99, 184, 255, .22), rgba(169, 141, 242, .16)); border-color: rgba(47, 111, 228, .26); }
body.ds-app #flow .bubble { grid-row: 1 / span 2; width: 32px; height: 32px; margin: 0; font-size: 1.05rem; }
body.ds-app #flow .node .nl { white-space: normal; font-size: .93rem; align-self: end; }
body.ds-app #flow .node .nd { display: block; margin: 0; font-size: .74rem; align-self: start; }
@media (max-width: 1000px) {
  body.ds-app #flow { flex-direction: row; overflow-x: auto; gap: 0; scrollbar-width: none; } body.ds-app #flow::-webkit-scrollbar { display: none; }
  body.ds-app #flow .node { display: block; text-align: center; min-width: 74px; padding: 4px; } body.ds-app #flow .bubble { margin: 0 auto 4px; } body.ds-app #flow .node .nd { display: none; } body.ds-app #flow .node .nl { white-space: nowrap; font-size: .8rem; }
}
body.ds-app .setup > #run { position: sticky; bottom: 0; z-index: 2; } /* the main button stays in view while the sidebar scrolls */
body.ds-app .samples .sample b { font-size: .8rem; }

/* the box at work is marked by its colour and the penguin standing on it; an endless glow on an SVG shape with a shadow repainted it every frame */
.wv-node.run rect { animation: none; }

/* app: no step list in the sidebar; the account comes first, then the data, then Run */
body.ds-app .setup > .flowcard { display: none; }
body.ds-app .setup > details.account { order: 1; }
body.ds-app .setup > .setup-body { order: 2; }
body.ds-app .setup > #run { order: 3; }

/* app: sign out is an icon in the top bar; the sidebar is short enough not to scroll */
.top .icon.logout { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 999px; }
body.ds-app .setup { gap: calc(var(--g) * .8); }
body.ds-app .setup details.account { padding: 12px 16px; }
body.ds-app .setup .account .who { margin: 2px 0 6px; }
body.ds-app .setup .setup-body > .card { padding: 14px 16px; }
body.ds-app .setup > #run { position: static; }
@media (max-height: 800px) {
  body.ds-app .setup details.account { padding: 10px 14px; }
  body.ds-app .setup .setup-body > .card { padding: 12px 14px; }
  body.ds-app .setup .drop { padding: 7px 10px; } body.ds-app .setup .drop b { font-size: .92rem; }
  body.ds-app .setup .or { margin: 2px 0; }
  body.ds-app .setup #try-csv { display: none; }
  body.ds-app .setup .dstats > div { padding-top: 5px; padding-bottom: 5px; }
  body.ds-app .setup > #run { height: 44px; min-height: 0; }
}

/* the earlier runs are folded away, so the account block keeps one height whatever the history */
body.ds-app .runs-fold > summary.runs-h { cursor: pointer; margin: 10px 0 0; list-style: none; } body.ds-app .runs-fold > summary.runs-h::-webkit-details-marker { display: none; }
body.ds-app .runs-fold > summary.runs-h::after { content: ' ▾'; } body.ds-app .runs-fold[open] > summary.runs-h::after { content: ' ▴'; }
body.ds-app .runs-fold[open] { max-height: 160px; overflow-y: auto; }
