/* EVO-SCHIRP widget. Theme colors only; ruled rows, no cards. */

.w-demo {
  margin: 10px 0 8px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--light-gray);
}
.w-demo:not(.w-ready)::before { content: "This demo needs JavaScript."; color: var(--gray); font-size: 0.9rem; }

.w-note { margin: 8px 0; font-size: 0.88rem; color: var(--dark-gray); max-width: 72ch; }
.w-mono { font-family: var(--code); font-size: 0.78rem; color: var(--gray); }
.w-big { margin: 8px 0; font-family: var(--heading); font-size: 1.05rem; }
.w-big strong { color: var(--accent); font-size: 1.35rem; }

.w-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0; }
.w-btn {
  appearance: none; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--primary); background: var(--primary); color: var(--background);
  font: inherit; font-family: var(--heading); font-size: 0.88rem; font-weight: var(--semi-bold);
  cursor: pointer; border-radius: 0;
}
.w-btn:hover { background: transparent; color: var(--primary); }
.w-btn-quiet { background: transparent; color: var(--primary); }
.w-btn-quiet:hover { background: var(--primary); color: var(--background); }
.w-btn[disabled] { opacity: 0.45; cursor: default; }
.w-btn.running { background: transparent; color: var(--accent); border-color: var(--accent); }
.w-btn:focus-visible, .seg-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--light-gray); }
.seg-option {
  appearance: none; padding: 6px 10px; border: 0; border-right: 1px solid var(--light-gray);
  background: transparent; color: var(--text); font: inherit; font-family: var(--code); font-size: 0.78rem;
  cursor: pointer; border-radius: 0; min-height: 34px;
}
.seg-option:last-child { border-right: 0; }
.seg-option[aria-checked="true"] { background: var(--light-gray); color: var(--accent); }

.w-range { display: grid; grid-template-columns: auto minmax(0, 1fr) 2.6rem; align-items: center; gap: 4px 10px; margin: 6px 0; width: min(100%, 360px); font-family: var(--code); font-size: 0.78rem; color: var(--gray); }
.w-range input[type="range"] { width: 100%; accent-color: var(--primary); }
.w-range output { text-align: right; color: var(--text); }

/* charts */
.ev-ring, .ev-chart, .ev-grid-chart, .ev-bars { display: block; width: 100%; max-width: 760px; height: auto; margin: 8px 0; overflow: visible; }
.c-tick { fill: var(--gray); font-family: var(--code); font-size: 11px; }
.c-label { fill: var(--dark-gray); font-family: var(--code); font-size: 11px; }

.ev-edge { stroke: var(--gray); stroke-width: 1.2; opacity: 0.45; }
.ev-edge-now { stroke: var(--accent); stroke-width: 3; }
.ev-edge-oneway { stroke: var(--gray); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ev-arrowhead { fill: var(--gray); }
.ev-node circle { fill: var(--primary); stroke: var(--primary); stroke-width: 2; }
.ev-node text { fill: var(--background); font-family: var(--code); font-size: 12px; font-weight: 600; }
.ev-node-idle circle { fill: var(--background); stroke: var(--gray); stroke-dasharray: 2 3; }
.ev-node-idle text { fill: var(--gray); }

.ev-grid { stroke: var(--light-gray); stroke-width: 1; }
.ev-band { fill: var(--light-gray); opacity: 0.55; }
.ev-ref { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 4; }
.ev-dot { fill: var(--gray); opacity: 0.75; }
.ev-line { fill: none; stroke-width: 2; }
.ev-line-0 { stroke: var(--primary); }
.ev-line-1 { stroke: var(--accent); }
.ev-line-2 { stroke: var(--text); stroke-dasharray: 5 3; }
.ev-line-3 { stroke: var(--primary); stroke-dasharray: 2 3; }
.ev-line-4 { stroke: var(--accent); stroke-dasharray: 8 3; }
.ev-line-5 { stroke: var(--dark-gray); }

.ev-cell { stroke: none; }
.ev-valid { fill: var(--primary); }
.ev-collision { fill: var(--accent); }
.ev-invalid { fill: var(--text); }
.ev-inactive { fill: var(--background-alt); stroke: var(--gray); stroke-width: 1; }
.ev-x { stroke: var(--background); stroke-width: 2; fill: none; }
.ev-bar { fill: var(--gray); }
.ev-bar-on { fill: var(--primary); }

/* facts */
.paper-body .ev-facts { display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); margin: 10px 0; border-top: 1px solid var(--light-gray); max-width: 760px; }
.ev-facts dt, .ev-facts dd { margin: 0; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--light-gray); }
.ev-facts dt { font-family: var(--code); font-size: 0.75rem; color: var(--gray); }
.ev-facts dd { font-size: 0.9rem; overflow-wrap: anywhere; }
@media (max-width: 560px) { .paper-body .ev-facts { grid-template-columns: minmax(0, 1fr); } .ev-facts dt { border-bottom: 0; padding-bottom: 0; } }

/* tables */
.ev-table-wrap { overflow-x: auto; max-width: 100%; }
.ev-table-block { max-width: 100%; }
.ev-table-block .w-note { margin-bottom: 0; }
.ev-pair-tables { display: flex; flex-wrap: wrap; gap: 0 28px; align-items: flex-start; }
.paper-body .results-table { width: 100%; min-width: 420px; border-collapse: collapse; margin: 12px 0; overflow-wrap: normal; }
.paper-body .results-table th, .paper-body .results-table td { padding: 6px 8px; border-bottom: 1px solid var(--light-gray); text-align: left; vertical-align: middle; }
.paper-body .results-table th { font-family: var(--code); font-size: 0.75rem; color: var(--gray); font-weight: 500; }
.paper-body .ev-matrix { width: auto; min-width: 0; }
.paper-body .ev-matrix th, .paper-body .ev-matrix td { padding: 4px 6px; text-align: center; font-family: var(--code); font-size: 0.8rem; min-width: 1.7rem; }
.paper-body .ev-matrix td:first-child, .paper-body .ev-matrix th:first-child { text-align: left; color: var(--gray); }
.ev-matrix tr.ev-now td { background: var(--background-alt); }
.ev-matrix td.ev-idle { color: var(--gray); }
.ev-matrix td.ev-oneway { color: var(--gray); text-decoration: underline dotted; }
.ev-matrix td.ev-hl { background: var(--light-gray); color: var(--accent); font-weight: 600; }
.ev-matrix tr.ev-now td.ev-pair { color: var(--accent); font-weight: 600; }

.paper-body li { text-align: left; }
