:root {
  --teal: #45716E;
  --teal-deep: #3a5f5c;
  --gold: #A38E69;
  --terracotta: #9C652E;
  --sage: #6E95A5;
  --text: #4E5152;
  --muted: #6b6e6f;
  --bg: #F9F9FA;
  --white: #fff;
  --line: #dfe3e2;
  --radius: 12px;
  --head: "Playfair Display", Georgia, serif;
  --body: "Montserrat", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: var(--head); font-style: normal; font-weight: 400; color: var(--teal-deep); line-height: 1.3; margin: 0; }
a { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
main { flex: 1; display: flex; flex-direction: column; outline: none; }
.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 24px 16px 40px; }

/* header */
.bar { background: var(--teal); padding: 14px 16px; display: flex; justify-content: center; }
.wordmark { height: 18px; width: auto; display: block; }

/* intro: teal with glass panel */
.screen-intro { flex: 1; background: var(--teal); display: flex; align-items: center; position: relative; overflow: hidden; }
.screen-intro::before {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px;
  background: url("/assets/Vesicos-Logo-Spiral-Light.png") no-repeat center / contain; opacity: .35; pointer-events: none;
}
.screen-intro .wrap { position: relative; }
.glass {
  background: rgba(249, 249, 250, 0.12);
  border: 1px solid rgba(249, 249, 250, 0.28);
  border-radius: 18px;
  padding: 32px 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--bg);
}
.glass h1, .glass h2 { color: var(--bg); }
.screen-intro h1 { font-size: 34px; margin-bottom: 16px; }
.screen-intro p { margin: 0 0 12px; }
.screen-intro .meta { font-size: 14px; opacity: .9; margin-bottom: 28px; }

/* buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font: 600 16px/1 var(--body);
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-light { background: var(--bg); color: var(--teal-deep); }
.btn-light:hover { box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.btn-teal { background: var(--teal); color: var(--white); width: 100%; }
.btn-teal:hover { background: var(--teal-deep); }
.btn-teal[disabled] { opacity: .6; cursor: wait; }
.back {
  appearance: none; background: none; border: 0; cursor: pointer; padding: 8px 0;
  font: 500 14px var(--body); color: var(--muted);
}
.back:hover { color: var(--teal-deep); }

/* question */
.view-intro { display: flex; }
.view-question .wrap { flex: 1; display: flex; flex-direction: column; }
.q-top { height: 40px; }
.q-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.q-body h2 { font-size: 23px; font-weight: 600; }
.options { display: grid; gap: 12px; }
.option {
  appearance: none; cursor: pointer; text-align: left;
  font: 400 15px/1.55 var(--body); color: var(--text);
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; min-height: 52px;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: rgba(69, 113, 110, .45); }
.option[aria-pressed="true"] { border-color: var(--teal); background: rgba(69, 113, 110, .08); }
.progress { margin-top: 28px; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); }
.track { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.track span { display: block; height: 100%; background: var(--teal); transition: width .3s ease; }

/* capture */
.view-capture h2 { font-size: 26px; margin: 16px 0 8px; }
.view-capture p.lead { margin: 0 0 24px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 16px var(--body); color: var(--text);
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
}
.field input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(110,149,165,.35); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; margin: 8px 0 24px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--terracotta); font-size: 14px; font-weight: 500; min-height: 22px; margin: 0 0 8px; }

/* result */
.view-result h1 { font-size: 30px; text-align: center; margin: 8px 0 8px; }
.tri { display: block; width: 100%; max-width: 320px; margin: 0 auto; }
.tri .grid { fill: none; stroke: #c9cfce; stroke-width: .6; }
.tri .outer { fill: none; stroke: var(--teal-deep); stroke-width: 2; }
.tri .shape { fill: rgba(69, 113, 110, .2); stroke: var(--teal); stroke-width: 2; }
.tri .dot { fill: var(--gold); stroke: var(--white); stroke-width: 1.5; }
.tri text { font: 600 13px var(--body); fill: var(--teal-deep); letter-spacing: .08em; }
.tri .shape, .tri .dot { animation: grow .9s ease both; transform-origin: 150px 165px; }
@keyframes grow { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tri .shape, .tri .dot { animation: none; } }

.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 24px; text-align: center; }
.scores div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 4px; }
.scores b { display: block; font: 600 24px/1.2 var(--head); color: var(--teal-deep); }
.scores small { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.scores .low { border-color: var(--terracotta); }
.scores .low small { color: var(--terracotta); }
.lines { text-align: center; margin: 0 0 24px; }
.lines p { margin: 0; font-weight: 600; font-size: 16px; color: var(--teal-deep); }
.lines p:first-child { color: var(--terracotta); }
.headline { font: 400 20px/1.6 var(--head); color: var(--text); margin: 0 0 16px; }
.copy p { margin: 0 0 16px; }

.next { margin-top: 32px; background: var(--teal); background-image: linear-gradient(135deg, var(--teal), var(--teal-deep)); border-radius: 18px; padding: 4px; }
.next .glass { padding: 24px 20px; }
.next h2 { font-size: 24px; margin-bottom: 8px; }
.next h2::after { content: ""; display: block; width: 40px; height: 2px; background: var(--gold); margin-top: 10px; }
.next p { margin: 0 0 20px; }
.next a.secondary { color: var(--bg); font-weight: 500; font-size: 15px; }

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px; }
.footer a { color: var(--muted); }

@media (max-width: 639px) {
  .screen-intro::before { width: 240px; height: 240px; right: -80px; bottom: -80px; }
}

@media (min-width: 640px) {
  .wrap { padding-top: 40px; }
  .screen-intro h1 { font-size: 42px; }
  .glass { padding: 40px 36px; }
  .q-body h2 { font-size: 26px; }
}
