/* Business document styles — shared by business case and business plan HTML versions */

.doc-container {
  max-width: 860px;
  margin: 0 auto;
}

/* Header / cover */
.doc-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line);
}
.doc-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 6px;
}
.doc-header .doc-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 4px;
}
.doc-header .doc-tagline {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 16px;
}
.doc-header .doc-meta {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}
.doc-header .doc-confidential {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.6;
  margin-top: 6px;
}
.doc-header .doc-diagram {
  width: 100%;
  max-width: 700px;
  height: auto;
  margin: 16px 0;
  border-radius: var(--gm-radius);
}

/* Table of contents */
.doc-toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--gm-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.doc-toc h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
}
.doc-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.doc-toc li {
  margin: 0;
  line-height: 1.3;
}
.doc-toc li a {
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  padding: 3px 0;
  display: block;
}
.doc-toc li a:hover {
  color: var(--accent);
}
.doc-toc .doc-toc-part {
  font-weight: 600;
  margin-top: 8px;
  font-size: 0.88rem;
}
.doc-toc .doc-toc-section {
  padding-left: 16px;
}
.doc-toc .doc-toc-appendix {
  padding-left: 16px;
  color: var(--muted);
}

/* Part headers */
.doc-part {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  background: #1a5632;
  padding: 10px 16px;
  border-radius: var(--gm-radius-sm);
  margin: 32px 0 16px;
}

/* Section headers */
.doc-section {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a5632;
  border-left: 4px solid #1a5632;
  padding: 4px 0 4px 12px;
  margin: 24px 0 12px;
}
.doc-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a5632;
  color: #fff;
  font-size: 0.75rem;
  margin-right: 8px;
  vertical-align: middle;
}

/* Body text */
.doc-container p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 8px;
}

/* Stats row */
.doc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.doc-stat {
  background: #f5f9f6;
  border: 1px solid #c0d8c8;
  border-radius: var(--gm-radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.doc-stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a5632;
}
.doc-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
}

/* KPI cards */
.doc-kpi {
  background: #f5f9f6;
  border: 1px solid #c0d8c8;
  border-radius: var(--gm-radius-sm);
  padding: 10px;
  text-align: center;
}
.doc-kpi-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #1a5632;
}
.doc-kpi-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Tables */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 12px 0;
}
.doc-table thead th {
  background: #1a5632;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 7px 8px;
  font-size: 0.78rem;
}
.doc-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc-table tbody tr:nth-child(even) {
  background: #f5f9f6;
}
.doc-table .doc-table-total td {
  font-weight: 700;
  background: #e8f5e9;
}

/* Callout boxes */
.doc-callout {
  background: #f5f9f6;
  border: 1px solid #c0d8c8;
  border-radius: var(--gm-radius-sm);
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 0.85rem;
  line-height: 1.55;
}
.doc-callout p {
  margin: 0;
}
.doc-callout-warn {
  background: #fff8e1;
  border-color: #e6ac00;
}

/* Bullet lists */
.doc-list {
  padding-left: 20px;
  margin: 8px 0;
}
.doc-list li {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 4px;
}

/* Subtitle */
.doc-subtitle-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 14px 0 6px;
}

/* Download bar */
.doc-download-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: #f5f9f6;
  border: 1px solid #c0d8c8;
  border-radius: var(--gm-radius-sm);
  font-size: 0.82rem;
  color: var(--muted);
}
.doc-download-bar a {
  font-size: 0.82rem;
  font-weight: 600;
}

/* Closing */
.doc-closing {
  text-align: center;
  padding: 32px 0;
  border-top: 2px solid #1a5632;
  margin-top: 32px;
}
.doc-closing h2 {
  color: #1a5632;
  margin-bottom: 8px;
}
.doc-closing p {
  color: var(--muted);
}

/* Print */
@media print {
  .doc-download-bar, .doc-toc { display: none; }
  .doc-part { break-before: page; }
}
