/* FLME Wiki — shared stylesheet. Extracted 2026-09-04 from the original
   single-file agents wiki (now wiki/agents.html) when the wiki became a
   multi-page company wiki. Every page loads this one file — don't fork
   per-page copies, edit here so every page stays consistent. */

:root {
  --bg: #f7f6f3;
  --bg-elevated: #ffffff;
  --border: #e4e1da;
  --text: #2b2b28;
  --text-muted: #6b6a63;
  --accent: #7a5c3e;
  --accent-soft: #efe6da;
  --tag-bg: #efe6da;
  --tag-text: #7a5c3e;
  --code-bg: #f0efe9;
  --shadow: 0 1px 2px rgba(30,28,20,0.04), 0 4px 14px rgba(30,28,20,0.05);
  --status-active: #3f7d4a;
  --status-active-bg: #e4f0e6;
  --status-superseded: #8a6d1f;
  --status-superseded-bg: #f5ecd6;
  --status-abandoned: #8a3f3f;
  --status-abandoned-bg: #f5e0e0;
  --status-stub: #6b6a63;
  --status-stub-bg: #ececea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a17;
    --bg-elevated: #232220;
    --border: #38362f;
    --text: #ece9e2;
    --text-muted: #a6a297;
    --accent: #d3b48c;
    --accent-soft: #332c22;
    --tag-bg: #332c22;
    --tag-text: #e0c7a2;
    --code-bg: #29271f;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.35);
    --status-active: #7fbf8a;
    --status-active-bg: #1f3323;
    --status-superseded: #d8bd6f;
    --status-superseded-bg: #362e17;
    --status-abandoned: #d99a9a;
    --status-abandoned-bg: #362121;
    --status-stub: #a6a297;
    --status-stub-bg: #2c2b28;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 96px;
}
header.page {
  margin-bottom: 40px;
}
header.page h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
header.page p {
  color: var(--text-muted);
  margin: 0 0 6px;
  max-width: 64ch;
}
.meta-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 14px;
}
code {
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
h2.section-title {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 48px 0 16px;
  font-weight: 600;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.card h3 {
  margin: 0 0 2px;
  font-size: 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.card h3 .role {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.tags {
  margin: 10px 0 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.card p, .card ul {
  margin: 10px 0;
}
.card ul {
  padding-left: 1.2em;
}
.card li {
  margin-bottom: 6px;
}
.card .label {
  font-weight: 600;
  display: block;
  margin-top: 16px;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.state-path {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.status-block {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-top: 12px;
}
.status-block .label {
  margin-top: 0;
}
footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
a { color: var(--accent); }
.how-it-works ul { padding-left: 1.2em; }
.how-it-works li { margin-bottom: 10px; }
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}
.toc-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
}
.toc-pill {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.toc-pill:hover { text-decoration: underline; }
.toc-sep { flex-basis: 100%; height: 0; margin: 0; }
.deliverable {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.deliverable h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.deliverable .file {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}
.deliverable p { margin: 6px 0; }
.caveat {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  margin-top: 8px;
}
.how-it-works h3 {
  font-size: 1.05rem;
  margin: 28px 0 8px;
}
.how-it-works > div > h3:first-child,
.how-it-works h3:first-of-type { margin-top: 0; }
.subsection { margin-bottom: 8px; }

/* --- Site-wide nav bar (added when the wiki became multi-page) --- */
nav.site-nav {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
nav.site-nav .brand {
  font-weight: 700;
  margin-right: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}
nav.site-nav a.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
nav.site-nav a.nav-link:hover,
nav.site-nav a.nav-link.current {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
nav.site-nav .internal-flag {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 2px 10px;
  border-radius: 999px;
}

/* --- Page-class badge (pointer vs. originating) --- */
.page-class {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.page-class.pointer {
  background: var(--tag-bg);
  color: var(--tag-text);
}
.page-class.originating {
  background: var(--status-active-bg);
  color: var(--status-active);
}

/* --- Status tags, used on Repo Atlas / Clients-style tables --- */
.status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.status.active { background: var(--status-active-bg); color: var(--status-active); }
.status.superseded { background: var(--status-superseded-bg); color: var(--status-superseded); }
.status.abandoned { background: var(--status-abandoned-bg); color: var(--status-abandoned); }
.status.stub { background: var(--status-stub-bg); color: var(--status-stub); }

/* --- Simple data table, used on Repo Atlas / Open Questions --- */
table.atlas {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 8px 0;
}
table.atlas th, table.atlas td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.atlas th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.table-scroll { overflow-x: auto; }

/* --- Reading-path cards on Start Here --- */
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0 32px;
}
.path-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.path-card h4 { margin: 0 0 8px; font-size: 1rem; }
.path-card ol { margin: 0; padding-left: 1.1em; font-size: 0.88rem; }
.path-card li { margin-bottom: 4px; }
