/* Compact header */
.md-header {
  padding: 0;
}
.md-header__inner {
  padding: 0.2rem 0.4rem;
}
.md-tabs {
  padding: 0;
}

/* Reduce main content font size */
.md-content__inner {
  font-size: 0.70rem !important;
}

.md-typeset {
  font-size: 0.70rem !important;
}

/* Reduce table of contents font size */
.md-sidebar--secondary .md-nav {
  font-size: 0.65rem !important;
}

/* Color left nav by depth */
/* Level 1: Top sections (Agents, Constitution) */
.md-sidebar--primary > .md-sidebar__scrollwrap > .md-sidebar__inner > .md-nav > .md-nav__list > .md-nav__item > .md-nav__link {
  color: #2e7d32 !important;
  font-weight: 600;
}

/* Level 2: Agent names */
.md-sidebar--primary .md-nav__item .md-nav .md-nav__link {
  color: #1565c0 !important;
}

/* Level 3: Subfolders (knowledge, etc) */
.md-sidebar--primary .md-nav__item .md-nav .md-nav__item .md-nav .md-nav__link {
  color: #424242 !important;
}

/* Level 4+: Deep items (skill files) */
.md-sidebar--primary .md-nav__item .md-nav .md-nav__item .md-nav .md-nav__item .md-nav .md-nav__link {
  color: #558b2f !important;  /* olive green */
}

/* Icons for left nav items */
/* prompt.md files (class added by custom.js) */
.md-sidebar--primary a.file-prompt::before {
  content: "💬 ";
}

/* Specific folder icons (classes added by custom.js) */
.md-sidebar--primary label.folder-knowledge::before {
  content: "📚 ";
}

.md-sidebar--primary label.folder-reference::before {
  content: "🔗 ";
}

.md-sidebar--primary label.folder-skills::before {
  content: "🔥 ";
}

/* Flow tables: content columns expand, arrow columns shrink */
.flow-table table,
table.flow-table {
  table-layout: fixed;
  width: 100%;
}

/* Content columns: equal width */
.flow-table table th:nth-child(1),
.flow-table table td:nth-child(1),
.flow-table table th:nth-child(3),
.flow-table table td:nth-child(3),
.flow-table table th:nth-child(5),
.flow-table table td:nth-child(5),
table.flow-table th:nth-child(1),
table.flow-table td:nth-child(1),
table.flow-table th:nth-child(3),
table.flow-table td:nth-child(3),
table.flow-table th:nth-child(5),
table.flow-table td:nth-child(5) {
  width: 30%;
}

/* Arrow columns: minimal width, centered */
.flow-table table th:nth-child(2),
.flow-table table td:nth-child(2),
.flow-table table th:nth-child(4),
.flow-table table td:nth-child(4),
table.flow-table th:nth-child(2),
table.flow-table td:nth-child(2),
table.flow-table th:nth-child(4),
table.flow-table td:nth-child(4) {
  width: 5%;
  text-align: center;
  vertical-align: middle !important;
  white-space: nowrap;
  padding: 0.25rem;
  overflow: hidden;
}

/* Flow table headers: colored backgrounds */
.flow-table table th:nth-child(1),
table.flow-table th:nth-child(1) {
  background-color: #e3f2fd !important; /* light blue */
}

.flow-table table th:nth-child(3),
table.flow-table th:nth-child(3) {
  background-color: #fff3e0 !important; /* light orange */
}

.flow-table table th:nth-child(5),
table.flow-table th:nth-child(5) {
  background-color: #e8f5e9 !important; /* light green */
}

/* Flow table header colors via @class */
.flow-input {
  background-color: #e3f2fd !important; /* light blue */
  border: 1px solid #90caf9 !important;
  padding-left: 1em !important;
}

.flow-processing {
  background-color: #fff3e0 !important; /* light orange */
  border: 1px solid #ffcc80 !important;
  padding-left: 1em !important;
}

.flow-output {
  background-color: #e8f5e9 !important; /* light green */
  border: 1px solid #a5d6a7 !important;
  padding-left: 1em !important;
}

/* Flow table content cell borders (not arrow columns) */
.flow-table table td:nth-child(1),
table.flow-table td:nth-child(1) {
  border: 1px solid #90caf9 !important;
}

.flow-table table td:nth-child(3),
table.flow-table td:nth-child(3) {
  border: 1px solid #ffcc80 !important;
}

.flow-table table td:nth-child(5),
table.flow-table td:nth-child(5) {
  border: 1px solid #a5d6a7 !important;
}

/* Remove borders from arrow columns */
.flow-table table td:nth-child(2),
.flow-table table td:nth-child(4),
.flow-table table th:nth-child(2),
.flow-table table th:nth-child(4),
table.flow-table td:nth-child(2),
table.flow-table td:nth-child(4),
table.flow-table th:nth-child(2),
table.flow-table th:nth-child(4) {
  border: none !important;
}

/* ===== WIDER CONTENT AREA ===== */
/* Increase max width of main content */
.md-grid {
  max-width: 1600px !important;
}

/* Make content take more space */
.md-content {
  max-width: none !important;
}

/* ===== COMPACT TABLES ===== */
/* Reduce table padding */
.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 0.4em 0.6em !important;
  font-size: 0.68rem !important;
  line-height: 1.3 !important;
}

/* Make table cells more compact */
.md-typeset table:not([class]) {
  font-size: 0.68rem !important;
}

/* Table header styling */
.md-typeset table:not([class]) th {
  background-color: #e8f5e9 !important; /* light green */
  color: #1b5e20 !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #4caf50 !important;
}

/* Green links in tables */
.md-typeset table a {
  color: #2e7d32 !important;
  font-weight: 500;
}

.md-typeset table a:hover {
  color: #1b5e20 !important;
  text-decoration: underline;
}

/* Code in tables - smaller */
.md-typeset table code {
  font-size: 0.65rem !important;
  padding: 0.1em 0.3em !important;
}

/* ===== STEP TABLES (workflow pages) ===== */
/* Compact step tables */
.md-typeset h4 + table,
.md-typeset h4 + p + table {
  margin-top: 0.5em !important;
}

/* Input files table - auto width columns */
.md-typeset table th:first-child,
.md-typeset table td:first-child {
  white-space: nowrap;
}

/* Path column - allow wrap but use monospace */
.md-typeset table td:nth-child(2) code {
  word-break: break-all;
}
