/* Kat3x Knowledge Layer — Stylesheet v1.0 */
/* Optimized for readability. LLMs ignore this file. */

:root {
  --text: #1a1a1a;
  --bg: #ffffff;
  --accent: #0055aa;
  --border: #e0e0e0;
  --code-bg: #f5f5f5;
  --meta: #666666;
  --max-width: 52rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-label {
  font-size: 0.85rem;
  color: var(--meta);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

.meta-date { font-size: 0.85rem; color: var(--meta); margin-bottom: 2rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

main { margin-bottom: 3rem; }

/* Definition lists for TONL key-value pairs */
dl { margin: 0.5rem 0 1rem 0; }
dt { font-weight: 600; margin-top: 0.5rem; }
dd { margin-left: 1.5rem; margin-bottom: 0.5rem; }

/* Tables for data and array blocks */
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.9rem; }
th, td { border: 1px solid var(--border); padding: 0.4rem 0.8rem; text-align: left; }
th { background: var(--code-bg); font-weight: 600; }

/* Glossary terms */
.glossary-term { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.glossary-term h3 { margin-top: 0; }
.glossary-term .term-full-name { color: var(--meta); font-size: 0.9rem; }
.glossary-term .what-it-is-not { font-style: italic; color: var(--meta); margin-top: 0.5rem; }

/* Related documents */
.related { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.related h2 { border-bottom: none; font-size: 1.1rem; }
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 0.3rem; }

/* Footer */
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--meta); }
.footer-nav { margin-bottom: 0.5rem; }
.source-info { font-size: 0.8rem; }

/* Graph page clusters */
.graph-cluster { margin-bottom: 2rem; }
.graph-cluster ul { list-style: none; padding: 0; }
.graph-cluster li { margin-bottom: 0.2rem; }
.edge-table { font-size: 0.85rem; }

/* Knowledge Graph — Cytoscape.js */
#cy {
  background: #FAFBFC;
}

.graph-legend {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #555;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* MRS/JSON source display */
pre.mrs-source,
pre.json-source {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 1.5rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow-x: auto;
}
