/* TECT public site — minimal academic style. Single column, system fonts. */
:root {
  --fg:        #1a1a1a;
  --fg-mute:   #555;
  --bg:        #fafafa;
  --bg-card:   #ffffff;
  --accent:    #0a4d8c;
  --accent-soft: #e6eef7;
  --border:    #d8d8d8;
  --code-bg:   #f3f3f3;
  --ok:        #1f7a3a;
  --warn:      #b07000;
  --gap:       #b00020;
  --maxw:      880px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
header.site, footer.site {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
/* Top hero banner: full-width 3:1 image (TECT_Covers.png), no padding,
   sits above the nav. Hero links to home; image scales responsively. */
header.site .hero-banner {
  width: 100%;
  background: var(--bg);
  line-height: 0;
  border-bottom: 1px solid var(--border);
}
header.site .hero-banner .hero-link { display: block; }
header.site .hero-banner .hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;        /* cap on large desktop */
  object-fit: cover;        /* if narrower, crop centre */
  object-position: center;
}
@media (max-width: 700px) {
  header.site .hero-banner .hero-img { max-height: 140px; }
}
footer.site { border-top: 1px solid var(--border); border-bottom: none; margin-top: 4em; }
header.site .wrap, footer.site .wrap, main.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.2em 1.5em;
}
/* Restored layout (2026-05-06): brand on its own row at top, nav row
   below. Inside the nav row only, the GitHub icon is right-aligned via
   flex; the nav-link items remain inline-block on the left. */
header.site nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.6em;
}
header.site nav a {
  display: inline-block;
  margin-right: 1.2em;
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
}
header.site nav a:hover { color: var(--accent); }
header.site nav a.active { color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
/* GitHub repo link: pushed to far right of the nav row, icon-only */
header.site nav a.nav-github {
  margin-left: auto;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25em;
  border-radius: 4px;
  color: var(--fg);
  transition: color 0.15s ease, background 0.15s ease;
}
header.site nav a.nav-github:hover {
  color: var(--accent);
  background: var(--bg);
}
/* Profile circle (TECT_Profile_S.png), centred and small.
   Rendered inside the bottom banner (banners.bottom in site.js)
   directly above the "Open Physics Independent Research" line. */
.footer-profile {
  text-align: center;
  margin: 0.4em 0 0.6em 0;
}
.footer-profile img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  background: var(--bg-card);
}
header.site .brand {
  font-weight: 700;
  font-size: 1.15em;
  margin-right: 2em;
  letter-spacing: 0.02em;
}
header.site .brand a { color: var(--fg); text-decoration: none; }
header.site .brand .sub { color: var(--fg-mute); font-weight: 400; font-size: 0.85em; margin-left: 0.6em; }

main.wrap { padding-top: 2em; padding-bottom: 2em; }

h1 { font-size: 1.7em; margin: 0.4em 0 0.6em; line-height: 1.25; }
h2 { font-size: 1.25em; margin-top: 2em; border-bottom: 1px solid var(--border); padding-bottom: 0.25em; }
h3 { font-size: 1.05em; margin-top: 1.6em; }
p, li { font-size: 1em; }

a { color: var(--accent); }
a:hover { text-decoration: none; }

code {
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font: 0.92em/1.4 "SF Mono", Menlo, Consolas, monospace;
}
pre {
  background: var(--code-bg);
  padding: 0.8em 1em;
  border-radius: 4px;
  overflow-x: auto;
  font: 0.88em/1.5 "SF Mono", Menlo, Consolas, monospace;
}
pre code { background: transparent; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.93em;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.55em 0.7em;
  text-align: left;
  vertical-align: top;
}
th { background: var(--accent-soft); font-weight: 600; }
tr:hover td { background: #f5f5f5; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.2em 1.4em;
  margin: 1.2em 0;
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.tag {
  display: inline-block;
  padding: 0.12em 0.55em;
  border-radius: 3px;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.tag-theory { background: var(--accent-soft); color: var(--accent); }
.tag-ok     { background: #e2f3e6; color: var(--ok); }
.tag-warn   { background: #fbecd1; color: var(--warn); }
.tag-gap    { background: #fadcdc; color: var(--gap); }

.kpi-row { display: flex; gap: 1em; flex-wrap: wrap; margin: 1em 0; }
.kpi { flex: 1 1 200px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 5px; padding: 0.9em 1.1em; }
.kpi .label { color: var(--fg-mute); font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .value { font-size: 1.4em; font-weight: 600; margin-top: 0.2em; font-family: "SF Mono", Menlo, Consolas, monospace; }

ul.tight { margin: 0.4em 0; padding-left: 1.4em; }
ul.tight li { margin: 0.2em 0; }

.muted { color: var(--fg-mute); font-size: 0.92em; }

.changelog-version { margin-top: 2.4em; }
.changelog-version h2 { display: flex; align-items: baseline; gap: 0.7em; }
.changelog-version h2 .date { font-weight: 400; color: var(--fg-mute); font-size: 0.78em; }
.changelog-section { margin: 0.6em 0 1.2em 0; }
.changelog-section .label {
  display: inline-block; padding: 0.18em 0.6em; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.78em; font-weight: 600; letter-spacing: 0.05em;
  margin-bottom: 0.4em;
}

footer.site .wrap { color: var(--fg-mute); font-size: 0.88em; }

/* --- Site-wide banner slots (donation / ad / announcement) ------------- */
.site-banner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7em 1.5em;
  text-align: center;
  font-size: 0.92em;
}
.site-banner:empty, .site-banner[style*="display: none"] { padding: 0; }
.site-banner-top { border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.site-banner-bottom { border-top: 1px solid var(--border); background: var(--accent-soft); margin-top: 1em; }
.site-banner a { font-weight: 600; }
.site-license { padding: 0.4em 0; }
.site-license-line { margin: 0.25em 0; }

/* --- Timestamp line in page footers (added 2026-04-15) --------------- */
.timestamp {
  font-size: 0.82em;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  margin-top: 0.5em;
  opacity: 0.85;
}
.timestamp::before { content: "\1F551  "; } /* clock glyph */

/* --- SM Emergence table -------------------------------------------- */
.sm-table th:first-child { width: 3em; text-align: center; }
.sm-table td:first-child { text-align: center; font-weight: 600; color: var(--accent); }
.sm-table .notes-cell { font-size: 0.88em; color: var(--fg-mute); }
.tag-design  { background: #e8e0f3; color: #5a2d82; }
.tag-partial { background: #fef3cd; color: #856404; }

/* --- Responsive comparison table (Overview / States vs other frameworks) --- */
.cmp-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; }
.cmp-scroll > table { margin: 0; }
.cmp-table { table-layout: fixed; width: 100%; font-size: 0.86em; }
.cmp-table th, .cmp-table td {
  padding: 0.45em 0.55em;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  vertical-align: top;
}
.cmp-table th:first-child, .cmp-table td:first-child {
  width: 22%;
  font-weight: 600;
  color: var(--fg);
  text-align: left;
  background: var(--accent-soft);
}
.cmp-table th { font-size: 0.95em; }
.cmp-table .tect-col { background: #f0f6fb; }

/* --- Timeline card layout (timeline.html) --------------------------- */
.timeline { list-style: none; padding-left: 0; border-left: 2px solid var(--accent-soft); margin-left: 0.5em; }
.timeline li { position: relative; padding: 0.4em 0 0.6em 1.2em; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 0.75em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.timeline .t-date { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); margin-right: 0.5em; }
.timeline .t-area { font-size: 0.82em; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.5em; }
