/* Aligned with the Wresonate website refresh v2: Plus Jakarta Sans, forest green,
   terracotta pink accents on green, blush pills, rounded pill buttons. */
:root {
  --forest: #1c412d;
  --forest-deep: #12301f;
  --ink: #10261b;
  --ink-2: #2e4a3c;
  --muted: #5f7468;
  --line: #d2ddd6;
  --sage: #e8eee8;
  --white: #ffffff;
  --terracotta: #dc9696;      /* accent on forest */
  --terracotta-deep: #a4524a; /* accessible terracotta on white */
  --blush: #f6e3df;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--white); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; transition: background 0.4s; }
body.dark { background: var(--forest); color: var(--white); }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 var(--gutter); }

/* ── Top bar ─────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--white); margin: 0 calc(var(--gutter) * -1); padding: 14px var(--gutter) 0; transition: background 0.4s; }
body.dark .topbar { background: var(--forest); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.back, .step-count { width: 48px; }
.back { height: 40px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: inherit; margin-left: -10px; border-radius: 50%; }
.back:hover { background: var(--sage); }
.step-count { text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); }
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--forest); line-height: 1; }
.wordmark sup { font-size: 9px; font-weight: 700; margin-left: 1px; }
body.dark .wordmark { color: var(--white); }
.progress { height: 4px; background: var(--sage); margin-top: 12px; border-radius: 4px; overflow: hidden; }
body.dark .progress { background: rgba(255, 255, 255, 0.14); }
.progress span { display: block; height: 100%; width: 0; background: var(--forest); border-radius: 4px; transition: width 0.45s ease; }

/* ── Screens ─────────────────────────────── */
main { flex: 1; display: flex; }
.screen { flex: 1; display: flex; flex-direction: column; padding: 20px 0 28px; animation: enter 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pill { align-self: flex-start; display: inline-block; background: var(--forest); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; margin: 0 0 16px; }
.pill.soft { background: var(--blush); color: var(--ink); }
.pill.on-dark { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.copy { display: flex; flex-direction: column; }
h1, h2, h3 { font-weight: 800; margin: 0; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(38px, 10.5vw, 52px); line-height: 1.06; }
h2 { font-size: clamp(28px, 7.6vw, 36px); line-height: 1.12; letter-spacing: -0.02em; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--forest); }
body.dark h1 em, body.dark h2 em, .on-forest em { color: var(--terracotta); }
.sub { color: var(--ink-2); margin: 12px 0 0; font-size: 16px; }
.fine { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 0; }
.fine.left { text-align: left; }
.actions { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 6px; }

/* ── Buttons (pills, like the website) ─────── */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 16px; transition: background 0.2s, transform 0.12s; }
.btn:active { transform: scale(0.99); }
.btn.primary { background: var(--forest); color: var(--white); }
.btn.primary::after { content: "→"; transition: transform 0.2s; }
.btn.primary:hover { background: var(--forest-deep); }
.btn.primary:hover::after { transform: translateX(3px); }
.btn.primary:disabled { background: #c3cec7; cursor: not-allowed; }
.btn.light { background: var(--white); color: var(--forest); }
.btn.light::after { content: "→"; }
.btn.ghost { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn.link { background: none; color: var(--muted); font-weight: 600; font-size: 15px; min-height: 44px; }
.btn.link:hover { color: var(--forest); }

/* ── Fields ─────────────────────────────── */
.fields { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span:first-child { font-size: 14px; font-weight: 700; color: var(--ink); }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--line); background: var(--white); border-radius: 16px; padding: 15px 18px; font-size: 16px; outline: none; resize: none; transition: border-color 0.15s, box-shadow 0.15s; }
.field input:focus, .field textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(28, 65, 45, 0.12); }
.field input::placeholder, .field textarea::placeholder { color: #93a39a; }
.field.handle { flex-direction: row; align-items: center; position: relative; }
.field.handle .at { position: absolute; left: 18px; font-size: 18px; color: var(--forest); font-weight: 700; }
.field.handle input { padding-left: 42px; font-size: 18px; }
.hp { position: absolute; left: -9999px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest); flex: none; }

