:root {
  --ink: #121215;
  --ink-2: #24242a;
  --ink-soft: #60606a;
  --muted: #8f8f98;
  --line: #e9e7df;
  --paper: #fffefa;
  --paper-2: #f7f3ea;
  --rose: #f7d9dd;
  --rose-ink: #813046;
  --sage: #dcebdc;
  --sage-ink: #28563b;
  --sky: #dceaf8;
  --sky-ink: #244d81;
  --honey: #f5e7ae;
  --honey-ink: #675210;
  --focus: #121215;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Superfícies e tintas derivadas (claro = aparência original) */
  --surface: #f5f0e6;      /* cartões de escolha, resumo, empty-state */
  --surface-2: #f4efe5;    /* chips, input de tags, botão fantasma */
  --surface-hover: #ebe4d6;
  --track: #e3ded2;        /* trilho da barra de progresso */
  --veil: rgba(255, 255, 255, 0.62);      /* métricas do rail */
  --veil-soft: rgba(255, 255, 255, 0.5);  /* nota do rail */
  --outline: #bdb6a8;      /* aro do rádio das escolhas */
  --label-dim: rgba(18, 18, 21, 0.62);          /* rótulos dos cards de resultado */
  --label-dim-inverse: rgba(255, 254, 250, 0.68); /* rótulos no card invertido */
  --sh-pop: 0 22px 70px rgba(18, 18, 21, 0.14);
}

/* =========================================================================
   TEMA ESCURO — [data-theme="dark"] no <html>.
   Alinhado aos tokens do design system em vendor/design/tokens.css:
   fundos #131218/#1C1A22/#25232D, texto #F3F2EC, hairline #2B2933.
   ========================================================================= */
[data-theme="dark"] {
  --ink: #F3F2EC;
  --ink-2: #E4E2DB;
  --ink-soft: #A3A0AB;
  --muted: #8A8791;
  --line: #2B2933;
  --paper: #131218;
  --paper-2: #1C1A22;
  --rose: #3A1E27;
  --rose-ink: #F0B9C4;
  --sage: #17301F;
  --sage-ink: #A9D6B6;
  --sky: #182739;
  --sky-ink: #A8C9EF;
  --honey: #363011;
  --honey-ink: #EBD97E;
  --focus: #F3F2EC;

  --surface: #1C1A22;
  --surface-2: #1C1A22;
  --surface-hover: #25232D;
  --track: #2B2933;
  --veil: rgba(243, 242, 236, 0.06);
  --veil-soft: rgba(243, 242, 236, 0.05);
  --outline: #57545F;
  --label-dim: rgba(243, 242, 236, 0.62);
  --label-dim-inverse: rgba(19, 18, 24, 0.66);
  --sh-pop: 0 22px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(260px, 31vw) minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, var(--paper-2) 0, var(--paper-2) 31vw, var(--paper) 31vw),
    var(--paper);
}

.rail {
  min-height: 100vh;
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  font-weight: 700;
}

.brand-name {
  font-weight: 760;
  letter-spacing: -0.01em;
}

.brand-sub,
.mini-label,
.rail-note,
.progress-copy,
.rail-metric span {
  color: var(--ink-soft);
  font-size: 12px;
}

