@font-face {
  font-family: "Sora";
  src: local("Sora"), local("Sora Regular");
  font-weight: 400 700;
}

:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --panel-2: #f1efe9;
  --text: #1b1d24;
  --muted: #5f6677;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --danger: #ef476f;
  --ok: #06a77d;
  --shadow: 0 18px 36px rgba(23, 25, 35, 0.12);
}

body[data-theme="dark"] {
  --bg: #0f1116;
  --panel: #1b1d24;
  --panel-2: #242734;
  --text: #f4f4f7;
  --muted: #b7bcc8;
  --accent: #ffb703;
  --accent-2: #fb8500;
  --danger: #ef476f;
  --ok: #06d6a0;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 800px at 10% 10%, #f5ead9 0%, var(--bg) 50%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body.intro-active {
  overflow: auto;
}

body[data-theme="dark"] {
  background: radial-gradient(1200px 800px at 10% 10%, #1b2430 0%, var(--bg) 50%);
}
.app {
  width: min(920px, 100%);
  display: grid;
  gap: 20px;
}

.header {
  display: grid;
  gap: 16px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b1d24;
  box-shadow: var(--shadow);
}

h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.progress {
  display: grid;
  gap: 8px;
}

.section-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-number {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
}

.section-progress-text {
  color: var(--muted);
  font-size: 14px;
}

.bar {
  height: 10px;
  background: rgba(32, 36, 46, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

body[data-theme="dark"] .bar {
  background: #2a2e3a;
}

#sectionProgressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 200ms ease;
}

.section-remaining {
  color: var(--muted);
  font-size: 13px;
}

.overall-progress {
  color: #8c93a6;
  font-size: 12px;
}

.section-complete {
  color: var(--ok);
  font-size: 13px;
}

.card {
  background: var(--panel);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.intro {
  display: grid;
  place-items: start center;
}

.intro-card {
  max-width: 100%;
  width: 100%;
  display: grid;
  gap: 16px;
  line-height: 1.7;
}

.intro-card {
  padding: 0;
}

@media (max-width: 720px) {
  .card {
    padding: 16px;
  }
}

.intro-card h2 {
  margin: 0;
}

.intro-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.intro-disclaimer {
  background: var(--panel-2);
  border: 1px solid #e2ded5;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

body[data-theme="dark"] .intro-disclaimer {
  border-color: #2b2f3c;
}

.intro-privacy {
  background: var(--panel-2);
  border: 1px solid #e2ded5;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
}

body[data-theme="dark"] .intro-privacy {
  border-color: #2b2f3c;
}

.intro-note {
  color: var(--muted);
}

.intro-cta {
  justify-self: start;
  padding: 14px 22px;
  font-size: 18px;
}

#resumeBox {
  display: grid;
  gap: 16px;
  text-align: left;
}

.question {
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.4;
  margin-top: 0;
}

.section {
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted);
}

.section-help {
  margin: -2px 0 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.checkbox-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfc9bd;
  background: var(--panel-2);
}

body[data-theme="dark"] .checkbox-item {
  border-color: #343846;
}

.checkbox-item input {
  width: 18px;
  height: 18px;
}

.answers {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  background: transparent;
  color: var(--text);
  border: 1px solid #cfc9bd;
}

body[data-theme="dark"] .btn {
  border-color: #343846;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  font-weight: 600;
}

.btn.ghost {
  color: var(--text);
}

.btn.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 183, 3, 0.15);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hidden {
  display: none;
}

.validation {
  color: var(--danger);
  font-size: 14px;
}

.score {
  font-size: 64px;
  margin: 12px 0;
  color: var(--accent);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.score-row .btn {
  padding: 10px 18px;
}

.detail {
  color: var(--muted);
  margin-bottom: 16px;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.profile {
  margin: 18px 0 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid #e2ded5;
}

body[data-theme="dark"] .profile {
  border-color: #2b2f3c;
}

.profile h3 {
  margin: 0 0 12px 0;
}

.profile-list {
  display: grid;
  gap: 14px;
}

.profile-item {
  display: grid;
  gap: 6px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text);
}

.profile-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(32, 36, 46, 0.12);
  overflow: hidden;
}

body[data-theme="dark"] .profile-bar {
  background: #2a2e3a;
}

.profile-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
}

.profile-fill.core {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.profile-fill.attention {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.profile-fill.hyper {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.profile-fill.masked {
  background: linear-gradient(90deg, #10b981, #059669);
}

.profile-fill.anxiety {
  background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

.profile-fill.mood {
  background: linear-gradient(90deg, #ec4899, #db2777);
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8e2d7;
  color: var(--text);
  font-size: 14px;
}

body[data-theme="dark"] .chip {
  background: #2a2e3a;
}

.disclaimer {
  background: var(--panel-2);
  border: 1px solid #e2ded5;
  padding: 16px;
  border-radius: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.disclaimer h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.extra {
  margin: 16px 0 20px;
  padding: 16px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid #e2ded5;
}

.extra h3 {
  margin: 0 0 10px 0;
}

.message-list {
  margin: 0 0 12px 18px;
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

body[data-theme="dark"] .modal {
  background: rgba(6, 8, 14, 0.6);
}

.modal-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid #e2ded5;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

body[data-theme="dark"] .modal-card {
  border-color: #2b2f3c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.modal-card h3 {
  margin: 0 0 8px 0;
}

.modal-fields {
  display: grid;
  gap: 12px;
  margin: 16px 0 18px;
}

.modal-fields label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
}

.modal-fields input {
  border-radius: 10px;
  border: 1px solid #ded8cc;
  padding: 10px 12px;
  font-size: 16px;
  background: var(--panel-2);
  color: var(--text);
}

body[data-theme="dark"] .modal-fields input {
  border-color: #2f3340;
  background: #1d2230;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 720px) {
  .answers {
    flex-direction: column;
  }
  .footer {
    flex-direction: column;
    align-items: stretch;
  }
  .validation {
    text-align: center;
  }
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.theme-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dev-only {
  opacity: 0.7;
}

.dev-only:hover {
  opacity: 1;
}