/* ── Options ─────────────────────────────── */
.options { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 17px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-size: 16px; font-weight: 600; transition: border-color 0.15s, background 0.15s; }
.option:hover { border-color: #a9bbb0; }
.option .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #a9bbb0; flex: none; display: grid; place-items: center; transition: all 0.15s; }
.options.multi .option .tick { border-radius: 7px; }
.option[aria-checked="true"] { border-color: var(--forest); background: var(--sage); }
.option[aria-checked="true"] .tick { background: var(--forest); border-color: var(--forest); }
.option[aria-checked="true"] .tick::after { content: ""; width: 10px; height: 5px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

/* ── Intro ─────────────────────────────── */
.intro .lede { font-size: 17px; color: var(--ink-2); margin: 16px 0 0; }
.wave { display: block; width: 100%; height: 50px; margin: 18px 0 2px; overflow: visible; }
.wave path { fill: none; stroke-linecap: round; }
.wave-flat { stroke: var(--line); stroke-width: 1.5; }
.wave-live { stroke: var(--terracotta); stroke-width: 2.5; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 2.2s 0.3s cubic-bezier(0.6, 0, 0.2, 1) forwards, breathe 4s 2.5s ease-in-out infinite; transform-origin: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }
.promise { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.promise li { display: flex; gap: 14px; align-items: flex-start; background: var(--sage); border-radius: 18px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.promise li span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--white); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.promise b { display: block; color: var(--ink); font-weight: 800; font-size: 15px; }

/* ── Scanning (forest) ─────────────────────── */
.scan { color: var(--white); padding-top: 22px; }
.scan .pill { align-self: center; }
.scan-visual { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.avatar { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; position: relative; background: rgba(255, 255, 255, 0.1); border: 2px solid var(--terracotta); font-size: 44px; font-weight: 800; color: var(--white); }
.avatar::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1.5px solid var(--terracotta); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.92); opacity: 0.8; } to { transform: scale(1.2); opacity: 0; } }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.scan-handle { font-weight: 800; font-size: 17px; margin: 20px 0 0; }
.scan-stats { display: flex; justify-content: center; gap: 8px; margin-top: 12px; min-height: 58px; flex-wrap: wrap; }
.scan-stats div { text-align: center; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); animation: enter 0.4s; }
.scan-stats b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.scan-stats span { font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.scope { display: block; width: 100%; height: 56px; margin: 16px 0 4px; overflow: visible; }
.scope path { fill: none; stroke: var(--terracotta); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 90 610; animation: travel 2s linear infinite; }
@keyframes travel { from { stroke-dashoffset: 700; } to { stroke-dashoffset: 0; } }
.thumbs { display: flex; justify-content: center; gap: 8px; }
.thumbs .t { width: 54px; height: 66px; border-radius: 10px; background-size: cover; background-position: center; border: 2px solid rgba(255, 255, 255, 0.3); opacity: 0; animation: enter 0.5s forwards; }
.thumbs .t:nth-child(2) { animation-delay: 0.15s; }
.thumbs .t:nth-child(3) { animation-delay: 0.3s; }
.thumbs .t:nth-child(4) { animation-delay: 0.45s; }
.scan-progress { margin-top: 14px; }
.pct { font-size: 60px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; text-align: center; }
.pct small { font-size: 28px; color: var(--terracotta); margin-left: 2px; }
.bar { height: 6px; background: rgba(255, 255, 255, 0.14); margin: 16px 0 18px; border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--terracotta); border-radius: 6px; transition: width 0.4s ease; }
.scan-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; min-height: 120px; }
.scan-log li { font-size: 15px; color: var(--white); display: flex; gap: 12px; align-items: center; animation: enter 0.35s; }
.scan-log li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: var(--terracotta); animation: spin 0.8s linear infinite; }
.scan-log li.done { color: rgba(255, 255, 255, 0.7); }
.scan-log li.done::before { border: 0; background: var(--terracotta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231c412d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results ─────────────────────────────── */
.results { padding-bottom: 40px; }
.r-head { display: flex; flex-direction: column; margin-top: 4px; }
.r-head .who { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.r-head .who img, .r-head .who .mini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--sage); }
.r-head h2 { margin-top: 14px; }
.r-head .date { font-size: 13px; color: var(--muted); margin-top: 6px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 24px 22px; margin-top: 16px; }
.card h3 { font-size: 23px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -0.02em; }
.card .kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--blush); padding: 6px 12px; border-radius: 999px; margin: 0 0 14px; }
.card p { margin: 10px 0 0; color: var(--ink-2); }

