/* cavisual/service-workbench-demo */
.cav-demo {
	padding: clamp(54px, 8vw, 104px) 0;
	background: var(--ca-offer-paper, #f7f3eb);
	border-bottom: 1px solid var(--ca-offer-line, #e4ded2);
	color: var(--ca-offer-ink, #1b2a41);
}

.cav-demo__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 24px;
	align-items: end;
	margin-bottom: 18px;
}

.cav-demo__head h2 {
	max-width: 20ch;
	margin: 0;
	color: var(--ca-offer-navy, #142033);
	font-family: var(--ca-offer-serif, Georgia, serif);
	font-size: clamp(30px, 4vw, 52px);
	font-weight: 600;
	line-height: 1.12;
}

.cav-demo__intro {
	max-width: 48ch;
	margin: 12px 0 0;
	color: var(--ca-offer-ink-soft, #46536a);
	font-size: 15px;
	line-height: 1.7;
}

.cav-demo__badge {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 0;
	padding: 8px 11px;
	border: 1px solid var(--ca-offer-gold-border, rgba(176, 137, 63, .34));
	color: var(--ca-offer-muted, #6f6a62);
	font-size: 10px;
	line-height: 1.4;
	white-space: nowrap;
}

.cav-demo__badge span {
	padding: 3px 5px;
	background: var(--ca-offer-gold-soft, rgba(176, 137, 63, .12));
	color: var(--ca-offer-gold, #7b5c27);
	font-size: 8px;
	font-weight: 800;
	letter-spacing: .14em;
}

.cav-demo__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 10px;
}

.cav-demo__pills span {
	padding: 5px 10px;
	border: 1px solid var(--ca-offer-line, #e4ded2);
	background: transparent;
	color: var(--ca-offer-muted, #6f6a62);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .06em;
}

.cav-demo__pills span.is-active {
	border-color: var(--ca-offer-gold, #7b5c27);
	background: var(--ca-offer-gold-soft, rgba(176, 137, 63, .12));
	color: var(--ca-offer-gold, #7b5c27);
}

.cav-demo__screen {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	box-shadow: 0 28px 70px -34px rgba(20, 32, 51, .5);
}

.cav-demo__scene { display: none; }
.cav-demo__scene.is-active { display: block; animation: cav-demo-fade .4s ease both; }

.cav-demo__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: flex-end;
	margin-top: 14px;
}

.cav-demo__footer p {
	max-width: 52ch;
	margin: 0;
	color: var(--ca-offer-muted, #6f6a62);
	font-size: 10px;
	line-height: 1.5;
}

.cav-demo__footer .ca-offer-btn {
	min-height: 42px;
	padding: 10px 18px;
	font-size: 12px;
}

.cav-demo [hidden] { display: none !important; }

.cav-skeleton { display: grid; gap: 7px; }
.cav-skeleton i {
	display: block;
	height: 8px;
	border-radius: 99px;
	background: linear-gradient(90deg, #e9e1d4 25%, #f8f3e9 50%, #e9e1d4 75%);
	background-size: 200% 100%;
	animation: cav-demo-shimmer 1.9s linear infinite;
}

/* Form scene */
.cav-form { padding: clamp(14px, 2.4vw, 24px); background: #f4efe4; color: #1d2433; }
.cav-form__top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; color: #8a8172; font-size: 10px; }
.cav-form__brand { color: #1d2433; font-weight: 800; letter-spacing: .04em; }
.cav-form__grid { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) minmax(160px, 210px); gap: 12px; align-items: start; }
.cav-form__profile, .cav-form__main, .cav-form__check { border: 1px solid #e6ddcc; border-radius: 14px; background: #fffdf8; }
.cav-form__profile { padding: 18px; }
.cav-form__avatar { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 10px; border-radius: 50%; background: #1d2433; color: #fff; font-size: 15px; font-weight: 700; }
.cav-form__profile strong { display: block; font-size: 13px; }
.cav-form__profile small { display: block; margin-top: 2px; color: #8a8172; font-size: 9px; line-height: 1.5; }
.cav-form__profile h3 { margin: 14px 0 10px; font-family: var(--ca-offer-serif, Georgia, serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.cav-form__badges { display: flex; flex-wrap: wrap; gap: 5px; }
.cav-form__badges span { padding: 3px 6px; border: 1px solid #e6ddcc; border-radius: 99px; background: #f8f4ec; color: #8a6a2c; font-size: 8px; font-weight: 700; }
.cav-skeleton--profile { margin-top: 16px; }
.cav-form__main { padding: clamp(16px, 2vw, 22px); }
.cav-form__title { margin-bottom: 14px; }
.cav-form__title strong { display: block; font-size: 13px; }
.cav-form__title small { display: block; margin-top: 3px; color: #8a8172; font-size: 9px; }
.cav-form__field { display: grid; gap: 5px; margin-bottom: 9px; }
.cav-form__field span { color: #8a8172; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cav-form__field em { display: block; width: 0; height: 30px; border: 1px solid #e6ddcc; border-radius: 6px; background: linear-gradient(90deg, #f8f4ec, #fff, #f8f4ec); background-size: 200% 100%; transition: width .6s ease; }
.cav-form.is-filled .cav-form__field em { width: 100%; animation: cav-demo-shimmer 2s linear infinite; }
.cav-form__field:nth-of-type(1) em { max-width: 92%; }
.cav-form__field:nth-of-type(2) em { max-width: 74%; }
.cav-form__field:nth-of-type(3) em { max-width: 86%; }
.cav-form__field:nth-of-type(4) em { max-width: 64%; }
.cav-form__progress { height: 4px; margin: 12px 0; background: #eee6d8; }
.cav-form__progress span { display: block; width: 0; height: 100%; background: #4e9a5c; transition: width 1.1s ease .3s; }
.cav-form.is-filled .cav-form__progress span { width: 100%; }
.cav-form__submit, .cav-form__gold, .cav-form__save { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.cav-form__submit, .cav-form__gold { background: #b08a3e; color: #fff; }
.cav-form.is-filled .cav-form__submit, .cav-form.is-filled .cav-form__gold { animation: cav-demo-pulse 1.3s ease infinite; }
.cav-form__save { border: 1px solid #d8ccb8; background: #fffdf8; color: #6f675b; }
.cav-form__check { padding: 16px; }
.cav-form__check strong { display: block; margin-bottom: 10px; font-size: 11px; }
.cav-form__check ul { margin: 0; padding: 0; list-style: none; }
.cav-form__check li { display: flex; gap: 6px; align-items: center; padding: 5px 0; color: #8a8172; font-size: 9px; }
.cav-form__check li i { display: grid; place-items: center; width: 12px; height: 12px; border: 1px solid #d8ccb8; border-radius: 50%; font-style: normal; transition: background .3s ease, border-color .3s ease; }
.cav-form.is-filled .cav-form__check li i { border-color: #4e9a5c; background: #4e9a5c; }
.cav-form.is-filled .cav-form__check li i::after { content: "✓"; color: #fff; font-size: 8px; font-weight: 800; }
.cav-form__check p { margin: 10px 0; color: #4e9a5c; font-size: 9px; font-weight: 700; }
.cav-form__check .cav-form__save, .cav-form__check .cav-form__gold { display: flex; width: 100%; margin-top: 7px; }
.cav-form__success { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 12px; border: 1px solid #dcebdc; border-radius: 10px; background: #f2faf2; animation: cav-demo-fade .35s ease both; }
.cav-form__success > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #4e9a5c; color: #fff; font-size: 13px; font-weight: 800; }
.cav-form__success strong { display: block; font-size: 12px; }
.cav-form__success small { display: block; margin-top: 2px; color: #8a8172; font-size: 9px; letter-spacing: .08em; }

/* Coach shell */
.cav-coach { background: #f4efe4; color: #1d2433; }
.cav-coach__chrome { display: flex; gap: 6px; align-items: center; padding: 11px 15px; background: #1b202b; }
.cav-coach__chrome span { width: 9px; height: 9px; border-radius: 50%; background: #ff6b5f; }
.cav-coach__chrome span:nth-child(2) { background: #f5bd4f; }
.cav-coach__chrome span:nth-child(3) { background: #4cc46a; }
.cav-coach__chrome em { margin-left: 10px; color: #aeb6c6; font-size: 10px; font-style: normal; }
.cav-coach__nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e6ddcc; background: #fffdf8; }
.cav-coach__nav strong { font-size: 12px; letter-spacing: .04em; }
.cav-coach__nav nav { display: flex; flex-wrap: wrap; gap: 12px; color: #8a8172; font-size: 9px; }
.cav-coach__nav nav span.is-active { color: #8a6a2c; font-weight: 800; }
.cav-coach__filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #e6ddcc; background: #f8f4ec; }
.cav-coach__filters span { padding: 5px 9px; border: 1px solid #e6ddcc; border-radius: 99px; background: #fffdf8; color: #8a8172; font-size: 9px; }
.cav-coach__filters span.is-active { border-color: #b08a3e; background: #b08a3e; color: #fff; font-weight: 700; }

/* My Cases dashboard */
.cav-coach__dashboard { padding: 16px; background: #f4efe4; animation: cav-demo-fade .35s ease both; }
.cav-coach__list-head { display: grid; grid-template-columns: 90px minmax(0, 1fr) 80px 70px; gap: 12px; padding: 8px 12px; }
.cav-coach__list-head i { display: block; height: 8px; border-radius: 99px; background: #e5dccd; }
.cav-coach__list-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) 64px 70px; gap: 12px; align-items: center; margin-top: 8px; padding: 14px 12px; border: 1px solid #e6ddcc; border-radius: 10px; background: #fffdf8; }
.cav-coach__list-row.is-highlight { border-color: #b08a3e; box-shadow: 0 0 0 2px rgba(176, 138, 62, .14); }
.cav-coach__dot { width: 7px; height: 7px; border-radius: 50%; background: #c9bfae; }
.cav-coach__list-row.is-highlight .cav-coach__dot { background: #b08a3e; }
.cav-coach__list-main strong { display: block; min-height: 10px; color: #1d2433; font-size: 11px; }
.cav-coach__list-main .cav-skeleton { margin-top: 7px; }
.cav-coach__pill { padding: 3px 7px; border-radius: 99px; background: #eef8ee; color: #3e7a4b; font-size: 8px; font-weight: 700; text-align: center; }
.cav-coach__pill--muted { background: #f1ece2; color: #9a9080; }
.cav-coach__list-date { display: block; height: 8px; border-radius: 99px; background: #e9e1d4; }

/* Zoomed case detail */
.cav-coach__detail { padding: 14px; background: #f4efe4; animation: cav-demo-zoom .7s cubic-bezier(.2, .8, .2, 1) both; }
.cav-coach__detail-grid { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 12px; height: 660px; }
.cav-coach__case { overflow-y: auto; padding: 16px; border: 1px solid #e6ddcc; border-radius: 12px; background: #fffdf8; }
.cav-coach__case-head p { margin: 0 0 6px; color: #b08a3e; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.cav-coach__case-head h3 { margin: 0 0 8px; font-family: var(--ca-offer-serif, Georgia, serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.cav-coach__status { display: inline-block; padding: 3px 7px; border: 1px solid #dcebdc; border-radius: 99px; background: #eef8ee; color: #3e7a4b; font-size: 8px; font-weight: 700; }
.cav-coach__avatars { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
.cav-coach__avatar-card { display: flex; gap: 7px; align-items: center; padding: 8px; border: 1px solid #e6ddcc; border-radius: 8px; background: #faf6ee; }
.cav-coach__avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e8dcc8; color: #8a6a2c; font-size: 11px; font-weight: 800; }
.cav-coach__avatar--coach { background: #e3e9f5; color: #3d5a8a; }
.cav-coach__avatar-card strong { display: block; font-size: 9px; }
.cav-coach__avatar-card small { display: block; color: #9a9080; font-size: 8px; }
.cav-coach__meta { display: grid; gap: 0; margin-top: 14px; border-top: 1px solid #e6ddcc; }
.cav-coach__meta > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0e9dc; }
.cav-coach__meta span { color: #9a9080; font-size: 8px; }
.cav-coach__meta i { display: block; width: 54px; height: 7px; border-radius: 99px; background: #e9e1d4; }
.cav-coach__meta em { color: #3e7a4b; font-size: 8px; font-style: normal; font-weight: 700; }
.cav-coach__fields { margin-top: 12px; }
.cav-coach__field { padding: 6px 0; border-bottom: 1px solid #f0e9dc; }
.cav-coach__field span { display: block; margin-bottom: 5px; color: #9a9080; font-size: 8px; }
.cav-coach__field i { display: block; width: 88%; height: 7px; border-radius: 99px; background: #e9e1d4; }
.cav-coach__field:nth-child(2) i { width: 72%; }
.cav-coach__field:nth-child(3) i { width: 94%; }
.cav-coach__field:nth-child(4) i { width: 64%; }
.cav-coach__field:nth-child(5) i { width: 80%; }
.cav-coach__field:nth-child(6) i { width: 58%; }
.cav-coach__attachments, .cav-coach__timeline { margin-top: 14px; }
.cav-coach__attachments p, .cav-coach__timeline p { margin: 0 0 8px; color: #9a9080; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cav-coach__file { display: flex; gap: 7px; align-items: center; padding: 5px 0; }
.cav-coach__file i { width: 14px; height: 14px; border-radius: 3px; background: #e9e1d4; }
.cav-coach__file em { width: 64%; height: 6px; border-radius: 99px; background: #eee6d8; }
.cav-coach__timeline > div { display: flex; gap: 7px; align-items: center; padding: 4px 0; }
.cav-coach__timeline i { width: 6px; height: 6px; border-radius: 50%; background: #b08a3e; }
.cav-coach__timeline span { width: 70%; height: 6px; border-radius: 99px; background: #eee6d8; }

/* Right review */
.cav-coach__thread { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid #e6ddcc; border-radius: 12px; background: #fffdf8; }
.cav-coach__thread-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e6ddcc; }
.cav-coach__thread-head strong { font-size: 11px; }
.cav-coach__thread-head span { color: #9a9080; font-size: 8px; }
.cav-coach__thread-head em { color: #9a9080; font-size: 8px; font-style: normal; }
.cav-coach__empty { display: grid; place-items: center; flex: 1 1 auto; min-height: 240px; margin: 12px; border: 1px dashed #ddd3c3; border-radius: 8px; color: #a49a8b; font-size: 10px; }
.cav-coach__typing { display: flex; gap: 4px; align-items: center; padding: 8px 14px; color: #8a8172; font-size: 9px; }
.cav-coach__typing i { width: 5px; height: 5px; border-radius: 50%; background: #b08a3e; animation: cav-demo-dot 1s ease-in-out infinite; }
.cav-coach__typing i:nth-child(2) { animation-delay: .15s; }
.cav-coach__typing i:nth-child(3) { animation-delay: .3s; }
.cav-coach__typing span { margin-left: 4px; }

.cav-coach__review { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 14px 14px; scrollbar-width: thin; scrollbar-color: #c9bfae transparent; }
.cav-coach__review::-webkit-scrollbar { width: 5px; }
.cav-coach__review::-webkit-scrollbar-thumb { background: #c9bfae; border-radius: 99px; }
.cav-coach__section { padding: 10px 0; border-bottom: 1px solid #f0e9dc; opacity: 0; transform: translateY(6px); }
.cav-coach__review.is-visible .cav-coach__section { animation: cav-demo-section .45s ease both; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(1) { animation-delay: .05s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(2) { animation-delay: .18s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(3) { animation-delay: .31s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(4) { animation-delay: .44s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(5) { animation-delay: .57s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(6) { animation-delay: .70s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(7) { animation-delay: .83s; }
.cav-coach__review.is-visible .cav-coach__section:nth-child(8) { animation-delay: .96s; }
.cav-coach__section h4 { margin: 0 0 8px; color: #8a6a2c; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.cav-skeleton--long { gap: 6px; }
.cav-skeleton--long i { height: 7px; }

.cav-coach__followup { flex: 0 0 auto; max-height: 250px; overflow-y: auto; padding: 10px 12px 12px; border-top: 1px solid #e6ddcc; background: #faf6ee; }
.cav-coach__message { padding: 10px 12px; border: 1px solid #e6ddcc; border-radius: 8px; background: #fff; }
.cav-coach__message + .cav-coach__message { margin-top: 8px; }
.cav-coach__message--client { border-left: 3px solid #1d2433; background: #f8f4ec; }
.cav-coach__message--coach { border-left: 3px solid #b08a3e; }
.cav-coach__message header { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; margin-bottom: 7px; }
.cav-coach__message header span { color: #b08a3e; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cav-coach__message header strong { font-size: 10px; }
.cav-coach__message header em { margin-left: auto; color: #9c9283; font-size: 8px; font-style: normal; }
.cav-skeleton--followup { gap: 6px; }
.cav-skeleton--followup i { height: 7px; }

@keyframes cav-demo-fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes cav-demo-zoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes cav-demo-section { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cav-demo-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes cav-demo-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes cav-demo-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(176, 138, 62, .35); } 50% { box-shadow: 0 0 0 5px rgba(176, 138, 62, 0); } }

@media (max-width: 1000px) {
	.cav-form__grid { grid-template-columns: minmax(160px, 200px) minmax(0, 1fr); }
	.cav-form__check { grid-column: 1 / -1; order: 3; }
	.cav-coach__detail-grid { grid-template-columns: 260px minmax(0, 1fr); height: 620px; }
}

@media (max-width: 820px) {
	.cav-demo__head { grid-template-columns: 1fr; align-items: start; }
	.cav-demo__badge { width: max-content; }
	.cav-form__grid { grid-template-columns: 1fr; }
	.cav-form__check { grid-column: auto; }
	.cav-coach__detail-grid { grid-template-columns: 1fr; height: auto; }
	.cav-coach__case { max-height: none; overflow: visible; }
	.cav-coach__thread { height: auto; max-height: none; }
	.cav-coach__review { max-height: none; overflow: visible; }
	.cav-coach__followup { max-height: none; overflow: visible; }
	.cav-demo__footer { display: none; }
}

@media (max-width: 560px) {
	.cav-form__grid { gap: 9px; }
	.cav-coach__nav { align-items: flex-start; flex-direction: column; }
	.cav-coach__nav nav { gap: 8px; }
	.cav-coach__detail { padding: 10px; }
	.cav-coach__thread { height: auto; }
	.cav-demo__footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cav-demo__scene.is-active, .cav-coach__detail, .cav-coach__dashboard,
	.cav-coach__review.is-visible .cav-coach__section, .cav-form__success { animation: none !important; }
	.cav-skeleton i, .cav-form__field em { animation: none !important; }
	.cav-coach__typing i { animation: none !important; opacity: .7; }
	.cav-form.is-filled .cav-form__submit, .cav-form.is-filled .cav-form__gold { animation: none !important; }
	.cav-coach__section { opacity: 1; transform: none; }
}

/* Static storyboard */
.cav-demo.is-static .cav-demo__scene { display: block; }
.cav-demo.is-static .cav-demo__scene + .cav-demo__scene { margin-top: 12px; border-top: 1px solid #e6ddcc; padding-top: 12px; }
.cav-demo.is-static .cav-coach__detail { animation: none; }
.cav-demo.is-static .cav-coach__review { overflow: visible; }
.cav-coach__section { padding-top: 13px; padding-bottom: 13px; }

.cav-demo.is-static .cav-coach__detail-grid { height: auto; }
.cav-demo.is-static .cav-coach__thread { height: auto; max-height: none; }
.cav-demo.is-static .cav-coach__review { max-height: none; overflow: visible; }
.cav-demo.is-static .cav-coach__section,
.cav-demo[data-motion="none"] .cav-coach__section { opacity: 1; transform: none; animation: none !important; }

/* Chao Global offer integration */
.cg-demo {
	--ca-offer-paper: #f7f3eb;
	--ca-offer-line: #e4ded2;
	--ca-offer-ink: #1b2a41;
	--ca-offer-ink-soft: #46536a;
	--ca-offer-navy: #142033;
	--ca-offer-muted: #6f6a62;
	--ca-offer-gold: #7b5c27;
	--ca-offer-gold-soft: rgba(176,137,63,.12);
	--ca-offer-gold-border: rgba(176,137,63,.34);
	--ca-offer-serif: Georgia, 'Times New Roman', serif;
}
.cg-demo .ca-offer-wrap {
	width: min(1200px, calc(100% - 40px));
	margin: 0 auto;
}
.cg-demo .ca-offer-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 20px;
	border: 1px solid #d9b877;
	border-radius: 999px;
	background: #d9b877;
	color: #10231d;
	font: 700 13px/1.2 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: .01em;
	text-decoration: none;
}
.cg-demo .ca-offer-btn:hover { background: #efd39f; border-color: #efd39f; }
