/* Virtual summer camp 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-source { font-family: var(--code); font-size: 0.75rem; color: var(--gray); margin: 4px 0 8px; }
.w-big { margin: 8px 0; font-family: var(--heading); font-size: 1.05rem; max-width: 72ch; }
.w-big strong { color: var(--accent); }

.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:focus-visible, .seg-option:focus-visible, .vc-col:focus-visible, .vc-cell:focus-visible, .vc-slider input: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); }

/* Micro:bit */
.vc-mb-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-start; margin: 8px 0; }
.vc-board { flex: 0 0 150px; }
.vc-mb { display: block; width: 150px; height: 150px; }
.vc-mb-face { fill: var(--background-alt); stroke: var(--gray); stroke-width: 1.5; }
.vc-led { fill: var(--light-gray); opacity: 0.55; }
.vc-led.is-on { fill: var(--accent); opacity: 1; }
.vc-mb-side { flex: 1 1 260px; min-width: 0; }
.vc-sliders { display: flex; flex-direction: column; gap: 8px; }
.vc-slider { display: grid; grid-template-columns: 1fr 48px; gap: 2px 10px; align-items: center; font-size: 0.86rem; }
.vc-slabel { grid-column: 1 / -1; color: var(--dark-gray); }
.vc-slider input[type="range"] { width: 100%; accent-color: var(--primary); }
.vc-val { text-align: right; }
.vc-code { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--primary); background: var(--background-alt); font-family: var(--code); font-size: 0.76rem; overflow-x: auto; white-space: pre; }
.vc-blocks { margin: 8px 0; padding-left: 1.4em; font-family: var(--code); font-size: 0.82rem; }
.vc-blocks li { padding: 3px 0; border-bottom: 1px solid var(--light-gray); text-align: left; }

/* Tables */
.vc-table-scroll { overflow-x: auto; }
.vc-table, .paper-body .results-table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 10px 0; overflow-wrap: normal; }
.vc-table th, .vc-table td, .paper-body .results-table th, .paper-body .results-table td { padding: 6px 8px; border: 0; border-bottom: 1px solid var(--light-gray); text-align: left; vertical-align: top; font-size: 0.86rem; }
.vc-table th, .paper-body .results-table th { font-family: var(--code); font-size: 0.74rem; color: var(--gray); font-weight: 500; }
.vc-table th.is-on { color: var(--accent); }
.vc-table td.is-on, .vc-table tr.is-on td { background: var(--background-alt); }
.vc-table caption, .paper-body .results-table caption { caption-side: top; text-align: left; }
.vc-diff { color: var(--accent); font-weight: 600; }

/* Charts */
.vc-chart { margin: 6px 0; overflow-x: auto; }
.vc-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.c-grid { stroke: var(--light-gray); stroke-width: 1; }
.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; }
.c-label.vc-on { fill: var(--accent); font-weight: 600; }
.vc-val { fill: var(--text); font-family: var(--code); font-size: 11px; }
.vc-cellval { fill: var(--text); font-family: var(--code); font-size: 11px; }
.vc-inheat { fill: var(--background); font-family: var(--code); font-size: 11px; font-weight: 600; }
.vc-heat-bg { fill: var(--background-alt); }
.vc-heat { fill: var(--primary); }
.vc-tail { fill: var(--light-gray); opacity: 0.5; }
.vc-cell { cursor: pointer; }
.vc-cell.is-on .vc-heat-bg, .vc-cell.is-on .vc-tail { stroke: var(--accent); stroke-width: 1; }
.vc-y20 { fill: var(--gray); }
.vc-y21 { fill: var(--primary); }
.vc-length { fill: none; stroke: var(--gray); stroke-width: 1; stroke-dasharray: 3 2; }
.vc-target { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 3; }
.vc-track { fill: var(--light-gray); opacity: 0.45; }
.vc-ci { stroke: var(--text); stroke-width: 1.5; }
.vc-hit { fill: transparent; }
.vc-col { cursor: pointer; }
.vc-col.is-on .vc-hit { fill: var(--light-gray); opacity: 0.45; }

.c-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-family: var(--code); font-size: 0.76rem; color: var(--dark-gray); }
.vc-lg { display: inline-flex; align-items: center; gap: 6px; }
.vc-sw { display: inline-block; width: 12px; height: 10px; }
.vc-sw.vc-y20 { background: var(--gray); }
.vc-sw.vc-y21 { background: var(--primary); }
.vc-sw.vc-length { border: 1px dashed var(--gray); }

.vc-details { margin: 8px 0; max-width: 72ch; }
.vc-details summary { cursor: pointer; font-family: var(--heading); padding: 4px 0; }
.vc-steps { margin: 8px 0; padding-left: 1.4em; max-width: 72ch; }
.vc-steps li { margin: 4px 0; padding: 4px 0; border-bottom: 1px solid var(--light-gray); text-align: left; }
.paper-body li { text-align: left; }
