/* ==========================================================================
   Estilos Personalizados - Documentação Extensão Fact-Checking YouTube
   Acessibilidade (WCAG 2.1 AA), Usabilidade (Nielsen) e Animações Suaves
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Variáveis de Movimento, Física e Transição Fluida
   -------------------------------------------------------------------------- */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --trans-fast: 0.15s var(--ease-smooth);
  --trans-normal: 0.24s var(--ease-out-expo);
  --trans-slow: 0.38s var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   1. Transição Suave e Limpa entre Páginas (navigation.instant & View Transitions)
   -------------------------------------------------------------------------- */
.md-content__inner {
  animation: pageFadeIn 0.22s var(--ease-out-expo) forwards;
}

@keyframes pageFadeIn {
  0% {
    opacity: 0.85;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* View Transitions nativas para navegadores com suporte */
@supports (view-transition-name: root) {
  ::view-transition-old(root) {
    animation: 0.15s var(--ease-out-expo) both pageFadeOut;
  }
  ::view-transition-new(root) {
    animation: 0.22s var(--ease-out-expo) both pageFadeIn;
  }
}

@keyframes pageFadeOut {
  from { opacity: 1; }
  to { opacity: 0.88; }
}

/* Barra de progresso com gradiente suave e brilho sutil */
.md-progress {
  background: linear-gradient(90deg, #e50914, #ff9800) !important;
  height: 2.5px !important;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.45);
  transition: width 0.25s var(--ease-out-expo);
}

/* Scrollbar fina, discreta e elegante em todo o documento */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 120, 120, 0.28) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(120, 120, 120, 0.28);
  border-radius: 6px;
  transition: background-color var(--trans-fast);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(120, 120, 120, 0.48);
}

