/*
 * Author: Hariram S <ramhari4090@gmail.com>
 *
 * Drawn recreations of Dotwave's app screens (cards in the cleaning step,
 * the review dialog, applied steps, column tools, the audit trail, the
 * dashboard and its dialogs), built in HTML and SVG so they stay sharp at
 * any size and their text is real text. Labels, numbers and layout are
 * copied from the app's own screens for the sample client "Kaveri Home
 * Goods" (reference captures in landing/static/media/), simplified.
 *
 * Every drawn screen has data-ui on its root: inside it the app's own
 * conventions apply (1px borders, pills, small labels), which the page rules
 * in site.css do not allow elsewhere.
 *
 * Scenes. A .scene is a drawn screen that plays a flow step by step.
 * scenes.js sets data-s="0".."n" on it; the rules at the end of this file say
 * what each step looks like. Without data-s (no JavaScript) every scene shows
 * its final step. Only transform and opacity change between steps, plus
 * stroke-dashoffset when a chart line draws itself; nothing moves the layout.
 * Under prefers-reduced-motion all transitions are switched off.
 *
 * Used by:
 *     landing/index.html, landing/use-cases.html, landing/features/*.html
 *
 * Depends on:
 *     landing/assets/chrome.css (--font)
 *     landing/assets/scenes.js  (data-s, .is-playing, aria-current on cues)
 */

