/* TrackBounty public website - M5a legal family sheet (spec v4 section 4.8; map v4.1 amendment A1). */
/* Legal shell: public/legal_base.html (spec v4 §4.8) */
.tbp-legal-wrap { padding-top: 40px; padding-bottom: 80px; }
@media (max-width: 767px) { .tbp-legal-wrap { padding-top: 28px; padding-bottom: 64px; } }
.tbp-legal-grid > * { min-width: 0; }

/* The document's table of contents: a hairline-topped list of 15 px ink-2 links, */
.tbp-legal-nav { font-size: 15px; line-height: 1.4; }
@media (min-width: 1024px) {
  .tbp-legal-nav {
    position: sticky;
    top: calc(var(--tb-header-h) + 16px);
    max-height: calc(100vh - var(--tb-header-h) - 32px);
    margin: 0 -8px;
    padding: 0 8px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
.tbp-legal-nav-label { margin: 0 0 10px; color: var(--tb-ink); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tbp-legal-nav .legal-nav { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--tb-line); list-style: none; }
.tbp-legal-nav .legal-nav li { margin: 0; }
.tbp-legal .legal-nav a,
.tbp-legal .legal-nav a:hover { color: var(--tb-ink-2); }
.tbp-legal .legal-nav a { display: block; padding: 6px 12px; border-left: 2px solid transparent; text-decoration: none; }
.tbp-legal .legal-nav a:hover { color: var(--tb-ink); text-decoration: underline; text-underline-offset: 3px; }
.tbp-legal .legal-nav a.active,
.tbp-legal .legal-nav a.active:hover { color: var(--tb-ink); border-left-color: var(--tb-bolt); font-weight: 600; }
/* privacy.html (guarded; not touched) gives its "Data controller" item an inline */
.tbp-legal .legal-nav li[style] { padding: 4px 12px !important; color: var(--tb-ink-3) !important; font-size: 13px !important; line-height: 1.45 !important; }
/* Below 1024 px the contents sit above the document, one item per line (A2, 2026-10-11: the earlier wrapped
   row of short labels re-flowed on the font swap because its rows followed exact glyph widths). */
@media (max-width: 1023px) {
  .tbp-legal-nav .legal-nav { display: block; }
  .tbp-legal .legal-nav a { padding: 4px 10px; }
}

/* The document: 72ch, h1 46 / 38 / 32, meta date, paid pill version, h2 26 px
   with the header's scroll margin, body 17 px ink-2 / 1.75. */
.tbp-legal .legal-content { max-width: 72ch; }
.tbp-legal .legal-content h1 { margin: 0 0 12px; font-size: 46px; font-weight: 900; letter-spacing: -0.045em; line-height: 1.02; }
@media (max-width: 1023px) { .tbp-legal .legal-content h1 { font-size: 38px; } }
@media (max-width: 767px) { .tbp-legal .legal-content h1 { font-size: 32px; } }
.tbp-legal .legal-content .legal-date { margin: 0 0 12px; color: var(--tb-ink-3); font-size: 14px; line-height: 1.45; }
.tbp-legal .legal-content .legal-version {
  display: inline-block;
  margin: 0 0 32px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #F0F0ED;
  color: var(--tb-ink-2);
  font: 700 10px/1 var(--font-sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tbp-legal .legal-content h2 { margin: 44px 0 14px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; scroll-margin-top: calc(var(--tb-header-h) + 16px); }
.tbp-legal .legal-content h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.tbp-legal .legal-content p,
.tbp-legal .legal-content ul,
.tbp-legal .legal-content ol { margin: 0 0 16px; color: var(--tb-ink-2); font-size: 17px; line-height: 1.75; }
.tbp-legal .legal-content ul,
.tbp-legal .legal-content ol { padding-left: 24px; }
.tbp-legal .legal-content li { margin-bottom: 6px; }
.tbp-legal .legal-content li > ul,
.tbp-legal .legal-content li > ol { margin: 6px 0 0; }
.tbp-legal .legal-content strong { color: var(--tb-ink); }
.tbp-legal .legal-content code { padding: 2px 6px; border-radius: 4px; background: var(--tb-tint); color: var(--tb-ink); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.85em; }
.tbp-legal .legal-callout { margin: 20px 0 24px; padding: 14px 18px; border-left: 3px solid var(--tb-bolt); border-radius: 0 10px 10px 0; background: var(--tb-tint); color: var(--tb-ink); font-size: 16px; line-height: 1.6; }
/* The callouts' links sit in a <div>, not a sentence element: the .tbp-company
   pattern gives each a 24 px+ box without moving the line. */
.tbp-legal .legal-callout a { display: inline-block; margin: -3px 0; padding: 3px 0; }

/* Tables (the cookie policy): hairline rows, uppercase heads; a table wider than */
.tbp-legal .legal-content table { display: table; table-layout: fixed; width: 100%; max-width: 100%; margin: 0 0 20px; border-collapse: collapse; color: var(--tb-ink-2); font-size: 15px; line-height: 1.5; }
.tbp-legal .legal-content th,
.tbp-legal .legal-content td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--tb-line); color: var(--tb-ink-2); text-align: left; vertical-align: top; }
.tbp-legal .legal-content th { color: var(--tb-ink); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
/* A2: a real table with fixed layout (the semantics return; columns no longer follow glyph widths, so the font swap
   re-flows nothing); the Purpose column takes the room, every cell wraps long words. */
.tbp-legal .legal-content th:nth-child(2) { width: 42%; }
.tbp-legal .legal-content th,
.tbp-legal .legal-content td { overflow-wrap: anywhere; }
@media (max-width: 767px) {   /* four columns in 350 px: smaller type, tighter cells, widths that keep whole words */
  .tbp-legal .legal-content table { font-size: 13px; }
  .tbp-legal .legal-content th,
  .tbp-legal .legal-content td { padding: 8px 8px 8px 0; }
  .tbp-legal .legal-content th { font-size: 11px; letter-spacing: 0.04em; }
  .tbp-legal .legal-content th:first-child { width: 24%; }
  .tbp-legal .legal-content th:nth-child(2) { width: 32%; }
  .tbp-legal .legal-content th:nth-child(3),
  .tbp-legal .legal-content th:nth-child(4) { width: 22%; }
}
.tbp-legal .legal-content tbody tr:last-child td { border-bottom-color: var(--tb-line-2); }
.tbp-legal .legal-content tbody tr:hover { background: transparent; }   /* base.html paints a dark --bg-hover */

/* The end note: the old legal footer's copyright block, legal text kept verbatim
   under the document, outside .legal-content (the .tbp-company pattern). */
.tbp-legal-endnote { max-width: 72ch; margin: 56px 0 0; padding-top: 22px; border-top: 1px solid var(--tb-line); color: var(--tb-ink-2); font-size: 15px; line-height: 1.6; }

/* Back to top: the small outline button, fixed bottom right above the chat */
.tbp-legal .tbp-legal-top { position: fixed; right: 24px; bottom: 96px; z-index: 50; background: var(--tb-paper); }
.tbp-legal .tbp-legal-top[hidden] { display: none; }
@media (max-width: 767px) { .tbp-legal .tbp-legal-top { right: 16px; bottom: 80px; } }

/* Print: the chrome (components.css hides the header), the table of contents, */
@media print {
  .tbp-legal .tbp-legal-nav,
  .tbp-legal .tbp-legal-top,
  .tbp-legal ~ footer.landing-footer,
  .tbp-legal ~ #toast-container,
  .tbp-legal ~ .tb-chat-bubble,
  .tbp-legal ~ .tb-chat-panel { display: none !important; }
  .tbp-legal { background: #fff; color: #000; }
  .tbp-legal-wrap { padding: 0; }
  .tbp-legal .tbp-legal-grid { display: block; }
  .tbp-legal .legal-content,
  .tbp-legal-endnote { max-width: none; }
  .tbp-legal .legal-content h1,
  .tbp-legal .legal-content h2,
  .tbp-legal .legal-content h3 { color: #000; break-after: avoid; page-break-after: avoid; }
  .tbp-legal .legal-content h2 { padding-bottom: 4px; border-bottom: 1px solid #ccc; }
  .tbp-legal .legal-content a { color: #000; text-decoration: underline; }
  .tbp-legal .legal-callout { border-left-color: #666; background: #f5f5f5; }
  .tbp-legal .legal-content table { display: table; overflow: visible; }
  .tbp-legal .legal-content tr { break-inside: avoid; page-break-inside: avoid; }
}

/* The legal documents are running text: the fallback face scaled for it (TB Inter Fallback Text, components.css)
   replaces the homepage-tuned one of the shared include on the legal root, so the swap re-wraps nothing on a slow
   connection (map v4.1 A1, 2026-10-11); the chrome around it keeps the shared stack. */
.tbp-legal { font-family: 'TB Inter', 'TB Inter Fallback Text', 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
