/* Uses the existing EQUA7 form and theme colours. */
.eqpi-entry{margin:14px 0 20px;padding:14px;border:1px solid color-mix(in srgb,currentColor 18%,transparent);border-radius:14px;background:color-mix(in srgb,#bf9b53 8%,transparent)}
.eqpi-entry small{display:block;line-height:1.5;margin-top:8px;opacity:.78}
.eqpi-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.eqpi-ancestor{min-width:0;padding:12px;border:1px solid color-mix(in srgb,currentColor 15%,transparent);border-radius:12px}
.eqpi-ancestor>b{font-size:.9rem}.eqpi-ancestor label{font-size:.85rem}.eqpi-editor details>summary{padding:12px 0;cursor:pointer}
.eqpi-tree{min-width:0;max-width:100%}.eqpi-tree-hint{font-size:.875rem;line-height:1.5;opacity:.8;margin:0 0 14px}
.eqpi-tree-scroller{max-width:100%;overflow-x:auto;padding:4px 2px 16px;overscroll-behavior-x:contain;scrollbar-color:#b29451 transparent;scrollbar-width:thin;border-radius:8px}.eqpi-tree-scroller:focus-visible{outline:2px solid #b29451;outline-offset:3px}
.eqpi-tree-content{--node-width:11.5rem;--root-width:8.5rem;--branch-gap:1.5rem;--sibling-gap:.75rem;--line-color:#a58a54;width:max-content;padding:0 2px}
.eqpi-tree-headings{display:grid;grid-template-columns:var(--root-width) repeat(3,var(--node-width));column-gap:var(--branch-gap);margin-bottom:16px;font-size:.875rem;font-weight:700}.eqpi-tree-headings span{overflow-wrap:anywhere}
.eqpi-tree-start,.eqpi-tree-children{list-style:none;margin:0;padding:0}.eqpi-branch{display:flex;align-items:center;position:relative}.eqpi-tree-children{position:relative;display:flex;flex-direction:column;gap:var(--sibling-gap);padding-left:var(--branch-gap)}
.eqpi-tree-children::before{content:"";position:absolute;left:0;top:50%;width:calc(var(--branch-gap)/2);border-top:2px solid var(--line-color)}
.eqpi-tree-children>.eqpi-branch::before{content:"";position:absolute;left:calc(var(--branch-gap)/-2);top:50%;width:calc(var(--branch-gap)/2);border-top:2px solid var(--line-color)}
.eqpi-tree-children>.eqpi-branch::after{content:"";position:absolute;left:calc(var(--branch-gap)/-2);border-left:2px solid var(--line-color);top:calc(var(--sibling-gap)/-2);bottom:calc(var(--sibling-gap)/-2)}
.eqpi-tree-children>.eqpi-branch:first-child::after{top:50%}.eqpi-tree-children>.eqpi-branch:last-child::after{bottom:50%}
.eqpi-node{box-sizing:border-box;flex:0 0 var(--node-width);width:var(--node-width);min-width:0;min-height:5.5rem;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:10px 12px;border:1px solid color-mix(in srgb,currentColor 20%,transparent);border-left:3px solid #b99b61;border-radius:10px;overflow-wrap:anywhere;background:color-mix(in srgb,#b99b61 5%,transparent)}
.eqpi-node small{font-size:.875rem;line-height:1.35;opacity:.85}.eqpi-node b{font-size:1rem;line-height:1.4}.eqpi-node .eqpi-identifier{font-variant-numeric:tabular-nums}.eqpi-node.is-empty{border-style:dashed;border-left-color:color-mix(in srgb,currentColor 25%,transparent);background:transparent}.eqpi-node.is-empty b{font-weight:400;opacity:.7}
.eqpi-node-root{flex-basis:var(--root-width);width:var(--root-width);background:#183d32;color:#fff;border-color:#183d32;border-left-color:#b99b61}
.eqpi-save-notice{margin:18px 0;padding:16px;border:1px solid #b29451;border-radius:12px;background:color-mix(in srgb,#b29451 8%,transparent);overflow-wrap:anywhere}.eqpi-save-notice h3{font-size:1rem}.eqpi-save-notice p{margin:8px 0 14px}.eqpi-save-notice button{white-space:normal}.eqpi-before{display:block;margin:5px 0 10px;opacity:.85;font-size:.875rem;overflow-wrap:anywhere}
.eqpi-review-row.needs-review{border:1px solid #b29451}.eqpi-review-row.needs-review label>small{opacity:1}.eqpi-review-row input:invalid{border-color:#a03f30}
dialog.eqpi-dialog{width:min(1100px,calc(100vw - 24px));max-width:1100px;max-height:94dvh;margin:auto;padding:0;border:1px solid color-mix(in srgb,currentColor 18%,transparent);border-radius:20px;color:#213e37;background:#faf9f5;overflow:auto;box-sizing:border-box;overscroll-behavior:contain}
dialog.eqpi-dialog::backdrop{background:rgba(12,24,22,.65)}.eqpi-sheet{padding:20px}.eqpi-sheet header{display:flex;align-items:center;justify-content:space-between;gap:16px}.eqpi-sheet header h2{font-size:1.4rem;margin:0}.eqpi-sheet header button{font-size:1.5rem;min-width:44px}
.eqpi-privacy{padding:12px 14px;background:color-mix(in srgb,#b99b61 12%,transparent);border-radius:12px;line-height:1.5;font-size:.9rem}.eqpi-file-actions,.eqpi-toolbar,.eqpi-footer-actions{display:flex;align-items:end;flex-wrap:wrap;gap:10px}.eqpi-toolbar{margin-top:14px}.eqpi-toolbar label{flex:1;min-width:115px;margin:0}.eqpi-toolbar label:first-child{flex:2}.eqpi-sheet button{cursor:pointer;min-height:42px;white-space:normal;line-height:1.3}.eqpi-sheet button:disabled{opacity:.45;cursor:default}.eqpi-status{min-height:1.5em;font-size:.9rem;line-height:1.5}.eqpi-sheet progress{width:100%;margin-bottom:10px}
.eqpi-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.eqpi-document,.eqpi-review{min-width:0}.eqpi-document canvas{display:block;width:100%;height:auto;background:white;border:1px solid #ccc;border-radius:8px}.eqpi-document canvas[hidden]{display:none}.eqpi-document details{margin-top:12px}.eqpi-document summary,.eqpi-review summary{font-weight:600;cursor:pointer;padding:12px 0}.eqpi-document p,.eqpi-review>p{font-size:.85rem;line-height:1.5;opacity:.8}.eqpi-review h3{font-size:1.05rem;margin:12px 0}.eqpi-source{display:flex;flex-wrap:wrap;gap:5px;max-height:250px;overflow:auto;border:1px solid color-mix(in srgb,currentColor 15%,transparent);padding:8px;border-radius:10px}.eqpi-text-token{font-size:.8rem!important;min-height:30px!important;padding:5px 8px!important;overflow-wrap:anywhere;text-align:start}.eqpi-text-token.selected{background:#b99b61;color:#152c25}.eqpi-review-row{display:flex;gap:10px;padding:8px 10px;border:1px solid transparent;border-radius:10px;align-items:flex-start}.eqpi-review-row>input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;margin-top:28px}.eqpi-review-row>label{flex:1;min-width:0;margin:0}.eqpi-review-row label>span{font-size:.82rem;font-weight:600;display:block}.eqpi-review-row label>small{font-size:.73rem;display:block;opacity:.65;overflow-wrap:anywhere}.eqpi-review-row input:not([type=checkbox]),.eqpi-review-row select{width:100%;margin:4px 0;min-width:0;box-sizing:border-box}.eqpi-review-row.has-proposal{background:color-mix(in srgb,#b99b61 9%,transparent)}.eqpi-review-row.eqpi-active-field{border-color:#b99b61}
.eqpi-sheet footer{margin-top:20px;padding-top:16px;border-top:1px solid color-mix(in srgb,currentColor 18%,transparent)}.eqpi-confirm{display:flex;align-items:flex-start;gap:10px;line-height:1.5;font-size:.9rem}.eqpi-confirm input{width:20px;height:20px;flex:0 0 20px}.eqpi-footer-actions{justify-content:flex-end;margin-top:14px}.eqpi-sheet input,.eqpi-sheet select{background:#fff;color:inherit;border:1px solid #ccd2cb;border-radius:9px;padding:10px;box-sizing:border-box}.eqpi-sheet input:focus-visible,.eqpi-sheet select:focus-visible,.eqpi-sheet button:focus-visible{outline:2px solid #b99b61;outline-offset:2px}
html[data-theme=dark] dialog.eqpi-dialog{background:#172923;color:#e9e9df}html[data-theme=dark] .eqpi-sheet input,html[data-theme=dark] .eqpi-sheet select{background:#20362e;border-color:#43584e;color:#e9e9df}
@media(max-width:700px){.eqpi-workspace{grid-template-columns:1fr;gap:15px}.eqpi-sheet{padding:14px}.eqpi-sheet header h2{font-size:1.15rem}.eqpi-file-actions>button{flex:1}.eqpi-file-actions>button[data-action=clear]{flex-basis:100%;min-height:32px}.eqpi-editor-grid{grid-template-columns:1fr}.eqpi-document canvas{max-height:420px;object-fit:contain}.eqpi-toolbar button{flex:1}.eqpi-toolbar label{flex-basis:35%}.eqpi-review-row{padding-inline:4px}.eqpi-footer-actions>button{flex:1}}

/* Field-directed selection works with each document layout. */
.eqpi-review-row{display:grid;grid-template-columns:18px minmax(0,1fr);column-gap:10px;row-gap:0}.eqpi-review-row>.eqpi-pick{grid-column:2;justify-self:end;font-size:.75rem;min-height:30px;padding:5px 9px}.eqpi-source{display:block}.eqpi-text-line{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:7px}.eqpi-text-line[hidden]{display:none}.eqpi-target{padding:10px;border:1px solid #b99b61;border-radius:8px;overflow-wrap:anywhere;opacity:1!important;font-weight:600}.eqpi-search-label{display:block;margin-bottom:8px}.eqpi-search-label input{width:100%;min-width:0}.eqpi-pick:disabled{display:none}

.eqpi-identifiers{grid-column:1/-1;display:grid;gap:12px}.eqpi-identifiers small{display:block;color:var(--muted,#68736e);margin-block:6px;line-height:1.5}.eqpi-other-identifiers{margin-block:10px;padding:10px;border:1px solid var(--line,#d9ddd7);border-radius:12px}.eqpi-other-identifiers>summary{cursor:pointer;font-weight:600;padding:6px}.eqpi-other-identifiers[open]>summary{margin-bottom:8px}.eqpi-other-identifiers>div+div{margin-top:10px}.eqpi-ancestor .eqpi-other-identifiers{margin:0;width:100%;box-sizing:border-box}

/* The label belongs to document recognition, not the saved pedigree. */
.eqpi-beta-badge{display:inline-block;margin-inline-start:.35em;padding:.25em .6em;border:1px solid #a58a53;border-radius:999px;background:#efe3c3;color:#473b22;font-size:.65em;font-weight:750;line-height:1.2;letter-spacing:.06em;vertical-align:middle;white-space:nowrap}
.eqpi-entry .eqpi-beta-note,.eqpi-sheet .eqpi-beta-note{font-size:.88rem;line-height:1.5;opacity:1;margin-block:10px 0;color:inherit}
html[data-theme=dark] .eqpi-beta-badge{background:#413a28;color:#f4dfab;border-color:#ab905b}

.eqpi-tree-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.eqpi-tree-actions button{min-height:44px;white-space:normal;line-height:1.4}.eqpi-tree-panel>summary{cursor:pointer;font-weight:650;padding:12px 0;min-height:44px}.eqpi-tree-panel .eqpi-hide-tree{display:none}.eqpi-tree-panel[open]>summary .eqpi-show-tree{display:none}.eqpi-tree-panel[open]>summary .eqpi-hide-tree{display:inline}.eqpi-print-preview{width:100%;height:62vh;border:1px solid #c5cec5;border-radius:10px;background:white;margin-top:8px}.eqpi-print-dialog .eqpi-footer-actions{position:sticky;bottom:0;background:inherit;padding:12px 0}.eqpi-print-dialog .eqpi-sheet{background:inherit}
@media(max-width:700px){.eqpi-tree-actions button{flex:1 1 140px}.eqpi-tree-actions button:first-child{flex-basis:100%}.eqpi-print-preview{height:55vh}}
