/* Submit your idea, a game of three moves that builds an app card (Services/new_idea, public/js/idea-quest.js).
   Without the script, every move shows and the card is a summary beside them. */
.cq-game { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; max-width: 1040px; margin: 0 auto; }
@media (max-width: 899px) { .cq-game { grid-template-columns: minmax(0, 1fr); } .cq-appcard { order: -1; } }

.cq-game-steps { display: none; }
.cq-game.is-playing .cq-game-steps { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; color: var(--cq-color-text-muted, #666); }
.cq-game-steps li { flex: 1; padding-top: 10px; border-top: 3px solid var(--cq-color-surface); }
.cq-game-steps li.is-done, .cq-game-steps li.is-current { border-top-color: var(--cq-color-ink); color: var(--cq-color-ink); }
.cq-game-steps li.is-current { font-weight: 600; }

.cq-move { margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
.cq-game.is-playing .cq-move { display: none; margin: 0; }
.cq-game.is-playing .cq-move.is-current { display: block; animation: cq-move-in .25s ease-out; }
@keyframes cq-move-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.cq-move-q { margin-bottom: 16px; padding: 0; font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--cq-color-ink); }
.cq-move-sub { display: block; margin: 24px 0 8px; font-weight: 600; }
.cq-move textarea { font-size: 18px; }

.cq-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.cq-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--cq-color-surface);
  color: var(--cq-color-ink); font: inherit; font-size: 14px; cursor: pointer; }
.cq-chip:hover { box-shadow: inset 0 0 0 1px var(--cq-color-ink); }
.cq-chips--big .cq-chip { padding: 14px 22px; font-size: 17px; font-weight: 500; }
.cq-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cq-chip:has(input:checked) { background: var(--cq-color-ink); color: var(--cq-color-canvas); }
.cq-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--cq-color-ink); }
.cq-examples .cq-note { margin: 0 4px 0 0; }

.cq-powers { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 8px; }
.cq-power { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--cq-radius-card);
  box-shadow: inset 0 0 0 1px var(--cq-color-border, #e5e5e5); background: var(--cq-color-canvas); cursor: pointer; font-weight: 500; line-height: 1.25;
  transition: box-shadow .15s ease, transform .15s ease; }
.cq-power:hover { box-shadow: inset 0 0 0 1px var(--cq-color-ink); }
.cq-power input { position: absolute; opacity: 0; pointer-events: none; }
/* the icon sits in a square like Caligrafy's mark: outlined, black once chosen */
.cq-power-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px;
  box-shadow: inset 0 0 0 1.5px var(--cq-color-ink); color: var(--cq-color-ink); transition: background .15s ease, color .15s ease; }
.cq-power:has(input:checked) { box-shadow: inset 0 0 0 2px var(--cq-color-ink); transform: translateY(-1px); }
.cq-power:has(input:checked) .cq-power-icon { background: var(--cq-color-ink); color: var(--cq-color-canvas); }
.cq-power:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--cq-color-ink); }

.cq-similar-line { margin: 10px 0 0; font-size: 14px; color: var(--cq-color-text-muted, #666); }
.cq-similar-line a { color: var(--cq-color-ink); }

.cq-game-nav { display: none; }
.cq-game.is-playing .cq-game-nav { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }
.cq-game.is-playing .cq-game-back { margin-right: auto; }
.cq-game:not(.is-playing) .cq-game-nav { display: flex; justify-content: flex-end; }
.cq-game:not(.is-playing) .cq-game-back, .cq-game:not(.is-playing) .cq-game-next, .cq-game:not(.is-playing) .cq-game-reveal,
.cq-game:not(.is-playing) .cq-move-reveal { display: none; }

/* the app card */
.cq-appcard { position: sticky; top: 24px; perspective: 1200px; }
.cq-appcard-inner { position: relative; transition: transform .6s ease; transform-style: preserve-3d; }
.cq-appcard-front, .cq-appcard-back { padding: 24px; border-radius: 16px; background: var(--cq-color-ink); color: var(--cq-color-canvas); backface-visibility: hidden; }
.cq-appcard-back { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; transform: rotateY(180deg); }
.cq-appcard.is-revealed .cq-appcard-inner { transform: rotateY(180deg); }
.cq-appcard.is-revealing .cq-appcard-inner { animation: cq-card-think 1.2s ease-in-out infinite; }
@keyframes cq-card-think { 50% { transform: rotateY(20deg); } }
.cq-appcard.is-up .cq-appcard-inner { animation: cq-card-up .35s ease; }
@keyframes cq-card-up { 40% { transform: translateY(-6px) scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .cq-appcard-inner, .cq-appcard.is-up .cq-appcard-inner, .cq-game.is-playing .cq-move.is-current { animation: none; transition: none; } }
.cq-appcard-kicker { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.cq-appcard-name-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cq-appcard-name { width: 100%; padding: 0; border: 0; border-bottom: 1px dashed rgba(255, 255, 255, .4); background: transparent; color: inherit;
  font: inherit; font-size: 24px; font-weight: 700; line-height: 1.3; outline: none; }
.cq-appcard-name::placeholder { color: rgba(255, 255, 255, .5); }
.cq-appcard-name:focus { border-bottom-style: solid; border-bottom-color: #fff; }
.cq-appcard-what { margin: 12px 0 0; font-size: 15px; opacity: .9; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cq-appcard-who { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.cq-appcard-who:empty { display: none; }
.cq-appcard-powers { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.cq-appcard-powers li { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; }
.cq-appcard-level { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 14px; font-weight: 600; }
.cq-appcard-stars { letter-spacing: 2px; font-size: 16px; }
.cq-appcard-meter { height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.cq-appcard-meter span { display: block; height: 100%; width: 4%; border-radius: 3px; background: #fff; transition: width .35s ease; }
.cq-appcard-back-name { margin: 0; font-size: 18px; font-weight: 600; }
.cq-appcard-price { margin: 16px 0 0; font-size: 32px; font-weight: 700; line-height: 1.1; }
.cq-appcard-price-label { margin: 4px 0 0; font-size: 14px; opacity: .8; }
.cq-appcard-similar { margin: 12px 4px 0; font-size: 14px; color: var(--cq-color-text-muted, #666); }
.cq-appcard-similar a, .cq-similar-line a { color: var(--cq-color-ink); }

/* the reveal: the estimate under the moves */
.cq-reveal-wait { margin: 0; font-size: 18px; color: var(--cq-color-text-muted, #666); }
.cq-reveal-wait::after { content: ''; display: inline-block; width: 16px; height: 16px; margin-left: 10px; vertical-align: -2px; border: 2px solid var(--cq-color-border, #ddd);
  border-top-color: var(--cq-color-ink); border-radius: 50%; animation: cq-spin 1s linear infinite; }
.cq-reveal-note { margin: 0 0 16px; }
.cq-reveal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
@media (max-width: 575px) { .cq-reveal-stats { grid-template-columns: minmax(0, 1fr); } }
.cq-reveal-error { margin: 0; color: var(--cq-color-ink); font-weight: 500; }
@keyframes cq-spin { to { transform: rotate(360deg); } }
