/* ──────────────────────────────────────────────
   LEGAL SCREEN — Privacy & Cookies / Terms of Use
   Paper register (Expression C). All styles scoped to
   `.screen--legal` so they cannot leak into other surfaces.
   ────────────────────────────────────────────── */

.screen--legal {
  background: var(--paper);
  color: var(--ink);
  flex-direction: column;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

.screen--legal a {
  color: var(--sec-finance);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 81, 181, 0.3);
}

.screen--legal a:hover { border-bottom-color: var(--sec-finance); }

/* ---- TAB NAV ---- */
.screen--legal .legal-tabs {
  display: flex;
  border-bottom: 1px solid var(--paper-line);
  padding: 0 max(var(--sp-12), calc((100% - 1280px) / 2 + var(--sp-12)));
  background: var(--paper);
  position: sticky;
  top: var(--nav-h);
  z-index: 9;
  overflow-x: auto;
  white-space: nowrap;
}

.screen--legal .legal-tab {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  padding: var(--sp-4) 0;
  margin-right: var(--sp-8);
  color: rgba(14, 14, 16, 0.4);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.screen--legal .legal-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--sec-finance);
}

.screen--legal .legal-tab:hover:not(.is-active) {
  color: rgba(14, 14, 16, 0.65);
}

/* ---- PANELS ---- */
.screen--legal .legal-panel { display: none; }
.screen--legal .legal-panel.is-active { display: block; }

/* ---- DOCUMENT ---- */
.screen--legal .doc {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-20) var(--sp-12) var(--sp-20);
}

/* Shared paper-register label — .doc-eyebrow (document opener) and
   .section-label (per-section) are ONE rule (Task #601); they used
   to be two near-identical clones with 2px deltas. */
.screen--legal .doc-eyebrow,
.screen--legal .section-label {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--sec-finance);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.screen--legal .doc-eyebrow::before,
.screen--legal .section-label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--sec-finance);
}

.screen--legal .doc-title {
  font-family: var(--serif);
  font-weight: var(--fw-light);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-headline);
  margin-bottom: var(--sp-4);
  color: var(--ink);
}

.screen--legal .doc-title em {
  font-style: italic;
  color: var(--sec-finance);
}

.screen--legal .doc-meta {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: rgba(14, 14, 16, 0.4);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid var(--paper-line);
  margin-bottom: var(--sp-12);
}

.screen--legal .doc-intro {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  line-height: var(--lh-article);
  color: rgba(14, 14, 16, 0.65);
  margin-bottom: var(--sp-12);
  max-width: none;
}

/* ---- SECTIONS ---- */
.screen--legal .doc-section {
  margin-bottom: var(--sp-24);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid var(--paper-line);
}

.screen--legal .doc-section:last-of-type { border-bottom: none; }

.screen--legal .doc-section h2 {
  font-family: var(--serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h1);
  letter-spacing: var(--ls-body);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-5);
  color: var(--ink);
}

.screen--legal .doc-section p {
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-article);
  color: rgba(14, 14, 16, 0.65);
  margin-bottom: var(--sp-4);
  max-width: none;
}

.screen--legal .doc-section p:last-child { margin-bottom: 0; }
.screen--legal .doc-section p strong { color: var(--ink); font-weight: var(--fw-medium); }

/* ---- DATA TABLE ---- */
.screen--legal .legal-cell-label { display: none; }

.screen--legal .legal-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: var(--sp-6) 0;
}
.screen--legal .legal-table-scroll .data-table {
  margin: 0;
}
.screen--legal .data-table td {
  overflow-wrap: anywhere;
}
.screen--legal .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-6) 0;
}

.screen--legal .data-table th {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: rgba(14, 14, 16, 0.4);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--paper-line);
  background: var(--bone);
  font-weight: var(--fw-regular);
}

