:root {
  --bg-page: linear-gradient(180deg, #fff6ef 0%, #f7f9fc 60%, #ffffff 100%);
  --bg-soft: #fff9f4;
  --surface: #ffffff;
  --surface-alt: #f8f9fc;
  --primary: #f86633;
  --primary-dark: #eb4b1b;
  --primary-soft: rgba(248, 102, 51, 0.12);
  /* cores de destaque */
  --accent-red: #d93025;
  --accent-red-soft: rgba(217, 48, 37, 0.10);
  --text-900: #101828;
  --text-700: #475467;
  --text-500: #98a2b3;
  --shadow-card: 0 22px 45px -25px rgba(16, 24, 40, 0.35);
  --shadow-soft: 0 14px 35px -24px rgba(16, 24, 40, 0.35);
  /* --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px; */
  /* --container-max: 1120px; */
  --container-max: 1370px;


  --marca-text-amarelo: #ffe600;
  --marca-texto-black: #101010;
}

.marca-texto-amarelo {
  background-color: var(--marca-text-amarelo);
  padding: 1px 5px;
}

* {
  /* outline: 1px solid red; */
}


.btn-ebook-error {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
  padding: 10px;

  background-color: rgb(51, 39, 228);
  border-radius: 10px;
  color: #f1f1f1;

  color: #fff;
  box-shadow: 0 18px 40px -22px rgba(248, 102, 51, 0.75);

  font-weight: 600;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;

  text-transform: uppercase;
}


.marca-texto-black {
  background-color: var(--marca-texto-black);
  padding: 1px 5px;
  color: #f1f1f1;
}


.blue-link {
  color: rgb(41, 41, 212);
}

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

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-900);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

.container {
  width: min(var(--container-max), calc(100% - 3rem));
  margin: 0 auto;
}

.navbar {
  padding: 1.5rem 0;
  background: transparent;
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-900);
}

.btn {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 18px 40px -22px rgba(248, 102, 51, 0.75);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 55px -25px rgba(235, 75, 27, 0.65);
}

.btn-outline-primary {
  border: 1px solid rgba(248, 102, 51, 0.35);
  background: transparent;
  color: var(--primary);
}

.btn-outline-primary:hover {
  transform: translateY(-2px);
  background: rgba(248, 102, 51, 0.08);
}

.btn-link {
  font-weight: 600;
  color: var(--text-500);
  padding: 0.45rem 0.75rem;
}

.btn-link:hover {
  color: var(--primary);
}

.hero {
  padding: 6rem 0 7rem;
  background: radial-gradient(circle at top left, rgba(248, 102, 51, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(248, 102, 51, 0.12), transparent 50%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 102, 51, 0.2), transparent);
}

.hero-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 780px;
  text-align: center;
  align-items: center;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(248, 102, 51, 0.16), rgba(248, 102, 51, 0.12));
  color: var(--primary);
  width: fit-content;
  margin: 0 auto;
  border: 1px solid rgba(248, 102, 51, 0.2);
  box-shadow: 0 4px 12px -4px rgba(248, 102, 51, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-eyebrow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(248, 102, 51, 0.4);
}

.hero-eyebrow svg {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}



.hero-title {
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 0;
  background: linear-gradient(135deg, var(--text-900) 0%, var(--text-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, #ff9c6a 45%, #ffd3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}

.hero-text p {
  font-size: 1.2rem;
  color: var(--text-700);
  margin: 0;
  line-height: 1.7;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  justify-content: center;
  width: 100%;
  max-width: 600px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  transition: transform 0.3s ease;
}

.stat:hover {
  transform: translateY(-4px);
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-700);
  font-weight: 600;
}

.hero-media {
  position: relative;
}

.hero-illustration {
  position: relative;
  padding: 1.3rem;
  border-radius: var(--radius-lg);
  /* background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));
  box-shadow: var(--shadow-card); */
  overflow: hidden;
}

/* .hero-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(248, 102, 51, 0.26), rgba(248, 102, 51, 0.05));
} */

.hero-illustration img {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--radius-lg) - 8px);
}

