/* ============================================================
   REYTER US — components for /us/*
   Loaded AFTER styles.css. Reuses every token and base component
   from the design system; only adds what the US market needs:
   the onboarding flow, conversion popups, the plan ladder,
   the story blocks and the USD revenue model.
   ============================================================ */

/* ============================================
   TOKEN CORRECTIONS (US pages only)
   ============================================ */

/**
 * styles.css declares --sticky-cta-height: 56px, but the US sticky bar
 * actually measures 85px (12px padding + 44px button + 12px padding +
 * border + safe-area). Everything that reserves space for it — the corner
 * popup offset, the footer padding — was 28px short, so the nudge popup
 * overlapped the sticky CTA. us.css only loads on /us/*, so correcting the
 * token here fixes it without touching the BR layout.
 *
 * (The BR bar measures 69px against the same 56px token — a smaller,
 * pre-existing under-reservation. Out of scope here; noted in the skill.)
 */
:root {
  --sticky-cta-height: 84px;

  /**
   * UMA medida de leitura para toda a prosa.
   *
   * Antes, dentro da MESMA seção o texto saltava entre três larguras:
   * .section-title ia a 1076px, .section-lead parava em 727px e
   * .check-list/.us-steps voltavam a 1028-1076px. Título largo com
   * parágrafo curto embaixo lê como parágrafo quebrado, não como
   * hierarquia. Título e corpo agora dividem a mesma borda esquerda E
   * direita; componentes de largura cheia (grids de card, tabela,
   * calculadora) continuam cheios, e é esse contraste que dá ritmo.
   */
  --us-measure: 46rem;
}

/* ============================================
   MEDIDA DE LEITURA
   ============================================ */

.section .container > .section-title,
.section .container > .section-lead,
.section .container > .check-list,
.section .container > .us-steps,
.section .container > .proof-disclaimer,
.section .container > .calc-method,
.section .container > p,
.aeo-answer {
  max-width: var(--us-measure);
}

/* O capítulo inteiro é constrangido, não só o parágrafo — senão o h3
   corre até a borda e o texto embaixo para 300px antes. */
.story-chapter {
  max-width: calc(var(--us-measure) + var(--space-2xl));
}

.story-chapter p,
.story-pull {
  max-width: none;
}

/* ============================================
   STORY
   ============================================ */

.story-section {
  position: relative;
}

.story-chapters {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

.story-chapter {
  position: relative;
  padding-left: var(--space-xl);
  border-left: 2px solid var(--color-border);
}

.story-chapter::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.story-chapter--turn {
  border-left-color: var(--color-accent);
}

.story-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: var(--space-xs);
}

.story-chapter h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

.story-chapter p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

.story-chapter strong {
  color: var(--color-text);
  font-weight: 600;
}

.story-pull {
  margin: var(--space-lg) 0 0;
  padding: var(--space-lg);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-lg);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
}

.story-pull em {
  color: var(--color-accent-text);
  font-style: normal;
  font-weight: 600;
}

@media (min-width: 768px) {
  .story-chapter h3 {
    font-size: 1.5rem;
  }

  .story-chapter {
    padding-left: var(--space-2xl);
  }

}

/* ============================================
   THE ENGINE (3-layer diagram)
   ============================================ */

.engine {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.engine-layer {
  position: relative;
  /* Coluna + `margin-top: auto` na etiqueta: sem isso ela seguia o fim do
     parágrafo e as três ficavam em alturas diferentes (25px de desvio). */
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}

.engine-layer:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.engine-layer-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.engine-layer h3 {
  font-size: 1.0625rem;
  margin: 0 0 var(--space-xs);
}

.engine-layer p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.engine-layer-tag {
  display: inline-block;
  margin-top: auto;
  padding-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.engine-arrow {
  align-self: center;
  color: var(--color-accent-text);
  font-size: 1.25rem;
  line-height: 1;
}

@media (min-width: 900px) {
  .engine {
    flex-direction: row;
    align-items: stretch;
  }

  .engine-layer {
    flex: 1;
  }

  .engine-arrow {
    align-self: center;
    transform: rotate(-90deg);
  }
}

/* ============================================
   PLAN LADDER
   ============================================ */

.plan-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: border-color var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}

.plan-card:hover {
  border-color: var(--color-border-hover);
}

.plan-card--featured {
  border-color: var(--color-accent);
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.08) 0%,
    var(--color-surface) 45%
  );
  box-shadow: 0 0 60px -20px var(--color-accent-glow);
}