.progress-block {
  display: grid;
  gap: 10px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rail-metric {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: var(--veil);
}

.rail-metric strong {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.procedure-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.procedure-stack .mini-label {
  width: 100%;
  margin-bottom: 2px;
}

.mini-pill {
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--sage-ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-note {
  margin-top: auto;
  padding: 18px;
  border-radius: 18px;
  background: var(--veil-soft);
  line-height: 1.5;
}

.stage {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
}

.question-screen,
.result-screen {
  width: min(880px, 100%);
  animation: rise 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.question-copy {
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
}

.question-copy h1,
.result-screen h1 {
  max-width: 820px;
  font-size: clamp(34px, 5.1vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
  margin: 0;
}

.question-copy p,
.result-lead {
  max-width: 650px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
}

.answer-area {
  min-height: 270px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice,
.mini-choice,
.suggestions button,
.tag-main,
.tag-remove,
.ghost-btn,
.primary-btn,
.tag-input-wrap button {
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.choice {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 18px 20px;
  border-radius: 18px;
  color: var(--ink-2);
  background: var(--surface);
  text-align: left;
}

.choice:hover,
.mini-choice:hover,
.suggestions button:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.choice i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--outline);
}

.choice.selected {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--sh-pop);
}

.choice.selected i {
  background: var(--honey);
  border-color: var(--honey);
}

.tag-control {
  display: grid;
  gap: 18px;
}

.tag-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border-radius: 22px;
  background: var(--surface-2);
}

.tag-input-wrap input {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  font-size: 18px;
  color: var(--ink);
}

.tag-input-wrap button,
.primary-btn {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 760;
}

.suggestions,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggestions button,
.mini-choice {
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  background: var(--sky);
  color: var(--sky-ink);
  overflow: hidden;
}

.tag.top {
  background: var(--ink);
  color: var(--paper);
}

.tag-main,
.tag-remove {
  color: inherit;
  background: transparent;
}

.tag-main {
  max-width: 260px;
  padding: 11px 4px 11px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-remove {
  padding: 11px 12px 11px 8px;
  font-size: 18px;
}

.microcopy,
.range-caption {
  color: var(--muted);
  font-size: 13px;
}

.procedure-details {
  display: grid;
  gap: 12px;
}

.procedure-card {
  padding: 16px;
  border-radius: 22px;
  background: var(--surface);
}

.procedure-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.procedure-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.procedure-head span {
  flex: 0 0 auto;
  color: var(--sage-ink);
  font-weight: 760;
}

.range-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  margin: 10px 0;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
}

.group-stack {
  display: grid;
  gap: 18px;
}

.group-stack.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.answer-group {
  display: grid;
  gap: 10px;
}

.group-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.mini-choice.selected {
  background: var(--ink);
  color: var(--paper);
}

.empty-state {
  padding: 30px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink-soft);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.ghost-btn {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 760;
}

.primary-btn:not(:disabled):hover,
.ghost-btn:not(:disabled):hover,
.tag-input-wrap button:not(:disabled):hover {
  transform: translateY(-2px);
}

.result-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.result-lead {
  margin-top: 18px;
  margin-bottom: 28px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.result-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface-2);
}

.result-card span,
.result-summary span {
  color: var(--label-dim);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-card strong {
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.result-card.sky strong,
.result-card.ink strong {
  font-size: clamp(19px, 1.8vw, 23px);
}

.result-card.ink {
  background: var(--ink);
  color: var(--paper);
}

.result-card.ink span {
  color: var(--label-dim-inverse);
}

.result-card.sage {
  background: var(--sage);
  color: var(--sage-ink);
}

.result-card.sky {
  background: var(--sky);
  color: var(--sky-ink);
}

.result-card.rose {
  background: var(--rose);
  color: var(--rose-ink);
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.result-summary div {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
}

.result-summary strong {
  line-height: 1.25;
}

.result-actions {
  justify-content: flex-start;
}

.method-note {
  margin: -10px 0 30px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.dimension-section,
.action-plan,
.lead-capture {
  margin-top: 36px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.dimension-section h2,
.action-plan h2,
.lead-capture h2,
.privacy-document h1,
.privacy-document h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.dimension-section h2,
.action-plan h2,
.lead-capture h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.dimension-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.dimension-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.dimension-head span,
.dimension-card p {
  color: var(--ink-soft);
  font-size: 13px;
}

.dimension-track {
  height: 7px;
  margin: 14px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track);
}

.dimension-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.dimension-card p {
  margin: 0;
}

.action-plan ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: week;
}

.action-plan li {
  counter-increment: week;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink-soft);
  line-height: 1.55;
}

.action-plan li strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.lead-capture > p,
.success-panel > p {
  max-width: 66ch;
  color: var(--ink-soft);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.form-field input:focus,
.consent-row input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 28%, transparent);
  outline-offset: 2px;
}

.consent-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.consent-row a,
.privacy-document a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.form-note,
.form-status,
.receipt {
  color: var(--ink-soft);
  font-size: 13px;
}

.form-status.error {
  color: var(--rose-ink);
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.success-panel {
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--sage-ink) 24%, transparent);
  border-radius: 22px;
  background: var(--sage);
}

.privacy-page {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

.privacy-document {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.privacy-back {
  display: inline-block;
  margin-bottom: 54px;
  font-size: 14px;
}

.privacy-document h1 {
  max-width: 17ch;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 0.98;
}

.privacy-document h2 {
  margin-top: 42px;
  font-size: 25px;
}

.privacy-document p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.75;
}

.privacy-note {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px !important;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    background: var(--paper);
  }

  .rail {
    min-height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--paper-2);
  }

  .rail-metric,
  .procedure-stack,
  .rail-note {
    display: none;
  }

  .brand {
    margin-bottom: 6px;
  }

  .stage {
    min-height: auto;
    padding: 28px 18px 40px;
    place-items: start;
  }

  .question-copy h1,
  .result-screen h1 {
    font-size: clamp(34px, 11vw, 54px);
  }

  .question-screen,
  .result-screen {
    padding-bottom: 92px;
  }

  .option-grid,
  .result-grid,
  .result-summary,
  .dimension-grid,
  .action-plan ol,
  .form-grid,
  .group-stack.compact {
    grid-template-columns: 1fr;
  }

  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-area {
    min-height: 0;
  }

  .range-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nav-row {
    position: static;
    padding: 14px 0 0;
    background: transparent;
  }
}

@media print {
  .rail,
  .nav-row,
  .lead-capture {
    display: none;
  }

  .app-shell,
  .stage {
    display: block;
    min-height: auto;
    padding: 0;
  }
}
