:root {
  --background: #f3effa;
  --foreground: #121021;
  --card: #ffffff;
  --popover: #ffffff;
  --primary: #06041f;
  --primary-foreground: #ffffff;
  --accent-interactive: #5935e9;
  --accent-soft: #e9e5f9;
  --accent-soft-hover: #ddd6f3;
  --muted: #e8e5f0;
  --muted-soft: #f6f4fa;
  --muted-foreground: #6e6a8b;
  --destructive: #e62b0f;
  --success: #0b8a62;
  --success-subtle: #e9fbf3;
  --warning: #b45309;
  --warning-subtle: #fef3dc;
  --border: #d4c5e6;
  --input: #ebe5f5;
  --ring: #5935e9;
  --service-card: #fcf6b8;
  --shadow: 0 18px 55px rgba(34, 22, 69, 0.12);
  --shadow-soft: 0 10px 28px rgba(34, 22, 69, 0.08);
  color: var(--foreground);
  background: var(--background);
  font-family: Manrope, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; }
body { margin: 0; min-width: 0; background: var(--background); }
button, select, input { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid rgba(89, 53, 233, 0.34);
  outline-offset: 2px;
}

.icon { display: inline-grid; width: 17px; height: 17px; place-items: center; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon .spinner { animation: spin 0.8s linear infinite; stroke-dasharray: 42; stroke-dashoffset: 14; }

.review-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(104, 83, 147, 0.15);
  backdrop-filter: blur(18px);
}
.review-brand { display: grid; gap: 3px; }
.review-brand strong { font-size: 15px; }
.review-kicker { color: var(--accent-interactive); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.review-controls { display: flex; align-items: end; gap: 9px; }
.review-controls label { display: grid; gap: 4px; color: var(--muted-foreground); font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.review-controls select, .quiet-button, .notes-toggle {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--muted-soft);
  box-shadow: inset 0 0 0 1px rgba(104, 83, 147, 0.14);
}
.review-controls select, .quiet-button { padding: 0 13px; }
.notes-toggle { grid-auto-flow: column; align-items: center; padding: 0 12px; }
.notes-toggle input { accent-color: var(--accent-interactive); }

.state-pills { display: flex; gap: 7px; overflow-x: auto; padding: 12px 24px 0; scrollbar-width: none; }
.state-pill { white-space: nowrap; border: 0; border-radius: 999px; background: var(--card); padding: 8px 12px; box-shadow: inset 0 0 0 1px rgba(104, 83, 147, 0.15); font-size: 11px; font-weight: 750; }
.state-pill:hover { background: var(--accent-soft); }
.state-pill.active { background: var(--primary); color: var(--primary-foreground); box-shadow: none; }

.prototype-layout { display: grid; grid-template-columns: minmax(700px, 1fr) 350px; gap: 18px; align-items: start; padding: 18px 24px 48px; }
.prototype-stage { min-width: 0; }
.screen-root { min-width: 0; }

.review-notes {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  border-radius: 28px;
  background: var(--card);
  padding: 20px;
  box-shadow: var(--shadow);
}
.review-notes[hidden] { display: none; }
.note-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note-group, .score-target { border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.note-group { background: var(--accent-soft); color: var(--accent-interactive); }
.score-target { background: var(--success-subtle); color: var(--success); }
.review-notes h2 { margin: 0; font-size: 20px; line-height: 1.15; }
.review-notes section { box-shadow: 0 -1px 0 rgba(104, 83, 147, 0.14); padding-top: 12px; }
.review-notes h3 { margin: 0 0 6px; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; }
.review-notes p, .review-notes li { margin: 0; color: var(--muted-foreground); font-size: 11px; line-height: 1.55; }
.review-notes ul { display: grid; gap: 5px; margin: 0; padding-left: 17px; }
.question-card { border-radius: 18px; background: var(--primary); padding: 14px !important; box-shadow: none !important; }
.question-card h3, .question-card p { color: white; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  button, .state-pill { transition: background-color 170ms ease, color 170ms ease, box-shadow 170ms ease, transform 170ms ease; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; } }