/* 11px/600 white on --color-accent measured 4.23:1 — below AA for small
   text. Soft fill + accent-text takes it to 5.38:1 and drops the hardcode. */
.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: var(--space-lg);
  padding: 0.25rem 0.75rem;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  color: var(--color-accent-text);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin: 0 0 var(--space-xs);
}

.plan-headline {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

.plan-for {
  margin: 0 0 var(--space-lg);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: var(--space-xs);
}

.plan-price-value {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.plan-price-unit {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.plan-price-note {
  margin: 0 0 var(--space-lg);
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.plan-features li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--color-accent-text);
  border-bottom: 2px solid var(--color-accent-text);
  transform: rotate(-45deg);
}

.plan-features strong {
  color: var(--color-text);
  font-weight: 600;
}

/* The argument for a tier. Kept visually distinct from .plan-tradeoff so
   the honesty slot is never mistaken for — or used as — a sales slot. */
.plan-why {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* The upsell lever: what this tier deliberately leaves on the table. */
.plan-tradeoff {
  margin: 0 0 var(--space-lg);
  padding: var(--space-md);
  border-left: 2px solid var(--color-warning);
  background: var(--color-warning-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.plan-tradeoff strong {
  display: block;
  color: var(--color-text);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

/**
 * Purple means "this is the trade you are accepting" — never "here is why
 * to buy". Named --neutral rather than --good because using the honesty
 * slot to sell is the most credibility-expensive thing this page could do.
 */
.plan-tradeoff--neutral {
  border-left-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.plan-cta {
  margin-top: auto;
}

@media (min-width: 900px) {
  /**
   * Subgrid alinha as linhas ENTRE os cards. Sem isso, um `.plan-for` de 3
   * linhas contra um de 2 empurrava tudo abaixo dele: os preços ficavam 24px
   * fora de esquadro e os trade-offs 15px. Três preços em alturas diferentes
   * é o tipo de coisa que se vê antes de se conseguir explicar.
   *
   * `span 9` cobre a contagem máxima de filhos em fluxo (o card em destaque
   * tem `.plan-why`). Onde o card tem 8, a nona linha fica vazia em TODOS os
   * cards daquela grade — então o alinhamento se mantém.
   */
  /* auto-fit resolve tanto as páginas de 3 cards quanto as de 2: colunas
     vazias colapsam, então a contagem segue a de cards. */
  .plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
  }

  .plan-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 9;
  }

  /* O destaque já tem borda de acento, glow e badge. O `scale(1.03)` era o
     quarto sinal e o único que quebrava o alinhamento com os vizinhos e
     rasterizava o texto em tamanho fracionário. */
  .plan-card--featured {
    z-index: 2;
  }
}

/* Navegadores sem subgrid voltam ao comportamento antigo: colunas iguais,
   internos não alinhados. Degrada, não quebra. */
@supports not (grid-template-rows: subgrid) {
  @media (min-width: 900px) {
    .plan-grid {
      display: flex;
      flex-direction: row;
    }

    .plan-card {
      display: flex;
      flex: 1;
    }
  }
}

@media (max-width: 360px) {
  .plan-card {
    padding: var(--space-lg) var(--space-md);
  }

  .plan-price-value {
    font-size: 1.875rem;
  }

  .plan-badge {
    left: var(--space-md);
    font-size: 0.625rem;
  }
}

/* ============================================
   ONE-TIME FOUNDATIONS (add-ons)
   ============================================ */

.addon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.addon-card {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.addon-card h3 {
  font-size: 1rem;
  margin: 0 0 var(--space-xs);
}

.addon-price {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-accent-text);
  display: block;
  margin-bottom: var(--space-sm);
}

.addon-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .addon-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   COMPARISON TABLE
   ============================================ */

.compare-wrap {
  margin-top: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.compare-table thead th {
  background: var(--color-bg-alt);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  font-weight: 600;
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--color-text-muted);
}

.compare-table td {
  color: var(--color-text);
}

.compare-table .is-us {
  color: var(--color-accent-text);
  font-weight: 600;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-scroll-hint {
  margin: var(--space-sm) 0 0;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

@media (min-width: 768px) {
  .compare-scroll-hint {
    display: none;
  }
}

/* ============================================
   REVENUE MODEL (calculator)
   ============================================ */

.uscalc {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.uscalc-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.uscalc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.uscalc-label strong {
  font-family: var(--font-mono);
  color: var(--color-accent-text);
  font-size: 1rem;
}

.uscalc-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
}

.uscalc-seg-btn {
  min-height: 44px;
  padding: 0.5rem 0.625rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.3;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.uscalc-seg-btn:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text);
}

.uscalc-seg-btn.is-active {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-text);
  font-weight: 600;
}

.uscalc-range {
  width: 100%;
  height: 44px; /* full touch target — the visible track stays 6px */
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

/* --color-bg, not --color-bg-alt: against the card surface the alt track
   measured 1.43:1 and read as a hairline rather than a control. */
.uscalc-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.uscalc-range::-moz-range-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.uscalc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -11px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-accent), 0 2px 10px var(--color-accent-glow);
}

.uscalc-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.uscalc-range:focus-visible {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 4px;
}

.uscalc-hint,
.uscalc-warning {
  margin: var(--space-xs) 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-subtle);
}

.uscalc-warning {
  color: var(--color-accent-text);
}

.uscalc-output {
  margin-top: var(--space-xl);
}

.uscalc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.uscalc-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.uscalc-card-label {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.uscalc-card-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-accent-text);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.uscalc-card-note {
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

.uscalc-ledger {
  margin-top: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.uscalc-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.uscalc-row:last-child {
  border-bottom: none;
}

.uscalc-row.is-strong {
  color: var(--color-text);
  font-weight: 600;
  background: var(--color-bg-alt);
}

/* The most persuasive number the model produces was rendered identically
   to the bill. A result is not a cost. */
.uscalc-row.is-result {
  color: var(--color-text);
  font-weight: 600;
  background: var(--color-accent-soft);
  border-top: 1px solid var(--color-accent);
}

.uscalc-row.is-result span:last-child {
  color: var(--color-accent-text);
  font-size: 1.0625rem;
}

.uscalc-row span:last-child {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.uscalc-disclaimer {
  margin: var(--space-lg) 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-subtle);
}

.uscalc-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

@media (max-width: 360px) {
  .uscalc {
    padding: var(--space-md);
  }

  /* Four full-width cards cost four screenfuls before the ledger. Promote
     the answer, demote the supporting stats. */
  .uscalc-grid {
    grid-template-columns: 1fr 1fr;
  }

  .uscalc-card:nth-child(3) {
    grid-column: 1 / -1;
    order: -1;
  }

  .uscalc-card:nth-child(3) .uscalc-card-value {
    font-size: 1.75rem;
  }

  .uscalc-seg {
    grid-template-columns: 1fr;
  }

  .uscalc-card-value {
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  .uscalc {
    padding: var(--space-xl);
  }

  .uscalc-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .uscalc-ctas {
    flex-direction: row;
  }

  .uscalc-ctas .btn {
    flex: 1;
  }
}

/* ============================================
   ONBOARDING FLOW
   ============================================ */

body.us-modal-open {
  overflow: hidden;
}

.ob {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ob[hidden] {
  display: none;
}

.ob-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.ob.is-open .ob-backdrop {
  opacity: 1;
}

.ob-panel {
  position: relative;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border-hover);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.32s var(--ease-out);
}

.ob.is-open .ob-panel {
  transform: translateY(0);
}

.ob-head {
  flex-shrink: 0;
  padding: var(--space-md) var(--space-lg) 0;
}

.ob-progress {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  overflow: hidden;
}

.ob-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-accent-2), var(--color-accent));
  transition: width 0.35s var(--ease-out);
}

.ob-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.ob-count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.ob-back,
.ob-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out);
}

.ob-back:hover,
.ob-close:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.ob-back[hidden] {
  visibility: hidden;
  display: inline-flex;
}

.ob-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-md) var(--space-lg) var(--space-2xl);
}

