/* ==========================================================================
   Taskbase Trust Center - shared stylesheet

   Aligned to taskbase.com/ai-sales-coach:
     header   72px, solid white, purple inline wordmark, 14px nav,
              two 40px pills (radius 20px, 8px/20px padding, 16px label)
     type     Work Sans, weight 400, -0.06em display / -0.05em small,
              1.2 display line-height; H1 56, H2 44, card title 16, body 14
     surfaces white alternating with #F8FAFC; cards 12px radius with a
              1px inset #E5E5E5 ring rather than a border
     rhythm   96px section padding, 64px page gutter, full-bleed sections
     footer   #F8FAFC, four columns, 16px heads, 16px #525252 links,
              14px legal row

   No third-party dependencies: no webfont CDN, no JS libraries, no icon
   fonts, no remote images. The wordmark is the same vector the site serves
   inline. Brand fonts are used when present locally, with a system fallback.
   ========================================================================== */

:root {
  /* Brand */
  --tb-purple:        #9301E6;
  --tb-purple-bright: #9809FF;
  --tb-purple-soft:   #F2EFFE;
  --tb-purple-line:   #E3DBFB;

  /* Ink & text - sampled from the reference page */
  --tb-ink:      #0A0A0A;
  --tb-body:     #404040;
  --tb-muted:    #525252;
  --tb-muted-2:  #737373;
  --tb-faint:    #A3A3A3;

  /* Surfaces */
  --tb-white:   #FFFFFF;
  --tb-surface: #F8FAFC;
  --tb-line:    #E5E5E5;
  --tb-line-2:  #EFEFEF;
  --tb-btn-line:#D1D5DB;

  /* Status */
  --tb-ok-bg:   #E8F6EE;  --tb-ok-fg:   #10683C;  --tb-ok-line:   #BEE3CE;
  --tb-warn-bg: #FDF3E2;  --tb-warn-fg: #8A5A05;  --tb-warn-line: #F2DEB6;
  --tb-plan-bg: #F2EFFE;  --tb-plan-fg: #5D1E9E;  --tb-plan-line: #DDD2FA;

  /* Type */
  --tb-font: "Work Sans", "Work Sans Variable", Inter, -apple-system,
             BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tb-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                  "Liberation Mono", monospace;

  /* Metrics */
  --tb-radius:    12px;
  --tb-radius-sm: 10px;
  --tb-pill:      999px;
  --tb-ring:      inset 0 0 0 1px var(--tb-line);
  --tb-maxw:      1560px;
  --tb-gutter:    clamp(20px, 5vw, 64px);
  --tb-header-h:  72px;
  --tb-section:   clamp(56px, 7vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--tb-white);
  color: var(--tb-body);
  font-family: var(--tb-font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tb-font);
  color: var(--tb-ink);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

a { color: var(--tb-purple); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--tb-purple); outline-offset: 3px; border-radius: 4px; }

.tb-shell { max-width: var(--tb-maxw); margin: 0 auto; padding: 0 var(--tb-gutter); }

/* Utilities. These exist so no element needs a style="" attribute, which lets
   the Content-Security-Policy stay at style-src 'self' with no unsafe-inline. */
.tb-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tb-band { padding-bottom: var(--tb-section); }
.tb-section__cta { margin-top: 20px; }
.tb-note {
  margin: 20px 0 0; max-width: 82ch;
  font-size: 14px; line-height: 1.5; letter-spacing: -0.05em; color: var(--tb-muted);
}
.tb-card__contact { margin-top: 14px !important; }

.tb-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--tb-ink); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--tb-radius-sm) 0; font-size: 14px;
}
.tb-skip:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */

.tb-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--tb-white);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
.tb-header__inner {
  height: var(--tb-header-h);
  max-width: var(--tb-maxw); margin: 0 auto;
  padding: 0 var(--tb-gutter);
  display: flex; align-items: center;
}

/* Wordmark ---------------------------------------------------------------- */

.tb-wordmark { width: 95px; height: auto; display: block; fill: var(--tb-purple); flex: none; }
.tb-wordmark--footer { margin-bottom: 34px; }

.tb-logo { display: flex; align-items: center; gap: 12px; flex: none; margin-right: 24px; }
.tb-logo:hover { text-decoration: none; }
.tb-logo__divider { width: 1px; height: 18px; background: var(--tb-line); }
.tb-logo__tag {
  font-size: 14px; font-weight: 400; letter-spacing: -0.05em;
  color: var(--tb-muted); white-space: nowrap;
}

