/* Authentic-inquiry 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; }
.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); }
.seg-option:focus-visible, .ci-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ci-chart { margin: 6px 0; }
.ci-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; }
.ci-val { fill: var(--text); font-family: var(--code); font-size: 11px; }

/* project types */
.ci-dot { stroke: var(--background); stroke-width: 1.5; }
.ci-dot.ci-type-app, .ci-type-app-fill { fill: var(--primary); }
.ci-dot.ci-type-res, .ci-type-res-fill { fill: var(--accent); }
.ci-dot.ci-type-mix, .ci-type-mix-fill { fill: var(--text); }
.ci-dot.ci-type-lit { fill: var(--background); stroke: var(--gray); stroke-width: 2; }
.ci-type-lit-fill { fill: var(--gray); }
text.ci-type-app, text.ci-type-res, text.ci-type-mix, text.ci-type-lit { fill: var(--dark-gray); }
.ci-link { fill: none; stroke-width: 2; }
.ci-link.ci-same { stroke: var(--primary); opacity: 0.75; }
.ci-link.ci-diff { stroke: var(--accent); stroke-dasharray: 5 4; }
.ci-dim { opacity: 0.18; }

.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); }
.ci-lg { display: inline-flex; align-items: center; gap: 6px; }
.ci-sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.ci-sw.ci-type-app { background: var(--primary); }
.ci-sw.ci-type-res { background: var(--accent); }
.ci-sw.ci-type-mix { background: var(--text); }
.ci-sw.ci-type-lit { background: transparent; border: 2px solid var(--gray); width: 7px; height: 7px; }
.ci-line { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--primary); }
.ci-line.ci-diff { border-top: 2px dashed var(--accent); }
.ci-line.ci-chance-sw { border-top: 2px dotted var(--gray); }

/* timeline */
.ci-phase-a { fill: var(--light-gray); }
.ci-phase-b { fill: var(--background-alt); stroke: var(--light-gray); }
.ci-tickline { stroke: var(--gray); stroke-width: 1; }
.ci-mark { fill: var(--gray); }
.ci-step[role="button"] { cursor: pointer; }
.ci-step.is-on .ci-mark { fill: var(--accent); }
.ci-step.is-on text { fill: var(--accent); }
.ci-so { fill: var(--light-gray); }
.ci-jr { fill: var(--gray); }
.ci-sr { fill: var(--primary); }

.ci-rows { margin: 8px 0; padding-left: 1.2em; max-width: 72ch; }
.ci-rows li { margin: 0; padding: 5px 0; border-bottom: 1px solid var(--light-gray); text-align: left; font-size: 0.92rem; }

/* matrix and trend */
.ci-table-scroll { overflow-x: auto; }
.ci-matrix { width: 100%; min-width: 420px; max-width: 620px; border-collapse: collapse; margin: 6px 0; }
.ci-matrix caption { caption-side: top; text-align: left; }
.ci-matrix th, .ci-matrix td { padding: 6px 8px; border-bottom: 1px solid var(--light-gray); text-align: right; font-family: var(--code); font-size: 0.8rem; }
.ci-matrix th[scope="row"] { text-align: left; font-family: inherit; font-size: 0.86rem; font-weight: 500; }
.ci-matrix thead th { color: var(--gray); font-weight: 500; font-size: 0.74rem; }
.ci-matrix thead th:first-child { text-align: left; }
.ci-matrix td.ci-diag { background: var(--background-alt); color: var(--primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); }
.ci-matrix td.ci-off { color: var(--accent); font-weight: 600; }
.ci-matrix tr.ci-tot td, .ci-matrix tr.ci-tot th { color: var(--gray); }
.ci-matrix tr.is-on th[scope="row"], .ci-matrix th.is-on { color: var(--accent); }
.ci-trend { fill: none; stroke: var(--primary); stroke-width: 2; }
.ci-trend-dot { fill: var(--primary); }
.ci-chance { fill: none; stroke: var(--gray); stroke-width: 2; stroke-dasharray: 2 4; }
.ci-chance-dot { fill: var(--gray); }
.ci-hit { fill: transparent; cursor: pointer; }
.ci-bar { fill: var(--light-gray); }
.ci-tail { fill: var(--accent); }

.ci-stats, .ci-search { margin-top: 10px; border-top: 1px solid var(--light-gray); }
.ci-sub { font-size: 1rem; margin: 12px 0 4px; }

.paper-body .results-table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 10px 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: top; font-size: 0.86rem; }
.paper-body .results-table th { font-family: var(--code); font-size: 0.74rem; color: var(--gray); font-weight: 500; }
.paper-body .results-table tr.is-on td { background: var(--background-alt); }
.paper-body li { text-align: left; }