.hero-floating-card {
  position: absolute;
  left: 2.4rem;
  bottom: 2.4rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.hero-floating-card .icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--primary-soft);
  font-size: 1.25rem;
}

.section-padding {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-700);
  font-size: 1.1rem;
}

.project-overview {
  background: linear-gradient(135deg, #fffaf4 0%, #ffffff 45%, #f8f9fc 100%);
}

.overview-grid {
  display: grid;
  gap: 1.5rem;
}

/* Capítulo: layout com sumário à esquerda e bloco de notas à direita */
.chapter-layout {
  display: grid;
  /* Estrutura: 20% (Sumário) | min 360px e max 760px (Capítulo) | 20% (Bloco de notas) */
  grid-template-columns: 20% minmax(360px, 760px) 20%;
  gap: 1rem;
  align-items: start;
}

.sumario,
.bloco-de-notas {
  background: var(--surface);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 24, 40, 0.04);
  box-shadow: none;
}

.sumario {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.chapter-toc h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-700);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.toc-item {
  margin: 0 0 0.35rem;
}

.toc-item a {
  color: var(--text-700);
  font-size: 0.95rem;
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.5rem;
  border-left: 3px solid transparent;
  border-radius: 0px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.toc-item a:hover {
  background: rgba(16, 24, 40, 0.03);
  color: var(--accent-red);
  border-left-color: var(--accent-red);
}

.toc-item a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.08);
  border-left-color: var(--accent-red);
}

.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 96px;
  align-self: start;
}

.bloco-de-notas {
  /* Painel de notas integrado ao layout (colado ao conteúdo) */
  width: 300px;
  /* largura fixa igual ao sumário */
  max-height: calc(100vh - 120px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

#chapter-notes {
  min-height:300px;
  flex: 1;
  width: 100%;
  resize: none;
  border: 1px solid rgba(16, 24, 40, 0.06);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: inherit;
}

#chapter-notes:focus{
  outline: 0;
}

.notes-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

.notes-confirm {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-alt, #f5f5f5);
  border: 1px solid var(--border, #e0e0e0);
}

.notes-confirm p {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #555);
}

.notes-confirm-actions {
  display: flex;
  gap: 0.5rem;
}

.notes-confirm-yes {
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 600;
}

.notes-confirm-yes:hover {
  background: var(--primary-dark);
  color: #fff;
}

.notes-confirm-no {
  background: transparent;
  color: var(--text-700);
  border: 1.5px solid var(--text-500);
  font-weight: 500;
}

.notes-confirm-no:hover {
  background: var(--surface-alt);
  border-color: var(--text-700);
  color: var(--text-900);
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#notes-status {
  font-size: 0.85rem;
  color: var(--text-700);
}

@media (max-width: 991px) {
  .chapter-layout {
    grid-template-columns: 1fr;
  }

  .sumario,
  .bloco-de-notas {
    display: none;
  }
}

.overview-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  border: 1px solid rgba(248, 102, 51, 0.08);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.overview-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  font-size: 1.45rem;
}

.overview-card h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.overview-card p {
  margin: 0;
  color: var(--text-700);
}

.project-highlights {
  display: grid;
  gap: 1.2rem;
  margin-top: 3rem;
}

.project-highlights .highlight {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.project-highlights .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-500);
  font-weight: 700;
}

.project-highlights .value {
  font-weight: 600;
  color: var(--text-700);
}

.features-grid {
  display: grid;
  gap: 1.5rem;
}

.chapter-single-content .features-grid {
  grid-template-columns: minmax(0, 1fr);
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(16, 24, 40, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.feature-card .icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--text-700);
}

@media (min-width: 768px) {
  .chapter-single-content .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chapters-section {
  background: var(--bg-soft);
  border-top: 1px solid rgba(248, 102, 51, 0.08);
  border-bottom: 1px solid rgba(248, 102, 51, 0.08);
}

.chapters-container {
  display: grid;
  gap: 2.5rem;
}

.chapters-intro {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.chapters-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.08);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-700);
  margin: 0 auto;
  font-size: 0.75rem;
}

