/* ─── legal-pages.css ──────────────────────────────────────────────────────────
   Shared design system for warranty.html, terms.html, privacy.html.
   Concept B — "Premium Editorial Document" (picked 2026-08-15): a white
   annual-report sheet floating on the dark site chrome. No document masthead —
   the site nav is the only dark band; the sheet opens directly with the red
   document ribbon. Each section is anchored by a giant red margin numeral
   (01/02/03) with a small ruled label beneath it, Oswald + Inter throughout,
   logo-red #EE3A23. One stylesheet, three pages, so the set never drifts.

   Ported from the concept repo 2026-08-15. Scoped to a .legal-page wrapper div
   rather than body.legal-page: layouts/main.php hard-codes the body class
   (internal-page), so the views wrap their <main> in <div class="legal-page">
   instead. Wired into the layout's $cssFiles for /terms, /privacy, /warranty. */

:root {
  --lp-red: #EE3A23;
  --lp-ink: #0a0a0a;
  --lp-gray: #4a4a4a;
  --lp-line: #e2e2e2;
  --lp-hairline: #ececec;
  --lp-stage: #101010;
}

.legal-page {
  background: var(--lp-stage);
  font-family: 'Inter', Arial, sans-serif;
  color: var(--lp-ink);
  margin: 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;
}

/* ── The stage & the sheet ── */
.doc-stage {
  padding: 56px 20px 96px;
}
.doc-sheet {
  max-width: 1120px;
  margin: 0 auto;
  background: #fdfdfc;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

/* ── Red document ribbon (top of the sheet) ── */
.doc-strip {
  background: var(--lp-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 11px 56px;
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
}
.doc-strip .doc-ref {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* ── Editorial intro (two columns, ruled) ── */
.doc-lede {
  padding: 40px 56px 8px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--lp-gray);
}
.doc-lede strong { color: var(--lp-ink); }
@media (min-width: 900px) {
  .doc-lede {
    columns: 2;
    column-gap: 56px;
    column-rule: 1px solid var(--lp-line);
  }
}

/* ── Content container (single editorial column) ── */
.doc-layout {
  display: block;
  padding: 18px 56px 40px;
}
.doc-toc { display: none; }
.doc-article { min-width: 0; }

/* ── Sections: giant red numeral + ruled label in the margin ── */
.doc-article section {
  scroll-margin-top: 100px;
}
.doc-section {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 10px 48px;
  padding: 38px 0 26px;
  border-top: 1px solid var(--lp-hairline);
  align-items: start;
}
.doc-article section:first-of-type { border-top: none; }
.sec-marker { min-width: 0; }
.sec-num {
  display: block;
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 68px;
  font-weight: 700;
  line-height: 0.9;
  color: var(--lp-red);
  letter-spacing: 1px;
}
.sec-label {
  display: block;
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--lp-ink);
  line-height: 1.3;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 2.5px solid var(--lp-ink);
  max-width: 128px;
}
.sec-body { min-width: 0; }
.sec-body > :first-child { margin-top: 4px; }

/* Full-width section variant (part dividers span everything) */
.doc-section-full { display: block; }
.doc-section-full .sec-body { min-width: 0; }

.doc-article p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--lp-gray);
  margin: 0 0 13px;
  max-width: 78ch;
}
.doc-article strong { color: var(--lp-ink); }
.doc-article ul {
  margin: 0 0 14px;
  padding-left: 22px;
  max-width: 76ch;
}
.doc-article li {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--lp-gray);
  margin-bottom: 6px;
}

/* In-document links. The concept leaned on browser-default link styling, but
   the live bundle's global rules (global-styles/styles_v3, inlined before this
   file) reset anchors to inherit color with no underline — which rendered the
   cross-document references as plain body text. Explicit styling, scoped to
   the running copy so the endbar/contact links keep their own treatments. */
.sec-body a,
.doc-lede a {
  color: var(--lp-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sec-body a:hover,
.doc-lede a:hover { color: var(--lp-ink); }

/* Callout — red-ruled emphasis block */
.doc-callout {
  background: #f7f7f6;
  border-left: 4px solid var(--lp-red);
  padding: 16px 22px;
  margin: 20px 0 22px;
  max-width: 78ch;
  border-radius: 0 6px 6px 0;
}
.doc-callout p { margin: 0; font-size: 14px; }

/* All-caps legal block */
.doc-caps {
  text-transform: uppercase;
  font-size: 13px !important;
  letter-spacing: 0.3px;
}

/* ── Warranty tier cards (Concept B: rounded, centered plates) ── */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding: 30px 56px 0;
}
.tier-card {
  border: 1.6px solid var(--lp-red);
  border-radius: 10px;
  padding: 26px 30px 22px;
  background: #fff;
  /* every list fills its card top to bottom (2026-09-01 per Hamza): the
     cards share the grid row's height, so the ul stretches and spreads its
     rows evenly instead of pooling empty space under the shortest list */
  display: flex;
  flex-direction: column;
}
.tier-card.t5 { border-color: var(--lp-ink); }
.tier-card.t2 { border-color: var(--lp-gray); }
.tier-card .tier-years {
  display: block;
  text-align: center;
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: var(--lp-red);
}
.tier-card.t5 .tier-years { color: var(--lp-ink); }
.tier-card.t2 .tier-years { color: var(--lp-gray); }
.tier-card .tier-label {
  display: block;
  text-align: center;
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--lp-ink);
  margin: 8px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--lp-line);
}
.tier-card h3 {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--lp-ink);
  margin: 18px 0 8px;
  text-align: left;
}
.tier-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
.tier-card li {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--lp-ink);
  padding: 5px 0 5px 20px;
}
.tier-card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lp-red);
}
.tier-card.t5 li::before { background: var(--lp-ink); }
.tier-card.t2 li::before { background: var(--lp-gray); }
.tier-card li span {
  color: var(--lp-gray);
  font-weight: 400;
  font-size: 12.5px;
}
/* the quiet caption inside a tier card — V2.2's "Full unlock is the flagship
   selection" note under the 10-year list */
