/* The off-format questions, "I don't know", and the little extras on ordinary questions. */

/* "I don't know": always there, never pushy */
.idk {
  display: block; margin: 14px auto 0; padding: 8px 14px; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.idk:hover { color: var(--ink); }
.idk:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.idk:disabled { opacity: .4; cursor: default; }
.idk.picked { color: var(--accent); }
.progress-label.noted { color: var(--accent); font-style: italic; }

/* question extras */
.q-title.mirrored { transform: scaleX(-1); }
.deja { display: block; margin: -12px 0 16px; color: var(--accent); font-size: 14px; font-style: italic; }
.q-timer { display: block; height: 6px; margin: -10px 0 18px; overflow: hidden; border-radius: 999px; background: var(--line); }
.q-timer i { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: drain linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }

/* shared bits */
.fmt.locked { pointer-events: none; }
.fmt .btn { min-width: 140px; }
.fmt-hint { margin: -8px 0 12px; color: var(--muted); font-size: 14px; }

/* your name */
.fmt-name { display: flex; flex-wrap: wrap; gap: 10px; }
.fmt-input {
  flex: 1 1 220px; min-height: 52px; padding: 10px 16px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--tile-0); color: var(--ink); font: inherit; font-size: 18px; font-weight: 700;
}
.fmt-input:focus { outline: none; border-color: var(--accent); }
.fmt-name.nope .fmt-input { animation: nope .35s; }
@keyframes nope { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* agree / disagree */
.scale-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 22px); padding: 8px 0; }
.scale-dot {
  flex: none; padding: 0; border: 3px solid var(--accent); border-radius: 50%; background: var(--card); cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s;
}
.scale-dot.s0, .scale-dot.s4 { width: 52px; height: 52px; }
.scale-dot.s1, .scale-dot.s3 { width: 40px; height: 40px; }
.scale-dot.s2 { width: 30px; height: 30px; border-color: var(--muted); }
.scale-dot.s0, .scale-dot.s1 { border-color: var(--muted); }
.scale-dot:hover { transform: scale(1.1); background: color-mix(in srgb, var(--accent) 25%, var(--card)); }
.scale-dot.picked { background: var(--accent); }
.scale-dot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.scale-ends { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 800; }

/* slider */
.fmt-slider { display: grid; gap: 10px; }
.slider-value { text-align: center; font-family: var(--font-display); font-size: calc(30px * var(--title-scale)); font-weight: 900; }
.slider-value.wrong { color: var(--accent); }
.slider-input { width: 100%; accent-color: var(--accent); height: 28px; }
.fmt-slider .btn { justify-self: center; }

/* ranking */
.rank-list { display: grid; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--tile-0); color: var(--ink); text-align: left; font-weight: 800; cursor: pointer;
}
.rank-item:hover { border-color: var(--accent); }
.rank-badge {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px dashed var(--muted); color: var(--accent-ink); font-size: 14px; font-weight: 900;
}
.rank-item.ranked .rank-badge { border: 0; background: var(--accent); }
.rank-emoji { font-size: 24px; }

/* select all that apply */
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.check-item {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--tile-0); font-weight: 700; font-size: 15px; line-height: 1.25; cursor: pointer;
}
.check-item input { flex: none; width: 20px; height: 20px; accent-color: var(--accent); }
.check-item:has(input:checked) { border-color: var(--accent); }
.fmt-check .btn { display: block; margin: 0 auto; }

/* "I'm not a robot" */
.cap-box {
  display: flex; align-items: center; gap: 14px; max-width: 320px; margin: 0 auto; padding: 14px 16px;
  border: 1px solid #d3d3d3; border-radius: 4px; background: #f9f9f9; color: #222; box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.cap-tick { position: relative; flex: none; width: 28px; height: 28px; padding: 0; border: 2px solid #c1c1c1; border-radius: 3px; background: #fff; cursor: pointer; }
.cap-tick.busy { border-color: transparent; border-top-color: #4a90e2; border-radius: 50%; animation: spin-once .8s linear infinite; }
.cap-tick.done { border-color: transparent; }
.cap-tick.done::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #109d58; font-size: 26px; font-weight: 900; }
.cap-text { flex: 1; font-family: Arial, sans-serif; font-size: 15px; }
.cap-brand { color: #888; font-family: Arial, sans-serif; font-size: 10px; text-align: center; }
.cap-panel { max-width: 340px; margin: 14px auto 0; padding: 10px; border: 1px solid #d3d3d3; border-radius: 4px; background: #fff; color: #222; }
.cap-prompt { margin: 0 0 10px; padding: 14px; background: #4a90e2; color: #fff; font-family: Arial, sans-serif; font-size: 16px; font-weight: 700; line-height: 1.3; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cap-tile { aspect-ratio: 1; padding: 0; border: 0; background: #e8e8e8; font-size: clamp(30px, 8vw, 44px); cursor: pointer; transition: transform .12s; }
.cap-tile.on { transform: scale(.86); outline: 4px solid #4a90e2; }
.cap-verify { display: block; margin: 10px 0 0 auto; border-radius: 3px; background: #4a90e2; border-color: #4a90e2; color: #fff; }
.cap-note { margin: 10px 0 0; font-family: Arial, sans-serif; font-size: 14px; color: #c00; }

/* hold the button */
.fmt-hold { display: grid; justify-items: center; gap: 10px; padding: 6px 0; }
.hold-btn {
  --p: 0; position: relative; display: grid; place-items: center; width: 150px; height: 150px; padding: 0; border: 0; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--line) 0); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
}
.hold-btn::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--card); }
.hold-label { position: relative; color: var(--ink); font-weight: 900; font-size: 16px; }
.hold-btn.holding { transform: scale(.96); }
.hold-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.hold-whisper { min-height: 1.5em; margin: 0; color: var(--accent); font-style: italic; }
.card.holding { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); transition: box-shadow 4s; }

/* terms of service */
.terms-box {
  height: 190px; overflow-y: auto; margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--tile-0); color: var(--ink); font-size: 13px; line-height: 1.5;
}
.terms-box p { margin: 0 0 10px; }
.terms-box:focus-visible { outline: 3px solid var(--accent); }
.fmt-terms .btn:disabled { font-style: normal; opacity: .55; }

/* "Do you want to stop?" */
.fmt-stop { position: relative; height: 150px; }
.fmt-stop .btn { position: absolute; top: 50px; min-width: 120px; transition: left .25s var(--ease), top .25s var(--ease); }
.stop-yes { left: calc(50% - 130px); }
.stop-no { left: calc(50% + 10px); }
.stop-yes.caught { color: var(--accent); font-style: italic; }

/* the creepier stages */
.creep .fmt-input, .creep .rank-item, .creep .check-item { border-width: 1px; border-radius: 6px; font-weight: 600; }
.creep .cap-box, .creep .cap-panel { filter: grayscale(.4) contrast(1.1); }

@media (max-width: 520px) {
  .check-list { grid-template-columns: minmax(0, 1fr); }
  .scale-dot.s0, .scale-dot.s4 { width: 44px; height: 44px; }
  .scale-dot.s1, .scale-dot.s3 { width: 34px; height: 34px; }
  .stop-yes { left: calc(50% - 125px); }
}
