/* Avaliação IF — identidade Dra. Débora */

@font-face {
  font-family: "Arsenica Demibold";
  src: url("../fonts/arsenica-demibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta inspo — #155553 · #EDBFB7 · #B35370 · #B66B8F · #A4B494 */
  --teal: #155553;
  --peach: #edbFB7;
  --rose: #b35370;
  --rose-light: #b66b8f;
  --sage: #a4b494;

  --accent: var(--teal);
  --accent-hover: #0f4442;
  --accent-light: #2a6b66;
  --accent-soft: rgba(21, 85, 83, 0.12);
  --accent-muted: rgba(21, 85, 83, 0.24);

  --fiql: var(--rose);
  --fiql-hover: #9a4560;
  --fiql-soft: rgba(179, 83, 112, 0.12);

  --combined: var(--sage);
  --combined-hover: #8fa07f;
  --combined-soft: rgba(164, 180, 148, 0.18);

  --bg: #faf7f5;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #1e3d39;
  --text-secondary: #4a6b66;
  --text-tertiary: #8a9e98;
  --border: #e8ddd8;
  --border-strong: #d4c8c0;
  --peach-soft: rgba(237, 191, 183, 0.35);
  --rose-pastel-top: #fffbfb;
  --rose-pastel-light: #fceff4;
  --rose-pastel: #f8e6ed;
  --rose-pastel-mid: #faebf0;
  --rose-pastel-blush: #f5e2ea;
  --rose-pastel-soft: #fdf6f9;
  --rose-pastel-cream: #fefafb;

  --home-gradient:
    linear-gradient(
      165deg,
      var(--rose-pastel-top) 0%,
      var(--rose-pastel-light) 12%,
      var(--rose-pastel-mid) 26%,
      var(--rose-pastel) 40%,
      var(--rose-pastel-blush) 52%,
      var(--rose-pastel-soft) 66%,
      var(--rose-pastel-cream) 80%,
      #ffffff 100%
    ),
    linear-gradient(
      215deg,
      rgba(246, 214, 224, 0.35) 0%,
      rgba(237, 191, 183, 0.14) 35%,
      transparent 68%
    ),
    linear-gradient(
      40deg,
      rgba(250, 228, 234, 0.4) 0%,
      rgba(182, 107, 143, 0.06) 45%,
      transparent 72%
    );

  --content-max: 1080px;
  --form-max: 720px;

  --error: #b91c1c;
  --error-soft: rgba(185, 28, 28, 0.06);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(21, 85, 83, 0.06);
  --shadow: 0 8px 32px rgba(21, 85, 83, 0.1);

  --font-display: "Arsenica Demibold", Georgia, "Times New Roman", serif;
  --font-body: "Open Sans", system-ui, -apple-system, sans-serif;
  --font-letter: "Open Sans", system-ui, -apple-system, sans-serif;
  --font: var(--font-body);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 56px;
  --footer-h: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
}

body.is-loading {
  overflow: hidden;
}

/* ─── Splash / carregamento ─── */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-top: calc(2rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(165deg, var(--peach-soft) 0%, var(--bg) 45%, #ffffff 100%);
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}

.splash--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: splash-in 0.6s var(--ease) both;
}

.splash__logo {
  width: clamp(7rem, 28vw, 10rem);
  height: auto;
  background: transparent;
  animation: splash-logo 2.4s ease-in-out infinite;
}

.splash__title {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.splash__loader {
  width: 2rem;
  height: 2rem;
  margin-top: 1.75rem;
  border: 3px solid var(--peach);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: splash-spin 0.85s linear infinite;
}

@keyframes splash-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-logo {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes splash-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash__inner,
  .splash__logo,
  .splash__loader {
    animation: none;
  }
}

#app {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#app.has-footer {
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
}

#app.is-welcome {
  max-width: 100%;
  box-shadow: none;
  background: var(--bg);
}

#app.is-home {
  background: var(--home-gradient);
}