.chapters-intro h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-900);
}

.chapters-intro p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--text-700);
}

.chapters-list {
  display: grid;
  gap: 1.35rem;
}

.chapter-summary-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.6rem;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chapter-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 50px -40px rgba(16, 24, 40, 0.55);
}

.chapter-summary-card .card-content {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
}

.chapter-summary-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.chapter-summary-text h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-900);
}

.chapter-summary-text p {
  margin: 0;
  color: var(--text-700);
}

.chapter-summary-tags {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chapter-summary-tags span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
  font-weight: 600;
  font-size: 0.85rem;
}

.chapter-summary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.chapter-summary-link::after {
  content: "→";
  font-size: 1.1rem;
}

.roadmap-section {
  background: var(--surface);
}

.roadmap-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.roadmap-step {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  border: 1px solid rgba(248, 102, 51, 0.12);
  box-shadow: var(--shadow-soft);
}

.roadmap-step .badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.roadmap-step h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.roadmap-step p {
  margin: 0;
  color: var(--text-700);
}

.author-section {
  padding: 5rem 0;
}

.author-card {
  display: grid;
  gap: 3rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  box-shadow: var(--shadow-card);
}

.author-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.author-content h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.1;
  font-weight: 800;
}

.author-content p {
  margin: 0 0 0.8rem;
  color: var(--text-700);
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.author-links .btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  padding: 0;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 102, 51, 0.14);
  color: var(--primary);
  box-shadow: 0 16px 30px -24px rgba(248, 102, 51, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.author-links .btn-icon i {
  font-size: 1.2rem;
}

.author-links .btn-icon:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 20px 45px -20px rgba(248, 102, 51, 0.75);
}

.social-proof {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
}

.social-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.social-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  font-size: 1.35rem;
}

.social-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.social-card p {
  margin: 0;
  color: var(--text-700);
}

.social-card .link {
  font-weight: 600;
  color: var(--primary);
}

.social-card .link:hover {
  text-decoration: underline;
}

.cta-section {
  padding: 5rem 0;
  margin: 4rem 0;
  background: linear-gradient(135deg, #fff1e9 0%, #ffe0d0 45%, #ffe8db 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 90px -45px rgba(248, 102, 51, 0.55);
  text-align: center;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--primary);
  background: rgba(248, 102, 51, 0.16);
}

.cta-section h2 {
  margin: 1rem 0;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: normal;
}

.cta-section p {
  margin: 0 auto 2rem;
  max-width: 720px;
  color: var(--text-700);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cta-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.75rem;
  color: var(--text-700);
  font-weight: 500;
}

.cta-info span::before {
  content: "•";
  color: var(--primary);
  margin-right: 0.4rem;
}

.cta-info span:first-child::before {
  content: "";
  margin-right: 0;
}

.footer {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, #111827 0%, #1f2937 65%, #0b1120 100%);
  color: #e5e7eb;
  margin-top: 4rem;
}

.footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer a:hover {
  color: #f97316;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 360px;
}

.footer-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  width: fit-content;
}

.footer-description {
  margin: 0;
  color: #cbd5f5;
  font-size: 1rem;
  line-height: 1.7;
}

.footer-links,
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links h3,
.footer-meta h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.footer-links ul,
.footer-meta ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  color: #cbd5f5;
}