[data-md-color-scheme="slate"] * {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

/* Transições universais para interatividade */
a, 
button, 
.md-nav__link, 
.md-tabs__link,
.md-search__input,
.md-clipboard {
  transition: color var(--trans-fast), 
              background-color var(--trans-fast), 
              border-color var(--trans-fast), 
              opacity var(--trans-fast), 
              transform var(--trans-fast), 
              box-shadow var(--trans-fast);
}

/* Respeito estrito a usuários com preferência de movimento reduzido (WCAG 2.1 AA) */
@media (prefers-reduced-motion: reduce) {
  *, 
  *::before, 
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   2. Acessibilidade e Foco Visível (WCAG 2.1 AA - Critério 2.4.7)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--md-accent-fg-color, #e50914) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

::selection {
  background-color: rgba(229, 9, 20, 0.22);
  color: inherit;
}

/* --------------------------------------------------------------------------
   3. Aprimoramento Visual das Imagens e Mockups
   -------------------------------------------------------------------------- */
.md-content figure,
.md-content p > img {
  border-radius: 10px;
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  display: block;
  margin: 1.75rem auto;
  max-width: 100%;
  height: auto;
  transition: box-shadow var(--trans-normal), transform var(--trans-normal);
}

[data-md-color-scheme="slate"] .md-content figure,
[data-md-color-scheme="slate"] .md-content p > img {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.md-content figure:hover,
.md-content p > img:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

[data-md-color-scheme="slate"] .md-content figure:hover,
[data-md-color-scheme="slate"] .md-content p > img:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}

.md-content figcaption,
.md-content figure > em {
  display: block;
  text-align: center;
  font-size: 0.83rem;
  font-style: italic;
  color: var(--md-default-fg-color--light);
  margin-top: 0.6rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   4. Citações e Declarações de Usuários (Blockquotes)
   -------------------------------------------------------------------------- */
.md-typeset blockquote {
  border-left: 3.5px solid var(--md-primary-fg-color, #e50914);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background-color: var(--md-default-bg-color--lighter, rgba(0, 0, 0, 0.02));
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--md-default-fg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: border-color var(--trans-fast), background-color var(--trans-fast);
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  background-color: rgba(255, 255, 255, 0.03);
  border-left-color: var(--md-primary-fg-color, #e50914);
}

.md-typeset blockquote:hover {
  border-left-color: var(--md-accent-fg-color, #ff9800);
}

/* --------------------------------------------------------------------------
   5. Diagramas Mermaid Responsivos e Legíveis (Heurística de Nielsen #8)
   -------------------------------------------------------------------------- */
.mermaid {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.5rem 1rem;
  margin: 1.75rem 0;
  border-radius: 10px;
  background-color: var(--md-default-bg-color--lighter, rgba(0, 0, 0, 0.015));
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  -webkit-overflow-scrolling: touch;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

[data-md-color-scheme="slate"] .mermaid {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

.mermaid:hover {
  border-color: rgba(229, 9, 20, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.mermaid svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   6. Tabelas Elegantes com Hover e Transição Suave
   -------------------------------------------------------------------------- */
.md-typeset table:not([class]) {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  margin: 1.75rem 0;
  font-size: 0.88rem;
  line-height: 1.55;
  width: 100%;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-default-bg-color--lighter, rgba(0, 0, 0, 0.03));
  font-weight: 600;
  border-bottom: 2px solid var(--md-default-fg-color--lightest);
  letter-spacing: 0.015em;
  padding: 0.75rem 0.9rem;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: rgba(255, 255, 255, 0.04);
}

.md-typeset table:not([class]) td {
  padding: 0.65rem 0.9rem;
  transition: background-color var(--trans-fast);
}

.md-typeset table:not([class]) tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.015);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Efeito de destaque suave ao passar o cursor pela linha */
.md-typeset table:not([class]) tr:hover td {
  background-color: rgba(229, 9, 20, 0.04) !important;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

/* --------------------------------------------------------------------------
   7. Cartões e Badges de Requisitos
   -------------------------------------------------------------------------- */
.badge-must,
.badge-should,
.badge-in {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.badge-must:hover,
.badge-should:hover,
.badge-in:hover {
  transform: translateY(-1px);
}

.badge-must {
  background-color: rgba(211, 47, 47, 0.12);
  color: #c62828;
  border: 1px solid rgba(211, 47, 47, 0.3);
}

[data-md-color-scheme="slate"] .badge-must {
  background-color: rgba(239, 83, 80, 0.2);
  color: #ef9a9a;
  border-color: rgba(239, 83, 80, 0.4);
}

.badge-should {
  background-color: rgba(245, 124, 0, 0.12);
  color: #e65100;
  border: 1px solid rgba(245, 124, 0, 0.3);
}

[data-md-color-scheme="slate"] .badge-should {
  background-color: rgba(255, 167, 38, 0.2);
  color: #ffcc80;
  border-color: rgba(255, 167, 38, 0.4);
}

.badge-in {
  background-color: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.3);
}

[data-md-color-scheme="slate"] .badge-in {
  background-color: rgba(102, 187, 106, 0.2);
  color: #a5d6a7;
  border-color: rgba(102, 187, 106, 0.4);
}

/* --------------------------------------------------------------------------
   8. Cabeçalho e Navegação Superior por Abas (Tabs) - Uniforme, Centralizado e Clean
   -------------------------------------------------------------------------- */
.md-header {
  height: 3rem !important;
  background-color: #d32f2f !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.md-header__inner {
  height: 3rem !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 1.25rem !important;
}

.md-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0.2rem !important;
}

.md-header__title {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  margin: 0 0.75rem !important;
}

.md-header__ellipsis {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.md-header__topic {
  display: flex !important;
  align-items: center !important;
  font-size: 0.94rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: normal !important;
  margin: 0 !important;
  padding: 0 !important;
}

.md-header__button {
  padding: 0.25rem !important;
  margin: 0 0.15rem !important;
}

/* Barra de Abas (Tabs) - Apenas em Telas Grandes (Desktop >= 1220px) */
@media screen and (min-width: 76.25em) {
  .md-tabs {
    height: auto !important;
    min-height: unset !important;
    padding: 0.25rem 0 0.45rem 0 !important;
    background-color: #d32f2f !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    overflow: visible !important;
  }

  .md-tabs__list {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.55rem !important;
    margin: 0 auto !important;
    max-width: 1200px !important;
    padding: 0 1rem !important;
  }

  .md-tabs__item {
    height: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .md-tabs__link {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    padding: 0.28rem 0.95rem !important;
    line-height: 1.3 !important;
    border-radius: 9999px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: transparent !important;
    opacity: 1 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .md-tabs__link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.18) !important;
    transform: translateY(-1px) !important;
  }

  .md-tabs__item--active .md-tabs__link,
  .md-tabs__link--active {
    color: #b71c1c !important;
    font-weight: 700 !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
  }

  [data-md-color-scheme="slate"] .md-tabs {
    background-color: #1e293b !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  }

  [data-md-color-scheme="slate"] .md-tabs__link {
    color: #94a3b8 !important;
  }

  [data-md-color-scheme="slate"] .md-tabs__link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
  }

  [data-md-color-scheme="slate"] .md-tabs__item--active .md-tabs__link,
  [data-md-color-scheme="slate"] .md-tabs__link--active {
    color: #fca5a5 !important;
    background-color: rgba(229, 9, 20, 0.2) !important;
    border: 1px solid rgba(229, 9, 20, 0.4) !important;
  }
}

/* Ocultação estrita das abas superiores em celulares e tablets para não quebrar a largura */
@media screen and (max-width: 76.24em) {
  .md-tabs {
    display: none !important;
  }
}

[data-md-color-scheme="slate"] .md-header {
  background-color: #1e293b !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   8.1 Barra de Pesquisa (Search) - Uniforme, Clean e Sem Deformações
   -------------------------------------------------------------------------- */
@media screen and (min-width: 60em) {
  .md-search__form {
    background-color: rgba(0, 0, 0, 0.14) !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    height: 1.95rem !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }

  .md-search__form:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.42) !important;
  }

  .md-search__input {
    background-color: transparent !important;
    border: none !important;
    border-radius: 9999px !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    height: 100% !important;
    padding-left: 2.25rem !important;
    padding-right: 1rem !important;
    box-shadow: none !important;
    outline: none !important;
  }

  .md-search__input::placeholder {
    color: rgba(255, 255, 255, 0.82) !important;
  }

  .md-search__icon {
    color: rgba(255, 255, 255, 0.88) !important;
  }
}

/* Modo escuro (Slate) em repouso */
@media screen and (min-width: 60em) {
  [data-md-color-scheme="slate"] .md-search__form {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
  }

  [data-md-color-scheme="slate"] .md-search__form:hover {
    background-color: rgba(255, 255, 255, 0.11) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
  }

  [data-md-color-scheme="slate"] .md-search__input {
    color: #f1f5f9 !important;
  }

  [data-md-color-scheme="slate"] .md-search__input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  [data-md-color-scheme="slate"] .md-search__icon {
    color: #94a3b8 !important;
  }
}

/* Quando a busca está aberta com resultados */
[data-md-toggle="search"]:checked ~ .md-header .md-search__inner {
  border-radius: 8px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28) !important;
  overflow: visible !important;
}

[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  border-radius: 8px 8px 0 0 !important;
  border: none !important;
  background-color: var(--md-default-bg-color) !important;
  height: 2.6rem !important;
  box-shadow: none !important;
}

[data-md-toggle="search"]:checked ~ .md-header .md-search__input {
  border-radius: 0 !important;
  background-color: transparent !important;
  color: var(--md-default-fg-color) !important;
  font-size: 0.95rem !important;
  height: 2.6rem !important;
  box-shadow: none !important;
  outline: none !important;
}

[data-md-toggle="search"]:checked ~ .md-header .md-search__output {
  border-radius: 0 0 8px 8px !important;
}

[data-md-color-scheme="slate"] [data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  background-color: #1e293b !important;
}

[data-md-color-scheme="slate"] [data-md-toggle="search"]:checked ~ .md-header .md-search__output {
  background-color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   9. Navegação Lateral e Breadcrumbs
   -------------------------------------------------------------------------- */
.md-path {
  font-size: 0.76rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 0.6rem;
}

.md-nav__link {
  border-radius: 4px;
  padding: 0.25rem 0.45rem;
}

.md-nav__link:hover {
  background-color: rgba(229, 9, 20, 0.05);
  padding-left: 0.6rem;
}

[data-md-color-scheme="slate"] .md-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.md-nav__link--active {
  font-weight: 600;
  color: var(--md-primary-fg-color) !important;
}

/* --------------------------------------------------------------------------
   10. Botão Voltar ao Topo Fixo e Desobstrutivo
   -------------------------------------------------------------------------- */
.md-top {
  position: fixed !important;
  bottom: 2rem !important;
  right: 2rem !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 99 !important;
  border-radius: 24px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  background-color: var(--md-default-bg-color) !important;
  color: var(--md-default-fg-color) !important;
  border: 1px solid var(--md-default-fg-color--lightest) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), background-color var(--trans-fast) !important;
}

[data-md-color-scheme="slate"] .md-top {
  background-color: rgba(30, 33, 41, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.md-top:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16) !important;
  border-color: var(--md-primary-fg-color) !important;
}

[data-md-color-scheme="slate"] .md-top:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* --------------------------------------------------------------------------
   11. Componentes Visuais de Navegação Rápida (Hero e Doc Cards)
   -------------------------------------------------------------------------- */
.hero-banner {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.05) 0%, rgba(255, 152, 0, 0.06) 100%);
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin: 1.5rem 0 2.25rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.32s ease;
}

[data-md-color-scheme="slate"] .hero-banner {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.12) 0%, rgba(255, 152, 0, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.hero-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 9, 20, 0.35);
  box-shadow: 0 10px 30px rgba(229, 9, 20, 0.09), 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-md-color-scheme="slate"] .hero-banner:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
}

.hero-banner__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--md-default-fg-color);
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.hero-banner__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem 0 0 0;
}

.hero-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.hero-pill:hover {
  transform: translateY(-2px);
  border-color: #d32f2f;
  color: #d32f2f;
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.12);
}

