/* PathKEY — Report sections (adv-sections.js). Role tokens only; what the
 * three library pages share is in css/sets.css. */

.sections-page .sec-missing-toggle { align-items: center; min-height: var(--h-sm); }
.sections-page .sec-missing-toggle .checkbox-input { margin-top: 0; }

/* ---------- the library ---------- */
.sec-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.sec-item { min-width: 0; }

/* ---------- one section's body ---------- */
.sec-body { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5) var(--sp-5) calc(var(--sp-4) + var(--grip-w)); font-size: var(--fs-13); line-height: var(--lh-13); color: var(--text-2); }
.sec-line { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.sec-line-label { margin: 0; padding-top: 2px; font-size: var(--fs-11); line-height: var(--lh-11); font-weight: var(--fw-bold); letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--text-eyebrow); }
.sec-line-body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.sec-line-body p { margin: 0; max-width: 82ch; }
/* the texts, as the Builder's report outline shows them (scorecard.textCell) */
.sec-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--sp-2); }
.sec-marks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.sec-versions td { vertical-align: top; }
.sec-versions td:first-child { width: 1%; white-space: nowrap; }

/* the foot: where it is used and how far each language is written, left;
 * the one action, right. (Named apart from the section editor's .sec-langs.) */
.sec-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line-soft); }
.sec-foot-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); min-width: 0; }
.sec-lang-cov { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); }
.sec-lang-cov-label { font-size: var(--fs-12); color: var(--text-muted); }
.sec-lang { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-12); color: var(--text-2); }

/* the head: the name, and under it the part of the report and the kind */
.sec-item .accordion-btn { flex-wrap: wrap; row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
.sec-item .accordion-label { flex: 0 1 auto; }
.sec-item .accordion-count { flex: 1 0 100%; padding-left: calc(16px + var(--sp-2)); font-size: var(--fs-12); line-height: var(--lh-12); }

/* ---------- versions in the list ---------- */
.sec-ver-name { display: block; font-size: var(--fs-12); font-weight: var(--fw-regular); color: var(--text-muted); }
.sec-ver-warn { display: block; margin-top: 4px; }
.sec-order-note { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; font-size: var(--fs-12); line-height: var(--lh-12); color: var(--text-muted); }
.sec-order-note .icon { flex: none; margin-top: 1px; color: var(--icon); }
.sec-order-note strong { color: var(--text-2); font-weight: var(--fw-medium); }

/* ---------- a new section (dialog): the kind as four cards ---------- */
.nb-kind { margin: 0; padding: 0; border: 0; min-width: 0; }
.nb-kind > .field-legend { margin-bottom: 6px; }
.nb-kind .radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--sp-2); }
.nb-note { margin: 0; }

/* ---------- the custom-conditions editor (dialog) ---------- */
.ver-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.ver { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0; min-width: 0; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-surface); box-shadow: var(--shadow-card); transition: border-color var(--dur-2) var(--ease); }
.ver.is-unreachable { border-color: var(--warn); }
.ver-head { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--h-sm); }
.ver-title { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-14); font-weight: var(--fw-semibold); letter-spacing: var(--track-tight); color: var(--text); }
.ver-echo { font-weight: var(--fw-regular); color: var(--text-2); }
.ver-tools { display: flex; align-items: center; gap: 2px; }
.ver-tools .ver-try { margin-right: var(--sp-2); }
.ver-tools .btn:disabled { background: transparent; }
.ver-warn { display: flex; align-items: flex-start; gap: 6px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-control); background: var(--warn-soft); font-size: var(--fs-12); line-height: var(--lh-12); color: var(--warn-text); }
.ver-warn .icon { flex: none; margin-top: 1px; }
.ver-name { max-width: 360px; }
textarea.ver-body { field-sizing: content; min-height: 92px; max-height: 300px; }

@media screen and (max-width: 767px) {
  .sec-body { padding: var(--sp-4); }
  .ver-head { flex-wrap: wrap; }
  .sec-line { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
}

/* ---------- WS-SCORING (v4): texts by place and the chart (place-sections.js) ---------- */
/* a short text per language: English in view, the others folded away */
.ps-lang { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.ps-lang > .field { margin: 0; max-width: 520px; }
.ps-more > summary { list-style: none; display: flex; width: fit-content; max-width: 100%; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-13); font-weight: var(--fw-medium); color: var(--text-2); border-radius: var(--r-control); }
.ps-more > summary::-webkit-details-marker { display: none; }
.ps-more > summary::before { content: ""; width: 12px; height: 12px; flex: none; transform: rotate(-90deg); background: var(--chevron-img) center / 12px 12px no-repeat; transition: transform var(--dur-2) var(--ease); }
.ps-more[open] > summary::before { transform: none; }
.ps-more > summary:hover { color: var(--text); }
.ps-more[open] > summary { margin-bottom: var(--sp-2); }
.ps-more-count { font-weight: var(--fw-regular); color: var(--text-muted); }
.ps-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-2) var(--sp-3); }
.ps-langs .field { margin: 0; }
.ps-layout { margin: 0; padding: 0; border: 0; min-width: 0; }
.ps-start { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.ps-start-label { font-size: var(--fs-12); font-weight: var(--fw-semibold); color: var(--text-muted); }
.ps-cols { display: flex; flex-direction: column; gap: var(--sp-3); }
.ps-col { margin: 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-card); min-width: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.ps-tone { max-width: 200px; margin: 0; }
.ps-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.ps-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: end; gap: var(--sp-2) var(--sp-3); }
.ps-item .field { margin: 0; }
.ps-item .checkbox { padding-bottom: 6px; }
.ps-note { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-control); background: var(--bg-subtle); font-size: var(--fs-13); line-height: var(--lh-13); color: var(--text-2); }
.ps-note .icon { flex: none; margin-top: 2px; color: var(--icon); }
.ps-note strong { color: var(--text); font-weight: var(--fw-semibold); }
.ps-labels caption { text-align: left; font-size: var(--fs-13); font-weight: var(--fw-semibold); padding-bottom: var(--sp-2); }
.ps-labels th[scope="col"]:first-child { width: 38%; }
.ps-labels td .input { width: 100%; min-width: 120px; min-height: var(--h-sm); padding-top: 4px; padding-bottom: 4px; font-size: var(--fs-13); }
@media screen and (max-width: 767px) {
  .ps-item { grid-template-columns: minmax(0, 1fr); }
}
