/* Shared styles for the public De Um Tudo application documents.
   Self-contained: system fonts, local logo and no script or external assets. */

:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 100%;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

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

body.legal-page {
  margin: 0;
  background: #ffffff;
  color: #171717;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.legal-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.legal-page a {
  color: #183e4b;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.legal-page a:hover {
  color: #0b1a1f;
  text-decoration-thickness: 2px;
}

.legal-page a:focus-visible,
.legal-page [tabindex]:focus-visible {
  outline: 3px solid #0b1a1f;
  outline-offset: 4px;
  border-radius: 3px;
}

.legal-page .skip-link {
  position: absolute;
  z-index: 100;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 12px 18px;
  transform: translateY(calc(-100% - 16px));
  border-radius: 6px;
  background: #feed01;
  color: #0b1a1f;
  font-weight: 700;
}

.legal-page .skip-link:focus {
  transform: translateY(0);
}

.legal-header {
  padding: 28px 0 24px;
  background: #0b1a1f;
  color: #ffffff;
}

.legal-header-inner,
.legal-main,
.legal-footer-inner {
  width: min(760px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-header-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.legal-brand,
.legal-header-inner > a {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.legal-header img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #feed01;
  object-fit: contain;
}

.legal-header a,
.legal-header a:visited {
  color: #ffffff;
}

.legal-header a:hover {
  color: #f7d417;
}

.legal-header a:focus-visible {
  outline-color: #feed01;
}

.legal-nav {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-nav a {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #3c4e54;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.45;
  text-decoration: none;
}

.legal-nav a:hover {
  border-color: #f7d417;
}

.legal-nav a[aria-current="page"] {
  border-color: #f7d417;
  background: #f7d417;
  color: #0b1a1f;
  font-weight: 700;
}

.legal-main {
  padding-block: 28px 64px;
}

.legal-main:focus {
  outline: none;
}

.legal-main :where(section, h2, h3, aside)[id] {
  scroll-margin-top: 24px;
}

.legal-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 28px;
  color: #4c585c;
  font-size: 16px;
  line-height: 1.5;
}

.legal-intro {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 3px solid #f7d417;
}

.legal-eyebrow {
  margin: 0 0 10px;
  color: #405056;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.legal-page h1,
.legal-page h2,
.legal-page h3 {
  color: #0b1a1f;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.legal-page h1 {
  margin: 0;
  font-size: clamp(32px, 5.5vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.legal-subtitle {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.legal-updated {
  margin: 18px 0 0;
  color: #4c585c;
  font-size: 16px;
}

.legal-document {
  min-width: 0;
}

.legal-document section + section {
  margin-top: 36px;
}

.legal-page h2 {
  margin: 36px 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.legal-page h3 {
  margin: 28px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

.legal-document section > :first-child,
.legal-contact > :first-child {
  margin-top: 0;
}

.legal-document p {
  margin: 0 0 18px;
}

.legal-document ul,
.legal-document ol {
  margin: 16px 0 24px;
  padding-left: 26px;
}

.legal-document li + li {
  margin-top: 12px;
}

.legal-document li::marker {
  color: #294854;
  font-weight: 650;
}

.legal-document strong {
  font-weight: 700;
}

.legal-document address {
  font-style: normal;
}

.legal-document blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid #f7d417;
  background: #f5f7f7;
}

.legal-toc {
  margin: 0 0 32px;
  padding: 20px 24px;
  border: 1px solid #dce2e4;
  border-left: 4px solid #f7d417;
  border-radius: 8px;
  background: #f7f9f9;
}

.legal-toc-title {
  display: block;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.legal-toc a {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding-block: 5px;
}

.legal-toc ul,
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-contact {
  margin-top: 36px;
  padding: 24px;
  border: 1px solid #dce2e4;
  border-left: 4px solid #f7d417;
  border-radius: 8px;
  background: #f7f9f9;
}

.legal-contact p:last-child {
  margin-bottom: 0;
}

.legal-page .whatsapp-button,
.legal-page .whatsapp-button:visited {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-block: 6px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #25d366;
  color: #ffffff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

.legal-page .whatsapp-button:hover {
  background: #1aa753;
  color: #ffffff;
}

.legal-page .whatsapp-button svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.legal-footer {
  padding-block: 28px;
  border-top: 1px solid #dce2e4;
  background: #f5f7f7;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.legal-footer-links a {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  font-size: 16px;
}

.legal-footer p {
  margin: 16px 0 0;
  color: #4c585c;
  font-size: 16px;
  line-height: 1.6;
}

.legal-footer-links > span {
  align-self: center;
  color: #4c585c;
}

@media (max-width: 480px) {
  .legal-header {
    padding-block: 22px 20px;
  }

  .legal-header-inner,
  .legal-main,
  .legal-footer-inner {
    width: calc(100% - 32px);
  }

  .legal-header-inner {
    gap: 20px;
  }

  .legal-nav {
    gap: 8px;
  }

  .legal-nav a {
    flex: 1 1 140px;
    justify-content: center;
    padding-inline: 10px;
    text-align: center;
  }

  .legal-main {
    padding-block: 24px 48px;
  }

  .legal-intro {
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

  .legal-page h2 {
    font-size: 22px;
  }

  .legal-contact,
  .legal-toc {
    padding: 20px;
  }

  .legal-footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .legal-footer-links > span {
    display: none;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  body.legal-page {
    background: #ffffff;
    color: #171717;
    font-size: 12pt;
    line-height: 1.5;
  }

  .legal-header {
    padding: 0 0 14pt;
    border-bottom: 1pt solid #171717;
    background: #ffffff;
    color: #171717;
  }

  .legal-header-inner,
  .legal-main,
  .legal-footer-inner {
    width: 100%;
    max-width: none;
  }

  .legal-header a,
  .legal-header a:visited {
    color: #171717;
  }

  .legal-header img {
    width: 42pt;
    height: 42pt;
  }

  .legal-page .skip-link,
  .legal-nav,
  .legal-breadcrumb,
  .legal-toc {
    display: none;
  }

  .legal-main {
    padding-block: 20pt 12pt;
  }

  .legal-intro {
    padding-bottom: 16pt;
    border-bottom-width: 1pt;
  }

  .legal-page h1 {
    font-size: 26pt;
  }

  .legal-page h2,
  .legal-page h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .legal-page h2 {
    font-size: 17pt;
  }

  .legal-page h3 {
    font-size: 14pt;
  }

  .legal-page p,
  .legal-page li {
    orphans: 3;
    widows: 3;
  }

  .legal-page a,
  .legal-page a:visited {
    color: #171717;
  }

  .legal-contact,
  .legal-document blockquote {
    padding: 12pt;
    border: 1pt solid #a0a8aa;
    background: #ffffff;
  }

  .legal-page .whatsapp-button,
  .legal-page .whatsapp-button:visited {
    padding: 6pt 10pt;
    border: 1pt solid #171717;
    background: #ffffff;
    color: #171717;
  }

  .legal-footer {
    padding-top: 14pt;
    border-top: 1pt solid #a0a8aa;
    background: #ffffff;
  }

  .legal-footer-links {
    gap: 4pt 12pt;
  }

  .legal-footer-links a {
    min-height: 0;
  }

  .legal-footer-links > span {
    display: none;
  }
}