[data-md-color-scheme="slate"] .hero-pill:hover {
  border-color: #fca5a5;
  color: #fca5a5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.35rem;
  margin: 1.75rem 0 2.5rem 0;
}

.doc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--md-default-fg-color--lightest);
  background-color: var(--md-default-bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
  color: inherit !important;
  position: relative;
  overflow: hidden;
}

.doc-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #d32f2f, #ff9800);
  opacity: 0;
  transform: scaleX(0.7);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

[data-md-color-scheme="slate"] .doc-card {
  border-color: rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.doc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 47, 47, 0.45);
  box-shadow: 0 14px 34px -4px rgba(211, 47, 47, 0.1), 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-md-color-scheme="slate"] .doc-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.doc-card__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.doc-card__icon {
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.32s cubic-bezier(0.34, 1.3, 0.64, 1), color 0.32s ease;
}

.doc-card:hover .doc-card__icon {
  transform: scale(1.15) translateY(-1px);
  color: #d32f2f;
}

[data-md-color-scheme="slate"] .doc-card:hover .doc-card__icon {
  color: #fca5a5;
}

.doc-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  margin: 0;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

.doc-card:hover .doc-card__title {
  color: #d32f2f;
}

[data-md-color-scheme="slate"] .doc-card:hover .doc-card__title {
  color: #ffffff;
}

