/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface-brand-soft); background-image: radial-gradient(circle at 50% 0%, var(--surface-elevated), transparent 60%); color: var(--text-body); font-family: 'Inter', system-ui, sans-serif; font-size: 1.125rem; line-height: 1.5; }
.heading-style-h3 { font-family: 'Tilt Warp', system-ui, sans-serif; font-size: clamp(1.5rem, 3vw + 0.5rem, 2rem); line-height: 1.15; color: var(--text-primary); font-weight: 400; margin: 0; }
.text-link { color: var(--text-link); text-decoration: underline dotted; text-decoration-color: var(--text-muted); text-underline-offset: 3px; }
.text-link:hover { color: var(--text-link-hover); text-decoration-style: solid; }

/* Button atom (cloned from design system) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: 'Inter', sans-serif; font-size: 0.9375rem; font-weight: 400; padding: 0.75rem 1.5rem; border-radius: 0.75rem; border: 1px solid var(--color-scheme-1--fg_primary, var(--primitive-black)); background-color: var(--color-scheme-1--fg_primary, var(--surface-dark)); background-image: radial-gradient(circle farthest-corner at 50% -25%, rgba(255,255,255,0.4), rgba(255,255,253,0) 70%); box-shadow: 0 1px 3px rgba(10,13,18,0.10), inset 2px 2px 1px -2px var(--primitive-white); color: var(--color-scheme-1--bg_primary, #fff); text-align: center; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color 140ms var(--easing-standard, ease), transform 110ms var(--easing-standard, ease), filter 140ms var(--easing-standard, ease); }
.btn:hover { background-color: var(--color-scheme-1--fg_primary-hover, #000); color: var(--color-scheme-1--bg_primary, #fff); transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); filter: brightness(0.94); }
.btn.secondary { border-color: var(--color-scheme-1--border_primary, var(--border-default)); background-color: var(--color-scheme-1--bg_primary, var(--surface-default)); background-image: none; box-shadow: 0 1px 2px rgba(10,13,18,0.10); color: var(--color-scheme-1--text-secondary, var(--text-body)); }
.btn.secondary:hover { background-color: var(--color-scheme-1--bg_primary_hover, var(--primitive-n-50)); color: var(--color-scheme-1--text-secondary, var(--text-body)); }
.btn.lg { padding: 1rem 2rem; font-size: 1rem; }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* Chip atom (cloned from design system, id prefix removed) */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: transparent; border: 1px solid var(--border-default); font-family: 'Inter'; font-size: 0.9375rem; color: var(--text-body); cursor: pointer; transition: transform 120ms var(--easing-standard, ease), background-color 120ms, border-color 120ms; }
.chip.is-on { background: var(--surface-brand-soft); border-color: var(--primitive-brand-200); color: var(--color-scheme-1--text_brand_primary); font-weight: 500; }
.chip:active { transform: scale(0.95); }

