/* ==========================================================================
   components.css — Componentes do tema Eliane Malaquias
   --------------------------------------------------------------------------
   Todas as classes prefixadas com `em-` para evitar colisão com o WP admin.
   Importar após tokens.css e base.css.
   ========================================================================== */


/* ==========================================================================
   1. BOTÕES
   Uso: ações primárias e secundárias em qualquer parte do tema.
   ========================================================================== */

.em-btn {
  --_btn-bg: transparent;
  --_btn-fg: currentColor;
  --_btn-bd: transparent;
  --_btn-bg-hover: transparent;
  --_btn-fg-hover: currentColor;
  --_btn-bd-hover: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--em-space-2);
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  font-family: var(--em-font-sans);
  font-size: var(--em-fs-body);
  font-weight: var(--em-fw-semibold);
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--_btn-bd);
  border-radius: var(--em-radius-md);
  background: var(--_btn-bg);
  color: var(--_btn-fg);
  cursor: pointer;
  transition: background var(--em-dur-fast) var(--em-ease-out),
              color      var(--em-dur-fast) var(--em-ease-out),
              border     var(--em-dur-fast) var(--em-ease-out),
              transform  var(--em-dur-fast) var(--em-ease-out);
  white-space: nowrap;
}
.em-btn:hover:not(:disabled) {
  background: var(--_btn-bg-hover);
  color: var(--_btn-fg-hover);
  border-color: var(--_btn-bd-hover);
}
.em-btn:active:not(:disabled) { transform: translateY(1px); }
.em-btn:disabled, .em-btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; pointer-events: none;
}

/* Variações */
.em-btn--primary {
  --_btn-bg: var(--em-color-accent);
  --_btn-fg: var(--em-color-text-on-accent);
  --_btn-bd: var(--em-color-accent);
  --_btn-bg-hover: var(--em-color-accent-hover);
  --_btn-bd-hover: var(--em-color-accent-hover);
}
.em-btn--secondary {
  --_btn-bg: transparent;
  --_btn-fg: var(--em-color-text-strong);
  --_btn-bd: var(--em-color-border-strong);
  --_btn-bg-hover: var(--em-color-text-strong);
  --_btn-fg-hover: var(--em-color-text-on-dark);
  --_btn-bd-hover: var(--em-color-text-strong);
}
.em-btn--ghost {
  --_btn-fg: var(--em-color-text-strong);
  --_btn-bg-hover: var(--em-color-bg-sunken);
}
.em-btn--danger {
  --_btn-bg: var(--em-color-danger);
  --_btn-fg: var(--em-color-text-on-dark);
  --_btn-bd: var(--em-color-danger);
  --_btn-bg-hover: var(--em-rouge-400);
  --_btn-bd-hover: var(--em-rouge-400);
}

/* Tamanhos */
.em-btn--sm { padding: 0.5rem 1rem; font-size: var(--em-fs-body-sm); min-height: 36px; }
.em-btn--lg { padding: 1rem 2rem; font-size: var(--em-fs-body-lg); min-height: 52px; }
.em-btn--block { width: 100%; }

/* Loading */
.em-btn[data-loading="true"] { color: transparent !important; position: relative; }
.em-btn[data-loading="true"]::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--em-color-text-on-accent);
  animation: em-spin 700ms linear infinite;
}
.em-btn--secondary[data-loading="true"]::after,
.em-btn--ghost[data-loading="true"]::after { color: var(--em-color-text-strong); }

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


/* ==========================================================================
   2. LINK INLINE
   ========================================================================== */
.em-link {
  color: var(--em-color-secondary);
  font-weight: var(--em-fw-medium);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--em-dur-fast) var(--em-ease-out);
}
.em-link:hover { color: var(--em-color-accent); }
.em-link--arrow::after {
  content: " →";
  display: inline-block;
  margin-left: 0.2em;
  transition: transform var(--em-dur-fast) var(--em-ease-out);
}
.em-link--arrow:hover::after { transform: translateX(3px); }


/* ==========================================================================
   3. BADGE / TAG
   ========================================================================== */
.em-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--em-space-1);
  padding: 0.25rem 0.625rem;
  font-size: var(--em-fs-caption);
  font-weight: var(--em-fw-semibold);
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
  border-radius: var(--em-radius-pill);
  background: var(--em-color-bg-sunken);
  color: var(--em-color-text);
  border: 1px solid var(--em-color-border);
}
.em-badge--accent  { background: var(--em-color-accent-soft); color: var(--em-clay-700); border-color: transparent; }
.em-badge--success { background: var(--em-color-success-soft); color: var(--em-moss-700); border-color: transparent; }
.em-badge--warning { background: var(--em-color-warning-soft); color: var(--em-amber-600); border-color: transparent; }
.em-badge--danger  { background: var(--em-color-danger-soft); color: var(--em-rouge-600); border-color: transparent; }
.em-badge--info    { background: var(--em-color-info-soft); color: var(--em-azure-600); border-color: transparent; }
.em-badge--solid   { background: var(--em-color-text-strong); color: var(--em-color-text-on-dark); border-color: transparent; }


/* ==========================================================================
   4. DIVIDER
   ========================================================================== */
