/* FDE-Bench field note: interactive demos, case 002 map, charts.
   Colours are theme tokens; fde-bench.js passes them to the SVG as CSS variables. */
.content-body {
  --fde-route: #a3a3a3;
  --fde-hull: #5c5c5c;
  --fde-store: #7a7a7a;
  --fde-dim: #d0d0d0;
  --fde-range: #dcdcdc;
}
:root[data-theme="dark"] .content-body {
  --fde-route: #5c5c5c;
  --fde-hull: #9a9a9a;
  --fde-store: #8f8f8f;
  --fde-dim: #343434;
  --fde-range: #303030;
}

.content-body .fde-fig { margin: 28px 0 6px; padding: 14px 0 0; border-top: 2px solid var(--line-strong); }
.content-body .fde-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; }
.content-body .fde-svg.is-map { max-height: 620px; background: var(--panel-raised); }
.content-body .fde-plot { position: relative; }
.content-body .fde-plot.is-square { max-width: 520px; }
.content-body .fde-caption { margin: 8px 0 28px; color: var(--text-2); font: 600 13px/1.5 var(--font-ui); text-align: left; }

.content-body .fde-demo__head { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; margin-bottom: 8px; font-size: 14px; line-height: 1.5; }
.content-body .fde-demo__hint { color: var(--accent); font: 800 12px/1.8 var(--font-ui); letter-spacing: 0.02em; text-transform: uppercase; }
.content-body .fde-demo__count { color: var(--text-2); }
.content-body .fde-demo__count b { color: var(--text); }
.content-body .fde-demo__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 2px; color: var(--text-2); font: 500 13px/1.5 var(--font-ui); }
.content-body .fde-key { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.content-body .fde-key.is-hollow { border: 2px solid var(--text-2); background: transparent; }
.content-body .fde-key.is-square { border-radius: 0; background: var(--text); }
.content-body .fde-key.is-bar { border-radius: 0; }
.content-body .fde-ring { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border: 2px solid var(--accent); border-radius: 50%; vertical-align: middle; }
.content-body .fde-ring.is-gray { border-color: var(--text-3); border-style: dashed; }
.content-body .fde-dash { display: inline-block; width: 18px; margin-right: 6px; border-top: 2px dashed var(--text-3); vertical-align: middle; }
.content-body .fde-x { margin-right: 6px; color: var(--accent); font-size: 16px; line-height: 1; }
.content-body .fde-xmark { font: 700 22px/1 var(--font-ui); pointer-events: none; }
.content-body .fde-xmark.is-small { font-size: 15px; }
.content-body .fde-note { fill: var(--text-2); font: 500 12px var(--font-ui); }
.content-body .fde-note.is-muted { fill: var(--text-3); }
/* Map text is in map units; the map is drawn at about 0.73x, so 17 units show as 12px. */
.content-body .fde-maplabel { fill: var(--text); font: 800 17px var(--font-ui); paint-order: stroke; stroke: var(--panel-raised); stroke-width: 4px; pointer-events: none; }
.content-body .fde-maplabel.is-depot { text-anchor: start; }

.content-body .fde-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.content-body .fde-tabs button { padding: 6px 11px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 700 12px/1.4 var(--font-ui); cursor: pointer; }
.content-body .fde-tabs button:hover { color: var(--accent); }
.content-body .fde-tabs button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.content-body .fde-rank { color: var(--text-2); font: 600 12px var(--font-ui); }
.content-body .fde-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 16px; margin-bottom: 12px; }
.content-body .fde-stats div { padding: 8px 0 4px; border-top: 1px solid var(--line-strong); }
.content-body .fde-stats span { display: block; color: var(--text-2); font: 800 12px/1.4 var(--font-ui); letter-spacing: 0.02em; text-transform: uppercase; }
.content-body .fde-stats b { color: var(--text); font: 800 20px/1.3 var(--font-ui); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.content-body .fde-layers { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; color: var(--text-2); font: 600 13px/1.5 var(--font-ui); }
.content-body .fde-layers input { margin-right: 6px; accent-color: var(--accent); }

.content-body .fde-axis-label { margin-bottom: 6px; color: var(--text-2); font: 600 12px/1.4 var(--font-ui); }
.content-body .fde-grid { stroke: var(--line); stroke-width: 1; }
.content-body .fde-tick { fill: var(--text-3); font: 500 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.content-body .fde-rowlabel { fill: var(--text-body); font: 600 13px var(--font-ui); }
.content-body .fde-endlabel { fill: var(--text-2); font: 700 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.content-body .fde-tip { position: absolute; z-index: 3; display: none; padding: 8px 12px; border: 1px solid var(--line-strong); background: var(--ink); color: var(--text-body); font: 500 13px/1.6 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.content-body .fde-tip b { color: var(--text); }
.content-body .fde-bad { color: var(--accent); }

/* Trap matrix and callouts */
.content-body .fde-trap td, .content-body .fde-trap th { text-align: center; }
.content-body .fde-trap td:first-child, .content-body .fde-trap th:first-child { text-align: left; }
.content-body .fde-fail { color: var(--accent); font-weight: 800; }
.content-body .fde-pass { color: var(--text-3); }
.content-body .fde-callout { position: relative; max-width: var(--measure); margin: 2em 0; padding: 12px 0 0; border-top: 1px solid var(--line-strong); }
.content-body .fde-callout > :last-child { margin-bottom: 0; }
.content-body .fde-callout__title { position: absolute; top: 12px; left: calc(-1 * var(--col)); width: var(--rail); color: var(--accent); font: 800 13px/1.35 var(--font-ui); letter-spacing: 0.01em; text-transform: uppercase; }

@media (max-width: 900px) {
  .content-body .fde-callout__title { position: static; display: block; width: auto; margin-bottom: 6px; }
}

@media (max-width: 760px) {
  .content-body .fde-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-body .fde-note { font-size: 22px; }
  .content-body .fde-xmark { font-size: 34px; }
  .content-body .fde-xmark.is-small { font-size: 26px; }
  .content-body .fde-maplabel { font-size: 36px; stroke-width: 6px; }
}