/* Nav --------------------------------------------------------------------- */

.tb-nav { display: flex; align-items: center; }
.tb-nav a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  font-size: 14px; font-weight: 400; letter-spacing: -0.05em;
  color: var(--tb-ink);
}
.tb-nav a:hover { color: var(--tb-purple); text-decoration: none; }
.tb-nav a[aria-current="page"] { color: var(--tb-purple); }

.tb-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Buttons ----------------------------------------------------------------- */

.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  /* 7 + 24 + 7 + 2px border = the reference page's 40px pill */
  min-height: 40px; padding: 7px 20px; line-height: 24px;
  border-radius: var(--tb-pill);
  font-family: var(--tb-font);
  font-size: 16px; font-weight: 400; letter-spacing: -0.05em;
  border: 1px solid transparent; background: none; cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.tb-btn--dark { background: var(--tb-ink); color: #fff; }
.tb-btn--dark:hover { background: var(--tb-purple); color: #fff; text-decoration: none; }
.tb-btn--ghost { background: #fff; color: var(--tb-ink); border-color: var(--tb-btn-line); }
.tb-btn--ghost:hover { border-color: var(--tb-ink); color: var(--tb-ink); text-decoration: none; }

/* Mobile menu (no JS - <details>) ----------------------------------------- */

.tb-burger { display: none; margin-left: auto; position: relative; }
.tb-burger > summary {
  list-style: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--tb-pill);
  display: grid; place-items: center; color: var(--tb-ink);
}
.tb-burger > summary::-webkit-details-marker { display: none; }
.tb-burger > summary:hover { background: var(--tb-surface); }
.tb-burger > summary svg { width: 24px; height: 24px; display: block; }
.tb-burger__panel {
  position: absolute; right: 0; top: 48px; z-index: 110;
  min-width: 232px; padding: 12px;
  background: #fff; border-radius: var(--tb-radius);
  box-shadow: var(--tb-ring), 0 12px 32px rgba(10, 10, 10, 0.09);
  display: grid; gap: 4px;
}
.tb-burger__panel nav { display: grid; }
.tb-burger__panel a:not(.tb-btn) {
  padding: 10px 12px; border-radius: var(--tb-radius-sm);
  font-size: 15px; letter-spacing: -0.04em; color: var(--tb-ink);
}
.tb-burger__panel a:not(.tb-btn):hover { background: var(--tb-surface); text-decoration: none; }
.tb-burger__panel .tb-btn { margin-top: 8px; }

@media (max-width: 1080px) {
  .tb-nav, .tb-header__actions { display: none; }
  .tb-burger { display: block; }
}
@media (max-width: 420px) { .tb-logo__divider, .tb-logo__tag { display: none; } }

/* -------------------------------------------------------------------- hero */

.tb-hero { padding: clamp(96px, 11vw, 168px) 0 var(--tb-section); }
.tb-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--tb-purple-soft); color: var(--tb-purple);
  box-shadow: inset 0 0 0 1px var(--tb-purple-line);
  border-radius: var(--tb-pill);
  padding: 7px 16px; font-size: 14px; letter-spacing: -0.04em;
  margin: 0 0 24px;
}
.tb-hero__eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tb-purple-bright);
}
.tb-hero h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.2; max-width: 20ch;
}
.tb-hero__lede {
  margin: 24px 0 0;
  font-size: 18px; line-height: 1.5; letter-spacing: -0.05em;
  color: var(--tb-ink); max-width: 64ch;
}
.tb-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* ----------------------------------------------------------------- layout */

.tb-section { padding: var(--tb-section) 0; }
.tb-section--alt { background: var(--tb-surface); }

.tb-section__head { max-width: 62ch; margin-bottom: 40px; }
.tb-section__kicker {
  font-size: 14px; letter-spacing: -0.04em; color: var(--tb-purple); margin: 0 0 14px;
}
.tb-section h2 { font-size: clamp(30px, 3.4vw, 44px); }
.tb-section__sub {
  margin: 16px 0 0; color: var(--tb-body);
  font-size: 18px; line-height: 1.5; letter-spacing: -0.04em;
}

