/* ==========================================================================
   Reqme Showcase — menu left, animated app screen right.
   Everything is scoped under .rqs so theme styles don't leak in or out.
   Override any token below on .rqs in your theme to restyle.
   ========================================================================== */

.rqs {
	--rqs-ink: #0F1115;
	--rqs-lime: #EEFB8C;
	--rqs-lime-2: #D8E85A;
	--rqs-lime-soft: #F7FCD2;
	--rqs-bg: #F6F7F2;
	--rqs-card: #FFFFFF;
	--rqs-line: #ECEEE6;
	--rqs-text-2: #3B414C;
	--rqs-muted: #5B6270;
	--rqs-green: #1A7F45;
	--rqs-green-bg: #E3F5EA;
	--rqs-blue: #2445C2;
	--rqs-blue-bg: #EBF0FF;
	--rqs-purple: #5B32C4;
	--rqs-purple-bg: #F2EDFF;
	--rqs-amber: #8A4600;
	--rqs-amber-bg: #FFF1DE;
	--rqs-red: #B4232A;
	--rqs-red-bg: #FDE8EA;
	--rqs-h: 540px;
	--rqs-font: inherit;

	container: rqs / inline-size;
	max-width: var(--rqs-max, 1240px);
	margin-inline: auto;
	font-family: var(--rqs-font);
	color: var(--rqs-ink);
	-webkit-font-smoothing: antialiased;
	text-align: left;
}
.rqs *, .rqs *::before, .rqs *::after { box-sizing: border-box; }
.rqs p, .rqs dl, .rqs dd { margin: 0; }
.rqs svg { display: block; }
.rqs b, .rqs strong { font-weight: 700; }
.rqs small { font-size: inherit; }

/* ---------- layout ---------- */
.rqs-grid {
	display: grid;
	grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
	gap: 32px;
	align-items: center;
}
.rqs-nav { min-width: 0; }
.rqs-tabs { position: relative; display: flex; flex-direction: column; gap: 8px; }

/* ---------- tabs ---------- */
.rqs-tab {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	padding: 16px 18px 18px;
	border-radius: 20px;
	cursor: pointer;
	overflow: hidden;
	color: var(--rqs-ink);
	transition: background-color .25s ease, box-shadow .25s ease;
	-webkit-tap-highlight-color: transparent;
}
.rqs-tab:hover { background: rgba(15, 17, 21, .04); }
.rqs-tab:focus-visible { outline: 2px solid var(--rqs-ink); outline-offset: 2px; }
.rqs-tab.is-active {
	background: var(--rqs-card);
	box-shadow: 0 18px 40px -24px rgba(15, 17, 21, .35), 0 0 0 1px var(--rqs-line);
}
.rqs-tab-icon {
	width: 44px; height: 44px; border-radius: 14px;
	display: grid; place-items: center;
	background: rgba(15, 17, 21, .06);
	transition: background-color .25s ease;
}
.rqs-tab-icon svg { width: 20px; height: 20px; }
.rqs-tab.is-active .rqs-tab-icon { background: var(--rqs-lime); }
.rqs-tab-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }
.rqs-tab-title { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--rqs-text-2); }
.rqs-tab.is-active .rqs-tab-title { color: var(--rqs-ink); }
.rqs-tab-desc {
	display: grid; grid-template-rows: 0fr; opacity: 0;
	font-size: 14px; line-height: 1.5; color: var(--rqs-muted);
	transition: grid-template-rows .35s ease, opacity .35s ease;
}
.rqs-tab-desc > span { overflow: hidden; }
.rqs-tab.is-active .rqs-tab-desc { grid-template-rows: 1fr; opacity: 1; }

.rqs-progress {
	position: absolute; left: 18px; right: 18px; bottom: 0;
	height: 3px; border-radius: 3px; background: var(--rqs-line); opacity: 0;
}
.rqs-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--rqs-ink); }
.rqs.is-auto .rqs-tab.is-active .rqs-progress { opacity: 1; }
.rqs.is-auto .rqs-tab.is-active .rqs-progress i { animation: rqs-progress var(--rqs-interval, 9s) linear forwards; }

.rqs-caption { display: none; margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--rqs-muted); }

