.ci-settings, .ci-board-card { min-width: 0; grid-column: 1 / -1; }
.ci-settings { gap: 14px; }
.ci-settings[hidden], .ci-board-card[hidden] { display: none; }
.ci-settings h3, .ci-board-card h3 { font-size: 14px; margin: 0; }
.ci-settings p, .ci-board-card p { margin: 0; }
.ci-settings .section-heading, .ci-board-card .section-heading, .ci-title-row, .ci-doc-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ci-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px; align-items: end; }
.ci-upload { padding: 16px; background: var(--surface-soft, #f8f9fc); border: 1px dashed var(--border, #d5dae4); border-radius: 8px; }
.ci-upload > p { grid-column: 1 / -1; }
.ci-upload input[type=file] { width: 100%; background: #fff; min-width: 0; line-height: 1.6; overflow: hidden; }
.ci-feedback { font-size: 12px; line-height: 1.6; color: var(--ink-muted, #526073); overflow-wrap: anywhere; }
.ci-feedback:empty { display: none; }
.ci-feedback[data-error=true] { color: #a52c36; }
.ci-empty { padding: 10px 0; font-size: 13px; color: var(--ink-muted, #637084); }
.ci-document, .ci-event { padding: 14px 0; border-top: 1px solid var(--border, #dce1e8); }
.ci-document > summary, .ci-board-card summary { cursor: pointer; overflow-wrap: anywhere; line-height: 1.65; }
.ci-document summary small, .ci-event small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-muted, #637084); }
.ci-doc-content { margin: 14px 0 0; display: grid; gap: 10px; }
.ci-warning { padding: 8px 12px; background: #fff7e8; color: #764c12; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }
.ci-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.ci-metric { padding: 14px; background: var(--surface-soft, #f8f9fc); border-radius: 7px; border: 1px solid var(--border, #e2e5ed); min-width: 0; overflow-wrap: anywhere; }
.ci-metric h4 { font-size: 13px; font-weight: 650; margin: 0; }
.ci-metric .ci-target { font-size: 18px; font-weight: 650; line-height: 1.6; }
.ci-metric p, .ci-metric summary, .ci-event { font-size: 12px; line-height: 1.65; }
.ci-evidence { white-space: pre-wrap; border-left: 2px solid var(--border, #bec5cf); padding-left: 8px; margin-top: 6px; }
.ci-metric details, .ci-metric button { margin-top: 7px; }
.ci-state { font-size: 11px; color: #536176; }
.ci-board-card { margin: 12px 0; display: grid; gap: 12px; }
.ci-event { display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
.ci-event > div { min-width: 0; }
@media (max-width: 520px) { .ci-upload { grid-template-columns: 1fr; } .ci-upload, .ci-metric { gap: 8px; }
  .ci-upload > button { justify-self: start; } .ci-event { align-items: flex-start; flex-direction: column; } }
.ci-doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ci-board-card summary + .ci-metrics { margin-top: 12px; }
.ci-acceptance summary { color: var(--accent, #b22449); }
.ci-acceptance form { display: grid; gap: 10px; margin-top: 10px; }
.ci-acceptance input, .ci-acceptance textarea { min-width: 0; max-width: 100%; }
.ci-acceptance textarea { width: 100%; resize: vertical; }
.ci-review-target { margin-top: 10px; }
.ci-manual { border-top: 1px dashed var(--border, #dadee7); padding-top: 12px; }
.ci-manual summary { cursor: pointer; font-size: 13px; font-weight: 650; }
.ci-manual .form-footnote { margin: 10px 0; }
.ci-manual-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; margin-bottom:12px; }
.ci-manual-grid .ci-wide { grid-column: 1 / -1; }
.ci-manual-grid > [hidden] { display:none; }
.ci-manual-grid label { min-width:0; font-size:12px; }
.ci-manual-grid input:not([type=checkbox]), .ci-manual-grid textarea, .ci-manual-grid select { max-width:100%; width:100%; }
.ci-document .ci-doc-head { align-items:flex-start; margin:0 0 10px; }
.ci-doc-head > div:first-child { flex:1 1 190px; min-width:0; overflow-wrap:anywhere; }
.ci-doc-head small { display:block; color:var(--ink-muted,#637084); font-size:12px; margin-top:3px; }
.ci-reader { margin:auto; padding:0; border:1px solid var(--border,#d6dce5); border-radius:12px; width:min(94vw,1120px); max-width:100vw; height:min(91vh,1050px); height:min(91dvh,1050px); max-height:100dvh; background:#fff; color:var(--ink,#283141); box-sizing:border-box; }
.ci-reader::backdrop { background:rgba(19,27,42,.56); }
.ci-reader-shell { display:flex;flex-direction:column; height:100%; min-height:0; }
.ci-reader-head,.ci-reader-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; padding:14px 18px; }
.ci-reader-head { border-bottom:1px solid var(--border,#dce1e8); }
.ci-reader-head > div:first-child { min-width:0; flex:1 1 240px; }
.ci-reader-head h2 { margin:3px 0 0; font-size:17px; line-height:1.4; overflow-wrap:anywhere; }
.ci-reader-head p { margin:0; }
.ci-reader-tools { padding:7px 18px 0; }
.ci-reader-tools > div,.ci-reader-tools label { display:flex; align-items:center; gap:7px; }
.ci-reader-tools label { font-size:12px; }
.ci-reader-tools select { min-height:36px; }
.ci-reader-tools[hidden],.ci-reader [hidden] { display:none; }
.ci-reader-status { padding:5px 18px; font-size:12px; color:var(--ink-muted,#617084); min-height:22px; }
.ci-reader .ci-warning { margin:7px 18px 0; }
.ci-reader-body { flex:1 1 0; min-height:0; overflow:auto; padding:12px; background:#eef0f4; overscroll-behavior:contain; }
.ci-reader-page-img { display:block; max-width:none; height:auto; margin:0 auto; background:#fff; box-shadow:0 1px 6px #b4bac4; }
.ci-word { max-width:760px; margin:0 auto; padding:clamp(16px,4vw,42px); background:#fff; box-sizing:border-box; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; }
.ci-word p { margin:0 0 .8em; }
.ci-reader-table-wrap { overflow-x:auto; max-width:100%; margin:.8em 0; }
.ci-reader-table-wrap table { width:100%; border-collapse:collapse; font-size:14px; }
.ci-reader-table-wrap td { min-width:60px; border:1px solid #c5ced8; padding:7px 9px; vertical-align:top; }
@media (max-width:600px) {
  .ci-reader { width:100vw; height:100vh; height:100dvh; border:0; border-radius:0; }
  .ci-reader-head,.ci-reader-tools { padding:8px 10px; gap:6px; }
  .ci-reader-tools > div { flex-wrap:wrap; }
  .ci-reader .button,.ci-reader-tools select { min-height:40px; }
  .ci-reader-body { padding:5px; } .ci-reader-status { padding:4px 10px; }
}
