.prototype-container {
  max-width: 860px;
}

.prototype-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 10px;
  border: 1px solid var(--shell-line);
  border-radius: 999px;
  color: var(--shell-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-picker,
.question-tile,
.start-panel {
  margin-top: 20px;
  border: 1px solid var(--shell-line);
  border-radius: 12px;
  background: var(--shell-surface);
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.video-picker,
.start-panel {
  padding: 22px;
}

.video-picker h2 {
  margin-top: 0;
}

.prototype-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.prototype-actions .secondary,
.decision-actions .secondary,
.answer-panel > .secondary,
.done-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--shell-line-strong);
  border-radius: var(--shell-radius);
  background: var(--shell-button-secondary-bg);
  color: var(--shell-button-secondary-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#startAnalysis,
#startAnalysisMain {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--shell-accent);
  border-radius: var(--shell-radius);
  background: var(--shell-accent);
  color: var(--shell-on-accent);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.prototype-actions .secondary:focus-visible,
.decision-actions .secondary:focus-visible,
.answer-panel > .secondary:focus-visible,
.done-button:focus-visible,
#startAnalysis:focus-visible,
#startAnalysisMain:focus-visible {
  outline: 3px solid var(--shell-accent);
  outline-offset: 3px;
}

.question-list {
  margin-top: 28px;
}

/* Steps 1 & 2 are always open: a heading followed by a permanently visible
   panel, so they get a padded head instead of the collapsible summary button. */
.step-head {
  padding: 20px 22px;
}

.step-value {
  margin: 12px 0 0;
  color: var(--shell-muted);
}

.step-notes {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--shell-ink);
  line-height: 1.5;
}

.step-notes li + li {
  margin-top: 6px;
}

.step-error {
  margin: 10px 0 0;
  color: var(--shell-danger);
  font-weight: 700;
}

.step-error:empty {
  display: none;
}

/* Each group of steps sits on its own slightly recessed panel with a title:
   "Main settings", "Review", and "Custom settings". The step tiles inside keep
   their lighter surface, so they read as cards on the panel. */
.section-panel {
  margin-top: 24px;
  padding: 20px 22px 24px;
  border: 1px solid var(--shell-line);
  border-radius: 14px;
  background: var(--shell-surface-deeper);
}

.section-panel-title {
  margin: 0;
  font-size: 1.15rem;
}

/* The step list has its own top gap; inside a titled panel a smaller one keeps
   the first tile close to the heading. */
.section-panel .question-list {
  margin-top: 14px;
}

.decision-copy {
  margin: 14px 0 16px;
  color: var(--shell-ink);
  line-height: 1.55;
}

.decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The YouTube link box is taller than a default field so a long URL is easy to
   read and edit. */
.youtube-input {
  min-height: 3.25rem;
  padding: 12px;
}

/* Review lists — the running summary of the user's answers. */
.review-list {
  margin: 0 0 4px;
  padding-left: 20px;
  color: var(--shell-ink);
  line-height: 1.6;
}

.review-list li + li {
  margin-top: 4px;
}

.review-list strong {
  color: var(--shell-muted-strong);
}

.remember-selections {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--shell-ink);
  font-weight: 700;
}

.question-help {
  margin: 0 0 16px;
  color: var(--shell-ink);
  line-height: 1.55;
}

#menuFormError {
  margin-top: 18px;
}

/* The final Start button sits directly on the page — no panel behind it. */
.final-start {
  margin-top: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.question-tile {
  overflow: hidden;
}

.question-tile.is-open {
  border-color: var(--shell-accent);
}

.question-summary {
  display: block;
  width: 100%;
  position: relative;
  padding: 20px 58px 20px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.question-summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  color: var(--shell-accent);
  font-size: 1.7rem;
  font-weight: 500;
}

.question-summary[aria-expanded="true"]::after {
  content: "−";
}

.question-summary:hover {
  background: var(--shell-hover);
}

.question-summary:focus-visible {
  outline: 3px solid var(--shell-accent);
  outline-offset: -3px;
}

.question-number,
.question-title,
.current-answer,
.change-instruction {
  display: block;
}

.question-number {
  margin-bottom: 5px;
  color: var(--shell-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.question-title {
  color: var(--shell-ink);
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.4;
}

.current-answer {
  margin-top: 7px;
  color: var(--shell-ink);
  line-height: 1.5;
}

.current-answer strong {
  color: var(--shell-accent);
}

.change-instruction {
  margin-top: 7px;
  color: var(--shell-muted);
  font-size: 0.93rem;
}

.answer-panel {
  padding: 20px 22px 22px;
  border-top: 1px solid var(--shell-line);
  background: var(--shell-surface-deeper);
}

.answer-panel fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.answer-panel legend,
.answer-panel > label {
  display: block;
  margin-bottom: 12px;
  color: var(--shell-ink);
  font-weight: 700;
}

.answer-option {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--shell-line);
  border-radius: 8px;
  background: var(--shell-surface);
}

.answer-option input {
  flex: 0 0 auto;
}

.answer-panel textarea,
.answer-panel input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

.done-button {
  margin-top: 18px;
}

.prototype-status {
  margin: 16px 0 0;
  color: var(--shell-muted);
}

.prototype-status:empty {
  display: none;
}

@media (max-width: 640px) {
  .question-summary {
    padding: 18px 50px 18px 16px;
  }

  .answer-panel {
    padding: 18px 16px;
  }

  .prototype-actions {
    display: grid;
  }
}

@media (forced-colors: active) {
  .question-tile.is-open {
    border-width: 3px;
  }
}