.em-divider {
  border: 0;
  height: 1px;
  background: var(--em-color-border);
}
.em-divider--ornate {
  display: flex; align-items: center; gap: var(--em-space-4);
  text-align: center; color: var(--em-color-text-muted);
  font-family: var(--em-font-serif); font-style: italic;
}
.em-divider--ornate::before,
.em-divider--ornate::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--em-color-border-strong);
}


/* ==========================================================================
   5. AVATAR
   ========================================================================== */
.em-avatar {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--em-radius-pill);
  background: var(--em-color-bg-sunken);
  color: var(--em-color-text-strong);
  font-family: var(--em-font-serif);
  font-weight: var(--em-fw-medium);
  overflow: hidden;
  border: 1px solid var(--em-color-border);
}
.em-avatar img { width: 100%; height: 100%; object-fit: cover; }
.em-avatar--sm { width: 28px; height: 28px; font-size: 12px; }
.em-avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.em-avatar--xl { width: 96px; height: 96px; font-size: 32px; }


/* ==========================================================================
   6. FORMULÁRIOS
   ========================================================================== */

.em-field { display: flex; flex-direction: column; gap: var(--em-space-2); }

.em-label {
  font-size: var(--em-fs-label);
  font-weight: var(--em-fw-semibold);
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
  color: var(--em-color-text-strong);
}
.em-label__hint {
  display: block;
  font-size: var(--em-fs-caption);
  font-weight: var(--em-fw-regular);
  letter-spacing: 0;
  text-transform: none;
  color: var(--em-color-text-muted);
  margin-top: 2px;
}
.em-label__required { color: var(--em-color-danger); margin-left: 2px; }

.em-input,
.em-textarea,
.em-select {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 48px;
  font-size: var(--em-fs-body);
  color: var(--em-color-text-strong);
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border-strong);
  border-radius: var(--em-radius-md);
  transition: border-color var(--em-dur-fast) var(--em-ease-out),
              box-shadow   var(--em-dur-fast) var(--em-ease-out);
}
.em-input:hover, .em-textarea:hover, .em-select:hover { border-color: var(--em-ink-300); }
.em-input:focus, .em-textarea:focus, .em-select:focus {
  outline: none;
  border-color: var(--em-color-accent);
  box-shadow: 0 0 0 3px var(--em-color-accent-soft);
}
.em-input[aria-invalid="true"],
.em-textarea[aria-invalid="true"],
.em-select[aria-invalid="true"] {
  border-color: var(--em-color-danger);
  box-shadow: 0 0 0 3px var(--em-color-danger-soft);
}

.em-textarea { min-height: 120px; resize: vertical; line-height: var(--em-lh-normal); }

.em-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--em-color-text-muted) 50%),
                    linear-gradient(135deg, var(--em-color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.em-search {
  position: relative;
}
.em-search__icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--em-color-text-muted);
  pointer-events: none;
}
.em-search .em-input { padding-left: 2.5rem; }

.em-help {
  font-size: var(--em-fs-caption);
  color: var(--em-color-text-muted);
}
.em-help--error { color: var(--em-color-danger); font-weight: var(--em-fw-medium); }
.em-help--success { color: var(--em-color-success); font-weight: var(--em-fw-medium); }

/* Checkbox & Radio */
.em-check {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--em-space-3);
  cursor: pointer;
  font-size: var(--em-fs-body-sm);
  color: var(--em-color-text);
  line-height: 1.4;
}
.em-check input { position: absolute; opacity: 0; pointer-events: none; }
.em-check__box {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1.5px solid var(--em-color-border-strong);
  background: var(--em-color-bg-raised);
  border-radius: var(--em-radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--em-dur-fast) var(--em-ease-out);
  margin-top: 1px;
}
.em-check input[type="radio"] + .em-check__box { border-radius: var(--em-radius-pill); }
.em-check input:checked + .em-check__box {
  background: var(--em-color-accent);
  border-color: var(--em-color-accent);
}
.em-check input:checked + .em-check__box::after {
  content: "";
  width: 10px; height: 10px;
  background: var(--em-color-text-on-accent);
}
.em-check input[type="checkbox"]:checked + .em-check__box::after {
  width: 5px; height: 9px;
  background: transparent;
  border: solid var(--em-color-text-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.em-check input[type="radio"]:checked + .em-check__box::after { border-radius: 50%; }
.em-check input:focus-visible + .em-check__box { box-shadow: 0 0 0 3px var(--em-color-accent-soft); }

/* Switch toggle */
.em-switch { display: inline-flex; align-items: center; gap: var(--em-space-3); cursor: pointer; }
.em-switch input { position: absolute; opacity: 0; pointer-events: none; }
.em-switch__track {
  width: 44px; height: 24px;
  background: var(--em-color-border-strong);
  border-radius: var(--em-radius-pill);
  position: relative;
  transition: background var(--em-dur-fast) var(--em-ease-out);
}
.em-switch__track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--em-paper-0);
  border-radius: var(--em-radius-pill);
  box-shadow: var(--em-shadow-sm);
  transition: transform var(--em-dur-base) var(--em-ease-spring);
}
.em-switch input:checked + .em-switch__track { background: var(--em-color-accent); }
.em-switch input:checked + .em-switch__track::after { transform: translateX(20px); }
.em-switch input:focus-visible + .em-switch__track { box-shadow: 0 0 0 3px var(--em-color-accent-soft); }


/* ==========================================================================
   7. CARDS
   ========================================================================== */

