/* ─── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --bg:       #ffffff;
  --paper:    #ffffff;
  --ink:      #1a1917;
  --ink-2:    #3c3a36;
  --muted:    #6b6560;
  --line:     #e0e0e0;
  --accent:   #1a5c3f;
  --accent-2: #b04c22;
  --good:     #1e6e28;
  --warn:     #8a5800;
  --bad:      #91202a;
  --shadow:   rgba(30, 20, 10, 0.07);
  --radius:   10px;
  --font-sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-serif: Georgia, "Palatino Linotype", serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ─── Site header ────────────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header__logos {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-header__logo--nrg { height: 34px; width: auto; }
.site-header__logo--ut  { height: 34px; width: auto; }
.site-header__venue {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

/* ─── Hero section ───────────────────────────────────────────────────────────── */
.hero-section {
  padding: 56px 0 40px;
  text-align: center;
}
.hero-section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 20px;
}
.hero-section__authors {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.hero-section__affil {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-section__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pill-link {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.pill-link:hover { background: var(--accent); color: #fff; }
.pill-link[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--muted);
  pointer-events: none;
}

/* ─── Content sections ───────────────────────────────────────────────────────── */
.content-section {
  max-width: 720px;
  margin: 0 auto 60px;
}
.content-section--wide {
  max-width: 100%;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-2);
  margin: 28px 0 8px;
}
.section-lede {
  font-size: 0.93rem;
  color: var(--ink-2);
  margin-bottom: 20px;
  line-height: 1.65;
}
.table-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ─── Abstract ───────────────────────────────────────────────────────────────── */
.abstract-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-2);
  text-align: justify;
}

/* ─── Method figure ──────────────────────────────────────────────────────────── */
.method-figure { margin: 0; }
.method-figure__img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.method-figure__caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.55;
}

/* ─── Video ──────────────────────────────────────────────────────────────────── */
.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-wrap video { width: 100%; height: auto; display: block; }
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #1a1917;
  color: #888;
  min-height: 240px;
}
.video-placeholder__icon  { font-size: 2.5rem; opacity: 0.4; }
.video-placeholder__label { font-size: 0.9rem; letter-spacing: 0.03em; }
.video-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 760px) {
  .video-demo-grid { grid-template-columns: 1fr; }
}
.video-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}
.video-bt-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.video-bt-prompt {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.video-bt-tree {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffcf7;
  overflow-x: auto;
  padding: 4px;
}
.video-bt-tree svg { width: 100%; height: auto; }

/* ─── Results tables ─────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.results-table th,
.results-table td {
  padding: 9px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.results-table th {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.82rem;
  background: #f4f4f4;
  color: var(--ink-2);
}
.results-table td:first-child,
.results-table th:first-child { text-align: left; }
.results-table .hi { color: var(--good); font-weight: 700; }
.results-table .row-sep td { border-top: 2px solid var(--line); }
.results-table--hardware td { padding: 8px 10px; font-size: 0.83rem; }

/* ─── OOC list ──────────────────────────────────────────────────────────────── */
.ooc-list {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.7;
  padding-left: 24px;
  margin-bottom: 8px;
}
.ooc-list li { padding-left: 4px; }

/* ─── Simulation gallery ────────────────────────────────────────────────────── */
.gallery-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: var(--paper);
}
.gallery-group__head {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-group__head::before {
  content: "▸";
  font-size: 0.8rem;
  transition: transform 0.15s;
}
.gallery-group[open] > .gallery-group__head::before { transform: rotate(90deg); }
.gallery-group__desc {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 20px 14px;
  line-height: 1.55;
}
.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 20px 20px;
}
.gallery-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  margin: 0;
}
.gallery-card__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.gallery-card__media > img {
  width: 100%;
  display: block;
  background: #f0f0f0;
}
.gallery-card__svg {
  background: #fffcf7;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: auto;
}
.gallery-card__svg img {
  max-width: 100%;
  max-height: 300px;
  height: auto;
}
@media (max-width: 700px) {
  .gallery-card__media { grid-template-columns: 1fr; }
  .gallery-card__svg { border-left: none; border-top: 1px solid var(--line); }
}
.gallery-card figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.5;
  border-top: 1px solid var(--line);
}
.gallery-meta {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.gallery-card--success { border-color: #b0dab6; }
.gallery-card--fail    { border-color: #e8b0b0; }
.gallery-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8e4dc;
  color: var(--ink-2);
  margin-right: 6px;
  vertical-align: middle;
}
.gallery-tag--good { background: #d4edda; color: var(--good); }
.gallery-tag--bad  { background: #f8d7da; color: var(--bad); }
.gallery-tag--warn { background: #fff3cd; color: var(--warn); }

/* ─── Comparison pairs (M-Core vs B1) ───────────────────────────────────────── */
.comparison-pair {
  padding: 0 20px 20px;
}
.comparison-pair__prompt {
  font-size: 0.9rem;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.comparison-pair__model {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 8px;
}
.comparison-pair__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) {
  .comparison-pair__cards { grid-template-columns: 1fr; }
}
.gallery-card__media--stacked {
  display: flex;
  flex-direction: column;
}
.gallery-card__media--stacked > img {
  width: 100%;
  display: block;
  background: #f0f0f0;
}
.gallery-card__media--stacked .gallery-card__svg {
  border-left: none;
  border-top: 1px solid var(--line);
}

/* ─── MCP Interface ─────────────────────────────────────────────────────────── */
.mcp-tool-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.mcp-tool-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #f8f8f8;
}
.mcp-tool-card__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.mcp-tool-card__name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  background: #e8f0ea;
  padding: 2px 8px;
  border-radius: 4px;
}
.mcp-tool-card__arrow {
  color: var(--muted);
  font-size: 0.85rem;
}
.mcp-tool-card__return {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-2);
}
.mcp-tool-card__desc {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.mcp-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  font-style: italic;
}

/* ─── Methods ───────────────────────────────────────────────────────────────── */
.method-defs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .method-defs { grid-template-columns: 1fr; }
}
.method-def {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #f8f8f8;
}
.method-def__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.method-def__name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  background: #e8f0ea;
  padding: 2px 9px;
  border-radius: 4px;
}
.method-def__sub {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.method-def__desc {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ─── Robot Contract ─────────────────────────────────────────────────────────── */
.contract-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
}
.contract-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.contract-tab:hover { color: var(--ink); }
.contract-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.contract-pane {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}
.contract-pane[hidden] { display: none; }

.contract-block {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.contract-block[open] {
  flex: 0 0 100%;
}
.contract-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.contract-block__head::marker,
.contract-block__head::-webkit-details-marker { display: none; }
.contract-block__head::before {
  content: "▸";
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.contract-block[open] > .contract-block__head::before { transform: rotate(90deg); }
.contract-block__name {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}
.contract-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}

.contract-table-wrap {
  padding: 0 18px 16px;
  overflow-x: auto;
}
.contract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.contract-table th,
.contract-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
.contract-table th {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8f8f8;
}
.contract-table code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: #f0f0f0;
  padding: 1px 5px;
  border-radius: 3px;
}
.contract-table a {
  text-decoration: none;
  color: inherit;
}
.contract-table a:hover code {
  background: #e0ecf0;
  color: var(--accent);
}
.contract-table a code::after {
  content: " ↗";
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.6;
}

.rootstock-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}
.contract-rootstock {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  background: #f8f8f8;
}
.contract-rootstock__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.contract-rootstock__name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}
.contract-rootstock__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.contract-rootstock__svg {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  overflow-x: auto;
  padding: 4px;
}
.contract-rootstock__svg svg { width: 100%; height: auto; }
.contract-rootstock__meta {
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.5;
  font-family: var(--font-mono);
  background: #f0f0f0;
  border-radius: 5px;
  padding: 6px 9px;
}
.contract-meta-label {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 3px;
}

