/* Still — web funnel. Tokens transcribed from src/constants/theme.ts (measured
   from the Figma). One column, 430px max (the Figma frame), full-bleed gradient. */

@font-face {
  font-family: "Kefir";
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/Kefir-Regular.woff2) format("woff2");
}
@font-face {
  font-family: "Kefir";
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/Kefir-DemiBold.woff2) format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/Baloo2_400Regular.woff2) format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/Baloo2_500Medium.woff2) format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/Baloo2_600SemiBold.woff2) format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/Baloo2_700Bold.woff2) format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/Manrope_400Regular.woff2) format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/Manrope_500Medium.woff2) format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/Manrope_600SemiBold.woff2) format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/Manrope_700Bold.woff2) format("woff2");
}

:root {
  color-scheme: light;
  --bg-top: #fffdf9;
  --bg-bottom: #ffebd3;
  --card: #ffffff;
  --frost: rgba(255, 249, 240, 0.85);
  --frost-white: rgba(255, 255, 255, 0.85);
  --ink: #2b231d;
  --ink-soft: #6e635c;
  --muted: #968a80;
  --terracotta: #c15c3d;
  --terracotta-soft: #faede4;
  --progress: #c56648;
  --track: #efe6dc;
  --divider: #efe6dc;
  --tag: #fdf0eb;
  --green: #557a69;
  --button: #3d3732;
  --serif: "Kefir", Georgia, "Times New Roman", serif;
  --baloo: "Baloo 2", "Trebuchet MS", "Segoe UI", sans-serif;
  --manrope: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --pad: 24px;
  --col: 430px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  /* gradient on the root so it spans the whole document, however long the
     screen gets; `fixed` attachment is unreliable on iOS Safari */
  background: var(--bg-bottom)
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) no-repeat;
}
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--manrope);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
h1,
h2,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}

/* ── screen frame: phone column, footer pinned at the bottom of the viewport ── */
.screen {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) var(--pad) 0;
}
.screen__body {
  flex: 1 0 auto;
  padding-bottom: 24px;
}
.screen__footer {
  flex: 0 0 auto;
  padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
}
.screen--center .screen__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ── flow header: back pill · wordmark · progress · step ── */
.flow {
  padding-top: 12px;
  margin-bottom: 16px;
}
.flow__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 8px;
  border-radius: 100px;
  background: var(--frost-white);
  border: 1px solid var(--track);
  text-decoration: none;
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.back--bare {
  background: transparent;
  border-color: transparent;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--terracotta);
}
.wordmark--sm {
  font-size: 20px;
}
.flow__track {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}
.flow__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--progress);
  transition: width 0.35s ease;
}
.flow__step {
  margin-top: 8px;
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}

/* ── type ── */
.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  margin: 20px 0 4px;
}
.title--lg {
  font-size: 22px;
  text-align: center;
  margin: 0 0 8px;
}
.sub {
  font-family: var(--manrope);
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.sub--baloo {
  font-family: var(--baloo);
  font-weight: 500;
  font-size: 15px;
}
.eyebrow {
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  border-radius: 27px;
  background: var(--button);
  color: #fff;
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(43, 35, 29, 0.04);
  transition:
    transform 0.08s ease,
    opacity 0.12s ease;
}
.btn:active {
  transform: scale(0.99);
  opacity: 0.9;
}
.btn[aria-disabled="true"] {
  opacity: 0.45;
}
.btn--sm {
  width: auto;
  height: 46px;
  padding: 0 20px;
  border-radius: 23px;
  font-size: 14px;
}
.link {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 12px 0;
  text-align: center;
  display: block;
}
.link--muted {
  color: var(--muted);
}
.link--xs {
  font-size: 12px;
  padding: 6px 0;
  display: inline;
}
.links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
}

