/* From Allowed to Embedded 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; }
.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, .ae-col: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); }

.ae-scale { display: flex; justify-content: space-between; max-width: 520px; font-family: var(--code); font-size: 0.72rem; color: var(--gray); border-top: 1px solid var(--light-gray); padding-top: 2px; }
.ae-scale span:last-child::after { content: " \2192"; }
.ae-scale span:first-child::before { content: "\2190 "; }
.ae-def { margin: 10px 0 4px; max-width: 72ch; }
.ae-def strong { color: var(--primary); }

.ae-chart { margin: 6px 0; }
.ae-svg { display: block; width: 100%; max-width: 760px; 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; }
.ae-val { fill: var(--text); font-family: var(--code); font-size: 11px; }
.ae-muted-svg { fill: var(--gray); font-family: var(--code); font-size: 11px; font-style: italic; }
.ae-track { fill: var(--light-gray); opacity: 0.45; }
.ae-bar { fill: var(--primary); }
.ae-bar-strong { fill: var(--accent); }
.ae-ug { fill: var(--primary); }
.ae-grad { fill: var(--accent); }
.ae-hit { fill: transparent; }
.ae-col { cursor: pointer; }
.ae-col.is-on .ae-hit { fill: var(--light-gray); opacity: 0.5; }
.ae-phase { stroke: var(--gray); stroke-width: 2; }
.ae-hist { fill: var(--gray); opacity: 0.55; }
.ae-ci { stroke: var(--text); stroke-width: 2; }
.ae-dot { fill: var(--primary); stroke: var(--background); stroke-width: 1.5; }
.ae-dot-low { fill: var(--accent); stroke: var(--background); stroke-width: 1.5; }

.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); }
.ae-lg { display: inline-flex; align-items: center; gap: 6px; }
.ae-sw { display: inline-block; width: 12px; height: 10px; }
.ae-sw-ug { background: var(--primary); }
.ae-sw-grad { background: var(--accent); }
.ae-sw-hist { background: var(--gray); opacity: 0.55; }
.ae-sw-ci { height: 0; border-top: 2px solid var(--text); }

.ae-readout p { max-width: 72ch; }
.ae-muted { color: var(--gray); font-style: italic; }

.ae-table-wrap { overflow-x: auto; }
.ae-table, .paper-body .results-table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 10px 0; overflow-wrap: normal; }
.ae-table th, .ae-table td, .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: top; font-size: 0.86rem; }
.ae-table th, .paper-body .results-table th { font-family: var(--code); font-size: 0.74rem; color: var(--gray); font-weight: 500; }
.ae-table td:not(:first-child) { font-family: var(--code); font-size: 0.8rem; white-space: nowrap; }
.ae-grid th.is-on, .ae-grid td.is-on { background: var(--background-alt); }
.ae-grid th.is-on { color: var(--accent); }
.ae-grid tr.is-strong td { font-weight: var(--semi-bold); }
.ae-inbar { display: inline-block; vertical-align: middle; width: 44px; height: 8px; background: var(--light-gray); }
.ae-inbar > span { display: block; height: 100%; background: var(--primary); }
.ae-grid td.is-on .ae-inbar > span { background: var(--accent); }

.ae-study-wrap { overflow-x: auto; }
.paper-body li { text-align: left; }