.doc-card__desc {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
  margin: 0 0 1.1rem 0;
}

.doc-card__action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--md-accent-fg-color, #e50914);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.doc-card:hover .doc-card__action {
  gap: 0.65rem;
  color: #b71c1c;
}

[data-md-color-scheme="slate"] .doc-card:hover .doc-card__action {
  color: #fca5a5;
}

/* Suporte para cards padrão MkDocs Material (.card e .grid.cards) */
.grid.cards > ul > li,
.card {
  border-radius: 12px !important;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.32s ease !important;
}

.grid.cards > ul > li:hover,
.card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(211, 47, 47, 0.35) !important;
}

[data-md-color-scheme="slate"] .grid.cards > ul > li:hover,
[data-md-color-scheme="slate"] .card:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Linhas de tabelas com transição suave no hover */
.md-typeset table:not([class]) tbody tr {
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.md-typeset table:not([class]) tbody tr:hover {
  background-color: rgba(211, 47, 47, 0.04) !important;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Desativação total de previews suspensos flutuantes no hover de links */
.md-tooltip,
.md-preview {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   12. Admonições e Detalhes Colapsáveis
   -------------------------------------------------------------------------- */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
}

.md-typeset .admonition:hover,
.md-typeset details:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset .admonition:hover,
[data-md-color-scheme="slate"] .md-typeset details:hover {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

/* Suporte específico para destaque !Important e Caution */
.md-typeset .admonition.important,
.md-typeset details.important {
  border-color: #f57c00 !important;
}

.md-typeset .admonition.important > .admonition-title,
.md-typeset details.important > summary {
  background-color: rgba(245, 124, 0, 0.1) !important;
  color: #e65100 !important;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.important > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.important > summary {
  background-color: rgba(245, 124, 0, 0.22) !important;
  color: #ffb74d !important;
}

/* --------------------------------------------------------------------------
   13. Blocos de Código e Botão de Copiar
   -------------------------------------------------------------------------- */
.md-typeset .highlight {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.md-clipboard {
  border-radius: 6px !important;
  transition: transform var(--trans-fast), opacity var(--trans-fast) !important;
}

.md-clipboard:hover {
  transform: scale(1.1) !important;
}

/* --------------------------------------------------------------------------
   14. Diálogo de Busca Fluido e Moderno
   -------------------------------------------------------------------------- */
.md-search__inner {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.md-search-result__link {
  transition: background-color var(--trans-fast);
}

.md-search-result__link:hover {
  background-color: rgba(229, 9, 20, 0.06);
}

/* --------------------------------------------------------------------------
   15. Rolagem Suave Global e Links de Texto
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.md-typeset a:not([class]) {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--trans-fast), text-decoration-color var(--trans-fast);
}

.md-typeset a:not([class]):hover {
  text-decoration-color: var(--md-accent-fg-color, #e50914);
}

/* --------------------------------------------------------------------------
   16. Índice Lateral (ToC) com Transição Fluida no Scrollspy
   -------------------------------------------------------------------------- */
.md-nav--secondary .md-nav__link {
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: color var(--trans-fast), border-left-color var(--trans-fast), padding-left var(--trans-fast);
}

.md-nav--secondary .md-nav__link:hover {
  color: var(--md-accent-fg-color, #e50914) !important;
  padding-left: 0.75rem;
}

.md-nav--secondary .md-nav__link--active {
  font-weight: 600;
  color: var(--md-accent-fg-color, #e50914) !important;
  border-left-color: var(--md-accent-fg-color, #e50914);
  padding-left: 0.75rem;
}

/* --------------------------------------------------------------------------
   17. Identidade Visual e Logo EvidencIA (Stitch Design System)
   -------------------------------------------------------------------------- */
.md-header .md-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 0.4rem !important;
  padding: 0 !important;
}

.md-header .md-logo svg,
.md-header .md-logo img {
  height: 28px !important;
  width: 28px !important;
  border-radius: 7px !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
  transition: transform var(--trans-fast);
}

.md-header .md-logo:hover svg,
.md-header .md-logo:hover img {
  transform: scale(1.08) rotate(-2deg);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-badge__highlight {
  color: #ff9800;
}

/* --------------------------------------------------------------------------
   18. Otimizacoes Responsivas para Dispositivos Moveis e Tablets (WCAG 2.1 AA)
   -------------------------------------------------------------------------- */

/* Regras gerais para recipientes de rolagem em telas de toque */
.md-typeset__table,
.mermaid,
.highlight,
pre,
.md-typeset pre > code {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Tablets e Telas Medias (largura <= 1219px / 76.24em) */
@media screen and (max-width: 76.24em) {
  .md-header__inner {
    padding: 0 0.85rem !important;
    gap: 0.4rem;
  }

  .md-header__title {
    margin: 0 0.45rem !important;
    font-size: 0.88rem !important;
  }

  /* Botoes de acao acessiveis para toque (minimo 44px x 44px - WCAG 2.5.5) */
  .md-header__button:not([hidden]) {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  .md-header__button[hidden] {
    display: none !important;
  }

  /* Menu Drawer Lateral em Tablets e Celulares */
  .md-sidebar--primary {
    z-index: 12 !important;
    pointer-events: auto !important;
  }

  .md-sidebar--primary .md-sidebar__scrollwrap {
    pointer-events: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
  }

  .md-overlay {
    z-index: 8 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
  }

  .md-nav--primary {
    font-size: 0.86rem;
    pointer-events: auto !important;
  }

  .md-nav--primary a.md-nav__link,
  .md-nav--primary label.md-nav__link {
    cursor: pointer !important;
    pointer-events: auto !important;
  }

  .md-nav--primary .md-nav__title {
    background-color: #d32f2f !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.95rem 1rem !important;
    font-size: 0.96rem;
  }

  [data-md-color-scheme="slate"] .md-nav--primary .md-nav__title {
    background-color: #1e293b !important;
    color: #ffffff !important;
  }

  .md-nav--primary .md-nav__link {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.55rem 0.95rem !important;
    border-radius: 6px;
    margin: 0.1rem 0.35rem;
  }

  .md-nav--primary .md-nav__link:active {
    background-color: rgba(229, 9, 20, 0.12) !important;
  }

  /* Grid de cards em tablets */
  .doc-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important;
    gap: 1rem !important;
  }
}

/* Celulares e Smartphones (largura <= 767px / 47.99em) */
@media screen and (max-width: 47.99em) {
  /* Layout e Espacamentos Principais */
  .md-main__inner {
    padding-top: 0.4rem !important;
  }

  .md-content {
    padding: 0.3rem 0.15rem !important;
  }

  .md-content__inner {
    padding: 0 0.45rem 1.75rem 0.45rem !important;
    margin: 0 !important;
  }

  /* Titulos Fluidos e Legiveis sem Quebra Excessiva */
  .md-typeset h1 {
    font-size: 1.45rem !important;
    line-height: 1.28 !important;
    margin-top: 0.85rem !important;
    margin-bottom: 0.75rem !important;
    word-break: break-word;
  }

  .md-typeset h2 {
    font-size: 1.22rem !important;
    line-height: 1.32 !important;
    margin-top: 1.4rem !important;
    margin-bottom: 0.65rem !important;
    word-break: break-word;
  }

  .md-typeset h3 {
    font-size: 1.05rem !important;
    line-height: 1.36 !important;
    margin-top: 1.1rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* Tabelas Responsivas Fluidas com Indicador de Rolagem */
  .md-typeset table:not([class]) {
    min-width: 460px !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    margin: 1rem 0 !important;
  }

  .md-typeset table:not([class]) th,
  .md-typeset table:not([class]) td {
    padding: 0.5rem 0.55rem !important;
    white-space: normal;
  }

  /* Banner e Cartoes de Documentacao em Celulares */
  .hero-banner {
    padding: 1.15rem 1rem !important;
    margin: 0.85rem 0 1.35rem 0 !important;
    border-radius: 10px !important;
  }

  .hero-banner__title {
    font-size: 1.15rem !important;
  }

  .hero-pill {
    font-size: 0.7rem !important;
    padding: 3px 9px !important;
  }

  .doc-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin: 1.15rem 0 1.75rem 0 !important;
  }

  .doc-card {
    padding: 1.05rem 1.15rem !important;
  }

  /* Admonicoes em Celulares */
  .md-typeset .admonition,
  .md-typeset details {
    padding: 0.65rem 0.85rem !important;
    margin: 0.95rem 0 !important;
    font-size: 0.85rem !important;
  }

  .md-typeset .admonition-title,
  .md-typeset summary {
    font-size: 0.88rem !important;
  }

  /* Diagramas Mermaid em Telas Estreitas */
  .mermaid {
    padding: 1rem 0.5rem !important;
    margin: 1.15rem 0 !important;
    border-radius: 8px !important;
  }

  /* Botao Flutuante Voltar ao Topo */
  .md-top {
    bottom: 1.25rem !important;
    right: 1.1rem !important;
    padding: 0.38rem 0.8rem !important;
    font-size: 0.72rem !important;
  }

  /* Badges de Requisitos */
  .badge-must,
  .badge-should,
  .badge-in {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
  }
}