.footer-meta ul li {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Chapters page */
.chapters-page {
  background: linear-gradient(180deg, #fff8f1 0%, #ffffff 55%, #f7f8fd 100%);
}

.chapters-hero {
  padding: 4.5rem 0 3.75rem;
  background: radial-gradient(circle at top left, rgba(248, 102, 51, 0.18), transparent 45%),
    radial-gradient(circle at top right, rgba(248, 102, 51, 0.12), transparent 50%);
  text-align: center;
}

.chapters-hero .hero-eyebrow {
  background: rgba(248, 102, 51, 0.16);


}

.chapters-hero h1 {
  margin: 1.25rem auto 1rem;
  max-width: 720px;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: normal;
}

.chapters-hero p {
  margin: 0 auto;
  max-width: 690px;
  color: var(--text-700);
  font-size: 1.1rem;
}

.chapters-hero .hero-actions {
  justify-content: center;
  margin-top: 2.2rem;
}

.chapters-layout {
  display: grid;
  gap: 2.5rem;
  padding: 4rem 0 5rem;
}

.chapters-toc {
  position: sticky;
  top: 120px;
  align-self: start;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  border: 1px solid rgba(248, 102, 51, 0.12);
  box-shadow: var(--shadow-soft);
}

.chapters-toc h2 {
  margin: 0 0 1.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-700);
}

.chapters-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.chapters-toc a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
  color: var(--text-700);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.chapters-toc a span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.chapters-toc a:hover {
  background: rgba(248, 102, 51, 0.08);
  transform: translateX(4px);
}

.chapters-content {
  display: grid;
  gap: 3rem;
  margin-top: 24px;
  /* ajuste conforme necessário (ex: 16px, 32px) */
}

.chapter-article {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.6rem 2.8rem;
  box-shadow: var(--shadow-card);
}

.chapter-article header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.chapter-single-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.chapter-marker {
  width: 48px;
  height: 64px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
  font-size: 2rem;
  flex-shrink: 0;
}

.chapter-heading h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;

}

.chapter-single-header h2 {
  font-size: 3rem;
  line-height: 1.1;
}

.chapter-heading p {
  margin: 0;
  color: var(--text-700);
  font-size: 1.05rem;
}

.chapter-heading-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.chapter-heading-top h2 {
  margin: 0;
}

.chapter-toggle {
  margin-left: auto;
  padding: 0.45rem 0.75rem;
  color: var(--text-500);
}

.chapter-article.is-open .chapter-toggle {
  color: var(--primary);
}

.chapter-body {
  display: grid;
  gap: 0;
  color: var(--text-700);
}

.chapter-body[hidden] {
  display: none !important;
}

.chapter-text {
  margin: 0 0 1.5rem;
  line-height: 1.7;
}

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

.chapter-body>.info-box+.chapter-text,
.chapter-body>.callout+.chapter-text {
  margin-top: 1.5rem;
}

.chapter-body>div+.info-box,
.chapter-body>div+.callout,
.chapter-body>ul+.info-box,
.chapter-body>ul+.callout,
.chapter-body>ol+.info-box,
.chapter-body>ol+.callout {
  margin-top: 1.5rem;
}

.chapter-body>.info-box+h3,
.chapter-body>.callout+h3 {
  margin-top: 1.75rem;
}

.chapter-body h3 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-900);
}

.chapter-body h3:first-child {
  margin-top: 0;
}

.chapter-body h4 {
  margin: 1.8rem 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-900);
}

/* Espaço extra para evitar que o título fique colado em elementos sticky ao navegar via âncoras */
.chapter-article h2,
.chapter-article h3,
.chapter-article h4 {
  scroll-margin-top: 120px;
}

/* Destaque visual minimalista para o item ativo do sumário */
.toc-list .toc-item a.is-active {
  background: transparent;
  /* color: var(--accent-red); */
  color: #1010109a;
  border-left-color: var(--accent-red);
  font-weight: 700;
}

.toc-list .toc-item a.is-active:hover {
  background: rgba(217, 48, 37, 0.04);
}
/* .copy-toast{
  background-color: rgba(44, 41, 41, 0.445);
  position: absolute  ;
  z-index: 999999;
  top: 15%;
  padding: 5px 20px;
  font-size: 14px;
  right: 5%;

} */

/* Destaque persistente do próprio heading ao clicar */
.chapter-article h2.highlighted,
.chapter-article h3.highlighted {
  background: var(--accent-red-soft);
  padding: 0.25rem 0.5rem;
  border-radius: 0px;
  transition: background 0.25s ease, color 0.18s ease;
  color: inherit;

  background-color: #101010;
  color: #f1f1f1;
}

.info-box,
.callout {
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  border-left: 7px solid var(--primary);
  background: rgba(248, 102, 51, 0.08);
  margin: 0;
}