.ob-enter {
  animation: obEnter 0.3s var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .ob-enter {
    animation: none;
  }

  .ob-panel,
  .ob-backdrop {
    transition: none;
  }
}

.ob-flag {
  display: inline-block;
  margin-bottom: var(--space-sm);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-border);
  color: var(--color-accent-text);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ob-title {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-xs);
}

.ob-title em {
  color: var(--color-accent-text);
  font-style: normal;
}

.ob-help {
  margin: 0 0 var(--space-lg);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.ob-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ob-option {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  min-height: 60px;
  padding: var(--space-md);
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.ob-option:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
  transform: translateX(2px);
}

.ob-option.is-selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.ob-option-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.ob-option-hint {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  line-height: 1.4;
}

.ob-preview {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-lg);
}

.ob-preview-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.ob-preview-plan {
  font-size: 1.125rem;
  font-weight: 600;
}

/* The withheld part: the reasoning, not the price. */
.ob-preview-locked {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  filter: blur(4.5px);
  user-select: none;
}

.ob-preview-note {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.ob-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ob-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ob-field > span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.ob-field > span em {
  font-style: normal;
  color: var(--color-text-subtle);
  font-weight: 400;
}

.ob-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem; /* 16px — stops iOS from zooming on focus */
  transition: border-color var(--duration-fast) var(--ease-out);
}

