/* Night editorial, after DESIGN.md: black paper, one rose accent, Manrope, flat surfaces. */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(fonts/Manrope-400.ttf) format('truetype'); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(fonts/Manrope-600.ttf) format('truetype'); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(fonts/Manrope-700.ttf) format('truetype'); }

:root {
  --bg: #000000;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --surface-3: #272727;
  --border: #313131;
  --text: #ffffff;
  --text-2: #c4bdba;
  --text-3: #a39c99;
  --accent: #e1afae;
  --accent-text: #181818;
  --danger: #ff8f84;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-card: 24px; --r-ctl: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell { max-width: 480px; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

.top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: var(--s2);
  padding: var(--s3) var(--s4) var(--s2); }
.brand { font-weight: 700; letter-spacing: 0.02em; text-align: center; }
.back { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.back:active { background: var(--surface-2); }
.lang { display: flex; gap: 2px; background: var(--surface); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; color: var(--text-3); min-width: 44px; min-height: 36px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.lang button[aria-pressed='true'] { background: var(--surface-3); color: var(--text); }

.progress { height: 2px; margin: 0 var(--s4); background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--accent); transform-origin: left; transition: width 400ms var(--ease); }

main { flex: 1; display: flex; flex-direction: column; outline: none; }
.screen { flex: 1; display: flex; flex-direction: column; padding: var(--s5) var(--s4) 0; animation: enter 320ms var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

h1 { font-size: 28px; line-height: 1.2; font-weight: 700; margin: 0 0 var(--s2); letter-spacing: -0.01em; outline: none; text-wrap: balance; }
.sub { margin: 0 0 var(--s5); color: var(--text-2); font-size: 15px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 var(--s2); }

.options { display: flex; flex-direction: column; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.opt { width: 100%; text-align: left; display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s3) var(--s4);
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-ctl); transition: border-color 200ms, background 200ms; }
.opt:active { transform: scale(0.985); }
.opt .label { flex: 1; font-weight: 600; }
.opt .desc { display: block; font-weight: 400; font-size: 13px; color: var(--text-3); }
.opt .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: grid; place-items: center; transition: background 200ms, border-color 200ms; }
.multi .opt .mark { border-radius: 8px; }
.opt[aria-checked='true'] { border-color: var(--accent); background: var(--surface-2); }
.opt[aria-checked='true'] .mark { background: var(--accent); border-color: var(--accent); }
.opt .mark svg { opacity: 0; width: 14px; height: 14px; }
.opt[aria-checked='true'] .mark svg { opacity: 1; }
.swatches { display: flex; flex: none; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); margin-left: -6px; }
.swatches i:first-child { margin-left: 0; }

.cta-bar { position: sticky; bottom: 0; margin: auto calc(-1 * var(--s4)) 0; padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); background: var(--bg); }
.hint { min-height: 20px; margin: 0 0 var(--s2); text-align: center; color: var(--text-3); font-size: 13px; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 var(--s5); border: 0; border-radius: var(--r-ctl);
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 16px; text-decoration: none; transition: opacity 200ms, transform 200ms var(--ease); }
.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: 0.35; cursor: default; }
.btn.is-busy { opacity: 0.6; pointer-events: none; }

a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* landing hero */
.hero { position: relative; margin: 0 0 var(--s5); border-radius: var(--r-card); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.28); }

/* profile card (interlude and result) */
.card { background: var(--surface); border-radius: var(--r-card); padding: var(--s5); margin: 0 0 var(--s4); }
.card h2 { margin: 0 0 var(--s1); font-size: 24px; line-height: 1.2; }
.card .row { margin-top: var(--s4); }
.card .row b { display: block; margin-bottom: var(--s2); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--surface-3); font-size: 14px; font-weight: 600; }
.palette { display: flex; gap: var(--s2); }
.palette i { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); }
.note { color: var(--text-2); font-size: 14px; margin: var(--s3) 0 0; }

/* form */
.field { margin: 0 0 var(--s3); }
.field label.t { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 var(--s1); }
.input { width: 100%; min-height: 56px; padding: 0 var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); color: var(--text); outline: none; font-size: 16px; }
.input:focus { border-color: var(--accent); }
.input[aria-invalid='true'] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; margin: var(--s1) 0 0; min-height: 0; }
.check { display: flex; gap: var(--s3); align-items: flex-start; margin: var(--s3) 0; font-size: 14px; color: var(--text-2); }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--accent); }
.check span { padding-top: 2px; }
.form-err { color: var(--danger); font-size: 14px; margin: var(--s3) 0 0; }

/* analysis */
.analysis { align-items: center; justify-content: center; text-align: center; }
.analysis .meter { width: 100%; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: var(--s5) 0 var(--s4); }
.analysis .meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 900ms linear; }
.analysis .step { min-height: 24px; color: var(--text-2); }

.legal { padding: var(--s5) var(--s4) var(--s5); text-align: center; font-size: 12px; color: var(--text-3); }
.legal a { color: var(--text-3); margin: 0 var(--s2); }
.noscript { padding: var(--s5); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .bar, .opt, .btn, .analysis .meter i { transition: none; }
}
@media (min-width: 560px) { .shell { padding-top: var(--s5); } h1 { font-size: 32px; } }
.screen-form { flex: 1; display: flex; flex-direction: column; }
