/* Shared styling for methodology.html, sources.html, finops.html, and about.html: long-form
   documentation pages, more prose-heavy than the landing page. */

/* Content-rendered pages (methodology/sources/about/finops/client) put the H1
   directly inside #content, not inside a <section> — so style.css's
   `section:first-of-type { padding-top: 64px }` never applies here. Give the
   container itself that top padding instead, so spacing below the nav
   matches the homepage regardless of whether the first block happens to be
   a bare heading or a wrapped section. */
#content { padding-top: 64px; }

section { max-width: 68ch; overflow-wrap: break-word; }
section table.doc-table { max-width: none; }

.formula-box {
  font-family: var(--mono);
  font-size: 17px;
  border: 1px solid var(--fg);
  padding: 18px 20px;
  margin: 0 0 18px;
  background: #f1efe8;
}

table.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
  margin: 16px 0;
}
table.doc-table th, table.doc-table td {
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
}
table.doc-table th { color: var(--muted); font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; }

.source-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.finding {
  border-left: 3px solid var(--line);
  padding: 4px 0 4px 18px;
  margin: 24px 0;
}
.finding h3 { font-size: 17px; margin: 0 0 8px; font-weight: 600; }
.finding p { margin: 0 0 10px; }
.finding-negative { border-left-color: #a5372a; }
.finding-positive { border-left-color: var(--accent); }
.finding-neutral { border-left-color: #b58a2e; }
.finding-consequence {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 12px !important;
}

.limits-list {
  padding-left: 20px;
  color: var(--muted);
}
.limits-list li { margin-bottom: 10px; }

.citation-list {
  padding-left: 20px;
  margin: 12px 0;
}
.citation-list li { margin-bottom: 10px; }

.reliability {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  display: inline-block;
  margin: 0 0 8px;
  background: none;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.reliability-primary { color: var(--accent); }
.reliability-academic { color: #3a6ea5; }
.reliability-industry { color: #b58a2e; }
.reliability-mixed { color: #8a5a2f; }
.reliability-marketing { color: #a5372a; }

/* Compact source-card layout: applied via JS (sources.js) to every <section>
   that contains a .reliability tag, so the summary table / intro sections
   (which have no reliability tag) keep the roomier default spacing. */
#content section.source-card {
  padding: 18px 0;
  max-width: none;
}
#content section.source-card h2 {
  font-size: 15px;
  margin: 0 0 8px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--serif);
  font-weight: 600;
}
#content section.source-card p { margin: 4px 0; font-size: 14px; }
#content section.source-card .citation-list { margin: 6px 0; }
#content section.source-card .citation-list li { margin-bottom: 6px; font-size: 14px; }

.source-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}
.source-filter-bar button {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
  color: var(--muted);
}
.source-filter-bar button.active {
  border-color: var(--fg);
  color: var(--fg);
  font-weight: 600;
}
section.source-card[hidden] { display: none; }

.strength-high { color: var(--accent); }
.strength-mid { color: #b58a2e; }
.strength-low { color: #a5372a; }

section a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
  overflow-wrap: break-word;
  word-break: break-word;
}
section a:hover { text-decoration-color: var(--accent); }

.cta-inline {
  display: inline-block;
  margin-top: 12px;
  border: 1px solid var(--fg);
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none !important;
  color: var(--fg);
}
.cta-inline:hover { background: var(--fg); color: var(--bg); }