/* Page layout */
.pulse { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1.5rem 1rem 2rem; }
.pulse-card { width: 100%; max-width: 34rem; padding: clamp(1.25rem, 5vw, 2.5rem); background: var(--surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-feature); box-shadow: 0 12px 40px rgba(10,13,18,0.08); }
.pulse-q { margin-bottom: 1.5rem; animation: rise 360ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.pulse-note { margin: -0.75rem 0 1.25rem; font-size: 0.875rem; color: var(--text-muted); }
.pulse-sub { margin: 0; color: var(--text-body); }
.pulse-noscript { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pulse-more { margin: 1rem 0 0; font-size: 0.8125rem; color: var(--text-muted); }
.pulse-foot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; max-width: 34rem; width: 100%; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; border-top: 1px solid var(--border-subtle); }
.pulse-foot__text { margin: 0; font-size: 0.75rem; color: var(--text-muted); opacity: 0.75; }
.pulse-foot__link { color: inherit; text-decoration: none; }
.pulse-foot__link:hover { text-decoration: underline; }

/* Scale */
.scale { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 0.6rem; align-items: center; justify-items: center; width: 100%; }
.scale.is-nps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.4rem; justify-items: stretch; }
@media (min-width: 560px) {
  .scale.is-nps { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0.3rem; }
}
.opt { position: relative; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-default); background: var(--surface-elevated); color: var(--text-primary); border-radius: 1rem; cursor: pointer; padding: 0; box-shadow: 0 1px 2px rgba(10,13,18,0.08); transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 150ms, background-color 150ms, box-shadow 150ms; -webkit-tap-highlight-color: transparent; animation: pop-in 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.opt:hover, .opt:focus-visible { transform: translateY(-3px) scale(1.06); border-color: var(--border-strong); box-shadow: 0 6px 16px rgba(10,13,18,0.10); }
.opt:focus-visible { outline: 3px solid var(--border-brand); outline-offset: 3px; }
.opt:active { transform: scale(0.92); }
.opt:disabled { cursor: default; opacity: 0.7; pointer-events: none; }
.opt.is-face { width: 100%; aspect-ratio: 1; max-width: 5.25rem; border: 0; background: transparent; box-shadow: none; border-radius: 50%; }
.opt.is-thumb { width: 100%; aspect-ratio: 1; max-width: 8rem; }
.opt.is-star { width: 100%; aspect-ratio: 1; border: 0; background: transparent; box-shadow: none; }
.opt.is-nps { width: 100%; aspect-ratio: 1; min-width: 0; border-radius: 0.5rem; font-family: 'Inter'; font-weight: 600; font-size: 0.9375rem; }
.opt svg { width: 62%; height: 62%; display: block; }
.opt.is-thumb svg { width: 55%; height: 55%; stroke: var(--text-primary); fill: none; }
.opt.is-star svg { width: 100%; height: 100%; fill: var(--border-default); transition: fill 120ms, transform 150ms; }
.opt.is-thumb.is-up:hover svg { stroke: var(--text-success); }
.opt.is-thumb.is-down:hover svg { stroke: var(--text-error); }
.opt.is-star.is-lit svg { fill: var(--color-scheme-1--fg_brand_primary); }
.opt.is-nps.is-lit { background: var(--surface-brand-soft); border-color: var(--border-brand); color: var(--color-scheme-1--text_brand_primary); }
.opt.is-picked { border-color: var(--border-brand); background: var(--surface-brand-soft); animation: pop 520ms cubic-bezier(0.34, 1.56, 0.64, 1), ring 500ms ease-out; }
.opt.is-picked.is-thumb svg { stroke: var(--color-scheme-1--fg_brand_primary); }