#app.is-home .home {
  background: transparent;
}

/* ─── Idioma / i18n ─── */

.lang-switcher {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(182, 107, 143, 0.22);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(21, 85, 83, 0.08);
}

.lang-switcher--fixed {
  position: fixed;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  right: 0.75rem;
  z-index: 200;
}

.lang-switcher__btn {
  min-width: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-switcher__btn--on {
  background: var(--accent);
  color: #fff;
}

.lang-switcher__btn:hover:not(.lang-switcher__btn--on) {
  background: var(--rose-pastel-soft);
  color: var(--rose);
}

/* ─── Welcome (tela inicial) ─── */

.welcome {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--bg);
}

.welcome__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 26rem;
  margin: 0 auto;
  padding: calc(2.5rem + env(safe-area-inset-top, 0px)) 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.welcome__logo {
  width: clamp(6.5rem, 32vw, 8.75rem);
  height: auto;
  margin-bottom: 2rem;
  background: transparent;
}

.welcome__letter {
  width: 100%;
  font-family: var(--font-letter);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
}

.welcome__letter p {
  margin: 0 0 1.25rem;
}

.welcome__letter p:last-child {
  margin-bottom: 0;
}

.welcome__sign {
  margin: 2.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 0.02em;
}

.welcome__actions {
  flex-shrink: 0;
  padding: 1rem 1.75rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  max-width: 22rem;
  width: 100%;
  margin: 0 auto;
}

.welcome__btn {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(21, 85, 83, 0.22);
}

@media (min-width: 769px) {
  .welcome__content {
    max-width: 26rem;
    padding-top: 3rem;
  }

  .welcome__letter {
    font-size: 0.875rem;
    line-height: 1.85;
  }

  .welcome__actions {
    max-width: 26rem;
  }
}

html.is-native-app:not(.is-tablet) #app.is-welcome {
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  min-height: 100dvh;
}

html.is-native-app.is-tablet #app.is-welcome {
  background: var(--bg);
}

/* ─── Home ─── */

.home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto auto;
  min-height: 100dvh;
  gap: 0 3rem;
  background: var(--home-gradient);
}

.home__top {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0 2rem 3rem;
}

.home__body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3rem 2rem 0;
}

.home__nav {
  grid-column: 1 / -1;
  grid-row: 2;
}

.home__footer {
  grid-column: 1 / -1;
  grid-row: 3;
}

.fiql-page .stepper {
  padding-top: 0.5rem;
  padding-bottom: 0;
}

.home__logo {
  display: block;
  width: clamp(5.5rem, 18vw, 7.5rem);
  height: auto;
  margin-bottom: 1.25rem;
  background: transparent;
}

.home__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose-light);
  margin-bottom: 0.75rem;
}

.home__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--accent);
}

.home__tagline {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--rose);
  font-weight: 600;
}

.home__intro {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 36ch;
}

.home__privacy {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--peach);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.home__privacy svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--accent);
}

.home__label {
  margin: 0 0 0.75rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.mode-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mode-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
  box-shadow: var(--shadow-sm);
}

.mode-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.mode-card:active {
  transform: scale(0.99);
}

.mode-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mode-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.mode-card__body {
  flex: 1;
  min-width: 0;
}