/* ── cards ── */
.card {
  border-radius: 20px;
  padding: 20px;
  background: var(--card);
}
.card--frost {
  border-radius: 35px;
  background: var(--frost);
}
.card--frost-white {
  border-radius: 35px;
  background: var(--frost-white);
}
.card__title {
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

/* option card (single select) — terracotta fill when selected */
.option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.option:active {
  opacity: 0.92;
}
.option[aria-checked="true"] {
  background: var(--terracotta);
  color: #fff;
}
/* full-width select row (triggers, relapse) — same fill, semibold when selected */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.row[aria-checked="true"] {
  background: var(--terracotta);
  color: #fff;
  font-weight: 600;
}
.rows {
  display: grid;
  gap: 10px;
}

/* chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips--10 {
  gap: 10px;
}
.chip {
  border-radius: 20px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--track);
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  min-height: 40px;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.chip--tall {
  padding-top: 14px;
  padding-bottom: 14px;
}
.chip--noborder {
  border-color: transparent;
}
.chip--sm {
  padding: 8px 14px;
  font-weight: 500;
  font-size: 13px;
  min-height: 36px;
}
.chip[aria-checked="true"] {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}
.pill {
  height: 44px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid var(--track);
  background: var(--card);
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
}
.pill--fixed {
  flex: 1;
}
.pill[aria-checked="true"] {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}
.group + .group {
  margin-top: 16px;
}
.group__label {
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
}
.dashed {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--track);
  border-radius: 20px;
  padding: 16px;
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
}

/* inputs */
.field {
  display: block;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--track);
  border-radius: 20px;
  padding: 14px 16px;
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder {
  color: var(--muted);
}
.field:focus {
  border-color: var(--terracotta);
}
.field-label {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.error {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  color: var(--terracotta);
  margin-top: 8px;
}

/* ring row ("No loops identified") */
.ring-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--track);
  border-radius: 20px;
  padding: 16px;
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.ring {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  border: 2px solid var(--track);
  flex: none;
}
.ring-row[aria-checked="true"] .ring {
  border-width: 6px;
  border-color: var(--terracotta);
}

/* segmented pill (boundaries) */
.seg {
  display: inline-flex;
  gap: 4px;
  background: var(--track);
  border-radius: 20px;
  padding: 14px 16px;
  flex: none;
}
.seg__item {
  border-radius: 20px;
  padding: 6px 10px;
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink-soft);
}
.seg__item[aria-checked="true"] {
  background: var(--terracotta);
  color: #fff;
}
.boundary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 16px;
}
.boundary__label {
  flex: 1;
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

/* switch (intention) */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  margin-top: 10px;
  border-radius: 20px;
  background: var(--frost-white);
  padding: 16px;
}
.toggle__title {
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.toggle__sub {
  font-family: var(--manrope);
  font-size: 12px;
  color: var(--ink-soft);
}
.switch {
  width: 48px;
  height: 28px;
  border-radius: 20px;
  background: var(--track);
  padding: 2px;
  flex: none;
  display: flex;
}
.switch__thumb {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
  transition: transform 0.15s ease;
}
.toggle[aria-checked="true"] .switch {
  background: var(--terracotta);
}
.toggle[aria-checked="true"] .switch__thumb {
  transform: translateX(20px);
}

/* slider (check-in intensity) */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  margin: 10px 0 0;
}
.slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 100px;
  background: linear-gradient(
    90deg,
    var(--terracotta) var(--pct, 60%),
    var(--track) var(--pct, 60%)
  );
}
.slider::-moz-range-track {
  height: 10px;
  border-radius: 100px;
  background: var(--track);
}
.slider::-moz-range-progress {
  height: 10px;
  border-radius: 100px;
  background: var(--terracotta);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #fff;
  border: 3px solid var(--terracotta);
  margin-top: -5px;
}
.slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 10px;
  background: #fff;
  border: 3px solid var(--terracotta);
}
.intensity {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.intensity__label {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
}
.intensity__value {
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 13px;
  color: var(--terracotta);
}
.divider {
  height: 1px;
  background: var(--divider);
  margin: 16px 0;
}
.dontknow {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--track);
  border-radius: 20px;
  padding: 16px;
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
}
.dontknow[aria-checked="true"] {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

/* ── welcome ── */
.brand {
  text-align: center;
  margin: 96px 0 56px;
}
.brand__wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 40px;
  color: var(--terracotta);
  line-height: 1;
}
.brand__tagline {
  font-family: var(--baloo);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 8px;
}
.welcome__body {
  font-family: var(--baloo);
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 24px;
  margin-bottom: 40px;
}
.privacy-card {
  border-radius: 35px;
  background: #fff9f0;
  padding: 20px;
}
.privacy-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--green);
}
.privacy-card__body {
  font-family: var(--baloo);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-soft);
}