/* Custom faces: colour and motion from the owner's Neon Feedback Face design */
.face-1 { --hue: oklch(0.52 0.17 25); --blink-delay: 0s; }
.face-2 { --hue: oklch(0.52 0.17 55); --blink-delay: 1.3s; }
.face-3 { --hue: oklch(0.52 0.17 90); --blink-delay: 2.4s; }
.face-4 { --hue: oklch(0.52 0.17 148); --blink-delay: 3.1s; }
.face-5 { --hue: oklch(0.52 0.17 165); --blink-delay: 4.4s; }
.opt.is-face { --idle: oklch(0.72 0.01 260); --glow: drop-shadow(0 0 6px color-mix(in oklch, currentColor 50%, transparent)); position: relative; color: var(--idle); transition: color 0.25s; animation: pop-in 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.opt.is-face:hover, .opt.is-face:focus-visible, .opt.is-face.is-picked { color: var(--hue); transform: none; box-shadow: none; }
.opt.is-face:focus-visible { outline: 3px solid var(--border-brand); outline-offset: 3px; }
.opt.is-face::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; opacity: 0; pointer-events: none; }
.opt.is-face.is-picked { animation: none; }
.opt.is-face.is-picked::before { animation: ringPulse 0.7s ease-out both; }
.opt.is-face svg { width: 100%; height: 100%; display: block; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s; }
.opt.is-face:hover svg, .opt.is-face:focus-visible svg { transform: translateY(-4px) scale(1.08); filter: var(--glow); }
.opt.is-face.is-picked svg { transform: scale(1.15); filter: var(--glow); animation: facePop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.face__disc { opacity: 0; transition: opacity 0.3s; }
.opt.is-face:hover .face__disc { opacity: 0.08; }
.opt.is-face.is-picked .face__disc { opacity: 0.16; }
.face__eyes { transform-box: fill-box; transform-origin: 50% 50%; will-change: transform; }
.opt.is-face .face__eyes { animation: faceBlink 5.2s var(--blink-delay, 0s) infinite; }
.face__mouth { transform-origin: 24px 30px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.opt.is-face:hover:not(.is-picked) .face__mouth { transform: scaleX(1.12) scaleY(1.2); }
.said svg[class^="face-"] { color: var(--hue); }
.said svg .face__disc { opacity: 0.12; }
@keyframes facePop { 0% { transform: scale(1); } 40% { transform: scale(1.28) rotate(-6deg); } 70% { transform: scale(1.1) rotate(4deg); } 100% { transform: scale(1.15) rotate(0); } }
@keyframes ringPulse { 0% { transform: scale(0.7); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes faceBlink {
  0%, 95.2% { transform: scaleY(1); animation-timing-function: cubic-bezier(0.4, 0, 1, 1); }
  96.9%, 97.7% { transform: scaleY(0.08); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
  100% { transform: scaleY(1); }
}
.scale-ends { display: flex; justify-content: space-between; width: 100%; font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1.06); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes ring { from { box-shadow: 0 0 0 0 var(--border-brand); } to { box-shadow: 0 0 0 14px transparent; } }

/* Confetti */
.confetti { position: fixed; left: 0; top: 0; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 10; background: var(--color-scheme-1--bg_brand_solid); }
.confetti:nth-child(3n) { background: var(--border-brand); border-radius: 50%; }
.confetti:nth-child(4n) { background: var(--text-primary); }

/* Follow-up */
.said { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.9rem 0.4rem 0.6rem; border-radius: 99px; border: 1px solid var(--border-default); background: var(--surface-muted); font-size: 0.9375rem; color: var(--text-primary); margin-bottom: 1.5rem; }
.said svg { width: 1.5rem; height: 1.5rem; }
.said__num { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 0.4rem; border: 1px solid var(--border-brand); background: var(--surface-brand-soft); color: var(--color-scheme-1--text_brand_primary); font-size: 0.8125rem; font-weight: 600; }
.said svg.icon-thumb { stroke: var(--text-primary); fill: none; }
.said svg.icon-star { fill: var(--color-scheme-1--fg_brand_primary); }
.said .link-btn { background: none; border: 0; padding: 0; color: var(--text-link); font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.followup { display: flex; flex-direction: column; gap: 1.25rem; text-align: left; }
.followup > * { animation: rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.followup > :nth-child(2) { animation-delay: 60ms; }
.followup > :nth-child(3) { animation-delay: 120ms; }
.followup > :nth-child(4) { animation-delay: 180ms; }
.followup > :nth-child(5) { animation-delay: 240ms; }
.followup > :nth-child(6) { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.label { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--text-primary); margin-bottom: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.comment { width: 100%; min-height: 6.5rem; padding: 0.875rem 1rem; border: 1px solid var(--border-default); border-radius: var(--radius-input, 8px); background: var(--surface-elevated); color: var(--text-primary); font: inherit; font-size: 1rem; resize: vertical; }
.comment:focus { outline: 2px solid var(--border-brand); outline-offset: 1px; border-color: var(--border-brand); }
.toggle { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.9375rem; color: var(--text-primary); }
.toggle input { appearance: none; width: 2.75rem; height: 1.6rem; border-radius: 99px; background: var(--border-strong); position: relative; transition: background-color 160ms; cursor: pointer; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: calc(1.6rem - 6px); height: calc(1.6rem - 6px); border-radius: 50%; background: #fff; transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.toggle input:checked { background: var(--color-scheme-1--bg_brand_solid); }
.toggle input:checked::after { transform: translateX(1.15rem); }
.actions { display: flex; align-items: center; gap: 1rem; justify-content: center; }
.btn.is-ready { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 1px 3px rgba(10,13,18,0.10); } 50% { box-shadow: 0 0 0 6px rgba(227,27,84,0.14), 0 1px 3px rgba(10,13,18,0.10); } }
.error { color: var(--text-error); font-size: 0.9375rem; margin: 0; }

/* Thanks */
.thanks { display: flex; flex-direction: column; align-items: center; gap: 1rem; animation: rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.tick { width: 4.5rem; height: 4.5rem; animation: tick-grow 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.tick circle { fill: var(--surface-brand-soft); stroke: var(--border-brand); stroke-width: 1.5; }
.tick path { fill: none; stroke: var(--color-scheme-1--fg_brand_primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 600ms 150ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tick-grow { from { transform: scale(0.6); } to { transform: scale(1); } }

/* Recording row */
.record { display: flex; flex-direction: column; gap: 0.75rem; }
.record .label { margin-bottom: 0; }
.record__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem 1.25rem; }
.record__chips { justify-content: flex-start; padding-top: 0.15rem; }
.record__slot:empty { display: none; }
.chip svg.icon-line { width: 1.05rem; height: 1.05rem; stroke: currentColor; fill: none; }
.chip[disabled] { cursor: default; opacity: 0.55; }
.chip .tick { width: 1.15rem; height: 1.15rem; }
.chip.is-attached { border-color: var(--text-success); background: var(--color-scheme-1--bg_success_primary); color: var(--text-success); font-weight: 500; }
.chip.is-attached[disabled] { opacity: 1; }
.chip.is-attached .tick circle { fill: none; stroke: var(--text-success); }
.chip.is-attached .tick path { stroke: var(--text-success); }

/* Offer badge */
.offer { display: flex; flex-direction: column; gap: 0.4rem; flex: 1 1 14rem; min-width: 13rem; max-width: 19rem; }
.offer__card { overflow: hidden; border: 1px solid var(--border-brand); border-radius: var(--radius-card); background: var(--surface-brand-soft); box-shadow: 0 2px 8px rgba(10,13,18,0.06); transition: background-color 220ms var(--easing-standard, ease), border-color 220ms var(--easing-standard, ease); }
.offer__ribbon { display: flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.3rem 0.6rem; background: var(--color-scheme-1--bg_brand_solid); color: var(--text-on-brand); font-size: 0.75rem; font-variant: all-small-caps; letter-spacing: 0.09em; line-height: 1.3; }
.offer__ribbon .tick { width: 0.95rem; height: 0.95rem; }
.offer__ribbon .tick circle { fill: none; stroke: var(--text-on-brand); }
.offer__ribbon .tick path { stroke: var(--text-on-brand); }
.offer__body { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.8rem 0.9rem 0.95rem; text-align: center; }
.offer__title { margin: 0; font-family: 'Tilt Warp', system-ui, sans-serif; font-weight: 400; font-size: 1.0625rem; line-height: 1.2; color: var(--text-primary); }
.offer__desc { margin: 0; font-size: 0.8125rem; line-height: 1.4; color: var(--text-body); }
.offer__value { display: inline-flex; align-items: center; padding: 0.15rem 0.65rem; border: 1px solid var(--border-brand); border-radius: var(--radius-pill); background: var(--surface-elevated); font-size: 0.75rem; font-weight: 500; color: var(--color-scheme-1--text_brand_primary); }
.offer.is-earned .offer__card { background: var(--color-scheme-1--bg_success_primary); border-color: var(--text-success); }
.offer.is-earned .offer__ribbon { background: var(--color-scheme-1--bg_success_solid); }
.offer.is-earned .offer__value { border-color: var(--text-success); color: var(--text-success); }

/* Recorder */
.recorder { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; padding: 0.9rem; border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-muted); animation: rise 320ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.recorder__stage { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; width: 100%; }
.recorder__stage:empty { display: none; }
.recorder__preview { display: block; width: 100%; height: auto; max-height: 60vh; border-radius: var(--radius-input, 8px); background: var(--surface-dark); object-fit: contain; }
.recorder__preview.is-live { transform: scaleX(-1); }
.recorder__audio { width: 100%; }
.recorder__wave { display: flex; align-items: center; justify-content: center; padding: 0.5rem 0; }
.recorder__dial { position: relative; display: grid; place-items: center; width: 3.75rem; height: 3.75rem; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring__track { stroke: var(--border-default); stroke-width: 4; }
.ring__arc { stroke: var(--color-scheme-1--bg_brand_solid); stroke-width: 4; transition: stroke-dashoffset 140ms linear; }
.recorder__count { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.recorder__msg { margin: 0; font-size: 0.875rem; color: var(--text-muted); text-align: center; }
.recorder__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; }

/* Video step */
.video-ask { display: flex; flex-direction: column; align-items: center; gap: 1.15rem; animation: rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.video-ask .offer { flex: none; width: 100%; max-width: 17rem; }
.video-ask .pulse-sub { font-size: 0.9375rem; color: var(--text-body); max-width: 24rem; }
.video-ask .actions { flex-wrap: wrap; }
.video-ask .record__slot { width: 100%; }
.btn svg.icon-line { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; }

/* Review ask */
.review-ask { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; width: 100%; margin-top: 0.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border-subtle); }
.review-ask__logo { display: block; height: 28px; width: auto; }
.review-ask__line { margin: 0; font-size: 0.9375rem; color: var(--text-body); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .confetti { display: none; }
}