/* ─── BibTeX ─────────────────────────────────────────────────────────────────── */
.bibtex-block {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  white-space: pre;
  overflow-x: auto;
  color: var(--ink-2);
}

/* ─── Panel ──────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.panel-head h3 { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; }
.panel-meta { font-size: 0.78rem; color: var(--muted); }

/* ─── Explorer filters ───────────────────────────────────────────────────────── */
.explorer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-group select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
}
.filter-group select:focus { outline: 2px solid var(--accent); }

/* ─── Batch summary ──────────────────────────────────────────────────────────── */
.batch-summary { margin-bottom: 16px; }
.batch-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.stat-tile {
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 100px;
}
.stat-tile__label { font-size: 0.72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-tile__value { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.stat-tile__note  { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ─── Rootstocks ─────────────────────────────────────────────────────────────── */
.rootstocks-panel { margin-bottom: 16px; }
.rootstocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.rootstock-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8f8f8;
}
.rootstock-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.rootstock-card__head h4 { font-size: 0.9rem; font-weight: 700; }
.rootstock-card__svg { margin-bottom: 8px; overflow-x: auto; }
.rootstock-card__desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* ─── Explorer grid ──────────────────────────────────────────────────────────── */
.explorer-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) {
  .explorer-grid { grid-template-columns: 1fr; }
}

/* ─── Task list ──────────────────────────────────────────────────────────────── */
.task-picker-panel { padding: 0; }
.task-picker-panel .panel-head { padding: 16px 16px 0; }
.task-list {
  max-height: 620px;
  overflow-y: auto;
  padding: 8px 8px 12px;
}
.task-list-empty { padding: 16px; font-size: 0.85rem; color: var(--muted); }
.task-item {
  width: 100%;
  background: none;
  border: none;
  border-radius: 7px;
  padding: 9px 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.task-item:hover  { background: #f4f4f4; }
.task-item.is-selected { background: #e8f0ea; }
.task-item__num {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--muted);
  width: 20px;
  text-align: right;
  padding-top: 2px;
}
.task-item__body { display: flex; flex-direction: column; gap: 5px; }
.task-item__prompt {
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-item__tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* ─── Badge ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8e4dc;
  color: var(--ink-2);
  white-space: nowrap;
}
.badge--good { background: #d4edda; color: var(--good); }
.badge--warn { background: #fff3cd; color: var(--warn); }
.badge--bad  { background: #f8d7da; color: var(--bad);  }

/* ─── Task detail ────────────────────────────────────────────────────────────── */
.task-detail-panel { padding: 0; }
.task-detail-panel .panel-head { padding: 16px 20px 0; }
.task-detail-body { padding: 0 20px 20px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.task-prompt {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 14px 0 20px;
  padding: 14px 16px;
  background: #f8f8f8;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.detail-section { margin-bottom: 22px; }
.detail-section__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.detail-section__head h4 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
}
.detail-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .detail-two-col { grid-template-columns: 1fr; }
}

/* ─── BT tree ────────────────────────────────────────────────────────────────── */
.bt-tree-wrap {
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffcf7;
  overflow-x: auto;
  margin-bottom: 8px;
}
.bt-svg-wrap svg { width: 100%; height: auto; }
.bt-tree-empty {
  padding: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ─── Raw block (details/summary) ───────────────────────────────────────────── */
.raw-block { margin-top: 6px; }
.raw-block summary {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.raw-block summary:hover { color: var(--ink); }
.pre-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
  color: var(--ink-2);
  max-height: 420px;
  overflow-y: auto;
  margin-top: 6px;
}

/* ─── Spec & result cards ────────────────────────────────────────────────────── */
.spec-grid, .result-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spec-card {
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 0.82rem;
}
.spec-card--arch { padding: 8px 12px; }
.spec-card__title {
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.spec-card ul { padding-left: 16px; }
.spec-card li { margin-bottom: 2px; }
.result-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 0.82rem;
  gap: 10px;
}
.result-card__label { color: var(--muted); font-size: 0.78rem; }
.result-card__value { font-weight: 600; color: var(--ink); text-align: right; }
.muted-note { font-size: 0.8rem; color: var(--muted); }

/* ─── Site footer ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 20px 24px;
  font-size: 0.78rem;
  color: var(--muted);
}
.site-footer__inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-footer__logo { height: 24px; width: auto; opacity: 0.5; }

/* ─── OOC10 Section ─────────────────────────────────────────────────────── */
.ooc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px 0;
  font-size: 0.85rem;
}
.ooc-key {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--line);
}
.ooc-key--good { background: #d4edda; color: var(--good); border-color: #b0dab6; }
.ooc-key--warn { background: #fff3cd; color: var(--warn); border-color: #f1d68a; }
.ooc-key--bad  { background: #f8d7da; color: var(--bad);  border-color: #e8b0b0; }
.ooc-key--chat { background: #e2e3e5; color: #595e64;     border-color: #c8ccd0; }

.ooc-table-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
}
.ooc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.ooc-table thead tr:first-child th {
  background: #fafafa;
  font-weight: 700;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.ooc-table thead tr:nth-child(2) th {
  background: #fafafa;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  color: #6b6560;
}
.ooc-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
}
.ooc-table tbody tr:last-child td {
  border-bottom: none;
}
.ooc-num {
  text-align: center;
  font-weight: 600;
  color: #8a8a8a;
  width: 36px;
}
.ooc-prompt {
  color: #1a1917;
  line-height: 1.4;
}
.ooc-prompt em {
  color: #3c3a36;
  font-style: italic;
}
.ooc-group {
  border-left: 1px solid var(--line);
}
.ooc-cell {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  width: 70px;
  min-width: 70px;
}
.ooc-cell--good { color: var(--good); background: #ecf7ee; }
.ooc-cell--warn { color: var(--warn); background: #fff8e1; }
.ooc-cell--bad  { color: var(--bad);  background: #fbeaec; }
.ooc-cell--chat { color: #595e64;     background: #f0f1f3; }

.ooc-table tfoot td {
  padding: 10px 8px;
  background: #fafafa;
  font-weight: 700;
  border-top: 2px solid var(--line);
}
.ooc-total-label {
  text-align: right;
  color: #3c3a36;
}
.ooc-total {
  text-align: center;
  color: #1a1917;
}

.ooc-foot {
  font-weight: 700;
  color: var(--warn);
  vertical-align: super;
  font-size: 0.75em;
  margin-left: 2px;
}
.ooc-footnote {
  font-size: 0.85rem;
  color: #6b6560;
  margin: 4px 0 18px 0;
}
.ooc-footnote code {
  background: #f3f3f3;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

.ooc-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 4px 16px;
}
.ooc-details > summary {
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  list-style: none;
  position: relative;
  padding-left: 18px;
}
.ooc-details > summary::-webkit-details-marker { display: none; }
.ooc-details > summary::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7em;
  color: #8a8a8a;
  transition: transform 0.15s ease;
}
.ooc-details[open] > summary::before { transform: translateY(-50%) rotate(90deg); }
.ooc-modes {
  margin: 8px 0 12px 0;
  padding-left: 22px;
  font-size: 0.92rem;
  line-height: 1.6;
}
.ooc-modes li { margin-bottom: 6px; }
.ooc-modes code {
  background: #f3f3f3;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}
