:root {
  --terms-dark: #591c31;
  --terms-primary: #7c334c;
  --terms-secondary: #934761;
  --terms-medium: #a8617b;

  --terms-soft: #f0c1d1;
  --terms-soft-light: #fff0f5;

  --terms-white: #ffffff;
  --terms-surface: #fffafb;
  --terms-background: #f8edf1;

  --terms-text: #591c31;
  --terms-text-muted: #8a5a6a;

  --terms-border: rgba(89, 28, 49, 0.1);

  --terms-shadow: 0 12px 28px rgba(45, 8, 21, 0.14);

  --terms-shadow-soft: 0 7px 18px rgba(45, 8, 21, 0.09);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;

  font-family: "Poppins", sans-serif;

  color: var(--terms-text);
  background: var(--terms-dark);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-container {
  position: relative;

  width: min(100%, 480px);
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100svh;

  margin: 0 auto;

  overflow-x: clip;
  contain: inline-size;

  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(240, 193, 209, 0.18),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #591c31 0,
      #7c334c 310px,
      #f8edf1 310px,
      #f8edf1 100%
    );
}

/* ============================================================
   CABEÇALHO
   ============================================================ */

.terms-header {
  position: relative;
  z-index: 1;

  width: 100%;
  padding: max(16px, env(safe-area-inset-top)) 16px 25px;
}

.terms-nav {
  width: 100%;
  min-width: 0;
  min-height: 44px;

  display: grid;
  grid-template-columns:
    44px
    minmax(0, 1fr)
    44px;
  align-items: center;
  gap: 12px;
}

.terms-nav-button {
  width: 44px;
  height: 44px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 14px;

  color: var(--terms-white);
  background: rgba(255, 255, 255, 0.1);

  box-shadow: 0 6px 16px rgba(45, 8, 21, 0.13);

  cursor: pointer;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.terms-nav-button:hover,
.terms-nav-button:focus-visible {
  transform: translateY(-1px);

  background: rgba(255, 255, 255, 0.16);
}

.terms-nav-button svg {
  position: static;

  width: 21px;
  height: 21px;

  display: block;
  flex: 0 0 auto;

  margin: 0;
}

.terms-page-title {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.terms-page-title span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.65);
}

.terms-page-title h1 {
  max-width: 100%;
  margin: 1px 0 0;

  overflow: hidden;

  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--terms-white);
}

/* ============================================================
   APRESENTAÇÃO
   ============================================================ */

.terms-intro {
  width: 100%;
  min-width: 0;
  margin-top: 18px;
  padding: 17px;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    54px;
  align-items: center;
  gap: 14px;

  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 21px;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.06)
  );

  box-shadow: var(--terms-shadow);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.terms-intro > div {
  min-width: 0;
}

.terms-eyebrow {
  display: block;

  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: var(--terms-soft);
}

.terms-intro h2 {
  margin: 4px 0 0;

  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;

  color: var(--terms-white);
}

.terms-intro p {
  margin: 6px 0 0;

  font-size: 9px;
  line-height: 1.55;

  color: rgba(255, 255, 255, 0.7);
}

.terms-intro-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 17px;

  color: var(--terms-white);
  background: rgba(255, 255, 255, 0.1);
}

.terms-intro-icon svg {
  position: static;

  width: 25px;
  height: 25px;

  display: block;
  flex: 0 0 auto;

  margin: 0;
}

/* ============================================================
   CONTEÚDO PRINCIPAL
   ============================================================ */

.terms-main {
  position: relative;
  z-index: 2;

  width: 100%;
  min-width: 0;
  padding: 0 16px max(30px, env(safe-area-inset-bottom));

  display: grid;
  gap: 18px;
}

/* ============================================================
   RESUMO
   ============================================================ */

.terms-summary-card {
  width: 100%;
  min-width: 0;
  padding: 17px;

  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 21px;

  background: rgba(255, 250, 252, 0.98);

  box-shadow: var(--terms-shadow-soft);
}

.terms-summary-label {
  display: block;

  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;

  color: var(--terms-secondary);
}

.terms-summary-card strong {
  display: block;
  margin-top: 4px;

  font-size: 14px;
  font-weight: 700;

  color: var(--terms-dark);
}

.terms-summary-card p {
  margin: 9px 0 0;

  font-size: 9px;
  line-height: 1.65;

  color: var(--terms-text-muted);
}

/* ============================================================
   ÍNDICE
   ============================================================ */