[data-ui] {
  --u-ground: #f6f7fb;
  --u-card: #fff;
  --u-border: #e3e6ee;
  --u-control: #cdd2dd;
  --u-text: #121521;
  --u-muted: #555c6b;
  --u-violet: #5136e3;
  --u-lav: #eeeafe;
  --u-lav-ink: #4127c8;
  --u-blue: #0a67a6;
  --u-blue-2: #93c0de;
  --u-green: #0b7a52;
  --u-green-bar: #0f9a68;
  --u-amber: #8a5b04;
  --u-amber-bar: #c58a12;
  --u-pink: #c4689d;
  --u-red: #b42330;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--u-text);
  text-align: left;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
[data-ui] * { box-sizing: border-box; }
[data-ui] p, [data-ui] h4, [data-ui] ol, [data-ui] ul { margin: 0; padding: 0; }
[data-ui] ol, [data-ui] ul { list-style: none; }

/* Surfaces */
.u-screen {
  --wp: clamp(12px, 2vw, 22px); --wb: 36px;
  background: var(--u-ground); padding: calc(var(--wb) + var(--wp)) var(--wp) var(--wp); border-radius: 16px; position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 40px 90px -40px rgba(124, 92, 255, .55), 0 20px 40px -20px rgba(0, 0, 0, .6); /* taste-skill-ignore: the drawn app window floats on the dark page */
}
/* Window bar: three dots and the app's address, drawn with gradients so it needs no markup. */
.u-screen::before {
  content: "app.dotwave.app"; position: absolute; left: 0; right: 0; top: 0; height: var(--wb); display: flex; align-items: center; justify-content: center;
  font: 500 11px/1 var(--mono, monospace); letter-spacing: .02em; color: #6b7280; border-bottom: 1px solid #e4e7ee; /* taste-skill-ignore: window chrome inside a data-ui fragment */
  background:
    radial-gradient(circle at 18px 50%, #e3e5ea 5px, transparent 5.5px),
    radial-gradient(circle at 36px 50%, #e3e5ea 5px, transparent 5.5px),
    radial-gradient(circle at 54px 50%, #e3e5ea 5px, transparent 5.5px), #fbfbfd;
}
.u-screen .u-screen { box-shadow: none; padding: 0; background: transparent; }
.u-screen .u-screen::before { display: none; }
.u-card { background: var(--u-card); border: 1px solid var(--u-border); border-radius: 16px; padding: 18px; }
.u-card + .u-card { margin-top: 12px; }
.u-h { font-size: 15px; font-weight: 700; line-height: 1.35; }
.u-h .ic { display: inline-block; width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px; }
.u-sub { margin-top: 4px; font-size: 13px; color: var(--u-muted); }
.u-sec { font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 2px 10px; }
.u-tip { margin-top: 8px; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.u-tip::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 5px; border: 2px solid var(--u-violet); border-radius: 50%; }
.u-muted { color: var(--u-muted); }
.u-small { font-size: 12.5px; }
.u-ok { color: var(--u-green); }

/* Options (radio cards) */
.u-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.u-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--u-border); border-radius: 12px; font-size: 13.5px; font-weight: 500; }
.u-opt::before { content: ""; position: absolute; inset: -1px; border: 1.5px solid #a99cf3; background: var(--u-lav); border-radius: 12px; opacity: 0; transition: opacity .35s ease; }
.u-opt > * { position: relative; }
.u-radio { flex: none; width: 15px; height: 15px; border: 1.5px solid #8b92a3; border-radius: 50%; display: grid; place-items: center; }
.u-radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--u-violet); opacity: 0; transition: opacity .3s ease; }
.u-opt.on::before, .u-opt.on .u-radio::after { opacity: 1; }
.u-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #e3ddfd; color: var(--u-lav-ink); font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* Explain panel */
.u-explain { margin-top: 12px; padding: 14px; background: #f3f4f8; border-radius: 12px; font-size: 13px; display: grid; gap: 7px; }
.u-explain b { font-weight: 700; }
.u-rule { display: inline-block; padding: 1px 6px; background: #fff; border-radius: 4px; font-size: 12.5px; }
.u-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.u-tbl th { font-weight: 500; color: var(--u-muted); text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--u-border); }
.u-tbl td { padding: 5px 8px 5px 0; border-bottom: 1px solid #edeff4; }
.u-tbl td.r, .u-tbl th.r { text-align: right; }

/* Buttons and fields */
.u-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.u-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 15px; border-radius: 999px; background: var(--u-violet); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; position: relative; }
.u-btn-o { background: #fff; color: var(--u-text); border: 1px solid var(--u-control); }
.u-btn-dark { background: #161a26; border-radius: 10px; }
.u-btn-dim { opacity: .55; }
.u-btn .ic, .u-sec .ic { width: 14px; height: 14px; }
.u-press { position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--u-violet); opacity: 0; transform: scale(.9); transition: opacity .3s ease, transform .4s ease; }
.u-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; margin-top: 12px; }
.u-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.u-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--u-control); border-radius: 999px; background: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; }
.u-field::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid #454c5c; border-bottom: 1.5px solid #454c5c; transform: rotate(45deg) translateY(-2px); }
.u-field.txt::after { display: none; }
.u-ph { color: #5f6676; }
.u-radios { display: grid; gap: 7px; margin-top: 4px; font-size: 13px; }
.u-radios > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-radios .u-radio::after { opacity: 0; }
.u-radios .on .u-radio::after { opacity: 1; }
.u-mini { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid var(--u-control); border-radius: 999px; font-size: 12.5px; }

/* Swap: two or more states stacked in one cell, one shown at a time (opacity only) */
.u-swap { display: grid; }
.u-swap > * { grid-area: 1 / 1; transition: opacity .35s ease; }
.u-swap > .alt { opacity: 0; }

/* Applied steps */
.u-steps { display: grid; gap: 6px; }
.u-step { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 12px; background: #fff; border: 1px solid var(--u-border); border-radius: 12px; font-size: 13px; }
.u-step .n { color: var(--u-muted); min-width: 1.4em; }
.u-step .t { flex: 1; min-width: 0; }
.u-step .act { display: flex; gap: 12px; color: #3c4252; font-size: 12.5px; white-space: nowrap; }
.u-arrows { letter-spacing: .3em; }
.u-ai { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #e3ddfd; color: var(--u-lav-ink); font-size: 11px; font-weight: 700; }

/* Chips: before -> after */
.u-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.u-chip { padding: 2px 9px; background: #f0f1f5; border-radius: 999px; font-size: 12px; color: #3a4050; white-space: nowrap; }

/* Dialog */
.u-dialog { background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 24px 60px -24px rgba(16, 20, 44, .45), 0 2px 8px rgba(16, 20, 44, .08); } /* taste-skill-ignore: inside a data-ui app fragment, copied from the app */
.u-dialog .u-h { font-size: 17px; }
.u-x { position: absolute; right: 18px; top: 16px; width: 14px; height: 14px; }
.u-x::before, .u-x::after { content: ""; position: absolute; left: 6px; top: -1px; width: 1.5px; height: 16px; background: #50576a; transform: rotate(45deg); }
.u-x::after { transform: rotate(-45deg); }
.u-score { margin-top: 14px; padding: 12px 14px; background: #f3f4f8; border-radius: 12px; font-size: 14px; }
.u-rev { display: grid; gap: 8px; margin-top: 12px; }
.u-rev li { padding: 10px 12px; border: 1px solid var(--u-border); border-radius: 14px; }
.u-rev .tick { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1.5px solid var(--u-green-bar); border-radius: 50%; margin-right: 8px; vertical-align: -2px; }
.u-rev .tick::after { content: ""; width: 5px; height: 3px; border-left: 1.5px solid var(--u-green-bar); border-bottom: 1.5px solid var(--u-green-bar); transform: rotate(-45deg) translate(0, -1px); }
.u-rev .cnt { display: block; margin-left: 23px; color: var(--u-muted); font-size: 12.5px; }
.u-rev .u-chips { margin-left: 23px; }
.u-dfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* Odometer: the score rolls from 84 to 96 by moving a column of numbers */
.u-odo { display: inline-block; height: 1.2em; overflow: hidden; vertical-align: bottom; }
.u-odo > span { display: block; transition: transform 1.4s cubic-bezier(.2, .9, .2, 1); }
.u-odo > span > span { display: block; height: 1.2em; line-height: 1.2em; }

/* Quality score card */
.u-q { display: grid; grid-template-columns: minmax(120px, 170px) 1fr; gap: 18px; }
.u-q-big { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.u-q-big small { font-size: 18px; font-weight: 500; color: var(--u-muted); }
.u-q-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.u-q-part .top { display: flex; justify-content: space-between; font-size: 13px; }
.u-q-part .top b { font-weight: 600; }
.u-bar { height: 7px; background: #e8eaf0; border-radius: 999px; margin: 5px 0 6px; overflow: hidden; }
.u-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--u-green-bar); transform-origin: left; }
.u-bar > i.amber { background: var(--u-amber-bar); }
.u-q-part p { font-size: 12.5px; color: var(--u-muted); }
.u-problems { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--u-border); font-size: 13px; } /* taste-skill-ignore: inside a data-ui app fragment, copied from the app */
.u-problems ul { margin-top: 6px; display: grid; gap: 3px; list-style: disc; padding-left: 18px; }

/* Profile tiles and first rows */
.u-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.u-tile { padding: 8px 14px; background: #fff; border: 1px solid var(--u-border); border-radius: 12px; font-size: 12.5px; color: var(--u-muted); }
.u-tile b { display: block; font-size: 20px; color: var(--u-text); font-weight: 600; }
.u-tile.warn { background: #fbf6e8; }
.u-tile.warn b { color: var(--u-amber); }
.u-scroll { overflow-x: auto; }
.u-rows { border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.u-rows th { text-align: left; font-weight: 600; color: var(--u-muted); padding: 6px 14px 6px 0; border-bottom: 1px solid var(--u-border); }
.u-rows td { padding: 6px 14px 6px 0; border-bottom: 1px solid #edeff4; }

/* Audit trail */
.u-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: #eef0f5; border-radius: 12px; font-size: 13px; flex-wrap: wrap; }
.u-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; align-items: center; font-size: 12.5px; }
.u-filters .u-field { min-height: 30px; border-radius: 8px; font-size: 12.5px; }
.u-log { display: grid; gap: 8px; }
.u-log li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; }
.u-log .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: #e3f4ec; color: var(--u-green); }
.u-log .dot.st { background: #ece8fd; color: var(--u-lav-ink); }
.u-log .dot.rm { background: #fdeaea; color: var(--u-red); }
.u-log .dot.cl { background: #e7eefb; color: #2650a8; }
.u-log .box { padding: 9px 12px; background: #f6f7fa; border: 1px solid var(--u-border); border-radius: 12px; }
.u-log .s { font-size: 13px; }
.u-log .meta { font-size: 12px; color: var(--u-muted); margin-top: 2px; }
.u-who { font-size: 11.5px; padding: 1px 8px; border: 1px solid var(--u-border); border-radius: 999px; color: #3c4252; background: #fff; }
.u-who.ai { background: #ece8fd; color: var(--u-lav-ink); border-color: #ddd5fb; }
.u-file { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: #161a26; color: #fff; border-radius: 12px; font-size: 12.5px; box-shadow: 0 16px 40px -18px rgba(10, 12, 30, .6); } /* taste-skill-ignore: inside a data-ui app fragment, copied from the app */

/* Dashboard */
.u-dash-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.u-dash-meta { font-size: 12.5px; color: var(--u-muted); margin-top: 2px; }
.u-dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.u-dash .u-card { margin: 0; padding: 14px 16px; min-width: 0; }
.u-kpi .lbl { font-size: 13px; font-weight: 600; }
.u-kpi .val { font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; letter-spacing: -0.02em; text-align: center; margin-top: 14px; line-height: 1.1; }
.u-kpi .cap { text-align: center; font-size: 12px; color: var(--u-muted); margin-bottom: 6px; }
.u-wide { grid-column: span 2; }
.u-take { font-size: 12.5px; color: #3a4050; margin-top: 4px; }
.u-chart { position: relative; margin-top: 10px; }
.u-chart svg { width: 100%; height: auto; overflow: visible; }
.u-axis { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--u-muted); margin-top: 4px; }
.u-axis span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-bars { display: flex; align-items: flex-end; gap: 8%; height: 120px; padding: 0 2%; border-bottom: 1px solid #e3e6ee; } /* taste-skill-ignore: inside a data-ui app fragment, copied from the app */
.u-bars i { flex: 1; background: var(--u-blue-2); border-radius: 4px 4px 0 0; transform-origin: bottom; }
.u-bars i.lead { background: var(--u-blue); }
.u-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; margin-top: 8px; justify-content: center; }
.u-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; background: var(--c); vertical-align: 0; }
.u-tip-box { position: absolute; top: 18px; left: 0; padding: 6px 10px; background: #fff; border: 1px solid var(--u-border); border-radius: 8px; font-size: 12px; box-shadow: 0 8px 22px -10px rgba(16, 20, 44, .35); white-space: nowrap; transition: transform .5s cubic-bezier(.2, .9, .2, 1), opacity .3s ease; } /* taste-skill-ignore: inside a data-ui app fragment, copied from the app */
.u-tip-box b { display: block; font-weight: 700; }

/* Floating dialogs inside scenes */
.u-float { position: absolute; z-index: 3; transition: opacity .4s ease, transform .5s cubic-bezier(.2, .9, .2, 1); }

/* Add source tiles */
.u-src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.u-src > div { padding: 12px; border: 1px solid var(--u-border); border-radius: 14px; background: #fff; }
.u-src > div.sel { border: 2px solid #a99cf3; }
.u-src b { display: block; font-size: 14px; }
.u-src span { display: block; font-size: 12px; color: var(--u-muted); margin-top: 2px; }
.u-src .ic { width: 22px; height: 22px; margin-bottom: 8px; color: var(--u-violet); }

/* Semantic editor, combine dialog, step 4 */
.u-list { display: grid; gap: 6px; margin-top: 8px; }
.u-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.u-row .u-field { border-radius: 8px; min-height: 30px; font-size: 12.5px; }
.u-meter { height: 8px; background: #e8eaf0; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.u-meter i { display: block; height: 100%; background: var(--u-green-bar); transform-origin: left; }
.u-warn { margin-top: 10px; padding: 10px 12px; background: #fff8e6; border-radius: 10px; font-size: 12.5px; color: #6b4a04; }
.u-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 8px; }
.u-check::before { content: ""; width: 14px; height: 14px; border: 1.5px solid #8b92a3; border-radius: 3px; background: #fff; }
.u-check.on::before { background: var(--u-violet); border-color: var(--u-violet); }
.u-seg { display: inline-flex; padding: 3px; background: #eef0f5; border-radius: 999px; gap: 2px; font-size: 12px; }
.u-seg span { padding: 4px 12px; border-radius: 999px; }
.u-seg span.on { background: #fff; font-weight: 600; }
.u-chat { margin-top: 12px; display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 14px; border: 1px solid var(--u-control); border-radius: 999px; background: #fff; }
.u-chat .q { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; }

/* Scene frame, controls and step list */
.scene { margin: 0; }
.scene-screen { position: relative; }
.scene-ctl { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 15px; flex-wrap: wrap; }
.scene-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .04); color: #fff; font: 500 13px/1 var(--font); cursor: pointer;
  transition: transform .18s ease, background-color .2s ease, border-color .2s ease;
}
.scene-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); }
.scene-btn:active { transform: scale(.97); }
.scene-btn svg { width: 12px; height: 12px; }
.scene-btn .i-play { display: none; }
.scene:not(.is-playing) .scene-btn .i-play { display: block; }
.scene:not(.is-playing) .scene-btn .i-pause { display: none; }
.scene-count { font: 400 12px/1 var(--mono, monospace); color: #a1a1aa; font-variant-numeric: tabular-nums; }

.cues { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; counter-reset: cue; }
.cues li { position: relative; counter-increment: cue; }
.cues button {
  display: grid; grid-template-columns: 28px 1fr; gap: 8px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent;
  font: 400 14px/1.55 var(--font); color: #a1a1aa; cursor: pointer; position: relative;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.cues button::before { content: counter(cue, decimal-leading-zero); font: 500 12px/1.9 var(--mono, monospace); color: #8b8b94; }
.cues li[aria-current="step"] button { color: #fff; border-color: rgba(124, 92, 255, .5); background: rgba(124, 92, 255, .08); }
.cues li[aria-current="step"] button::before { color: #b4a3ff; }
.cues button:hover { color: #fff; background: rgba(255, 255, 255, .04); }

/* A dimmed backdrop behind dialogs inside a scene, so the dialog reads as a layer. */
.u-dim { position: absolute; inset: var(--wb) 0 0 0; z-index: 2; background: rgba(15, 18, 32, .38); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.sc-rev:is([data-s="1"], [data-s="2"]) .u-dim, .sc-dash:not([data-s]) .u-dim, .sc-dash[data-s="4"] .u-dim { opacity: 1; }

/* Press rings show only while a scene plays. */
.scene:not(.is-playing) .u-press { opacity: 0 !important; }

/* ---- Scene states. Absent data-s means the final state. ---- */

/* Dates card */
.sc-dates .scr { min-height: 470px; }
.sc-dates .layer2 { position: absolute; inset: calc(var(--wb) + var(--wp)) var(--wp) var(--wp); opacity: 1; transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.sc-dates .layer1 { opacity: 0; transform: translateY(-14px); transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.sc-dates:is([data-s="0"], [data-s="1"], [data-s="2"]) .layer1 { opacity: 1; transform: none; }
.sc-dates:is([data-s="0"], [data-s="1"], [data-s="2"]) .layer2 { opacity: 0; transform: translateY(14px); }
.sc-dates[data-s="1"] .opt-df::before, .sc-dates[data-s="1"] .opt-df .u-radio::after { opacity: 0; }
.sc-dates[data-s="1"] .opt-mf::before, .sc-dates[data-s="1"] .opt-mf .u-radio::after { opacity: 1; }
.sc-dates[data-s="1"] .u-swap > .df { opacity: 0; }
.sc-dates[data-s="1"] .u-swap > .mf { opacity: 1; }
.sc-dates .chk { opacity: 1; transition: opacity .4s ease; }
.sc-dates:is([data-s="0"], [data-s="1"]) .chk { opacity: 0; }
.sc-dates[data-s="2"] .press-chk { opacity: 1; transform: none; }
.sc-dates .ap-new { animation: none; }
.sc-dates[data-s="3"] .ap-new { animation: u-in .6s .25s cubic-bezier(.16, 1, .3, 1) both; }

/* Currency card */
.sc-cur .rates { transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.sc-cur:is([data-s="0"], [data-s="1"], [data-s="2"]) .rates { opacity: 0; transform: translateY(10px); }
.sc-cur[data-s="0"] .r-today .u-radio::after { opacity: 1; }
.sc-cur[data-s="0"] .r-row .u-radio::after { opacity: 0; }
.sc-cur .tipline { transition: opacity .4s ease; }
.sc-cur[data-s="0"] .tipline { opacity: 0; }
.sc-cur .u-swap.pv > .alt { opacity: 0; }
.sc-cur[data-s="2"] .u-swap.pv > .alt { opacity: 1; }
.sc-cur[data-s="2"] .u-swap.pv > .base { opacity: 0; }
.sc-cur[data-s="2"] .press-pv { opacity: 1; transform: none; }
.sc-cur .create { transition: opacity .4s ease; }
.sc-cur:is([data-s="0"], [data-s="1"], [data-s="2"]) .create { opacity: .5; }
.sc-cur .toast { opacity: 1; transform: none; margin-bottom: 12px; transition: opacity .45s ease, transform .55s cubic-bezier(.16, 1, .3, 1); }
.sc-cur:is([data-s="0"], [data-s="1"], [data-s="2"], [data-s="3"]) .toast { opacity: 0; transform: translateY(-10px); }
.sc-cur[data-s="4"] .press-cr { opacity: 1; transform: none; }

/* Review before applying */
.sc-rev .scr { min-height: 560px; }
.sc-rev .dlg { left: 50%; top: calc(var(--wb) + 14px); width: min(460px, calc(100% - 24px)); transform: translateX(-50%) scale(.97); opacity: 0; pointer-events: none; }
.sc-rev:is([data-s="1"], [data-s="2"]) .dlg { opacity: 1; transform: translateX(-50%); }
.sc-rev .revlist-win { max-height: 278px; overflow: hidden; margin-top: 10px;
  /* Items scroll under soft edges instead of being cut flat against the score line and buttons. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); }
.sc-rev .revlist { transition: transform .9s cubic-bezier(.4, 0, .2, 1); }
.sc-rev[data-s="2"] .revlist { transform: translateY(-190px); }
.sc-rev[data-s="0"] .press-all { opacity: 1; transform: none; }
.sc-rev[data-s="2"] .press-ap { opacity: 1; transform: none; }
.sc-rev .odo-strip { transform: translateY(-7.2em); }
.sc-rev:is([data-s="0"], [data-s="1"], [data-s="2"]) .odo-strip { transform: none; }
.sc-rev .u-swap.ql > .alt { opacity: 1; }
.sc-rev .u-swap.ql > .base { opacity: 0; }
.sc-rev:is([data-s="0"], [data-s="1"], [data-s="2"]) .u-swap.ql > .alt { opacity: 0; }
.sc-rev:is([data-s="0"], [data-s="1"], [data-s="2"]) .u-swap.ql > .base { opacity: 1; }
.sc-rev .after-steps li { transition: opacity .4s ease, transform .5s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i) * 70ms + .3s); }
.sc-rev:is([data-s="0"], [data-s="1"], [data-s="2"]) .after-steps li { opacity: 0; transform: translateY(-6px); transition-delay: 0s; }
/* The "Applied steps" heading arrives with its list, not before it. */
.sc-rev .u-sec:has(+ .after-steps) { transition: opacity .4s ease .3s; }
.sc-rev:is([data-s="0"], [data-s="1"], [data-s="2"]) .u-sec:has(+ .after-steps) { opacity: 0; transition-delay: 0s; }
.sc-rev .cards-below { transition: opacity .4s ease; }
.sc-rev[data-s="3"] .cards-below, .sc-rev:not([data-s]) .cards-below { opacity: .0; }

/* Column tools */
.sc-tools .u-swap.col > .alt, .sc-tools .u-swap.tool > .alt, .sc-tools .u-swap.set > .alt { opacity: 1; }
.sc-tools .u-swap.col > .base, .sc-tools .u-swap.tool > .base, .sc-tools .u-swap.set > .base { opacity: 0; }
.sc-tools[data-s="0"] .u-swap > .alt { opacity: 0; }
.sc-tools[data-s="0"] .u-swap > .base { opacity: 1; }
.sc-tools .typed { transition: opacity .4s ease; }
.sc-tools:is([data-s="0"], [data-s="1"]) .typed { opacity: 0; }
.sc-tools:is([data-s="0"], [data-s="1"]) .typed-ph { opacity: 1; }
.sc-tools .typed-ph { opacity: 0; transition: opacity .3s ease; }
.sc-tools .effect { transition: opacity .4s ease, transform .5s cubic-bezier(.16, 1, .3, 1); }
.sc-tools:is([data-s="0"], [data-s="1"], [data-s="2"]) .effect { opacity: 0; transform: translateY(6px); }
.sc-tools[data-s="3"] .press-chk, .sc-tools[data-s="4"] .press-ap { opacity: 1; transform: none; }
.sc-tools .new-step { transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.sc-tools:is([data-s="0"], [data-s="1"], [data-s="2"], [data-s="3"]) .new-step { opacity: 0; transform: translateY(-8px); }

/* Dashboard */
.sc-dash[data-s="0"] .draw { stroke-dasharray: 1000; animation: u-draw 1.6s .2s cubic-bezier(.4, 0, .2, 1) both; }
.sc-dash[data-s="0"] .u-bars i { animation: u-grow .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms + .3s); }
.ring { transform-box: fill-box; transform-origin: center; }
.sc-dash[data-s="0"] .ring { animation: u-ring 1.1s .3s cubic-bezier(.16, 1, .3, 1) both; }
.sc-dash[data-s="0"] .u-kpi .val { animation: u-in .7s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 80ms); }
.sc-dash .tipr .u-tip-box { opacity: 0; transform: translateY(6px); }
.sc-dash[data-s="1"] .tipr .t1, .sc-dash[data-s="2"] .tipr .t2, .sc-dash[data-s="3"] .tipr .t3 { opacity: 1; transform: none; }
.sc-dash .share { right: 16px; bottom: 16px; width: min(380px, calc(100% - 32px)); opacity: 1; transform: none; }
.sc-dash:is([data-s="0"], [data-s="1"], [data-s="2"], [data-s="3"]) .share { opacity: 0; transform: translateY(12px) scale(.98); }

/* Audit trail */
.sc-audit .u-log li { transition: opacity .45s ease, transform .55s cubic-bezier(.16, 1, .3, 1); }
.sc-audit[data-s="0"] .u-log li { animation: u-in .55s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * 140ms); }
.sc-audit .u-swap.who > .alt { opacity: 1; }
.sc-audit .u-swap.who > .base { opacity: 0; }
.sc-audit[data-s="0"] .u-swap.who > .alt { opacity: 0; }
.sc-audit[data-s="0"] .u-swap.who > .base { opacity: 1; }
.sc-audit .clear { transition: opacity .3s ease; }
.sc-audit[data-s="0"] .clear { opacity: 0; }
.sc-audit .u-file { transition: opacity .4s ease, transform .5s cubic-bezier(.16, 1, .3, 1); }
.sc-audit:is([data-s="0"], [data-s="1"]) .u-file { opacity: 0; transform: translateY(10px); }
.sc-audit[data-s="2"] .press-ex { opacity: 1; transform: none; }

/* Ask your data */
.sc-ask .typed { transition: opacity .4s ease; }
.sc-ask[data-s="0"] .typed { opacity: 0; }
.sc-ask .typed-ph { opacity: 0; transition: opacity .3s ease; }
.sc-ask[data-s="0"] .typed-ph { opacity: 1; }
.sc-ask .result { transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.sc-ask:is([data-s="0"], [data-s="1"]) .result { opacity: 0; transform: translateY(10px); }
.sc-ask[data-s="2"] .u-bars i { animation: u-grow .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms + .2s); }
.sc-ask .u-swap.add > .alt { opacity: 1; }
.sc-ask .u-swap.add > .base { opacity: 0; }
.sc-ask:is([data-s="0"], [data-s="1"], [data-s="2"]) .u-swap.add > .alt { opacity: 0; }
.sc-ask:is([data-s="0"], [data-s="1"], [data-s="2"]) .u-swap.add > .base { opacity: 1; }


/* Adding a data source */
.sc-src .scr { min-height: 540px; }
.u-src > div { position: relative; }
.u-src > div.pick::after { content: ""; position: absolute; inset: -1px; border: 2px solid #a99cf3; border-radius: 14px; opacity: 1; transition: opacity .3s ease; }
.sc-src .dlg-src { position: absolute; inset: calc(var(--wb) + var(--wp)) var(--wp) var(--wp); z-index: 2; transition: opacity .45s ease, transform .55s cubic-bezier(.16, 1, .3, 1); opacity: 0; transform: scale(.98); pointer-events: none; }
.sc-src:is([data-s="0"], [data-s="1"]) .dlg-src { opacity: 1; transform: none; }
.sc-src[data-s="0"] .u-src > div.pick::after { opacity: 0; }
.sc-src .file-chip { transition: opacity .35s ease; }
.sc-src[data-s="0"] .file-chip { opacity: 0; }
.sc-src .proj { transition: opacity .45s ease; }
.sc-src:is([data-s="0"], [data-s="1"]) .proj { opacity: 0; }
.sc-src .u-swap.st > .alt { opacity: 1; }
.sc-src .u-swap.st > .base { opacity: 0; }
.sc-src[data-s="2"] .u-swap.st > .alt { opacity: 0; }
.sc-src[data-s="2"] .u-swap.st > .base { opacity: 1; }
.sc-src .prof { transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.sc-src:is([data-s="0"], [data-s="1"], [data-s="2"], [data-s="3"]) .prof { opacity: 0; transform: translateY(10px); }

/* Joining two sources */
.sc-join .j-src, .sc-join .j-key, .sc-join .j-fan { transition: opacity .45s ease, transform .55s cubic-bezier(.16, 1, .3, 1); }
.sc-join[data-s="0"] .j-src, .sc-join:is([data-s="0"], [data-s="1"]) .j-key, .sc-join:is([data-s="0"], [data-s="1"], [data-s="2"]) .j-fan { opacity: 0; transform: translateY(8px); }
.sc-join[data-s="2"] .u-meter i { animation: u-fill 1.2s .2s cubic-bezier(.16, 1, .3, 1) both; }
.sc-join[data-s="4"] .press-cr { opacity: 1; transform: none; }
@keyframes u-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Quality card bars fill when the card enters */
html.js .fill-on-view .u-bar > i { transform: scaleX(0); transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 120ms); }
html.js .fill-on-view.in .u-bar > i { transform: scaleX(1); }

@keyframes u-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes u-draw { from { stroke-dashoffset: var(--len, 1000); } to { stroke-dashoffset: 0; } }
@keyframes u-ring { from { opacity: 0; transform: rotate(-40deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes u-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (max-width: 640px) {
  [data-ui] { font-size: 13px; }
  .u-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-wide, .u-dash > .u-card:not(.u-kpi) { grid-column: 1 / -1; }
  .u-q { grid-template-columns: 1fr; }
  .u-q-parts { grid-template-columns: 1fr; }
  .u-src { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-step .act .u-arrows { display: none; }
  .sc-dates .scr { min-height: 620px; }
  .sc-rev .scr { min-height: 600px; }
  .sc-src .scr { min-height: 760px; }
  .u-file { left: 12px; right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-ui] *, [data-ui] *::before, [data-ui] *::after, .cues button::before {
    transition: none !important; animation: none !important;
  }
}

/* Phones: the currency card drops its secondary lines so the scene stays about one screen tall. */
@media (max-width: 640px) {
  [data-ui] .ph-hide { display: none; }
}

/* Phones: dialogs inside scenes take the full width of the window, and the audit
   download note sits in the flow under the trail instead of over its last entry. */
@media (max-width: 640px) {
  .sc-rev .dlg { left: 8px; right: 8px; width: auto; transform: scale(.97); }
  .sc-rev:is([data-s="1"], [data-s="2"]) .dlg { transform: none; }
  .sc-rev .u-dialog { padding: 16px; }
  .sc-rev .revlist-win { max-height: 330px; }
  .u-file { position: static; margin-top: 12px; }
  .sc-dash .share { left: 12px; right: 12px; width: auto; }
}

/* Drawn screens glow softly on the dark page. */
.scene-stage, .hero-plate, .plate-c, .flow-pic, .pic-wrap { position: relative; isolation: isolate; }
.scene-stage::before, .hero-plate::before, .plate-c::before, .pic-wrap::before {
  content: ""; position: absolute; z-index: -1; inset: 10% 8% 0 8%; border-radius: 48px; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 45%, rgba(124, 92, 255, .38), rgba(56, 120, 255, .1) 55%, transparent 75%);
  filter: blur(48px);
}