.em-card {
  display: flex;
  flex-direction: column;
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-lg);
  overflow: hidden;
  transition: transform var(--em-dur-base) var(--em-ease-out),
              box-shadow var(--em-dur-base) var(--em-ease-out),
              border-color var(--em-dur-base) var(--em-ease-out);
}
.em-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--em-shadow-lg);
  border-color: var(--em-color-border-strong);
}
.em-card__media {
  position: relative;
  background: var(--em-color-bg-sunken);
  overflow: hidden;
}
.em-card__media img { width: 100%; height: 100%; object-fit: cover; }
.em-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-3);
  padding: var(--em-space-6);
  flex: 1;
}
.em-card__kicker {
  font-family: var(--em-font-sans);
  font-size: var(--em-fs-label);
  font-weight: var(--em-fw-semibold);
  letter-spacing: var(--em-tracking-wider);
  text-transform: uppercase;
  color: var(--em-color-accent);
}
.em-card__title {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h3);
  line-height: var(--em-lh-snug);
  color: var(--em-color-text-strong);
  margin: 0;
}
.em-card__title a { color: inherit; text-decoration: none; }
.em-card__title a:hover { color: var(--em-color-accent); }
.em-card__excerpt {
  font-size: var(--em-fs-body-sm);
  color: var(--em-color-text-muted);
  line-height: var(--em-lh-normal);
}
.em-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--em-space-3);
  margin-top: auto;
  padding-top: var(--em-space-4);
}

/* Card de livro: capa em proporção 2:3, sinopse e CTAs */
.em-book-card .em-card__media { aspect-ratio: 2 / 3; }
.em-book-card .em-card__price {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h4);
  color: var(--em-color-text-strong);
  font-weight: var(--em-fw-medium);
}
.em-book-card .em-card__price-from {
  font-size: var(--em-fs-caption);
  color: var(--em-color-text-muted);
  display: block;
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
}

/* Card de curso */
.em-course-card .em-card__media { aspect-ratio: 16 / 10; }
.em-course-card .em-card__meta {
  display: flex; gap: var(--em-space-4);
  font-size: var(--em-fs-caption);
  color: var(--em-color-text-muted);
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
}

/* Card de webinar */
.em-webinar-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--em-space-5);
  padding: var(--em-space-6);
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-lg);
}
.em-webinar-card__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 88px;
  padding: var(--em-space-3);
  background: var(--em-color-text-strong);
  color: var(--em-color-text-on-dark);
  border-radius: var(--em-radius-md);
  font-family: var(--em-font-serif);
}
.em-webinar-card__day { font-size: 2.25rem; line-height: 1; font-weight: var(--em-fw-medium); }
.em-webinar-card__month {
  font-size: var(--em-fs-caption);
  letter-spacing: var(--em-tracking-wider);
  text-transform: uppercase;
  font-family: var(--em-font-sans);
  margin-top: var(--em-space-1);
  color: var(--em-clay-200);
}

/* Card de depoimento */
.em-testimonial {
  display: flex; flex-direction: column;
  gap: var(--em-space-5);
  padding: var(--em-space-8);
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-lg);
  position: relative;
}
.em-testimonial::before {
  content: "\201C";
  position: absolute;
  top: var(--em-space-3); left: var(--em-space-5);
  font-family: var(--em-font-serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--em-color-accent-soft);
  pointer-events: none;
  z-index: 0;
}
.em-testimonial__quote {
  position: relative; z-index: 1;
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-body-lg);
  line-height: var(--em-lh-relaxed);
  color: var(--em-color-text-strong);
  font-style: italic;
}
.em-testimonial__author {
  display: flex; align-items: center; gap: var(--em-space-3);
  margin-top: auto;
}
.em-testimonial__name {
  font-weight: var(--em-fw-semibold);
  color: var(--em-color-text-strong);
}
.em-testimonial__role {
  font-size: var(--em-fs-caption);
  color: var(--em-color-text-muted);
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
}


/* ==========================================================================
   8. NAVEGAÇÃO
   ========================================================================== */

/* Header */
.em-header {
  position: sticky; top: 0;
  z-index: var(--em-z-sticky);
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--em-dur-base) var(--em-ease-out),
              box-shadow var(--em-dur-base) var(--em-ease-out),
              background var(--em-dur-base) var(--em-ease-out);
}
.em-header[data-scrolled="true"] {
  background: rgba(250, 246, 239, 0.95);
  border-bottom-color: var(--em-color-border);
  box-shadow: 0 1px 0 rgba(31, 28, 24, 0.02), 0 8px 24px -16px rgba(31, 28, 24, 0.12);
}
.em-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--em-space-6);
  min-height: 80px;
  padding-block: var(--em-space-3);
}
.em-header__brand { display: flex; align-items: center; }
.em-header__brand-link {
  display: inline-flex; align-items: center; gap: var(--em-space-3);
  text-decoration: none;
  color: inherit;
}
.em-header__brand-mark {
  width: 40px; height: 40px;
  border-radius: var(--em-radius-pill);
  background: var(--em-color-text-strong);
  color: var(--em-color-text-on-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: var(--em-fw-medium);
  letter-spacing: 0.06em;
  font-family: var(--em-font-serif);
  flex-shrink: 0;
}
.em-header__brand-text {
  display: inline-flex; flex-direction: column;
  line-height: 1.15;
}
.em-header__brand-name {
  font-family: var(--em-font-serif);
  font-size: 1.25rem;
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text-strong);
  letter-spacing: var(--em-tracking-tight);
}
.em-header__brand-subtitle {
  font-family: var(--em-font-sans);
  font-size: 0.72rem;
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text-muted, var(--em-color-text));
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}
@media (max-width: 30rem) {
  .em-header__brand-subtitle { display: none; }
  .em-header__brand-name { font-size: 1.125rem; }
}
.em-header__nav { display: none; }
.em-header__actions { display: flex; align-items: center; gap: var(--em-space-3); }
.em-header__menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--em-radius-md);
  color: var(--em-color-text-strong);
}
.em-header__menu-btn:hover { background: var(--em-color-bg-sunken); }

