/**
 * Technical Architecture Style - Clean technical documentation
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 10.5pt;
  line-height: 1.7;
  color: #1f2937;
  max-width: 8.5in;
  margin: 0.75in auto;
  padding: 0;
  background: white;
}

/* Document title */
h1 {
  font-size: 24pt;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.08in 0;
  line-height: 1.2;
}

/* Subtitle/version */
h1 + p {
  font-size: 11pt;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 0.05in 0;
}

/* Date */
h1 + p + p {
  font-size: 9pt;
  color: #9ca3af;
  font-style: italic;
  margin: 0 0 0.15in 0;
}

/* Divider */
hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 0.2in 0;
}

/* Section headers (h2) */
h2 {
  font-size: 15pt;
  font-weight: 700;
  color: #1e40af;
  margin: 0.25in 0 0.12in 0;
  padding-bottom: 0.05in;
  border-bottom: 2px solid #dbeafe;
}

/* Subsection headers (h3) */
h3 {
  font-size: 12pt;
  font-weight: 600;
  color: #374151;
  margin: 0.18in 0 0.08in 0;
}

/* Paragraphs */
p {
  margin: 0.08in 0;
  text-align: left;
}

/* Lists */
ul, ol {
  margin: 0.08in 0;
  padding-left: 0.3in;
  line-height: 1.8;
}

li {
  margin: 0.04in 0;
}

/* Nested lists */
li ul, li ol {
  margin: 0.04in 0;
}

/* Code blocks */
pre {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.15in;
  margin: 0.15in 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9pt;
  line-height: 1.5;
}

code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9.5pt;
  background: #f3f4f6;
  padding: 0.02in 0.05in;
  border-radius: 3px;
  color: #dc2626;
}

pre code {
  background: none;
  padding: 0;
  color: #1f2937;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.15in 0;
  font-size: 9.5pt;
  border: 1px solid #e5e7eb;
}

thead {
  background: #f3f4f6;
}

th {
  padding: 0.08in;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #d1d5db;
}

td {
  padding: 0.08in;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

tr:nth-child(even) {
  background: #fafafa;
}

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

/* Bold text in tables (for headers/labels) */
td strong {
  color: #1f2937;
  font-weight: 600;
}

/* Mermaid diagram containers */
.mermaid {
  margin: 0.2in 0;
  padding: 0.15in;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
}

/* SVG diagrams (Mermaid output) */
svg {
  max-width: 100%;
  height: auto;
}

/* Strong emphasis */
strong {
  font-weight: 600;
  color: #111827;
}

/* Italic emphasis */
em {
  font-style: italic;
  color: #4b5563;
}

/* Links */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Blockquotes (for notes/warnings) */
blockquote {
  margin: 0.12in 0.3in;
  padding: 0.1in 0.15in;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  font-size: 10pt;
  color: #92400e;
}

/* Component description sections */
h3 + p strong:first-child {
  color: #1e40af;
  font-size: 10.5pt;
}

/* Bullet points with emphasized items */
li strong:first-child {
  color: #1f2937;
  font-weight: 600;
}

/* Subsection with bullet points */
h4 {
  font-size: 10.5pt;
  font-weight: 600;
  color: #4b5563;
  margin: 0.12in 0 0.06in 0;
}

/* Appendix styling */
h2:last-of-type {
  margin-top: 0.3in;
  border-bottom: none;
  color: #6b7280;
}

/* Footer contact info */
h3:last-of-type + ul {
  font-size: 9pt;
  color: #6b7280;
}

/* Numbered steps in flow */
ol li {
  font-family: 'Inter', sans-serif;
}

ol li strong {
  color: #1e40af;
}

/* Metrics/performance tables */
table:has(th:contains("Metric")) {
  background: white;
  border: 2px solid #1e40af;
}

table:has(th:contains("Metric")) thead {
  background: #1e40af;
  color: white;
}

table:has(th:contains("Metric")) th {
  color: white;
  border-bottom-color: white;
}

/* Technology stack lists */
ul li code {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.02in 0.06in;
}

/* Page breaks for print */
@media print {
  h2 {
    page-break-before: auto;
    page-break-after: avoid;
  }

  .mermaid, table {
    page-break-inside: avoid;
  }

  pre {
    page-break-inside: avoid;
  }
}