.ob-field input::placeholder {
  color: var(--color-text-subtle);
}

/* This is the one form on the site that captures an email address. A border
   colour change alone measured 2.76:1 focused-vs-unfocused — under 3:1. */
.ob-field input:focus {
  border-color: var(--color-accent);
}

.ob-field input:focus-visible {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 2px;
  border-color: var(--color-accent);
}

.ob-field input.is-error {
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
}

.ob-error {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-warning);
}

.ob-error[hidden] {
  display: none;
}

.ob-fineprint {
  margin: var(--space-sm) 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--color-text-subtle);
  text-align: center;
}

.ob-secondary {
  display: block;
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: none;
  border: none;
  color: var(--color-text-subtle);
  font-family: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  min-height: 44px;
}

.ob-secondary:hover {
  color: var(--color-text-muted);
}

/* Result screen */
.ob-plan {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px -22px var(--color-accent-glow);
}

.ob-plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.ob-plan-name {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.ob-plan-price {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ob-plan-price span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.ob-plan-split {
  margin: var(--space-sm) 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

.ob-reasons {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ob-reasons li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.ob-reasons li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--color-accent-text);
  border-bottom: 2px solid var(--color-accent-text);
  transform: rotate(-45deg);
}

.ob-addon {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border-hover);
  border-radius: var(--radius-lg);
}

/* Risk reversal on the result screen — the close, not the summary. */
.ob-reassure {
  list-style: none;
  padding: var(--space-md);
  margin: 0 0 var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ob-reassure li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.ob-reassure li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent-text);
  font-weight: 700;
}

.ob-addon-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: 0.25rem;
}

.ob-addon strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.ob-addon p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.ob-flag--done {
  background: var(--color-success-soft);
  border-color: var(--color-success-border);
  color: var(--color-success);
}

@media (min-width: 600px) {
  .ob {
    align-items: center;
    padding: var(--space-lg);
  }

  .ob-panel {
    max-width: 540px;
    max-height: 88vh;
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-xl);
    transform: translateY(16px) scale(0.98);
    opacity: 0;
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  }

  .ob.is-open .ob-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .ob-head {
    padding: var(--space-lg) var(--space-xl) 0;
  }

  .ob-body {
    padding: var(--space-md) var(--space-xl) var(--space-xl);
  }

  .ob-title {
    font-size: 1.625rem;
  }
}

