.qcge {
  --qcge-accent: var(--accent, #FE4C1C);
  --qcge-text: var(--text, #2b2b2b);
  --qcge-muted: #747470;
  --qcge-line: rgba(43, 43, 43, 0.12);
  --qcge-soft: #efefec;
  --qcge-card: #ffffff;
  width: 100%;
  color: var(--qcge-text);
  font-family: var(--font-body, "Clash Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.qcge,
.qcge * {
  box-sizing: border-box;
}

.qcge__shell {
  width: min(100%, 1520px);
  margin: 0 auto;
}

.qcge__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(36px, 6vw, 90px);
  padding-bottom: clamp(28px, 3vw, 42px);
  border-bottom: 1px solid var(--qcge-line);
}

.qcge__heading {
  max-width: 900px;
}

.qcge__kicker {
  margin: 0 0 17px;
  color: var(--qcge-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.qcge__kicker::before {
  content: "/";
  margin-right: 8px;
}

.qcge__heading h3 {
  max-width: 900px;
  margin: 0;
  color: var(--qcge-text);
  font-family: var(--font-heading, "Clash Display", "Helvetica Neue", Helvetica, sans-serif);
  font-size: clamp(38px, 4.35vw, 66px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.047em;
}

.qcge__heading > p:last-child {
  max-width: 780px;
  margin: 22px 0 0;
  color: var(--qcge-muted);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.58;
}

.qcge__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.qcge__button,
.qcge__speed button {
  min-height: 39px;
  border: 1px solid var(--qcge-line);
  background: var(--qcge-card);
  color: var(--qcge-text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.qcge__button {
  padding: 0 17px;
  border-radius: 999px;
}

.qcge__speed {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--qcge-line);
  border-radius: 999px;
  background: var(--qcge-card);
}

.qcge__speed button {
  min-width: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.qcge__speed button + button {
  border-left: 1px solid var(--qcge-line);
}

.qcge__button:hover,
.qcge__speed button:hover {
  color: var(--qcge-accent);
  border-color: rgba(254, 76, 28, 0.42);
  transform: translateY(-1px);
}

.qcge__button:focus-visible,
.qcge__speed button:focus-visible {
  outline: 2px solid var(--qcge-accent);
  outline-offset: 2px;
}

.qcge__button[aria-pressed="true"],
.qcge__speed button[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--qcge-accent);
  background: var(--qcge-accent);
}

.qcge__stage {
  margin-top: clamp(38px, 4.5vw, 64px);
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(43, 43, 43, 0.10);
  border-radius: 28px;
  background: #ffffff;
}

.qcge__stage canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 19px;
  background: #f7f7f4;
}

.qcge__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 16px;
  color: var(--qcge-muted);
  font-size: 10px;
  line-height: 1.7;
}

.qcge__legend b {
  color: #3b3b39;
  font-weight: 600;
}

.qcge__sr-workflow {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.qcge-loader-error {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--qcge-line);
  border-radius: 18px;
  color: var(--qcge-muted);
  background: var(--qcge-card);
  font-family: inherit;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .qcge__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .qcge__controls {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .qcge__header {
    gap: 27px;
    padding-bottom: 25px;
  }

  .qcge__heading h3 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .qcge__controls {
    width: 100%;
  }

  .qcge__button {
    flex: 1 1 auto;
  }

  .qcge__speed {
    order: 3;
    width: 100%;
  }

  .qcge__speed button {
    flex: 1;
  }

  .qcge__stage {
    padding: 6px;
    border-radius: 20px;
  }

  .qcge__stage canvas {
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qcge__button,
  .qcge__speed button {
    transition: none;
  }
}
