/* Flipora website: shared layout for the legal pages. */

.legal-hero { padding: 56px 0 28px; background: linear-gradient(180deg, var(--bg-tint), #fff); }
.legal-hero h1 { margin: 2px 0 12px; font-size: clamp(34px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.03em; }
.legal-hero p { max-width: 680px; margin: 0; font-size: 18px; color: var(--muted); }
.legal-meta { margin-top: 16px !important; font-size: 14px !important; color: var(--muted); }

.legal-tabs { display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; margin-top: 26px; padding: 6px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.legal-tabs a { padding: 10px 16px; border-radius: 11px; color: var(--muted); font: 600 14px/1 var(--font); }
.legal-tabs a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.legal-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
@media (max-width: 480px) {
  .legal-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; width: 100%; padding: 4px; }
  .legal-tabs a { padding: 10px 2px; text-align: center; font-size: 13px; }
}

.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 36px; padding-bottom: 88px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; font-size: 14px; }
.toc h4 { margin: 0 0 12px; font: 700 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); line-height: 1.35; }
.toc a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.toc a.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toc-mobile { display: none; }
@media (max-width: 960px) {
  .doc { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .doc > aside { display: none; }
  .toc-mobile { display: block; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
  .toc-mobile summary { display: flex; justify-content: space-between; padding: 14px 16px; list-style: none; cursor: pointer; font-weight: 600; color: var(--ink); }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after { content: "▾"; color: var(--muted); }
  .toc-mobile[open] summary::after { content: "▴"; }
  .toc-mobile .toc { position: static; max-height: none; padding: 0 10px 12px; }
}

.content { min-width: 0; max-width: 760px; }
.content > section { margin-bottom: 40px; scroll-margin-top: 84px; }
.content h2 { margin: 0 0 12px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.content h3 { margin: 22px 0 8px; font-size: 17px; }
.content p, .content li { color: var(--ink-2); }
.content ul { margin: 0 0 1em; padding-left: 22px; }
.content li { margin: 6px 0; }
.content .callout { margin-top: 0; margin-bottom: 36px; }

.table-wrap { margin: 14px 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--bg-soft); color: var(--ink); font-size: 13px; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td code, p code, li code { padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-soft); color: var(--ink); overflow-wrap: anywhere; }
td code { white-space: nowrap; overflow-wrap: normal; }
#components td code { white-space: normal; overflow-wrap: anywhere; }

.legal-contact { padding: 22px 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-soft); }
.legal-contact p:last-child { margin: 0; }
.legal-caps { font-size: 14.5px; letter-spacing: .005em; }
