/* =============================================================
   SlabOS Legal Document System — shared stylesheet
   ----------------------------------------------------------
   Used by every page under /legal/. Mirrors the proposal.html
   aesthetic: dark sexy cover + dark CTA back cover, clean
   white inner pages for the dense legal content. Print mode
   strips the floating Download button + page margins so the
   user can save → PDF and hand it to their lawyer.
   ============================================================ */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #1a1a1a;
  color: #1a1a1a;
  font-size: 10.5pt;
  line-height: 1.65;
}

/* ============== Floating Download-PDF button ============== */
.print-btn {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  background: #ff5e1f; color: #fff; border: none;
  padding: 12px 24px; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(255,94,31,.4);
  transition: background .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.print-btn:hover { background: #c4421a; }
.print-btn svg { width: 16px; height: 16px; }

/* Back-to-legal-index pill, top-left mirror of the print btn */
.back-btn {
  position: fixed; top: 20px; left: 20px; z-index: 999;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; padding: 10px 18px; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(20px);
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.back-btn:hover { background: rgba(255,255,255,0.14); color: #ff7340; }

/* ============== A4 page wrapper ============== */
.page {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  margin: 20px auto;
  position: relative;
  overflow: hidden;
  page-break-after: always;
}
.page:last-child { page-break-after: auto; }

/* ============== Cover page (dark) ============== */
.cover {
  background: #0c0c0d;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  min-height: 297mm;
  position: relative;
  overflow: hidden;
}
/* soft radial brand glow top-right */
.cover::before {
  content: "";
  position: absolute;
  top: -80mm; right: -60mm;
  width: 220mm; height: 220mm;
  background: radial-gradient(circle, rgba(255,94,31,0.12), transparent 70%);
  pointer-events: none;
}
.cover-top {
  padding: 14mm 14mm 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}
.cover-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cover-logo img { width: 34px; height: 34px; object-fit: contain; }
.cover-logo-text {
  font-weight: 900; font-style: italic; font-size: 20pt;
  letter-spacing: -.04em; text-transform: uppercase; color: #fff; line-height: 1;
}
.cover-logo-text em { color: #ff5e1f; font-style: inherit; }
.cover-date {
  font-size: 8pt; color: #666; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; text-align: right;
}
.cover-date div:first-child {
  color: #ff5e1f; font-size: 8pt; font-weight: 700; margin-bottom: 2pt;
}
.cover-hero {
  padding: 0 14mm;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.cover-eyebrow {
  font-size: 9pt; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: #ff5e1f; margin-bottom: 14pt;
}
.cover-title {
  font-size: 44pt; font-weight: 900; font-style: italic;
  letter-spacing: -.05em; line-height: .88; text-transform: uppercase;
  margin-bottom: 18pt;
}
.cover-title em { color: #ff5e1f; font-style: inherit; }
.cover-subtitle {
  font-size: 11pt; color: #aaa; max-width: 130mm; line-height: 1.65; margin-bottom: 28pt;
}
.cover-meta {
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 14pt;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14pt 24pt;
  max-width: 150mm;
}
.cover-meta-item { font-size: 8.5pt; }
.cover-meta-label {
  color: #666; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 3pt; font-size: 7.5pt;
}
.cover-meta-val { color: #ddd; font-weight: 500; }
.cover-bottom {
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 9mm 14mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12mm;
  position: relative;
}
.cover-bottom-disclaimer {
  font-size: 7.5pt; color: #777; line-height: 1.6; font-style: italic;
  max-width: 110mm;
}
.cover-bottom strong { color: #bbb; }
.cover-bottom a { color: #ff5e1f; text-decoration: none; }
.cover-doc-no {
  font-size: 8pt; color: #555; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; text-align: right;
  flex-shrink: 0;
}

/* ============== Inner pages (white) ============== */
.inner {
  background: #fff;
  padding: 14mm 14mm 14mm;
  min-height: 297mm;
  display: flex;
  flex-direction: column;
}
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 6pt; margin-bottom: 14pt;
  border-bottom: 1px solid #e8e8e8;
}
.page-header-logo { display: flex; align-items: center; gap: 7px; }
.page-header-logo img { width: 18px; height: 18px; object-fit: contain; }
.page-header-logo-text {
  font-size: 10pt; font-weight: 900; font-style: italic;
  letter-spacing: -.04em; text-transform: uppercase; color: #1a1a1a; line-height: 1;
}
.page-header-logo-text em { color: #ff5e1f; font-style: inherit; }
.page-header-meta {
  font-size: 7pt; color: #999; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.page-footer {
  margin-top: auto; padding-top: 8pt;
  border-top: 1px solid #f0f0f0;
  display: flex; justify-content: space-between; align-items: center;
}
.page-footer p { font-size: 7.5pt; color: #999; }

/* ============== Typography in legal body ============== */
.section { margin-bottom: 14pt; }
.section + .section { margin-top: 0; }

.section h2 {
  font-size: 12.5pt;
  font-weight: 900;
  color: #0c0c0d;
  margin-bottom: 8pt;
  margin-top: 10pt;
  letter-spacing: -.005em;
  text-transform: uppercase;
  padding-bottom: 4pt;
  border-bottom: 2px solid #ff5e1f;
  display: inline-block;
}
.section h2 .num {
  color: #ff5e1f;
  margin-right: 8pt;
  font-style: italic;
}
.section h3 {
  font-size: 9.5pt;
  font-weight: 800;
  color: #c4421a;
  margin-top: 8pt;
  margin-bottom: 4pt;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.section p {
  font-size: 9.5pt;
  color: #333;
  line-height: 1.65;
  margin-bottom: 6pt;
}
.section ul, .section ol {
  margin: 4pt 0 8pt 24pt;
}
.section li {
  font-size: 9.5pt; color: #333; margin-bottom: 3pt; line-height: 1.55;
}
.section strong { color: #0c0c0d; }
.section em { font-style: italic; color: #444; }
.section a { color: #c4421a; text-decoration: none; border-bottom: 1px dotted #c4421a; }

/* Quote-style emphasis block */
.quote-clause {
  font-size: 9.5pt;
  background: #f7f7f8;
  border-left: 3px solid #ff5e1f;
  padding: 10pt 14pt;
  margin: 8pt 0;
  color: #1e1e22;
  font-weight: 500;
  line-height: 1.65;
}

/* Callout boxes */
.callout {
  margin: 10pt 0 14pt;
  padding: 12pt 14pt;
  border-left: 3px solid #ff5e1f;
  background: #fff5ef;
  border-radius: 4pt;
  font-size: 9pt;
  color: #1e1e22;
  line-height: 1.6;
}
.callout strong { color: #c4421a; }
.callout-warn { background: #fef2f2; border-left-color: #ef4444; }
.callout-warn strong { color: #b91c1c; }
.callout-info { background: #f0f9ff; border-left-color: #0284c7; }
.callout-info strong { color: #0369a1; }
.callout-success { background: #f0fdf4; border-left-color: #16a34a; }
.callout-success strong { color: #15803d; }

/* TOC */
.toc {
  background: #f7f7f8;
  border: 1px solid #e8e8e8;
  border-radius: 8pt;
  padding: 14pt 18pt;
  margin-bottom: 14pt;
}
.toc-title {
  font-size: 8pt; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: #ff5e1f; margin-bottom: 8pt;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li {
  display: flex; gap: 10pt; font-size: 9pt;
  color: #444; padding: 3pt 0;
  border-bottom: 1px dotted #d9d9de;
}
.toc li:last-child { border-bottom: none; }
.toc-num {
  color: #ff5e1f; font-weight: 700; min-width: 24pt;
}
.toc-page { margin-left: auto; color: #888; }

/* Signature block */
.sig-block {
  margin-top: 16pt;
  padding: 16pt;
  border: 1px solid #d9d9de;
  border-radius: 8pt;
  background: #fafafa;
}
.sig-title {
  font-size: 8pt; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: #ff5e1f; margin-bottom: 12pt;
}
.sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22pt;
}
.sig-party { font-size: 9pt; }
.sig-party-name {
  font-weight: 800; color: #0c0c0d; margin-bottom: 6pt; font-size: 10pt;
}
.sig-line {
  border-bottom: 1.2px solid #777;
  margin-top: 24pt; margin-bottom: 3pt;
  height: 1px;
}
.sig-label {
  font-size: 7pt; color: #888;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 4pt;
}

/* Fillable field placeholder (Order Form etc.) */
.fill {
  display: inline-block;
  min-width: 120pt;
  border-bottom: 1px dotted #777;
  padding: 0 4pt;
  color: #888;
  font-style: italic;
  font-size: 9pt;
}
.fill-lg { min-width: 240pt; }
.fill-sm { min-width: 60pt; }
.fill-checkbox {
  display: inline-block;
  width: 10pt; height: 10pt;
  border: 1.5px solid #1e1e22;
  margin-right: 4pt;
  vertical-align: middle;
}

/* Pricing/maths callout box (Order Form) */
.calc-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  margin: 14pt 0;
  border: 1.5px solid #ff5e1f;
  border-radius: 8pt;
  overflow: hidden;
}
.calc-cell {
  padding: 14pt 16pt;
  background: #fff5ef;
  text-align: center;
}
.calc-cell .label {
  font-size: 7pt;
  font-weight: 800;
  color: #c4421a;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 4pt;
}
.calc-cell .val {
  font-size: 14pt;
  font-weight: 900;
  font-style: italic;
  color: #0c0c0d;
  letter-spacing: -.02em;
}
.calc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff5e1f;
  color: #fff;
  font-weight: 900;
  font-size: 14pt;
  padding: 0 8pt;
}

/* Tables */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8pt 0 12pt;
  font-size: 9pt;
}
.legal-table th {
  background: #0c0c0d;
  color: #fff;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6pt 8pt;
  text-align: left;
}
.legal-table td {
  padding: 6pt 8pt;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  vertical-align: top;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:nth-child(even) td { background: #fafafa; }

/* Severity pill (SLA) */
.sev-pill {
  display: inline-block;
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2pt 7pt;
  border-radius: 99pt;
}
.sev-1 { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.sev-2 { background: #fed7aa; color: #c2410c; border: 1px solid #fdba74; }
.sev-3 { background: #fef3c7; color: #a16207; border: 1px solid #fcd34d; }
.sev-4 { background: #e0e7ff; color: #4338ca; border: 1px solid #a5b4fc; }

/* CTA back cover */
.cta-page {
  background: #0c0c0d;
  color: #fff;
  padding: 14mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 297mm;
  position: relative;
  overflow: hidden;
}
.cta-page::before {
  content: "";
  position: absolute;
  bottom: -80mm; left: -60mm;
  width: 220mm; height: 220mm;
  background: radial-gradient(circle, rgba(255,94,31,0.10), transparent 70%);
  pointer-events: none;
}
.cta-main {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  position: relative;
}
.cta-title {
  font-size: 36pt;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.05em;
  text-transform: uppercase;
  line-height: .9;
  margin-bottom: 16pt;
}
.cta-title em { color: #ff5e1f; font-style: inherit; }
.cta-body {
  font-size: 10pt;
  color: #aaa;
  max-width: 130mm;
  line-height: 1.7;
  margin-bottom: 22pt;
}
.cta-contact {
  padding: 14pt 18pt;
  border: 1px solid rgba(255,94,31,.3);
  border-radius: 8pt;
  background: rgba(255,94,31,.05);
  max-width: 130mm;
}
.cta-contact-row {
  display: flex; align-items: baseline; gap: 10pt;
  padding: 4pt 0;
}
.cta-contact-label {
  font-size: 7.5pt; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #666; min-width: 30mm;
}
.cta-contact-val { font-size: 10pt; color: #fff; font-weight: 600; }
.cta-contact-val a { color: #ff5e1f; text-decoration: none; }

.cta-bottom {
  font-size: 8pt; color: #555;
  padding-top: 14pt; padding-bottom: 4pt;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; justify-content: space-between; align-items: center;
  gap: 10mm; line-height: 1.7;
  position: relative;
}
.cta-bottom a { color: #777; text-decoration: none; }
.cta-bottom a:hover { color: #ff5e1f; }

/* Print mode */
@media print {
  @page { size: A4 portrait; margin: 0; }
  body { background: #fff; }
  .print-btn, .back-btn { display: none; }
  .page {
    margin: 0;
    width: 210mm;
    min-height: 297mm;
    box-shadow: none;
  }
  .section { page-break-inside: avoid; }
  .sig-block, .calc-box, .toc { page-break-inside: avoid; }
}

/* =============================================================
   /legal/ INDEX PAGE — list-of-documents hub
   ============================================================ */
body.legal-index {
  background: #0c0c0d;
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
}
.idx-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  position: relative;
}
.idx-hero-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: #ff5e1f; margin-bottom: 16px;
}
.idx-hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 900; font-style: italic;
  letter-spacing: -.045em; line-height: .9;
  text-transform: uppercase; margin-bottom: 18px;
}
.idx-hero h1 em { color: #ff5e1f; font-style: inherit; }
.idx-hero p {
  font-size: 16px; color: rgba(255,255,255,0.65);
  max-width: 600px; line-height: 1.7; margin-bottom: 12px;
}
.idx-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.idx-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 26px 24px;
  transition: all .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.idx-card:hover {
  border-color: rgba(255,94,31,0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(255,94,31,0.12);
}
.idx-card-no {
  font-size: 11px; font-weight: 900;
  letter-spacing: .18em;
  color: #ff5e1f;
  margin-bottom: 10px;
  font-style: italic;
}
.idx-card-title {
  font-size: 20px; font-weight: 900;
  font-style: italic;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.idx-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.58);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.idx-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: #ff5e1f;
}
.idx-nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 30px;
}
.idx-nav-back:hover { color: #ff5e1f; }

.idx-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
