@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta Retenza */
  --brand:        #6B4EFF;  /* Retenza Violet — CTA, destaques */
  --brand-hover:  #5A3EE0;  /* hover botao primario */
  --accent:       #8FB7FF;  /* Retention Blue — graficos, progresso */
  --surface-soft: #EEEAFE;  /* Soft Lilac Mist — badges, cards suaves */

  /* Base */
  --bg:     #F7F8FC;  /* Mist White */
  --card:   #FFFFFF;
  --text:   #14161F;  /* Graphite Ink */
  --muted:  #6B7280;
  --border: #E7E8F0;

  /* Gradiente oficial — hero, progress bar, icones-chave */
  --gradient: linear-gradient(135deg, #6B4EFF 0%, #8FB7FF 100%);

  /* Sombras */
  --shadow:      0 8px 32px rgba(107, 78, 255, 0.12);
  --shadow-soft: 0 2px 12px rgba(20, 22, 31, 0.08);

  /* Raios */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Tipografia */
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;
  --font-reading: Georgia, 'Times New Roman', serif;

  --danger: #DC2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Navbar ── */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247, 248, 252, 0.92);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.18s;
}

.nav-brand:hover {
  opacity: 0.8;
}

.nav-logo {
  display: none;
}

.nav-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand);
  background: var(--surface-soft);
}

.nav-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 10px;
  flex-shrink: 0;
}

.nav-returning {
  color: var(--brand);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(107, 78, 255, 0.22);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
}

.nav-cta:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(107, 78, 255, 0.32);
}

/* ── Shared content wrap (Blog + Sobre) ── */

.content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 0 56px;
}

.content-header {
  margin-bottom: 36px;
}

