:root {
  --ink: #101c2e;
  --ink-soft: #24344c;
  --cream: #f6f2e9;
  --cream-dim: #e9e2d2;
  --gold: #c19a4b;
  --gold-soft: #d9bf8a;
  --red: #b4533a;
  --green: #3f7d54;
  --amber: #b07c2e;
  --max: 560px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
  min-height: 100vh;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 18px;
}
.brand b { color: var(--gold); }

/* Progress */
.progress { height: 3px; background: var(--cream-dim); border-radius: 2px; margin-bottom: 28px; }
.progress-fill { height: 100%; width: 0%; background: var(--gold); border-radius: 2px; transition: width 0.25s ease; }

/* Screens */
.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }

h1 {
  font-size: 34px;
  line-height: 1.18;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.sub { font-size: 18px; color: var(--ink-soft); margin-bottom: 30px; }

.q-title { font-size: 26px; line-height: 1.25; font-weight: 700; margin-bottom: 6px; }
.q-sub { font-size: 15px; color: var(--ink-soft); margin-bottom: 22px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  font-family: inherit;
  font-size: 16px;
  padding: 12px 18px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.chip.selected { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Inputs */
input[type="text"], input[type="email"], select, textarea {
  font-family: inherit;
  font-size: 17px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  margin-bottom: 18px;
}
textarea { resize: none; height: 110px; }
.char-count { font-size: 13px; color: var(--ink-soft); text-align: right; margin-top: -12px; margin-bottom: 16px; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  padding: 15px 30px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-row { margin-top: auto; display: flex; gap: 12px; align-items: center; padding-top: 20px; }
.btn-back {
  font-family: inherit; font-size: 15px; background: none; border: none;
  color: var(--ink-soft); cursor: pointer; text-decoration: underline; padding: 12px 4px;
}
.btn-full { width: 100%; }

.error-msg { color: var(--red); font-size: 15px; margin-bottom: 12px; display: none; }

/* Footer */
.conf-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--cream);
  border-top: 1px solid var(--cream-dim);
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 10px 16px;
}

/* Loading */
.loading-box { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.spinner {
  width: 44px; height: 44px; border: 3px solid var(--cream-dim); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.9s linear infinite; margin-bottom: 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { font-size: 18px; color: var(--ink-soft); max-width: 320px; }

/* Result */
.result-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: 16px;
  padding: 34px 26px 30px;
  text-align: center;
  margin-bottom: 26px;
}
.result-kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 14px; }
.result-score { font-size: 84px; line-height: 1; font-weight: 700; color: var(--gold); }
.result-score-of { font-size: 15px; color: var(--gold-soft); margin-bottom: 16px; }
.result-archetype { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.result-headline { font-size: 17px; line-height: 1.45; color: var(--cream-dim); font-style: italic; }
.result-domain { margin-top: 20px; font-size: 13px; letter-spacing: 0.1em; color: var(--gold-soft); }

.verdict-chip {
  display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 7px 16px; border-radius: 999px; margin-bottom: 20px;
}
.verdict-actively_marketable { background: var(--green); color: var(--cream); }
.verdict-selectively_marketable { background: var(--amber); color: var(--cream); }
.verdict-wait_6_to_12_months { background: var(--ink-soft); color: var(--cream); }
.verdict-needs_repositioning { background: var(--red); color: var(--cream); }

.report { font-size: 17px; }
.report p { margin-bottom: 16px; }
.report a { color: var(--ink); font-weight: 700; }

.share-row { display: flex; gap: 12px; margin: 26px 0 8px; }
.share-row .btn { flex: 1; font-size: 16px; padding: 13px 10px; }

.attribution {
  border-top: 1px solid var(--cream-dim);
  margin-top: 30px; padding-top: 22px;
  font-size: 15px; color: var(--ink-soft);
}
.attribution b { color: var(--ink); }

/* Share page */
.share-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.share-card {
  background: var(--ink); color: var(--cream); border-radius: 16px;
  padding: 44px 30px; text-align: center; max-width: 420px; width: 100%;
}
.share-kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 16px; }
.share-score { font-size: 90px; line-height: 1; font-weight: 700; color: var(--gold); font-family: Georgia, serif; }
.share-archetype { font-size: 32px; margin: 12px 0 10px; font-family: Georgia, serif; }
.share-headline { font-size: 17px; font-style: italic; color: var(--cream-dim); margin-bottom: 28px; }
.share-card .btn { background: var(--gold); color: var(--ink); width: 100%; margin-bottom: 16px; }
.share-note { font-size: 13px; color: var(--gold-soft); }

@media (max-width: 400px) {
  h1 { font-size: 29px; }
  .q-title { font-size: 23px; }
  .result-score { font-size: 72px; }
}