.mode-card__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.mode-card__desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.mode-card__chevron {
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.mode-card:hover .mode-card__chevron {
  transform: translateX(2px);
}

.mode-card--wexner .mode-card__icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.mode-card--wexner:hover {
  border-color: var(--accent-muted);
}

.mode-card--wexner:hover .mode-card__chevron {
  color: var(--accent);
}

.mode-card--fiql .mode-card__icon {
  background: var(--fiql-soft);
  color: var(--fiql);
}

.mode-card--fiql:hover {
  border-color: rgba(179, 83, 112, 0.35);
}

.mode-card--fiql:hover .mode-card__chevron {
  color: var(--fiql);
}

.mode-card--combined .mode-card__icon {
  background: var(--combined-soft);
  color: var(--combined);
}

.mode-card--combined:hover {
  border-color: rgba(164, 180, 148, 0.55);
}

.mode-card--combined:hover .mode-card__chevron {
  color: var(--combined);
}

.home__nav {
  display: flex;
  gap: 0.75rem;
  margin: 0 3rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid rgba(182, 107, 143, 0.16);
}

.home__nav-btn {
  flex: 1;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(179, 83, 112, 0.28);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(179, 83, 112, 0.12);
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.home__nav-btn:hover {
  background: #ffffff;
  color: var(--rose);
  border-color: rgba(182, 107, 143, 0.45);
  box-shadow: 0 4px 18px rgba(179, 83, 112, 0.16);
}

.home__footer {
  padding: 1rem 3rem 2rem;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  margin: 0 3rem;
}

.home__footer p {
  margin: 0;
}

/* ─── Top bar (forms & subpages) ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0.75rem 2.5rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar--accent {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--accent-muted);
}

.topbar--fiql {
  border-bottom-color: rgba(179, 83, 112, 0.28);
}

.topbar__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.topbar__back:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.topbar__text {
  flex: 1;
  min-width: 0;
}

.topbar__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__sub {
  margin: 0.1rem 0 0;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.page-intro {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 0.75rem 2.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.45;
}

/* ─── FIQL stepper ─── */

.stepper {
  display: flex;
  gap: 0.375rem;
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 0.75rem 2.5rem 0;
}

.stepper__item {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.25s var(--ease);
}

.stepper__item--active {
  background: var(--fiql);
}

.stepper__item--done {
  background: var(--fiql);
  opacity: 0.45;
}

.domain-heading {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 0.375rem 2.5rem 0;
}

.fiql-page .domain-heading {
  padding-bottom: 0.5rem;
}

.domain-heading__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fiql);
}

