/*
 * Legal pages (pt, en, es): shared styles.
 * Design: Figma "Web" page, "Legal — Termos e Privacidade (pt)" in 1440 and 390
 * (approved 2026-11-06). No site header or footer: the logo links home.
 * Green for links is the official #426D17 (docs/design/brand.md).
 */
:root {
  --bg: #fffef8;
  --ink: #331f33;
  --muted: #71717a;
  --body: #35353c;
  --lime: #b8e600;
  --green: #426d17;
  --line: #ecebe4;
  --rule: #e4e4e7;
  --notice: #f7fbea;
  --label: rgba(51, 31, 51, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* ---------- Page and header ---------- */

.page {
  width: min(100% - 288px, 1152px);
  margin: 0 auto;
  padding: 72px 0 120px;
}

.home-link {
  display: block;
  width: fit-content;
  line-height: 0;
  border-radius: 6px;
}

.home-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.logo {
  display: block;
  width: 188px;
  height: auto;
}

.hero {
  max-width: 900px;
  margin-top: 72px;
}

.eyebrow,
.toc-title {
  margin: 0;
  color: var(--label);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 18px 0 0;
  color: var(--ink);
  font-size: 64px;
  line-height: 68px;
  letter-spacing: -0.03em;
}

.h1-lead,
.h1-strong {
  display: block;
}

.h1-lead {
  font-weight: 500;
}

.h1-strong {
  font-weight: 800;
}

.lede {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 30px;
  font-weight: 500;
}

.meta {
  margin: 18px 0 0;
  color: rgba(113, 113, 122, 0.85);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid rgba(51, 31, 51, 0.18);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  text-decoration: none;
}

.lang-pill[aria-current='page'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.lang-pill:focus-visible,
.toc a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Index and content ---------- */

.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 840px);
  column-gap: 48px;
  margin-top: 64px;
}

.toc {
  position: sticky;
  top: 32px;
  align-self: start;
}

.toc ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.toc li + li {
  margin-top: 4px;
}

.toc a {
  display: flex;
  align-items: center;
  padding: 8px 0 8px 14px;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  text-decoration: none;
}

.toc a[aria-current] {
  border-left-color: var(--lime);
  color: var(--ink);
  font-weight: 800;
}

.toc-num,
.toc-full,
.toc-chevron {
  display: none;
}

.content > * + * {
  margin-top: 24px;
}

main > section + section {
  margin-top: 24px;
}

.notice {
  padding: 28px 32px;
  border-radius: 24px;
  background: var(--notice);
}

.notice strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
}

.notice ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.notice li {
  position: relative;
  padding-left: 16px;
  color: var(--ink);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

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

.notice li::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--green);
}

section {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  scroll-margin-top: 32px;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 36px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.h-num {
  font-weight: 500;
}

article {
  padding-top: 20px;
}

article + article {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 22.4px;
  font-weight: 800;
}

p,
li {
  margin: 0;
  color: var(--body);
  font-size: 15.68px;
  line-height: 27.89px;
  font-weight: 500;
}

p + p,
p + ul,
ul + p,
ul + ul {
  margin-top: 12px;
}

ul {
  margin: 0;
  padding-left: 20px;
}

/* Contact: the text sits straight in the card, no inner box. */
section:last-child h2 + p {
  margin-top: 20px;
}

.footnote {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 1100px) {
  .page {
    width: min(100% - 96px, 840px);
    padding: 56px 0 96px;
  }

  .layout {
    display: block;
    margin-top: 40px;
  }

  .toc {
    position: static;
  }

  .toc ol {
    margin-top: 12px;
    padding: 0 16px 0 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
  }

  .toc li + li {
    margin-top: 0;
    border-top: 1px solid var(--line);
  }

  .toc a,
  .toc a[aria-current] {
    gap: 14px;
    padding: 16px 0;
    border-left: 0;
    color: var(--ink);
    font-weight: 700;
  }

  .toc-num {
    display: inline;
    color: rgba(51, 31, 51, 0.45);
    font-weight: 500;
  }

  .toc-short {
    display: none;
  }

  .toc-full {
    display: inline;
    flex: 1;
  }

  .toc-chevron {
    display: block;
    flex: none;
    color: var(--muted);
  }

  .content {
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 48px, 840px);
    padding: 40px 0 64px;
  }

  .logo {
    width: 148px;
  }

  .hero {
    margin-top: 40px;
  }

  h1 {
    margin-top: 14px;
    font-size: 30px;
    line-height: 36px;
  }

  .lede {
    margin-top: 14px;
    font-size: 15px;
    line-height: 24px;
  }

  .meta {
    margin-top: 14px;
    font-size: 12px;
    line-height: 18px;
  }

  .langs {
    margin-top: 38px;
  }

  .layout {
    margin-top: 32px;
  }

  .content > * + *,
  main > section + section {
    margin-top: 16px;
  }

  .notice {
    padding: 22px 20px;
    border-radius: 20px;
  }

  .notice li {
    font-size: 14px;
    line-height: 22px;
  }

  section {
    padding: 24px 20px;
    border-radius: 20px;
  }

  h2 {
    font-size: 24px;
    line-height: 30px;
  }

  p,
  li {
    font-size: 15px;
    line-height: 24px;
  }
}
