/* ----- Termos de uso / Legal — Ryzer Host ----- */
body#terms-page .terms-main,
body.kb-page .terms-main {
  padding: 0;
  overflow-x: hidden;
}

/* Hero (inclui base de conhecimento: body.kb-page) */
body#terms-page .terms-hero,
body.kb-page .terms-hero {
  position: relative;
  isolation: isolate;
  padding: 5.25rem 0 3rem;
  margin-bottom: 0;
}
@media (min-width: 992px) {
  body#terms-page .terms-hero,
  body.kb-page .terms-hero {
    padding: 6rem 0 3.5rem;
  }
}
body#terms-page .terms-hero__deco,
body.kb-page .terms-hero__deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(170deg, rgba(15, 23, 42, 0.92) 0%, rgba(9, 9, 11, 0.97) 55%, rgba(0, 0, 0, 1) 100%),
    radial-gradient(ellipse 85% 55% at 20% 0%, rgba(var(--primary-rgb), 0.22), transparent 52%);
}
body#terms-page.light-theme .terms-hero__deco,
body.kb-page.light-theme .terms-hero__deco {
  background:
    linear-gradient(175deg, #ffffff 0%, #f8fafc 40%, #f1f5f9 100%),
    radial-gradient(ellipse 90% 50% at 15% 0%, rgba(var(--primary-rgb), 0.1), transparent 50%);
}
body#terms-page .terms-hero .container,
body.kb-page .terms-hero .container {
  position: relative;
  z-index: 1;
}
body#terms-page .terms-hero__badge,
body.kb-page .terms-hero__badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--primary-rgb), 0.95);
  margin-bottom: 0.85rem;
}
body#terms-page.light-theme .terms-hero__badge,
body.kb-page.light-theme .terms-hero__badge {
  color: var(--primary-deep);
}
body#terms-page .terms-hero__title,
body.kb-page .terms-hero__title {
  font-family: var(--third-font);
  font-size: clamp(1.65rem, 1rem + 2.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fafafa;
  margin-bottom: 1rem;
  max-width: 920px;
}
body#terms-page.light-theme .terms-hero__title,
body.kb-page.light-theme .terms-hero__title {
  color: var(--dark);
}
body#terms-page .terms-hero__lead,
body.kb-page .terms-hero__lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.9);
  max-width: 800px;
  margin-bottom: 1.5rem;
}
body#terms-page.light-theme .terms-hero__lead,
body.kb-page.light-theme .terms-hero__lead {
  color: var(--text-gray);
}
body#terms-page .terms-hero__meta,
body.kb-page .terms-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.75rem;
  font-size: 14px;
  color: rgba(148, 163, 184, 0.95);
}
body#terms-page.light-theme .terms-hero__meta,
body.kb-page.light-theme .terms-hero__meta {
  color: #64748b;
}
body#terms-page .terms-hero__meta a,
body.kb-page .terms-hero__meta a {
  color: rgba(252, 165, 165, 0.95);
  font-weight: 600;
}
body#terms-page.light-theme .terms-hero__meta a,
body.kb-page.light-theme .terms-hero__meta a {
  color: var(--primary);
}

/* Layout shell */
body#terms-page .terms-shell,
body.kb-page .terms-shell {
  padding: 2.5rem 0 5rem;
}

/* Área de conteúdo KB: fundo tipo documentação */
body.kb-page .terms-shell {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 35%, #e2e8f0 100%);
}
body.kb-page.light-theme .terms-shell {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 40%, #e8eef4 100%);
}
body#terms-page .terms-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 992px) {
  body#terms-page .terms-layout {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 2.5rem 3rem;
  }
}

/* Sidebar TOC */
body#terms-page .terms-sidebar {
  position: relative;
}
@media (min-width: 992px) {
  body#terms-page .terms-sidebar {
    position: sticky;
    top: 1.25rem;
  }
}
body#terms-page .terms-toc {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 1.25rem 1rem 1.25rem 1.15rem;
  max-height: min(80vh, 640px);
  overflow-y: auto;
}
body#terms-page.light-theme .terms-toc {
  border-color: rgba(15, 23, 42, 0.12);
  background: #fff;
  box-shadow: 0 12px 40px -28px rgba(15, 23, 42, 0.35);
}
body#terms-page .terms-toc__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.55);
  margin-bottom: 1rem;
}
body#terms-page.light-theme .terms-toc__title {
  color: #64748b;
}
body#terms-page .terms-toc__list {
  margin: 0;
  padding: 0;
}
body#terms-page .terms-toc__list li {
  margin-bottom: 2px;
}
body#terms-page .terms-toc__link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.82);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
body#terms-page.light-theme .terms-toc__link {
  color: #475569;
}
body#terms-page .terms-toc__link:hover {
  color: #fff;
  background: rgba(var(--primary-rgb), 0.12);
  border-left-color: rgba(var(--primary-rgb), 0.6);
}
body#terms-page.light-theme .terms-toc__link:hover {
  color: var(--dark);
  background: rgba(var(--primary-rgb), 0.08);
}

/* Content article */
body#terms-page .terms-content {
  min-width: 0;
}
body#terms-page .terms-section {
  padding-bottom: 2.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  scroll-margin-top: 100px;
}
body#terms-page.light-theme .terms-section {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
body#terms-page .terms-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
body#terms-page .terms-section--privacy {
  border-radius: 20px;
  padding: 1.75rem 1.5rem 2rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(52, 211, 153, 0.2);
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.06) 0%, rgba(255, 255, 255, 0.02) 45%);
}
body#terms-page.light-theme .terms-section--privacy {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.07) 0%, #fff 55%);
  border-color: rgba(16, 185, 129, 0.25);
}
body#terms-page .terms-h2 {
  font-family: var(--third-font);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.25;
}
body#terms-page.light-theme .terms-h2 {
  color: var(--dark);
}
body#terms-page .terms-h3 {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.92);
  margin: 1.5rem 0 0.65rem;
}
body#terms-page.light-theme .terms-h3 {
  color: #334155;
}
body#terms-page .terms-p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-gray);
  margin-bottom: 1rem;
}
body#terms-page .terms-p:last-child {
  margin-bottom: 0;
}
body#terms-page .terms-p a,
body#terms-page .terms-ul a {
  color: rgba(252, 165, 165, 0.95);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body#terms-page.light-theme .terms-p a,
body#terms-page.light-theme .terms-ul a {
  color: var(--primary);
}
body#terms-page .terms-ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-gray);
  font-size: 15px;
  line-height: 1.75;
}
body#terms-page .terms-ul li {
  margin-bottom: 0.5rem;
}
body#terms-page .terms-ul li:last-child {
  margin-bottom: 0;
}
body#terms-page .terms-ul code {
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(252, 211, 77, 0.95);
}
body#terms-page.light-theme .terms-ul code {
  background: #f1f5f9;
  color: #b45309;
}

/* Mobile horizontal TOC alternative */
@media (max-width: 991.98px) {
  body#terms-page .terms-toc {
    max-height: none;
    overflow: visible;
  }
  body#terms-page .terms-toc__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  body#terms-page .terms-toc__list li {
    margin-bottom: 0;
  }
  body#terms-page .terms-toc__link {
    border-left: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    padding: 0.4rem 0.65rem;
  }
  body#terms-page.light-theme .terms-toc__link {
    border-color: rgba(15, 23, 42, 0.12);
  }
}
