/* Compliance page — extends landing's base style.css with documentation-
 * specific layout (sticky TOC + readable prose column). */

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.doc {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

.doc__hero {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.doc__crumb {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.doc__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.doc__sub {
  color: var(--text);
  font-size: 17px;
  max-width: 720px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.doc__pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.pill {
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill--accent {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 162, 59, 0.06);
}

/* ─── Two-column layout: sticky TOC + scrolling prose ────────────────────── */
.doc__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

/* TABLE OF CONTENTS */
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: 13px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 12px;
}

.toc__title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  font-weight: 600;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: section;
}

.toc > ol > li {
  counter-increment: section;
  padding-left: 0;
  margin-bottom: 4px;
}
.toc > ol > li::before {
  content: counter(section) ". ";
  color: var(--text-muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  margin-right: 4px;
}

.toc > ol > li > ol {
  margin-top: 4px;
  margin-bottom: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  counter-reset: subsection;
}

.toc > ol > li > ol > li {
  counter-increment: subsection;
  padding-left: 0;
  margin-bottom: 2px;
}
.toc > ol > li > ol > li::before {
  content: counter(section) "." counter(subsection) " ";
  color: var(--text-muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  margin-right: 4px;
  opacity: 0.6;
}

.toc a {
  color: var(--text);
  text-decoration: none;
  display: inline;
  padding: 2px 0;
  border-radius: 3px;
  transition: color 0.1s;
  line-height: 1.5;
}
.toc a:hover {
  color: var(--accent);
  text-decoration: none;
}
.toc a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── PROSE (the doc body) ───────────────────────────────────────────────── */
.prose {
  max-width: 760px;
  line-height: 1.75;
  font-size: 16px;
}

.prose h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  margin-top: 56px;
  margin-bottom: 16px;
  line-height: 1.2;
  scroll-margin-top: 100px;
}
.prose section:first-child h2 { margin-top: 0; }

.prose h3 {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--accent);
  scroll-margin-top: 100px;
}

.prose p {
  margin-bottom: 16px;
  color: var(--text);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose em {
  color: var(--text);
  font-style: italic;
}

.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--surface);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 59, 0.3);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.prose ul li, .prose ol li {
  margin-bottom: 8px;
}

.prose ul.bullets li {
  margin-bottom: 12px;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap {
  margin-bottom: 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}

.prose th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.prose td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose td:first-child {
  white-space: nowrap;
  width: 30%;
}

/* ─── Callouts ───────────────────────────────────────────────────────────── */
.callout {
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 16px;
  border-left: 3px solid var(--border-light);
  background: var(--surface);
}

.callout p { margin-bottom: 0; }

.callout--green { border-left-color: var(--success); }
.callout--amber { border-left-color: var(--warning); }

/* ─── Contact cards ──────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.contact-card {
  display: block;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.15s;
}

.contact-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.contact-card__label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.contact-card__email {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 4px;
  word-break: break-all;
}

.contact-card__note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── RFP CTA box ────────────────────────────────────────────────────────── */
.rfp-box {
  margin-top: 60px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(61, 44, 94, 0.4), rgba(15, 20, 25, 0.6));
  border: 1px solid var(--primary);
  border-radius: 8px;
}

.rfp-box h3 {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0 0 8px !important;
}

.rfp-box p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.7;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .doc__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .toc {
    position: relative;
    top: 0;
    max-height: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    background: var(--surface);
  }
  .prose h2 { font-size: 26px; margin-top: 40px; }
  .prose h3 { font-size: 16px; margin-top: 24px; }
}

@media (max-width: 700px) {
  .doc { padding: 40px 20px 60px; }
  .doc__title { font-size: 32px; }
  .doc__sub { font-size: 15px; }
  .prose { font-size: 15px; }
  .prose td:first-child { white-space: normal; width: auto; }
}

/* ─── Print (for procurement teams that print these) ─────────────────────── */
@media print {
  body { background: white; color: black; }
  .nav, .footer, .toc { display: none; }
  .doc__layout { grid-template-columns: 1fr; }
  .prose { max-width: none; color: black; font-size: 11pt; }
  .prose h2, .prose h3, .doc__title { color: black; }
  .prose code { background: #f4f4f4; color: black; border: none; }
  .prose table { font-size: 9pt; }
  .prose th { background: #eee; color: black; }
  .prose tr { page-break-inside: avoid; }
  .callout--green { border-left: 3px solid #3D7C5E; background: #f5f9f6; }
  .callout--amber { border-left: 3px solid #D68910; background: #fdf6e9; }
  .rfp-box { background: #f4f0fa; border: 1px solid #3D2C5E; color: black; }
  .rfp-box h3, .rfp-box p { color: black !important; }
  .contact-card { border: 1px solid #ccc; background: white; }
  .contact-card__email { color: #3D2C5E; }
  a { color: #3D2C5E !important; }
  .doc__pills { display: none; }
  .doc__crumb { display: none; }
}