.screen--legal .data-table td {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  padding: var(--sp-3) 14px;
  border-bottom: 1px solid var(--paper-line);
  vertical-align: top;
  line-height: var(--lh-base);
  color: rgba(14, 14, 16, 0.65);
}

.screen--legal .data-table td:first-child {
  color: var(--ink);
  font-weight: var(--fw-medium);
}

.screen--legal .data-table tr:last-child td { border-bottom: none; }

/* ---- CALLOUT ---- */
.screen--legal .callout {
  background: var(--bone);
  border-left: 3px solid var(--sec-finance);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
}

.screen--legal .callout p {
  font-family: var(--serif);
  font-size: var(--fs-body);
  color: rgba(14, 14, 16, 0.65);
  margin-bottom: 0;
  max-width: none;
}

.screen--legal .callout strong { color: var(--ink); }

/* ---- DOC LIST ---- */
.screen--legal .doc-list {
  list-style: none;
  margin: var(--sp-4) 0 var(--sp-5);
  padding: 0;
}

.screen--legal .doc-list li {
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-article);
  color: rgba(14, 14, 16, 0.65);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  border-bottom: 1px solid var(--paper-line);
  position: relative;
}

.screen--legal .doc-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--sec-finance);
}

.screen--legal .doc-list li:last-child { border-bottom: none; }

/* ---- CONTACT BLOCK ---- */
.screen--legal .contact-block {
  background: var(--ink);
  color: var(--paper);
  padding: var(--sp-8) var(--sp-8);
  margin-top: var(--sp-12);
}

.screen--legal .contact-block .cb-label {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.45);
  margin-bottom: var(--sp-3);
}

.screen--legal .contact-block p {
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-article);
  color: rgba(244, 241, 234, 0.7);
  max-width: none;
  margin-bottom: var(--sp-3);
}

.screen--legal .contact-block p:last-child { margin-bottom: 0; }

.screen--legal .contact-block a {
  color: var(--be-yellow);
  border-bottom-color: rgba(255, 194, 23, 0.3);
}

.screen--legal .contact-block a:hover { border-bottom-color: var(--be-yellow); }

@media (max-width: 767px) {
  .screen--legal .legal-tabs { padding: 0 var(--sp-5); }
  .screen--legal .doc { padding: var(--sp-14) var(--sp-5) var(--sp-14); }
  .screen--legal .doc-section { margin-bottom: var(--sp-16); }
}

/* Mobile only: each original table row becomes a labelled card.
   Keep the column headings available to assistive technology. */
@media screen and (max-width: 767px) {
  .screen--legal .legal-table-scroll { overflow: visible; }
  .screen--legal .data-table,
  .screen--legal .data-table tbody,
  .screen--legal .data-table tr,
  .screen--legal .data-table td { display: block; }

  .screen--legal .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .screen--legal .data-table tbody tr {
    padding: var(--sp-5);
    margin-bottom: var(--sp-4);
    border: 1px solid var(--paper-line);
    background: var(--bone);
  }

  .screen--legal .data-table tbody tr:last-child { margin-bottom: 0; }

  .screen--legal .data-table td {
    padding: 0;
    border: 0;
    font-family: var(--sans);
    font-size: var(--fs-body);
    line-height: var(--lh-base);
    color: var(--ink);
    overflow-wrap: anywhere;
    min-width: 0;
  }

  .screen--legal .data-table td + td { margin-top: var(--sp-4); }

  .screen--legal .legal-cell-label {
    display: block;
    margin-bottom: var(--sp-1);
    font-family: var(--mono);
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-regular);
    letter-spacing: var(--ls-nav);
    text-transform: uppercase;
    color: rgba(14, 14, 16, 0.65);
  }
}

@media print {
  .screen--legal .legal-table-scroll { overflow: visible; }
}

/* The paper-register topbar variant (`body.theme-paper .nav*`) lives in
   main.css alongside the global footer-bar paper rules so the cascade is
   defined in one place for every paper-register route (/privacy, /terms,
   /brief/:ref). Do not redeclare here. */