.info-box ol,
.info-box ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.callout.success {
  border-left-color: rgba(46, 204, 113, 0.85);
  background: rgba(46, 204, 113, 0.12);
}

.callout.warning {
  border-left-color: rgba(241, 196, 15, 0.85);
  background: rgba(241, 196, 15, 0.12);
}

.chapter-body ul,
.chapter-body ol {
  padding-left: 1.2rem;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.chapter-body .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
}

.chapter-body .tag-list li {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.chapters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.chapters-actions a {
  flex: 1 1 240px;
}

.chapter-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.chapter-nav {
  flex: 1 1 220px;
}

.chapter-nav:disabled,
.chapter-nav.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.chapter-single-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 3rem;
}

.chapter-single-navigation .btn {
  flex: 1 1 220px;
}

.chapter-single-page {
  background: linear-gradient(180deg, #fff8f1 0%, #ffffff 55%, #f7f8fd 100%);
}

.chapter-topbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  padding: 1rem 0;
}

.chapter-topbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.chapter-home {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--text-700);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.chapter-home svg {
  width: 18px;
  height: 18px;
  color: var(--text-500);
  transition: color 0.2s ease;
}

.chapter-home:hover {
  background: rgba(16, 24, 40, 0.06);
  color: var(--primary);
}

.chapter-home:hover svg {
  color: var(--primary);
}

.chapter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.06);
  color: var(--text-700);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.chapter-single-hero {
  padding: 4rem 0 3.2rem;
  text-align: center;
}

.chapter-single-content {
  /* max-width: 800px; */
  max-width: 100%;

  margin: 3rem auto 4rem;
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.chapter-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-900);
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 15px 40px -22px rgba(248, 102, 51, 0.75);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

.back-to-top:hover {
  transform: translateY(0);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .author-card {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  }

  .social-proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chapters-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .chapters-actions a {
    flex: 0 0 auto;
    min-width: 220px;
  }
}

@media (max-width: 991.98px) {
  .hero {
    text-align: center;
    padding: 5rem 0 6rem;
  }

  .hero-text {
    max-width: 100%;
    gap: 1.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 2rem;
  }

  .stat-value {
    font-size: 2.5rem;
  }

  .hero-floating-card {
    left: 50%;
    transform: translateX(-50%);
    bottom: -1.2rem;
  }

  .chapter-summary-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .chapter-summary-card .card-content {
    flex-direction: column;
  }

  .chapter-summary-link {
    align-self: flex-start;
  }

  .overview-card,
  .feature-card,
  .roadmap-step,
  .author-card {
    padding: 2rem;
  }

  .chapters-toc {
    position: static;
  }

  .chapter-article {
    padding: 2.2rem;
  }
}

@media (max-width: 575.98px) {
  .container {
    width: calc(100% - 2rem);
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }

  .hero {
    padding: 4rem 0 5rem;
  }

  .hero-title {
    font-size: clamp(2.8rem, 7vw, 3.5rem);
    margin: 0.25rem 0 0;
  }

  .hero-text p {
    font-size: 1.1rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .hero-floating-card {
    position: static;
    transform: none;
    margin-top: 1.5rem;
  }

  .section-padding {
    padding: 4rem 0;
  }

  .chapters-preview-card,
  .overview-card,
  .feature-card,
  .roadmap-step,
  .author-card {
    padding: 1.85rem;
  }

  .chapter-article header {
    flex-direction: column;
    gap: 1rem;
  }

  .chapter-single-header {
    flex-direction: column;
    gap: 1rem;
  }

  .chapter-marker {
    width: 42px;
    height: 56px;
  }
}

/* Padding de 5px apenas para os números dos capítulos (TOC e marcadores dos artigos) */
.chapters-toc ol li a span {
  display: inline-block;
  padding: 5px;
  vertical-align: middle;
  border-radius: 4px;
  /* opcional, deixa visual mais agradável */

  text-align: center;
  align-items: center;
  height: auto;

}

/* se quiser garantir que não afete espaçamento do texto ao redor */
.chapters-toc ol li a {
  gap: 0.5rem;
  display: inline-flex;
  align-items: center;

}