/* ════════════════════════════════════════════════════════════
   SIGMA V4 — LEGAL · terms, refund, privacy, cookies, risk,
   contact. Same terminal-editorial language as the landing:
   hairline rules, mono microlabels in [brackets], numbered
   sections as a document index, one electric accent.
   ═══════════════════════════════════════════════════════════ */

/* Legal pages don't load arcsignals-app.js, so they never get the runtime
   accent hue. Mirror TWEAKS.accentHue from index.html here — update both
   together. On the landing the inline style set by the app still wins. */
:root { --h: 145; }

/* ─── PAGE HEAD ─────────────────────────────────────────── */
.legal-hero { padding: 148px 0 0; position: relative; overflow: clip; }
.legal-hero::before {
  content: '';
  position: absolute; inset: 0 0 auto; height: 420px;
  background:
    linear-gradient(180deg, var(--accent-glow) 0%, transparent 62%),
    repeating-linear-gradient(90deg, var(--hairline) 0 1px, transparent 1px 84px);
  opacity: .5;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.legal-head {
  position: relative;
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
  margin-bottom: 44px;
}
.legal-head::before, .legal-head::after {
  content: '+';
  position: absolute; top: -11px;
  font-family: var(--mono); font-size: 13px;
  color: var(--dim); line-height: 1;
}
.legal-head::before { left: -3px; }
.legal-head::after  { right: -3px; }

.legal-head h1 {
  font-family: var(--head);
  font-size: clamp(34px, 5.4vw, 62px);
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.02;
  color: #fff;
  margin: 22px 0 0;
  text-wrap: balance;
}
.legal-head h1 em { font-style: normal; color: var(--accent); }

.legal-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px;
  margin-top: 26px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.legal-meta .dot { color: var(--dim); }
.legal-meta time { color: var(--text2); }

/* ─── DOCUMENT SWITCHER ─────────────────────────────────── */
.legal-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  list-style: none;
  padding: 16px 0 0;
  border-top: 1px solid var(--hairline);
  margin-bottom: 68px;
}
.legal-tabs a {
  display: inline-block;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); text-decoration: none;
  padding: 8px 14px; border-radius: 100px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.legal-tabs a:hover { color: #fff; background: rgba(255,255,255,.05); }
.legal-tabs a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: oklch(86% .26 var(--h) / .06);
}

/* ─── BODY ──────────────────────────────────────────────── */
.legal-body { padding-bottom: var(--pad); }
.legal-body > section { padding-top: 6px; }
.legal-body > section + section { margin-top: 56px; }

.legal-body h2 {
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--head);
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: #fff;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  margin-bottom: 22px;
  text-wrap: balance;
}
.legal-body h2 .ln {
  flex: none;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  transform: translateY(-1px);
}

.legal-body h3 {
  font-family: var(--head);
  font-size: 16px; font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 32px 0 12px;
}

.legal-body p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.78;
  max-width: 74ch;
  margin-bottom: 16px;
  text-wrap: pretty;
}
.legal-body p:last-child { margin-bottom: 0; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body em { font-style: italic; color: var(--text2); }

.legal-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  transition: border-color .2s, color .2s;
}
.legal-body a:hover { border-bottom-color: var(--accent); }

/* lists — mono bullet ticks, like the feature lists on the landing */
.legal-body ul, .legal-body ol { list-style: none; max-width: 74ch; margin-bottom: 18px; }
.legal-body li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--text2);
  line-height: 1.72;
  margin-bottom: 9px;
  text-wrap: pretty;
}
.legal-body ul > li::before {
  content: '';
  position: absolute; left: 3px; top: .72em;
  width: 6px; height: 1px;
  background: var(--accent);
  opacity: .75;
}
.legal-body ol { counter-reset: legal-ol; }
.legal-body ol > li { counter-increment: legal-ol; }
.legal-body ol > li::before {
  content: counter(legal-ol, decimal-leading-zero);
  position: absolute; left: 0; top: .1em;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--accent); opacity: .8;
}