@media (min-width: 64rem) {
  .em-header__nav {
    display: flex; align-items: center; gap: var(--em-space-2);
  }
  .em-header__menu-btn { display: none; }
}

.em-nav-link {
  padding: 0.5rem 0.875rem;
  font-size: var(--em-fs-body-sm);
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text);
  text-decoration: none;
  border-radius: var(--em-radius-sm);
  transition: color var(--em-dur-fast) var(--em-ease-out),
              background var(--em-dur-fast) var(--em-ease-out);
}
.em-nav-link:hover { color: var(--em-color-text-strong); background: var(--em-color-bg-sunken); }
.em-nav-link[aria-current="page"] {
  color: var(--em-color-text-strong);
  position: relative;
}
.em-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 4px; left: 0.875rem; right: 0.875rem;
  height: 2px;
  background: var(--em-color-accent);
  border-radius: 2px;
}

/* Mobile drawer */
.em-mobile-drawer {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--em-color-bg);
  z-index: var(--em-z-overlay);
  padding: var(--em-space-6);
  display: flex; flex-direction: column; gap: var(--em-space-2);
  transform: translateX(100%);
  transition: transform var(--em-dur-base) var(--em-ease-out);
  overflow-y: auto;
}
.em-mobile-drawer[data-open="true"] { transform: translateX(0); }
.em-mobile-drawer .em-nav-link {
  padding: var(--em-space-4);
  font-size: var(--em-fs-h4);
  font-family: var(--em-font-serif);
  border-bottom: 1px solid var(--em-color-border);
  border-radius: 0;
}

/* Footer */
.em-footer {
  background: var(--em-color-bg-inverse);
  color: var(--em-color-text-on-dark);
  padding-block: var(--em-space-16) var(--em-space-8);
}
.em-footer h4 {
  color: var(--em-color-text-on-dark);
  font-family: var(--em-font-sans);
  font-size: var(--em-fs-label);
  font-weight: var(--em-fw-semibold);
  letter-spacing: var(--em-tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--em-space-4);
}
.em-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-space-10);
}
@media (min-width: 48rem) {
  .em-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.em-footer a {
  color: var(--em-ink-200);
  text-decoration: none;
  display: inline-block;
  padding: 0.25rem 0;
  font-size: var(--em-fs-body-sm);
}
.em-footer a:hover { color: var(--em-clay-200); }
.em-footer__bottom {
  margin-top: var(--em-space-12);
  padding-top: var(--em-space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; gap: var(--em-space-4);
  justify-content: space-between;
  font-size: var(--em-fs-caption);
  color: var(--em-ink-300);
}

/* Breadcrumb */
.em-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--em-space-2);
  font-size: var(--em-fs-body-sm);
  color: var(--em-color-text-muted);
}
.em-breadcrumb a { color: inherit; text-decoration: none; }
.em-breadcrumb a:hover { color: var(--em-color-accent); }
.em-breadcrumb__sep { color: var(--em-color-text-subtle); }
.em-breadcrumb [aria-current="page"] { color: var(--em-color-text-strong); font-weight: var(--em-fw-medium); }

/* Pagination */
.em-pagination {
  display: flex; align-items: center; gap: var(--em-space-1);
  list-style: none; padding: 0;
}
.em-pagination a, .em-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 0.75rem;
  font-size: var(--em-fs-body-sm);
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text);
  border: 1px solid transparent;
  border-radius: var(--em-radius-sm);
  text-decoration: none;
}
.em-pagination a:hover { background: var(--em-color-bg-sunken); color: var(--em-color-text-strong); }
.em-pagination [aria-current="page"] {
  background: var(--em-color-text-strong);
  color: var(--em-color-text-on-dark);
}
.em-pagination__ellipsis { color: var(--em-color-text-subtle); }

/* Tabs */
.em-tabs {
  display: flex; gap: var(--em-space-2);
  border-bottom: 1px solid var(--em-color-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.em-tabs::-webkit-scrollbar { display: none; }
.em-tabs button, .em-tabs a {
  padding: var(--em-space-3) var(--em-space-4);
  font-size: var(--em-fs-body-sm);
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text-muted);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--em-dur-fast) var(--em-ease-out),
              border-color var(--em-dur-fast) var(--em-ease-out);
}
.em-tabs button:hover, .em-tabs a:hover { color: var(--em-color-text-strong); }
.em-tabs [aria-selected="true"], .em-tabs [aria-current="page"] {
  color: var(--em-color-text-strong);
  border-bottom-color: var(--em-color-accent);
}

