:root {
  --bg: #f5f0e8;
  --bg-alt: #f0eae0;
  --ink: #2c2c2a;
  --muted: #8c8a5c;
  --light: #b4b2ac;
  --pumpkin: #ff7a05;
  --olive: #65a30d;
  --steel: #7b8fa1;

  --pass-bg: #d4eac8;     --pass-text: #3c643c;
  --passadj-bg: #c8e0dc;  --passadj-text: #3c5a64;
  --verbose-bg: #f5e29c;  --verbose-text: #82641e;
  --fail-bg: #f5c8c6;     --fail-text: #8c3c3c;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "DM Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--pumpkin); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1.site-title {
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 8px;
}
h1.site-title .title-logo {
  display: inline-block;
  width: 44px;
  height: 44px;
  margin-right: 18px;
  vertical-align: -6px;
  background-color: var(--ink);
  -webkit-mask-image: var(--logo-url);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: var(--logo-url);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}
@media (max-width: 640px) {
  h1.site-title .title-logo {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    vertical-align: -4px;
  }
}

.site-subtitle {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 24px;
}

footer strong { color: var(--olive); font-weight: 700; }

.site-rule {
  border: 0;
  border-top: 1px solid var(--light);
  margin: 24px 0 20px;
}

.prompt-line {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-alt);
  border-left: 2px solid var(--ink);
  padding: 14px 18px;
  margin: 0 0 24px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

section { margin: 48px 0; }

h2 { font-size: 32px; margin: 0 0 16px; }
h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 32px 0 12px;
}

p { margin: 0 0 16px; }

blockquote, .methodology-block {
  margin: 0 0 20px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-left: 2px solid var(--ink);
}
blockquote p:last-child, .methodology-block p:last-child { margin-bottom: 0; }

ul { padding-left: 22px; }
li { margin-bottom: 6px; }

/* Tally row */
.tally-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0 32px;
}
.tally-card {
  background: var(--bg-alt);
  border: 1px solid var(--light);
  padding: 16px;
  text-align: center;
}
.tally-card .count {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}
.tally-card .label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.tally-card.tally-pass         { background: var(--pass-bg);    border-color: var(--pass-text); }
.tally-card.tally-pass .count,
.tally-card.tally-pass .label  { color: var(--pass-text); }
.tally-card.tally-pass-adjacent        { background: var(--passadj-bg); border-color: var(--passadj-text); }
.tally-card.tally-pass-adjacent .count,
.tally-card.tally-pass-adjacent .label { color: var(--passadj-text); }
.tally-card.tally-verbose         { background: var(--verbose-bg); border-color: var(--verbose-text); }
.tally-card.tally-verbose .count,
.tally-card.tally-verbose .label  { color: var(--verbose-text); }
.tally-card.tally-fail         { background: var(--fail-bg);    border-color: var(--fail-text); }
.tally-card.tally-fail .count,
.tally-card.tally-fail .label  { color: var(--fail-text); }