.score-card { background: var(--forest); color: var(--white); border: 0; text-align: center; padding: 28px 22px 24px; }
.score-card .kicker { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.dial { position: relative; width: 180px; height: 180px; margin: 4px auto 0; }
.dial svg { transform: rotate(-90deg); }
.dial .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial .num { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.dial .of { font-size: 12px; color: rgba(255, 255, 255, 0.72); font-weight: 600; margin-top: 4px; }
.score-label { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; background: var(--terracotta); color: var(--forest-deep); }
.score-card .headline { font-size: 21px; font-weight: 800; font-style: italic; line-height: 1.35; letter-spacing: -0.01em; color: var(--white); margin: 16px auto 0; max-width: 28ch; }
.subs { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.16); text-align: left; display: flex; flex-direction: column; gap: 18px; }
.sub-row .top { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.sub-row .top span:last-child { color: var(--terracotta); font-weight: 800; }
.sub-row .track { height: 6px; background: rgba(255, 255, 255, 0.14); margin-top: 7px; border-radius: 6px; overflow: hidden; }
.sub-row .fill { height: 100%; width: 0; background: var(--terracotta); border-radius: 6px; transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.sub-row .note { font-size: 14px; color: rgba(255, 255, 255, 0.78); margin-top: 7px; line-height: 1.5; }

.gap-split { display: grid; gap: 10px; margin-top: 14px; }
.gap-split > div { padding: 16px 18px; border-radius: 16px; }
.gap-split .said { background: var(--sage); }
.gap-split .sees { background: var(--forest); color: var(--white); }
.gap-split b { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; font-weight: 700; }
.gap-split .said b { color: var(--forest); }
.gap-split .sees b { color: var(--terracotta); }
.gap-split p { margin: 0; color: inherit; font-size: 17px; font-weight: 600; line-height: 1.45; }

.gap-item { display: grid; grid-template-columns: 40px 1fr; gap: 6px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.gap-item:first-of-type { border-top: 0; margin-top: 4px; padding-top: 4px; }
.gap-item .n { width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--white); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.gap-item h4 { margin: 3px 0 0; font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; }
.gap-item p { font-size: 15px; }
.gap-item .cost { color: var(--terracotta-deep); font-weight: 600; }
.gap-item .cost::before { content: "The cost: "; font-weight: 800; }

.opportunity { background: var(--forest); color: var(--white); border: 0; position: relative; overflow: hidden; }
.opportunity .kicker { background: var(--terracotta); color: var(--forest-deep); }
.opportunity h3 { color: var(--white); }
.opportunity p { color: rgba(255, 255, 255, 0.86); }
.opportunity svg.bg-wave { position: absolute; right: -20px; top: 22px; width: 42%; opacity: 0.5; }
.opportunity > *:not(svg) { position: relative; }

.idea { border-top: 1px solid var(--line); padding: 16px 0 2px; margin-top: 12px; }
.idea:first-of-type { border-top: 0; padding-top: 4px; margin-top: 4px; }
.idea .fmt { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--sage); color: var(--forest); }
.idea .hook { font-size: 19px; font-weight: 800; font-style: italic; line-height: 1.35; letter-spacing: -0.01em; margin: 10px 0 0; color: var(--forest); }
.idea p { font-size: 15px; }

.explore .ex-item { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); }
.explore .ex-item:first-of-type { border-top: 0; margin-top: 4px; padding-top: 4px; }
.explore .ex-item .star { color: var(--terracotta); font-size: 16px; line-height: 1.5; }
.explore .ex-item h4 { margin: 0; font-size: 16px; font-weight: 800; }
.explore .ex-item p { font-size: 15px; margin-top: 4px; }

.keep-card { background: var(--sage); border: 0; }
.keep-card h3 em { color: var(--forest); }
.keep-card .btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.keep-card .fine { text-align: left; }

.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 10px 0 24px; }
.foot a { color: inherit; }
body.dark .foot { color: rgba(255, 255, 255, 0.5); }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .gap-split { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 760px) {
  h1 { font-size: 36px; }
  .intro .lede { font-size: 16px; margin-top: 12px; }
  .wave { height: 36px; margin: 12px 0 0; }
  .promise { gap: 8px; }
  .promise li { padding: 9px 14px; font-size: 13px; line-height: 1.4; }
  .promise li span { width: 26px; height: 26px; font-size: 12px; }
  .intro { padding-top: 10px; }
  .intro .pill { margin-bottom: 12px; }
  .actions { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wave-live { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .topbar, .foot, .keep-card .btns, .actions { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .card { break-inside: avoid; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