/* ---------- browser frame ---------- */
.rqs-frame {
	min-width: 0;
	border-radius: 22px;
	background: var(--rqs-card);
	box-shadow: 0 50px 100px -40px rgba(15, 17, 21, .35), 0 0 0 1px rgba(15, 17, 21, .07);
	overflow: hidden;
}
.rqs-bar {
	height: 44px; display: flex; align-items: center; gap: 14px;
	padding: 0 8px 0 18px; background: #F2F3EE; border-bottom: 1px solid #E6E8E1;
}
.rqs-dots { display: flex; gap: 7px; flex: none; }
.rqs-dots i { width: 11px; height: 11px; border-radius: 50%; background: #D9DCD3; }
.rqs-url { flex: 1; min-width: 0; display: flex; justify-content: center; }
.rqs-url > span {
	max-width: 100%; height: 28px; padding: 0 14px; border-radius: 9px;
	background: #fff; border: 1px solid #E6E8E1;
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 12px; font-weight: 600; color: var(--rqs-muted); white-space: nowrap; overflow: hidden;
}
.rqs-url svg { width: 12px; height: 12px; flex: none; }
.rqs-url em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.rqs-replay {
	all: unset; box-sizing: border-box; flex: none;
	width: 36px; height: 36px; border-radius: 50%;
	display: grid; place-items: center; cursor: pointer; color: var(--rqs-muted);
}
.rqs-replay:hover { background: #fff; color: var(--rqs-ink); }
.rqs-replay:focus-visible { outline: 2px solid var(--rqs-ink); outline-offset: 1px; }
.rqs-replay svg { width: 16px; height: 16px; }

.rqs-stage {
	container: rqs-stage / inline-size;
	position: relative; height: var(--rqs-h); overflow: hidden;
	background: var(--rqs-bg);
	font-size: 13px; line-height: 1.4;
}
.rqs-screen { position: absolute; inset: 0; }
.rqs-screen[hidden] { display: none; }

/* ---------- shared screen pieces ---------- */
.rqs-pad { position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.rqs-split {
	position: absolute; inset: 0; padding: 20px;
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 14px; align-items: stretch;
}
.rqs-card {
	background: var(--rqs-card); border: 1px solid var(--rqs-line); border-radius: 20px;
	padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.rqs-card.is-ink { background: var(--rqs-ink); border-color: var(--rqs-ink); color: #fff; }
.rqs-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rqs-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rqs-h { font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.rqs-h.is-sm { font-size: 16px; }
.rqs-k { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rqs-muted); }
.rqs-s { font-size: 12px; font-weight: 600; color: var(--rqs-muted); }
.rqs-total { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }

.rqs-pill {
	display: inline-flex; align-items: center; justify-content: center; gap: 5px;
	height: 26px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
	font-size: 12px; font-weight: 700; background: #F2F3EE; color: var(--rqs-text-2);
}
.rqs-pill.is-ink { background: var(--rqs-ink); color: var(--rqs-lime); }
.rqs-pill.is-blue { background: var(--rqs-blue-bg); color: var(--rqs-blue); }
.rqs-pill.is-purple { background: var(--rqs-purple-bg); color: var(--rqs-purple); }
.rqs-pill.is-green { background: var(--rqs-green-bg); color: var(--rqs-green); }
.rqs-pill.is-amber { background: var(--rqs-amber-bg); color: var(--rqs-amber); }

/* status pills that replace each other in place */
.rqs-status { position: relative; flex: none; width: 136px; height: 26px; }
.rqs-status.is-sm { width: 120px; }
.rqs-status.is-wide { width: 176px; }
.rqs-status .rqs-pill { position: absolute; inset: 0; }

.rqs-av {
	position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
	display: grid; place-items: center; font-size: 12px; font-weight: 800;
	background: var(--rqs-lime); color: var(--rqs-ink);
}
.rqs-av.is-ink { background: var(--rqs-ink); color: var(--rqs-lime); }
.rqs-av.is-blue { background: #E8EBFF; color: var(--rqs-blue); }
.rqs-av.is-amber { background: var(--rqs-amber-bg); color: #9A4F00; }
.rqs-av.is-green { background: var(--rqs-green-bg); color: var(--rqs-green); }
.rqs-av.is-red { background: var(--rqs-red-bg); color: var(--rqs-red); }
.rqs-av.is-brand { border-radius: 12px; background: #1E3A34; color: #F3E9D2; }
.rqs-live {
	position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%;
	background: #1F9D55; border: 2px solid var(--rqs-ink);
	animation: rqs-live 1.8s ease-out infinite;
}

.rqs-btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 38px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
	font-size: 13px; font-weight: 700; background: #fff; border: 1px solid #E2E5DC; color: var(--rqs-ink);
}
.rqs-btn.is-lime { background: var(--rqs-lime); border-color: var(--rqs-lime); font-weight: 800; }

.rqs-ai { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: #4A5600; white-space: nowrap; }
.rqs-ai svg { width: 13px; height: 13px; flex: none; }
.rqs-ai.is-lime { color: var(--rqs-lime); }

.rqs-chip {
	display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px;
	background: #fff; box-shadow: 0 0 0 1px var(--rqs-line); font-size: 12px; font-weight: 700;
}
.rqs-chip.is-lime { background: var(--rqs-lime); box-shadow: none; }
.rqs-tag {
	display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
	background: var(--rqs-lime); font-size: 12px; font-weight: 700;
}

.rqs-lines { display: flex; flex-direction: column; }
.rqs-line {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 0; border-top: 1px solid #F0F1EC; font-size: 14px;
}
.rqs-line > span { display: flex; flex-direction: column; min-width: 0; }
.rqs-line small { font-size: 12px; font-weight: 600; color: var(--rqs-muted); }
.rqs-line > b { font-weight: 800; white-space: nowrap; }

.rqs-toast-wrap { position: absolute; left: 16px; right: 16px; bottom: 18px; display: flex; justify-content: center; pointer-events: none; z-index: 3; }
.rqs-toast {
	display: flex; align-items: center; gap: 12px; max-width: 100%;
	padding: 12px 16px; border-radius: 16px; background: var(--rqs-ink); color: #fff;
	box-shadow: 0 16px 30px -12px rgba(15, 17, 21, .5);
}
.rqs-toast small { font-size: 12px; color: #C9CDD4; }
.rqs-toast-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--rqs-lime); color: var(--rqs-ink); display: grid; place-items: center; flex: none; }
.rqs-toast-ic svg { width: 16px; height: 16px; stroke-width: 2.6; }

.rqs-only-sm { display: none; }

/* chat bubbles (agent + invoice AI) */
.rqs-bub { flex: none; max-width: 86%; padding: 10px 13px; font-size: 13.5px; line-height: 1.45; font-weight: 500; overflow: hidden; }
.rqs-bub.is-bot { align-self: flex-start; background: #fff; border: 1px solid var(--rqs-line); border-radius: 16px 16px 16px 4px; }
.rqs-bub.is-bot.is-lime { background: var(--rqs-lime); border-color: var(--rqs-lime); }
.rqs-bub.is-user { align-self: flex-end; background: var(--rqs-ink); color: #fff; border-radius: 16px 16px 4px 16px; }
.rqs-typing {
	flex: none; align-self: flex-start; display: none; gap: 5px; overflow: hidden;
	padding: 12px 13px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--rqs-line);
}
.rqs-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--rqs-ink); animation: rqs-dot 1s ease-in-out infinite; }
.rqs-typing i:nth-child(2) { animation-delay: .15s; }
.rqs-typing i:nth-child(3) { animation-delay: .3s; }

/* ---------- 1. AI agent ---------- */
.rqs-agent {
	position: absolute; inset: 0; padding: 20px; display: flex; justify-content: center;
	background: radial-gradient(80% 70% at 12% 8%, #F3FBC4 0%, rgba(243, 251, 196, 0) 60%);
}
.rqs-chat {
	position: relative; z-index: 1;
	width: min(400px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(15, 17, 21, .35), 0 0 0 1px var(--rqs-line);
}
.rqs-chat-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--rqs-ink); color: #fff; }
.rqs-chat-meta { display: flex; flex-direction: column; }
.rqs-chat-meta strong { font-size: 14px; font-weight: 800; }
.rqs-chat-meta small { font-size: 11px; font-weight: 600; color: #C9CDD4; }
.rqs-chat-body { flex: 1; min-height: 0; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; background: #FAFBF7; overflow: hidden; }
.rqs-qual { flex: none; overflow: hidden; border-radius: 16px; background: var(--rqs-lime); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rqs-qual-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #3A4212; }
.rqs-qual-title svg { width: 14px; height: 14px; stroke-width: 2.6; }
.rqs-qual dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12.5px; }
.rqs-qual dt { font-weight: 600; color: #3A4212; }
.rqs-qual dd { font-weight: 800; }
.rqs-chat-input { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rqs-line); }
.rqs-chat-input > span:first-child { flex: 1; height: 40px; padding: 0 14px; border-radius: 999px; background: #F2F3EE; display: flex; align-items: center; color: var(--rqs-muted); font-weight: 600; }
.rqs-send { width: 38px; height: 38px; border-radius: 50%; background: var(--rqs-ink); color: var(--rqs-lime); display: grid; place-items: center; flex: none; }
.rqs-send svg { width: 16px; height: 16px; stroke-width: 2.4; }
.rqs-channels { position: absolute; left: 20px; top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.rqs-float {
	position: absolute; left: 20px; bottom: 24px; z-index: 2; width: 214px;
	border-radius: 18px; background: var(--rqs-ink); color: #fff; padding: 14px;
	display: flex; flex-direction: column; gap: 4px; box-shadow: 0 30px 60px -20px rgba(15, 17, 21, .5);
}
.rqs-float strong { font-size: 15px; font-weight: 800; }
.rqs-float small { font-size: 12px; font-weight: 600; color: #C9CDD4; }

/* ---------- 2. Request overview ---------- */
.rqs-rows { display: flex; flex-direction: column; }
.rqs-rows > * + * { border-top: 1px solid #F0F1EC; }
.rqs-rowwrap { overflow: hidden; }
.rqs-lrow { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 14px; }
.rqs-lrow.is-new { background: #FBFDEB; margin-bottom: 2px; }
.rqs-lrow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rqs-lrow-text b { font-size: 14px; }
.rqs-lrow-text small { font-size: 12px; font-weight: 600; color: var(--rqs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rqs-lrow-text .rqs-ai { display: inline-flex; vertical-align: -2px; }
.rqs-fields { display: flex; flex-direction: column; }
.rqs-fields > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #F0F1EC; }
.rqs-fields dt { font-size: 12px; font-weight: 600; color: var(--rqs-muted); }
.rqs-fields dd { font-size: 13px; font-weight: 700; text-align: right; }
.rqs-actions { display: flex; gap: 8px; margin-top: auto; }
.rqs-quote { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: #F8F9F5; border-left: 0; }
.rqs-quote p { font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--rqs-text-2); }

/* ---------- 3. Proposal ---------- */
.rqs-prop { flex: 1; min-height: 0; }
.rqs-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rqs-prop-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 2px solid var(--rqs-ink); }

/* ---------- 4. Contract ---------- */
.rqs-split.is-contract { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.rqs-doc { padding: 20px 22px; }
.rqs-clauses { display: flex; flex-direction: column; gap: 8px; }
.rqs-clause { display: flex; gap: 10px; font-size: 13px; line-height: 1.55; color: var(--rqs-text-2); }
.rqs-clause > span:first-child { width: 14px; flex: none; font-size: 12px; font-weight: 800; color: var(--rqs-muted); }
.rqs-clause strong { color: var(--rqs-ink); }
.rqs-sigs { margin-top: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rqs-sig { position: relative; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.rqs-sig svg { width: 100%; height: 62px; border-bottom: 1.5px solid var(--rqs-ink); margin-bottom: 4px; }
.rqs-sig.is-pending svg { background: #FBFDE9; }
.rqs-sig small { font-weight: 600; color: var(--rqs-muted); }
.rqs-stamp {
	position: absolute; right: 0; top: 4px; padding: 4px 10px; border-radius: 10px;
	border: 3px solid var(--rqs-green); color: var(--rqs-green); background: rgba(255, 255, 255, .88);
	font-size: 14px; font-weight: 800; letter-spacing: .08em; transform: rotate(-10deg);
}
.rqs-events { display: flex; flex-direction: column; gap: 13px; }
.rqs-ev { display: flex; gap: 10px; }
.rqs-ev > i { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--rqs-ink); flex: none; }
.rqs-ev.is-green > i { background: #1F9D55; }
.rqs-ev.is-lime > i { background: var(--rqs-lime-2); box-shadow: 0 0 0 2px var(--rqs-ink); }
.rqs-ev > span { display: flex; flex-direction: column; }
.rqs-ev b { font-size: 13px; }
.rqs-ev small { font-size: 12px; font-weight: 600; color: var(--rqs-muted); }

/* ---------- 5. Invoice & payment ---------- */
.rqs-split.is-invoice { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.rqs-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rqs-meta > span { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: #F8F9F5; min-width: 0; }
.rqs-meta small { font-size: 11px; font-weight: 700; color: var(--rqs-muted); }
.rqs-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rqs-terms {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 10px 12px; border-radius: 12px; background: var(--rqs-lime-soft); border: 1px dashed var(--rqs-lime-2);
	font-size: 13px; font-weight: 600;
}
.rqs-terms > span:last-child { text-align: right; }
.rqs-inv-total { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; padding-top: 12px; border-top: 2px solid var(--rqs-ink); font-size: 14px; }
.rqs-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rqs-aibox { flex: 1; min-height: 0; }
.rqs-aibody { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.rqs-paid { flex-direction: row; align-items: center; gap: 14px; }
.rqs-paid small { font-size: 12px; font-weight: 600; color: #C9CDD4; }
.rqs-paid .rqs-total { color: var(--rqs-lime); }
.rqs-ring { width: 58px; height: 58px; flex: none; }

/* ==========================================================================
   Motion. Each screen's sequence plays once when its tab becomes active
   (JS adds .is-playing). Without JS (e.g. in the block editor) every element
   simply shows in its final state.
   ========================================================================== */
.rqs-screen.is-playing { animation: rqs-fade .35s ease both; }
.rqs-screen.is-playing .rqs-a { animation: rqs-up .55s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-msg { animation: rqs-msg .5s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-typing { display: flex; animation: rqs-typing var(--dur, 1s) linear var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-row { animation: rqs-row .6s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-pop { animation: rqs-pop .45s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.rqs-draw { stroke-dasharray: var(--len, 600); }
.rqs-screen.is-playing .rqs-draw { animation: rqs-draw var(--dur, 2s) cubic-bezier(.5, 0, .3, 1) var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-stamp { animation: rqs-stamp .5s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-glow { animation: rqs-glow 1.4s ease-out var(--d, 0s) both; }
.rqs-screen.is-playing .rqs-press { animation: rqs-press .5s ease-out var(--d, 0s) both; }

/* Pause only applies to the AUTOPLAY cycle (is-auto). Without the is-auto
   guard, clicking a tab (which stops autoplay) while the cursor is still over
   the showcase — the natural case right after a click — froze the freshly
   restarted screen at its first frame (opacity:0 = blank) until the mouse
   moved away. A manually-picked tab must always play through to its finished
   state. */
.rqs.is-auto.is-paused .rqs-screen.is-playing,
.rqs.is-auto.is-paused .rqs-screen.is-playing *,
.rqs.is-auto.is-paused .rqs-progress i { animation-play-state: paused !important; }

@keyframes rqs-progress { from { width: 0; } to { width: 100%; } }
@keyframes rqs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rqs-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rqs-msg {
	from { opacity: 0; max-height: 0; transform: translateY(8px); padding-top: 0; padding-bottom: 0; margin-top: -8px; border-width: 0; }
	to { opacity: 1; max-height: 240px; transform: none; }
}
@keyframes rqs-typing {
	0% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -8px; border-width: 0; }
	12%, 86% { opacity: 1; max-height: 44px; padding-top: 12px; padding-bottom: 12px; margin-top: 0; border-width: 1px; }
	100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -8px; border-width: 0; }
}
@keyframes rqs-row { from { opacity: 0; max-height: 0; transform: translateX(-12px); } to { opacity: 1; max-height: 140px; transform: none; } }
@keyframes rqs-pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes rqs-draw { from { stroke-dashoffset: var(--len, 600); } to { stroke-dashoffset: 0; } }
@keyframes rqs-stamp {
	0% { opacity: 0; transform: rotate(-10deg) scale(1.8); }
	70% { opacity: 1; transform: rotate(-10deg) scale(.94); }
	100% { opacity: 1; transform: rotate(-10deg) scale(1); }
}
@keyframes rqs-glow {
	0% { box-shadow: 0 0 0 0 rgba(216, 232, 90, 0); }
	25% { box-shadow: 0 0 0 5px rgba(216, 232, 90, .9); }
	100% { box-shadow: 0 0 0 0 rgba(216, 232, 90, 0); }
}
@keyframes rqs-press {
	0%, 100% { transform: none; box-shadow: 0 0 0 0 rgba(15, 17, 21, 0); }
	45% { transform: scale(.93); box-shadow: 0 0 0 4px rgba(15, 17, 21, .12); }
}
@keyframes rqs-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes rqs-live { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0); } }

@media (prefers-reduced-motion: reduce) {
	.rqs *, .rqs *::before, .rqs *::after {
		animation-duration: .001ms !important;
		animation-delay: 0s !important;
		animation-iteration-count: 1 !important;
		transition: none !important;
	}
	/* Kill every reveal animation so screen content falls back to its natural
	   (visible, finished) state on EVERY tab — clicked or not. The reveal
	   elements are hidden ONLY by the is-playing animations' from{opacity:0}
	   (+ max-height for messages); with no animation they render normally.
	   Without this, switching to a non-initial tab under reduce-motion left the
	   screen blank — is-paused (off-screen/hover/the instant after a click)
	   froze the elements at opacity:0. `transform` is intentionally left alone
	   so base transforms (e.g. the rotated SIGNED stamp) keep their end look. */
	.rqs .rqs-screen, .rqs .rqs-screen * {
		animation: none !important;
		opacity: 1 !important;
		max-height: none !important;
	}
	.rqs .rqs-draw { stroke-dashoffset: 0 !important; } /* signature already drawn */
	.rqs .rqs-typing { display: none !important; }      /* no static typing dots */
}

/* ==========================================================================
   Responsive — container queries, so it adapts to the column it's placed in,
   not just the viewport.
   ========================================================================== */

/* Narrow block: tabs become a swipeable row above the screen. */
@container rqs (max-width: 860px) {
	.rqs-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.rqs-tabs {
		flex-direction: row; gap: 6px; overflow-x: auto; padding: 2px 2px 6px;
		scroll-snap-type: x mandatory; scrollbar-width: none;
	}
	.rqs-tabs::-webkit-scrollbar { display: none; }
	.rqs-tab {
		flex: none; grid-template-columns: auto auto; align-items: center; gap: 8px;
		padding: 7px 16px 9px 7px; border-radius: 999px; scroll-snap-align: start;
	}
	.rqs-tab-icon { width: 32px; height: 32px; border-radius: 50%; }
	.rqs-tab-icon svg { width: 16px; height: 16px; }
	.rqs-tab-text { padding-top: 0; }
	.rqs-tab-title { font-size: 14px; white-space: nowrap; }
	.rqs-tab-desc { display: none; }
	.rqs-progress { left: 16px; right: 16px; bottom: 3px; height: 2px; }
	.rqs-caption { display: block; }
	.rqs { --rqs-h: 560px; }
	.rqs-frame { border-radius: 18px; }
}
@container rqs (max-width: 420px) {
	.rqs-dots { display: none; }
	.rqs-bar { padding-left: 10px; }
}

/* Narrow screen area: each screen drops its side panel. */
@container rqs-stage (max-width: 760px) {
	.rqs-channels, .rqs-float { display: none; }
}
@container rqs-stage (max-width: 600px) {
	.rqs-pad, .rqs-split, .rqs-agent { padding: 14px; }
	.rqs-split, .rqs-split.is-contract, .rqs-split.is-invoice { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 12px; }
	.rqs-card { padding: 14px; gap: 10px; border-radius: 18px; }
	.rqs-h { font-size: 17px; }
	.rqs-total { font-size: 24px; }
	.rqs-hide-sm { display: none !important; }
	.rqs-only-sm { display: flex; }
	.rqs-chat { width: 100%; }

	.rqs-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.rqs-fields > div { flex-direction: column; gap: 2px; padding: 8px 10px; border: 0; border-radius: 12px; background: #F8F9F5; }
	.rqs-fields dd { text-align: left; }
	.rqs-actions { margin-top: 0; }

	.rqs-line { padding: 8px 0; }
	.rqs-prop { flex: none; }
	.rqs-prop-foot { margin-top: 0; }
	.rqs-prop .rqs-line small { display: none; }
	.rqs-prop-foot .rqs-s:last-child { display: none; }
	.rqs-status { width: 122px; }
	.rqs-status.is-wide { width: 160px; }
	.rqs-status.is-wide .rqs-pill { font-size: 11px; }

	.rqs-audit, .rqs-aibox { display: none; }
	.rqs-doc { padding: 16px; }
	.rqs-sigs { margin-top: 6px; }

	.rqs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rqs-inv-total { margin-top: 2px; }
	.rqs-paid { padding: 12px 14px; }
	.rqs-ring { width: 48px; height: 48px; }
}
@container rqs-stage (max-width: 380px) {
	.rqs-card-head { flex-wrap: wrap; }
	.rqs-line { font-size: 13px; }
	.rqs-terms { flex-direction: column; align-items: flex-start; }
	.rqs-terms > span:last-child { text-align: left; }
}
