/* Hubrink: páginas internas (privacidade, termos, cookies, obrigado, 404)
   Depende dos tokens e componentes de style.css. Mobile first. */

/* ---------- Cabeçalho simples das páginas internas ---------- */
.pnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 250, 248, .9); color: var(--ink);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: env(safe-area-inset-top);
}
.pnav__in { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pnav__logo { display: block; width: 118px; flex: none; }
.pnav__logo img { width: 100%; height: auto; }
.pnav__right { display: flex; align-items: center; gap: 4px; }
.pnav__back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--charcoal);
  transition: background-color .3s, color .3s;
}
.pnav__back:hover { background: var(--mist); color: var(--ink); }
.pnav__back .ic { width: 16px; height: 16px; transform: rotate(180deg); }
.pnav .btn { display: none; min-height: 44px; padding: 10px 20px; font-size: 14px; }
@media (min-width: 640px) {
  .pnav .btn { display: inline-flex; }
}
@media (min-width: 1024px) {
  .pnav__in { height: 76px; }
  .pnav__logo { width: 140px; }
}

/* ---------- Página de texto (legal) ---------- */
.legal-hero { background: var(--ink-2); color: var(--on-dark); padding: 56px 0 48px; position: relative; overflow: hidden; isolation: isolate; }
.legal-hero::before {
  content: ""; position: absolute; z-index: -1; width: 90vmax; height: 90vmax; right: -50vmax; top: -50vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,129,109,.45), rgba(0,129,109,0) 70%);
}
.legal-hero h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.04em; font-size: clamp(2.1rem, 8vw, 3.6rem); line-height: 1.05; margin-bottom: 16px; }
.legal-hero h1 em { font-style: normal; font-weight: 300; color: var(--mint); }
.legal-hero p { color: var(--on-dark-2); font-size: 16px; font-weight: 300; max-width: 60ch; }
.legal-hero .meta { margin-top: 20px; color: var(--mint); }
@media (min-width: 640px) { .legal-hero { padding: 88px 0 72px; } .legal-hero p { font-size: 18px; } }

.legal { padding: 40px 0 72px; }
.legal__grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .legal { padding: 72px 0 112px; }
  .legal__grid { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
}

/* Sumário: recolhível no celular, fixo ao lado no desktop */
.toc { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.toc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 12px 18px; font-weight: 600; font-size: 15px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
.toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc ol { padding: 0 10px 12px; counter-reset: toc; }
.toc li a {
  display: flex; gap: 10px; padding: 9px 8px; border-radius: 8px; font-size: 14px; line-height: 1.35; color: var(--charcoal);
  transition: background-color .25s, color .25s;
}
.toc li a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 11px; color: var(--green); padding-top: 2px; }
.toc li a:hover { background: var(--mist); color: var(--ink); }
@media (min-width: 1024px) {
  .toc { position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow: auto; }
}

.prose { max-width: 72ch; font-size: 16px; line-height: 1.7; color: var(--charcoal); overflow-wrap: anywhere; }
.prose section { scroll-margin-top: 96px; }
.prose section + section { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line); }
.prose h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; color: var(--ink); font-size: clamp(1.35rem, 4.6vw, 1.7rem); line-height: 1.2; margin-bottom: 16px; }
.prose h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 24px 0 8px; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 16px; display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.prose a:not(.btn) { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:not(.btn):hover { color: var(--green); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .ph { background: #FFF4D6; color: #6B4E00; padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.prose .note { background: var(--mist); border-radius: 16px; padding: 18px 20px; margin: 20px 0; font-size: 15px; }
@media (min-width: 640px) { .prose { font-size: 17px; } }

/* Tabelas: viram cartões no celular */
.tbl { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; line-height: 1.5; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--green-deep); }
.tbl th, .tbl td { padding: 12px 14px; vertical-align: top; }
.tbl tbody tr { border-top: 1px solid var(--line); }
.tbl code { font-family: var(--font-mono); font-size: 13px; background: var(--mist); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
@media (max-width: 699px) {
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tbody tr { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 6px 0; margin-bottom: 12px; }
  .tbl td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 8px 16px; }
  .tbl td::before { content: attr(data-label); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--green-deep); padding-top: 2px; }
}
@media (min-width: 700px) {
  .tbl { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; border-collapse: separate; border-spacing: 0; background: #fff; }
  .tbl thead { background: var(--mist); }
  .tbl tbody td { border-top: 1px solid var(--line); }
  .tbl tbody tr { border-top: 0; }
}

/* ---------- Páginas de status (obrigado, 404) ---------- */
.status {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100vh - 64px); min-height: calc(100svh - 64px);
  display: grid; align-items: center; padding: 64px 0 80px;
  background: var(--ink-2); color: var(--on-dark);
}
.status__rings { position: absolute; z-index: -1; width: min(130vw, 900px); right: -55vw; top: 50%; transform: translateY(-50%); color: rgba(127,214,197,.14); pointer-events: none; }
@media (min-width: 900px) { .status__rings { right: -12vw; } }
.status::before {
  content: ""; position: absolute; z-index: -2; width: 110vmax; height: 110vmax; right: -60vmax; top: -50vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,129,109,.5), rgba(0,129,109,0) 70%);
}
.status__code { font-family: var(--font-display); font-weight: 300; font-size: clamp(5rem, 28vw, 11rem); line-height: .9; letter-spacing: -0.06em; color: var(--mint); margin-bottom: 12px; }
.status h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.04em; font-size: clamp(2.1rem, 8.5vw, 4rem); line-height: 1.04; margin-bottom: 18px; max-width: 16ch; }
.status h1 em { font-style: normal; font-weight: 300; color: var(--mint); }
.status__lead { color: var(--on-dark-2); font-size: 17px; font-weight: 300; max-width: 50ch; margin-bottom: 32px; }
@media (min-width: 640px) { .status__lead { font-size: 19px; } }
.status__check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); display: grid; place-items: center; margin-bottom: 28px; box-shadow: 0 0 0 10px rgba(0,129,109,.18); }
.status__check svg { width: 28px; height: 28px; color: #fff; }

.next { display: grid; gap: 12px; margin: 8px 0 36px; max-width: 640px; counter-reset: nx; }
.next li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 16px 18px; border: 1px solid var(--on-dark-line); border-radius: 16px; background: rgba(246,250,248,.04); }
.next li::before { counter-increment: nx; content: counter(nx, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--mint); padding-top: 3px; }
.next b { display: block; color: var(--on-dark); font-weight: 600; margin-bottom: 2px; }
.next span { color: var(--on-dark-2); font-size: 15px; }
.status .ph { background: rgba(255, 214, 102, .16); color: #FFD666; padding: 1px 6px; border-radius: 6px; font-size: .9em; }

.status__links { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--on-dark-line); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--on-dark-2); }
.status__links a { text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.status__links a:hover { color: var(--on-dark); }