/* Results table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.results-table th, .results-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--light);
  vertical-align: top;
}
.results-table th {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
.results-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 22px;
}
.results-table th.sortable::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  opacity: 0.35;
  background-image: linear-gradient(transparent 3px, currentColor 3px, currentColor 5px, transparent 5px);
}
.results-table th.sortable:hover { color: var(--ink); }
.results-table th.sortable:hover::after { opacity: 0.65; }
.results-table th.sort-asc, .results-table th.sort-desc { color: var(--ink); }
.results-table th.sort-asc::after {
  background-image: none;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
  width: 0; height: 0;
  opacity: 1;
}
.results-table th.sort-desc::after {
  background-image: none;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  width: 0; height: 0;
  opacity: 1;
}
.results-table td.col-id { font-family: var(--mono); color: var(--muted); width: 40px; }
.results-table tr:hover td { background: var(--bg-alt); }
.results-table a { text-decoration: none; }
.results-table a:hover { text-decoration: underline; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.legend-item { display: flex; align-items: center; gap: 8px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  width: 132px;
  box-sizing: border-box;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: var(--sans);
  text-align: center;
}
.badge.pass         { background: var(--pass-bg);    color: var(--pass-text); }
.badge.pass-adjacent{ background: var(--passadj-bg); color: var(--passadj-text); }
.badge.verbose      { background: var(--verbose-bg); color: var(--verbose-text); }
.badge.fail         { background: var(--fail-bg);    color: var(--fail-text); }

/* Family card grid */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.family-card {
  display: block;
  text-decoration: none;
  background: var(--bg-alt);
  border: 1px solid var(--light);
  padding: 20px;
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.family-card:hover { border-color: var(--ink); color: var(--ink); }
.family-card:hover .family-logo { background-color: var(--pumpkin); }
.family-logo {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  background-color: var(--ink);
  -webkit-mask: var(--logo-url) no-repeat center / contain;
          mask: var(--logo-url) no-repeat center / contain;
  transition: background-color 0.15s ease;
}
.family-card .family-name {
  font-family: var(--serif);
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
  line-height: 1.15;
}
.family-card .family-count {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Transcript entries */
.transcript-entry {
  border-top: 1px solid var(--light);
  padding: 24px 0;
}
.transcript-entry:first-of-type { border-top: 1px solid var(--ink); }
.transcript-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}
.transcript-id {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.transcript-model {
  font-family: var(--serif);
  font-size: 22px;
}
.transcript-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}
.transcript-meta > span { display: inline-flex; align-items: center; }

details {
  border: 1px solid var(--light);
  background: var(--bg-alt);
  padding: 0;
  margin-top: 8px;
}
details summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
details[open] summary { border-bottom: 1px solid var(--light); }
details > div {
  padding: 16px 18px;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}

.transcript-notes {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 2px solid var(--muted);
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  font-style: italic;
}

.transcript-attachment {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 2px solid var(--pumpkin);
  background: var(--bg-alt);
  font-size: 14px;
}
.transcript-attachment a { text-decoration: none; }
.transcript-attachment a::before {
  content: "↓ ";
  color: var(--pumpkin);
  font-weight: 700;
  margin-right: 4px;
}
.transcript-attachment .attachment-label {
  font-style: italic;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}
.transcript-attachment a:hover .attachment-label {
  color: var(--pumpkin);
  border-bottom-color: var(--pumpkin);
}
.transcript-attachment .attachment-desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

/* Change log timeline */
.change-log {
  border-left: 1px solid var(--light);
  padding-left: 24px;
  margin-top: 16px;
}
.change-log-entry {
  position: relative;
  padding-bottom: 20px;
}
.change-log-entry::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}
.change-log-date {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.change-log-summary { font-size: 14px; color: var(--ink); }

/* Footer */
footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-size: 13px;
  color: var(--muted);
}
footer p { margin-bottom: 10px; }
footer .disclaimer { font-size: 12px; line-height: 1.5; }
footer .copyright { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
footer .related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--light);
  border-bottom: 1px solid var(--light);
}
footer .related-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
footer .related-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Errors */
.load-error {
  padding: 16px;
  background: var(--fail-bg);
  color: var(--fail-text);
  border: 1px solid var(--fail-text);
}

@media (max-width: 640px) {
  main { padding: 32px 18px 64px; }
  h1.site-title { font-size: 40px; }
  h2 { font-size: 26px; }
  .tally-row { grid-template-columns: repeat(2, 1fr); }
  .results-table th.col-thinking,
  .results-table td.col-thinking,
  .results-table th.col-date,
  .results-table td.col-date { display: none; }
  .transcript-meta { margin-left: 0; }
  .transcript-header { gap: 8px; }
}

/* ── Cross-site Virtual Intelligence series header ──
   Sits at the very top of every page, above the site-specific masthead.
   Visual style matches the footer's related-links strip: uppercase,
   letter-spaced, muted, framed with top + bottom rules. */
.page-header {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 0;
  font-family: var(--sans);
  color: var(--muted);
}
.page-header-series { display: none; } /* footer-style strip carries no inline label */
.page-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--light);
  border-bottom: 1px solid var(--light);
}
.page-header-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
.page-header-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
@media (max-width: 720px) {
  .page-header { padding: 20px 16px 0; }
  .page-header-nav { gap: 12px; font-size: 11px; }
}

/* ── Per-vendor transcript navigation ──
   On every transcripts/<slug>.html page: a non-sticky pill rail at the
   top (back-link + all-vendors-as-pills) and a wrap-around prev/next
   pair at the bottom. Pills wrap to multiple rows on narrow screens. */
.vendor-rail {
  background: var(--bg);
  border-bottom: 1px solid var(--light);
  padding: 14px 24px 12px;
}
.vendor-rail-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.vendor-rail-back {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 10px;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
.vendor-rail-back:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.vendor-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
}
.vendor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 14px;
  border: 1px solid var(--light);
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.vendor-pill:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.vendor-pill.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
  cursor: default;
}
.vendor-pill .pill-logo {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: var(--logo-url) no-repeat center / contain;
          mask: var(--logo-url) no-repeat center / contain;
  flex: 0 0 auto;
}
.vendor-pill .pill-name { letter-spacing: 0.02em; }
.vendor-pill .pill-count {
  font-size: 10px;
  opacity: 0.65;
  margin-left: 2px;
}
.vendor-pill.active .pill-count { opacity: 0.7; }

/* Bottom prev/next pair */
.vendor-pagination {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 48px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--light);
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vendor-pagination a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
  flex: 1 1 0;
  max-width: 50%;
}
.vendor-pagination a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.vendor-pagination .pag-next { text-align: right; }

@media (max-width: 720px) {
  .vendor-rail { padding: 10px 14px 8px; }
  .vendor-pill { padding: 4px 8px 4px 6px; font-size: 11px; }
  .vendor-pill .pill-logo { width: 12px; height: 12px; }
  .vendor-pagination { font-size: 11px; gap: 12px; margin-top: 32px; }
}