.terms-index {
  width: 100%;
  min-width: 0;
  padding: 13px;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;

  border: 1px solid rgba(89, 28, 49, 0.08);
  border-radius: 20px;

  background: rgba(255, 250, 252, 0.98);

  box-shadow: var(--terms-shadow-soft);
}

.terms-index a {
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;

  display: flex;
  align-items: center;

  border: 1px solid rgba(89, 28, 49, 0.07);
  border-radius: 12px;

  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;

  color: var(--terms-primary);
  background: var(--terms-white);

  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.terms-index a:hover,
.terms-index a:focus-visible {
  transform: translateY(-1px);

  background: var(--terms-soft-light);
}

/* ============================================================
   SEÇÕES DOS TERMOS
   ============================================================ */

.terms-content {
  width: 100%;
  min-width: 0;

  display: grid;
  gap: 12px;
}

.terms-section {
  width: 100%;
  min-width: 0;
  padding: 16px;

  display: grid;
  grid-template-columns:
    38px
    minmax(0, 1fr);
  align-items: start;
  gap: 12px;

  scroll-margin-top: 16px;

  border: 1px solid rgba(89, 28, 49, 0.08);
  border-radius: 20px;

  background: rgba(255, 250, 252, 0.98);

  box-shadow: var(--terms-shadow-soft);
}

.terms-section-number {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(168, 97, 123, 0.18);
  border-radius: 12px;

  font-size: 9px;
  font-weight: 700;

  color: var(--terms-primary);
  background: rgba(240, 193, 209, 0.38);
}

.terms-section > div {
  min-width: 0;
}

.terms-section h2 {
  margin: 1px 0 0;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;

  color: var(--terms-dark);
}

.terms-section p {
  margin: 9px 0 0;

  font-size: 9px;
  line-height: 1.7;

  color: var(--terms-text-muted);
}

.terms-section ul {
  margin: 10px 0 0;
  padding-left: 17px;

  display: grid;
  gap: 7px;
}

.terms-section li {
  padding-left: 2px;

  font-size: 9px;
  line-height: 1.6;

  color: var(--terms-text-muted);
}

.terms-section li::marker {
  color: var(--terms-secondary);
}

/* ============================================================
   CARD FINAL
   ============================================================ */

.terms-final-card {
  width: 100%;
  min-width: 0;
  padding: 15px;

  display: flex;
  align-items: center;
  gap: 12px;

  border: 1px solid rgba(89, 28, 49, 0.08);
  border-radius: 19px;

  background: rgba(255, 250, 252, 0.98);

  box-shadow: var(--terms-shadow-soft);
}

.terms-final-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(168, 97, 123, 0.18);
  border-radius: 13px;

  color: var(--terms-primary);
  background: rgba(240, 193, 209, 0.38);
}

.terms-final-icon svg {
  position: static;

  width: 21px;
  height: 21px;

  display: block;
  flex: 0 0 auto;

  margin: 0;
}

.terms-final-card > div {
  min-width: 0;
}

.terms-final-card strong {
  display: block;

  font-size: 11px;
  font-weight: 700;

  color: var(--terms-dark);
}

.terms-final-card p {
  margin: 4px 0 0;

  font-size: 8.5px;
  line-height: 1.5;

  color: var(--terms-text-muted);
}

/* ============================================================
   BOTÃO PRINCIPAL
   ============================================================ */

.terms-primary-button {
  width: 100%;
  min-height: 49px;
  padding: 0 15px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  border-radius: 15px;

  font-size: 10px;
  font-weight: 600;
  text-decoration: none;

  color: var(--terms-white);
  background: var(--terms-primary);

  box-shadow: 0 9px 20px rgba(89, 28, 49, 0.22);

  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.terms-primary-button:hover,
.terms-primary-button:focus-visible {
  transform: translateY(-1px);

  background: #6d2b42;

  box-shadow: 0 12px 24px rgba(89, 28, 49, 0.27);
}

.terms-primary-button svg {
  position: static;

  width: 18px;
  height: 18px;

  display: block;
  flex: 0 0 auto;

  margin: 0;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 370px) {
  .terms-header,
  .terms-main {
    padding-left: 13px;
    padding-right: 13px;
  }

  .terms-index {
    gap: 7px;
    padding: 11px;
  }

  .terms-section {
    grid-template-columns:
      34px
      minmax(0, 1fr);

    padding: 14px;
    gap: 10px;
  }

  .terms-section-number {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}

@media (max-width: 330px) {
  .terms-index {
    grid-template-columns: 1fr;
  }

  .terms-intro {
    grid-template-columns:
      minmax(0, 1fr)
      48px;
  }

  .terms-intro-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
