/* LACK Knowledge Graph — stylesheet
   Palette from ClimateSense (climatesense-project.eu):
     #007575   teal         — primary accent, links, active nav, hover
     #94d198   light green  — borders, dividers, secondary accents
     #f7fbf7   near-white   — page and content background
     #3c553e   forest green — footer text
     #000000   black        — body text, headings
     #ffffff   white        — card / content area background
*/

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f7fbf7;
  color: #000000;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────── */

header {
  background-color: #ffffff;
  border-bottom: 1px solid #94d198;
  padding: 0.75rem 2rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-logo {
  height: 52px;
  width: auto;
}

.site-title {
  color: #000000;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Nav ─────────────────────────────────────── */

nav {
  background-color: #ffffff;
  border-bottom: 1px solid #94d198;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

nav ul li a {
  display: block;
  padding: 0.6rem 1.1rem;
  color: #000000;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s;
}

nav ul li a:hover {
  color: #007575;
}

nav ul li a.active {
  color: #007575;
  border-bottom: 2px solid #007575;
  margin-bottom: -1px;
}

/* ── Main content ────────────────────────────── */

main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 2.5rem auto;
  background-color: #ffffff;
  border-radius: 4px;
  padding: 2rem 2.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Typography ──────────────────────────────── */

main h1 {
  font-size: 2rem;
  font-weight: 500;
  color: #000000;
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #000000;
}

main h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #000000;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #94d198;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

main h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #007575;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

main p {
  margin-bottom: 0.9rem;
}

main a {
  color: #007575;
  font-weight: 600;
  text-decoration: none;
}

main a:hover {
  color: #94d198;
}

main ul, main ol {
  padding-left: 1.5rem;
  margin-bottom: 0.9rem;
}

main li {
  margin-bottom: 0.3rem;
}

main hr {
  border: none;
  border-top: 1px solid #94d198;
  margin: 2rem 0;
}

/* ── Tables ──────────────────────────────────── */

main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  display: block;
}

main thead tr {
  background-color: #000000;
  color: #ffffff;
}

main th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

main td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #94d198;
  vertical-align: top;
}

main tbody tr:nth-child(even) {
  background-color: #f7fbf7;
}

main tbody tr:hover {
  background-color: #edf6ed;
}

/* ── Code ────────────────────────────────────── */

main code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85em;
  background-color: #f7fbf7;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #000000;
}

main pre {
  background-color: #1a1a1a;
  color: #d4d0c8;
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-left: 3px solid #007575;
}

main pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: inherit;
}

/* ── Footer ──────────────────────────────────── */

footer {
  background-color: #f7fbf7;
  border-top: 1px solid #94d198;
  color: #3c553e;
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: 0.82rem;
}

footer a {
  color: #3c553e;
  text-decoration: none;
  font-weight: 400;
}

footer a:hover {
  color: #007575;
}

/* ══════════════════════════════════════════════
   STATS DASHBOARD (knowledge-graph.html)
══════════════════════════════════════════════ */

.stats-dashboard {
  margin: 1.5rem 0 2rem;
}

/* Summary cards row */
.stat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  flex: 1 1 140px;
  background: #f7fbf7;
  border: 1px solid #94d198;
  border-top: 3px solid #007575;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000000;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: #3c553e;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Chart grid */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.chart-block {
  background: #f7fbf7;
  border: 1px solid #94d198;
  border-radius: 4px;
  padding: 1rem 1.25rem;
}

.chart-block h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #007575;
}

/* Bar chart rows */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 52px;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.bar-label {
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-wrap {
  background: #94d19855;
  border-radius: 2px;
  height: 14px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background: #007575;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.bar-count {
  color: #3c553e;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   SCHEMA DIAGRAM (ontology.html)
══════════════════════════════════════════════ */

.schema-diagram {
  margin: 1.5rem 0;
  border: 1px solid #94d198;
  border-radius: 6px;
  overflow: hidden;
  background: #f7fbf7;
}

.schema-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 640px) {
  main {
    padding: 1.25rem 1rem;
    margin: 1rem auto;
  }

  header {
    padding: 0.6rem 1rem;
  }

  .site-logo {
    height: 40px;
  }

  nav ul li a {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 100px 1fr 44px;
  }

  .stat-card {
    flex: 1 1 100px;
  }
}

/* ══════════════════════════════════════════════
   CASE STUDIES
══════════════════════════════════════════════ */

/* Path visualisation */
.cs-path {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: #f7fbf7;
  border: 1px solid #94d198;
  border-left: 4px solid #007575;
  border-radius: 4px;
}

.entity-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  max-width: 180px;
}

.entity-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: #007575;
  text-decoration: none;
  word-break: break-word;
}

.entity-link:hover {
  text-decoration: underline;
}

.same-as {
  font-size: 0.72rem;
  color: #3c553e;
}

.ext-link {
  color: #3c553e;
  text-decoration: none;
  font-size: 0.72rem;
}

.ext-link:hover {
  text-decoration: underline;
}

.cs-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding-top: 0.25rem;
  color: #000;
  font-size: 1.2rem;
  line-height: 1;
}

.cs-rel {
  font-size: 0.7rem;
  font-style: italic;
  color: #3c553e;
  white-space: nowrap;
}

/* Evidence table */
.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.evidence-table th {
  background: #007575;
  color: #fff;
  padding: 0.45rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.evidence-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #94d19855;
  vertical-align: top;
}

.evidence-table tr:nth-child(even) td {
  background: #f7fbf7;
}

.evidence-table a {
  color: #007575;
  text-decoration: none;
}

.evidence-table a:hover {
  text-decoration: underline;
}

.period {
  white-space: nowrap;
  color: #3c553e;
  font-size: 0.8rem;
}

.sources {
  font-size: 0.78rem;
}

.source-link {
  display: inline-block;
  background: #94d19833;
  border: 1px solid #94d198;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  color: #007575 !important;
  text-decoration: none !important;
  margin-right: 0.25rem;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
}

.source-link:hover {
  background: #94d19866;
}

.no-source {
  color: #999;
}

.stmt-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: #3c553e;
}

.no-stmts {
  color: #777;
  font-style: italic;
  margin-bottom: 1.5rem;
}
.disclaimer {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.25rem;
  background: #fff8e1;
  border: 1px solid #f0c040;
  border-left: 4px solid #c8860a;
  border-radius: 4px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #000000;
}