/* TARSINTOR - legal pages */

[hidden] { display: none !important; }

/* Hero */
.legal-hero { position: relative; overflow: hidden; padding: clamp(150px, 16vw, 210px) 0 clamp(56px, 7vw, 88px); color: var(--parch); background: radial-gradient(70% 90% at 78% 20%, #3A0D11 0%, #1A0F11 40%, var(--ink-deep) 78%); }
.legal-hero-inner { position: relative; }
.eyebrow-link { text-decoration: none; transition: color 0.2s ease; }
.eyebrow-link:hover { color: var(--parch); }
.legal-title { max-width: 980px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5.4vw, 76px); line-height: 1.04; text-wrap: balance; }
.legal-lede { max-width: 640px; margin-top: 22px; color: #C9CBD0; font-size: clamp(17px, 1.4vw, 19px); }
.legal-updated { margin-top: 28px; color: var(--steel-light); font-size: 14px; letter-spacing: 0.02em; }

/* Body */
.legal-body { padding: clamp(56px, 7vw, 96px) 0 clamp(80px, 10vw, 140px); }
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 700px); gap: clamp(40px, 6vw, 88px); align-items: start; }

.toc { position: sticky; top: 104px; }
.toc-title { color: var(--steel); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.toc ol { margin-top: 14px; border-left: 1px solid var(--parch-line); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 1px solid transparent; color: var(--steel); font-size: 14px; line-height: 1.4; text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease; }
.toc a::before { content: counter(toc); min-width: 1.2em; color: var(--red); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); border-left-color: var(--red); }

.doc { max-width: 700px; }
.doc-sec { scroll-margin-top: 100px; }
.doc-sec + .doc-sec { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--parch-line); }
.doc h2 { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; }
.doc-n { min-width: 1.4em; color: var(--red); font-size: 0.8em; }
.doc h3 { margin-top: 26px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.doc h3:first-of-type { margin-top: 0; }
.doc p + p, .doc ul + p, .doc p + ul, .doc .table-wrap + p, .doc p + .table-wrap, .doc .note + p, .doc h3 + p { margin-top: 12px; }
.doc ul li { position: relative; margin-top: 10px; padding-left: 24px; }
.doc ul li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 12px; height: 1px; background: var(--red); }
.doc a, .hub-company a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc a:hover, .hub-company a:hover { color: var(--red-hover); }
.doc code { padding: 1px 6px; border-radius: 4px; background: rgba(20, 20, 22, 0.06); font-size: 0.9em; }

.note { padding: 20px 22px; border: 1px solid var(--parch-line); border-radius: 8px; background: var(--parch-card); }
.note p + p { margin-top: 10px; }
.note-muted { color: var(--steel); font-size: 0.92em; }

.table-wrap { overflow-x: auto; margin: 4px 0 0; border: 1px solid var(--parch-line); border-radius: 8px; background: var(--parch-card); }
.doc table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.doc th, .doc td { padding: 12px 16px; text-align: left; vertical-align: top; }
.doc th { color: var(--steel); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--parch-line); }
.doc td + td, .doc th + th { border-left: 1px solid var(--parch-line); }
.doc tbody tr + tr td { border-top: 1px solid var(--parch-line); }

/* Hub */
.doc-list { border-top: 1px solid var(--ink); }
.doc-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 32px; gap: 32px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--parch-line); color: var(--ink); text-decoration: none; }
.doc-row-title { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; transition: color 0.2s ease; }
.doc-row-text { color: var(--steel); }
.doc-row-arrow { justify-self: end; color: var(--red); font-size: 22px; transition: transform 0.2s ease; }
.doc-row:hover .doc-row-title { color: var(--red); }
.doc-row:hover .doc-row-arrow { transform: translateX(4px); }
.hub-company { max-width: 760px; margin-top: clamp(56px, 7vw, 88px); }
.hub-company h2 { margin-bottom: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); }

/* FAQ page */
.faq-doc .doc-sec + .doc-sec { margin-top: 72px; padding-top: 0; border-top: 0; }
.faq-doc .faq-list { margin-top: 8px; }
.faq-doc .faq-q { font-size: clamp(16px, 1.3vw, 18px); }
.faq-more-page { margin-top: 56px; }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 18px 20px; border: 1px solid var(--parch-line); border-radius: 8px; background: var(--parch-card); }
  .toc ol { border-left: 0; }
  .toc a { margin-left: 0; padding-left: 0; border-left: 0; }
  .doc-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 8px 16px; }
  .doc-row-text { grid-column: 1; grid-row: 2; }
  .doc-row-arrow { grid-column: 2; grid-row: 1; }
}
@media (max-width: 640px) {
  .legal-hero { padding-top: 120px; }
  .legal-title { font-size: clamp(32px, 9.6vw, 40px); line-height: 1.08; }
  .legal-lede { font-size: 17px; line-height: 1.6; }
  .legal-body { padding-top: 40px; }
  .doc-sec + .doc-sec { margin-top: 40px; padding-top: 32px; }
  .doc h2 { gap: 12px; font-size: 22px; line-height: 1.25; }
  .doc ul li { padding-left: 20px; }
  .faq-doc .faq-q { font-size: 17px; }
  .faq-doc .doc-sec + .doc-sec { margin-top: 56px; }

  /* tables become one card per row, each value under its column name */
  .table-wrap { overflow: visible; border: 0; background: none; }
  .doc table { min-width: 0; font-size: 15.5px; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tbody tr { padding: 16px 18px; border: 1px solid var(--parch-line); border-radius: 8px; background: var(--parch-card); }
  .doc tbody tr + tr { margin-top: 12px; }
  .doc tbody tr + tr td { border-top: 0; }
  .doc td, .doc td + td { padding: 0; border-left: 0; }
  .doc td + td { margin-top: 12px; }
  .doc td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--steel); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-row:hover .doc-row-arrow { transform: none; }
}

/* Civil Brasil app pages: icon on the left, texts on the right (like the link preview) */
.app-icon { display: block; width: 160px; height: 160px; border-radius: 36px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(242, 237, 227, 0.08); }
.app-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 48px; align-items: center; }
.app-hero > * { grid-column: 2; }
.app-hero > .app-icon { grid-column: 1; grid-row: 1 / span 4; align-self: center; }
.app-hero .eyebrow { margin-bottom: 14px; }
.app-hero .legal-lede { margin-top: 16px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.doc-app { max-width: 760px; }
@media (max-width: 640px) {
  .app-hero { column-gap: 18px; row-gap: 0; }
  .app-icon { width: 76px; height: 76px; border-radius: 17px; }
  .app-hero > .app-icon { grid-row: 1 / span 2; }
  .app-hero .eyebrow { margin-bottom: 8px; }
  .app-hero .legal-lede, .app-hero .app-actions { grid-column: 1 / -1; }
  .app-hero .legal-lede { margin-top: 22px; }
}
@media (max-width: 380px) {
  .app-hero { column-gap: 14px; }
  .app-icon { width: 64px; height: 64px; border-radius: 14px; }
  .app-hero .eyebrow::before { width: 18px; }
}