/* Stepper */
.em-stepper {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 0;
  counter-reset: em-step;
}
.em-stepper li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--em-space-3);
  font-size: var(--em-fs-body-sm);
  color: var(--em-color-text-muted);
  position: relative;
  padding-bottom: var(--em-space-3);
}
.em-stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px; left: 32px; right: var(--em-space-3);
  height: 2px;
  background: var(--em-color-border);
}
.em-stepper__dot {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--em-radius-pill);
  background: var(--em-color-bg-raised);
  border: 1.5px solid var(--em-color-border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--em-fs-body-sm);
  font-weight: var(--em-fw-semibold);
  color: var(--em-color-text-muted);
  position: relative; z-index: 1;
}
.em-stepper li[aria-current="step"] { color: var(--em-color-text-strong); font-weight: var(--em-fw-semibold); }
.em-stepper li[aria-current="step"] .em-stepper__dot {
  background: var(--em-color-accent);
  border-color: var(--em-color-accent);
  color: var(--em-color-text-on-accent);
}
.em-stepper li[data-complete="true"] .em-stepper__dot {
  background: var(--em-color-text-strong);
  border-color: var(--em-color-text-strong);
  color: var(--em-color-text-on-dark);
}
.em-stepper li[data-complete="true"]:not(:last-child)::after { background: var(--em-color-text-strong); }


/* ==========================================================================
   9. FEEDBACK
   ========================================================================== */

/* Toast */
.em-toast {
  display: flex; align-items: flex-start; gap: var(--em-space-3);
  padding: var(--em-space-4) var(--em-space-5);
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border);
  border-left: 4px solid var(--em-color-info);
  border-radius: var(--em-radius-md);
  box-shadow: var(--em-shadow-lg);
  max-width: 420px;
}
.em-toast__icon { flex-shrink: 0; color: var(--em-color-info); margin-top: 2px; }
.em-toast__title { font-weight: var(--em-fw-semibold); color: var(--em-color-text-strong); }
.em-toast__body { font-size: var(--em-fs-body-sm); color: var(--em-color-text-muted); margin-top: 2px; }
.em-toast--success { border-left-color: var(--em-color-success); }
.em-toast--success .em-toast__icon { color: var(--em-color-success); }
.em-toast--warning { border-left-color: var(--em-color-warning); }
.em-toast--warning .em-toast__icon { color: var(--em-color-warning); }
.em-toast--danger { border-left-color: var(--em-color-danger); }
.em-toast--danger .em-toast__icon { color: var(--em-color-danger); }

/* Modal */
.em-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 16, 12, 0.55);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--em-space-4);
  z-index: var(--em-z-modal);
}
.em-modal {
  width: 100%; max-width: 480px;
  background: var(--em-color-bg-raised);
  border-radius: var(--em-radius-xl);
  box-shadow: var(--em-shadow-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.em-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--em-space-5) var(--em-space-6);
  border-bottom: 1px solid var(--em-color-border);
}
.em-modal__title {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h3);
  margin: 0;
}
.em-modal__close {
  width: 36px; height: 36px;
  border-radius: var(--em-radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--em-color-text-muted);
}
.em-modal__close:hover { background: var(--em-color-bg-sunken); color: var(--em-color-text-strong); }
.em-modal__body {
  padding: var(--em-space-6);
  overflow-y: auto;
  color: var(--em-color-text);
  line-height: var(--em-lh-normal);
}
.em-modal__footer {
  display: flex; gap: var(--em-space-3); justify-content: flex-end;
  padding: var(--em-space-5) var(--em-space-6);
  border-top: 1px solid var(--em-color-border);
  background: var(--em-color-bg-sunken);
}

/* Skeleton */
.em-skeleton {
  background: linear-gradient(90deg,
    var(--em-color-bg-sunken) 0%,
    var(--em-paper-200) 50%,
    var(--em-color-bg-sunken) 100%);
  background-size: 200% 100%;
  border-radius: var(--em-radius-sm);
  animation: em-shimmer 1.4s var(--em-ease-in-out) infinite;
}
@keyframes em-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.em-skeleton--line { height: 1em; }
.em-skeleton--title { height: 1.5em; width: 70%; }
.em-skeleton--block { aspect-ratio: 16/9; }

/* Empty state */
.em-empty {
  text-align: center;
  padding: var(--em-space-16) var(--em-space-6);
  color: var(--em-color-text-muted);
}
.em-empty__icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--em-space-5);
  color: var(--em-color-text-subtle);
}
.em-empty__title {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h3);
  color: var(--em-color-text-strong);
  margin-bottom: var(--em-space-2);
}

/* Spinner */
.em-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2.5px solid var(--em-color-border-strong);
  border-top-color: var(--em-color-accent);
  border-radius: 50%;
  animation: em-spin 700ms linear infinite;
}
.em-spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.em-spinner--lg { width: 40px; height: 40px; border-width: 3px; }


/* ==========================================================================
   10. SEÇÕES DE PÁGINA
   ========================================================================== */

