/* Self-contained, non-interactive illustrations of the four product capabilities. */
.card-demo {
  position: relative;
  width: 100%;
  aspect-ratio: 470 / 294;
  container-type: inline-size;
  color: #ededf0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(7px, 2cqw, 10px);
  line-height: 1.4;
}

.card-demo *, .card-demo *::before, .card-demo *::after { box-sizing: border-box; }
.card-demo__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 12px 12px 0 0; }
.card-demo__reference { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-demo__control {
  position: absolute; z-index: 8; top: 8px; right: 8px;
  padding: 5px 8px; border: 1px solid #ffffff35; border-radius: 6px;
  background: #151619df; color: #fff; font: 500 11px/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.card-demo__control:hover { background: #303238; }
.card-demo__control:focus-visible { outline: 2px solid #a7c9ff; outline-offset: 2px; }
.card-demo[data-running="false"] *, .card-demo[data-running="false"] *::before, .card-demo[data-running="false"] *::after { animation-play-state: paused !important; }
.card-demo[data-static="true"] .card-demo__workflow-working { opacity: 0; animation: none; }
.card-demo[data-static="true"] .card-demo__workflow-result { opacity: 1; animation: none; }

/* The plugin image is the source page's static view; the overlay follows its example. */
.card-demo__plugin-story {
  position: absolute; inset: 11% 8% 0 0; padding: 8% 7%;
  background: #111113; color: #e9e9ec; opacity: 0;
  animation: card-plugin-story 24s infinite;
}
.card-demo__plugin-request { margin-left: auto; padding: 2% 3%; width: fit-content; max-width: 76%; border-radius: 12px; background: #292a2d; }
.card-demo__plugin-process { margin-top: 6%; color: #9b9da4; }
.card-demo__plugin-process > div { margin-top: 3%; color: #d8d8db; }
.card-demo__plugin-process small { margin-left: 1.5%; color: #8e9098; font-size: .9em; }
.card-demo__plugin-process em { color: #4ad486; font-style: normal; }
.card-demo__plugin-process p { margin-top: 5%; color: #eee; }
.card-demo__timer {
  position: absolute; right: 7%; bottom: 7%; width: 29%; padding: 3%;
  border: 1px solid #53555b; border-radius: 12px; background: #26272a;
  box-shadow: 0 8px 30px #0009; opacity: 0;
  animation: card-plugin-timer 24s infinite;
}
.card-demo__timer-title { display: flex; align-items: center; gap: 7%; white-space: nowrap; }
.card-demo__timer-title img { width: 17%; aspect-ratio: 1; }
.card-demo__timer-tabs { display: flex; justify-content: center; gap: 12%; margin-top: 5%; color: #a9abb1; font-size: .85em; }
.card-demo__timer-tabs span:first-child { color: #f0f0f2; }
.card-demo__timer-time { margin: 6% 0; text-align: center; font-size: 2em; font-weight: 600; letter-spacing: .02em; }
.card-demo__timer-button { padding: 4%; border-radius: 6px; background: #ebedf0; color: #151619; text-align: center; font-weight: 600; }
@keyframes card-plugin-story { 0%, 21% { opacity: 0; } 25%, 53% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes card-plugin-timer { 0%, 49% { opacity: 0; transform: translateY(5%); } 54%, 90% { opacity: 1; transform: translateY(0); } 96%, 100% { opacity: 0; } }

/* File tiles and the code-diff panel use the same source-page file icons. */
.card-demo--files .card-demo__frame { background: #0d0e0f; }
.card-demo__file-window { position: absolute; top: 8%; height: 68%; left: 4%; width: 51%; overflow: hidden; }
.card-demo__file-track { animation: card-file-reel 18s linear infinite; }
.card-demo__file {
  height: 12.8cqw; margin-bottom: 2.5cqw;
  padding: 2%; display: flex; align-items: center; gap: 5%;
  border: 1px solid #3b3d43; border-radius: 16px; background: #202124;
  box-shadow: 0 8px 20px #0007;
}
.card-demo__file-icon { width: 18%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #383a3f; border-radius: 10px; }
.card-demo__file-icon img { width: 58%; height: 58%; object-fit: contain; }
.card-demo__file b, .card-demo__file small { display: block; white-space: nowrap; }
.card-demo__file b { font-size: 1.15em; font-weight: 600; }
.card-demo__file small { color: #a8aab1; font-size: .9em; }
.card-demo__diff {
  position: absolute; z-index: 2; top: 28%; left: 42%; width: 58%; height: 75%;
  overflow: hidden; border: 1px solid #42444a; border-radius: 15px 15px 0 0;
  background: #111214; box-shadow: 0 10px 28px #000b;
}
.card-demo__diff-tab { display: flex; justify-content: space-between; width: 55%; margin: 2.5% 3%; padding: 2% 3%; border-radius: 8px; background: #292a2d; font-weight: 600; }
.card-demo__diff-tab span { color: #a4a6ac; }
.card-demo__diff-header { display: flex; align-items: center; gap: 2%; padding: 2% 4%; border-bottom: 1px solid #33353a; }
.card-demo__diff-header img { width: 7%; }
.card-demo__diff-header b { white-space: nowrap; }
.card-demo__diff-header span { color: #93959b; }
.card-demo__diff-header em { margin-left: auto; color: #40db88; font-style: normal; }
.card-demo__diff-header i { color: #ff5b5f; font-style: normal; }
.card-demo__code { padding-top: 2%; font: 1.05em/1.65 ui-monospace, Consolas, monospace; white-space: nowrap; }
.card-demo__code > div { padding: 0 4%; display: flex; gap: 4%; }
.card-demo__code > div > span { color: #93959a; }
.card-demo__code strong { color: #f578a4; font-weight: 500; }
.card-demo__code b { color: #95a9ff; font-weight: 500; }
.card-demo__code i { color: #90e79a; font-style: normal; }
.card-demo__hunk { color: #9aa9bf; }
.card-demo__code .card-demo__removed { border-left: 3px solid #ff5559; background: #401d1e; }
.card-demo__code .card-demo__added { border-left: 3px solid #39dc84; background: #1d3827; }
@keyframes card-file-reel { to { transform: translateY(-107.1cqw); } }

/* The schedule is a staged illustration, not a working task control. */
.card-demo--workflow .card-demo__frame { background: #0d0e0f; }
.card-demo--workflow { font-size: clamp(8px, 2.4cqw, 11px); }
.card-demo__workflow { position: absolute; inset: 0; padding: 4% 4% 0; }
.card-demo__workflow-request { width: fit-content; max-width: 85%; margin-left: auto; padding: 2.2% 3%; border-radius: 15px; background: #292a2d; font-weight: 600; }
.card-demo__workflow-working, .card-demo__workflow-result { position: absolute; left: 4%; right: 4%; top: 27%; }
.card-demo__workflow-working { color: #a3a5ad; opacity: 0; animation: card-workflow-working 18s infinite; }
.card-demo__workflow-working p { color: #e1e1e4; }
.card-demo__workflow-working small { margin-left: 2%; color: #9699a0; }
.card-demo__workflow-result { animation: card-workflow-result 18s infinite; }
.card-demo__workflow-heading { padding-bottom: 3%; border-bottom: 1px solid #2a2b2e; color: #a5a6ad; }
.card-demo__workflow-heading span, .card-demo__workflow-working > span { color: #80828a; }
.card-demo__workflow-result p { margin: 3% 0; font-weight: 600; }
.card-demo__schedule { display: flex; align-items: center; gap: 3%; min-height: 12cqw; padding: 2%; border: 1px solid #3b3d42; border-radius: 15px; background: #202124; }
.card-demo__schedule b, .card-demo__schedule small { display: block; }
.card-demo__schedule b { font-size: 1.05em; }
.card-demo__schedule small { color: #a3a5ac; font-size: .8em; }
.card-demo__clock { display: grid; place-items: center; width: 9%; aspect-ratio: 1; border: 1px solid #36383d; border-radius: 8px; }
.card-demo__clock img { width: 56%; filter: invert(75%); }
.card-demo__open { margin-left: auto; padding: 1% 3%; border: 1px solid #4c4e55; border-radius: 20px; font-weight: 600; white-space: nowrap; }
@keyframes card-workflow-working { 0%, 8% { opacity: 0; } 13%, 35% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes card-workflow-result { 0%, 36% { opacity: 0; } 43%, 91% { opacity: 1; } 97%, 100% { opacity: 0; } }

/* The highlighted timing span travels across the source trace. */
.card-demo__trace-scan { position: absolute; left: 8%; top: 26%; width: 4%; height: 1.2%; border-radius: 2px; background: #f9a234; box-shadow: 0 0 0 1px #dfe4e999; opacity: 0; animation: card-trace-scan 12s infinite; }
@keyframes card-trace-scan { 0%, 12% { opacity: 0; transform: translateX(0); } 16%, 83% { opacity: .95; } 85%, 100% { opacity: 0; transform: translateX(1500%); } }

@media (max-width: 740px) {
  .card-demo--files { aspect-ratio: 1; }
  .card-demo--workflow { aspect-ratio: 3 / 4; }
  .card-demo--files .card-demo__file-window { top: 5%; left: 6%; width: 75%; height: 36%; }
  .card-demo--files .card-demo__file { height: 15cqw; margin-bottom: 3cqw; }
  .card-demo--files .card-demo__file-track { animation-name: card-file-reel-mobile; }
  .card-demo--files .card-demo__diff { top: 40%; left: 10%; width: 90%; height: 62%; }
}
@keyframes card-file-reel-mobile { to { transform: translateY(-126cqw); } }

@media (max-width: 480px) {
  .card-demo__control { top: 6px; right: 6px; padding: 4px 7px; font-size: 10px; }
  .card-demo__file { min-height: 0; border-radius: 11px; }
  .card-demo__file-icon { border-radius: 7px; }
  .card-demo__diff { border-radius: 10px 10px 0 0; }
  .card-demo__schedule { border-radius: 10px; }
}
