/* Demo cards: ported from brand/motion/console.css + publish.html. Scoped to .qc-demo. */
.qc-demo {
	--bg: var(--qc-bg); --ink: var(--qc-ink); --ink-2: var(--qc-ink-2); --line: var(--qc-line); --surface: var(--qc-surface);
	--signal: var(--qc-signal); --go: var(--qc-go); --slow: var(--qc-slow); --stop: var(--qc-stop); --ease: var(--qc-ease);
	position: relative; overflow: hidden; background: var(--bg); color: var(--ink);
	border: 1px solid var(--line); border-radius: var(--qc-radius); font-size: 15px; line-height: 1.5;
}
.qc-demo .head { padding: 16px; border-bottom: 1px solid var(--line); }
.qc-demo .head b { font-weight: 600; }
.qc-demo ul.rows { list-style: none; margin: 0; padding: 0; }
.qc-demo ul.rows > li { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.qc-demo ul.rows > li:last-child { border-bottom: 0; }
.qc-demo .grow { flex: 1; min-width: 0; }
.qc-demo .grow b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-demo .foot { padding: 16px; border-top: 1px solid var(--line); }
.qc-demo[data-demo="queue"], .qc-demo[data-demo="inbox"] { min-height: 330px; }

/* status strip: dot + label + mono time. never color alone. red never animates. */
.qc-demo .strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 12px/1 var(--qc-font-mono); font-variant-numeric: tabular-nums; color: var(--ink-2); margin-top: 4px; }
.qc-demo .head .strip { margin-top: 6px; }
.qc-demo .dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--ink-2)); transition: background-color .2s; flex: none; }
.qc-demo .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--bg); transform: scale(0); transition: transform .25s var(--ease); }
.qc-demo .dot.dial::after { transform: scale(.5); }
.qc-demo .dot.track { background: var(--line); }
.qc-demo .dot svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; transform: rotate(-90deg); }
.qc-demo .dot[data-s="published"] { --c: var(--go); }
.qc-demo .dot[data-s="retrying"] { --c: var(--slow); }
.qc-demo .dot[data-s="publishing"] { --c: var(--slow); animation: qc-pulse 1.2s ease-in-out infinite; }
.qc-demo .dot[data-s="failed"] { --c: var(--stop); }
@keyframes qc-pulse { 50% { opacity: .35; } }