/* Hero institucional */
.em-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-space-10);
  align-items: center;
  padding-block: var(--em-space-16);
}
@media (min-width: 64rem) {
  .em-hero { grid-template-columns: 1.1fr 0.9fr; gap: var(--em-space-16); padding-block: var(--em-space-24); }
}
.em-hero__title {
  font-size: var(--em-fs-display);
  font-family: var(--em-font-serif);
  font-weight: var(--em-fw-medium);
  letter-spacing: var(--em-tracking-tight);
  line-height: var(--em-lh-tight);
  color: var(--em-color-text-strong);
}
.em-hero__title em {
  font-style: italic;
  color: var(--em-color-accent);
}
.em-hero__lede {
  font-size: var(--em-fs-body-lg);
  line-height: var(--em-lh-relaxed);
  color: var(--em-color-text-muted);
  max-width: 36rem;
  margin-top: var(--em-space-6);
}
.em-hero__media {
  aspect-ratio: 4 / 5;
  border-radius: var(--em-radius-xl);
  background: var(--em-color-bg-sunken);
  position: relative;
  overflow: hidden;
}

/* Hero conversão (landing) */
.em-hero-conv {
  background: var(--em-color-bg-inverse);
  color: var(--em-color-text-on-dark);
  padding-block: var(--em-space-16);
  border-radius: var(--em-radius-2xl);
  overflow: hidden;
  position: relative;
}
.em-hero-conv .em-hero__title { color: var(--em-color-text-on-dark); }
.em-hero-conv .em-hero__title em { color: var(--em-clay-200); }
.em-hero-conv .em-hero__lede { color: var(--em-ink-200); }

/* CTA section */
.em-cta-section {
  padding: var(--em-space-12);
  background: var(--em-color-text-strong);
  color: var(--em-color-text-on-dark);
  border-radius: var(--em-radius-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.em-cta-section::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at 80% 0%, rgba(194, 100, 73, 0.25), transparent 40%);
  pointer-events: none;
}
.em-cta-section h2 {
  color: var(--em-color-text-on-dark);
  font-size: var(--em-fs-h1);
  max-width: 32rem;
  margin: 0 auto var(--em-space-4);
  position: relative;
}
.em-cta-section p {
  color: var(--em-ink-200);
  max-width: 32rem;
  margin: 0 auto var(--em-space-8);
  position: relative;
}

/* FAQ Accordion */
.em-faq { display: flex; flex-direction: column; }
.em-faq__item {
  border-bottom: 1px solid var(--em-color-border);
}
.em-faq__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--em-space-4);
  padding: var(--em-space-5) 0;
  text-align: left;
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h4);
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text-strong);
}
.em-faq__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--em-radius-pill);
  border: 1px solid var(--em-color-border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--em-dur-base) var(--em-ease-out),
              background var(--em-dur-base) var(--em-ease-out);
}
.em-faq__item[data-open="true"] .em-faq__icon {
  transform: rotate(45deg);
  background: var(--em-color-accent);
  border-color: var(--em-color-accent);
  color: var(--em-color-text-on-accent);
}
.em-faq__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--em-dur-slow) var(--em-ease-in-out);
}
.em-faq__panel-inner {
  padding: 0 0 var(--em-space-6);
  color: var(--em-color-text-muted);
  line-height: var(--em-lh-relaxed);
  max-width: 50rem;
}
.em-faq__item[data-open="true"] .em-faq__panel { max-height: 600px; }

/* Timeline */
.em-timeline {
  list-style: none;
  padding: 0;
  display: flex; flex-direction: column;
  gap: var(--em-space-8);
  position: relative;
}
.em-timeline::before {
  content: "";
  position: absolute;
  top: 6px; bottom: 6px; left: 11px;
  width: 1px;
  background: var(--em-color-border-strong);
}
.em-timeline li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--em-space-5);
  align-items: flex-start;
}
.em-timeline__dot {
  width: 24px; height: 24px;
  border-radius: var(--em-radius-pill);
  background: var(--em-color-bg);
  border: 2px solid var(--em-color-accent);
  position: relative; z-index: 1;
  margin-top: 4px;
}
.em-timeline__year {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h4);
  color: var(--em-color-accent);
  margin-bottom: var(--em-space-1);
}
.em-timeline__title {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h3);
  color: var(--em-color-text-strong);
  margin-bottom: var(--em-space-2);
}
.em-timeline__body {
  color: var(--em-color-text-muted);
  line-height: var(--em-lh-normal);
}

/* Countdown */
.em-countdown {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-3);
}
.em-countdown__cells {
  display: flex;
  gap: var(--em-space-3);
  flex-wrap: wrap;
}
.em-countdown__cell {
  flex: 1 1 60px;
  min-width: 56px;
  text-align: center;
  padding: var(--em-space-3) var(--em-space-2);
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-md);
}
.em-countdown__value {
  display: block;
  font-family: var(--em-font-serif);
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text-strong);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.em-countdown__label {
  display: block;
  margin-top: var(--em-space-1);
  font-size: 0.6875rem;
  letter-spacing: var(--em-tracking-wider);
  text-transform: uppercase;
  color: var(--em-color-text-muted);
}

/* Section headline */
.em-section-head {
  display: flex; flex-direction: column; gap: var(--em-space-3);
  max-width: 44rem;
  margin-bottom: var(--em-space-12);
}
.em-section-head--center {
  text-align: center;
  margin-inline: auto;
}