.content-title {
  margin: 8px 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.content-subtitle {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Blog ── */

.blog-phase { display: none; }
.blog-phase.active { display: block; animation: panelRise 0.3s ease; }

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-card-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.blog-card-summary {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 0 0 16px;
}

.blog-card-cta {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
}

/* ── Article ── */

.article-header {
  margin-bottom: 24px;
}

.article-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 44px 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(107, 78, 255, 0.14);
}

.article-time {
  font-size: 0.84rem;
  color: var(--muted);
}

.article-title {
  margin: 0 0 28px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.article-body p {
  color: var(--text);
  line-height: 1.85;
  font-size: 1.05rem;
  margin: 0 0 20px;
}

.article-cta {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.article-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ── Metricas ── */

.metrics-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  margin-bottom: 20px;
}

.metrics-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.metrics-intro {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

.metrics-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.metrics-table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}

.metrics-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.5;
  color: var(--text);
}

.metrics-table tbody tr:last-child td { border-bottom: none; }

.metrics-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.metrics-badge--slow       { background: rgba(220, 38, 38, 0.10); color: #DC2626; }
.metrics-badge--basic      { background: rgba(234, 179, 8, 0.12); color: #92400E; }
.metrics-badge--avg        { background: rgba(107, 78, 255, 0.10); color: var(--brand); }
.metrics-badge--fast       { background: rgba(16, 185, 129, 0.12); color: #059669; }
.metrics-badge--exceptional { background: rgba(14, 165, 233, 0.12); color: #0369A1; }

.metrics-insight {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.metrics-insight--brand {
  border-left-color: #059669;
}

.metrics-insight h4 {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.metrics-insight p {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.7;
  margin: 0 0 8px;
}

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

.metrics-sources {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.metrics-sources h4 {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.metrics-sources ul {
  margin: 0;
  padding-left: 18px;
}

.metrics-sources li {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* ── Sobre ── */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.about-card h3 {
  margin: 0 0 12px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--brand);
}

.about-card p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0 0 10px;
}

.about-card p:last-child { margin: 0; }

.about-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  margin-top: 8px;
  transition: background 0.2s;
}

.about-cta:hover { background: var(--brand-hover); }

.about-actions {
  display: flex;
  justify-content: center;
}

.about-actions .btn-primary {
  min-width: 240px;
}

/* ── Reading modal ── */

.reading-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #F9F8F5;
  flex-direction: column;
  overflow: hidden;
}

.reading-modal.active {
  display: flex;
  animation: panelRise 0.25s ease;
}

.reading-modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 48px;
  background: #F9F8F5;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  z-index: 10;
}

.reading-modal-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #ABABAB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
  letter-spacing: 0.01em;
}

.reading-modal-timer {
  min-width: 80px;
  padding: 6px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}

.reading-modal-done {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.reading-modal-done:hover {
  background: var(--brand);
  color: #fff;
}

.reading-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 64px 0 80px;
}

.reading-modal-text {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 32px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  line-height: 1.85;
  color: #2A2A2A;
  white-space: pre-wrap;
}

/* ── Site footer ── */

.site-footer {
  margin-top: 48px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  opacity: 0.7;
}

.site-footer strong {
  font-weight: 700;
  color: var(--text);
}

/* ── Screen system ── */

.screen { display: none; }
.screen.active { display: block; }

/* ── Page container ── */

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

/* ── Hero + Panel base ── */

.hero, .panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero {
  padding: 48px 40px 56px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Brilho de fundo — unico elemento "vivo" */
.hero::before {
  content: "";
  position: absolute;
  inset: auto -40px -80px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(107, 78, 255, 0.10), transparent 68%);
  z-index: -1;
}

/* ── Topbar / Brand ── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-name {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero copy ── */

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 30px;
  align-items: center;
  margin-bottom: 26px;
}

.hero-copy { padding-right: 10px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(107, 78, 255, 0.14);
}

.hero-title {
  margin: 20px 0 14px;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1.0;
  letter-spacing: -0.045em;
  max-width: 12ch;
}

.hero-copy > p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

/* CTA botao primario (landing) */
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 18px 40px;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 32px rgba(107, 78, 255, 0.32);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  background: var(--brand-hover);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(107, 78, 255, 0.40);
}

/* Manter .hero-link para compatibilidade futura */
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.hero-link:hover { transform: translateY(-1px); }

.hero-link.primary-link {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(107, 78, 255, 0.24);
}

.hero-link.secondary-link {
  background: var(--card);
  color: var(--brand);
  border: 1.5px solid var(--border);
}

/* ── Hero visual (imagem) ── */

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-image-card {
  width: 100%;
  max-width: 420px;
  padding: 12px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ── Hero stat strip ── */

.hero-stats-strip {
  display: flex;
  gap: 0;
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-stat-item {
  flex: 1;
  padding: 20px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.hero-stat-item:last-child { border-right: none; }

.hero-stat-item strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-item span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Hero grid (cards de feature) ── */

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.hero-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--brand);
}

.hero-card p, .hero-card li {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.hero-card ul { margin: 0; padding-left: 18px; }

.hero-card--link {
  cursor: pointer;
}
.hero-card--link:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.hero-card-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
}

/* ── Tabs ── */

.hero-grid, .layout, .stats, .tabs { display: grid; gap: 20px; }

.tabs {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 30px 0 18px;
  padding: 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.tab-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.2s ease;
}

.tab-button:hover {
  transform: translateY(-1px);
  background: var(--surface-soft);
  color: var(--brand);
}

.tab-button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(107, 78, 255, 0.28);
}

/* ── Panels ── */

.layout { grid-template-columns: minmax(300px, 380px) 1fr; align-items: start; }
.stats { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }

.panel { display: none; padding: 30px; }
.panel.active { display: block; animation: panelRise 0.32s ease; }
.panel-header { margin-bottom: 24px; }
.panel-header h2 { margin: 0 0 8px; font-size: 1.78rem; letter-spacing: -0.02em; }

.panel-header p, .hero > p, .hint, .footer-note, .empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.text-warning { color: #B45309; font-weight: 500; }

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

/* ── Cards e Stats ── */

.card, .stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card { padding: 22px; }
.card h3 { margin: 0 0 12px; font-size: 1.05rem; letter-spacing: -0.01em; }
.stat { padding: 16px; }

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat strong { display: block; margin-top: 8px; font-size: 1.25rem; }

/* ── Campos ── */

.field { margin-bottom: 14px; }
label { display: block; font-size: 0.94rem; font-weight: 700; margin-bottom: 8px; }

textarea, input[type="number"], input[type="range"] { width: 100%; font: inherit; }

textarea, input[type="number"] {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus, input[type="number"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(107, 78, 255, 0.10);
}

textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
input[type="range"] { accent-color: var(--brand); }

/* ── Botoes de acao ── */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

button.action {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button.action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(20, 22, 31, 0.12);
}

.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(107, 78, 255, 0.24);
}

.secondary {
  background: var(--surface-soft);
  color: var(--brand);
  border: 1px solid rgba(107, 78, 255, 0.16);
}

.danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.12);
}

/* ── Display (area de leitura) ── */

.display {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  overflow: hidden;
  scroll-margin-top: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

/* Dark canvas para displays de leitura */
.card.display {
  background: #0D0F1A;
  border-color: #1E2035;
}

.rsvp-word {
  font-family: var(--font-reading);
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: #FFFFFF;
  position: relative;
}

.rsvp-word::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.chunk-phrase {
  font-family: var(--font-reading);
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  color: #FFFFFF;
}

.focus-wrapper, .speed-reader {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  font-family: var(--font-reading);
  line-height: 1.9;
  font-size: 1.25rem;
}

.speed-text {
  min-height: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  white-space: pre-wrap;
}

/* ── Timer ── */

.timer {
  display: inline-flex;
  justify-content: center;
  min-width: 180px;
  padding: 16px 20px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(107, 78, 255, 0.14);
}

/* ── Result box ── */

.result {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid rgba(107, 78, 255, 0.14);
}

.result h3 { margin: 0 0 8px; font-size: 1rem; }

/* ── Footer ── */

.footer-note {
  margin-top: 22px;
  font-size: 0.92rem;
  text-align: center;
  opacity: 0.7;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 10ch;
}

/* ── Text select ── */

.text-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.text-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(107, 78, 255, 0.10);
}

/* Hidden textarea (still readable by JS) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Training quiz overlay ── */

.training-quiz { display: none; }

#screen-training.quiz-active .tabs,
#screen-training.quiz-active .panel,
#screen-training.quiz-active #tabs-anchor,
#screen-training.quiz-active .footer-note {
  display: none;
}

