/* Wise Websites — clássico: legal pages (privacy, cookies).
   Loaded after styles.css; reuses its tokens, header, footer, buttons and consent UI. */

html { scroll-padding-top: calc(var(--header) + 28px); }

/* ---------- page head ---------- */
.doc-head {
  padding-top: calc(var(--header) + clamp(48px, 7vw, 104px));
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.doc-head h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 700; line-height: 1.08; letter-spacing: -.035em;
  text-wrap: balance;
}
.doc-head__lead { margin-top: 22px; max-width: 56ch; font-size: clamp(1.0625rem, 1.35vw, 1.1875rem); line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.doc-head__date { margin-top: 24px; font-size: .875rem; color: var(--muted-2); }

@media (prefers-reduced-motion: no-preference) {
  .doc-head .wrap > * { animation: doc-rise .9s var(--ease) both; }
  .doc-head .doc-head__lead { animation-delay: .08s; }
  .doc-head .doc-head__date { animation-delay: .16s; }
  @keyframes doc-rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- body: contents + article ---------- */
.doc { display: grid; gap: 40px; padding-block: clamp(32px, 5vw, 72px) clamp(96px, 12vw, 160px); }

/* contents: a collapsible list on small screens, a sticky rail beside the text on wide ones */
.toc { border-block: 1px solid var(--line); }
.toc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; cursor: pointer; list-style: none;
  font-size: .9375rem; font-weight: 600; color: var(--soft); transition: color .3s;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary:hover { color: var(--text); }
.toc summary svg { width: 20px; height: 20px; color: var(--blue); transition: transform .45s var(--ease); }
.toc[open] summary svg { transform: rotate(180deg); }
.toc nav { padding: 4px 0 20px; }
.toc a {
  display: block; padding: 9px 0 9px 18px;
  border-left: 1px solid var(--line-2);
  font-size: .9375rem; line-height: 1.45; color: var(--muted);
  transition: color .3s, border-color .3s, box-shadow .3s;
}
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--blue); border-left-color: var(--blue); box-shadow: inset 1px 0 0 var(--blue); }
.toc a[aria-current="true"]:hover { color: var(--blue-2); }
.toc a:focus-visible { outline-offset: -2px; }

@media (min-width: 961px) {
  .doc { grid-template-columns: minmax(190px, 240px) minmax(0, 1fr); column-gap: clamp(56px, 7vw, 112px); align-items: start; }
  .toc {
    position: sticky; top: calc(var(--header) + 40px);
    max-height: calc(100svh - var(--header) - 80px); overflow: auto; scrollbar-width: none;
    border: 0;
  }
  .toc::-webkit-scrollbar { display: none; }
  html.js .toc summary { display: none; }
  html.js .toc nav { padding: 0; }
  .toc a { font-size: .875rem; }
}

/* article: one comfortable measure, long rhythm, more air above a heading than below */
.doc__body { max-width: 65ch; font-size: 1.0625rem; }
.doc__body section + section { margin-top: clamp(52px, 5.5vw, 72px); }
.doc__body h2 { margin-bottom: 16px; font-size: 1.375rem; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; color: var(--text); text-wrap: balance; }
.doc__body h2 .n { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.doc__body p, .doc__body li { line-height: 1.75; color: var(--muted); text-wrap: pretty; }
.doc__body p + p, .doc__body ul + p, .doc__body p + ul, .doc__body .storage + p, .doc__body p + .storage { margin-top: 1.15em; }
.doc__body strong { color: var(--text); font-weight: 700; }
.doc__body a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; transition: color .3s; }
.doc__body a:hover { color: var(--blue-2); }
.doc__body ul { display: grid; gap: 10px; }
.doc__body ul li { position: relative; padding-left: 22px; }
.doc__body ul li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.doc__body [tabindex="-1"]:focus { outline: none; }

/* the two actions on the cookie page */
.doc__action { margin-block: 22px 26px; }
.doc__body p.doc__action + p { margin-top: 0; }
.doc__action .btn { white-space: normal; text-align: left; min-height: 52px; }
.doc__action .btn--ghost { background: transparent; }
.doc__action .btn--ghost:hover { background: rgba(241, 243, 255, .06); }

/* ---------- storage inventory ---------- */
.storage { width: 100%; margin-block: 30px 6px; border-collapse: collapse; font-size: .9375rem; line-height: 1.6; }
.storage caption { caption-side: top; padding-bottom: 14px; text-align: left; font-size: .8125rem; font-weight: 600; color: var(--muted-2); }
.storage th { padding: 0 20px 12px 0; text-align: left; vertical-align: bottom; font-size: .8125rem; font-weight: 600; color: var(--soft); border-bottom: 1px solid var(--line-2); }
.storage td { padding: 18px 20px 18px 0; vertical-align: top; color: var(--muted); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.storage th:last-child, .storage td:last-child { padding-right: 0; }
.storage td:first-child { width: 36%; }
.storage td:nth-child(2) { width: 29%; }
.storage .rec { display: block; font-weight: 700; color: var(--text); }
.storage code { font: inherit; }
.storage .rec + span { display: block; margin-top: 2px; font-size: .875rem; color: var(--muted-2); }

@media (max-width: 700px) {
  .storage, .storage tbody, .storage tr, .storage td { display: block; width: auto !important; }
  .storage caption { display: block; }
  .storage thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .storage tbody { border-top: 1px solid var(--line-2); }
  .storage tr { padding: 20px 0; border-bottom: 1px solid var(--line); }
  .storage td { padding: 0; border: 0; }
  .storage td + td { margin-top: 12px; }
  .storage td + td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .8125rem; font-weight: 600; color: var(--soft); }
}

/* ---------- footer: mark the page being read ---------- */
.footer__links a[aria-current="page"] { color: var(--text); }

@media (max-width: 600px) {
  .doc__action .btn { width: 100%; justify-content: center; }
}