.tb-grid { display: grid; gap: 16px; }
.tb-grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tb-grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ------------------------------------------------------------------- cards */

.tb-card {
  background: #fff;
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-ring);
  padding: 28px 26px;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.tb-card h3 { font-size: 16px; line-height: 1.5; letter-spacing: -0.05em; margin-bottom: 8px; }
.tb-card p {
  margin: 0; color: var(--tb-muted);
  font-size: 14px; line-height: 1.5; letter-spacing: -0.05em;
}
.tb-card__icon {
  width: 36px; height: 36px; border-radius: 10px; margin-bottom: 18px;
  background: var(--tb-purple-soft);
  display: grid; place-items: center; color: var(--tb-purple); flex: none;
}
.tb-card__icon svg { width: 18px; height: 18px; display: block; }
.tb-card__ref {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--tb-line-2);
  font-size: 12px; color: var(--tb-faint);
  font-family: var(--tb-font-mono); letter-spacing: -0.01em;
}
a.tb-card:hover { text-decoration: none; }
.tb-card--link:hover { box-shadow: inset 0 0 0 1px var(--tb-ink); transform: translateY(-2px); }

.tb-card--doc .tb-card__meta {
  font-size: 12px; color: var(--tb-faint); font-family: var(--tb-font-mono); margin-bottom: 14px;
}
.tb-card--doc h3 { font-size: 20px; letter-spacing: -0.06em; margin-bottom: 10px; }
.tb-card--doc p { font-size: 15px; letter-spacing: -0.03em; }
.tb-card__go {
  margin-top: 22px; font-size: 15px; letter-spacing: -0.04em; color: var(--tb-purple);
  display: inline-flex; align-items: center; gap: 7px; transition: gap .18s ease;
}
.tb-card--doc:hover .tb-card__go { gap: 12px; }

/* ------------------------------------------------- stats (reference style) */

.tb-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 40px 32px;
}
.tb-fact__value {
  font-size: clamp(36px, 4.2vw, 56px); line-height: 1.2; letter-spacing: -0.06em;
  color: var(--tb-purple);
}
.tb-fact__label {
  margin: 12px 0 0; font-size: 14px; line-height: 1.5; letter-spacing: -0.05em;
  color: var(--tb-muted); max-width: 30ch;
}

/* ---------------------------------------------------------------- controls */