@media (max-width: 360px) {
  .ob-head,
  .ob-body {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .ob-title {
    font-size: 1.1875rem;
  }

  .ob-option {
    padding: var(--space-sm) var(--space-md);
    min-height: 56px;
  }

  .ob-plan-price {
    font-size: 1.375rem;
  }
}

/* ============================================
   CONVERSION POPUPS
   ============================================ */

.us-popup {
  position: fixed;
  z-index: 200;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}

.us-popup.is-open {
  opacity: 1;
}

.us-popup--center {
  left: var(--space-md);
  right: var(--space-md);
  bottom: calc(var(--space-md) + var(--sticky-cta-height) + env(safe-area-inset-bottom, 0px));
  transform: translateY(24px);
}

.us-popup--center.is-open {
  transform: translateY(0);
}

.us-popup--corner {
  left: var(--space-md);
  right: var(--space-md);
  bottom: calc(var(--space-md) + var(--sticky-cta-height) + env(safe-area-inset-bottom, 0px));
  transform: translateY(24px);
}

.us-popup--corner.is-open {
  transform: translateY(0);
}

.us-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: var(--btn-min-height);
  height: var(--btn-min-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-subtle);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.us-popup-close:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.us-popup-tag {
  display: inline-block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.us-popup-title {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-xs);
  padding-right: 2rem;
}

.us-popup-text {
  margin: 0 0 var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.us-popup-dismiss {
  display: block;
  width: 100%;
  margin-top: var(--space-sm);
  padding: var(--space-xs);
  background: none;
  border: none;
  color: var(--color-text-subtle);
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  min-height: var(--btn-min-height);
}

.us-popup-dismiss:hover {
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .us-popup--center {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(440px, calc(100vw - 3rem));
    transform: translate(-50%, calc(-50% + 16px));
  }

  .us-popup--center.is-open {
    transform: translate(-50%, -50%);
  }

  .us-popup--corner {
    left: auto;
    right: var(--space-xl);
    bottom: var(--space-xl);
    width: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .us-popup {
    transition: opacity var(--duration-fast) linear;
    transform: none !important;
  }
}

/* ============================================
   US ODDS AND ENDS
   ============================================ */

/* Trust row under the hero — flat fee / month to month / you own it */
.us-guarantees {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.us-guarantee {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.us-guarantee-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
  font-size: 1rem;
}

.us-guarantee-body strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.15rem;
}

.us-guarantee-body p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .us-guarantees {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* A linha de confiança do hero quebra em 2 linhas no celular e sobrava um
   "·" pendurado no fim da primeira. Sem separador, o gap já separa. */
@media (max-width: 599px) {
  .hero-trust-sep {
    display: none;
  }

  .hero-trust {
    gap: var(--space-xs) var(--space-md);
  }
}

/* Plain-language subhead under a hero H1 that uses platform-brand wording */
.hero-sub {
  margin: 0 0 var(--space-sm);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-accent-text);
  font-weight: 500;
}

/* Answer-first block: the paragraph LLMs quote */
.aeo-answer {
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.aeo-answer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: var(--space-xs);
}

.aeo-answer p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
}

.aeo-answer p + p {
  margin-top: var(--space-sm);
}

/* ============================================
   ALINHAMENTO ENTRE CARDS (subgrid)
   ============================================ */

/**
 * Mesma causa dos cards de plano: em qualquer grade de cards, um título que
 * quebra em 2 linhas num card e 1 noutro empurra tudo abaixo dele e as
 * linhas ficam fora de esquadro entre os vizinhos. Medido no tablet:
 * `.addon-price` 26px de desvio, `.uscalc-card-note` 28px,
 * `.proof-card-metrics` 24px.
 *
 * Subgrid faz cada card herdar as linhas do pai, então rótulo, valor e nota
 * ficam na mesma altura em todos. Cada card tem exatamente 3 filhos.
 */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 768px) {
    .addon-card,
    .proof-card,
    .uscalc-card {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: span 3;
    }
  }
}

/* ============================================
   BLOCO DE RISCO (.reverse-card)
   ============================================ */

/**
 * O `styles.css` monta `.reverse-card` como flex-column CENTRADO, feito pro
 * markup BR: `.reverse-icon` + `.reverse-content`. As páginas US colocam a
 * prosa como filha direta, então `align-items: center` encolheu cada filho
 * pro seu fit-content — a 768px o `<h2>` renderizou com **103px** dentro de
 * um card de 689px, e a check-list com 131px. Era o pior defeito do site.
 *
 * Aqui os filhos esticam e o texto lê da esquerda pra direita. Vale só pras
 * páginas US: o `us.css` não carrega no site BR, que segue com o layout
 * centrado que o componente foi desenhado pra ter.
 */
.reverse-card,
.reverse-section .reverse-card {
  /* ≥768px o styles.css vira `row` pra encaixar o ícone ao lado do
     `.reverse-content`. Sem esse wrapper, os 4 blocos de prosa viraram 4
     colunas de 233px. */
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: var(--space-md);
}

.reverse-card > * {
  width: 100%;
  max-width: var(--us-measure);
  margin-top: 0;
  margin-bottom: 0;
}

/* Inline text button that opens the onboarding from inside a paragraph */
.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-accent-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.link-button:hover {
  color: var(--color-text);
}

/* .lang-switch lives in styles.css — both markets' footers use it. */

/* Steps / process */
.us-steps {
  counter-reset: usstep;
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.us-steps li {
  counter-increment: usstep;
  position: relative;
  padding-left: 3rem;
}

.us-steps li::before {
  content: counter(usstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-border);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
}

.us-steps strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.us-steps p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* Booking confirmation */
.booking-confirmed {
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-success-soft);
  border: 1px solid var(--color-success-border);
  border-radius: var(--radius-lg);
}

.booking-confirmed h2 {
  margin: 0 0 var(--space-xs);
  font-size: 1.125rem;
  color: var(--color-success);
}

.booking-confirmed p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.book-plan-label {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-border);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
