/* Router canaries 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.02rem; }
.w-big strong { color: var(--accent); font-size: 1.3rem; }

.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.running { background: transparent; color: var(--accent); border-color: var(--accent); }
.w-btn[disabled] { cursor: progress; opacity: 0.7; }
.w-btn:focus-visible, .seg-option:focus-visible, .rc-cell: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); }

.rc-ctrls { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0; padding-top: 6px; border-top: 1px solid var(--light-gray); }
.rc-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rc-ctl-label { font-family: var(--code); font-size: 0.75rem; color: var(--gray); min-width: 5.5rem; }
.w-range { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3rem; align-items: center; gap: 4px 10px; margin: 6px 0; max-width: 520px; 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 */
.rc-net, .rc-strip, .rc-grid50, .rc-hist { display: block; width: 100%; max-width: 760px; height: auto; margin: 8px 0; overflow: visible; }
.c-grid { stroke: var(--light-gray); stroke-width: 1; }
.c-ref { stroke: var(--gray); stroke-width: 1.5; stroke-dasharray: 2 3; }
.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; }

.rc-link { stroke: var(--gray); stroke-width: 2; }
.rc-link.thin { stroke: var(--light-gray); stroke-width: 1; }
.rc-switch { fill: var(--background-alt); stroke: var(--primary); stroke-width: 1.5; }
.rc-switch-label { fill: var(--text); font-family: var(--code); font-size: 11px; }
.rc-host { fill: var(--gray); }
.rc-host.att { fill: var(--accent); }
.rc-victim { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 2 2; }
.rc-canary { fill: var(--primary); }
.rc-canary.alarm { fill: var(--accent); }
.rc-meter-bg { fill: var(--background-alt); stroke: var(--light-gray); }
.rc-meter { fill: var(--primary); }
.rc-meter.low { fill: var(--accent); }
.rc-thr { stroke: var(--text); stroke-width: 1.5; }
.rc-pip { fill: var(--background-alt); stroke: var(--light-gray); }
.rc-pip.on { fill: var(--accent); stroke: var(--accent); }
.rc-chirp { fill: var(--accent); font-family: var(--heading); font-weight: 700; font-size: 15px; }

.rc-thr-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 3; }
.rc-thr-text { fill: var(--accent); }
.rc-mean { stroke: var(--primary); stroke-width: 1.5; }
.rc-eline { fill: none; stroke-width: 1.4; stroke: var(--primary); opacity: 0.75; }
.rc-eline.k1 { stroke: var(--text); opacity: 0.45; }
.rc-eline.k2 { stroke: var(--gray); }
.rc-eline.k3 { stroke: var(--primary); opacity: 0.4; }
.rc-rep { fill: var(--accent); }
.rc-playhead { stroke: var(--text); stroke-width: 1; opacity: 0.5; }

.rc-key { font-family: var(--code); font-size: 0.75rem; }
.rc-key span { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-right: 3px; }
.rc-sw-key { background: var(--background-alt); border: 1.5px solid var(--primary); }
.rc-host-key { background: var(--gray); border-radius: 50%; }
.rc-att-key { background: var(--accent); border-radius: 50%; }
.rc-vic-key { border: 1.5px dashed var(--text); border-radius: 50%; }
.rc-can-key { width: 0 !important; height: 0 !important; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--primary); }

.rc-readout { margin: 6px 0; font-size: 0.95rem; max-width: 72ch; }
.rc-readout strong { color: var(--accent); }
.rc-readout .w-mono { display: block; margin-top: 4px; }

.rc-pkt { fill: var(--primary); opacity: 0.55; }
.rc-pkt.r1 { opacity: 0.35; } .rc-pkt.r2 { fill: var(--gray); opacity: 0.7; } .rc-pkt.r3 { fill: var(--gray); opacity: 0.45; }
.rc-pkt.r4 { fill: var(--text); opacity: 0.35; } .rc-pkt.r5 { fill: var(--text); opacity: 0.2; }
.rc-pkt.vic { fill: var(--accent); opacity: 1; }
.rc-flag { color: var(--accent); }

.rc-bar { fill: var(--primary); opacity: 0.7; }
.rc-bar.low { fill: var(--accent); }

/* tables */
.rc-table-wrap { overflow-x: auto; max-width: 760px; }
.paper-body .results-table { width: 100%; min-width: 520px; 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 caption { text-align: left; }
.paper-body .results-table th { font-family: var(--code); font-size: 0.75rem; color: var(--gray); font-weight: 500; }
.paper-body .results-table tr.on td { background: var(--background-alt); color: var(--accent); }
.rc-num { font-family: var(--code); font-size: 0.82rem; white-space: nowrap; }
.paper-body .rc-ptable { min-width: 360px; }
.rc-gridtable td.rc-cell {
  position: relative; cursor: pointer; font-family: var(--code); font-size: 0.82rem; white-space: nowrap;
  background: color-mix(in srgb, var(--primary) calc(var(--shade, 0) * 38%), transparent);
}
.rc-gridtable td.rc-cell.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.rc-sub { display: block; font-size: 0.7rem; color: var(--gray); }

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