/* ── analysis ── */
.analysis__wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  color: var(--terracotta);
  margin-bottom: 24px;
}
.analysis__step {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  text-align: center;
  margin-bottom: 28px;
  padding: 0 24px;
  min-height: 1.4em;
  transition: opacity 0.2s ease;
}
.analysis__track {
  width: 220px;
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}
.analysis__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--progress);
  width: 4%;
  transition: width 6.8s ease-in-out;
}
.analysis__counter {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

/* ── result ── */
.result__title {
  margin-top: 40px;
  margin-bottom: 28px;
}
.result-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 35px;
  background: #fff9f0;
  opacity: 0.85;
}
.result-card .divider {
  margin: 0;
}
.result__value {
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 22px;
  color: var(--terracotta);
  margin-top: 6px;
}
.loop-tag {
  background: var(--tag);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 5px 11px;
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  color: var(--terracotta);
}
.result__analysis {
  font-family: var(--manrope);
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-soft);
  margin-top: 8px;
}
.result__bridge {
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  color: var(--ink);
  margin-top: 8px;
}
.stack-8 {
  display: grid;
  gap: 8px;
}
.stack-12 {
  display: grid;
  gap: 12px;
}

/* ── recap ── */
.recap-card {
  margin-bottom: 14px;
}
.recap-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.recap-card__title {
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.recap__edit {
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 13px;
  color: var(--terracotta);
  text-decoration: underline;
}
.recap__label {
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 4px;
}
.recap__value {
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.recap__row + .recap__row {
  margin-top: 12px;
}

/* ── soon ── */
.soon__title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 34px;
  color: var(--terracotta);
  margin: 36px 0 10px;
}
.soon__sub {
  font-family: var(--manrope);
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.benefits {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 35px;
  background: var(--frost);
  margin-bottom: 28px;
}
.benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--manrope);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.benefit svg {
  color: var(--terracotta);
  flex: none;
}
.soon__privacy {
  font-family: var(--manrope);
  font-size: 12px;
  line-height: 17px;
  color: var(--muted);
  text-align: center;
}
.done__badge {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: var(--terracotta-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
  margin-bottom: 20px;
}
.done__title {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 32px;
  color: var(--terracotta);
  margin-bottom: 10px;
  padding: 0 16px;
}
.done__body {
  font-family: var(--manrope);
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-soft);
  padding: 0 24px;
}

/* ── legal ── */
.legal {
  padding-bottom: 32px;
}
.legal__title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 34px;
  color: var(--terracotta);
  margin-top: 24px;
}
.legal__updated {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.legal__intro {
  font-family: var(--manrope);
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-soft);
  margin-top: 18px;
}
.legal__section {
  margin-top: 26px;
}
.legal__section h2 {
  font-family: var(--baloo);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 8px;
}
.legal__section p {
  font-family: var(--manrope);
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-soft);
}
.legal__contact {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-soft);
  margin-top: 34px;
}
.optout {
  margin-top: 14px;
}
.optout__done {
  background: var(--terracotta-soft);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 6px;
}
.optout__done p {
  font-family: var(--manrope);
  font-weight: 600;
  font-size: 13px;
  color: var(--terracotta);
}
.optout__done .link {
  display: inline;
  padding: 0;
  text-decoration: underline;
  font-size: 13px;
}

.fade-in {
  animation: fade 0.22s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
