/* DCA Governance – Executive document styling */
/* Aligned to Qurioux Solutions report style: navy primary, clear hierarchy, confidential footer */
/* Use with HTML exec docs for print and on-screen review */

:root {
  /* Primary palette – navy (matches Qurioux report headers / title block) */
  --primary: #1a365d;
  --primary-light: #2c5282;
  --accent: #2b6cb0;
  --text: #1a202c;
  --text-muted: #4a5568;
  --border: #e2e8f0;
  --bg-alt: #f7fafc;
  --bg-table-header: #edf2f7;
  --white: #ffffff;
  /* Status / maturity (Green = positive, Amber = watch, Red = risk) */
  --success: #276749;
  --warning: #b7791f;
  --danger: #c53030;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: var(--text);
  max-width: 210mm;
  margin: 0 auto;
  padding: 20px 24px 40px;
  background: var(--white);
}

@media print {
  body { padding: 12px 16px; max-width: none; }
  .cover { break-after: page; }
  table { break-inside: avoid; }
  h2 { break-after: avoid; }
}

/* Cover / title block */
.cover {
  padding: 32px 0 40px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 28px;
}

.cover .doc-title {
  font-size: 22pt;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.cover .doc-subtitle {
  font-size: 12pt;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.cover-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 24px;
  font-size: 10pt;
  color: var(--text-muted);
}

.cover-meta dt { font-weight: 600; color: var(--text); }
.cover-meta dd { margin: 0; }

/* Executive summary */
.exec-summary {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 0 0 28px;
  font-size: 10.5pt;
}

.exec-summary h3 {
  margin: 0 0 10px;
  font-size: 11pt;
  color: var(--primary);
}

/* Headings */
h1 { font-size: 16pt; color: var(--primary); margin: 28px 0 12px; font-weight: 700; }
h2 { font-size: 13pt; color: var(--primary-light); margin: 24px 0 10px; font-weight: 600; }
h3 { font-size: 11pt; color: var(--text); margin: 18px 0 8px; font-weight: 600; }

h1:first-of-type { margin-top: 0; }

/* Body */
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 4px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 10pt;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

thead th {
  background: var(--primary);
  color: var(--white);
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  border: none;
}

tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}

tbody tr:nth-child(even) { background: var(--bg-alt); }
tbody tr:hover { background: #edf2f7; }

td:first-child { font-weight: 500; color: var(--text); }

/* Compact table for trigger matrices */
table.trigger-matrix thead th { font-size: 9.5pt; }
table.trigger-matrix tbody td { padding: 8px 10px; }

/* Two-column layout for cover meta */
dl.flat { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 0; font-size: 10pt; }
dl.flat dt { font-weight: 600; color: var(--text-muted); }
dl.flat dd { margin: 0; color: var(--text); }

/* Callout / note */
.note {
  background: #ebf8ff;
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 10pt;
}

/* Escalation path (pre/code) */
.pre-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 14px 18px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 9.5pt;
  line-height: 1.6;
  overflow-x: auto;
  margin: 14px 0;
  white-space: pre;
}

/* Footer */
.doc-footer {
  margin-top: 36px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 9pt;
  color: var(--text-muted);
}

/* Qurioux branding footer (optional – add class="qurioux" to .doc-footer when needed) */
.doc-footer.qurioux::after {
  content: " · Qurioux Solutions Pty Ltd (ABN 81 682 026 615) · Confidential";
  font-weight: 600;
  color: var(--primary);
}

/* Page title for print */
@media print {
  .cover .doc-title { font-size: 18pt; }
}

/* TOC if needed */
.toc { margin: 20px 0; }
.toc ul { list-style: none; padding-left: 0; }
.toc li { margin: 6px 0; }
.toc a { color: var(--accent); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