.domain-heading__title {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ─── Content pages ─── */

.page-content {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 1rem 2.5rem 2.5rem;
}

.card {
  margin-bottom: 0.625rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.card--note {
  background: var(--peach-soft);
  border-color: var(--peach);
}

.card--note p {
  color: var(--text);
  font-size: 0.8125rem;
}

.help-list {
  margin: 0;
  padding-left: 1.125rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.help-list li {
  margin-bottom: 0.4rem;
}

.help-list li::marker {
  color: var(--accent);
}

/* ─── Forms ─── */

.form-body {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 1rem 2.5rem 6rem;
}

.q-card {
  margin-bottom: 0.75rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.q-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.q-card__index {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.q-card__index--fiql {
  color: var(--fiql);
}

.q-card__domain {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.q-card__title--fiql {
  font-size: 1.125rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.q-card--fiql-single {
  margin-bottom: 0;
  padding: 1.5rem 1.375rem;
}

.fiql-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.fiql-question {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: var(--form-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 2.5rem 1rem;
}

.option-list--fiql {
  gap: 0.5rem;
}

.option-list--fiql .option {
  padding: 1rem 1.125rem;
  font-size: 0.9375rem;
}

.q-card__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.q-card__hint {
  margin: 0.35rem 0 0.875rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* Wexner scale — segmented pills */
.scale-row {
  display: flex;
  gap: 0.35rem;
}

.scale-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.4rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-align: center;
  background: var(--bg);
}

.scale-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scale-pill:hover {
  border-color: var(--border-strong);
}

.scale-pill--on {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(21, 85, 83, 0.32);
}

.scale-pill--on .scale-pill__num,
.scale-pill--on .scale-pill__label,
.scale-pill--on .scale-pill__hint {
  color: #fff;
}

.scale-pill__num {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.scale-pill__label {
  margin-top: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  line-height: 1.15;
}

.scale-pill__hint {
  font-size: 0.5rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
  opacity: 0.85;
}

/* FIQL options */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8125rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg);
  transition: all 0.15s var(--ease);
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option__dot {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
  position: relative;
}

.option__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--fiql);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
}

.option--on {
  border-color: var(--fiql);
  background: var(--fiql-soft);
  color: var(--text);
}

.option--on .option__dot {
  border-color: var(--fiql);
}

.option--on .option__dot::after {
  transform: scale(1);
}

.option--na {
  border-style: dashed;
  opacity: 0.9;
}

.option--na.option--on {
  border-style: dashed;
}

/* ─── Sticky footer ─── */

.action-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--content-max);
  z-index: 100;
  padding: 1rem 2.5rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.action-bar__inner {
  max-width: var(--form-max);
  margin: 0 auto;
}

.action-bar__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.action-bar__actions .btn {
  width: auto;
  flex: 1;
  margin-top: 0;
}

.action-bar__actions .btn--ghost {
  flex: 0 0 auto;
  min-width: 10rem;
}

.action-bar__progress {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.action-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}

.action-bar__fill--fiql {
  background: var(--fiql);
}

.action-bar__label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.action-bar__error {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--error);
  padding: 0.5rem 0.625rem;
  background: var(--error-soft);
  border-radius: var(--radius-sm);
}

.btn {
  display: block;
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
}

.btn + .btn {
  margin-top: 0.5rem;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn--fiql {
  background: var(--fiql);
}

.btn--fiql:hover:not(:disabled) {
  background: var(--fiql-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Results ─── */

.results {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 1rem 2.5rem;
  display: grid;
  gap: 0.75rem;
}

.results--dual {
  max-width: var(--content-max);
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 2.5rem;
}

.results--dual .disclaimer,
.results--dual .card--note {
  grid-column: 1 / -1;
}

.result-card {
  margin-bottom: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.result-card__tag {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.result-card__score {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.result-card__num {
  font-family: var(--font-body);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.result-card__unit {
  font-size: 1rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.result-card__label {
  margin: 0.5rem 0 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.result-card__bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.result-card__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s var(--ease);
}

.result-card__bar-fill--perfect { background: #059669; }
.result-card__bar-fill--mild { background: #34d399; }
.result-card__bar-fill--moderate { background: #fbbf24; }
.result-card__bar-fill--severe { background: #f97316; }
.result-card__bar-fill--total { background: #dc2626; }

.result-card__note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.45;
}

.domain-chart {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.25rem;
}

.domain-chart__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  font-size: 0.75rem;
}

.domain-chart__name {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  line-height: 1.3;
}

.domain-chart__track {
  grid-column: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 0;
}

.domain-chart__fill {
  height: 100%;
  background: var(--fiql);
  border-radius: 3px;
  transition: width 0.4s var(--ease);
}

.domain-chart__val {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-body);
  font-weight: 700;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.disclaimer {
  margin: 0.5rem 0 0;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.45;
}

.results__actions {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 0 2.5rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.results__actions .btn {
  width: auto;
  flex: 1;
  min-width: 10rem;
  margin-top: 0;
}

.page-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ─── Responsivo (navegador mobile / tablet estreito) ─── */

@media (max-width: 768px) {
  .home {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .home__top,
  .home__body {
    grid-column: auto;
    grid-row: auto;
    padding: 1.5rem 1.25rem 0;
  }

  .home__title {
    font-size: 2rem;
  }

  .home__logo {
    width: 5rem;
    margin-bottom: 1rem;
  }

  .home__nav {
    margin: 0;
    padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(182, 107, 143, 0.16);
  }

  .home__footer {
    margin: 0;
    padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    border-top: none;
  }

  .topbar,
  .page-intro,
  .stepper,
  .domain-heading,
  .page-content,
  .form-body,
  .fiql-question,
  .results,
  .results--dual,
  .results__actions {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .form-body {
    padding-bottom: 7rem;
  }

  .results--dual {
    grid-template-columns: 1fr;
  }

  .results__actions {
    flex-direction: column;
  }

  .results__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .action-bar {
    padding: 0.75rem 1.25rem;
  }

  .action-bar__actions {
    flex-direction: column;
  }

  .action-bar__actions .btn,
  .action-bar__actions .btn--ghost {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 400px) {
  .scale-row {
    flex-wrap: wrap;
  }
  .scale-pill {
    min-width: calc(20% - 0.3rem);
  }
  .scale-pill__label {
    font-size: 0.5rem;
  }
}

@media (min-width: 769px) {
  body {
    background: var(--bg);
    padding: 1.5rem 1rem;
  }

  #app {
    min-height: calc(100dvh - 3rem);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── App Android (WebView) — mesmo visual do web mobile / tablet ─── */

html.is-native-app {
  -webkit-tap-highlight-color: transparent;
}

html.is-native-app body {
  background: var(--bg);
  overscroll-behavior: none;
}

html.is-native-app:not(.is-tablet) body {
  padding: 0;
}

html.is-native-app:not(.is-tablet) #app.is-home {
  background: var(--home-gradient);
}

html.is-native-app:not(.is-tablet) #app {
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  min-height: 100dvh;
  background: var(--bg);
}

html.is-native-app:not(.is-tablet) .home {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100dvh;
}

html.is-native-app:not(.is-tablet) .home__top,
html.is-native-app:not(.is-tablet) .home__body {
  grid-column: auto;
  grid-row: auto;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.25rem 0;
}

html.is-native-app:not(.is-tablet) .home__title {
  font-size: 2rem;
}

html.is-native-app:not(.is-tablet) .home__logo {
  width: 5rem;
  margin-bottom: 1rem;
}

html.is-native-app:not(.is-tablet) .home__nav {
  margin: 0;
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(182, 107, 143, 0.16);
}

html.is-native-app:not(.is-tablet) .home__footer {
  margin: 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  border-top: none;
}

html.is-native-app:not(.is-tablet) .topbar,
html.is-native-app:not(.is-tablet) .page-intro,
html.is-native-app:not(.is-tablet) .stepper,
html.is-native-app:not(.is-tablet) .domain-heading,
html.is-native-app:not(.is-tablet) .page-content,
html.is-native-app:not(.is-tablet) .form-body,
html.is-native-app:not(.is-tablet) .fiql-question,
html.is-native-app:not(.is-tablet) .results,
html.is-native-app:not(.is-tablet) .results--dual,
html.is-native-app:not(.is-tablet) .results__actions {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

html.is-native-app:not(.is-tablet) .topbar {
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
}

html.is-native-app:not(.is-tablet) .form-body {
  padding-bottom: 7rem;
}

html.is-native-app:not(.is-tablet) .results--dual {
  grid-template-columns: 1fr;
}

html.is-native-app:not(.is-tablet) .results__actions {
  flex-direction: column;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

html.is-native-app:not(.is-tablet) .results__actions .btn {
  width: 100%;
  min-width: 0;
}

html.is-native-app:not(.is-tablet) .action-bar {
  max-width: 100%;
  padding: 0.75rem 1.25rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

html.is-native-app:not(.is-tablet) .action-bar__inner {
  max-width: 100%;
}

html.is-native-app:not(.is-tablet) .action-bar__actions {
  flex-direction: column;
}

html.is-native-app:not(.is-tablet) .action-bar__actions .btn,
html.is-native-app:not(.is-tablet) .action-bar__actions .btn--ghost {
  width: 100%;
  min-width: 0;
}

html.is-native-app:not(.is-tablet) .mode-card:active {
  transform: scale(0.98);
}

/* Tablet Android (≥768px): layout desktop igual ao navegador */
html.is-native-app.is-tablet body {
  padding: 1.5rem 1rem;
}

html.is-native-app.is-tablet #app {
  max-width: var(--content-max);
  min-height: calc(100dvh - 3rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

html.is-native-app.is-tablet .action-bar {
  max-width: var(--content-max);
}