/* publish button: sweep = progress, dots = one per channel, check when done. the one yellow object. */
.qc-pub { position: relative; overflow: hidden; min-width: 200px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; min-height: var(--qc-control-h); padding: 0 1.4rem; border: 0; cursor: pointer; font: 700 15px var(--qc-font-body); background: var(--qc-signal); color: #0A0A0A;
	clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.qc-pub:disabled { cursor: default; }
.qc-pub:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.qc-pub .sweep { position: absolute; inset: 0; background: rgba(0,0,0,.16); transform-origin: left; transform: scaleX(0); transition: transform .4s var(--qc-ease); }
.qc-pub .lbl, .qc-pub .dots { position: relative; }
.qc-pub .dots { display: none; gap: 4px; }
.qc-pub[data-state="run"] .dots { display: inline-flex; }
.qc-pub .dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #0A0A0A; display: grid; place-items: center; font: 700 9px/1 var(--qc-font-mono); font-style: normal; transition: background-color .2s, transform .2s var(--qc-ease); }
.qc-pub .dots i.ok { background: #0A0A0A; transform: scale(1.15); }
.qc-pub .dots i.bad { background: #0A0A0A; color: var(--qc-signal); transform: scale(1.15); }

/* in-card toast with draining bar */
.qc-demo .toast { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; padding: 12px 16px 14px; background: var(--ink); color: var(--bg); font-size: 14px; overflow: hidden; }
.qc-demo .toast[hidden] { display: none; }
.qc-demo .toast .drain { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--bg); opacity: .6; transform-origin: left; }

/* split section: copy + demo */
.qc-split { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .qc-split { grid-template-columns: 5fr 6fr; } }
:where(.qc-split) h2 { max-width: 12ch; }
.qc-pillar-demo { margin-top: 1.5rem; }

/* scroll-lit words: each word brightens as it scrolls into view */
.qc-words { font-family: var(--qc-font-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; font-size: clamp(1.8rem, 4.5vw, 3.4rem); max-width: 22ch; }
:where(.qc-words) span { opacity: .22; }
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		@keyframes qc-lit { to { opacity: 1; } }
		:where(.qc-words) span { animation: qc-lit linear both; animation-timeline: view(); }
	}
}
@media (prefers-reduced-motion: reduce) { :where(.qc-words) span { opacity: 1; } }


/* human section */
.qc-human { position: relative; overflow: hidden; background: #0A0A0A; }
.qc-human-grid { align-items: center; }
:where(.qc-human) .qc-words { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 14ch; margin: 0 0 1.5rem; }
:where(.qc-human) .qc-lede { color: #D4D4D4; }
:where(.qc-human) .qc-fine { color: #A3A3A3; }
@media (min-width: 860px) { .qc-human-grid { grid-template-columns: 6fr 5fr; } }

/* reply demo */
.qc-demo[data-demo="reply"] { background: #141414; }
.qc-demo .msg { padding: 16px; }
.qc-demo .msg p { margin: .6rem 0 0; }
.qc-demo .compose { min-height: 112px; padding: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qc-demo .compose .cur { display: inline-block; width: .55em; height: 1.1em; vertical-align: text-bottom; background: var(--signal); margin-left: 2px; }
.qc-demo .reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.qc-demo .timer { color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) { .qc-demo .compose .cur { animation: qc-blink 1s steps(1) infinite; } }
@keyframes qc-blink { 50% { opacity: 0; } }

/* the q (brand/motion/q-cursor.html): ring draws, cursor blinks */
.qc-q { display: block; overflow: visible; --fg: #F5F5F5; --cur: #FFD500; }
:where(.qc-q) .ring { fill: none; stroke: var(--fg); stroke-width: 15.3; stroke-dasharray: 112.2; transform: rotate(-90deg); transform-origin: 35.5px 105.7px; }
:where(.qc-q) .cursor { fill: var(--cur); }
:where(.qc-q-final) .qc-q { width: 100%; height: auto; --fg: #0A0A0A; --cur: #0A0A0A; }
.qc-q-final { position: absolute; right: max(16px, calc((100% - 1120px) / 2)); bottom: 1.5rem; width: 56px; opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
	:where(.qc-q) .cursor { animation: qc-blink 1s steps(1) infinite; }
	@supports (animation-timeline: view()) {
		@keyframes qc-draw { from { stroke-dashoffset: 112.2; } }
		:where(.qc-q) .ring { animation: qc-draw linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
		:where(.qc-q-final) .ring { animation-timeline: scroll(root); animation-range: normal; } /* fills as the page is read, full at the bottom */
	}
}

/* how-it-works: static console snapshots (same card as the live demos, no script) */
.qc-static { margin-top: 1.25rem; }
:where(.qc-static) .head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
:where(.qc-static) .qc-name { font-weight: 600; }
:where(.qc-static) .qc-sub { display: block; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.qc-static) .head .qc-sub { display: inline; flex: none; }
:where(.qc-static) .rows .qc-name { display: block; }
:where(.qc-static) .qc-state { flex: none; font-size: 12px; color: var(--ink); }
:where(.qc-steps) > li { display: flex; flex-direction: column; }
:where(.qc-steps) > li > p { margin: 0; color: var(--qc-ink-2); }

@keyframes qc-on { 0%, 12% { background: var(--qc-line); } 20%, 85% { background: var(--qc-go); } 100% { background: var(--qc-line); } }

/* platform grid */
:where(.qc-channels) li { display: flex; align-items: center; gap: .6rem; }
.qc-channels li > span:first-child { display: inline-flex; align-items: center; gap: .6rem; }
.qc-channels .gb-shape { display: inline-flex; }
:where(.qc-channels) svg { width: 20px; height: 20px; flex: none; }
:where(.qc-channels) .qc-mono { font-size: .75rem; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* contact: what happens after you send (dots light in turn) */
.qc-flow { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; max-width: 420px; }
:where(.qc-flow) li { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--qc-line); border-radius: var(--qc-radius); }
:where(.qc-flow) .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--qc-line); flex: none; }
.qc-flow-label { font-weight: 700; }
:where(.qc-flow) .qc-mono { margin-left: auto; color: var(--qc-ink-2); font-size: .8rem; }
@media (prefers-reduced-motion: no-preference) {
	:where(.qc-flow) .dot { animation: qc-on 6s infinite; }
	.qc-flow li:nth-child(2) .dot { animation-delay: 1.2s; }
	.qc-flow li:nth-child(3) .dot { animation-delay: 2.4s; }
}
@media (prefers-reduced-motion: reduce) { :where(.qc-flow) .dot { background: var(--qc-go); } }

/* 404: a failed row and the q cursor */
.qc-404 { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.qc-404-num { font-size: clamp(5rem, 22vw, 14rem); line-height: .9; margin: 0 0 1rem; font-weight: 700; letter-spacing: -.05em; }
.qc-404-cursor { display: inline-block; width: .32em; height: .55em; margin-left: .08em; background: #F5F5F5; } /* off-white: the yellow belongs to the button */
:where(.qc-404) h1 { font-size: clamp(2rem, 6vw, 4rem); max-width: 16ch; margin: 0 0 1rem; }
.qc-404-status { max-width: 520px; margin: 1.5rem 0; }
.qc-404-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; margin: 0; }
.qc-btn { display: inline-flex; align-items: center; box-sizing: border-box; min-height: var(--qc-control-h); padding: 0 1.6rem; font-weight: 700; text-decoration: none; background: var(--qc-signal); color: var(--qc-on-signal) !important;
	clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.qc-link { text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) { .qc-404-cursor { animation: qc-blink 1s steps(1) infinite; } }
.qc-flow--wide { max-width: 900px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 1.5rem 0 0; }
:where(.qc-flow--wide) li { flex-wrap: wrap; }
:where(.qc-band) :where(.qc-flow) li { border-color: #2A2A2A; }
.qc-split--top { align-items: start; }

/* two pillar cards (was core columns) */
.qc-pillars { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .qc-pillars { grid-template-columns: 1fr 1fr; } }

/* FAQ: GenerateBlocks Pro accordion */
.qc-faq .gb-accordion__item { border-top: 1px solid var(--qc-line); padding: 1rem 0; }
.qc-faq .gb-accordion__item:last-child { border-bottom: 1px solid var(--qc-line); }
.qc-faq .gb-accordion__toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 0; background: transparent; color: inherit; border: 0; cursor: pointer; font: 600 1rem var(--qc-font-body); text-align: left; }
.qc-faq .gb-accordion__toggle:focus-visible { outline: 2px solid var(--qc-ink); outline-offset: 4px; }
.qc-faq .gb-accordion__content { padding-top: .75rem; max-width: 65ch; color: var(--qc-ink-2); }
.qc-faq .gb-accordion__content p { margin: 0; }
.qc-faq .gb-accordion__toggle-icon { font: 600 1.25rem/1 var(--qc-font-mono); color: var(--qc-ink-2); }
.qc-faq .gb-accordion__toggle-icon-open::before { content: "+"; }
.qc-faq .gb-accordion__toggle-icon-close::before { content: "\2212"; }