/* ─── CALLOUT — for the load-bearing statements ─────────── */
.legal-note {
  position: relative;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: var(--r);
  padding: 22px 26px;
  margin: 26px 0;
  max-width: 74ch;
}
.legal-note .legal-note-label {
  display: block;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.legal-note p { color: var(--text); margin-bottom: 0; }
.legal-note p + p { margin-top: 12px; }

.legal-note--warn { border-left-color: var(--amber); background: var(--surface); }
.legal-note--warn .legal-note-label { color: var(--amber); }

/* ─── TABLES ────────────────────────────────────────────── */
.legal-table-wrap { overflow-x: auto; margin: 22px 0 26px; max-width: 74ch; }
.legal-body table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 14px;
}
.legal-body th {
  text-align: left;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
  padding: 0 20px 12px 0;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
}
.legal-body td {
  padding: 14px 20px 14px 0;
  color: var(--text2);
  border-bottom: 1px solid var(--hairline);
  line-height: 1.6;
  vertical-align: top;
}
.legal-body tr:last-child td { border-bottom: none; }
.legal-body td:first-child { color: var(--text); }

/* ─── CONTACT PAGE ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.contact-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: border-color .25s, transform .25s var(--ease);
}
.contact-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.contact-card .cc-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
}
.contact-card .cc-value {
  font-family: var(--head);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
  border-bottom: none;
  display: inline-block;
  word-break: break-word;
}
a.cc-value:hover { color: var(--accent); }
.contact-card .cc-sub {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.7;
  margin-top: 12px;
  margin-bottom: 0;
}
.contact-card .cc-meta {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  margin-top: 14px;
}

/* ─── FOOTER — columns ──────────────────────────────────── */
.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 44px 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 30px;
}
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h3 {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.footer-col a {
  display: inline-block;
  font-size: 13.5px;
  color: var(--text2); text-decoration: none;
  padding: 4px 0;
  transition: color .2s;
}
.footer-col a:hover { color: #fff; }
.footer-col a.is-mail { word-break: break-all; }

/* The disclaimer is load-bearing, so it has to be legible: --dim on --bg2
   lands around 1.9:1. --muted gets it to ~5:1. */
.footer-disclaimer {
  color: var(--muted);
  font-size: 11.5px;
  max-width: 860px;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .04em;
}
.footer-bottom .fb-tm { max-width: 640px; line-height: 1.8; }

/* Screen-only: the printed copy states where the authoritative version lives. */
.legal-print-src { display: none; }

/* ─── PRINT ─────────────────────────────────────────────── */
/* The PDFs attached to Whop are printed from these pages, so the document a
   customer downloads is the same one the site serves. Dark UI inverts to
   paper; the accent darkens to stay legible on white. */
@media print {
  @page { margin: 18mm 16mm; }

  html, body {
    background: #fff !important;
    color: #14171c;
    font-size: 10.5pt;
  }

  nav, .legal-tabs, .footer-cols, #tweaks-panel { display: none !important; }
  .legal-hero::before { display: none !important; }

  .legal-hero { padding: 0; overflow: visible; }
  .legal-head {
    border-top: 1.5pt solid #14171c;
    padding-top: 10pt;
    margin-bottom: 16pt;
  }
  .legal-head::before, .legal-head::after { display: none; }
  .legal-head h1 { color: #000; font-size: 24pt; margin-top: 8pt; }
  .legal-head h1 em { color: #000; }

  .eyebrow { color: #5a6270; font-size: 8pt; }
  .eyebrow::before, .eyebrow::after { color: #2f7d3f; }
  .legal-meta { color: #5a6270; font-size: 8pt; margin-top: 9pt; }
  .legal-meta time { color: #14171c; }
  .legal-meta .dot { color: #9aa2ae; }

  .legal-print-src {
    display: block;
    margin-top: 9pt;
    font-family: var(--mono); font-size: 8pt;
    color: #5a6270;
    word-break: break-all;
    /* sits inside .legal-meta, which uppercases — a URL must not be shouted */
    text-transform: none;
    letter-spacing: 0;
  }

  .legal-body { padding-bottom: 0; }
  .legal-body > section + section { margin-top: 16pt; }
  .legal-body h2 {
    color: #000; font-size: 13pt;
    padding-top: 10pt;
    border-top: .5pt solid #c9ced6;
    margin-bottom: 8pt;
    break-after: avoid; page-break-after: avoid;
  }
  .legal-body h2 .ln { color: #2f7d3f; font-size: 8.5pt; }
  .legal-body h3 { color: #000; font-size: 10.5pt; margin: 12pt 0 5pt; break-after: avoid; }
  .legal-body p, .legal-body li { color: #14171c; font-size: 10pt; line-height: 1.5; max-width: none; }
  .legal-body ul, .legal-body ol { max-width: none; }
  .legal-body li { margin-bottom: 4pt; }
  .legal-body strong { color: #000; }
  .legal-body a { color: #14171c; border-bottom: none; text-decoration: underline; }
  /* A printed page can't be clicked, so cross-references to the other
     policies have to carry their address. mailto: already reads as text. */
  .legal-body a[href^="/"]::after {
    content: " (arcsignals.trade" attr(href) ")";
    font-family: var(--mono); font-size: 8pt;
    color: #5a6270;
    text-decoration: none;
  }
  .legal-body ul > li::before { background: #2f7d3f; opacity: 1; }
  .legal-body ol > li::before { color: #2f7d3f; opacity: 1; }

  .legal-note {
    background: #f4f6f8; border: .5pt solid #c9ced6; border-left: 2pt solid #2f7d3f;
    padding: 10pt 12pt; margin: 12pt 0; max-width: none;
    break-inside: avoid; page-break-inside: avoid;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .legal-note .legal-note-label { color: #2f7d3f; font-size: 7.5pt; margin-bottom: 6pt; }
  .legal-note p { color: #14171c; }
  .legal-note--warn { border-left-color: #8a5d00; }
  .legal-note--warn .legal-note-label { color: #8a5d00; }

  .legal-table-wrap { overflow: visible; max-width: none; margin: 12pt 0 14pt; }
  .legal-body table { min-width: 0; break-inside: avoid; page-break-inside: avoid; }
  .legal-body th {
    color: #5a6270; font-size: 7.5pt;
    border-bottom: .75pt solid #14171c;
    padding: 0 14pt 5pt 0;
  }
  .legal-body td {
    color: #14171c; font-size: 9.5pt;
    border-bottom: .5pt solid #d7dbe1;
    padding: 7pt 14pt 7pt 0;
  }
  .legal-body td:first-child { color: #000; }

  .contact-grid { gap: 10pt; }
  .contact-card {
    border: .5pt solid #c9ced6; background: #f4f6f8;
    padding: 12pt; break-inside: avoid;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .contact-card .cc-label { color: #5a6270; margin-bottom: 8pt; }
  .contact-card .cc-value { color: #000; font-size: 12pt; }
  .contact-card .cc-sub { color: #14171c; font-size: 9.5pt; }
  .contact-card .cc-meta { color: #2f7d3f; }

  footer {
    background: #fff !important;
    border-top: .75pt solid #14171c;
    break-inside: avoid; page-break-inside: avoid;
    margin-top: 18pt;
  }
  .footer-inner { padding: 10pt 0 0; max-width: none; }
  .footer-disclaimer { color: #14171c; font-size: 8pt; max-width: none; line-height: 1.55; }
  .footer-bottom {
    color: #5a6270; font-size: 7.5pt;
    border-top: .5pt solid #d7dbe1;
    margin-top: 10pt; padding-top: 8pt;
  }
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .legal-hero { padding-top: 116px; }
  .legal-tabs { margin-bottom: 48px; }
  .legal-body > section + section { margin-top: 44px; }
  .legal-body h2 { gap: 12px; }
  .legal-note { padding: 20px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
@media (max-width: 520px) {
  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
}