.tier-card .tier-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--lp-line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--lp-gray);
}
.tier-footline {
  padding: 18px 56px 0;
  font-size: 13px;
  color: var(--lp-gray);
  text-align: center;
}
.tier-footline strong { color: var(--lp-ink); }

/* ── Part divider (Upfitting warranty) ── */
.doc-part-divider {
  background: var(--lp-ink);
  color: #fff;
  margin: 10px 0 30px;
  padding: 22px 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.doc-part-divider h2 {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  color: #fff;
}
.doc-part-divider h2 em { color: var(--lp-red); font-style: normal; }
.doc-part-divider .divider-note {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

/* ── Data table (MAP levels) ── */
.doc-table {
  width: 100%;
  max-width: 480px;
  border-collapse: collapse;
  margin: 6px 0 18px;
}
.doc-table th,
.doc-table td {
  border: 1px solid var(--lp-line);
  padding: 8px 14px;
  text-align: left;
  font-size: 14px;
  color: var(--lp-gray);
}
.doc-table th {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lp-ink);
  background: #f7f7f6;
}

/* ── Privacy "at a glance" promise chips ── */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 30px 56px 0;
}
.promise-card {
  border: 1.4px solid var(--lp-line);
  border-radius: 10px;
  border-top: 4px solid var(--lp-red);
  padding: 18px 20px;
  background: #fff;
}
.promise-card .promise-kicker {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--lp-ink);
  margin: 0 0 6px;
}
.promise-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--lp-gray);
}

/* ── Contact block (Concept B: ruled rows, red keylines) ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
  margin-top: 20px;
  max-width: 900px;
}
.contact-card {
  padding: 16px 0 14px;
  border-top: 2.5px solid var(--lp-red);
}
.contact-card .contact-kicker {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lp-ink);
  margin: 0 0 6px;
}
.contact-card p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--lp-ink);
}
.contact-card p a { color: var(--lp-ink); text-decoration: none; }
.contact-card p a:hover { color: var(--lp-red); }
.contact-card .contact-sub {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--lp-gray);
  margin-top: 4px;
}

/* ── "Our promise" closing strip ── */
.doc-promise {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 6px 56px 0;
  padding: 24px 0 30px;
  border-top: 1px solid var(--lp-line);
}
.doc-promise .promise-shield {
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--lp-ink);
}
.doc-promise .promise-shield svg { width: 100%; height: 100%; }
.doc-promise p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--lp-gray);
  font-style: italic;
  max-width: 84ch;
}
.doc-promise p strong {
  color: var(--lp-red);
  font-style: normal;
}

/* ── Cross-document footer band inside the sheet ── */
.doc-endbar {
  border-top: 1px solid var(--lp-line);
  padding: 22px 56px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.doc-endbar .end-left {
  font-size: 12.5px;
  color: var(--lp-gray);
  line-height: 1.5;
}
.doc-endbar .end-left strong { color: var(--lp-ink); }
.doc-endbar .end-links { display: flex; gap: 20px; }
.doc-endbar .end-links a {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lp-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--lp-red);
  padding-bottom: 2px;
}
.doc-endbar .end-links a:hover { color: var(--lp-red); }

/* ── Responsive ── */
@media (max-width: 980px) {
  .doc-strip { padding: 10px 28px; }
  .doc-lede { padding: 28px 28px 4px; }
  .doc-layout { padding: 12px 28px 36px; }
  .tier-cards { grid-template-columns: 1fr; padding: 22px 28px 0; }
  .tier-footline { padding: 14px 28px 0; }
  .promise-grid { grid-template-columns: 1fr; padding: 22px 28px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 0; }
  .doc-promise { margin: 6px 28px 0; }
  .doc-endbar { padding: 18px 28px 26px; }

  .doc-section {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 30px 0 20px;
  }
  .sec-marker {
    display: flex;
    align-items: baseline;
    gap: 14px;
  }
  .sec-num { font-size: 44px; }
  .sec-label {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    max-width: none;
    font-size: 15px;
  }
}
@media (max-width: 560px) {
  .doc-part-divider { flex-direction: column; align-items: flex-start; }
}

/* Print: the Eve popup twin (//site/_eve, size popup) is a screen control and
   must not ride into a printed or PDF copy of a legal document (2026-09-01,
   found when the V2.3 warranty PDF picked up a stray "EVE" label). */
@media print {
  #eve, [id^="eve-"] { display: none !important; }
}