/* Grid de cards */
.em-grid {
  display: grid;
  gap: var(--em-space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .em-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .em-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  .em-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .em-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 40rem) {
  .em-grid--4 { grid-template-columns: repeat(2, 1fr); }
}


/* ==========================================================================
   11. FAB WHATSAPP
   ========================================================================== */
.em-fab-wa {
  position: fixed;
  bottom: var(--em-space-5);
  right: var(--em-space-5);
  width: 56px; height: 56px;
  border-radius: var(--em-radius-pill);
  background: #25D366;
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--em-shadow-lg);
  z-index: var(--em-z-sticky);
  text-decoration: none;
  transition: transform var(--em-dur-base) var(--em-ease-spring);
}
.em-fab-wa:hover { transform: scale(1.06); color: white; }


/* ==========================================================================
   12. DASHBOARD DO ALUNO
   ========================================================================== */

.em-progress {
  width: 100%;
  height: 8px;
  background: var(--em-color-bg-sunken);
  border-radius: var(--em-radius-pill);
  overflow: hidden;
}
.em-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--em-color-accent), var(--em-clay-300));
  border-radius: inherit;
  transition: width var(--em-dur-slow) var(--em-ease-out);
}

.em-lesson-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--em-space-2); }
.em-lesson {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--em-space-4);
  align-items: center;
  padding: var(--em-space-4) var(--em-space-5);
  background: var(--em-color-bg-raised);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--em-dur-fast) var(--em-ease-out),
              background var(--em-dur-fast) var(--em-ease-out);
}
.em-lesson:hover { border-color: var(--em-color-border-strong); background: var(--em-color-bg-sunken); color: inherit; }
.em-lesson__status {
  width: 32px; height: 32px;
  border-radius: var(--em-radius-pill);
  background: var(--em-color-bg-sunken);
  border: 1.5px solid var(--em-color-border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--em-color-text-muted);
}
.em-lesson__title {
  font-weight: var(--em-fw-medium);
  color: var(--em-color-text-strong);
  font-size: var(--em-fs-body);
}
.em-lesson__meta {
  font-size: var(--em-fs-caption);
  color: var(--em-color-text-muted);
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
}
.em-lesson[data-state="done"] .em-lesson__status {
  background: var(--em-color-success);
  border-color: var(--em-color-success);
  color: white;
}
.em-lesson[data-state="current"] {
  border-color: var(--em-color-accent);
  background: var(--em-color-accent-soft);
}
.em-lesson[data-state="current"] .em-lesson__status {
  background: var(--em-color-accent);
  border-color: var(--em-color-accent);
  color: var(--em-color-text-on-accent);
}
.em-lesson[data-state="locked"] { opacity: 0.55; pointer-events: none; }
.em-lesson[data-state="locked"] .em-lesson__title { color: var(--em-color-text-muted); }


/* ── Single do livro — componentes ────────────────────────────────────────── */

/* Section tight (menos padding vertical) */
.em-section--tight { padding-block: var(--em-space-10); }

/* Book hero */
.em-book-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-space-10);
  align-items: start;
}
@media (min-width: 64rem) {
  .em-book-hero { grid-template-columns: minmax(220px, 300px) 1fr; gap: var(--em-space-16); }
}
.em-book-hero__cover-col { position: sticky; top: var(--em-space-10); }
@media (max-width: 64rem) { .em-book-hero__cover-col { position: static; max-width: 280px; margin-inline: auto; } }
.em-book-hero__cover {
  border-radius: var(--em-radius-md);
  overflow: hidden;
  box-shadow: 0 24px 60px -16px rgba(20, 16, 12, 0.35), 0 2px 8px rgba(20, 16, 12, 0.12);
  aspect-ratio: 2 / 3;
  background: var(--em-color-bg-sunken);
}
.em-book-hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.em-book-hero__body {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-8);
}
.em-book-hero__heading { display: flex; flex-direction: column; gap: var(--em-space-3); }
.em-book-hero__author {
  font-family: var(--em-font-sans);
  font-size: var(--em-fs-label);
  font-weight: 600;
  letter-spacing: var(--em-tracking-wider);
  text-transform: uppercase;
  color: var(--em-color-accent);
}
.em-book-hero__title {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h1);
  line-height: 1.1;
  letter-spacing: var(--em-tracking-tight);
  color: var(--em-color-text-strong);
  margin: 0;
}
.em-book-hero__subtitle {
  font-family: var(--em-font-serif);
  font-style: italic;
  font-size: var(--em-fs-h4);
  color: var(--em-color-text-muted);
  margin: 0;
}
.em-book-hero__lede { margin: 0; font-size: var(--em-fs-body-lg); }

/* Rating */
.em-rating { display: inline-flex; align-items: center; gap: var(--em-space-3); }
.em-rating__stars { display: inline-flex; gap: 2px; color: var(--em-clay-400); }
.em-rating__text { font-size: var(--em-fs-body-sm); color: var(--em-color-text-muted); }

/* Buybox */
.em-buybox {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-6);
  padding: var(--em-space-7);
  background: var(--em-color-bg-sunken);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-md);
}
.em-buybox__price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--em-space-3); }
.em-buybox__price {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h2);
  font-weight: 600;
  color: var(--em-color-text-strong);
  line-height: 1;
}
.em-buybox__price-old {
  font-size: var(--em-fs-body);
  color: var(--em-color-text-subtle);
  text-decoration: line-through;
}
.em-buybox__installments { font-size: var(--em-fs-body-sm); color: var(--em-color-text-muted); }
.em-buybox__assurances { display: flex; flex-direction: column; gap: var(--em-space-2); }
.em-buybox__assurance {
  display: inline-flex; align-items: center; gap: var(--em-space-2);
  font-size: var(--em-fs-body-sm); color: var(--em-color-text-muted);
}
.em-buybox__assurance svg { color: var(--em-color-accent); flex-shrink: 0; }