#screen-training.quiz-active .training-quiz {
  display: block;
  animation: panelRise 0.3s ease;
}

.training-quiz .diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-top: 8px;
}

/* ── Onboarding ── */

.onboarding-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 0;
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.back-link {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
}

.back-link:hover { color: var(--brand); }

.step-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.3s ease, width 0.3s ease;
}

.step-dot.active {
  background: var(--brand);
  width: 24px;
}

.onboarding-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 40px 0;
}

.step-label {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--brand);
}

.onboarding-question {
  margin: 0 0 28px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.option-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.option-card {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
}

.option-card:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
  transform: translateX(4px);
}

.option-card.selected {
  border-color: var(--brand);
  background: var(--surface-soft);
  color: var(--brand);
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(107, 78, 255, 0.28);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 78, 255, 0.36);
}

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

/* ── Results ── */

.results-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 0;
}

.results-header {
  margin-bottom: 28px;
}

.results-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 40px 0;
}

.results-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(107, 78, 255, 0.14);
  margin-bottom: 14px;
}

.results-card h2 {
  margin: 0 0 24px;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.res-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px 16px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.res-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
}

.res-stat .stat-label {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 10px;
  font-weight: 600;
}

.res-stat strong {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

/* ── Benchmark ruler ── */

.res-benchmark {
  margin: 0 0 20px;
  padding: 18px 20px 14px;
  background: #F9F8FF;
  border-radius: var(--radius-md);
  border: 1px solid rgba(107,78,255,0.12);
}

.bench-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.bench-ruler {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.bench-seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bench-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  opacity: 0.20;
  transition: height .2s, opacity .2s;
}

.bench-seg--active .bench-bar {
  height: 16px;
  opacity: 1;
}

.bench-name {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
}

.bench-seg--active .bench-name {
  font-size: 0.68rem;
  font-weight: 700;
}

/* Bar colors */
.bench-seg--slow        .bench-bar { background: #DC2626; }
.bench-seg--basic       .bench-bar { background: #D97706; }
.bench-seg--avg         .bench-bar { background: var(--brand); }
.bench-seg--fast        .bench-bar { background: #059669; }
.bench-seg--exceptional .bench-bar { background: #0369A1; }

/* Active label colors */
.bench-seg--slow.bench-seg--active        .bench-name { color: #DC2626; }
.bench-seg--basic.bench-seg--active       .bench-name { color: #92400E; }
.bench-seg--avg.bench-seg--active         .bench-name { color: var(--brand); }
.bench-seg--fast.bench-seg--active        .bench-name { color: #059669; }
.bench-seg--exceptional.bench-seg--active .bench-name { color: #0369A1; }

.bench-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

.results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.results-actions .btn-primary {
  flex: 1;
  min-width: 160px;
}

.btn-secondary {
  flex: 1;
  min-width: 160px;
  display: block;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: center;
}

.btn-secondary:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
  color: var(--brand);
  transform: translateY(-1px);
}

/* ── Diagnostic ── */

.diagnostic-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}

.diag-phase { display: none; }
.diag-phase.active { display: block; animation: panelRise 0.3s ease; }

.diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.diag-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 36px 0;
}

.diag-card h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.diag-card > p {
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.diag-intro {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.diag-meta {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--brand);
  letter-spacing: -0.01em;
}

.diag-timer-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.diag-timer-row .controls { margin-top: 0; }

.diag-text-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  font-family: var(--font-reading);
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text);
}

/* Quiz dentro do diagnostico */

.quiz-question { margin-bottom: 28px; }

.quiz-q-text {
  margin: 0 0 12px;
  line-height: 1.6;
  font-size: 1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

/* Resultado do diagnostico */

.diag-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.diag-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px 18px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.diag-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
}

.diag-stat .stat-label {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 10px;
  font-weight: 600;
}

.diag-stat strong {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.diag-suggestion {
  color: var(--muted);
  line-height: 1.7;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand);
  margin: 0 0 24px;
  font-size: 0.97rem;
}

/* ── Progress ── */

.progress-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}

.prog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.prog-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.prog-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px 14px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.prog-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
}

.prog-stat .stat-label {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 10px;
  font-weight: 600;
}

.prog-stat strong {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.prog-empty {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}

.prog-history-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 24px;
}

.prog-history-card h3 {
  margin: 0 0 18px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.prog-session-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.prog-session-item:last-child { border-bottom: none; }

.session-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-arranque {
  background: var(--surface-soft);
  color: var(--brand);
  border: 1px solid rgba(107, 78, 255, 0.14);
}

.badge-chunk {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.badge-retencao {
  background: rgba(143, 183, 255, 0.15);
  color: #2563EB;
  border: 1px solid rgba(143, 183, 255, 0.3);
}

.session-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-stats {
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}

.session-date {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.prog-empty-list {
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
  margin: 0;
}

.prog-actions {
  display: flex;
  justify-content: center;
}

.prog-actions .btn-primary {
  min-width: 240px;
}

/* Topbar returning user */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-btn {
  padding: 10px 20px;
  font-size: 0.92rem;
}

/* ── Responsive ── */

@media (max-width: 920px) {
  .hero-grid, .layout, .stats { grid-template-columns: 1fr; }
  .hero-stats-strip { flex-wrap: wrap; }
  .hero-stat-item { flex: 1 1 calc(50% - 1px); border-bottom: 1px solid var(--border); }
  .hero-main { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(3, 1fr); border-radius: 24px; }
  .display { min-height: 320px; }
  h1 { max-width: none; }
  .diag-stats-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .results-actions { flex-direction: column; }
  .results-actions .btn-primary,
  .btn-secondary { width: 100%; }
  .prog-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .prog-session-item { grid-template-columns: auto 1fr auto; }
  .session-date { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-link { display: none; }
  .nav-sep { display: none; }
  .nav-returning { display: none !important; }
}

@media (max-width: 600px) {
  .page { width: min(100% - 20px, 1120px); padding-top: 20px; }
  .hero, .panel { padding: 24px 20px; }
  .hero-stats-strip { flex-direction: column; }
  .hero-stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-stat-item:last-child { border-bottom: none; }
  .tabs { grid-template-columns: 1fr; }
  .controls { flex-direction: column; }
  button.action { width: 100%; }
  .hero-grid { gap: 14px; }
  .display { padding: 20px; }
  .hero-actions { flex-direction: column; }
  .hero-cta, .hero-link { width: 100%; }
  .prog-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .prog-session-item { grid-template-columns: auto 1fr; }
  .session-stats { display: none; }
  .onboarding-card, .diag-card, .results-card { padding: 24px; }
  .article-card { padding: 24px; }
  .article-cta { flex-direction: column; }
}

/* ── Modal de contato ── */

.contact-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.contact-overlay.open {
  display: flex;
}

.contact-modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  max-width: 420px;
  width: calc(100% - 48px);
  box-shadow: var(--shadow);
  position: relative;
  text-align: center;
}

.contact-modal h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.contact-modal p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-email {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: opacity 0.15s;
}

.contact-email:hover { opacity: 0.88; }

.contact-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.contact-close:hover { background: var(--border); }