.tb-domains { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.tb-domain {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border-radius: var(--tb-radius);
  box-shadow: var(--tb-ring); padding: 20px;
  transition: box-shadow .18s ease;
}
.tb-domain:hover { box-shadow: inset 0 0 0 1px var(--tb-purple-line); text-decoration: none; }
.tb-domain__num {
  font-family: var(--tb-font-mono); font-size: 12px;
  color: var(--tb-purple); background: var(--tb-purple-soft);
  border-radius: 7px; width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
}
.tb-domain__title {
  display: block; font-size: 16px; line-height: 1.5; letter-spacing: -0.05em; color: var(--tb-ink);
}
.tb-domain__desc {
  display: block; margin-top: 4px;
  font-size: 14px; line-height: 1.5; letter-spacing: -0.05em; color: var(--tb-muted);
}

/* ---------------------------------------------------------------- statuses */

.tb-status {
  display: inline-block;
  font-size: 12.5px; line-height: 1.45; letter-spacing: -0.02em;
  padding: 3px 10px; border-radius: var(--tb-pill);
  border: 1px solid transparent; white-space: nowrap;
}
.tb-status--implemented { background: var(--tb-ok-bg);   color: var(--tb-ok-fg);   border-color: var(--tb-ok-line); }
.tb-status--partial     { background: var(--tb-warn-bg); color: var(--tb-warn-fg); border-color: var(--tb-warn-line); }
.tb-status--planned     { background: var(--tb-plan-bg); color: var(--tb-plan-fg); border-color: var(--tb-plan-line); }
.tb-status__note {
  display: block; white-space: normal; margin-top: 6px;
  font-size: 13px; color: var(--tb-muted-2); line-height: 1.5; letter-spacing: -0.02em;
}

/* ------------------------------------------------------------------ footer */

.tb-footer { background: var(--tb-surface); padding: var(--tb-section) 0; font-size: 16px; }
.tb-footer__inner { max-width: var(--tb-maxw); margin: 0 auto; padding: 0 var(--tb-gutter); }

.tb-footer__cols {
  display: grid; gap: 48px 32px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.tb-footer__head {
  font-size: 16px; line-height: 1.5; letter-spacing: -0.05em;
  color: var(--tb-ink); margin: 0 0 16px;
}
.tb-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tb-footer li, .tb-footer a {
  font-size: 16px; line-height: 1.5; letter-spacing: -0.05em; color: var(--tb-muted);
}
.tb-footer a:hover { color: var(--tb-ink); text-decoration: none; }
.tb-footer__col--brand ul { gap: 10px; }

.tb-footer__legal {
  margin-top: clamp(48px, 6vw, 80px);
  display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: baseline;
}
.tb-footer__legal p { margin: 0; font-size: 14px; letter-spacing: -0.04em; color: var(--tb-ink); }
.tb-footer__legal ul { display: flex; flex-wrap: wrap; gap: 28px; }
.tb-footer__legal a { font-size: 14px; letter-spacing: -0.04em; color: var(--tb-ink); }

/* ================================================================== LEGAL == */

.tb-legal { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.tb-legal__main { padding: 40px 0 96px; min-width: 0; }

/* Table of contents ------------------------------------------------------- */

.tb-toc {
  position: sticky; top: calc(var(--tb-header-h) + 20px);
  max-height: calc(100vh - var(--tb-header-h) - 44px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 34px 6px 40px 0; font-size: 14px; scrollbar-width: thin;
}
.tb-toc__title {
  font-size: 14px; letter-spacing: -0.04em; color: var(--tb-faint); margin: 0 0 14px;
}
.tb-toc ol { list-style: none; margin: 0; padding: 0; }
.tb-toc__doc { margin-bottom: 8px; }
.tb-toc__doc > a {
  display: block; padding: 8px 12px; border-radius: var(--tb-radius-sm);
  font-size: 15px; letter-spacing: -0.05em; color: var(--tb-ink); line-height: 1.35;
}
.tb-toc__doc > a:hover { background: var(--tb-surface); text-decoration: none; }
.tb-toc__doc > a.is-active { background: var(--tb-purple-soft); color: var(--tb-purple); }
.tb-toc__sub { margin: 2px 0 10px 12px; padding-left: 12px; border-left: 1px solid var(--tb-line); }
.tb-toc__sub a {
  display: block; padding: 5px 10px; border-radius: 7px;
  color: var(--tb-muted); font-size: 13.5px; line-height: 1.45; letter-spacing: -0.03em;
}
.tb-toc__sub a:hover { color: var(--tb-ink); background: var(--tb-surface); text-decoration: none; }
.tb-toc__sub a.is-active { color: var(--tb-purple); }

.tb-toc__mobile { display: none; }

@media (max-width: 960px) {
  .tb-legal { grid-template-columns: minmax(0, 1fr); }
  .tb-toc { position: static; max-height: none; padding: 0 0 8px; overflow: visible; }
  .tb-toc__mobile { display: block; }
  .tb-toc__panel { display: none; }
  .tb-toc__mobile[open] .tb-toc__panel { display: block; padding-top: 14px; }
  .tb-toc__mobile summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 20px; margin-top: 24px; min-height: 40px;
    background: #fff; box-shadow: var(--tb-ring); border-radius: var(--tb-pill);
    font-size: 16px; letter-spacing: -0.05em; color: var(--tb-ink);
  }
  .tb-toc__mobile summary::-webkit-details-marker { display: none; }
  .tb-toc__mobile summary::after { content: "\25BE"; color: var(--tb-muted-2); font-size: 13px; }
  .tb-toc__mobile[open] summary::after { content: "\25B4"; }
  .tb-legal__main { padding-top: 24px; }
}

/* Document body ----------------------------------------------------------- */

.tb-legal__intro { padding: clamp(72px, 9vw, 120px) 0 8px; border-bottom: 1px solid var(--tb-line); }
.tb-legal__intro h1 { font-size: clamp(32px, 4.2vw, 50px); }
.tb-legal__intro .tb-hero__lede { font-size: 18px; margin-top: 20px; }

.tb-doc { scroll-margin-top: calc(var(--tb-header-h) + 16px); }
.tb-doc + .tb-doc { margin-top: 80px; padding-top: 72px; border-top: 1px solid var(--tb-line); }

.tb-doc__head { margin-bottom: 32px; }
.tb-doc__badge {
  display: inline-block; font-family: var(--tb-font-mono); font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--tb-purple); background: var(--tb-purple-soft);
  box-shadow: inset 0 0 0 1px var(--tb-purple-line);
  border-radius: var(--tb-pill); padding: 5px 13px; margin-bottom: 18px;
}
.tb-doc__head h2 { font-size: clamp(26px, 3.2vw, 36px); }
.tb-doc__version {
  margin: 16px 0 0; font-family: var(--tb-font-mono); font-size: 13px;
  letter-spacing: -0.01em; color: var(--tb-muted-2);
}

/* PDF downloads. The files are built by pdf/build.mjs in CI; see README. */
.tb-icon { width: 18px; height: 18px; display: block; flex: none; }
.tb-legal__downloads {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin: 28px 0 32px;
}
.tb-legal__downloads-note { font-size: 14px; letter-spacing: -0.04em; color: var(--tb-muted-2); }
.tb-doc__pdf {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 14px; letter-spacing: -0.04em;
}
.tb-doc__pdf .tb-icon { width: 16px; height: 16px; }

/* Slightly heavier than the 400 used for display headings: these navigate
   dense legal prose, where 400 does not separate from body text. */
.tb-doc h3 {
  font-size: 20px; font-weight: 500; letter-spacing: -0.05em;
  margin: 48px 0 14px; scroll-margin-top: calc(var(--tb-header-h) + 16px);
}
.tb-doc h4 {
  font-size: 16px; font-weight: 500; letter-spacing: -0.035em;
  margin: 32px 0 10px; color: var(--tb-ink);
  scroll-margin-top: calc(var(--tb-header-h) + 16px);
}
.tb-doc h3 + h4 { margin-top: 20px; }
.tb-doc h4.tb-doc__label {
  font-size: 15px; font-weight: 400; letter-spacing: -0.03em;
  line-height: 1.6; color: var(--tb-muted); max-width: 78ch; margin: 28px 0 8px;
}
.tb-doc p {
  margin: 0 0 15px; color: var(--tb-body);
  font-size: 15.5px; line-height: 1.7; letter-spacing: -0.02em; max-width: 78ch;
}
.tb-doc p.tb-doc__lead { color: var(--tb-muted); }
.tb-doc p em { color: var(--tb-muted); }
.tb-doc strong { font-weight: 600; color: var(--tb-ink); }

.tb-doc ul.tb-doc__bullets { margin: 0 0 16px; padding: 0; list-style: none; max-width: 78ch; }
.tb-doc ul.tb-doc__bullets li {
  position: relative; padding-left: 20px; margin-bottom: 9px;
  font-size: 15.5px; line-height: 1.7; letter-spacing: -0.02em; color: var(--tb-body);
}
.tb-doc ul.tb-doc__bullets li::before {
  content: ""; position: absolute; left: 3px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--tb-purple);
}

/* Checkbox lists (DPA categories) ----------------------------------------- */

.tb-checklist { margin: 0 0 18px; padding: 0; list-style: none; max-width: 78ch; display: grid; gap: 6px; }
.tb-checklist li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 15px; border-radius: var(--tb-radius-sm);
  box-shadow: inset 0 0 0 1px var(--tb-line-2); background: var(--tb-surface);
  font-size: 15px; line-height: 1.6; letter-spacing: -0.02em; color: var(--tb-muted);
}
.tb-checklist li.is-checked {
  background: #fff; box-shadow: inset 0 0 0 1px var(--tb-purple-line); color: var(--tb-body);
}
.tb-checklist__box {
  flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 5px;
  border: 1.5px solid #CFCFCF; background: #fff; display: grid; place-items: center;
}
.is-checked .tb-checklist__box { background: var(--tb-purple); border-color: var(--tb-purple); }
.tb-checklist__box svg { width: 11px; height: 11px; display: block; color: #fff; }
.tb-checklist li:not(.is-checked) .tb-checklist__box svg { visibility: hidden; }

/* Tables ------------------------------------------------------------------ */

.tb-tablewrap {
  margin: 22px 0 28px;
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-ring);
  overflow: hidden; background: #fff;
}
.tb-tablewrap__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.tb-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.6; }
table.tb-table th, table.tb-table td {
  text-align: left; vertical-align: top; padding: 14px 16px;
  border-bottom: 1px solid var(--tb-line-2); letter-spacing: -0.02em;
}
table.tb-table thead th {
  background: var(--tb-surface);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--tb-muted); white-space: nowrap;
  border-bottom: 1px solid var(--tb-line);
}
table.tb-table tbody tr:last-child td { border-bottom: 0; }
table.tb-table tbody tr:hover { background: #FCFCFD; }
table.tb-table td strong { color: var(--tb-ink); }

table.tb-table--controls td.tb-ref {
  width: 66px; white-space: nowrap;
  font-family: var(--tb-font-mono); font-size: 12.5px; color: var(--tb-purple); padding-top: 16px;
}
table.tb-table--controls td.tb-measure { min-width: 320px; }
table.tb-table--controls td.tb-statuscell { width: 250px; }

table.tb-table--legend td:first-child { width: 150px; }

table.tb-table--mapping td:first-child { width: 42%; }
table.tb-table--mapping td:last-child {
  font-family: var(--tb-font-mono); font-size: 13px; color: var(--tb-muted); letter-spacing: -0.01em;
}

table.tb-table--subs { font-size: 14px; min-width: 1020px; }
table.tb-table--subs td:nth-child(1) { width: 150px; }
table.tb-table--subs td:nth-child(2) { width: 190px; }
table.tb-table--subs td:nth-child(4) { width: 160px; color: var(--tb-ink); }

.tb-tablewrap__hint {
  display: none; padding: 10px 16px; background: var(--tb-surface);
  border-top: 1px solid var(--tb-line-2); font-size: 12.5px; color: var(--tb-muted-2);
}
@media (max-width: 1060px) and (min-width: 701px) { .tb-tablewrap__hint { display: block; } }

/* Stacked tables on narrow screens ---------------------------------------- */

@media (max-width: 700px) {
  .tb-tablewrap.is-stacked .tb-tablewrap__scroll { overflow-x: visible; }
  .tb-tablewrap.is-stacked .tb-tablewrap__hint { display: none; }

  table.tb-table.is-stacked { min-width: 0; }
  table.tb-table.is-stacked thead { display: none; }
  table.tb-table.is-stacked tbody,
  table.tb-table.is-stacked tr,
  table.tb-table.is-stacked td { display: block; width: auto; min-width: 0; }

  table.tb-table.is-stacked tr { padding: 16px; border-bottom: 1px solid var(--tb-line); }
  table.tb-table.is-stacked tr:last-child { border-bottom: 0; }
  table.tb-table.is-stacked tr:hover { background: none; }
  table.tb-table.is-stacked td { border: 0; padding: 0; margin-bottom: 11px; }
  table.tb-table.is-stacked td:last-child { margin-bottom: 0; }

  table.tb-table.is-stacked td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block; margin-bottom: 3px;
    font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tb-faint);
  }

  table.tb-table--controls.is-stacked td.tb-ref { margin-bottom: 5px; }
  table.tb-table--subs.is-stacked td:first-child { font-size: 16px; }
  table.tb-table--subs.is-stacked td:nth-child(4) { width: auto; }

  table.tb-table--mapping td:first-child { width: 45%; }
  table.tb-table--mapping th, table.tb-table--mapping td,
  table.tb-table--legend th, table.tb-table--legend td { padding: 11px 13px; }
}

/* Back to top ------------------------------------------------------------- */

.tb-totop {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 44px; font-size: 14px; letter-spacing: -0.04em; color: var(--tb-muted-2);
}
.tb-totop:hover { color: var(--tb-ink); text-decoration: none; }

/* ------------------------------------------------------------------- print */

@media print {
  .tb-header, .tb-toc, .tb-footer, .tb-totop, .tb-hero__actions, .tb-skip, .tb-burger,
  .tb-legal__downloads, .tb-doc__pdf { display: none !important; }
  body { font-size: 11pt; }
  .tb-legal { display: block; }
  .tb-doc { break-before: page; }
  .tb-doc:first-of-type { break-before: auto; }
  .tb-tablewrap, .tb-card, .tb-checklist li { break-inside: avoid; }
  .tb-tablewrap__scroll { overflow: visible; }
  table.tb-table--subs { min-width: 0; }
  a { color: inherit; text-decoration: none; }
}