/* Format selector */
.em-format { display: flex; flex-direction: column; gap: var(--em-space-3); }
.em-format__options { display: grid; grid-template-columns: 1fr; gap: var(--em-space-3); }
@media (min-width: 32rem) { .em-format__options { grid-template-columns: 1fr 1fr; } }
.em-format__option {
  display: flex; flex-direction: column; gap: var(--em-space-1);
  padding: var(--em-space-4);
  background: var(--em-paper-50, #fff);
  border: 1px solid var(--em-color-border);
  border-radius: var(--em-radius-sm);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.em-format__option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.em-format__option:has(input:checked) {
  border-color: var(--em-color-accent);
  box-shadow: 0 0 0 1px var(--em-color-accent);
}
.em-format__name { font-weight: 600; color: var(--em-color-text-strong); font-size: var(--em-fs-body); }
.em-format__price { font-size: var(--em-fs-body-sm); color: var(--em-color-text-muted); }

/* Specs strip */
.em-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--em-space-6);
  padding-block: var(--em-space-8);
  border-block: 1px solid var(--em-color-border);
}
@media (min-width: 48rem) { .em-specs { grid-template-columns: repeat(4, 1fr); } }
.em-spec { display: flex; flex-direction: column; gap: var(--em-space-1); }
.em-spec__label {
  font-size: var(--em-fs-caption); font-weight: 600;
  letter-spacing: var(--em-tracking-wider); text-transform: uppercase;
  color: var(--em-color-text-muted);
}
.em-spec__value { font-family: var(--em-font-serif); font-size: var(--em-fs-h4); color: var(--em-color-text-strong); }

/* Pullquote */
.em-pullquote {
  font-family: var(--em-font-serif);
  font-style: italic;
  font-size: var(--em-fs-h3);
  line-height: 1.4;
  color: var(--em-color-text-strong);
  border-left: 3px solid var(--em-color-accent);
  padding-left: var(--em-space-6);
  margin: 0;
}
.em-pullquote cite {
  display: block;
  margin-top: var(--em-space-4);
  font-family: var(--em-font-sans);
  font-style: normal;
  font-size: var(--em-fs-label);
  font-weight: 600;
  letter-spacing: var(--em-tracking-wide);
  text-transform: uppercase;
  color: var(--em-color-text-muted);
}

/* Checklist */
.em-checklist { display: grid; grid-template-columns: 1fr; gap: var(--em-space-6); margin-top: var(--em-space-8); }
@media (min-width: 48rem) { .em-checklist { grid-template-columns: 1fr 1fr; gap: var(--em-space-8); } }
.em-checklist__item { display: flex; gap: var(--em-space-4); align-items: flex-start; }
.em-checklist__icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--em-color-accent-soft);
  color: var(--em-color-accent);
  border-radius: 999px;
}
.em-checklist__text { margin: 0; }
.em-checklist__text strong {
  display: block; font-family: var(--em-font-serif);
  font-size: var(--em-fs-h4); font-weight: 600;
  color: var(--em-color-text-strong); margin-bottom: var(--em-space-1);
}
.em-checklist__text span { color: var(--em-color-text-muted); font-size: var(--em-fs-body); }

/* Sumário (TOC) */
.em-toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--em-space-6);
  border-top: 1px solid var(--em-color-border);
}
@media (min-width: 48rem) { .em-toc { grid-template-columns: 1fr 1fr; column-gap: var(--em-space-10); } }
.em-toc__item {
  display: flex; align-items: baseline; gap: var(--em-space-4);
  padding-block: var(--em-space-4);
  border-bottom: 1px solid var(--em-color-border);
}
.em-toc__num {
  font-family: var(--em-font-serif);
  font-size: var(--em-fs-h4);
  color: var(--em-color-accent);
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
}
.em-toc__title { font-size: var(--em-fs-body-lg); color: var(--em-color-text-strong); }

/* Author strip */
.em-author-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-space-8);
  align-items: center;
}
@media (min-width: 48rem) { .em-author-strip { grid-template-columns: minmax(220px, 280px) 1fr; gap: var(--em-space-12); } }
.em-author-strip__photo {
  aspect-ratio: 4 / 5;
  background: var(--em-color-bg-sunken);
  border-radius: var(--em-radius-md);
  overflow: hidden;
}
.em-author-strip__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Grid "Outros livros" — adapta ao número real de itens, evita "buracos" */
.em-grid--books-outros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--em-space-8) var(--em-space-6);
}
.em-grid--books-outros .em-book-card {
  flex: 1 1 240px;
  max-width: 300px;
  min-width: 0;
}
.em-grid--books-outros .em-card__body { padding: var(--em-space-5); gap: var(--em-space-3); }
.em-grid--books-outros .em-card__title { font-size: var(--em-fs-h5); line-height: 1.25; }
.em-grid--books-outros .em-card__excerpt {
  font-size: var(--em-fs-body-sm);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 48rem) {
  .em-grid--books-outros .em-book-card { max-width: 240px; }
}
