/* Who Knows Us Best — shared design system.
   Warm stationery palette: cream paper, plum ink, gold foil. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #fbf7f2;
  --paper-2: #fffdfb;
  --ink: #2a2118;
  --ink-soft: #6b5d4f;
  --plum: #6d2545;
  --plum-dark: #521a34;
  --blush: #f3dade;
  --gold: #c8a04a;
  --line: #e8ded1;
  --ok: #2f7d5d;
  --no: #b23b46;
  --shadow: 0 1px 2px rgba(42, 33, 24, .05), 0 8px 24px -12px rgba(42, 33, 24, .18);
  --shadow-lg: 0 2px 4px rgba(42, 33, 24, .06), 0 24px 48px -20px rgba(42, 33, 24, .28);
  --r: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
p { margin: 0 0 1em; }
a { color: var(--plum); }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(640px, 100% - 2rem); margin-inline: auto; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 600;
  padding: .95rem 1.9rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--plum); color: #fff; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 6px 18px -8px rgba(109, 37, 69, .6);
}
.btn:hover { background: var(--plum-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: #fff; border-color: var(--plum); }
.btn-lg { font-size: 1.1rem; padding: 1.1rem 2.4rem; }

/* --- quiz engine --- */
.quiz {
  position: relative; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
  max-width: 460px; margin-inline: auto;
}
.quiz-inner { padding: 2rem 1.6rem 1.8rem; text-align: center; min-height: 430px; display: flex; flex-direction: column; justify-content: center; }
.quiz-rule { height: 3px; background: linear-gradient(90deg, var(--blush), var(--gold), var(--blush)); }

.q-eyebrow { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .9rem; }
.q-title { font-family: var(--serif); font-size: 1.75rem; line-height: 1.25; margin-bottom: 1.6rem; }
.q-names { font-family: var(--serif); font-size: 2.1rem; color: var(--plum); margin: .3rem 0 .2rem; }
.q-amp { color: var(--gold); font-style: italic; }

.q-progress { display: flex; gap: 5px; justify-content: center; margin-bottom: 1.4rem; }
.q-dot { width: 22px; height: 3px; border-radius: 2px; background: var(--line); transition: background .3s; }
.q-dot.done { background: var(--plum); }
.q-dot.now { background: var(--gold); }

.q-opts { display: grid; gap: .7rem; }
.opt {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600;
  padding: 1.05rem 1rem; border-radius: var(--r); border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; position: relative;
  transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover:not(:disabled) { border-color: var(--plum); transform: translateY(-1px); }
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--ok); background: #eef7f2; color: var(--ok); }
.opt.wrong { border-color: var(--no); background: #fdf0f1; color: var(--no); }
.opt-mark { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; }

.q-verdict { font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin-top: 1.1rem; min-height: 1.6em; }
.q-verdict.right { color: var(--ok); }
.q-verdict.wrong { color: var(--no); }

.q-score { font-family: var(--serif); font-size: 4.5rem; line-height: 1; color: var(--plum); }
.q-score small { font-size: 1.5rem; color: var(--ink-soft); }
.q-rank { font-family: var(--serif); font-size: 1.6rem; margin: .6rem 0 .3rem; }
.q-blurb { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.5rem; }

.field {
  width: 100%; font-family: var(--sans); font-size: 1rem; padding: .85rem 1rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.field:focus { outline: none; border-color: var(--plum); }

.watermark {
  position: absolute; top: 12px; right: -34px; transform: rotate(38deg);
  background: var(--gold); color: #fff; font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; padding: .3rem 2.6rem; pointer-events: none; z-index: 3;
}

canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

.muted { color: var(--ink-soft); }
.center { text-align: center; }
